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,700 | Sample Complexity of Learning Mahalanobis Distance Metrics Nakul Verma Janelia Research Campus, HHMI verman@janelia.hhmi.org Kristin Branson Janelia Research Campus, HHMI bransonk@janelia.hhmi.org Abstract Metric learning seeks a transformation of the feature space that enhances prediction quality for a given task. In this work we provide PAC-style sample complexity rates for supervised metric learning. We give matching lower- and upper-bounds showing that sample complexity scales with the representation dimension when no assumptions are made about the underlying data distribution. In addition, by leveraging the structure of the data distribution, we provide rates fine-tuned to a specific notion of the intrinsic complexity of a given dataset, allowing us to relax the dependence on representation dimension. We show both theoretically and empirically that augmenting the metric learning optimization criterion with a simple norm-based regularization is important and can help adapt to a dataset’s intrinsic complexity yielding better generalization, thus partly explaining the empirical success of similar regularizations reported in previous works. 1 Introduction In many machine learning tasks, data is represented in a high-dimensional Euclidean space. The L2 distance in this space is then used to compare observations in methods such as clustering and nearest-neighbor classification. Often, this distance is not ideal for the task at hand. For example, the presence of uninformative or mutually correlated measurements arbitrarily inflates the distances between pairs of observations. Metric learning has emerged as a powerful technique to learn a metric in the representation space that emphasizes feature combinations that improve prediction while suppressing spurious measurements. This has been done by exploiting class labels [1, 2] or other forms of supervision [3] to find a Mahalanobis distance metric that respects these annotations. Despite the popularity of metric learning methods, few works have studied how problem complexity scales with key attributes of the dataset. In particular, how do we expect generalization error to scale—both theoretically and practically—as one varies the number of informative and uninformative measurements, or changes the noise levels? In this work, we develop two general frameworks for PAC-style analysis of supervised metric learning. The distance-based metric learning framework uses class label information to derive distance constraints. The objective is to learn a metric that yields smaller distances between examples from the same class than those from different classes. Algorithms that optimize such distance-based objectives include Mahalanobis Metric for Clustering (MMC) [4], Large Margin Nearest Neighbor (LMNN) [1] and Information Theoretic Metric Learning (ITML) [2]. Instead of using distance comparisons as a proxy, however, one can also optimize for a specific prediction task directly. The second framework, the classifier-based metric learning framework, explicitly incorporates the hypotheses associated with the prediction task to learn effective distance metrics. Examples in this regime include [5] and [6]. 1 Our analysis shows that in both frameworks, the sample complexity scales with a dataset’s representation dimension (Theorems 1 and 3), and this dependence is necessary in the absence of assumptions about the underlying data distribution (Theorems 2 and 4). By considering any Lipschitz loss, our results improve upon previous sample complexity results (see Section 6) and, for the first time, provide matching lower bounds. In light of our observation that data measurements often include uninformative or weakly informative features, we expect a metric that yields good generalization performance to de-emphasize such features and accentuate the relevant ones. We thus formalize the metric learning complexity of a given dataset in terms of the intrinsic complexity d of the optimal metric. For Mahalanobis metrics, we characterize intrinsic complexity by the norm of the matrix representation of the metric. We refine our sample complexity results and show a dataset-dependent bound for both frameworks that relaxes the dependence on representation dimension and instead scales with the dataset’s intrinsic metric learning complexity d (Theorem 7). Based on our dataset-dependent result, we propose a simple variation on the empirical risk minimizing (ERM) algorithm that returns a metric (of complexity d) that jointly minimizes the observed sample bias and the expected intra-class variance for metrics of fixed complexity d. This bias-variance balancing criterion can be viewed as a structural risk minimizing algorithm that provides better generalization performance than an ERM algorithm and justifies norm-regularization of weighting metrics in the optimization criteria for metric learning, partly explaining empirical success of similar objectives [7, 8]. We experimentally validate how the basic principle of normregularization can help enhance the prediction quality even for existing metric learning algorithms on benchmark datasets (Section 5). Our experiments highlight that norm-regularization indeed helps learn weighting metrics that better adapt to the signal in data in high-noise regimes. 2 Preliminaries In this section, we define our notation, and explicitly define the distance-based and classifier-based learning frameworks. Given a D-dimensional representation space X = RD, we want to learn a weighting, or a metric1 M ∗on X that minimizes some notion of error on data drawn from a fixed unknown distribution D on X × {0, 1}: M ∗:= argminM∈M err(M, D), where M is the class of weighting metrics M := {M | M ∈RD×D, σmax(M) = 1} (we constrain the maximum singular value σmax to remove arbitrary scalings). For supervised metric learning, this error is typically label-based and can be defined in two intuitive ways. The distance-based framework prefers metrics M that bring data from the same class closer together than those from opposite classes. The corresponding distance-based error then measures how the distances amongst data violate class labels: errλ dist(M, D) := E(x1,y1),(x2,y2)∼D h φλ ρM(x1, x2), Y i , where φλ(ρM, Y ) is a generic distance-based loss function that computes the degree of violation between weighted distance ρM(x1, x2) := ∥M(x1−x2)∥2 and the label agreement Y := 1[y1 = y2] and penalizes it by factor λ. For example, φ could penalize intra-class distances that are more than some upper limit U and inter-class distances that are less than some lower limit L > U: φλ L,U(ρM, Y ) := ( min{1, λ[ρM −U]+} if Y = 1 min{1, λ[L −ρM]+} otherwise , (1) 1Note that we are looking at the linear form of the metric M; usually the corresponding quadratic form M TM is discussed in the literature, which is necessarily positive semi-definite. 2 where [A]+ := max{0, A}. MMC optimizes an efficiently computable variant of Eq. (1) by constraining the aggregate intra-class distances while maximizing the aggregate inter-class distances. ITML explicitly includes the upper and lower limits with an added regularization on the learned M to be close to a pre-specified metric of interest M0. While we will discuss loss-functions φ that handle distances between pairs of observations, it is easy to extend to relative distances among triplets: φλ triple(ρM(x1, x2), ρM(x1, x3), (y1, y2, y3)) := n min{1, λ[ρM(x1, x2) −ρM(x1, x3)]+} if y1 = y2 ̸= y3 0 otherwise , LMNN is a popular variant, in which instead of looking at all triplets, it focuses on triplets in local neighborhoods, improving the quality of local distance comparisons. The classifier-based framework prefers metrics M that directly improve the prediction quality for a downstream task. Let H represent a real-valued hypothesis class associated with the prediction task of interest (each h ∈H : X →[0, 1]), then the corresponding classifier-based error becomes: errhypoth(M, D) := inf h∈H E(x,y)∼D h 1 |h(Mx) −y| ≥1/2 i . Example classifier-based methods include [5], which minimizes ranking errors for information retrieval and [6], which incorporates network topology constraints for predicting network connectivity structure. 3 Metric Learning Sample Complexity: General Case In any practical setting, we estimate the ideal weighting metric M ∗by minimizing the empirical version of the error criterion from a finite size sample from D. Let Sm denote a sample of size m, and err(M, Sm) denote the corresponding empirical error. We can then define the empirical risk minimizing metric based on m samples as M ∗ m := argminM err(M, Sm), and compare its generalization performance to that of the theoretically optimal M ∗, that is, err(M ∗ m, D) −err(M ∗, D). (2) Distance-Based Error Analysis. Given an i.i.d. sequence of observations z1, z2, . . . from D, zi = (xi, yi), we can pair the observations together to form a paired sample2 Spair m = {(z1, z2), . . . , (z2m−1, z2m)} = {(z1,i, z2,i)}m i=1 of size m, and define the sample-based distance error induced by a metric M as errλ dist(M, Spair m ) := 1 m m X i=1 φλ ρM(x1,i, x2,i), 1[y1,i = y2,i] . Then for any B-bounded-support distribution D (that is, each (x, y) ∼D, ∥x∥≤B), we have the following.3,4 Theorem 1 Let φλ be a distance-based loss function that is λ-Lipschitz in the first argument. Then with probability at least 1 −δ over an i.i.d. draw of 2m samples from an unknown B-boundedsupport distribution D paired as Spair m , we have sup M∈M errλ dist(M, D)−errλ dist(M, Spair m ) ≤O λB2p D ln(1/δ)/m . 2While we pair 2m samples into m independent pairs, it is common to consider all O(m2) possibly dependent pairs. By exploiting independence we provide a simpler analysis yielding O(m−1/2) sample complexity rates, which is similar to the dependent case. 3We only present the results for paired comparisons; the results are easily extended to triplet comparisons. 4All the supporting proofs are provided in Appendix A. 3 This implies a bound on our key quantity of interest, Eq. (2). To achieve estimation error rate ϵ, m = Ω((λB2/ϵ)2D ln(1/δ)) samples are sufficient, showing that one never needs more than a number proportional to D examples to achieve the desired level of accuracy with high probability. Since many applications involve high-dimensional data, we next study if such a strong dependency on D is necessary. It turns out that even for simple distance-based loss functions like φλ L,U (c.f. Eq. 1), there are data distributions for which one cannot ensure good estimation error with fewer than linear in D samples. Theorem 2 Let A be any algorithm that, given an i.i.d. sample Sm (of size m) from a fixed unknown bounded support distribution D, returns a weighting metric from M that minimizes the empirical error with respect to distance-based loss function φλ L,U. There exist λ ≥0, 0 ≤U < L (indep. of D), s.t. for all 0 < ϵ, δ < 1 64, there exists a bounded support distribution D, such that if m ≤D+1 512ϵ2 , PSm h errλ dist(A(Sm), D) −errλ dist(M ∗, D) > ϵ i > δ. While this strong dependence on D may seem discouraging, note that here we made no assumptions about the underlying structure of the data distribution. One may be able to achieve a more relaxed dependence on D in settings in which individual features contain varying amounts of useful information. This is explored in Section 4. Classifier-Based Error Analysis. In this setting, we consider an i.i.d. set of observations z1, z2, . . . from D to obtain the unpaired sample Sm = {zi}m i=1 of size m. To analyze the generalization-ability of weighting metrics optimized w.r.t. underlying real-valued hypothesis class H, we must measure the classification complexity of H. The scale-sensitive version of VC-dimension, the fat-shattering dimension, of a hypothesis class (denoted Fatγ(H)) encodes the right notion of classification complexity and provides a way to relate generalization error to the empirical error at a margin γ [9]. In the context of metric learning with respect to a fixed hypothesis class, define the empirical error at a margin γ as errγ hypoth(M, Sm) := infh∈H 1 m P (xi,yi)∈Sm 1[Margin(h(Mxi), yi) ≤γ], where Margin(ˆy, y) := (2y −1)(ˆy −1/2). Theorem 3 Let H be a λ-Lipschitz base hypothesis class. Pick any 0 < γ ≤1/2, and let m ≥ Fatγ/16(H) ≥1. Then with probability at least 1 −δ over an i.i.d. draw of m samples Sm from an unknown B-bounded-support distribution D (ϵ0 := min{γ/2, 1/2λB}) sup M∈M h errhypoth(M, D) −errγ hypoth(M, Sm) i ≤O s 1 m ln 1 δ + D2 m ln D ϵ0 + Fatγ/16(H) m ln m γ ! . As before, this implies a bound on Eq. (2). To achieve estimation error rate ϵ, m = Ω((D2 ln(λDB/γ) + Fatγ/16(H) ln(1/δγ))/ϵ2) samples suffices. Note that the task of finding an optimal metric only additively increases sample complexity over that of finding the optimal hypothesis from the underlying hypothesis class. In contrast to the distance-based framework (Theorem 1), here we get a quadratic dependence on D. The following shows that a strong dependence on D is necessary in the absence of assumptions on the data distribution and base hypothesis class. Theorem 4 Pick any 0 < γ < 1/8. Let H be a base hypothesis class of λ-Lipschitz functions that is closed under addition of constants (i.e., h ∈H =⇒h′ ∈H, where h′ : x 7→h(x) + c, for all c) s.t. each h ∈H maps into the interval [1/2 −4γ, 1/2 + 4γ] after applying an appropriate theshold. Then for any metric learning algorithm A, and for any B ≥1, there exists λ ≥0, for all 0 < ϵ, δ < 1/64, there exists a B-bounded-support distribution D s.t. if m ln2 m < O D2+d ϵ2 ln(1/γ2) PSm∼D[errhypoth(M ∗, D) > errγ hypoth(A(Sm), D) + ϵ] > δ, where d := Fat768γ(H) is the fat-shattering dimension of H at margin 768γ. 4 4 Sample Complexity for Data with Un- and Weakly Informative Features We introduce the concept of the metric learning complexity of a given dataset. Our key observation is that a metric that yields good generalization performance should emphasize relevant features while suppressing the contribution of spurious features. Thus, a good metric reflects the quality of individual feature measurements of data and their relative value for the learning task. We can leverage this and define the metric learning complexity of a given dataset as the intrinsic complexity d of the weighting metric that yields the best generalization performance for that dataset (if multiple metrics yield best performance, we select the one with minimum d). A natural way to characterize the intrinsic complexity of a weighting metric M is via the norm of the matrix M. Using metric learning complexity as our gauge for feature-set richness, we now refine our analysis in both canonical frameworks. We will first analyze sample complexity for norm-bounded metrics, then show how to automatically adapt to the intrinsic complexity of the unknown underlying data distribution. 4.1 Distance-Based Refinement We start with the following refinement of the distance-based metric learning sample complexity for a class of Frobenius norm-bounded weighting metrics. Lemma 5 Let M be any class of weighting metrics on the feature space X = RD, and define d := supM∈M ∥M TM∥2 F . Let φλ be any distance-based loss function that is λ-Lipschitz in the first argument. Then with probability at least 1 −δ over an i.i.d. draw of 2m samples from an unknown B-bounded-support distribution D paired as Spair m , we have sup M∈M errλ dist(M, D)−errλ dist(M, Spair m ) ≤O λB2p d ln(1/δ)/m . Observe that if our dataset has a low metric learning complexity d ≪D, then considering an appropriate class of norm-bounded weighting metrics M can help sharpen the sample complexity result, yielding a dataset-dependent bound. Of course, a priori we do not know which class of metrics is appropriate; We discuss how to automatically adapt to the right complexity class in Section 4.3. 4.2 Classifier-Based Refinement Effective data-dependent analysis of classifier-based metric learning requires accounting for potentially complex interactions between an arbitrary base hypothesis class and the distortion induced by a weighting metric to the unknown underlying data distribution. To make the analysis tractable while still keeping our base hypothesis class H general, we assume that H is a class of two-layer feed-forward networks.5 Recall that for any smooth target function f ∗, a two-layer feed-forward neural network (with appropriate number of hidden units and connection weights) can approximate f ∗arbitrarily well [10], so this class is flexible enough to include most reasonable target hypotheses. More formally, define the base hypothesis class of two-layer feed-forward neural network with K hidden units as H2-net σγ := {x 7→PK i=1 wi σγ(vi · x) | ∥w∥1 ≤1, ∥vi∥1 ≤1}, where σγ : R → [−1, 1] is a smooth, strictly monotonic, γ-Lipschitz activation function with σγ(0) = 0. Then, for generalization error w.r.t. any classifier-based λ-Lipschitz loss function φλ, errλ hypoth(M, D) := inf h∈H2-net σγ E(x,y)∼D φλ h(Mx), y , we have the following.6 5We only present the results for two-layer networks in Lemma 6; the results are easily extended to multilayer feed-forward networks. 6Since we know the functional form of the base hypothesis class H (i.e., a two layer feed-forward neural net), we can provide a more precise bound than leaving it as Fat(H). 5 Lemma 6 Let M be any class of weighting metrics on the feature space X = RD, and define d := supM∈M ∥M TM∥2 F . For any γ > 0, let H2-net σγ be a two layer feed-forward neural network base hypothesis class (as defined above) and φλ be a classifier-based loss function that λ-Lipschitz in its first argument. Then with probability at least 1 −δ over an i.i.d. draw of m samples Sm from an unknown B-bounded support distribution D, we have sup M∈M errλ hypoth(M, D)−errλ hypoth(M, Sm) ≤O Bλγ p d ln(D/δ)/m . 4.3 Automatically Adapting to Intrinsic Complexity While Lemmas 5 and 6 provide a sample complexity bound tuned to the metric learning complexity of a given dataset, these results are not directly useful since one cannot select the correct normbounded class M a priori, as the underlying distribution D is unknown. Fortunately, by considering an appropriate sequence of norm-bounded classes of weighting metrics, we can provide a uniform bound that automatically adapts to the intrinsic complexity of the unknown underlying data distribution D. Theorem 7 Define Md := {M | ∥M TM∥2 F ≤d}, and consider the nested sequence of weighting metric classes M1 ⊂M2 ⊂· · · . Let µd be any non-negative measure across the sequence Md such that P d µd = 1 (for d = 1, 2, · · · ). Then for any λ ≥0, with probability at least 1 −δ over an i.i.d. draw of sample Sm from an unknown B-bounded-support distribution D, for all d = 1, 2, · · · , and all M d ∈Md, errλ(M d, D) −errλ(M d, Sm) ≤O C · Bλ p d ln(1/δµd)/m , (3) where C := B for distance-based error, or C := γ √ ln D for classifier-based error (for H2-net σγ ). In particular, for a data distribution D that has metric learning complexity at most d ∈N, if there are m ≥Ω d(CBλ)2 ln(1/δµd)/ϵ2 samples, then with probability at least 1 −δ errλ(M reg m , D) −errλ(M ∗, D) ≤O(ϵ), for M reg m := argmin M∈M errλ(M, Sm) + ΛM dM , ΛM:=CBλ q ln(δµdM )−1/m , dM := ∥M TM∥2 F . The measure µd above encodes our prior belief on the complexity class Md from which a target metric is selected by a metric learning algorithm given the training sample Sm. In absence of any prior beliefs, µd can be set to 1/D (for d = 1, . . . , D) for scale constrained weighting metrics (σmax = 1). Thus, for an unknown underlying data distribution D with metric learning complexity d, with number of samples just proportional to d, we can find a good weighting metric. This result also highlights that the generalization error of any weighting metric returned by an algorithm is proportional to the (smallest) norm-bounded class to which it belongs (cf. Eq. 3). If two metrics M1 and M2 have similar empirical errors on a given sample, but have different intrinsic complexities, then the expected risk of the two metrics can be considerably different. We expect the metric with lower intrinsic complexity to yield better generalization error. This partly explains the observed empirical success of norm-regularized optimization for metric learning [7, 8]. Using this as a guiding principle, we can design an improved optimization criteria for metric learning that jointly minimizes the sample error and a Frobenius norm regularization penalty. In particular, min M∈M err(M, Sm) + Λ ∥M TM∥2 F (4) for any error criteria ‘err’ used in a downstream prediction task and a regularization parameter Λ. Similar optimizations have been studied before [7, 8], here we explore the practical efficacy of this augmented optimization on existing metric learning algorithms in high noise regimes where a dataset’s intrinsic dimension is much smaller than its representation dimension. 6 0 50 100 150 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Ambient noise dimension Avg. test error UCI Iris Dataset Random Id. Metric LMNN reg−LMNN ITML reg−ITML 0 50 100 150 200 250 300 350 400 450 500 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Ambient noise dimension Avg. test error UCI Wine Dataset Random Id. Metric LMNN reg−LMNN ITML reg−ITML 0 20 40 60 80 100 120 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Ambient noise dimension Avg. test error UCI Ionosphere Dataset Random Id. Metric LMNN reg−LMNN ITML reg−ITML Figure 1: Nearest-neighbor classification performance of LMNN and ITML metric learning algorithms without regularization (dashed red lines) and with regularization (solid blue lines) on benchmark UCI datasets. The horizontal dotted line is the classification error of random label assignment drawn according to the class proportions, and solid gray line shows classification error of k-NN performance with respect to identity metric (no metric learning) for baseline reference. 5 Empirical Evaluation Our analysis shows that the generalization error of metric learning can scale with the representation dimension, and regularization can help mitigate this by adapting to the intrinsic metric learning complexity of the given dataset. We want to explore to what degree these effects manifest in practice. We select two popular metric learning algorithms, LMNN [1] and ITML [2], that are used to find metrics that improve nearest-neighbor classification quality. These algorithms have varying degrees of regularization built into their optimization criteria: LMNN implicitly regularizes the metric via its “large margin” criterion, while ITML allows for explicit regularization by letting the practitioners specify a “prior” weighting metric. We modified the LMNN optimization criteria as per Eq. (4) to also allow for an explicit norm-regularization controlled by the trade-off parameter Λ. We can evaluate how the unregularized criteria (i.e., unmodified LMNN, or ITML with the prior set to the identity matrix) compares to the regularized criteria (i.e., modified LMNN with best Λ, or ITML with the prior set to a low-rank matrix). Datasets. We use the UCI benchmark datasets for our experiments: IRIS (4 dim., 150 samples), WINE (13 dim., 178 samples) and IONOSPHERE (34 dim., 351 samples) datasets [11]. Each dataset has a fixed (unknown, but low) intrinsic dimension; we can vary the representation dimension by augmenting each dataset with synthetic correlated noise of varying dimensions, simulating regimes where datasets contain large numbers of uninformative features. Each UCI dataset is augmented with synthetic D-dimensional correlated noise as detailed in Appendix B. Experimental setup. Each noise-augmented dataset was randomly split between 70% training, 10% validation, and 20% test samples. We used the default settings for each algorithm. For regularized LMNN, we picked the best performing trade-off parameter Λ from {0, 0.1, 0.2, ..., 1} on the validation set. For regularized ITML, we seeded with the rank-one discriminating metric, i.e., we set the prior as the matrix with all zeros, except the diagonal entry corresponding to the most discriminating coordinate set to one. All the reported results were averaged over 20 runs. Results. Figure 1 shows the nearest-neighbor performance (with k = 3) of LMNN and ITML on noise-augmented UCI datasets. Notice that the unregularized versions of both algorithms (dashed red lines) scale poorly when noisy features are introduced. As the number of uninformative features grows, the performance of both algorithms quickly degrades to that of classification performance in the original unweighted space with no metric learning (solid gray line), showing poor adaptability to the signal in the data. The regularized versions of both algorithms (solid blue lines) significantly improve the classification performance. Remarkably, regularized ITML shows almost no degradation in classification perfor7 mance, even in very high noise regimes, demonstrating a strong robustness to noise. These results underscore the value of regularization in metric learning, showing that regularization encourages adaptability to the intrinsic complexity and improved robustness to noise. 6 Discussion and Related Work Previous theoretical work on metric learning has focused almost exclusively on analyzing upperbounds on the sample complexity in the distance-based framework, without exploring any intrinsic properties of the input data. Our work improves these results and additionally analyzes the classifierbased framework. It is, to best of our knowledge, the first to provide lower bounds showing that the dependence on D is necessary. Importantly, it is also the first to provide an analysis of sample rates based on a notion of intrinsic complexity of a dataset, which is particularly important in metric learning, where we expect the representation dimension to be much higher than intrinsic complexity. [12] studied the norm-regularized convex losses for stable algorithms and showed an upper-bound sublinear in √ D, which can be relaxed by applying techniques from [13]. We analyze the ERM criterion directly (thus no assumptions are made about the optimization algorithm), and provide a precise characterization of when the problem complexity is independent of D (Lm. 5). Our lowerbound (Thm. 2) shows that the dependence on D is necessary for ERM in the assumption-free case. [14] and [15] analyzed the ERM criterion, and are most similar to our results providing an upperbound for the distance-based framework. [14] shows a O(m−1/2) rate for thresholds on bounded convex losses for distance-based metric learning without explicitly studying the dependence on D. Our upper-bound (Thm. 1) improves this result by considering arbitrary (possibly non-convex) distance-based Lipschitz losses and explicitly revealing the dependence on D. [15] provides an alternate ERM analysis of norm-regularized metrics and parallels our norm-bounded analysis in Lemma 5. While they focus on analyzing a specific optimization criterion (thresholds on the hinge loss with norm-regularization), our result holds for general Lipschitz losses. Our Theorem 7 extends it further by explicitly showing when we can expect good generalization performance from a given dataset. [16] provides an interesting analysis for robust algorithms by relying upon the existence of a partition of the input space where each cell has similar training and test losses. Their sample complexity bound scales with the partition size, which in general can be exponential in D. It is worth emphasizing that none of these closely related works discuss the importance of or leverage the intrinsic structure in data for the metric learning problem. Our results in Section 4 formalize an intuitive notion of dataset’s intrinsic complexity for metric learning, and show sample complexity rates that are finely tuned to this metric learning complexity. Our lower bounds indicate that exploiting the structure is necessary to get rates that don’t scale with representation dimension D. The classifier-based framework we discuss has parallels with the kernel learning and similarity learning literature. The typical focus in kernel learning is to analyze the generalization ability of linear separators in Hilbert spaces [17, 18]. Similarity learning on the other hand is concerned about finding a similarity function (that does not necessarily has a positive semidefinite structure) that can best assist in linear classification [19, 20]. Our work provides a complementary analysis for learning explicit linear transformations of the given representation space for arbitrary hypotheses classes. Our theoretical analysis partly justifies the empirical success of norm-based regularization as well. Our empirical results show that such regularization not only helps in designing new metric learning algorithms [7, 8], but can even benefit existing metric learning algorithms in high-noise regimes. Acknowledgments We would like to thank Aditya Menon for insightful discussions, and the anonymous reviewers for their detailed comments that helped improve the final version of this manuscript. 8 References [1] K.Q. Weinberger and L.K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research (JMLR), 10:207–244, 2009. [2] J.V. Davis, B. Kulis, P. Jain, S. Sra, and I.S. Dhillon. Information-theoretic metric learning. International Conference on Machine Learning (ICML), pages 209–216, 2007. [3] M. Schultz and T. Joachims. Learning a distance metric from relative comparisons. Neural Information Processing Systems (NIPS), 2004. [4] E.P. Xing, A.Y. Ng, M.I. Jordan, and S.J. Russell. Distance metric learning with application to clustering with side-information. Neural Information Processing Systems (NIPS), pages 505–512, 2002. [5] B. McFee and G.R.G. Lanckriet. Metric learning to rank. International Conference on Machine Learning (ICML), 2010. [6] B. Shaw, B. Huang, and T. Jebara. Learning a distance metric from a network. Neural Information Processing Systems (NIPS), 2011. [7] D.K.H. Lim, B. McFee, and G.R.G. Lanckriet. Robust structural metric learning. International Conference on Machine Learning (ICML), 2013. [8] M.T. Law, N. Thome, and M. Cord. Fantope regularization in metric learning. Computer Vision and Pattern Recognition (CVPR), 2014. [9] M. Anthony and P. Bartlett. Neural network learning: Theoretical foundations. Cambridge University Press, 1999. [10] K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 4:359–366, 1989. [11] K. Bache and M. Lichman. UCI machine learning repository, 2013. [12] R. Jin, S. Wang, and Y. Zhou. Regularized distance metric learning: Theory and algorithm. Neural Information Processing Systems (NIPS), pages 862–870, 2009. [13] O. Bousquet and A. Elisseeff. Stability and generalization. Journal of Machine Learning Research (JMLR), 2:499–526, 2002. [14] W. Bian and D. Tao. Learning a distance metric by empirical loss minimization. International Joint Conference on Artificial Intelligence (IJCAI), pages 1186–1191, 2011. [15] Q. Cao, Z. Guo, and Y. Ying. Generalization bounds for metric and similarity learning. CoRR, abs/1207.5437, 2013. [16] A. Bellet and A. Habrard. Robustness and generalization for metric learning. CoRR, abs/1209.1086, 2012. [17] Y. Ying and C. Campbell. Generalization bounds for learning the kernel. Conference on Computational Learning Theory (COLT), 2009. [18] C. Cortes, M. Mohri, and A. Rostamizadeh. New generalization bounds for learning kernels. International Conference on Machine Learning (ICML), 2010. [19] M-F. Balcan, A. Blum, and N. Srebro. Improved guarantees for learning via similarity functions. Conference on Computational Learning Theory (COLT), 2008. [20] A. Bellet, A. Habrard, and M. Sebban. Similarity learning for provably accurate sparse linear classification. International Conference on Machine Learning (ICML), 2012. [21] Z. Guo and Y. Ying. Generalization classification via regularized similarity learning. Neural Computation, 26(3):497–552, 2014. [22] A. Bellet, A. Habrard, and M. Sebban. A survey on metric learning for feature vectors and structured data. CoRR, abs/1306.6709, 2014. [23] P. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research (JMLR), 3:463–482, 2002. [24] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. In Compressed Sensing, Theory and Applications. 2010. 9 | 2015 | 199 |
5,701 | Associative Memory via a Sparse Recovery Model Arya Mazumdar Department of ECE University of Minnesota Twin Cities arya@umn.edu Ankit Singh Rawat⇤ Computer Science Department Carnegie Mellon University asrawat@andrew.cmu.edu Abstract An associative memory is a structure learned from a dataset M of vectors (signals) in a way such that, given a noisy version of one of the vectors as input, the nearest valid vector from M (nearest neighbor) is provided as output, preferably via a fast iterative algorithm. Traditionally, binary (or q-ary) Hopfield neural networks are used to model the above structure. In this paper, for the first time, we propose a model of associative memory based on sparse recovery of signals. Our basic premise is simple. For a dataset, we learn a set of linear constraints that every vector in the dataset must satisfy. Provided these linear constraints possess some special properties, it is possible to cast the task of finding nearest neighbor as a sparse recovery problem. Assuming generic random models for the dataset, we show that it is possible to store super-polynomial or exponential number of n-length vectors in a neural network of size O(n). Furthermore, given a noisy version of one of the stored vectors corrupted in near-linear number of coordinates, the vector can be correctly recalled using a neurally feasible algorithm. 1 Introduction Neural associative memories with exponential storage capacity and large (potentially linear) fraction of error-correction guarantee have been the topic of extensive research for the past three decades. A networked associative memory model must have the ability to learn and remember an arbitrary but specific set of n-length messages. At the same time, when presented with a noisy query, i.e., an n-length vector close to one of the messages, the system must be able to recall the correct message. While the first task is called the learning phase, the second one is referred to as the recall phase. Associative memories are traditionally modeled by what is called binary Hopfield networks [15], where a weighted graph of size n is considered with each vertex representing a binary state neuron. The edge-weights of the network are learned from the set of binary vectors to be stored by the Hebbian learning rule [13]. It has been shown in [22] that, to recover the correct vector in the presence of a linear (in n) number of errors, it is not possible to store more than O( n log n) arbitrary binary vectors in the above model of learning. In the pursuit of networks that can store exponential (in n) number of messages, some works [26, 12, 21] do show the existence of Hopfield networks that can store ⇠1.22n messages. However, for such Hopfield networks, only a small number of errors in the query render the recall phase unsuccessful. The Hopfield networks that store non-binary message vectors are studied in [17, 23], where the storage capacity of such networks against large fraction of errors is again shown to be linear in n. There have been multiple efforts to increase the storage capacity of the associative memories to exponential by moving away from the framework of the Hopfield networks (in term of both the learning and the recall phases)[14, 11, 19, 25, 18]. These efforts also involve relaxing the requirement of storing the collections of arbitrary messages. In [11], Gripon and Berrou stored O(n2) number of sparse message vectors in the form of neural cliques. Another setting where neurons have been assumed to have a large (albeit constant) number ⇤This work was done when the author was with the Dept. of ECE, University of Texas at Austin, TX, USA. 1 of states, and at the same time the message set (or the dataset) is assumed to form a linear subspace is considered in [19, 25, 18]. r1 r2 r3 rm Constraint nodes x1 x2 x3 xn Message nodes Figure 1: The complete bipartite graph corresponding to the associative memory. Here, we depict only a small fraction of edges. The edge weights of the bipartite graph are obtained from the linear constraints satisfied by the messages. Information can flow in both directions in the graph, i.e., from a message node to a constraint node and from a constraint node to a message node. In the steady state n message nodes store n coordinates of a valid message, and all the m constraints nodes are satisfied, i.e., the weighted sum of the values stored on the neighboring message nodes (according to the associated edge weights) is equal to zero. Note that an edge is relevant for the information flow iff the corresponding edge weight is nonzero. The most basic premise of the works on neural associative memory is to design a graph dynamic system such that the vectors to be stored are the steady states of the system. One way to attain this is to learn a set of constraints that every vector in the dataset must satisfy. The inclusion relation between the variables in the vectors and the constraints can be represented by a bipartite graph (cf. Fig. 1). For the recall phase, noise removal can be done by running belief propagation on this bipartite graph. It can be shown that the correct message is recovered successfully under conditions such as sparsity and expansion properties of the graph. This is the main idea that has been explored in [19, 25, 18]. In particular, under the assumption that the messages belong to a linear subspace, [19, 25] propose associative memories that can store exponential number of messages while tolerating at most constant number of errors. This approach is further refined in [18], where each message vector from the dataset is assumed to comprise overlapping sub-vectors which belong to different linear subspaces. The learning phase finds the (sparse) linear constraints for the subspaces associated with these sub-vectors. For the recall phase then belief propagation decoding ideas of error-correcting codes have been used. In [18], Karbasi et al. show that the associative memories obtained in this manner can store exponential (in n) messages. They further show that the recall phase can correct linear (in n) number of random errors provided that the bipartite graph associated with learnt linear constraints (during learning phase) has certain structural properties. Our work is very closely related to the above principle. Instead of finding a sparse set of constraints, we aim to find a set of linear constraints that satisfy 1) the coherence property, 2) the null-space property or 3) the restricted isometry property (RIP). Indeed, for a large class of random signal models, we show that, such constraints must exists and can be found in polynomial time. Any of the three above mentioned properties provide sufficient condition for recovery of sparse signals or vectors [8, 6]. Under the assumption that the noise in the query vector is sparse, denoising can be done very efficiently via iterative sparse recovery algorithms that are neurally feasible [9]. A neurally feasible algorithm for our model employs only local computations at the vertices of the corresponding bipartite graph based on the information obtained from their neighboring nodes. 1.1 Our techniques and results Our main provable results pertain to two different models of datasets, and are given below. Theorem 1 (Associative memory with sub-gaussian dataset model). It is possible to store a dataset of size ⇠exp(n3/4) of n-length vectors in a neural network of size O(n) such that a neurally feasible algorithm can output the correct vector from the dataset given a noisy version of the vector corrupted in ⇥(n1/4) coordinates. Theorem 2 (Associative memory with dataset spanned by random rows of fixed orthonormal basis). It is possible to store a dataset of size ⇠exp(r) of n-length vectors in a neural network of size O(n) such that a neurally feasible algorithm can output the correct vector from the dataset given a noisy version of the vector corrupted in ⇥( n−r log6 n) coordinates. Theorem 1 follows from Prop. 1 and Theorem 3, while Theorem 2 follows from Prop. 2 and 3; and by also noting the fact that all r-vectors over any finite alphabet can be linearly mapped to exp(r) number of points in a space of dimensionality r. The neural feasibility of the recovery follows from the discussion of Sec. 5. In contrast with [18], our sparse recovery based approach provides 2 associative memories that are robust against stronger error model which comprises adversarial error patterns as opposed to random error patterns. Even though we demonstrate the associative memories which have sub-exponential storage capacity and can tolerate sub-linear (but polynomial) number of errors, neurally feasible recall phase is guaranteed to recover the message vector from adversarial errors. On the other hand, the recovery guarantees in [18, Theorem 3 and 5] hold if the bipartite graph obtained during learning phase possesses certain structures (e.g. degree sequence). However, it is not apparent in their work if the learnt bipartite graph indeed has these structural properties. Similar to the aforementioned papers, our operations are performed over real numbers. We show the dimensionality of the dataset to be large enough, as referenced in Theorem 1 and 2. As in previous works such as [18], we can therefore find a large number of points, exponential in the dimensionality, with finite (integer) alphabet that can be treated as the message vectors or dataset. Our main contribution is to bring in the model of sparse recovery in the domain of associative memory - a very natural connection. The main techniques that we employ are as follows: 1) In Sec. 3, we present two models of ensembles for the dataset. The dataset belongs to subspaces that have associated orthogonal subspace with ‘good’ basis. These good basis for the orthogonal subspaces satisfy one or more of the conditions introduced in Sec. 2, a section that provides some background material on sparse recovery and various sufficient conditions relevant to the problem. 2) In Sec. 4, we briefly describe a way to obtain a ‘good’ null basis for the dataset. The found bases serve as measurement matrices that allow for sparse recovery. 3) Sec. 5 focus on the recall phases of the proposed associative memories. The algorithms are for sparse recovery, but stated in a way that are implementable in a neural network. In Sec. 6, we present some experimental results showcasing the performance of the proposed associative memories. In Appendix C, we describe another approach to construct associative memory based on the dictionary learning problem [24]. 2 Definition and mathematical preliminaries Notation: We use lowercase boldface letters to denote vectors. Uppercase boldface letters represent matrices. For a matrix B, BT denotes the transpose of B. A vector is called k-sparse if it has only k nonzero entries. For a vector x 2 Rn and any set of coordinates I ✓[n] ⌘{1, 2, . . . , n}, xI denotes the projection of x on to the coordinates of I. For any set of coordinates I ✓[n], Ic ⌘[n] \ I. Similarly, for a matrix B, BI denotes the sub-matrix obtained by the rows of B that are indexed by the set I. We use span(B) to denote the subspace spanned by the columns of B. Given an m ⇥n matrix B, denote the columns of the matrix as bj, j = 1, . . . , n and assume, for all the matrices in this section, that the columns are all unit norm, i.e., kbjk2 = 1. Definition 1 (Coherence). The mutual coherence of the matrix B is defined to be µ(B) = max i6=j |hbi, bji|. (1) Definition 2 (Null-space property). The matrix B is supposed to satisfy the null-space property with parameters (k, ↵< 1) if khIk1 ↵khIck1, for every vector h 2 Rn with Bh = 0 and any set I ✓[n], |I| = k. Definition 3 (RIP). A matrix B is said to satisfy the restricted isometry property with parameters k and δ, or the the (k, δ)-RIP, if for all k-sparse vectors x 2 Rn, (1 −δ)kxk2 2 kBxk2 2 (1 + δ)kxk2 2. (2) Next we list some results pertaining to sparse signal recovery guarantee based on these aforementioned parameters. The sparse recovery problem seeks the solution ˆx, that has the smallest number of nonzero entries, of the underdetermined system of equation Bx = r, where, B 2 Rm⇥n and x 2 Rn. The basis pursuit algorithm for sparse recovery provides the following estimate. ˆx = arg min Bx=r kxk1. (3) Let xk denote the projection of x on its largest k coordinates. Proposition 1. If B has null-space property with parameters (k, ↵< 1), then, we have, kˆx −xk1 2(1 + ↵) 1 −↵kx −xkk1. (4) 3 The proof of this is quite standard and delegated to the Appendix A. Proposition 2 ([5] ). The (2k, p 2 −1)-RIP of the sampling matrix implies, for a constant c, kˆx −xk2 c p k kx −xkk1. (5) Furthermore, it can be easily seen that any matrix is (k, (k −1)µ)-RIP, where µ is the mutual coherence of the sampling matrix. 3 Properties of the datasets In this section, we show that, under reasonable random models that represent quite general assumptions on the datasets, it is possible to learn linear constraints on the messages, that satisfy one of the sufficient properties of sparse recovery: incoherence, null-space property or RIP. We mainly consider two models for the dataset: 1) sub-gaussian model 2) span of a random set from an orthonormal basis. 3.1 Sub-Gaussian model for the dataset and the null-space property In this section we consider the message sets that are spanned by a basis matrix which has its entries distributed according to a sub-gaussain distribution. The sub-gaussian distributions are prevalent in machine learning literature and provide a broad class of random models to analyze and validate various learning algorithms. We refer the readers to [27, 10] for the background on these distribution. Let A 2 Rn⇥r be an n ⇥r random matrix that has independent zero mean sub-gaussian random variables as its entries. We assume that the subspace spanned by the columns of the matrix A represents our dataset M. The main result of this section is the following. Theorem 3. The dataset above satisfies a set of linear constraints, that has the null-space property. That is, for any h 2 M ⌘span(A), the following holds with high probability: khIk1 ↵khIck1 for all I ✓[n] such that |I| k, (6) for k = O(n1/4), r = O(n/k) and a constant ↵< 1. The rest of this section is dedicated to the proof of this theorem. But, before we present the proof, we state a result from [27] which we utilize to prove Theorem 3. Proposition 3. [27, Theorem 5.39] Let A be an s ⇥r matrix whose rows ai are independent sub-gaussian isotropic random vectors in Rn. Then for every t ≥0, with probability at least 1 −2 exp(−ct2) one has ps −Cpr −t smin(A) = min x2Rr:kxk2=1 kAxk2 smax(A) = max x2Rr:kxk2=1 kAxk2 ps + Cpr + t. (7) Here C and c depends on the sub-gaussian norms of the rows of the matrix A. Proof of Theorem 3: Consider an n ⇥r matrix A which has independent sub-gaussian isotropic random vectors as its rows. Now for a given set I ✓[n], we can focus on two disjoint sub-matrices of A: 1) A1 = AI and 2) A2 = AIc. Using Proposition 3 with s = |I|, we know that, with probability at least 1 −2 exp(−ct2), we have smax(A1) = max x2Rr:kxk2=1 kA1xk2 p |I| + Cpr + t. (8) Since we know that kA1xk1 p |I|kA1xk2, using (8) the following holds with probability at least 1 −2 exp(−ct2). k(Ax)Ik1 = kA1xk1 p |I|kA1xk2 |I| + C p |I|r + t p |I| 8 x 2 Rr : kxk2 = 1. (9) 4 We now consider A2. It follows from Proposition 3 with s = |Ic| = n −|I| that with probability at least 1 −2 exp(−ct2), smin(A2) = min x2Rr:kxk2=1 kA2xk2 ≥ p n −|I| −Cpr −t. (10) Combining (10) with the observation that kA2xk1 ≥kA2xk2, the following holds with probability at least 1 −2 exp(−ct2). k(Ax)Ick1 = kA2xk1 ≥kA2xk2 ≥ p n −|I| −Cpr −t for all x 2 Rr : kxk2 = 1. (11) Note that we are interested in showing that for all h 2 M, we have khIk1 ↵khIck1 for all I ✓[n] such that |I| k. (12) This is equivalent to showing that the following holds for all x 2 Rr : kxk2 = 1. k(Ax)Ik1 ↵k(Ax)Ick1 for all I ✓[n] such that |I| k. (13) For a given I ✓[n], we utilize (9) and (11) to guarantee that (13) holds with probability at least 1 −2 exp(−ct2) as long as |I| + C p |I|r + t p |I| ↵ "p n −|I| −Cpr −t # (14) Now, given that k = |I| satisfies (14), (13) holds for all I ⇢[n] : |I| = k with probability at least 1 −2 ✓n k ◆ exp(−ct2) ≥1 − "en k #k exp(−ct2). (15) Let’s consider the following set of parameters: k = O(n1/4), r = O(n/k) = O(n3/4) and t = ⇥( p k log(n/k)). This set of parameters ensures that (14) holds with overwhelming probability (cf. (15)). Remark 1. In Theorem 3, we specify one particular set of parameters for which the null-space property holds. Using (14) and (15), it can be shown that the null-space property in general holds for the following set of parameters: k = O(pn/ log n), r = O(n/k) and t = ⇥( p k log(n/k)). Therefore, it possible to trade-off the number of correctable errors during the recall phase (denoted by k) with the dimension of the dataset (represented by r). 3.2 Span of a random set of columns of an orthonormal basis Next, in this section, we consider the ensemble of signals spanned by a random subset of rows from a fixed orthonormal basis B. Assume B to be an n ⇥n matrix with orthonormal rows. Let Γ ⇢[n] be a random index set such that E(|Γ|) = r. The vectors in the dataset have form h = BT Γu for some u 2 R|Γ|. In other words, the dataset M ⌘span(BT Γ). In this case, BΓc constitutes a basis matrix for the null space of the dataset. Since we have selected the set Γ randomly, set ⌦⌘Γc is also a random set with E(⌦) = n −E(Γ) = n −r. Proposition 4 ([7]). Assume that B be an n ⇥n orthonormal basis for Rn with the property that maxi,j |Bi,j| ⌫. Consider a random |⌦|⇥n matrix C obtained by selecting a random set of rows of B indexed by the set ⌦2 [n] such that E(⌦) = m. Then the matrix C obeys (k, δ)-RIP with probability at least 1 −O(n−⇢/↵) for some fixed constant ⇢> 0, where k = ↵m ⌫2 log6 n. Therefore, we can invoke Proposition 4 to conclude that the matrix BΓc obeys (k, δ)-RIP with k = ↵(n−r) ⌫2 log6 n with ⌫being the largest absolute value among the entries of BΓc. 4 Learning the constraints: null space with small coherence In the previous section, we described some random ensemble of datasets that can be stored on an associative memory based on sparse recovery. This approach involves finding a basis for the 5 orthogonal subspace to the message or the signal subspace (dataset). Indeed, our learning algorithm simply finds a null space of the dataset M. While obtaining the basis vectors of null(M), we require them to satisfy null-space property, RIP or small mutual coherence so that the a signal can be recovered from its noisy version via the basis pursuit algorithm, that can be neurally implemented (see Sec. 5.2). However, for a given set of message vectors, it is computationally intractable to check if the obtained (learnt) orthogonal basis has null-space property or RIP with suitable parameters associated with these properties. Mutual coherence of the orthogonal basis, on the other hand, can indeed be verified in a tractable manner. Further, the more straight-forward iterative soft thresholding algorithm will be successful if null(M) has low coherence. This will also lead to fast convergence of the recovery algorithm (see, Sec. 5.1). Towards this, we describe one approach that ensures the selection of a orthogonal basis that has smallest possible mutual coherence. Subsequently, using the mutual coherence based recovery guarantees for sparse recovery, this basis enables an efficient recovery phase for the associative memory. One underlying assumption on the dataset that we make is its less than full dimensionality. That is, the dataset must belong to a low dimensional subspace, so that its null-space is not trivial. In practical cases, M is approximately low-dimensional. We use a preprocessing step, employing principal component analysis (PCA) to make sure that the dataset is low-dimensional. We do not indulge in to a more detailed description of this phase, as it seems to be quite standard (see, [18]). Algorithm 1 Find null-space with low coherence Input: The dataset M with n dimensional vectors. An initial coherence µ0 and a step-size λ Output: A m ⇥n orthogonal matrix B and coherence µ Preprocessing. Perform PCA on M Find the n ⇥r basis matrix A of M for l = 0, 1, 2, . . . do Find a feasible point of the quadratically constrained quadratic problem (QCQP) below (interior point method): BA = 0; kbik = 1, 8i 2 [n]; |hbi, bji| µl where B is (n −r) ⇥n if No feasible point found then break else µ µl µl+1 = µl −λ end if end for 5 Recall via neurally feasible algorithms We now focus on the second aspect of an associative memory, namely the recovery phase. For the signal model that we consider in this paper, the recovery phase is equivalent to solving a sparse signal recovery problem. Given a noisy vector y = x + e from the dataset, we can use the basis of the null-space B associated to our dataset that we constructed during the learning phase to obtain r = By = Be. Now given that e is sufficiently sparse enough and the matrix B obeys the properties of Sec. 2, we can solve for e using a sparse recovery algorithm. Subsequently, we can remove the error vector e from the noisy signal y to construct the underlying message vector x. There is a plethora of algorithms available in the literature to solve this problem. However, we note that for the purpose of an associative memory, the recovery phase should be neurally feasible and computationally simple. In other words, each node (or storage unit) should be able to recover the coordinated associated to it locally by applying simple computation on the information received from its neighboring nodes (potentially in an iterative manner). 5.1 Recovery via Iterative soft thresholding (IST) algorithm Among the various, sparse recovery algorithms in the literature, iterative soft thresholding (IST) algorithm is a natural candidate for implementing the recovery phase of the associative memories with underlying setting. The IST algorithm tries to solve the following unconstrained `1-regularized 6 least square problem which is closely related to the basis pursuit problem described in (3) and (18). ˆe = arg min e ⌫|ek1 + 1 2kBe −rk2. (16) For the IST algorithm, its t + 1-th iteration is described as follows. (IST) et+1 = ⌘S(et −⌧BT (Bet −r); λ = ⌧⌫). (17) Here, ⌧is a constant and ⌘S(x; λ) = (sgn(x1)(x1−λ)+, sgn(x2)(x2−λ)+, . . . , sgn(xn)(xn−λ)+) denotes the soft thresholding (or shrinkage) operator. Note that the IST algorithm as described in (17) is neurally feasible as it involves only 1) performing matrix vector multiplications and 2) soft thresholding a coordinate in a vector independent of the values of other coordinates in the vector. In Appendix B, we describe in details how the IST algorithm can be performed over a bipartite neural network with B as its edge weight matrix. Under suitable assumption on the coherence of the measurement matrix B, the IST algorithm is also known to converge to the correct k-sparse vector e [20]. In particular, Maleki [20] allows the thresholding parameter λ to be varied in every iteration such that all but at most the largest k coordinates (in terms of their absolute values) are mapped to zero by the soft thresholding operation. In this setting, Maleki shows that the solution of the IST algorithm recovers the correct support of the optimal solution in finite steps and subsequently converges to the true solution very fast. However, we are interested in analysis of the IST algorithm in a setting where thresholding parameter is kept a suitable constant depending on other system parameters so that the algorithm remains neurally feasible. Towards this, we note that there exists general analysis of the IST algorithm even without the coherence assumption. Proposition 5. [4, Theorem 3.1] Let {et}t≥1 be as defined in (17) with 1 ⌧≥λmax(BT B)1. Then, for any t ≥1, h(et) −h(e) λke0−ek2 2t . Here, h(e) = 1 2kr −Bek2 + ⌫kek1 is the objective function defined in (16). 5.2 Recovery via Bregman iterative algorithm Recall that the basis pursuit algorithm refers to the following optimization problem. ˆe = arg min e {kek1 : r = Be}. (18) Even though the IST algorithm as described in the previous subsection solves the problem in (16), the parameter value ⌫needs to be set small enough so that the recovered solution ˆe nearly satisfies the constraint Be = r in (18). However, if we insist on recovering the solution e which exactly meets the constraint, one can employ the Bregman iterative algorithm from [29]. The Bregman iterative algorithm relies on the Bregman distance Dp k·k1(·, ·) based on k · k1 which is defined as follows. Dp k·k1(e1, e2) = ke1k1 −ke2k1 −hp, e1 −e2i, where p 2 @ke2k1 is a sub-gradient of the `1-norm at the point e2. The (t + 1)-th iteration of the Bregman iterative algorithm is then defined as follows. et+1 = arg min e Dpt k·k1(e, et) + 1 2kBe −rk2, = arg min e kek1 −(pt)T e + 1 2kBe −rk2 −ketk1 + (pt)T et, (19) pt+1 = pt −BT (Bet+1 −r). (20) Note that, for the (t + 1)-th iteration, the objective function in (19) is essentially equivalent to the objective function in (16). Therefore, each iteration of the Bergman iterative algorithm can be solved using the IST algorithm. It is shown in [29] that after a finite number of iteration of the Bregman iterative algorithm, one recovers the solution of the problem in (18) (Theorem 3.2 and 3.3 in [29]). Remark 2. We know that the IST algorithm is neurally feasible. Furthermore, the step described in (20) is neurally feasible as it only involve matrix-vector multiplications in the spirit of Eq. (17). Since each iteration of the Bregman iterative algorithm only relies on these two operations, it follows that the Bregman iterative algorithm is neurally feasible as well. It should be noted that the neural feasibility of the Bregman iterative algorithm was discussed in [16] as well, however the neural structures employed by [16] is different from ours. 1Note that λmax(BT B), the maximum eigenvalue of the matrix BT B serves as a Lipschitz constant for the gradient δf(e) of the function f(e) = 1 2kr −Bek2 7 100 150 200 250 300 350 400 450 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability of failure Sparsity m = 500 (PD) m = 500 (BI) m = 700 (PD) m = 700 (BI) Student Version of MATLAB (a) Gaussian matrix and Gaussian noise 100 150 200 250 300 350 400 450 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability of failure Sparsity m = 500 (PD) m = 500 (BI) m = 700 (PD) m = 700 (BI) Student Version of MATLAB (b) Gaussian matrix and Discrete noise 100 150 200 250 300 350 400 450 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability of failure Sparsity m = 500 (PD) m = 500 (BI) m = 700 (PD) m = 700 (BI) Student Version of MATLAB (c) Bernoulli matrix and Gaussian noise 100 150 200 250 300 350 400 450 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability of failure Sparsity m = 500 (PD) m = 500 (BI) m = 700 (PD) m = 700 (BI) Student Version of MATLAB (d) Bernoulli matrix and Discrete noise Figure 2: Performance of the proposed associative memory approach during recall phase. The PD algorithm refers to the primal dual algorithm to solve linear program associated with the problem in (18). The BI algorithm refers to the Bregman iterative algorithm described in Sec. 5.2. 6 Experimental results In this section, we demonstrate the feasibility of the associative memory framework using computer generated data. Along the line of the discussion in Sec. 3.1, we first sample an n ⇥r sub-gaussian matrix A with i.i.d entries. We consider two sub-gaussian distributions: 1) Gaussian distribution and 2) Bernoulli distribution over {+1, −1}. The message vectors to be stored are then assumed to be spanned by the k columns of the sampled matrix. For the learning phase, we find a good basis for the subspace orthogonal to the space spanned by the columns of the matrix A. For noise during the recall phase, we consider two noise models: 1) Gaussian noise and 2) discrete noise where each nonzero elements take value in the set {−M, −(M −1), . . . , M}\{0}. Figure 2 presents our simulation results for n = 1000. For recall phase, we employ the Bregman iterative (BI) algorithm with the IST algorithm as a subroutine. We also plot the performance of the primal dual (PD) algorithm based linear programming solution for the recovery problem of interest (cf. (18)). This allows us to gauge the disadvantage due to the restriction of working with a neurally feasible recovery algorithm, e.g., the BI algorithm in our case. Furthermore, we consider message sets with two different dimensions which amounts to m = 500 and m = 700. Note that the dimension of the message set is n −m. We run 50 iterations of the recovery algorithms for a given set of parameters to obtain the estimates of the probability of failure (of exact recovery of error vector). In Fig. 2a, we focus on the setting with Gaussian basis matrix (for message set) and unit variance zero mean Gaussian noise during the recall phase. It is evident that the proposed associative memory do allow for the exact recovery of error vectors up to certain sparsity level. This corroborate our findings in Sec. 3. We also note that the performance of the BI algorithm is very close to the PD algorithm. Fig. 2b shows the performance of the recall phase for the setting with Gaussian basis for message set and discrete noise model with M = 4. In this case, even though the BI algorithm is able to exactly recover the noise vector up to a particular sparsity level, it’s performance is worse than that of PD algorithm. The performance of the recall phase with Bernoulli bases matrices for message set is shown in Fig. 2c and 2d. The results are similar to those in the case of Gaussian bases matrices for the message sets. 8 References [1] A. Agarwal, A. Anandkumar, P. Jain, P. Netrapalli, and R. Tandon. Learning sparsely used overcomplete dictionaries via alternating minimization. CoRR, abs/1310.7991, 2013. [2] S. Arora, R. Ge, T. Ma, and A. Moitra. Simple, efficient, and neural algorithms for sparse coding. CoRR, abs/1503.00778, 2015. [3] S. Arora, R. Ge, and A. Moitra. New algorithms for learning incoherent and overcomplete dictionaries. arXiv preprint arXiv:1308.6273, 2013. [4] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [5] E. J. Candes. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9):589–592, 2008. [6] E. J. Cand`es, J. Romberg, and T. Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. on Inf. Theory, 52(2):489–509, 2006. [7] E. J. Candes and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Trans. on Inf. Theory, 52(12):5406–5425, Dec 2006. [8] D. L. Donoho. Compressed sensing. IEEE Trans. on Inf. Theory, 52(4):1289–1306, 2006. [9] D. L. Donoho, A. Maleki, and A. Montanari. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, 106(45):18914–18919, 2009. [10] S. Foucart and H. Rauhut. A Mathematical Introduction to Compressive Sensing. Birkhauser Basel, 2013. [11] V. Gripon and C. Berrou. Sparse neural networks with large learning diversity. IEEE Transactions on Neural Networks, 22(7):1087–1096, 2011. [12] D. J. Gross and M. Mezard. The simplest spin glass. Nuclear Physics B, 240(4):431 – 452, 1984. [13] D. O. Hebb. The organization of behavior: A neuropsychological theory. Psychology Press, 2005. [14] C. Hillar and N. M. Tran. Robust exponential memory in hopfield networks. arXiv preprint arXiv:1411.4625, 2014. [15] J. J. Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the national academy of sciences, 79(8):2554–2558, 1982. [16] T. Hu, A. Genkin, and D. B. Chklovskii. A network of spiking neurons for computing sparse representations in an energy-efficient way. Neural computation, 24(11):2852–2872, 2012. [17] S. Jankowski, A. Lozowski, and J. M. Zurada. Complex-valued multistate neural associative memory. IEEE Transactions on Neural Networks, 7(6):1491–1496, Nov 1996. [18] A. Karbasi, A. H. Salavati, and A. Shokrollahi. Convolutional neural associative memories: Massive capacity with noise tolerance. CoRR, abs/1407.6513, 2014. [19] K. R. Kumar, A. H. Salavati, and A. Shokrollahi. Exponential pattern retrieval capacity with non-binary associative memory. In 2011 IEEE Information Theory Workshop (ITW), pages 80–84, Oct 2011. [20] A. Maleki. Coherence analysis of iterative thresholding algorithms. In 47th Annual Allerton Conference on Communication, Control, and Computing, 2009. Allerton 2009, pages 236–243, Sept 2009. [21] R. J. McEliece and E. C. Posner. The number of stable points of an infinite-range spin glass memory. Telecommunications and Data Acquisition Progress Report, 83:209–215, 1985. [22] R. J. McEliece, E. C. Posner, E. R. Rodemich, and S. S. Venkatesh. The capacity of the hopfield associative memory. Information Theory, IEEE Transactions on, 33(4):461–482, 1987. [23] M. K. Muezzinoglu, C. Guzelis, and J. M. Zurada. A new design method for the complex-valued multistate hopfield associative memory. IEEE Transactions on Neural Networks, 14(4):891–899, July 2003. [24] B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision Research, 37(23):3311 – 3325, 1997. [25] A. H. Salavati and A. Karbasi. Multi-level error-resilient neural networks. In 2012 IEEE International Symposium on Information Theory Proceedings (ISIT), pages 1064–1068, July 2012. [26] F. Tanaka and S. F. Edwards. Analytic theory of the ground state properties of a spin glass. i. ising spin glass. Journal of Physics F: Metal Physics, 10(12):2769, 1980. [27] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [28] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity recovery using `1 constrained quadratic programming (lasso). IEEE Trans. Inform. Theory, 55(5):2183–2202, May 2009. [29] W. Yin, S. Osher, D. Goldfarb, and J. Darbon. Bregman iterative algorithms for `1-minimization with applications to compressed sensing. SIAM Journal on Imaging Sciences, 1(1):143–168, 2008. 9 | 2015 | 2 |
5,702 | Online Gradient Boosting Alina Beygelzimer Yahoo Labs New York, NY 10036 beygel@yahoo-inc.com Elad Hazan Princeton University Princeton, NJ 08540 ehazan@cs.princeton.edu Satyen Kale Yahoo Labs New York, NY 10036 satyen@yahoo-inc.com Haipeng Luo Princeton University Princeton, NJ 08540 haipengl@cs.princeton.edu Abstract We extend the theory of boosting for regression problems to the online learning setting. Generalizing from the batch setting for boosting, the notion of a weak learning algorithm is modeled as an online learning algorithm with linear loss functions that competes with a base class of regression functions, while a strong learning algorithm is an online learning algorithm with smooth convex loss functions that competes with a larger class of regression functions. Our main result is an online gradient boosting algorithm that converts a weak online learning algorithm into a strong one where the larger class of functions is the linear span of the base class. We also give a simpler boosting algorithm that converts a weak online learning algorithm into a strong one where the larger class of functions is the convex hull of the base class, and prove its optimality. 1 Introduction Boosting algorithms [21] are ensemble methods that convert a learning algorithm for a base class of models with weak predictive power, such as decision trees, into a learning algorithm for a class of models with stronger predictive power, such as a weighted majority vote over base models in the case of classification, or a linear combination of base models in the case of regression. Boosting methods such as AdaBoost [9] and Gradient Boosting [10] have found tremendous practical application, especially using decision trees as the base class of models. These algorithms were developed in the batch setting, where training is done over a fixed batch of sample data. However, with the recent explosion of huge data sets which do not fit in main memory, training in the batch setting is infeasible, and online learning techniques which train a model in one pass over the data have proven extremely useful. A natural goal therefore is to extend boosting algorithms to the online learning setting. Indeed, there has already been some work on online boosting for classification problems [20, 11, 17, 12, 4, 5, 2]. Of these, the work by Chen et al. [4] provided the first theoretical study of online boosting for classification, which was later generalized by Beygelzimer et al. [2] to obtain optimal and adaptive online boosting algorithms. However, extending boosting algorithms for regression to the online setting has been elusive and escaped theoretical guarantees thus far. In this paper, we rigorously formalize the setting of online boosting for regression and then extend the very commonly used gradient 1 boosting methods [10, 19] to the online setting, providing theoretical guarantees on their performance. The main result of this paper is an online boosting algorithm that competes with any linear combination the base functions, given an online linear learning algorithm over the base class. This algorithm is the online analogue of the batch boosting algorithm of Zhang and Yu [24], and in fact our algorithmic technique, when specialized to the batch boosting setting, provides exponentially better convergence guarantees. We also give an online boosting algorithm that competes with the best convex combination of base functions. This is a simpler algorithm which is analyzed along the lines of the FrankWolfe algorithm [8]. While the algorithm has weaker theoretical guarantees, it can still be useful in practice. We also prove that this algorithm obtains the optimal regret bound (up to constant factors) for this setting. Finally, we conduct some proof-of-concept experiments which show that our online boosting algorithms do obtain performance improvements over di↵erent classes of base learners. 1.1 Related Work While the theory of boosting for classification in the batch setting is well-developed (see [21]), the theory of boosting for regression is comparatively sparse.The foundational theory of boosting for regression can be found in the statistics literature [14, 13], where boosting is understood as a greedy stagewise algorithm for fitting of additive models. The goal is to achieve the performance of linear combinations of base models, and to prove convergence to the performance of the best such linear combination. While the earliest works on boosting for regression such as [10] do not have such convergence proofs, later works such as [19, 6] do have convergence proofs but without a bound on the speed of convergence. Bounds on the speed of convergence have been obtained by Du↵y and Helmbold [7] relying on a somewhat strong assumption on the performance of the base learning algorithm. A di↵erent approach to boosting for regression was taken by Freund and Schapire [9], who give an algorithm that reduces the regression problem to classification and then applies AdaBoost; the corresponding proof of convergence relies on an assumption on the induced classification problem which may be hard to satisfy in practice. The strongest result is that of Zhang and Yu [24], who prove convergence to the performance of the best linear combination of base functions, along with a bound on the rate of convergence, making essentially no assumptions on the performance of the base learning algorithm. Telgarsky [22] proves similar results for logistic (or similar) loss using a slightly simpler boosting algorithm. The results in this paper are a generalization of the results of Zhang and Yu [24] to the online setting. However, we emphasize that this generalization is nontrivial and requires di↵erent algorithmic ideas and proof techniques. Indeed, we were not able to directly generalize the analysis in [24] by simply adapting the techniques used in recent online boosting work [4, 2], but we made use of the classical Frank-Wolfe algorithm [8]. On the other hand, while an important part of the convergence analysis for the batch setting is to show statistical consistency of the algorithms [24, 1, 22], in the online setting we only need to study the empirical convergence (that is, the regret), which makes our analysis much more concise. 2 Setup Examples are chosen from a feature space X, and the prediction space is Rd. Let k·k denote some norm in Rd. In the setting for online regression, in each round t for t = 1, 2, . . . , T, an adversary selects an example xt 2 X and a loss function `t : Rd ! R, and presents xt to the online learner. The online learner outputs a prediction yt 2 Rd, obtains the loss function `t, and incurs loss `t(yt). Let F denote a reference class of regression functions f : X ! Rd, and let C denote a class of loss functions ` : Rd ! R. Also, let R : N ! R+ be a non-decreasing function. We say that the function class F is online learnable for losses in C with regret R if there is an online learning algorithm A, that for every T 2 N and every sequence (xt, `t) 2 X ⇥C for 2 t = 1, 2, . . . , T chosen by the adversary, generates predictions1 A(xt) 2 Rd such that T X t=1 `t(A(xt)) inf f2F T X t=1 `t(f(xt)) + R(T). (1) If the online learning algorithm is randomized, we require the above bound to hold with high probability. The above definition is simply the online generalization of standard empirical risk minimization (ERM) in the batch setting. A concrete example is 1-dimensional regression, i.e. the prediction space is R. For a labeled data point (x, y?) 2 X ⇥R, the loss for the prediction y 2 R is given by `(y?, y) where `(·, ·) is a fixed loss function that is convex in the second argument (such as squared loss, logistic loss, etc). Given a batch of T labeled data points {(xt, y? t ) | t = 1, 2, . . . , T} and a base class of regression functions F (say, the set of bounded norm linear regressors), an ERM algorithm finds the function f 2 F that minimizes PT t=1 `(y? t , f(xt)). In the online setting, the adversary reveals the data (xt, y? t ) in an online fashion, only presenting the true label y? t after the online learner A has chosen a prediction yt. Thus, setting `t(yt) = `(y? t , yt), we observe that if A satisfies the regret bound (1), then it makes predictions with total loss almost as small as that of the empirical risk minimizer, up to the regret term. If F is the set of all bounded-norm linear regressors, for example, the algorithm A could be online gradient descent [25] or online Newton Step [16]. At a high level, in the batch setting, “boosting” is understood as a procedure that, given a batch of data and access to an ERM algorithm for a function class F (this is called a “weak” learner), obtains an approximate ERM algorithm for a richer function class F0 (this is called a “strong” learner). Generally, F0 is the set of finite linear combinations of functions in F. The efficiency of boosting is measured by how many times, N, the base ERM algorithm needs to be called (i.e., the number of boosting steps) to obtain an ERM algorithm for the richer function within the desired approximation tolerance. Convergence rates [24] give bounds on how quickly the approximation error goes to 0 and N ! 1. We now extend this notion of boosting to the online setting in the natural manner. To capture the full generality of the techniques, we also specify a class of loss functions that the online learning algorithm can work with. Informally, an online boosting algorithm is a reduction that, given access to an online learning algorithm A for a function class F and loss function class C with regret R, and a bound N on the total number of calls made in each iteration to copies of A, obtains an online learning algorithm A0 for a richer function class F0, a richer loss function class C0, and (possibly larger) regret R0. The bound N on the total number of calls made to all the copies of A corresponds to the number of boosting stages in the batch setting, and in the online setting it may be viewed as a resource constraint on the algorithm. The efficacy of the reduction is measured by R0 which is a function of R, N, and certain parameters of the comparator class F0 and loss function class C0. We desire online boosting algorithms such that 1 T R0(T) ! 0 quickly as N ! 1 and T ! 1. We make the notions of richness in the above informal description more precise now. Comparator function classes. A given function class F is said to be D-bounded if for all x 2 X and all f 2 F, we have kf(x)k D. Throughout this paper, we assume that F is symmetric:2 i.e. if f 2 F, then −f 2 F, and it contains the constant zero function, which we denote, with some abuse of notation, by 0. 1There is a slight abuse of notation here. A(·) is not a function but rather the output of the online learning algorithm A computed on the given example using its internal state. 2This is without loss of generality; as will be seen momentarily, our base assumption only requires an online learning algorithm A for F for linear losses `t. By running the Hedge algorithm on two copies of A, one of which receives the actual loss functions `t and the other recieves −`t, we get an algorithm which competes with negations of functions in F and the constant zero function as well. Furthermore, since the loss functions are convex (indeed, linear) this can be made into a deterministic reduction by choosing the convex combination of the outputs of the two copies of A with mixing weights given by the Hedge algorithm. 3 Given F, we define two richer function classes F0: the convex hull of F, denoted CH(F), is the set of convex combinations of a finite number of functions in F, and the span of F, denoted span(F), is the set of linear combinations of finitely many functions in F. For any f 2 span(F), define kfk1 := inf n max{1, P g2S |wg|} : f = P g2S wgg, S ✓F, |S| < 1, wg 2 R o . Since functions in span(F) are not bounded, it is not possible to obtain a uniform regret bound for all functions in span(F): rather, the regret of an online learning algorithm A for span(F) is specified in terms of regret bounds for individual comparator functions f 2 span(F), viz. Rf(T) := T X t=1 `t(A(xt)) − T X t=1 `t(f(xt)). Loss function classes. The base loss function class we consider is L, the set of all linear functions ` : Rd ! R, with Lipschitz constant bounded by 1. A function class F that is online learnable with the loss function class L is called online linear learnable for short. The richer loss function class we consider is denoted by C and is a set of convex loss functions ` : Rd ! R satisfying some regularity conditions specified in terms of certain parameters described below. We define a few parameters of the class C. For any b > 0, let Bd(b) = {y 2 Rd : kyk b} be the ball of radius b. The class C is said to have Lipschitz constant Lb on Bd(b) if for all ` 2 C and all y 2 Bd(b) there is an efficiently computable subgradient r`(y) with norm at most Lb. Next, C is said to be βb-smooth on Bd(b) if for all ` 2 C and all y, y0 2 Bd(b) we have `(y0) `(y) + r`(y) · (y0 −y) + βb 2 ky −y0k2. Next, define the projection operator ⇧b : Rd ! Bd(b) as ⇧b(y) := arg miny02Bd(b) ky −y0k, and define ✏b := supy2Rd, `2C `(⇧b(y))−`(y) k⇧b(y)−yk . 3 Online Boosting Algorithms The setup is that we are given a D-bounded reference class of functions F with an online linear learning algorithm A with regret bound R(·). For normalization, we also assume that the output of A at any time is bounded in norm by D, i.e. kA(xt)k D for all t. We further assume that for every b > 0, we can compute3 a Lipschitz constant Lb, a smoothness parameter βb, and the parameter ✏b for the class C over Bd(b). Furthermore, the online boosting algorithm may make up to N calls per iteration to any copies of A it maintains, for a given a budget parameter N. Given this setup, our main result is an online boosting algorithm, Algorithm 1, competing with span(F). The algorithm maintains N copies of A, denoted Ai, for i = 1, 2, . . . , N. Each copy corresponds to one stage in boosting. When it receives a new example xt, it passes it to each Ai and obtains their predictions Ai(xt), which it then combines into a prediction for yt using a linear combination. At the most basic level, this linear combination is simply the sum of all the predictions scaled by a step size parameter ⌘. Two tweaks are made to this sum in step 8 to facilitate the analysis: 1. While constructing the sum, the partial sum yi−1 t is multiplied by a shrinkage factor (1 −σi t⌘). This shrinkage term is tuned using an online gradient descent algorithm in step 14. The goal of the tuning is to induce the partial sums yi−1 t to be aligned with a descent direction for the loss functions, as measured by the inner product r`t(yi−1 t ) · yi−1 t . 2. The partial sums yi t are made to lie in Bd(B), for some parameter B, by using the projection operator ⇧B. This is done to ensure that the Lipschitz constant and smoothness of the loss function are suitably bounded. 3It suffices to compute upper bounds on these parameters. 4 Algorithm 1 Online Gradient Boosting for span(F) Require: Number of weak learners N, step size parameter ⌘2 [ 1 N , 1], 1: Let B = min{⌘ND, inf{b ≥D : ⌘βbb2 ≥✏bD}}. 2: Maintain N copies of the algorithm A, denoted Ai for i = 1, 2, . . . , N. 3: For each i, initialize σi 1 = 0. 4: for t = 1 to T do 5: Receive example xt. 6: Define y0 t = 0. 7: for i = 1 to N do 8: Define yi t = ⇧B((1 −σi t⌘)yi−1 t + ⌘Ai(xt)). 9: end for 10: Predict yt = yN t . 11: Obtain loss function `t and su↵er loss `t(yt). 12: for i = 1 to N do 13: Pass loss function `i t(y) = 1 LB r`t(yi−1 t ) · y to Ai. 14: Set σi t+1 = max{min{σi t + ↵tr`t(yi−1 t ) · yi−1 t ), 1}, 0}, where ↵t = 1 LBB p t. 15: end for 16: end for Once the boosting algorithm makes the prediction yt and obtains the loss function `t, each Ai is updated using a suitably scaled linear approximation to the loss function at the partial sum yi−1 t , i.e. the linear loss function 1 LB r`t(yi−1 t )·y. This forces Ai to produce predictions that are aligned with a descent direction for the loss function. For lack of space, we provide the analysis of the algorithm in Section B in the supplementary material. The analysis yields the following regret bound for the algorithm: Theorem 1. Let ⌘2 [ 1 N , 1] be a given parameter. Let B = min{⌘ND, inf{b ≥D : ⌘βbb2 ≥ ✏bD}}. Algorithm 1 is an online learning algorithm for span(F) and losses in C with the following regret bound for any f 2 span(F): R0 f(T) ✓ 1 − ⌘ kfk1 ◆N ∆0 + 3⌘βBB2kfk1T + LBkfk1R(T) + 2LBBkfk1 p T, where ∆0 := PT t=1 `t(0) −`t(f(xt)). The regret bound in this theorem depends on several parameters such as B, βB and LB. In applications of the algorithm for 1-dimensional regression with commonly used loss functions, however, these parameters are essentially modest constants; see Section 3.1 for calculations of the parameters for various loss functions. Furthermore, if ⌘is appropriately set (e.g. ⌘= (log N)/N), then the average regret R0 f(T)/T clearly converges to 0 as N ! 1 and T ! 1. While the requirement that N ! 1 may raise concerns about computational efficiency, this is in fact analogous to the guarantee in the batch setting: the algorithms converge only when the number of boosting stages goes to infinity. Moreover, our lower bound (Theorem 4) shows that this is indeed necessary. We also present a simpler boosting algorithm, Algorithm 2, that competes with CH(F). Algorithm 2 is similar to Algorithm 1, with some simplifications: the final prediction is simply a convex combination of the predictions of the base learners, with no projections or shrinkage necessary. While Algorithm 1 is more general, Algorithm 2 may still be useful in practice when a bound on the norm of the comparator function is known in advance, using the observations in Section 4.2. Furthermore, its analysis is cleaner and easier to understand for readers who are familiar with the Frank-Wolfe method, and this serves as a foundation for the analysis of Algorithm 1. This algorithm has an optimal (up to constant factors) regret bound as given in the following theorem, proved in Section A in the supplementary material. The upper bound in this theorem is proved along the lines of the Frank-Wolfe [8] algorithm, and the lower bound using information-theoretic arguments. 5 Theorem 2. Algorithm 2 is an online learning algorithm for CH(F) for losses in C with the regret bound R0(T) 8βDD2 N T + LDR(T). Furthermore, the dependence of this regret bound on N is optimal up to constant factors. The dependence of the regret bound on R(T) is unimprovable without additional assumptions: otherwise, Algorithm 2 will be an online linear learning algorithm over F with better than R(T) regret. Algorithm 2 Online Gradient Boosting for CH(F) 1: Maintain N copies of the algorithm A, denoted A1, A2, . . . , AN, and let ⌘i = 2 i+1 for i = 1, 2, . . . , N. 2: for t = 1 to T do 3: Receive example xt. 4: Define y0 t = 0. 5: for i = 1 to N do 6: Define yi t = (1 −⌘i)yi−1 t + ⌘iAi(xt). 7: end for 8: Predict yt = yN t . 9: Obtain loss function `t and su↵er loss `t(yt). 10: for i = 1 to N do 11: Pass loss function `i t(y) = 1 LD r`t(yi−1 t ) · y to Ai. 12: end for 13: end for Using a deterministic base online linear learning algorithm. If the base online linear learning algorithm A is deterministic, then our results can be improved, because our online boosting algorithms are also deterministic, and using a standard simple reduction, we can now allow C to be any set of convex functions (smooth or not) with a computable Lipschitz constant Lb over the domain Bd(b) for any b > 0. This reduction converts arbitrary convex loss functions into linear functions: viz. if yt is the output of the online boosting algorithm, then the loss function provided to the boosting algorithm as feedback is the linear function `0 t(y) = r`t(yt)·y. This reduction immediately implies that the base online linear learning algorithm A, when fed loss functions 1 LD `0 t, is already an online learning algorithm for CH(F) with losses in C with the regret bound R0(T) LDR(T). As for competing with span(F), since linear loss functions are 0-smooth, we obtain the following easy corollary of Theorem 1: Corollary 1. Let ⌘2 [ 1 N , 1] be a given parameter, and set B = ⌘ND. Algorithm 1 is an online learning algorithm for span(F) for losses in C with the following regret bound for any f 2 span(F): R0 f(T) ✓ 1 − ⌘ kfk1 ◆N ∆0 + LBkfk1R(T) + 2LBBkfk1 p T, where ∆0 := PT t=1 `t(0) −`t(f(xt)). 3.1 The parameters for several basic loss functions In this section we consider the application of our results to 1-dimensional regression, where we assume, for normalization, that the true labels of the examples and the predictions of the functions in the class F are in [−1, 1]. In this case k·k denotes the absolute value norm. Thus, in each round, the adversary chooses a labeled data point (xt, y? t ) 2 X ⇥[−1, 1], and the loss for the prediction yt 2 [−1, 1] is given by `t(yt) = `(y? t , yt) where `(·, ·) is a fixed loss function that is convex in the second argument. Note that D = 1 in this setting. We 6 give examples of several such loss functions below, and compute the parameters Lb, βb and ✏b for every b > 0, as well as B from Theorem 1. 1. Linear loss: `(y?, y) = −y?y. We have Lb = 1, βb = 0, ✏b = 1, and B = ⌘N. 2. p-norm loss, for some p ≥2: `(y?, y) = |y? −y|p. We have Lb = p(b + 1)p−1, βb = p(p −1)(b + 1)p−2, ✏b = max{p(1 −b)p−1, 0}, and B = 1. 3. Modified least squares: `(y?, y) = 1 2 max{1 −y?y, 0}2. We have Lb = b + 1, βb = 1, ✏b = max{1 −b, 0}, and B = 1. 4. Logistic loss: `(y?, y) = ln(1 + exp(−y?y)). We have Lb = exp(b) 1+exp(b), βb = 1 4, ✏b = exp(−b) 1+exp(−b), and B = min{⌘N, ln(4/⌘)}. 4 Variants of the boosting algorithms Our boosting algorithms and the analysis are considerably flexible: it is easy to modify the algorithms to work with a di↵erent (and perhaps more natural) kind of base learner which does greedy fitting, or incorporate a scaling of the base functions which improves performance. Also, when specialized to the batch setting, our algorithms provide better convergence rates than previous work. 4.1 Fitting to actual loss functions The choice of an online linear learning algorithm over the base function class in our algorithms was made to ease the analysis. In practice, it is more common to have an online algorithm which produce predictions with comparable accuracy to the best function in hindsight for the actual sequence of loss functions. In particular, a common heuristic in boosting algorithms such as the original gradient boosting algorithm by Friedman [10] or the matching pursuit algorithm of Mallat and Zhang [18] is to build a linear combination of base functions by iteratively augmenting the current linear combination via greedily choosing a base function and a step size for it that minimizes the loss with respect to the residual label. Indeed, the boosting algorithm of Zhang and Yu [24] also uses this kind of greedy fitting algorithm as the base learner. In the online setting, we can model greedy fitting as follows. We first fix a step size ↵≥0 in advance. Then, in each round t, the base learner A receives not only the example xt, but also an o↵set y0 t 2 Rd for the prediction, and produces a prediction A(xt) 2 Rd, after which it receives the loss function `t and su↵ers loss `t(y0 t + ↵A(xt)). The predictions of A satisfy T X t=1 `t(y0 t + ↵A(xt)) inf f2F T X t=1 `t(y0 t + ↵f(xt)) + R(T), where R is the regret. Our algorithms can be made to work with this kind of base learner as well. The details can be found in Section C.1 of the supplementary material. 4.2 Improving the regret bound via scaling Given an online linear learning algorithm A over the function class F with regret R, then for any scaling parameter λ > 0, we trivially obtain an online linear learning algorithm, denoted λA, over a λ-scaling of F, viz. λF := {λf | f 2 F}, simply by multiplying the predictions of A by λ. The corresponding regret scales by λ as well, i.e. it becomes λR. The performance of Algorithm 1 can be improved by using such an online linear learning algorithm over λF for a suitably chosen scaling λ ≥1 of the function class F. The regret bound from Theorem 1 improves because the 1-norm of f measured with respect to λF, i.e. kfk0 1 = max{1, kfk1 λ }, is smaller than kfk1, but degrades because the parameter B0 = min{⌘NλD, inf{b ≥λD : ⌘βbb2 ≥✏bλD}} is larger than B. But, as detailed in Section C.2 of the supplementary material, in many situations the improvement due to the former compensates for the degradation due to the latter, and overall we can get improved regret bounds using a suitable value of λ. 7 4.3 Improvements for batch boosting Our algorithmic technique can be easily specialized and modified to the standard batch setting with a fixed batch of training examples and a base learning algorithm operating over the batch, exactly as in [24]. The main di↵erence compared to the algorithm of [24] is the use of the σ variables to scale the coefficients of the weak hypotheses appropriately. While a seemingly innocuous tweak, this allows us to derive analogous bounds to those of Zhang and Yu [24] on the optimization error that show that our boosting algorithm converges exponential faster. A detailed comparison can be found in Section C.3 of the supplementary material. 5 Experimental Results Is it possible to boost in an online fashion in practice with real base learners? To study this question, we implemented and evaluated Algorithms 1 and 2 within the Vowpal Wabbit (VW) open source machine learning system [23]. The three online base learners used were VW’s default linear learner (a variant of stochastic gradient descent), two-layer sigmoidal neural networks with 10 hidden units, and regression stumps. Regression stumps were implemented by doing stochastic gradient descent on each individual feature, and predicting with the best-performing non-zero valued feature in the current example. All experiments were done on a collection of 14 publically available regression and classification datasets (described in Section D in the supplementary material) using squared loss. The only parameters tuned were the learning rate and the number of weak learners, as well as the step size parameter for Algorithm 1. Parameters were tuned based on progressive validation loss on half of the dataset; reported is propressive validation loss on the remaining half. Progressive validation is a standard online validation technique, where each training example is used for testing before it is used for updating the model [3]. The following table reports the average and the median, over the datasets, relative improvement in squared loss over the respective base learner. Detailed results can be found in Section D in the supplementary material. Base learner Average relative improvement Median relative improvement Algorithm 1 Algorithm 2 Algorithm 1 Algorithm 2 SGD 1.65% 1.33% 0.03% 0.29% Regression stumps 20.22% 15.9% 10.45% 13.69% Neural networks 7.88% 0.72% 0.72% 0.33% Note that both SGD (stochastic gradient descent) and neural networks are already very strong learners. Naturally, boosting is much more e↵ective for regression stumps, which is a weak base learner. 6 Conclusions and Future Work In this paper we generalized the theory of boosting for regression problems to the online setting and provided online boosting algorithms with theoretical convergence guarantees. Our algorithmic technique also improves convergence guarantees for batch boosting algorithms. We also provide experimental evidence that our boosting algorithms do improve prediction accuracy over commonly used base learners in practice, with greater improvements for weaker base learners. The main remaining open question is whether the boosting algorithm for competing with the span of the base functions is optimal in any sense, similar to our proof of optimality for the the boosting algorithm for competing with the convex hull of the base functions. 8 References [1] Peter L. Bartlett and Mikhail Traskin. AdaBoost is consistent. JMLR, 8:2347–2368, 2007. [2] Alina Beygelzimer, Satyen Kale, and Haipeng Luo. Optimal and adaptive algorithms for online boosting. In ICML, 2015. [3] Avrim Blum, Adam Kalai, and John Langford. Beating the hold-out: Bounds for k-fold and progressive cross-validation. In COLT, pages 203–208, 1999. [4] Shang-Tse Chen, Hsuan-Tien Lin, and Chi-Jen Lu. An Online Boosting Algorithm with Theoretical Justifications. In ICML, 2012. [5] Shang-Tse Chen, Hsuan-Tien Lin, and Chi-Jen Lu. Boosting with Online Binary Learners for the Multiclass Bandit Problem. In ICML, 2014. [6] Michael Collins, Robert E. Schapire, and Yoram Singer. Logistic regression, AdaBoost and Bregman distances. In COLT, 2000. [7] Nigel Du↵y and David Helmbold. Boosting methods for regression. Machine Learning, 47(2/3):153–200, 2002. [8] Marguerite Frank and Philip Wolfe. An algorithm for quadratic programming. Naval Res. Logis. Quart., 3:95–110, 1956. [9] Yoav Freund and Robert E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. JCSS, 55(1):119–139, August 1997. [10] Jerome H. Friedman. Greedy function approximation: A gradient boosting machine. Annals of Statistics, 29(5), October 2001. [11] Helmut Grabner and Horst Bischof. On-line boosting and vision. In CVPR, volume 1, pages 260–267, 2006. [12] Helmut Grabner, Christian Leistner, and Horst Bischof. Semi-supervised on-line boosting for robust tracking. In ECCV, pages 234–247, 2008. [13] Trevor Hastie and R. J Robet Tibshirani. Generalized Additive Models. Chapman and Hall, 1990. [14] Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Verlag, 2001. [15] Elad Hazan and Satyen Kale. Beyond the regret minimization barrier: optimal algorithms for stochastic strongly-convex optimization. JMLR, 15(1):2489–2512, 2014. [16] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [17] Xiaoming Liu and Ting Yu. Gradient feature selection for online boosting. In ICCV, pages 1–8, 2007. [18] St´ephane G. Mallat and Zhifeng Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397–3415, December 1993. [19] Llew Mason, Jonathan Baxter, Peter Bartlett, and Marcus Frean. Boosting algorithms as gradient descent. In NIPS, 2000. [20] Nikunj C. Oza and Stuart Russell. Online bagging and boosting. In AISTATS, pages 105–112, 2001. [21] Robert E. Schapire and Yoav Freund. Boosting: Foundations and Algorithms. MIT Press, 2012. [22] Matus Telgarsky. Boosting with the logistic loss is consistent. In COLT, 2013. [23] VW. URL https://github.com/JohnLangford/vowpal_wabbit/. [24] Tong Zhang and Bin Yu. Boosting with early stopping: Convergence and consistency. Annals of Statistics, 33(4):1538–1579, 2005. [25] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, 2003. 9 | 2015 | 20 |
5,703 | Sample Efficient Path Integral Control under Uncertainty Yunpeng Pan, Evangelos A. Theodorou, and Michail Kontitsis Autonomous Control and Decision Systems Laboratory Institute for Robotics and Intelligent Machines School of Aerospace Engineering Georgia Institute of Technology, Atlanta, GA 30332 {ypan37,evangelos.theodorou,kontitsis}@gatech.edu Abstract We present a data-driven optimal control framework that is derived using the path integral (PI) control approach. We find iterative control laws analytically without a priori policy parameterization based on probabilistic representation of the learned dynamics model. The proposed algorithm operates in a forward-backward manner which differentiate it from other PI-related methods that perform forward sampling to find optimal controls. Our method uses significantly less samples to find analytic control laws compared to other approaches within the PI control family that rely on extensive sampling from given dynamics models or trials on physical systems in a model-free fashion. In addition, the learned controllers can be generalized to new tasks without re-sampling based on the compositionality theory for the linearly-solvable optimal control framework. We provide experimental results on three different tasks and comparisons with state-of-the-art model-based methods to demonstrate the efficiency and generalizability of the proposed framework. 1 Introduction Stochastic optimal control (SOC) is a general and powerful framework with applications in many areas of science and engineering. However, despite the broad applicability, solving SOC problems remains challenging for systems in high-dimensional continuous state action spaces. Various function approximation approaches to optimal control are available [1, 2] but usually sensitive to model uncertainty. Over the last decade, SOC based on exponential transformation of the value function has demonstrated remarkable applicability in solving real world control and planning problems. In control theory the exponential transformation of the value function was introduced in [3, 4]. In the recent decade it has been explored in terms of path integral interpretations and theoretical generalizations [5, 6, 7, 8], discrete time formulations [9], and scalable RL/control algorithms [10, 11, 12, 13, 14]. The resulting stochastic optimal control frameworks are known as Path Integral (PI) control for continuous time, Kullback Leibler (KL) control for discrete time, or more generally Linearly Solvable Optimal Control [9, 15]. One of the most attractive characteristics of PI control is that optimal control problems can be solved with forward sampling of Stochastic Differential Equations (SDEs). While the process of sampling with SDEs is more scalable than numerically solving partial differential equations, it still suffers from the curse of dimensionality when performed in a naive fashion. One way to circumvent this problem is to parameterize policies [10, 11, 14] and then perform optimization with sampling. However, in this case one has to impose the structure of the policy a-priori, therefore restrict the possible optimal control solutions within the assumed parameterization. In addition, the optimized policy parameters can not be generalized to new tasks. In general, model-free PI policy search approaches 1 require a large number of samples from trials performed on real physical systems. The issue of sample inefficiency further restricts the applicability of PI control methods on physical systems with unknown or partially known dynamics. Motivated by the aforementioned limitations, in this paper we introduce a sample efficient, modelbased approach to PI control. Different from existing PI control approaches, our method combines the benefits of PI control theory [5, 6, 7] and probabilistic model-based reinforcement learning methodologies [16, 17]. The main characteristics of the our approach are summarized as follows • It extends the PI control theory [5, 6, 7] to the case of uncertain systems. The structural constraint is enforced between the control cost and uncertainty of the learned dynamics, which can be viewed as a generalization of previous work [5, 6, 7]. • Different from parameterized PI controllers [10, 11, 14, 8], we find analytic control law without any policy parameterization. • Rather than keeping a fixed control cost weight [5, 6, 7, 10, 18], or ignoring the constraint between control authority and noise level [11], in this work the control cost weight is adapted based on the explicit uncertainty of the learned dynamics model. • The algorithm operates in a different manner compared to existing PI-related methods that perform forward sampling [5, 6, 7, 10, 18, 11, 12, 14, 8]. More precisely our method perform successive deterministic approximate inference and backward computation of optimal control law. • The proposed model-based approach is significantly more sample efficient than samplingbased PI control [5, 6, 7, 18]. In RL setting our method is comparable to the state-of-the-art RL methods [17, 19] in terms of sample and computational efficiency. • Thanks to the linearity of the backward Chapman-Kolmogorov PDE, the learned controllers can be generalized to new tasks without re-sampling by constructing composite controllers. In contrast, most policy search and trajectory optimization methods [10, 11, 14, 17, 19, 20, 21, 22] find policy parameters that can not be generalized. 2 Iterative Path Integral Control for a Class of Uncertain Systems 2.1 Problem formulation We consider a nonlinear stochastic system described by the following differential equation dx = f(x) + G(x)u dt + Bdω, (1) with state x ∈Rn, control u ∈Rm, and standard Brownian motion noise ω ∈Rp with variance Σω. f(x) is the unknown drift term (passive dynamics), G(x) ∈Rn×m is the control matrix and B ∈Rn×p is the diffusion matrix. Given some previous control uold, we seek the optimal control correction term δu such that the total control u = uold + δu. The original system becomes dx = f(x) + G(x)(uold + δu) dt + Bdω = f(x) + G(x)uold | {z } ˜f(x,uold) dt + G(x)δudt + Bdω. In this work we assume the dynamics based on the previous control can be represented by Gaussian processes (GP) such that fGP(x) = ˜f(x, uold)dt + Bdω, (2) where fGP is the GP representation of the biased drift term ˜f under the previous control. Now the original dynamical system (1) can be represented as follow dx = fGP + Gδudt, fGP ∼GP(µf, Σf), (3) where µf, Σf are predictive mean and covariance functions, respectively. For the GP model we use a prior of zero mean and covariance function K(xi, xj) = σ2 s exp(−1 2(xi −xj)TW(xi −xj)) + δijσ2 ω, with σs, σω, W the hyper-parameters. δij is the Kronecker symbol that is one iff i = j and zero otherwise. Samples over fGP can be drawn using an vector of i.i.d. Gaussian variable Ω ˜fGP = µf + LfΩ (4) 2 where Lf is obtained using Cholesky factorization such that Σf = LfLT f . Note that generally Ωis an infinite dimensional vector and we can use the same sample to represent uncertainty during learning [23]. Without loss of generality we assume Ωto be the standard zero-mean Brownian motion. For the rest of the paper we use simplified notations with subscripts indicating the time step. The discrete-time representation of the system is xt+dt = xt+µft+Gtδutdt+LftΩt √ dt, and the conditional probability of xt+dt given xt and δut is a Gaussian p xt+dt|xt, δut = N µt+dt, Σt+dt , where µt+dt = xt + µft + Gtδut and Σt+dt = Σft. In this paper we consider a finite-horizon stochastic optimal control problem J(x0) = E h q(xT ) + Z T t=0 L(xt, δut)dt i , where the immediate cost is defined as L(xt, ut) = q(xt) + 1 2δuT t Rtδut, and q(xt) = (xt − xd t )TQ(xt −xd t ) is a quadratic cost function where xd t is the desired state. Rt = R(xt) is a statedependent positive definite weight matrix. Next we show the linearized Hamilton-Jacobi-Bellman equation for this class of optimal control problems. 2.2 Linearized Hamilton-Jacobi-Bellman equation for uncertain dynamics At each iteration the goal is to find the optimal control update δut that minimizes the value function V (xt, t) = min δut E h Z t+dt t L(xt, δut)dt + V (xt + dxt, t + dt)dt|xt i . (5) (5) is the Bellman equation. By approximating the integral for a small dt and applying Itˆo’s rule we obtain the Hamilton-Jacobi-Bellman (HJB) equation (detailed derivation is skipped): −∂tVt = min δut (qt + 1 2δuT t Rtδut + (µft + Gtδut)T∇xVt + 1 2 Tr(Σft∇xxVt)). To find the optimal control update, we take gradient of the above expression (inside the parentheses) with respect to δut and set to 0. This yields δut = −R−1 t GT t ∇xVt. Inserting this expression into the HJB equation yields the following nonlinear and second order PDE −∂tVt = qt + (∇xVt)Tµft −1 2(∇xVt)TGtR−1GT t ∇xVt + 1 2 Tr(Σft∇xxVt). (6) In order to solve the above PDE we use the exponential transformation of the value function Vt = −λ log Ψt, where Ψt = Ψ(xt) is called the desirability of xt. The corresponding partial derivatives can be found as ∂tVt = −λ Ψt ∂tΨt, ∇xVt = −λ Ψt ∇xΨt and ∇xxVt = λ Ψ2 t ∇xΨt∇xΨT t − λ Ψt ∇xxΨt. Inserting these terms to (6) results in λ Ψt ∂tΨt = qt−λ Ψt (∇xΨt)Tµft−λ2 2Ψ2 t (∇xΨt)TGtR−1 t GT t ∇xΨt+ λ 2Ψ2 t Tr((∇xΨt)TΣft∇xΨt)−λ 2Ψt Tr(∇xxΨtΣft). The quadratic terms ∇xΨt will cancel out under the assumption of λGtR−1 t GT t = Σft. This constraint is different from existing works in path integral control [5, 6, 7, 10, 18, 8] where the constraint is enforced between the additive noise covariance and control authority, more precisely λGtR−1 t GT t = BΣωBT. The new constraint enables an adaptive update of control cost weight based on explicit uncertainty of the learned dynamics. In contrast, most existing works use a fixed control cost weight [5, 6, 7, 10, 18, 12, 14, 8]. This condition also leads to more exploration (more aggressive control) under high uncertainty and less exploration with more certain dynamics. Given the aforementioned assumption, the above PDE is simplified as ∂tΨt = 1 λqtΨt −µT ft∇xΨt −1 2 Tr(∇xxΨtΣft), (7) subject to the terminal condition ΨT = exp(−1 λqT ). The resulting Chapman-Kolmogorov PDE (7) is linear. In general, solving (7) analytically is intractable for nonlinear systems and cost functions. We apply the Feynman-Kac formula which gives a probabilistic representation of the solution of the linear PDE (7) Ψt = lim dt→0 Z p(τt|xt) exp −1 λ( T −dt X j=t qjdt) ΨT dτt, (8) 3 where τt is the state trajectory from time t to T. The optimal control is obtained as Gtδˆut = −GtR−1 t GT t (∇xVt) = λGtR−1 t GT t ∇xΨt Ψt = Σft ∇xΨt Ψt =⇒ˆut = uold t + δˆut = uold t + G−1 t Σft ∇xΨt Ψt . (9) Rather than computing ∇xΨt and Ψt, the optimal control ˆut can be approximated based on path costs of sampled trajectories. Next we briefly review some of the existing approaches. 2.3 Related works According to the path integral control theory [5, 6, 7, 10, 18, 8], the stochastic optimal control problem becomes an approximation problem of a path integral (8). This problem can be solved by forward sampling of the uncontrolled (u = 0) SDE (1). The optimal control ˆut is approximated based on path costs of sampled trajectories. Therefore the computation of optimal controls becomes a forward process. More precisely, when the control and noise act in the same subspace, the optimal control can be evaluated as the weighted average of the noise ˆut = Ep(τt|xt) dωt , where the probability of a trajectory is p(τt|xt) = exp(−1 λ S(τt|xt)) R exp(−1 λ S(τt|xt))dτ , and S(τt|xt) is defined as the path cost computed by performing forward sampling. However, these approaches require a large amount of samples from a given dynamics model, or extensive trials on physical systems when applied in model-free reinforcement learning settings. In order to improve sample efficiency, a nonparametric approach was developed by representing the desirability Ψt in terms of linear operators in a reproducing kernel Hilbert space (RKHS) [12]. As a model-free approach, it allows sample re-use but relies on numerical methods to estimate the gradient of desirability, i.e., ∇xΨt , which can be computationally expensive. On the other hand, computing the analytic expressions of the path integral embedding is intractable and requires exact knowledge of the system dynamics. Furthermore, the control approximation is based on samples from the uncontrolled dynamics, which is usually not sufficient for highly nonlinear or underactuated systems. Another class of PI-related method is based on policy parameterization. Notable approaches include PI2 [10], PI2-CMA [11], PI-REPS[14] and recently developed state-dependent PI[8]. The limitations of these methods are: 1) They do not take into account model uncertainty in the passive dynamics f(x). 2) The imposed policy parameterizations restrict optimal control solutions. 3) The optimized policy parameters can not be generalized to new tasks. A brief comparison of some of these methods can be found in Table 1. Motivated by the challenge of combining sample efficiency and generalizability, next we introduce a probabilistic model-based approach to compute the optimal control (9) analytically. PI [5, 6, 7], iterative PI [18] PI2[10], PI2-CMA [11] PI-REPS[14] State feedback PI[8] Our method Structural constraint λGtR−1 t GT t = BΣωBT same as PI same as PI same as PI λGR−1GT = Σf Dynamics model model-based model-free model-based model-based GP model-based Policy parameterization No Yes Yes Yes No Table 1: Comparison with some notable and recent path integral-related approaches. 3 Proposed Approach 3.1 Analytic path integral control: a forward-backward scheme In order to derive the proposed framework, firstly we learn the function fGP(xt) = ˜f(x, uold)dt + Bdω from sampled data. Learning the continuous mapping from state to state transition can be viewed as an inference with the goal of inferring the state transition d˜xt = fGP(xt). The kernel function has been defined in Sec.2.1, which can be interpreted as a similarity measure of random variables. More specifically, if the training input xi and xj are close to each other in the kernel space, their outputs dxi and dxj are highly correlated. Given a sequence of states {x0, . . . xT }, and the corresponding state transition {d˜x0, . . . , d˜xT }, the posterior distribution can be obtained by conditioning the joint prior distribution on the observations. In this work we make the standard assumption of independent outputs (no correlation between each output dimension). 4 To propagate the GP-based dynamics over a trajectory of time horizon T we employ the moment matching approach [24, 17] to compute the predictive distribution. Given an input distribution over the state N(µt, Σt), the predictive distribution over the state at t + dt can be approximated as a Gaussian p(xt+dt) ≈N(µt+dt, Σt+dt) such that µt+dt = µt + µft, Σt+dt = Σt + Σft + COV[xt, d˜xt] + COV[d˜xt, xt]. (10) The above formulation is used to approximate one-step transition probabilities over the trajectory. Details regarding the moment matching method can be found in [24, 17]. All mean and variance terms can be computed analytically. The hyper-parameters σs, σω, W are learned by maximizing the log-likelihood of the training outputs given the inputs [25]. Given the approximation of transition probability (10), we now introduce a Bayesian nonparametric formulation of path integral control based on probabilistic representation of the dynamics. Firstly we perform approximate inference (forward propagation) to obtain the Gaussian belief (predictive mean and covariance of the state) over the trajectory. Since the exponential transformation of the state cost exp(−1 λq(x)dt) is an unnormalized Gaussian N(xd, 2λ dt Q−1). We can evaluate the following integral analytically Z N µj, Σj exp −1 λ qjdt dxj = I + dt 2λ ΣjQ −1 2 exp −1 2 (µj −xd j )T dt 2λ Q(I + dt 2λ λΣjQ)−1(µj −xd j ) , (11) for j = t+dt, ..., T. Thus given a boundary condition ΨT = exp(−1 λqT ) and predictive distribution at the final step N(µT , ΣT ), we can evaluate the one-step backward desirability ΨT −dt analytically using the above expression (11). More generally we use the following recursive rule Ψj−dt = Φ(xj, Ψj) = Z N µj, Σj exp −1 λqjdt Ψjdxj, (12) for j = t + dt, ..., T −dt. Since we use deterministic approximate inference based on (10) instead of explicitly sampling from the corresponding SDE, we approximate the conditional distribution p(xj|xj−dt) by the Gaussian predictive distribution N(µj, Σj). Therefore the path integral Ψt = Z p τt|xt exp −1 λ( T −dt X j=t qjdt) ΨT dτt ≈ Z ... Z N µT −dt, ΣT −dt exp −1 λqT −dtdt Z N µT , ΣT exp −1 λqT | {z } ΨT dxT | {z } ΨT −dt dxT −dt | {z } ΨT −2dt ...dxt+dt = Z N µt+dt, Σt+dt exp −1 λqt+dtdt Ψt+dtdxt+dt = Φ(xt+dt, Ψt+dt). (13) We evaluate the desirability Ψt backward in time by successive computation using the above recursive expression. The optimal control law ˆut (9) requires gradients of the desirability function with respect to the state, which can be computed backward in time as well. For simplicity we denote the function Φ(xj, Ψj) by Φj. Thus we compute the gradient of the recursive expression (13) ∇xΨj−dt = Ψj∇xΦj + Φj∇xΨj, (14) where j = t + dt, ..., T −dt. Given the expression in (11) we compute the gradient terms in (14) as ∇xΦj = dΦj dp(xj) dp(xj) dxt = ∂Φj ∂µj dµj dxt + ∂Φj ∂Σj dΣj dxt , where ∂Φj ∂µj = Φj(µj −xd j)T dt 2λQ(I + dt 2λλΣjQ)−1, ∂Φj ∂Σj = Φj 2 dt 2λQ(I + dt 2λλΣjQ)−1 µj −xd j µj −xd j T −I dt 2λQ(I + dt 2λλΣjQ)−1, and d{µj, Σj} dxt = n ∂µj ∂µj−dt dµj−dt dxt + ∂µj ∂Σj−dt dΣj−dt dxt , ∂Σj ∂µj−dt dµj−dt dxt + ∂Σj ∂Σj−dt dΣj−dt dxt o . The term ∇xΨT −dt is compute similarly. The partial derivatives ∂µj ∂µj−dt , ∂µj ∂Σj−dt , ∂Σj ∂µj−dt , ∂Σj ∂Σj−dt can be computed analytically as in [17]. We compute all gradients using this scheme without any numerical method (finite differences, etc.). Given Ψt and ∇xΨt, the optimal control takes a analytic 5 form as in eq.(9). Since Ψt and ∇xΨt are explicit functions of xt, the resulting control law is essentially different from the feedforward control in sampling-based path integral control frameworks [5, 6, 7, 10, 18] as well as the parameterized state feedback PI control policies [14, 8]. Notice that at current time step t, we update the control sequence ˆut,...,T using the presented forward-backward scheme. Only ˆut is applied to the system to move to the next step, while the controls ˆut+dt,...,T are used for control update at future steps. The transition sample recorded at each time step is incorporated to update the GP model of the dynamics. A summary of the proposed algorithm is shown in Algorithm 1. Algorithm 1 Sample efficient path integral control under uncertain dynamics 1: Initialization: Apply random controls ˆu0,..,T to the physical system (1), record data. 2: repeat 3: for t=0:T do 4: Incorporate transition sample to learn GP dynamics model. 5: repeat 6: Approximate inference for predictive distributions using uold t,..,T = ˆut,..,T , see (10). 7: Backward computation of optimal control updates δˆut,..,T , see (13)(14)(9). 8: Update optimal controls ˆut,..,T = uold t,..,T + δˆut,..,T . 9: until Convergence. 10: Apply optimal control ˆut to the system. Move one step forward and record data. 11: end for 12: until Task learned. 3.2 Generalization to unlearned tasks without sampling In this section we describe how to generalize the learned controllers for new (unlearned) tasks without any interaction with the real system. The proposed approach is based on the compositionality theory [26] in linearly solvable optimal control (LSOC). We use superscripts to denote previously learned task indexes. Firstly we define a distance measure between the new target ¯xd and old targets xdk, k = 1, .., K, i.e., a Gaussian kernel ωk = exp −1 2(¯xd −xdk)TP(¯xd −xdk) , (15) where P is a diagonal matrix (kernel width). The composite terminal cost ¯q(xT ) for the new task becomes ¯q(xT ) = −λ log PK k=1 ωk exp(−1 λqk(xT )) PK k=1 ωk , (16) where qk(xT ) is the terminal cost for old tasks. For conciseness we define a normalized distance measure ˜ωk = ωk PK k=1 ωk , which can be interpreted as a probability weight. Based on (16) we have the composite terminal desirability for the new task which is a linear combination of Ψk T ¯ΨT = exp −1 λ ¯q(xT ) = K X k=1 ˜ωkΨk T . (17) Since Ψk t is the solution to the linear Chapman-Kolmogorov PDE (7), the linear combination of desirability (17) holds everywhere from t to T as long as it holds on the boundary (terminal time step). Therefore we obtain the composite control ¯ut = K X k=1 ˜ωkΨk t PK k=1 ˜ωkΨk t ˆuk t . (18) The composite control law in (18) is essentially different from an interpolating control law[26]. It enables sample-free controllers that constructed from learned controllers for different tasks. This scheme can not be adopted in policy search or trajectory optimization methods such as [10, 11, 14, 17, 19, 20, 21, 22]. Alternatively, generalization can be achieved by imposing task-dependent policies [27]. However, this approach might restrict the choice of optimal controls given the assumed structure of control policy. 6 4 Experiments and Analysis We consider 3 simulated RL tasks: cart-pole (CP) swing up, double pendulum on a cart (DPC) swing up, and PUMA-560 robotic arm reaching. The CP and DPC systems consist of a cart and a single/double-link pendulum. The tasks are to swing-up the single/double-link pendulum from the initial position (point down). Both CP and DPC are under-actuated systems with only one control acting on the cart. PUMA-560 is a 3D robotic arm that has 12 state dimensions, 6 degrees of freedom with 6 actuators on the joints. The task is to steer the end-effector to the desired position and orientation. In order to demonstrate the performance, we compare the proposed control framework with three related methods: iterative path integral control [18] with known dynamics model, PILCO [17] and PDDP [19]. Iterative path integral control is a sampling-based stochastic control method. It is based on importance sampling using controlled diffusion process rather than passive dynamics used in standard path integral control [5, 6, 7]. Iterative PI control is used as a baseline with a given dynamics model. PILCO is a model-based policy search method that features state-of-the-art data efficiency in terms of number of trials required to learn a task. PILCO requires an extra optimizer (such as BFGS) for policy improvement. PDDP is a Gaussian belief space trajectory optimization approach. It performs dynamic programming based on local approximation of the learned dynamics and value function. Both PILCO and PDDP are applied with unknown dynamics. In this work we do not compare our method with model-free PI-related approaches such as [10, 11, 12, 14] since these methods would certainly cost more samples than model-based methods such as PILCO and PDDP. The reason for choosing these two methods for comparison is that our method adopts a similar model learning scheme while other state-of-the-art methods, such as [20] is based on a different model. In experiment 1 we demonstrate the sample efficiency of our method using the CP and DPC tasks. For both tasks we choose T = 1.2 and dt = 0.02 (60 time steps per rollout). The iterative PI [18] with a given dynamics model uses 103/104 (CP/DPC) sample rollouts per iteration and 500 iterations at each time step. We initialize PILCO and the proposed method by collecting 2/6 sample rollouts (corresponding to 120/360 transition samples) for CP/DPC tasks respectively. At each trial (on the true dynamics model), we use 1 sample rollout for PILCO and our method. PDDP uses 4/5 rollouts (corresponding to 240/300 transition samples) for initialization as well as at each trial for the CP/DPC tasks. Fig. 1 shows the results in terms of ΨT and computational time. For both tasks our method shows higher desirability (lower terminal state cost) at each trial, which indicates higher sample efficiency for task learning. This is mainly because our method performs online reoptimization at each time step. In contrast, the other two methods do not use this scheme. However we assume partial information of the dynamics (G matrix) is given. PILCO and PDDP perform optimization on entirely unknown dynamics. In many robotic systems G corresponds to the inverse of the inertia matrix, which can be identified based on data as well. In terms of computational efficiency, our method outperforms PILCO since we compute the optimal control update analytically, while PILCO solves large scale nonlinear optimization problems to obtain policy parameters. Our method is more computational expensive than PDDP because PDDP seeks local optimal controls that rely on linear approximations, while our method is a global optimal control approach. Despite the relatively higher computational burden than PDDP, our method offers reasonable efficiency in terms of the time required to reach the baseline performance. In experiment 2 we demonstrate the generalizability of the learned controllers to new tasks using the composite control law (18) based on the PUMA-560 system. We use T = 2 and dt = 0.02 (100 time steps per rollout). First we learn 8 independent controllers using Algorithm 1. The target postures are shown in Fig. 2. For all tasks we initialize with 3 sample rollouts and 1 sample at each trial. Blue bars in Fig. 2b shows the desirabilities ΨT after 3 trials. Next we use the composite law (18) to construct controllers without re-sampling using 7 other controllers learned using Algorithm 1. For instance the composite controller for task#1 is found as ¯u1 t = P8 k=2 ˜ωkΨk t P8 k=2 ˜ωkΨk t ˆuk t . The performance comparison of the composite controllers with controllers learned from trials is shown in Fig. 2. It can be seen that the composite controllers give close performance as independently learned controllers. The compositionality theory [26] generally does not apply to policy search methods and trajectory optimizers such as PILCO, PDDP, and other recent methods [20, 21, 22]. Our method benefits from the compositionality of control laws that can be applied for multi-task control without re-sampling. 7 0 1 2 3 Trial# 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ΨT Cart-pole Iterative PI (true model, 103 samp/iter) PILCO (1 sample/trial) PDDP (4 samples/trial) Ours (1 sample/trial) 0 1 2 3 Trial# 0 5 10 15 Time (a) 0 2 4 6 8 Trial# 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ΨT Double pendulum on a cart Iterative PI (true model, 104 samp/iter) PILCO (1 sample/trial) PDDP (5 samples/trial) Ours (1 sample/trial) 0 2 4 6 8 Trial# 0 50 100 150 200 250 300 350 Time (b) Figure 1: Comparison in terms of sample efficiency and computational efficiency for (a) cart-pole and (b) double pendulum on a cart swing-up tasks. Left subfigures show the terminal desirability ΨT (for PILCO and PDDP, ΨT is computed using terminal state costs) at each trial. Right subfigures show computational time (in minute) at each trial. 1 2 3 4 5 6 8 7 (a) Task# 1 2 3 4 5 6 7 8 ΨT 0 0.2 0.4 0.6 0.8 1 1.2 Independent controller (1 samp/trial, 3 trials) Composite controller (no sampling) (b) Figure 2: Resutls for the PUMA-560 tasks. (a) 8 tasks tested in this experiment. Each number indicates a corresponding target posture. (b) Comparison of the controllers learned independently from trials and the composite controllers without sampling. Each composite controller is obtained (18) from 7 other independent controllers learned from trials. 5 Conclusion and Discussion We presented an iterative learning control framework that can find optimal controllers under uncertain dynamics using very small number of samples. This approach is closely related to the family of path integral (PI) control algorithms. Our method is based on a forward-backward optimization scheme, which differs significantly from current PI-related approaches. Moreover, it combines the attractive characteristics of probabilistic model-based reinforcement learning and linearly solvable optimal control theory. These characteristics include sample efficiency, optimality and generalizability. By iteratively updating the control laws based on probabilistic representation of the learned dynamics, our method demonstrated encouraging performance compared to the state-ofthe-art model-based methods. In addition, our method showed promising potential in performing multi-task control based on the compositionality of learned controllers. Besides the assumed structural constraint between control cost weight and uncertainty of the passive dynamics, the major limitation is that we have not taken into account the uncertainty in the control matrix G. Future work will focus on further generalization of this framework and applications to real systems. Acknowledgments This research is supported by NSF NRI-1426945. 8 References [1] D.P. Bertsekas and J.N. Tsitsiklis. Neuro-dynamic programming (optimization and neural computation series, 3). Athena Scientific, 7:15–23, 1996. [2] A.G. Barto, W. Powell, J. Si, and D.C. Wunsch. Handbook of learning and approximate dynamic programming. 2004. [3] W.H. Fleming. Exit probabilities and optimal stochastic control. Applied Math. Optim, 9:329–346, 1971. [4] W. H. Fleming and H. M. Soner. Controlled Markov processes and viscosity solutions. Applications of mathematics. Springer, New York, 1st edition, 1993. [5] H. J. Kappen. Linear theory for control of nonlinear stochastic systems. Phys Rev Lett, 95:200–201, 2005. [6] H. J. Kappen. Path integrals and symmetry breaking for optimal control theory. Journal of Statistical Mechanics: Theory and Experiment, 11:P11011, 2005. [7] H. J. Kappen. An introduction to stochastic control theory, path integrals and reinforcement learning. AIP Conference Proceedings, 887(1), 2007. [8] S. Thijssen and H. J. Kappen. Path integral control and state-dependent feedback. Phys. Rev. E, 91:032104, Mar 2015. [9] E. Todorov. Efficient computation of optimal actions. Proceedings of the national academy of sciences, 106(28):11478–11483, 2009. [10] E. Theodorou, J. Buchli, and S. Schaal. A generalized path integral control approach to reinforcement learning. The Journal of Machine Learning Research, 11:3137–3181, 2010. [11] F. Stulp and O. Sigaud. Path integral policy improvement with covariance matrix adaptation. In Proceedings of the 29th International Conference on Machine Learning (ICML), pages 281–288. ACM, 2012. [12] K. Rawlik, M. Toussaint, and S. Vijayakumar. Path integral control by reproducing kernel hilbert space embedding. In Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, IJCAI’13, pages 1628–1634, 2013. [13] Y. Pan and E. Theodorou. Nonparametric infinite horizon kullback-leibler stochastic control. In 2014 IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL), pages 1–8. IEEE, 2014. [14] V. G´omez, H.J. Kappen, J. Peters, and G. Neumann. Policy search for path integral control. In Machine Learning and Knowledge Discovery in Databases, pages 482–497. Springer, 2014. [15] K. Dvijotham and E Todorov. Linearly solvable optimal control. Reinforcement learning and approximate dynamic programming for feedback control, pages 119–141, 2012. [16] M.P. Deisenroth, G. Neumann, and J. Peters. A survey on policy search for robotics. Foundations and Trends in Robotics, 2(1-2):1–142, 2013. [17] M. Deisenroth, D. Fox, and C. Rasmussen. Gaussian processes for data-efficient learning in robotics and control. IEEE Transsactions on Pattern Analysis and Machine Intelligence, 27:75–90, 2015. [18] E. Theodorou and E. Todorov. Relative entropy and free energy dualities: Connections to path integral and kl control. In 51st IEEE Conference on Decision and Control, pages 1466–1473, 2012. [19] Y. Pan and E. Theodorou. Probabilistic differential dynamic programming. In Advances in Neural Information Processing Systems (NIPS), pages 1907–1915, 2014. [20] S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems (NIPS), pages 1071–1079, 2014. [21] S. Levine and V. Koltun. Learning complex neural network policies with trajectory optimization. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 829–837, 2014. [22] J. Schulman, S. Levine, P. Moritz, M. I. Jordan, and P. Abbeel. Trust region policy optimization. arXiv preprint arXiv:1502.05477, 2015. [23] P. Hennig. Optimal reinforcement learning for gaussian systems. In Advances in Neural Information Processing Systems (NIPS), pages 325–333, 2011. [24] J. Quinonero Candela, A. Girard, J. Larsen, and C. E. Rasmussen. Propagation of uncertainty in bayesian kernel models-application to multiple-step ahead forecasting. In IEEE International Conference on Acoustics, Speech, and Signal Processing, 2003. [25] C.K.I Williams and C.E. Rasmussen. Gaussian processes for machine learning. MIT Press, 2006. [26] E. Todorov. Compositionality of optimal control laws. In Advances in Neural Information Processing Systems (NIPS), pages 1856–1864, 2009. [27] M.P. Deisenroth, P. Englert, J. Peters, and D. Fox. Multi-task policy search for robotics. In Proceedings of 2014 IEEE International Conference on Robotics and Automation (ICRA), 2014. 9 | 2015 | 200 |
5,704 | Mind the Gap: A Generative Approach to Interpretable Feature Selection and Extraction Been Kim Julie Shah Massachusetts Institute of Technology Cambridge, MA 02139 {beenkim, julie a shah}@csail.mit.edu Finale Doshi-Velez Harvard University Cambridge, MA 02138 finale@seas.harvard.edu Abstract We present the Mind the Gap Model (MGM), an approach for interpretable feature extraction and selection. By placing interpretability criteria directly into the model, we allow for the model to both optimize parameters related to interpretability and to directly report a global set of distinguishable dimensions to assist with further data exploration and hypothesis generation. MGM extracts distinguishing features on real-world datasets of animal features, recipes ingredients, and disease co-occurrence. It also maintains or improves performance when compared to related approaches. We perform a user study with domain experts to show the MGM’s ability to help with dataset exploration. 1 Introduction Not only are our data growing in volume and dimensionality, but the understanding that we wish to gain from them is increasingly sophisticated. For example, an educator might wish to know what features characterize different clusters of assignments to provide in-class feedback tailored to each student’s needs. A clinical researcher might apply a clustering algorithm to his patient cohort, and then wish to understand what sets of symptoms distinguish clusters to assist in performing a differential diagnosis. More broadly, researchers often perform clustering as a tool for data exploration and hypothesis generation. In these situations, the domain expert’s goal is to understand what features characterize a cluster, and what features distinguish between clusters. Objectives such as data exploration present unique challenges and opportunities for problems in unsupervised learning. While in more typical scenarios, the discovered latent structures are simply required for some downstream task—such as features for a supervised prediction problem—in data exploration, the model must provide information to a domain expert in a form that they can readily interpret. It is not sufficient to simply list what observations are part of which cluster; one must also be able to explain why the data partition in that particular way. These explanations must necessarily be succinct, as people are limited in the number of cognitive entities that they can process at one time [1]. The de-facto standard for summarizing clusters (and other latent factor representations) is to list the most probable features of each factor. For example, top-N word lists are the de-facto standard for presenting topics from topic models [2]; principle component vectors in PCA are usually described by a list of dimensions with the largest magnitude values for the components with the largest magnitude eigenvalues. Sparsity-inducing versions of these models [3, 4, 5, 6] make this goal more explicit by trying to limit the number of non-zero values in each factor. Other works make these descriptions more intuitive by deriving disjunctive normal form (DNF) expressions for each cluster [7] or learning a set of important features and examples that characterizes each cluster [8]. While these approaches might effectively characterize each cluster, they do not provide information about 1 what distinguishes clusters from each other. Understanding these differences is important in many situations—such when performing a differential diagnosis and computing relative risks [9, 10]. Techniques that combine variable selection and clustering assist in finding dimensions that distinguish—rather than simply characterize—the clusters [11, 12]. Variable extraction methods, such as PCA, project the data into a smaller number of dimensions and perform clustering there. In contrast, variable selection methods choose a small number of dimensions to retain. Within variable selection approaches, filter methods (e.g. [13, 14, 15]) first select important dimensions and then cluster based on those. Wrapper methods (e.g. [16]) iterate between selecting dimensions and clustering to maximize a clustering objective. Embedded methods (e.g. [17, 18, 19]) combine variable selection and clustering into one objective. All of these approaches identify a small subset of dimensions that can be used to form a clustering that is as good as (or better than) using all the dimensions. A primary motivation for identifying this small subset is that one can then accurately cluster future data with many fewer measurements per observation. However, identifying a minimal set of distinguishing dimensions is the opposite of what is required in data exploration and hypothesis generation tasks. Here, the researcher desires a comprehensive set of distinguishing dimensions to better understand the important patterns in the data. In this work, we present a generative approach for discovering a global set of distinguishable dimensions when clustering high-dimensional data. Our goal is to find a comprehensive set of distinguishing dimensions to assist with further data exploration and hypothesis generation, rather than a few dimensions that will distinguish the clusters. We use an embedded approach that incorporates interpretability criteria directly into the model. First, we use a logic-based feature extraction technique to consolidate dimensions into easily-interpreted groups. Second, we define important groups as ones having multi-modal parameter values—that is, groups that have gap in their parameter values across clusters. By building these human-oriented interpretability criteria directly into the model, we can easily report back what an extracted set of features means (by its logical formula) and what sets of features distinguish one cluster from another without any ad-hoc post-hoc analysis. 2 Model We consider a data-set {wnd} with N observations and D binary dimensions. Our goal is to decompose these N observations into K clusters while simulateneously returning a comprehensive list of what sets of dimensions d are important for distinguishing between the clusters. MGM has two core elements which perform interpretable feature extraction and selection. At the feature extraction stage, features are grouped together by logical formulas, which are easily interpreted by people [20, 21], allowing some dimensionality reduction while maintaining interpretability. Next, we select features for which there is a large separation—or a gap—in parameter values. From personal communication with domain experts across several domains, we observed that separation—rather than simply variation—is often as aspect of interest as it provides an unambiguous way to discriminate between clusters. We focus on binary-valued data. Our feature extraction step involves consolidating dimensions into groups. We posit that there an infinite number of groups g, and a multinomial latent variable ld that indicates the group to which dimension d belongs. Each group g is characterized by a latent variable fg which contains the formula associated with the group g. In this work, we only consider the formulas fg = or, fg = and and constrain each dimension to belong to only one group. Simple Boolean operations like or and and are easy to interpret by people. Requiring each dimension to be part of only one group avoid having to solve a (possibly NP-complete) satisfiability problem as part of the generative procedure. Feature selection is performed through a binary latent variable yg which indicates whether each group g is important for distinguishing clusters. If a group is important (yg = 1), then the probability βgk that group g is present in an observation from cluster k is drawn from a bi-modal distribution (modeled as a mixture of Beta distributions). If the group is unimportant (yg = 0), the the probability βgk is drawn from a uni-modal distribution. While a uni-modal distribution with high variance can also produce both low and high values for the probability βgk, it will also produce intermediate values. However, draws from the bi-modal distribution will have a clear gap between low and high values. This definition of important distributions is distinct from the criterion in [17], where 2 σp γg yg πg tgk βgk fg ld πl αi, βi zn πz αz πf ing wnd C N D G G D K (a) Mind the gap graphical model (b) Cartoon describing emissions from important dimensions. In our case, we define importance by separability—or a gap—rather than simply variance. Thus, we distinguish panel (1) from (2) and (3), while [17] distinguishes between (2) and (3). Figure 1: Graphical model of MGM, Cartoon of distinguishing dimensions. parameters for important distributions were selected from a uni-modal distribution and parameters for unimportant dimensions were shared across all clusters. Figure 1b illustrates this difference. Generative Model The graphical model for MGM is shown in Figure 1. We assume that there are an infinite number of possible groups g, each with an associated formula fg. Each dimension d belongs to a group g, as indicated by ld. We also posit that there are a set of latent clusters k, each with emission characteristics described below. The latent variable βgk corresponds to the probability that group g is present in the data, and is drawn with a uni-modal or bi-modal distribution governed by the parameters {γg, yg, tgk}. Each observation n belongs to exactly one latent cluster k, indicated by zn. The binary variable ing indicates whether group g is present in observation n. Finally, the probability of some observation wnd = 1 depends on whether its associated group g (indicated by ld) is present in the data (indicated by ing) and the associated formula fg. The complete generative process first involves assigning dimensions d to groups, choosing the formula fg associated with each group, and deciding whether each group g is important: πl ∼DP(αl) πf ∼Dirichlet(αf) ld ∼Multinomial(πl) yg ∼Bernoulli(πg) γg ∼Beta(σ1, σ2) fg ∼Multinomial(πf) where DP is the Dirichlet process. Thus, there are an infinite number of potential groups; however, given a finite number of dimensions, only a finite number of groups can be present in the data. Next, emission parameters are selected for each cluster k: If(yg = 0) βgk ∼Beta(αu, βu) Else : tgk ∼Bernoulli(γg) If : tgk = 0 : βgk ∼Beta(αb, βb) Else : βgk ∼Beta(αt, βt) Finally, observations wnd are generated: πz ∼Dirichlet(αz) zn ∼Multinomial(πz) ing ∼Bernoulli(βgk) If : ing = 0 : {wnd|ld = g} = 0 Else : {wnd|ld = g} ∼Formulafg The above equations indicate that if ing = 0, that is, group g is not present in the observation, then in that observation, all wnd such that ld = g are also absent (i.e. wnd = 0). If the group g is present (ing = 1) and the group formula fg = and, then all the dimensions associated with that dimension are present (i.e. wnd = 1). Finally, if the group g is present (ing = 1) and the group formula fg = or, then we sample the associated wnd from all possible configurations of wnd such that at least one wnd = 1. 3 Figure 2: Motivating examples with cartoons from three clusters (vacation, student, winter) and the distinguishable dimensions discovered by the MGM. Let θ = {yg, γg, tgk, βgk, ld, fg, zn, ing} be the set of variables in the MGM. Given a set of observations {wnd}, the posterior over θ factors as Pr({yg, γg, tgk, βgk, ld, fg, zn, ing}|{wnd}) = G Y g p(yg|ρ)p(γg|σ)p(fg|α)· [ K Y k p(tgk|γg)p(βgk|tgk, yg)]p(κ|α) D Y d p(ld|κ)p(π|α) N Y n p(zn|π) N Y n G Y g p(ing|β, zn) N Y n D Y d p(wnd|ing, f, ld)] (1) Most of these terms are straight-forward to compute given the generative model. The likelihood term p(wnd|ing, f, ld) can be expanded as p(wn·|ing, f, ld) = Y d,g [(0)1(ing=1)(1−SAT(g;wn·,fg,ld))(1)1(ing=1)SAT(g;wn·,fg,ld) (0)1(ing=0)1(ld=g)1(wnd=1)(1)1(ing=0)1(ld=g)1(wnd=0) (2) where we use wn· to indicate the vector of measurements associated with observation n. The function SAT(g; wn·, fg, ld) indicates whether the associated formula, fg is satisfied, where fg involves d dimensions of wn· that belong to group ld. Motivating Example Here we provide an example to illustrate the properties of MGM on a synthetic data-set of 400 cartoon faces. Each cartoon face can be described by eight features: earmuffs, scarf, hat, sunglasses, pencil, silly glasses, face color, mouth shape (see Figure 2). The cartoon faces belong to three clusters. Winter faces tend to have earmuffs and scarves. Student faces tend to have silly glasses and pencils. Vacation faces tend to have hats and sunglasses. Face color does not distinguish between the different clusters. The MGM discovers four distinguishing sets of features: the vacation cluster has hat or sunglasses, the winter cluster has earmuffs or scarfs or smile, and the student cluster has silly glasses as well as pencils. Face color does not appear because it does not distinguish between the groups. However, we do identify both hats and sunglasses as important, even though only one of those two features is important for distinguishing the vacation cluster from the other clusters: our model aims to find a comprehensive list the distinguishing features for a human expert to later review for interesting patterns, not a minimal subset for classification. By consolidating features—such as (sunglasses or hat)—we still provide a compact summary of the ways in which the clusters can be distinguished. 4 3 Inference Solving Equation 1 is computationally intractable. We use variational approach to approximate the true posterior distribution p(yg, γg, tgk, βgk, ld, fg, zn, ing|{wnd}) with a factored distribution: qηg(yg) ∼Bernoulli(ηg) qλgk(tgk) ∼Bernoulli(λgk) qℓg(γg) ∼Beta(ℓg1, ℓg2) qφgk(βgk) ∼Beta(φgk1, φgk2) qτn(π) ∼Dirichlet(τ) qνn(zn) ∼Multinomial(νn) qing(ing) ∼Bernoulli(ong) qcd(ld) ∼Multinomial(cd) qeg(fg) ∼Bernoulli(eg) where in addition we use a weak-limit approximation to the Dirichlet process to approximate the distribution over group assignments ld. Minimizing the Kullback-Leibler divergence between the true posterior p(θ|{wnd}) and the variational distribution q(θ) corresponds to maximizing the evidence lower bound (the ELBO) Eq[log p(θ|{wnd})] −H(q) where H(q) is the entropy. Because of the conjugate exponential family terms, most of the expressions in the ELBO are straightforward to compute. The most challenging part is determining how to optimize the variational terms q(ld), q(ing), and q(fg) that are involved in the likelihood in Equation 2. Here, we first relax our generative process of or to have it correspond to independently sampling each wnd with some probability s. Thus, Equation 2 becomes p(wn·|ing, fg, ld) = Y d,g [(0)1(fg=and)1(ld=g)1(ing=1)1(wnd=0)(1)1(fg=and)1(ld=g)1(ing=1)1(wnd=1) (1 −s)1(fg=or)1(ld=g)1(ing=1)1(wnd=0)(s)1(fg=or)1(ld=g)1(ing=1)1(wnd=1) (0)1(ing=0)1(ld=g)1(wnd=1)(1)1(ing=0)1(ld=g)1(wnd=0) (3) With this relaxation, the expression for the entire evidence lower bound is straight-forward to compute. (The full derivations are given in the supplementary materials.) However, the logical formulas in Equation 3 still impose hard, combinatorial constraints on settings of the variables {ing, fg, ld} that are associated with the logical formulas. Specifically, if the values for the formula choice {fg} and group assignments {ld} are fixed, then the value of ing is also fixed because the feature extraction step is deterministic. Once ing is fixed, however, the relationships between all the other variables are conjugate in the exponential family. Therefore, we alternate our inference between the extraction-related variables {ing, fg, ld} and the selection-related variables {yg, γg, tgk, βgk, zn}. Feature Extraction We consider only degenerate distributions q(ing), q(fg), q(ld) that put mass on only one setting of the variables. Note that this is still a valid setting for the variational inference as fixing values for ing, fg, and ld, which corresponds to a degenerate Beta or Dirichlet prior, only means that we are further limiting our set of variational distributions. Not fully optimizing a lower bound due to this constraint can only lower the lower bound. We perform an agglomerative procedure for assigning dimensions to groups. We begin our search with each dimension d assigned to its own formula ld = d, fd = or. Merges of groups are explored using a combination of data-driven and random proposals, in which we also explore changing the formula assignment of the group. For the data-driven proposals, we use an initial run of a vanilla k-means clustering algorithm to test whether combining two more groups results in an extracted feature that has high variance. At each iteration, we compute the ELBO for non-overlapping subsets of these proposals and choose the agglomeration with the highest ELBO. Feature Selection Given a particular setting of the extraction variables {ing, fg, ld}, the remaining variables {yg, γg, tgk, βgk, zn} are all in the exponential family. The corresponding posterior distributions q(yg), q(γg), q(tgk), q(βgk), and q(zn) can be optimized via coordinate ascent [22]. 4 Results We applied our MGM to both standard benchmark and more interesting data sets. In all cases, we ran 5 restarts of the MGM. Inference was run for 40 iterations or until the ELBO improved by less than 0.1 relative to the previous iteration. Twenty possible merges were explored in each iteration; 5 MGM Kmeans HFS(G) Law DPM HFS(L) Cc Faces 0.59 (13) 0.46 (4) 0.627 (16) 0.454 (4) 0.481 (12) 0.569 (12) 0.547 (4) Digits 0.53 (13) 0.45 (13) 0.258 (13) 0.254 (6) 0.176 (5) 0.354 (11) 0.364 (10) Table 1: Mutual information and number of clusters (in parentheses) for UCI benchmarks. The mutual information is with respect to the true class labels (higher is better). Performance values for HFS(G), Law, DPM, HFS(L), and CC are taken from [17]. Figure 3: Results on real-world datasets: animal dataset (left), recipe dataset (middle) and disease dataset (right). Each row represents an important feature. Lighter boxes indicate that the feature is likely to be present in the cluster, while darker boxes are unlikely to be present. each merge exploration involved combining two existing groups into a new group. If we failed to accept our data-driven candidate merge proposals more than three times within an iteration, we switched to random proposals for the remaining proposals. We swept over the number of clusters from K=4 to K=16 and reported the results with the highest ELBO. 4.1 Benchmark Problems: MGM discriminates classes We compared the classification performance of our clustering algorithms on several UCI benchmark problems [23]. The digits data set consists of 11000 16×16 grayscale images, 1100 for each digit. The faces data set consists of 640 32×30 images of 20 people, with 32 images of each person from various angles. In both cases, we binarized the images, setting the value to 0 if the value was less than 128, 1 if the value was greater than 128. These two data-sets are chosen as they are discrete and we have the same versions for comparison to results cited in [17]. The mutual information between our discovered clusters and the true classes in the data sets is shown in Table 1. A higher mutual information between our clustering and known labels is one way to objectively show that our clusters correspond to groups that humans find interesting (i.e. the human-provided classification labels). MGM is second only to HFS(G) in the Faces dataset (second only to HFS(G)) and the highest scoring model in the Digits dataset. It always outperforms k-means. 4.2 Demonstrating Interpretability: Real-world Applications Our quantitative results on the benchmark datasets show that the structure recovered by our approach is consistent with classes defined by human labelers better than or at the level of other clustering approaches. However, the dimensions in the image benchmarks do not have much associated meaning, and the our approach was designed for clustering, not classification. Here, we demonstrate the qualitative advantages of our approach on three more interesting datasets. Animals The animals data set [24] consists of 21 biological and ecological properties of 101 animals (such as “has wings” or “has teeth”). We are also provided class labels such as insects, mammals, and birds. The result of our MGM is shown in Figure 3. Each row is a distinguishable feature; each column is a cluster. Lighter color boxes in Figure 3 indicate that the feature is likely to be present in the cluster, while darker color boxes indicate that the feature is unlikely to be present in the cluster. Below each cluster, a few animals that belong to that cluster are listed. 6 We first note that, as desired, our model selects features that have large variation in their probabilities across the clusters (rows in Figure 3). Thus, it is straight-forward to read what makes each column different from the others: the mammals in the third column do not lay eggs; the insects in the fifth column are toothless and invertebrates (and therefore have no tails). They are also rarely predators. Unlike the land animals, many of the water animals in columns one and two do not breathe. Recipes The recipes data set consists of ingredients from recipes taken from the computer cooking contest1. There are 56 recipes, with 147 total ingredients. The recipes fall into four categories: pasta, chili, brownies or punch. We seek to find ingredients and groups of ingredients that can distinguish different types of recipes. Note: The names for each cluster have been filled in after the analysis, based on the class label of the majority of the observations that were grouped into that cluster. The MGM distills the 147 ingredients into only 3 important features. The first extracted feature contains several spices, which are present in pasta, brownies, and chili but not in punch. Punch is also distinguished from the other clusters by its lack of basic spices such as salt and pepper (the second extracted feature). The third extracted feature contains a number of savory cooking ingredients such as oil, garlic, and shallots. These are common in the pasta and chili clusters but uncommon in the punch and brownie clusters. Diseases Finally, we consider a data set of patients with autism spectrum disorder (ASD) accumulated over the first 15 years of life [25]. ASDs are a complex disease that is often associated with co-occurring conditions such as seizures and developmental delays. As most patients have very few diagnoses, we limited our analysis to the 184 patients with at least 200 diagnoses and the 58 diagnoses that occurred in at least 5% of the patients. We binarized the count data to 0-1 values. Our model reduces these 58 dimensions to 9 important sets of features. The extracted features had many more dimensions than in the examples, so we only list two features from each group and provide the total number in parenthesis. Several of the groups of the extracted variables—which did not use any auxiliary information—are similar to those from [25]. In particular, [25] report clusters of patients with epilepsy and cerebral palsy, patients with psychiatric disorders, and patients with gastrointestinal disorders. Using our representation, we can easily see that there appears to be one group of sick patients (cluster 1) for whom all features are likely. We can also see what features distinguish clusters 0, 2, and 3 from each other by which ones are unlikely to be present. 4.3 Verifying interpretability: Human subject experiment We conducted a pilot study to gather more qualitative evaluation of the MGM. We first divided the ASD data into three datasets with random disjoint subsets of approximately 20 dimensions each. For each of these subsets, we prepared the data in three formats: raw patient data (a list of symptoms), clustered results (centroids) from K-means, and clustered results with the MGM with distinguishable sets of features. Both the clustered results were presented as figures such as figure 3 and the raw data were presented in a spreadsheet. Three domain experts were then tasked to explore the different data subsets in each format (so each participant saw all formats and all data subsets) and produce a 2-3 sentence executive summary of each. The different conditions serve as reference points for the subjects to give more qualitative feedback about the MGM. All subjects reported that the raw data—even with a “small” number of 20 dimensions—was impossible to summarize in a 5 minute period. Subjects also reported that the aggregation of states in the MGM helped them summarize the data faster rather than having to aggregate manually. While none of them explicitly indicated they noticed that all the rows of the MGM were relevant, they did report that it was easier to find the differences. One strictly preferred the MGM over the options, while another found the MGM easier for making up a narrative but was overall satisfied with both the MGM and the K-means clustering. One subject appreciated the succinctness of the MGM but was concerned that “it may lose some information”. This final comment motivates future work on structured priors for on what logical formulas should be allowed or likely; future user studies should study the effects of the feature extraction and selection separately. Finally, a qualitative review of the summaries produced found similar but slightly more compact organization of notes in the MGM compared to the K-means model. 1Computer Cooking Contest: http://liris.cnrs.fr/ccc/ccc2014/doku.php 7 5 Discussion and Related Work MGM combines extractive and selective approaches for finding a small set of distinguishable dimensions when performing unsupervised learning on high-dimensional data sets. Rather than rely on criteria that use statistical measures of variation, and then performing additional post-processing to interpret the results, we build interpretable criteria directly into the model. Our logic-based feature extraction step allows us to find natural groupings of dimensions such as (backbone or tail or toothless) in the animal data and (salt or pepper or cream) in the recipe data. Defining an interesting dimension as one whose parameters are drawn from a multi-modal distribution helps us recover groups like pasta and punch. Providing such comprehensive lists of distinguishing dimensions assists in the data exploration and hypothesis generation process. Similarly, providing lists of dimensions that have been consolidated in one extraction aids the human discovery process of why those dimensions might be a meaningful group. Closest to our work are feature selection approaches such as [17, 18, 19], which also use a mixture of beta-distributions to identify feature types. In particular, [17] uses a similar hierarchy of Beta and Bernoulli priors to identify important dimensions. They carefully choose the priors so that some dimensions can be globally important, while other dimensions can be locally important. The parameters for important dimensions are chosen IID from a Gaussian distribution, while values for all unimportant dimensions come from the same background distribution. Our approach draws parameters for important dimensions from distributions with multiple modes— while unimportant dimensions are drawn from a uni-modal distribution. Thus, our model is more expressive than approaches in which all unimportant dimension values are drawn from the same distribution. It captures the idea that not all variation is important; clusters can vary in their emission parameters for a particular dimension and that variation still might not be interesting. Specifically, an important dimension is one where there is a gap between parameter values. Our logic-based feature extraction step collapses the dimensionality further while retaining interpretability. More broadly, there are many other lines of work that focus on creating latent variable models based on diversity or differences. Methods for inducing diversity, such as determinantal point processes [26], have been used to find diverse solutions on applications ranging from detecting objects in videos [27], topic modeling [28], and variable selection [29]. In these cases, the goal is to avoid finding multiple very similar optima; while the generated solutions are different, the model itself does not provide descriptions of what distinguishes one solution from the rest. Moreover, there may be situations in which forcing solutions to be very different might not make sense: for example, when clustering recipes, it may be very sensible for the ingredient “salt” to be a common feature of all clusters; likewise when clustering patients from an autism cohort, one would expect all patients to have some kind of developmental disorder. Finally, other approaches focus on building models in which factors describe what distinguishes them from some baseline. For example, [30] builds a topic model in which each topic is described by the difference from some baseline distribution. Contrastive learning [31] focuses on finding the directions that are most distinguish background data from foreground data. Max-margin approaches to topic models [32] try to find topics that can best assist in distinguishing between classes, but are not necessarily readily interpretable themselves. 6 Conclusions and Future Work We presented MGM, an approach for interpretable feature extraction and selection. By incorporating interpretability-based criteria directly into the model design, we found key dimensions that distinguished clusters of animals, recipes, and patients. While this work focused on the clustering of binary data, these ideas could also be applied to mixed and multiple membership models. Similarly, notions of interestingness based on a gap could be applied to categorical and continuous data. It also would be interesting to consider more expressive extracted features, such as more complex logical formulas. Finally, while we learned feature extractions in a completely unsupervised fashion, our generative approach also allows one to flexibly incorporate domain knowledge about possible group memberships into the priors. 8 References [1] G. A. Miller, “The magical number seven, plus or minus two: Some limits on our capacity for processing information,” The Psychological Review, pp. 81–97, March 1956. [2] D. M. Blei, A. Y. Ng, and M. I. Jordan, “Latent Dirichlet allocation,” JMLR, pp. 3:993–1022, 2003. [3] H. Zou, T. Hastie, and R. Tibshirani, “Sparse principal component analysis,” Journal of Computational and Graphical Statistics, vol. 15, p. 2006, 2004. [4] K. Than and T. B. Ho, “Fully sparse topic models,” in ECML-PKDD, pp. 490–505, 2012. [5] S. Williamson, C. Wang, K. Heller, and D. Blei, “The ibp compound dirichlet process and its application to focused topic modeling,” ICML, 2010. [6] E. Elhamifar and R. Vidal, “Sparse subspace clustering: Algorithm, theory, and applications,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 35, no. 11, pp. 2765–2781, 2013. [7] R. Agrawal, J. Gehrke, D. Gunopulos, and P. Raghavan, “Automatic subspace clustering of high dimensional data for data mining applications,” SIGMOD Rec., vol. 27, pp. 94–105, June 1998. [8] B. Kim, C. Rudin, and J. A. Shah, “The Bayesian Case Model: A generative approach for case-based reasoning and prototype classification,” in NIPS, 2014. [9] R. K, “Differential diagnosis in primary care,” JAMA, vol. 307, no. 14, pp. 1533–1534, 2012. [10] Z. J and Y. KF, “What’s the relative risk?: A method of correcting the odds ratio in cohort studies of common outcomes,” JAMA, vol. 280, no. 19, pp. 1690–1691, 1998. [11] S. Alelyani, J. Tang, and H. Liu, “Feature selection for clustering: A review.,” Data Clustering: Algorithms and Applications, vol. 29, 2013. [12] S. Gu´erif, “Unsupervised variable selection: when random rankings sound as irrelevancy.,” in FSDM, 2008. [13] P. Mitra, C. Murthy, and S. K. Pal, “Unsupervised feature selection using feature similarity,” IEEE transactions on pattern analysis and machine intelligence, vol. 24, no. 3, pp. 301–312, 2002. [14] M. Dash and H. Liu, “Feature selection for clustering,” in KDD: Current Issues and New Applications, pp. 110–121, 2000. [15] K. Tsuda, M. Kawanabe, and K.-R. Mller, “Clustering with the fisher score,” in NIPS, 2003. [16] J. G. Dy and C. E. Brodley, “Feature selection for unsupervised learning,” JMLR, pp. 5:845–889, 2004. [17] Y. Guan, J. G. Dy, and M. I. Jordan, “A unified probabilistic model for global and local unsupervised feature selection.,” in ICML, pp. 1073–1080, 2011. [18] W. Fan and N. Bouguila, “Online learning of a dirichlet process mixture of generalized dirichlet distributions for simultaneous clustering and localized feature selection.,” in ACML, pp. 113–128, 2012. [19] G. Yu, R. Huang, and Z. Wang, “Document clustering via dirichlet process mixture model with feature selection,” in KDD, pp. 763–772, ACM, 2010. [20] A. A. Freitas, “Comprehensible classification models: a position paper,” ACM SIGKDD Explorations Newsletter, 2014. [21] G. De’ath and K. E. Fabricius, “Classification and regression trees: a powerful yet simple technique for ecological data analysis,” Ecology, vol. 81, no. 11, pp. 3178–3192, 2000. [22] M. J. Wainwright and M. I. Jordan, “Graphical models, exponential families, and variational inference,” Foundations and Trends in Machine Learning, vol. 1, no. 1-2, pp. 1–305, 2008. [23] M. Lichman, “UCI machine learning repository,” 2013. [24] C. Kemp and J. B. Tenenbaum, “The discovery of structural form,” PNAS, 2008. [25] F. Doshi-Velez, Y. Ge, and I. Kohane, “Comorbidity clusters in autism spectrum disorders: an electronic health record time-series analysis,” Pediatrics, vol. 133, no. 1, pp. e54–e63, 2014. [26] A. Kulesza, Learning with Determinantal Point Processes. PhD thesis, University of Pennsylvania, 2012. [27] A. Kulesza and B. Taskar, “Structured determinantal point processes,” in NIPS, 2010. [28] J. Y. Zou and R. P. Adams, “Priors for diversity in generative latent variable models,” in NIPS, 2012. [29] N. K. Batmanghelich, G. Quon, A. Kulesza, M. Kellis, P. Golland, and L. Bornn, “Diversifying sparsity using variational determinantal point processes,” CoRR, 2014. [30] J. Eisenstein, A. Ahmed, and E. P. Xing, “Sparse additive generative models of text,” ICML, 2011. [31] J. Y. Zou, D. J. Hsu, D. C. Parkes, and R. P. Adams, “Contrastive learning using spectral methods,” in NIPS, 2013. [32] J. Zhu, A. Ahmed, and E. P. Xing, “Medlda: maximum margin supervised topic models for regression and classification,” in ICML, pp. 1257–1264, ACM, 2009. 9 | 2015 | 201 |
5,705 | Regularization Path of Cross-Validation Error Lower Bounds Atsushi Shibagaki, Yoshiki Suzuki, Masayuki Karasuyama, and Ichiro Takeuchi Nagoya Institute of Technology Nagoya, 466-8555, Japan {shibagaki.a.mllab.nit,suzuki.mllab.nit}@gmail.com {karasuyama,takeuchi.ichiro}@nitech.ac.jp Abstract Careful tuning of a regularization parameter is indispensable in many machine learning tasks because it has a significant impact on generalization performances. Nevertheless, current practice of regularization parameter tuning is more of an art than a science, e.g., it is hard to tell how many grid-points would be needed in cross-validation (CV) for obtaining a solution with sufficiently small CV error. In this paper we propose a novel framework for computing a lower bound of the CV errors as a function of the regularization parameter, which we call regularization path of CV error lower bounds. The proposed framework can be used for providing a theoretical approximation guarantee on a set of solutions in the sense that how far the CV error of the current best solution could be away from best possible CV error in the entire range of the regularization parameters. Our numerical experiments demonstrate that a theoretically guaranteed choice of a regularization parameter in the above sense is possible with reasonable computational costs. 1 Introduction Many machine learning tasks involve careful tuning of a regularization parameter that controls the balance between an empirical loss term and a regularization term. A regularization parameter is usually selected by comparing the cross-validation (CV) errors at several different regularization parameters. Although its choice has a significant impact on the generalization performances, the current practice is still more of an art than a science. For example, in commonly used grid-search, it is hard to tell how many grid points we should search over for obtaining sufficiently small CV error. In this paper we introduce a novel framework for a class of regularized binary classification problems that can compute a regularization path of CV error lower bounds. For an ε ∈[0, 1], we define εapproximate regularization parameters to be a set of regularization parameters such that the CV error of the solution at the regularization parameter is guaranteed to be no greater by ε than the best possible CV error in the entire range of regularization parameters. Given a set of solutions obtained, for example, by grid-search, the proposed framework allows us to provide a theoretical guarantee of the current best solution by explicitly quantifying its approximation level ε in the above sense. Furthermore, when a desired approximation level ε is specified, the proposed framework can be used for efficiently finding one of the ε-approximate regularization parameters. The proposed framework is built on a novel CV error lower bound represented as a function of the regularization parameter, and this is why we call it as a regularization path of CV error lower bounds. Our CV error lower bound can be computed by only using a finite number of solutions obtained by arbitrary algorithms. It is thus easy to apply our framework to common regularization parameter tuning strategies such as grid-search or Bayesian optimization. Furthermore, the proposed framework can be used not only with exact optimal solutions but also with sufficiently good approximate solu1 Figure 1: An illustration of the proposed framework. One of our algorithms presented in §4 automatically selected 39 regularization parameter values in [10−3, 103], and an upper bound of the validation error for each of them is obtained by solving an optimization problem approximately. Among those 39 values, the one with the smallest validation error upper bound (indicated as ⋆at C = 1.368) is guaranteed to be ε(= 0.1) approximate regularization parameter in the sense that the validation error for the regularization parameter is no greater by ε than the smallest possible validation error in the whole interval [10−3, 103]. See §5 for the setup (see also Figure 3 for the results with other options). tions, which is computationally advantageous because completely solving an optimization problem is often much more costly than obtaining a reasonably good approximate solution. Our main contribution in this paper is to show that a theoretically guaranteed choice of a regularization parameter in the above sense is possible with reasonable computational costs. To the best of our knowledge, there is no other existing methods for providing such a theoretical guarantee on CV error that can be used as generally as ours. Figure 1 illustrates the behavior of the algorithm for obtaining ε = 0.1 approximate regularization parameter (see §5 for the setup). Related works Optimal regularization parameter can be found if its exact regularization path can be computed. Exact regularization path has been intensively studied [1, 2], but they are known to be numerically unstable and do not scale well. Furthermore, exact regularization path can be computed only for a limited class of problems whose solutions are written as piecewise-linear functions of the regularization parameter [3]. Our framework is much more efficient and can be applied to wider classes of problems whose exact regularization path cannot be computed. This work was motivated by recent studies on approximate regularization path [4, 5, 6, 7]. These approximate regularization paths have a property that the objective function value at each regularization parameter value is no greater by ε than the optimal objective function value in the entire range of regularization parameters. Although these algorithms are much more stable and efficient than exact ones, for the task of tuning a regularization parameter, our interest is not in objective function values but in CV errors. Our approach is more suitable for regularization parameter tuning tasks in the sense that the approximation quality is guaranteed in terms of CV error. As illustrated in Figure 1, we only compute a finite number of solutions, but still provide approximation guarantee in the whole interval of the regularization parameter. To ensure such a property, we need a novel CV error lower bound that is sufficiently tight and represented as a monotonic function of the regularization parameter. Although several CV error bounds (mostly for leave-one-out CV) of SVM and other similar learning frameworks exist (e.g., [8, 9, 10, 11]), none of them satisfy the above required properties. The idea of our CV error bound is inspired from recent studies on safe screening [12, 13, 14, 15, 16] (see Appendix A for the detail). Furthermore, we emphasize that our contribution is not in presenting a new generalization error bound, but in introducing a practical framework for providing a theoretical guarantee on the choice of a regularization parameter. Although generalization error bounds such as structural risk minimization [17] might be used for a rough tuning of a regularization parameter, they are known to be too loose to use as an alternative to CV (see, e.g., §11 in [18]). We also note that our contribution is not in presenting new method for regularization parameter tuning such as Bayesian optimization [19], random search [20] and gradient-based search [21]. As we demonstrate in experiments, our approach can provide a theoretical approximation guarantee of the regularization parameter selected by these existing methods. 2 Problem Setup We consider linear binary classification problems. Let {(xi, yi) ∈Rd×{−1, 1}}i∈[n] be the training set where n is the size of the training set, d is the input dimension, and [n] := {1, . . . , n}. An independent held-out validation set with size n′ is denoted similarly as {(x′ i, y′ i) ∈Rd × {−1, 1}}i∈[n′]. A linear decision function is written as f(x) = w⊤x, where w ∈Rd is a vector of coefficients, and ⊤represents the transpose. We assume the availability of a held-out validation set only for simplifying the exposition. All the proposed methods presented in this paper can be straightforwardly 2 adapted to a cross-validation setup. Furthermore, the proposed methods can be kernelized if the loss function satisfies a certain condition. In this paper we focus on the following class of regularized convex loss minimization problems: w∗ C := arg min w∈Rd 1 2∥w∥2 + C ! i∈[n] ℓ(yi, w⊤xi), (1) where C > 0 is the regularization parameter, and ∥· ∥is the Euclidean norm. The loss function is denoted as ℓ: {−1, 1} × R →R. We assume that ℓ(·, ·) is convex and subdifferentiable in the 2nd argument. Examples of such loss functions include logistic loss, hinge loss, Huber-hinge loss, etc. For notational convenience, we denote the individual loss as ℓi(w) := ℓ(yi, w⊤xi) for all i ∈[n]. The optimal solution for the regularization parameter C is explicitly denoted as w∗ C. We assume that the regularization parameter is defined in a finite interval [Cℓ, Cu], e.g., Cℓ= 10−3 and Cu = 103 as we did in the experiments. For a solution w ∈Rd, the validation error1 is defined as Ev(w) := 1 n′ ! i∈[n′] I(y′ iw⊤x′ i < 0), (2) where I(·) is the indicator function. In this paper, we consider two problem setups. The first problem setup is, given a set of (either optimal or approximate) solutions w∗ C1, . . . , w∗ CT at T different regularization parameters C1, . . . , CT ∈[Cℓ, Cu], to compute the approximation level ε such that min Ct∈{C1,...,CT } Ev(w∗ Ct) −E∗ v ≤ε, where E∗ v := min C∈[Cl,Cu]Ev(w∗ C), (3) by which we can find how accurate our search (grid-search, typically) is in a sense of the deviation of the achieved validation error from the true minimum in the range, i.e., E∗ v. The second problem setup is, given the approximation level ε, to find an ε-approximate regularization parameter within an interval C ∈[Cl, Cu], which is defined as an element of the following set C(ε) := " C ∈[Cl, Cu] ### Ev(w∗ C) −E∗ v ≤ε $ . Our goal in this second setup is to derive an efficient exploration procedure which achieves the specified validation approximation level ε. These two problem setups are both common scenarios in practical data analysis, and can be solved by using our proposed framework for computing a path of validation error lower bounds. 3 Validation error lower bounds as a function of regularization parameter In this section, we derive a validation error lower bound which is represented as a function of the regularization parameter C. Our basic idea is to compute a lower and an upper bound of the inner product score w∗⊤ C x′ i for each validation input x′ i, i ∈[n′], as a function of the regularization parameter C. For computing the bounds of w∗⊤ C x′ i, we use a solution (either optimal or approximate) for a different regularization parameter ˜C ̸= C. 3.1 Score bounds We first describe how to obtain a lower and an upper bound of inner product score w∗⊤ C x′ i based on an approximate solution ˆw ˜ C at a different regularization parameter ˜C ̸= C. Lemma 1. Let ˆw ˜ C be an approximate solution of the problem (1) for a regularization parameter value ˜C and ξi( ˆwC) be a subgradient of ℓi at w = ˆwC such that a subgradient of the objective function is g( ˆw ˜ C) := ˆwC + ˜C ! i∈[n] ξi( ˆwC). (4) 1 For simplicity, we regard a validation instance whose score is exactly zero, i.e., w⊤x′ i = 0, is correctly classified in (2). Hereafter, we assume that there are no validation instances whose input vector is completely 0, i.e., x′ i = 0, because those instances are always correctly classified according to the definition in (2). 3 Then, for any C > 0, the score w∗⊤ C x′ i, i ∈[n′], satisfies w∗⊤ C x′ i ≥LB(w∗⊤ C x′ i| ˆw ˜ C):= % α( ˆw ˜ C, x′ i) −1 ˜ C (β( ˆw ˜ C, x′ i) + γ(g( ˆw ˜ C), x′ i))C, if C > ˜C, −β( ˆw ˜ C, x′ i) + 1 ˜ C (α( ˆw ˜ C, x′ i) + δ(g( ˆw ˜ C), x′ i))C, if C < ˜C, (5a) w∗⊤ C x′ i ≤UB(w∗⊤ C x′ i| ˆw ˜ C):= % −β( ˆw ˜ C, x′ i) + 1 ˜ C (α( ˆw ˜ C, x′ i) + δ(g( ˆw ˜ C), x′ i))C, if C > ˜C, α( ˆw ˜ C, x′ i) −1 ˜ C (β( ˆw ˜ C, x′ i) + γ(g( ˆw ˜ C), x′ i))C, if C < ˜C, (5b) where α(w∗ ˜ C, x′ i) := 1 2(∥w∗ ˜ C∥∥x′ i∥+ w∗⊤ ˜ C x′ i) ≥0, γ(g( ˆw ˜ C), x′ i) := 1 2(∥g( ˆw ˜ C)∥∥x′ i∥+ g( ˆw ˜ C)⊤x′ i) ≥0, β(w∗ ˜ C, x′ i) := 1 2(∥w∗ ˜ C∥∥x′ i∥−w∗⊤ ˜ C x′ i) ≥0, δ(g( ˆw ˜ C), x′ i) := 1 2(∥g( ˆw ˜ C)∥∥x′ i∥−g(w ˜ C)⊤x′ i) ≥0. The proof is presented in Appendix A. Lemma 1 tells that we have a lower and an upper bound of the score w∗⊤ C x′ i for each validation instance that linearly change with the regularization parameter C. When ˆw ˜ C is optimal, it can be shown that (see Proposition B.24 in [22]) there exists a subgradient such that g( ˆw ˜ C) = 0, meaning that the bounds are tight because γ(g( ˆw ˜ C), x′ i) = δ(g( ˆw ˜ C), x′ i) = 0. Corollary 2. When C = ˜C, the score w∗⊤ ˜ C x′ i, i ∈[n′], for the regularization parameter value ˜C itself satisfies w∗⊤ ˜ C x′ i ≥LB(w∗⊤ ˜ C x′ i| ˆw ˜ C)= ˆw⊤ ˜ Cx′ i−γ(g( ˆw ˜ C), x′ i), w∗⊤ ˜ C x′ i ≤UB(w∗⊤ ˜ C x′ i| ˆw ˜ C)= ˆw⊤ ˜ Cx′ i+δ(g( ˆw ˜ C), x′ i). The results in Corollary 2 are obtained by simply substituting C = ˜C into (5a) and (5b). 3.2 Validation Error Bounds Given a lower and an upper bound of the score of each validation instance, a lower bound of the validation error can be computed by simply using the following facts: y′ i = +1 and UB(w∗⊤ C x′ i| ˆw ˜ C) < 0 ⇒mis-classified, (6a) y′ i = −1 and LB(w∗⊤ C x′ i| ˆw ˜ C) > 0 ⇒mis-classified. (6b) Furthermore, since the bounds in Lemma 1 linearly change with the regularization parameter C, we can identify the interval of C within which the validation instance is guaranteed to be mis-classified. Lemma 3. For a validation instance with y′ i = +1, if ˜C < C < β( ˆw ˜ C, x′ i) α( ˆw ˜ C, x′ i) + δ(g( ˆw ˜ C), x′ i) ˜C or α( ˆw ˜ C, x′ i) β( ˆw ˜ C, x′ i) + γ(g( ˆw ˜ C), x′ i) ˜C < C < ˜C, then the validation instance (x′ i, y′ i) is mis-classified. Similarly, for a validation instance with y′ i = −1, if ˜C < C < α( ˆw ˜ C, x′ i) β( ˆw ˜ C, x′ i) + γ(g( ˆw ˜ C), x′ i) ˜C or β( ˆw ˜ C, x′ i) α( ˆw ˜ C, x′ i) + δ(g( ˆw ˜ C), x′ i) ˜C < C < ˜C, then the validation instance (x′ i, y′ i) is mis-classified. This lemma can be easily shown by applying (5) to (6). As a direct consequence of Lemma 3, the lower bound of the validation error is represented as a function of the regularization parameter C in the following form. Theorem 4. Using an approximate solution ˆw ˜ C for a regularization parameter ˜C, the validation error Ev(w∗ C) for any C > 0 satisfies Ev(w∗ C) ≥LB(Ev(w∗ C)| ˆw ˜ C) := (7) 1 n′ & ! y′ i=+1 I ' ˜C<C< β( ˆw ˜ C, x′ i) α( ˆw ˜ C, x′ i)+δ(g( ˆw ˜ C), x′ i) ˜C ( + ! y′ i=+1 I ' α( ˆw ˜ C, x′ i) β( ˆw ˜ C, x′ i)+γ(g( ˆw ˜ C), x′ i) ˜C<C< ˜C ( + ! y′ i=−1 I ' ˜C<C< α( ˆw ˜ C, x′ i) β( ˆw ˜ C, x′ i)+γ(g( ˆw ˜ C), x′ i) ˜C ( + ! y′ i=−1 I ' β( ˆw ˜ C, x′ i) α( ˆw ˜ C, x′ i)+δ(g( ˆw ˜ C), x′ i) ˜C<C< ˜C () . 4 Algorithm 1: Computing the approximation level ε from the given set of solutions Input: {(xi, yi)}i∈[n], {(x′ i, y′ i)}i∈[n′], Cl, Cu, W := {w ˜ C1, . . . , w ˜ CT } 1: Ebest v ←min ˜ Ct∈{ ˜ C1,..., ˜ CT } UB(Ev(w∗ ˜ Ct)|w ˜ Ct) 2: LB(E∗ v) ←minc∈[Cl,Cu] * max ˜ Ct∈{ ˜ C1,..., ˜ CT } LB(Ev(w∗ c)|w ˜ Ct) + Output: ε = Ebest v −LB(E∗ v) The lower bound (7) is a staircase function of the regularization parameter C. Remark 5. We note that our validation error lower bound is inspired from recent studies on safe screening [12, 13, 14, 15, 16], which identifies sparsity of the optimal solutions before solving the optimization problem. A key technique used in those studies is to bound Lagrange multipliers at the optimal, and we utilize this technique to prove Lemma 1, which is a core of our framework. By setting C = ˜C, we can obtain a lower and an upper bound of the validation error for the regularization parameter ˜C itself, which are used in the algorithm as a stopping criteria for obtaining an approximate solution ˆw ˜ C. Corollary 6. Given an approximate solution ˆw ˜ C, the validation error Ev(w∗ ˜ C) satisfies Ev(w∗ ˜ C) ≥LB(Ev(w∗ ˜ C)| ˆw ˜ C) = 1 n′ & ! y′ i=+1 I , ˆw⊤ ˜ Cx′ i + δ(g( ˆw ˜ C), x′ i) < 0 + ! y′ i=−1 I , ˆw⊤ ˜ Cx′ i −γ(g( ˆw ˜ C), x′ i) > 0 ) , (8a) Ev(w∗ ˜ C) ≤UB(Ev(w∗ ˜ C)| ˆw ˜ C) = 1 −1 n′ & ! y′ i=+1 I , ˆw⊤ ˜ Cx′ i −γ(g( ˆw ˜ C), x′ i) ≥0 + ! y′ i=−1 I , ˆw⊤ ˜ Cx′ i + δ(g( ˆw ˜ C), x′ i) ≤0 ) . (8b) 4 Algorithm In this section we present two algorithms for each of the two problems discussed in §2. Due to the space limitation, we roughly describe the most fundamental forms of these algorithms. Details and several extensions of the algorithms are presented in supplementary appendices B and C. 4.1 Problem setup 1: Computing the approximation level ε from a given set of solutions Given a set of (either optimal or approximate) solutions ˆw ˜ C1, . . . , ˆw ˜ CT , obtained e.g., by ordinary grid-search, our first problem is to provide a theoretical approximation level ε in the sense of (3)2. This problem can be solved easily by using the validation error lower bounds developed in §3.2. The algorithm is presented in Algorithm 1, where we compute the current best validation error Ebest v in line 1, and a lower bound of the best possible validation error E∗ v := minC∈[Cℓ,Cu] Ev(w∗ C) in line 2. Then, the approximation level ε can be simply obtained by subtracting the latter from the former. We note that LB(E∗ v), the lower bound of E∗ v, can be easily computed by using T evaluation error lower bounds LB(Ev(w∗ C)|w ˜ Ct), t = 1, . . . , T, because they are staircase functions of C. 4.2 Problem setup 2: Finding an ε-approximate regularization parameter Given a desired approximation level ε such as ε = 0.01, our second problem is to find an εapproximate regularization parameter. To this end we develop an algorithm that produces a set of optimal or approximate solutions ˆw ˜ C1, . . . , ˆw ˜ CT such that, if we apply Algorithm 1 to this sequence, then approximation level would be smaller than or equal to ε. Algorithm 2 is the pseudo-code of this algorithm. It computes approximate solutions for an increasing sequence of regularization parameters in the main loop (lines 2-11). 2 When we only have approximate solutions ˆw ˜ C1, . . . , ˆw ˜ CT , Eq. (3) is slightly incorrect. The first term of the l.h.s. of (3) should be min ˜ Ct∈{ ˜ C1,..., ˜ CT } UB(Ev( ˆw ˜ Ct)| ˆw ˜ Ct). 5 Algorithm 2: Finding an ε approximate regularization parameter with approximate solutions Input: {(xi, yi)}i∈[n], {(x′ i, y′ i)}i∈[n′], Cl, Cu, ε 1: t ←1, ˜Ct ←Cl, Cbest ←Cl, Ebest v ←1 2: while ˜Ct ≤Cu do 3: ˆw ˜ Ct←solve (1) approximately for C= ˜Ct 4: Compute UB(Ev(w∗ ˜ Ct)| ˆw ˜ Ct) by (8b). 5: if UB(Ev(w∗ ˜ Ct)| ˆw ˜ Ct) < Ebest v then 6: Ebest v ←UB(Ev(w∗ ˜ Ct)| ˆw ˜ Ct) 7: Cbest ←˜Ct 8: end if 9: Set ˜Ct+1 by (10) 10: t ←t + 1 11: end while Output: Cbest ∈C(ε). Let us now consider tth iteration in the main loop, where we have already computed t−1 approximate solutions ˆw ˜ C1, . . . , ˆw ˜ Ct−1 for ˜C1 < . . . < ˜Ct−1. At this point, Cbest := arg min ˜ Cτ ∈{ ˜ C1,..., ˜ Ct−1} UB(Ev(w∗ ˜ Cτ )| ˆw ˜ Cτ ), is the best (in worst-case) regularization parameter obtained so far and it is guaranteed to be an ε-approximate regularization parameter in the interval [Cl, ˜Ct] in the sense that the validation error, Ebest v := min ˜ Cτ ∈{ ˜ C1,..., ˜ Ct−1} UB(Ev(w∗ ˜ Cτ )| ˆw ˜ Cτ ), is shown to be at most greater by ε than the smallest possible validation error in the interval [Cl, ˜Ct]. However, we are not sure whether Cbest can still keep ε-approximation property for C > ˜Ct. Thus, in line 3, we approximately solve the optimization problem (1) at C = ˜Ct and obtain an approximate solution ˆw ˜ Ct. Note that the approximate solution ˆw ˜ Ct must be sufficiently good enough in the sense that UB(Ev(w∗ ˜ Cτ )| ˆw ˜ Cτ ) −LB(Ev(w∗ ˜ Cτ )| ˆw ˜ Cτ ) is sufficiently smaller than ε (typically 0.1ε). If the upper bound of the validation error UB(Ev(w∗ ˜ Cτ )| ˆw ˜ Cτ ) is smaller than Ebest v , we update Ebest v and Cbest (lines 5-8). Our next task is to find ˜Ct+1 in such a way that Cbest is an ε-approximate regularization parameter in the interval [Cl, ˜Ct+1]. Using the validation error lower bound in Theorem 4, the task is to find the smallest ˜Ct+1 > ˜Ct that violates Ebest v −LB(Ev(w∗ C)| ˆw ˜ Ct) ≤ε, ∀C ∈[ ˜Ct, Cu], (9) In order to formulate such a ˜Ct+1, let us define P := {i ∈[n′]|y′ i = +1, UB(w∗⊤ ˜ Ct x′ i| ˆw ˜ Ct) < 0}, N := {i ∈[n′]|y′ i = −1, LB(w∗⊤ ˜ Ct x′ i| ˆw ˜ Ct) > 0}. Furthermore, let Γ := " β( ˆw ˜ Ct, x′ i) α( ˆw ˜ Ct, x′ i) + δ(g( ˆw ˜ Ct), x′ i) ˜Ct $ i∈P ∪ " α( ˆw ˜ Ct, x′ i) β( ˆw ˜ Ct, x′ i) + γ(g( ˆw ˜ Ct), x′ i) ˜Ct $ i∈N , and denote the kth-smallest element of Γ as kth(Γ) for any natural number k. Then, the smallest ˜Ct+1 > ˜Ct that violates (9) is given as ˜Ct+1 ←(⌊n′(LB(Ev(w∗ ˜ Ct)| ˆw ˜ Ct)−Ebest v +ε)⌋+1)th(Γ). (10) 5 Experiments In this section we present experiments for illustrating the proposed methods. Table 2 summarizes the datasets used in the experiments. They are taken from libsvm dataset repository [23]. All the input features except D9 and D10 were standardized to [−1, 1]3. For illustrative results, the instances were randomly divided into a training and a validation sets in roughly equal sizes. For quantitative results, we used 10-fold CV. We used Huber hinge loss (e.g., [24]) which is convex and subdifferentiable with respect to the second argument. The proposed methods are free from the choice of optimization solvers. In the experiments, we used an optimization solver described in [25], which is also implemented in well-known liblinear software [26]. Our slightly modified code 3 We use D9 and D10 as they are for exploiting sparsity. 6 liver-disorders (D2) ionosphere (D3) australian (D4) Figure 2: Illustrations of Algorithm 1 on three benchmark datasets (D2, D3, D4). The plots indicate how the approximation level ε improves as the number of solutions T increases in grid-search (red), Bayesian optimization (blue) and our own method (green, see the main text). (a) ε = 0.1 without tricks (b) ε = 0.05 without tricks (c) ε = 0.05 with tricks 1 and 2 Figure 3: Illustrations of Algorithm 2 on ionosphere (D3) dataset for (a) op2 with ε = 0.10, (b) op2 with ε = 0.05 and (c) op3 with ε = 0.05, respectively. Figure 1 also shows the result for op3 with ε = 0.10. (for adaptation to Huber hinge loss) is provided as a supplementary material, and is also available on https://github.com/takeuchi-lab/RPCVELB. Whenever possible, we used warmstart approach, i.e., when we trained a new solution, we used the closest solutions trained so far (either approximate or optimal ones) as the initial starting point of the optimizer. All the computations were conducted by using a single core of an HP workstation Z800 (Xeon(R) CPU X5675 (3.07GHz), 48GB MEM). In all the experiments, we set Cℓ= 10−3 and Cu = 103. Results on problem 1 We applied Algorithm 1 in §4 to a set of solutions obtained by 1) gridsearch, 2) Bayesian optimization (BO) with expected improvement acquisition function, and 3) adaptive search with our framework which sequentially computes a solution whose validation lower bound is smallest based on the information obtained so far. Figure 2 illustrates the results on three datasets, where we see how the approximation level ε in the vertical axis changes as the number of solutions (T in our notation) increases. In grid-search, as we increase the grid points, the approximation level ε tends to be improved. Since BO tends to focus on a small region of the regularization parameter, it was difficult to tightly bound the approximation level. We see that the adaptive search, using our framework straightforwardly, seems to offer slight improvement from grid-search. Results on problem 2 We applied Algorithm 2 to benchmark datasets for demonstrating theoretically guaranteed choice of a regularization parameter is possible with reasonable computational costs. Besides the algorithm presented in §4, we also tested a variant described in supplementary Appendix B. Specifically, we have three algorithm options. In the first option (op1), we used optimal solutions {w∗ ˜ Ct}t∈[T ] for computing CV error lower bounds. In the second option (op2), we instead used approximate solutions { ˆw ˜ Ct}t∈[T ]. In the last option (op3), we additionally used speed-up tricks described in supplementary Appendix B. We considered four different choices of ε ∈{0.1, 0.05, 0.01, 0}. Note that ε = 0 indicates the task of finding the exactly optimal regular7 Table 1: Computational costs. For each of the three options and ε ∈{0.10, 0.05, 0.01, 0}, the number of optimization problems solved (denoted as T) and the total computational costs (denoted as time) are listed. Note that, for op2, there are no results for ε = 0. op1 op2 op3 op1 op2 op3 (using w∗ ˜ C) (using ˆ w ˜ C) (using tricks) (using w∗ ˜ C) (using ˆ w ˜ C) (using tricks) ε T time T time T time T time T time T time (sec) (sec) (sec) (sec) (sec) (sec) 0.10 D1 30 0.068 32 0.031 33 0.041 D6 92 1.916 93 0.975 62 0.628 0.05 68 0.124 70 0.061 57 0.057 207 4.099 209 2.065 123 1.136 0.01 234 0.428 324 0.194 205 0.157 1042 16.31 1069 9.686 728 5.362 0 442 0.697 N.A. 383 0.629 4276 57.57 N.A. 2840 44.68 0.10 D2 221 0.177 223 0.124 131 0.084 D7 289 8.492 293 5.278 167 3.319 0.05 534 0.385 540 0.290 367 0.218 601 16.18 605 9.806 379 6.604 0.01 1503 0.916 2183 0.825 1239 0.623 2532 57.79 2788 35.21 1735 24.04 0 10939 6.387 N.A. 6275 3.805 67490 1135 N.A. 42135 760.8 0.10 D3 61 0.617 62 0.266 43 0.277 D8 72 0.761 74 0.604 66 0.606 0.05 123 1.073 129 0.468 73 0.359 192 1.687 195 1.162 110 0.926 0.01 600 4.776 778 0.716 270 0.940 1063 8.257 1065 6.238 614 4.043 0 5412 26.39 N.A. 815 6.344 34920 218.4 N.A. 15218 99.57 0.10 D4 27 0.169 27 0.088 23 0.093 D9 134 360.2 136 201.0 89 74.37 0.05 64 0.342 65 0.173 47 0.153 317 569.9 323 280.7 200 128.5 0.01 167 0.786 181 0.418 156 0.399 1791 2901 1822 1345 1164 657.4 0 342 1.317 N.A. 345 1.205 85427 106937 N.A. 63300 98631 0.10 D5 62 0.236 63 0.108 45 0.091 D10 Ev < 0.10 Ev < 0.10 Ev < 0.10 0.05 108 0.417 109 0.171 77 0.137 Ev < 0.05 Ev < 0.05 Ev < 0.05 0.01 421 1.201 440 0.631 258 0.401 157 81.75 162 31.02 114 36.81 0 2330 4.540 N.A. 968 2.451 258552 85610 N.A. 42040 23316 ization parameter. In some datasets, the smallest validation errors are less than 0.1 or 0.05, in which cases we do not report the results (indicated as “Ev < 0.05” etc.). In trick1, we initially computed solutions at four different regularization parameter values evenly allocated in [10−3, 103] in the logarithmic scale. In trick2, the next regularization parameter ˜Ct+1 was set by replacing ε in (10) with 1.5ε (see supplementary Appendix B). For the purpose of illustration, we plot examples of validation error curves in several setups. Figure 3 shows the validation error curves of ionosphere (D3) dataset for several options and ε. Table 1 shows the number of optimization problems solved in the algorithm (denoted as T), and the total computation time in CV setups. The computational costs mostly depend on T, which gets smaller as ε increases. Two tricks in supplementary Appendix B was effective in most cases for reducing T. In addition, we see the advantage of using approximate solutions by comparing the computation times of op1 and op2 (though this strategy is only for ε ̸= 0). Overall, the results suggest that the proposed algorithm allows us to find theoretically guaranteed approximate regularization parameters with reasonable costs except for ε = 0 cases. For example, the algorithm found an ε = 0.01 approximate regularization parameter within a minute in 10-fold CV for a dataset with more than 50000 instances (see the results on D10 for ε = 0.01 with op2 and op3 in Table 1). Table 2: Benchmark datasets used in the experiments. dataset name sample size input dimension dataset name sample size input dimension D1 heart 270 13 D6 german.numer 1000 24 D2 liver-disorders 345 6 D7 svmguide3 1284 21 D3 ionosphere 351 34 D8 svmguide1 7089 4 D4 australian 690 14 D9 a1a 32561 123 D5 diabetes 768 8 D10 w8a 64700 300 6 Conclusions and future works We presented a novel algorithmic framework for computing CV error lower bounds as a function of the regularization parameter. The proposed framework can be used for a theoretically guaranteed choice of a regularization parameter. Additional advantage of this framework is that we only need to compute a set of sufficiently good approximate solutions for obtaining such a theoretical guarantee, which is computationally advantageous. As demonstrated in the experiments, our algorithm is practical in the sense that the computational cost is reasonable as long as the approximation quality ε is not too close to 0. An important future work is to extend the approach to multiple hyper-parameters tuning setups. 8 References [1] B. Efron, T. Hastie, I. Johnstone, and R. TIbshirani. Least angle regression. Annals of Statistics, 32(2):407–499, 2004. [2] T. Hastie, S. Rosset, R. Tibshirani, and J. Zhu. The entire regularization path for the support vector machine. Journal of Machine Learning Research, 5:1391–1415, 2004. [3] S. Rosset and J. Zhu. Piecewise linear regularized solution paths. Annals of Statistics, 35:1012–1030, 2007. [4] J. Giesen, J. Mueller, S. Laue, and S. Swiercy. Approximating Concavely Parameterized Optimization Problems. In Advances in Neural Information Processing Systems, 2012. [5] J. Giesen, M. Jaggi, and S. Laue. Approximating Parameterized Convex Optimization Problems. ACM Transactions on Algorithms, 9, 2012. [6] J. Giesen, S. Laue, and Wieschollek P. Robust and Efficient Kernel Hyperparameter Paths with Guarantees. In International Conference on Machine Learning, 2014. [7] J. Mairal and B. Yu. Complexity analysis of the Lasso reguralization path. In International Conference on Machine Learning, 2012. [8] V. Vapnik and O. Chapelle. Bounds on Error Expectation for Support Vector Machines. Neural Computation, 12:2013–2036, 2000. [9] T. Joachims. Estimating the generalization performance of a SVM efficiently. In International Conference on Machine Learning, 2000. [10] K. Chung, W. Kao, C. Sun, L. Wang, and C. Lin. Radius margin bounds for support vector machines with the RBF kernel. Neural computation, 2003. [11] M. Lee, S. Keerthi, C. Ong, and D. DeCoste. An efficient method for computing leave-one-out error in support vector machines with Gaussian kernels. IEEE Transactions on Neural Networks, 15:750–7, 2004. [12] L. El Ghaoui, V. Viallon, and T. Rabbani. Safe feature elimination in sparse supervised learning. Pacific Journal of Optimization, 2012. [13] Z. Xiang, H. Xu, and P. Ramadge. Learning sparse representations of high dimensional data on large scale dictionaries. In Advances in Neural Information Processing Sysrtems, 2011. [14] K. Ogawa, Y. Suzuki, and I. Takeuchi. Safe screening of non-support vectors in pathwise SVM computation. In International Conference on Machine Learning, 2013. [15] J. Liu, Z. Zhao, J. Wang, and J. Ye. Safe Screening with Variational Inequalities and Its Application to Lasso. In International Conference on Machine Learning, volume 32, 2014. [16] J. Wang, J. Zhou, J. Liu, P. Wonka, and J. Ye. A Safe Screening Rule for Sparse Logistic Regression. In Advances in Neural Information Processing Sysrtems, 2014. [17] V. Vapnik. The Nature of Statistical Learning Theory. Springer, 1996. [18] S. Shalev-Shwartz and S. Ben-David. Understanding machine learning. Cambridge University Press, 2014. [19] J. Snoek, H. Larochelle, and R. Adams. Practical Bayesian Optimization of Machine Learning Algorithms. In Advances in Neural Information Processing Sysrtems, 2012. [20] J. Bergstra and Y. Bengio. Random Search for Hyper-Parameter Optimization. Journal of Machine Learning Research, 13:281–305, 2012. [21] O. Chapelle, V. Vapnik, O. Bousquet, and S. Mukherjee. Choosing multiple parameters for support vector machines. Machine Learning, 46:131–159, 2002. [22] P D. Bertsekas. Nonlinear Programming. Athena Scientific, 1999. [23] C. Chang and C. Lin. LIBSVM : A Library for Support Vector Machines. ACM Transactions on Intelligent Systems and Technology, 2:1–39, 2011. [24] O. Chapelle. Training a support vector machine in the primal. Neural computation, 19:1155–1178, 2007. [25] C. Lin, R. Weng, and S. Keerthi. Trust Region Newton Method for Large-Scale Logistic Regression. The Journal of Machine Learning Research, 9:627–650, 2008. [26] R. Fan, K. Chang, and C. Hsieh. LIBLINEAR: A library for large linear classification. The Journal of Machine Learning, 9:1871–1874, 2008. 9 | 2015 | 202 |
5,706 | Reflection, Refraction, and Hamiltonian Monte Carlo Hadi Mohasel Afshar Research School of Computer Science Australian National University Canberra, ACT 0200 hadi.afshar@anu.edu.au Justin Domke National ICT Australia (NICTA) & Australian National University Canberra, ACT 0200 Justin.Domke@nicta.com.au Abstract Hamiltonian Monte Carlo (HMC) is a successful approach for sampling from continuous densities. However, it has difficulty simulating Hamiltonian dynamics with non-smooth functions, leading to poor performance. This paper is motivated by the behavior of Hamiltonian dynamics in physical systems like optics. We introduce a modification of the Leapfrog discretization of Hamiltonian dynamics on piecewise continuous energies, where intersections of the trajectory with discontinuities are detected, and the momentum is reflected or refracted to compensate for the change in energy. We prove that this method preserves the correct stationary distribution when boundaries are affine. Experiments show that by reducing the number of rejected samples, this method improves on traditional HMC. 1 Introduction Markov chain Monte Carlo sampling is among the most general methods for probabilistic inference. When the probability distribution is smooth, Hamiltonian Monte Carlo (HMC) (originally called hybrid Monte Carlo [4]) uses the gradient to simulate Hamiltonian dynamics and reduce random walk behavior. This often leads to a rapid exploration of the distribution [7, 2]. HMC has recently become popular in Bayesian statistical inference [13], and is often the algorithm of choice. Some problems display piecewise smoothness, where the density is differentiable except at certain boundaries. Probabilistic models may intrinsically have finite support, being constrained to some region. In Bayesian inference, it might be convenient to state a piecewise prior. More complex and highly piecewise distributions emerge in applications where the distributions are derived from other distributions (e.g. the distribution of the product of two continuous random variables [5]) as well as applications such as preference learning [1], or probabilistic programming [8]. While HMC is motivated by smooth distributions, the inclusion of an acceptance probability means HMC does asymptotically sample correctly from piecewise distributions1. However, since leapfrog numerical integration of Hamiltonian dynamics (see [9]) relies on the assumption that the corresponding potential energy is smooth, such cases lead to high rejection probabilities, and poor performance. Hence, traditional HMC is rarely used for piecewise distributions. In physical systems that follow Hamiltonian dynamics [6], a discontinuity in the energy can result in two possible behaviors. If the energy decreases across a discontinuity, or the momentum is large enough to overcome an increase, the system will cross the boundary with an instantaneous change in momentum, known as refraction in the context of optics [3]. If the change in energy is too large to be overcome by the momentum, the system will reflect off the boundary, again with an instantaneous change in momentum. 1Technically, here we assume the total measure of the non-differentiable points is zero so that, with probability one, none is ever encountered 1 0.2 0.2 0.2 0.2 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.8 0.8 0.8 0.85 0.85 0.9 0.9 0.95 q1 q2 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 q1 q2 −6 −4 −2 0 2 4 6 −6 −4 −2 0 2 4 6 q1 q2 refraction reflection (a) (b) (c) Figure 1: Example trajectories of baseline and reflective HMC. (a) Contours of the target distribution in two dimensions, as defined in Eq. 18. (b) Trajectories of the rejected (red crosses) and accepted (blue dots) proposals using baseline HMC. (c) The same with RHMC. Both use leapfrog parameters L = 25 and ϵ = 0.1 In RHMC, the trajectory reflects or refracts on the boundaries of the internal and external polytope boundaries and thus has far fewer rejected samples than HMC, leading to faster mixing in practice. (More examples in supplementary material.) Recently, Pakman and Paninski [11, 10] proposed methods for HMC-based sampling from piecewise Gaussian distributions by exactly solving the Hamiltonian equations, and accounting for what we refer to as refraction and reflection above. However, since Hamiltonian equations of motion can rarely be solved exactly, the applications of this method are restricted to distributions whose logdensity is piecewise quadratic. In this paper, we generalize this work to arbitrary piecewise continuous distributions, where each region is a polytope, i.e. is determined by a set of affine boundaries. We introduce a modification to the leapfrog numerical simulation of Hamiltonian dynamics, called Reflective Hamiltonian Monte Carlo (RHMC), by incorporating reflection and refraction via detecting the first intersection of a linear trajectory with a boundary. We prove that our method has the correct stationary distribution, where the main technical difficulty is proving volume preservation of our dynamics to establish detailed balance. Numerical experiments confirm that our method is more efficient than baseline HMC, due to having fewer rejected proposal trajectories, particularly in high dimensions. As mentioned, the main advantage of this method over [11] and [10] is that it can be applied to arbitrary piecewise densities, without the need for a closed-form solution to the Hamiltonian dynamics, greatly increasing the scope of applicability. 2 Exact Hamiltonian Dynamics Consider a distribution P(q) ∝ exp(−U(q)) over Rn, where U is the potential energy. HMC [9] is based on considering a joint distribution on momentum and position space P(q, p) ∝exp(−H(q, p)), where H(q, p) = U(q) + K(p), and K is a quadratic, meaning that P(p) ∝exp(−K(p)) is a normal distribution. If one could exactly simulate the dynamics, HMC would proceed by (1) iteratively sampling p ∼P(p), (2) simulating the Hamiltonian dynamics dqi dt = ∂H ∂pi = pi (1) dpi dt = −∂H ∂qi = −∂U ∂qi (2) for some period of time ϵ, and (3) reversing the final value p. (Only needed for the proof of correctness, since this will be immediately discarded at the start of the next iteration in practice.) Since steps (1) and (2-3) both leave the distribution P(p, q) invariant, so does a Markov chain that alternates between the two steps. Hence, the dynamics have P(p, q) as a stationary distribution. Of course, the above differential equations are not well-defined when U has discontinuities, and are typically difficult to solve in closed-form. 2 3 Reflection and Refraction with Exact Hamiltonian Dynamics Take a potential function U(q) which is differentiable in all points except at some boundaries of partitions. Suppose that, when simulating the Hamiltonian dynamics, (q, p) evolves over time as in the above equations whenever these equations are differentiable. However, when the state reaches a boundary, decompose the momentum vector p into a component p⊥perpendicular to the boundary and a component p∥parallel to the boundary. Let ∆U be the (signed) difference in potential energy on the two sides of the discontinuity. If ∥p⊥∥2 > 2∆U then p⊥is instantaneously replaced by p′ ⊥:= p ∥p⊥∥2 −2∆U · p⊥ ∥p⊥∥. That is, the discontinuity is passed, but the momentum is changed in the direction perpendicular to the boundary (refraction). (If ∆U is positive, the momentum will decrease, and if it is negative, the momentum will increase.) On the other hand, if ∥p⊥∥2 ≤2∆U, then p⊥is instantaneously replaced by −p⊥. That is, if the particle’s momentum is insufficient to climb the potential boundary, it bounces back by reversing the momentum component which is perpendicular to the boundary. Pakman and Paninski [11, 10] present an algorithm to exactly solve these dynamics for quadratic U. However, for non-quadratic U, the Hamiltonian dynamics rarely have a closed-form solution, and one must resort to numerical integration, the most successful method for which is known as the leapfrog dynamics. 4 Reflection and Refraction with Leapfrog Dynamics Informally, HMC with leapfrog dynamics iterates three steps. (1) Sample p ∼P(p). (2) Perform leapfrog simulation, by discretizing the Hamiltonian equations into L steps using some small stepsize ϵ. Here, one interleaves a position step q ←q + ϵp between two half momentum steps p ← p −ϵ∇U(q)/2. (3) Reverse the sign of p. If (q, p) is the starting point of the leapfrog dynamics, and (q′, p′) is the final point, accept the move with probability min(1, exp(H(p, q) −H(p′, q′))) See Algorithm 1. It can be shown that this baseline HMC method has detailed balance with respect to P(p), even if U(q) is discontinuous. However, discontinuities mean that large changes in the Hamiltonian may occur, meaning many steps can be rejected. We propose a modification of the dynamics, namely, reflective Hamiltonian Monte Carlo (RHMC), which is also shown in Algorithm 1. The only modification is applied to the position steps: In RHMC, the first intersection of the trajectory with the boundaries of the polytope that contains q must be detected [11, 10]. The position step is only taken up to this boundary, and reflection/refraction occurs, depending on the momentum and change of energy at the boundary. This process continues until the entire amount of time ϵ has been simulated. Note that if there is no boundary in the trajectory to time ϵ, this is equivalent to baseline HMC. Also note that several boundaries might be visited in one position step. As with baseline HMC, there are two alternating steps, namely drawing a new momentum variable p from P(p) ∝exp(−K(p)) and proposing a move (p, q) →(p′, q′) and accepting or rejecting it with a probability determined by a Metropolis-Hastings ratio. We can show that both of these steps leave the joint distribution P invariant, and hence a Markov chain that also alternates between these steps will also leave P invariant. As it is easy to see, drawing p from P(p) will leave P(q, p) invariant, we concentrate on the second step i.e. where a move is proposed according to the piecewise leapfrog dynamics shown in Alg. 1. Firstly, it is clear that these dynamics are time-reversible, meaning that if the simulation takes state (q, p) to (q′, p′) it will also take state (q′, p′) to (q, p). Secondly, we will show that these dynamics are volume preserving. Formally, if D denotes the leapfrog dynamics, we will show that the absolute value of the determinant of the Jacobian of D is one. These two properties together show that the probability density of proposing a move from (q, p) to (q′, p′) is the same of that proposing a move from (q′, p′) to (q, p). Thus, if the move (q, p) →(q′, p′) is accepted according to the standard Metropolis-Hastings ratio, R ((q, p) →(q′, p′)) = min(1, exp(H(q, p) −H(q′, p′)), then detailed balance will be satisfied. To see this, let Q denote the proposal distribution, Then, the usual proof of correctness for Metropolis-Hastings applies, namely that 3 P(q, p)Q ((q, p) →(q′, p′)) R ((q, p) →(q′, p′)) P(q′, p′)Q((q′, p′) →(q, p))R((q′, p′) →(q, p)) = P(q, p) min(1, exp(H(q, p) −H(q′, p′)) P(q′, p′) min(1, exp(H(q′, p′) −H(q, p)) = 1. (3) q1 = c x q p p′ q′ Figure 2: Transformation T :⟨q,p⟩→⟨q′,p′⟩ described by Lemma 1 (Refraction). (The final equality is easy to establish, considering the cases where H(q, p) ≥ H(q′, p′) and H(q′, p′) ≤H(q, p) separately.) This means that detailed balance holds, and so P is a stationary distribution. The major difference in the analysis of RHMC, relative to traditional HMC is that showing conservation of volume is more difficult. With standard HMC and leapfrog steps, volume conservation is easy to show by observing that each part of a leapfrog step is a shear transformation. This is not the case with RHMC, and so we must resort to a full analysis of the determinant of the Jacobian, as explored in the following section. Algorithm 1: BASELINE & REFLECTIVE HMC ALGORITHMS input : q0, current sample; U, potential function, L, # leapfrog steps; ϵ, leapfrog step size output: next sample begin 1 q ←q0; p ∼N(0, 1) 2 H0 ←∥p∥2/2 + U(q) 3 for l = 1 to L do 4 p ←p −ϵ∇U(q)/2 # Half-step evolution of momentum 5 # Full-step evolution of position: if BASELINEHMC then 6 q ←q + ϵp 7 else 8 # i.e. if REFLECTIVEHMC: t0 ←0 9 while ⟨x, tx, ∆U, φ⟩←FIRSTDISCONTINUITY(q, p, ϵ −t0, U) ̸= ∅do 10 q ←x 11 t0 ←t0 + tx 12 ⟨p⊥, p∥⟩= DECOMPOSE(p, φ) # Perpendicular/ parallel to boundary plane φ 13 if ∥p⊥∥2 > 2∆U then 14 p⊥← p ∥p⊥∥2 −2∆U · p⊥ ∥p⊥∥ # Refraction 15 else 16 p⊥←−p⊥ # Reflection 17 18 p ←p⊥+ p∥ 19 q ←q + (ϵ −t0)p 20 p ←p −ϵ∇U(q)/2 # Half-step evolution of momentum 21 p ←−p # Not required in practice; for reversibility proof 22 H ←∥p∥2/2 + U(q); ∆H ←H −H0 23 if s ∼U(0, 1) < e−∆H return q else return q0 24 end 25 note : FIRSTDISCONTINUITY(·) returns x, the position of the first intersection of a boundary plain with line segment [q, q + (ϵ −t0)p]; tx, the time it is visited; ∆U, the change in energy at the discontinuity, and φ, the visited partition boundary. If no such point exists, ∅is returned. 4 5 Volume Conservation 5.1 Refraction In our first result, we assume without loss of generality, that there is a boundary located at the hyperplane q1 = c. This Lemma shows that, in the refractive case, volume is conserved. The setting is visualized in Figure 2. Lemma 1. Let T : ⟨q, p⟩→⟨q′, p′⟩be a transformation in Rn that takes a unit mass located at q := (q1, . . . , qn) and moves it with constant momentum p := (p1, . . . , pn) till it reaches a plane q1 = c (at some point x := (c, x2, . . . , xn) where c is a constant). Subsequently the momentum is changed to p′ = p p2 1 −2∆U(x), p2, . . . , pn (where ∆U(·) is a function of x s.t. p2 1 > 2∆U(x)). The move is carried on for the total time period τ till it ends in q′. For all n ∈N, T satisfies the volume preservation property. Proof. Since for i > 1, the momentum is not affected by the collision, q′ i = qi + τ · pi and p′ i = pi. Thus, ∀j ∈{2, . . . , n}s.t. j ̸= i, ∂q′ i ∂qj = ∂q′ i ∂pj = ∂p′ i ∂qj = ∂p′ i ∂pj = 0. Therefore, if we explicitly write out the Jacobian determinant |J| of the transformation T , it is ∂q′ 1 ∂q1 ∂q′ 1 ∂p1 · · · ∂q′ 1 ∂pk−1 ∂q′ 1 ∂qk ∂q′ 1 ∂pk ∂p′ 1 ∂q1 ∂p′ 1 ∂p1 · · · ∂p′ 1 ∂pk−1 ∂p′ 1 ∂qk ∂p′ 1 ∂pk ∂q′ 2 ∂q1 ∂q′ 2 ∂p1 · · · ∂q′ 2 ∂pk−1 ∂q′ 2 ∂qk ∂q′ 2 ∂pk ... ... ... ... ∂p′ k−1 ∂q1 ∂p′ k−1 ∂p1 · · · ∂p′ k−1 ∂pk−1 ∂p′ k−1 ∂qk ∂p′ k−1 ∂pk ∂q′ k ∂q1 ∂q′ k ∂p1 · · · ∂q′ k ∂pk−1 ∂q′ k ∂qk ∂q′ k ∂pk ∂p′ k ∂q1 ∂p′ k ∂p1 · · · ∂p′ k ∂pk−1 ∂p′ k ∂qk ∂p′ k ∂pk = ∂q′ 1 ∂q1 ∂q′ 1 ∂p1 · · · ∂q′ 1 ∂pk−1 ∂q′ 1 ∂qk ∂q′ 1 ∂pk ∂p′ 1 ∂q1 ∂p′ 1 ∂p1 · · · ∂p′ 1 ∂pk−1 ∂p′ 1 ∂qk ∂p′ 1 ∂pk 0 0 · · · ∂q′ 2 ∂pk−1 ∂q′ 2 ∂qk ∂q′ 2 ∂pk ... ... ... ... 0 0 · · · 1 ∂p′ k−1 ∂qk ∂p′ k−1 ∂pk 0 0 · · · 0 1 ∂q′ k ∂pk 0 0 · · · 0 0 1 (4) Now, using standard properties of the determinant, we have that |J| = ∂q′ 1 ∂q1 ∂q′ 1 ∂p1 ∂p′ 1 ∂q1 ∂p′ 1 ∂p1 . We will now explicitly calculate these four derivatives. Due to the significance of the result, we carry out the computations in detail. Nonetheless, as this is a largely mechanical process, for brevity, we do not comment on the derivation. Let t1 be the time to reach x and t2 be the period between reaching x and the last point q′. Then: t1 def = c −q1 p1 (5) x = q + t1p (6) t2 def = τ −t1 = τ + q1 −c p1 (7) q′ 1 = c + p′ 1 · t2 (8) p′ 1 def = q p2 1 −2∆U(x) (9) ∂t2 ∂q1 by (7) = 1 p1 (10) ∂q′ 1 ∂q1 = ∂q′ 1 ∂p′ 1 · ∂p′ 1 ∂q1 + ∂q′ 1 ∂t2 · ∂t2 ∂q1 (8 & 10) = t2 · ∂p′ 1 ∂q1 + p′ 1 · 1 p1 (11) ∂q′ 1 ∂p1 = ∂q′ 1 ∂p′ 1 · ∂p′ 1 ∂p1 + ∂q′ 1 ∂t2 · ∂t2 ∂p1 (7 & 8) = t2 · ∂p′ 1 ∂p1 + p′ 1 · c −q1 p2 1 (12) ∂p′ 1 ∂p1 (9)= 1 2 p p2 1 −2∆U(x) · ∂ p2 1 −2∆U(x) ∂p1 = p1 −∂∆U(x)/∂p1 p′ 1 (13) 5 ∂p′ 1 ∂q1 = 1 2 p p2 1 −2∆U(x) · ∂ p2 1 −2∆U(x) ∂q1 = 1 p′ 1 · −∂∆U(x) ∂q1 (14) ∂x ∂p1 (5, 6) = ∂ q + c−q1 p1 p ∂p1 = ∂q ∂p1 + (c −q1) · ∂(p/p1) ∂p1 = (c −q1)−1 p2 1 · (0, p2, p3, . . . , pn) (15) ∂x ∂q1 (5, 6) = ∂q ∂q1 + p p1 · ∂(c −q1) ∂q1 = q q1 −p p1 = (1, 0, . . . , 0) −(1, p2 p1 , . . . , pn p1 ) = −1 p1 (0, p2, . . . , pn) (16) Substituting the appropriate terms into |J| = | ∂q′ 1 ∂q1 ∂p′ 1 ∂p1 −∂p′ 1 ∂q1 ∂q′ 1 ∂p1 |, we get that |J| (4)= ∂q′ 1 ∂q1 · ∂p′ 1 ∂p1 −∂q′ 1 ∂p1 · ∂p′ 1 ∂q1 (11 & 12) = t2 ∂p′ 1 ∂q1 + p′ 1 p1 · ∂p′ 1 ∂p1 − t2 ∂p′ 1 ∂p1 + p′ 1 c −q1 p2 1 · ∂p′ 1 ∂q1 = p′ 1 p1 ∂p′ 1 ∂p1 + q1 −c p1 · ∂p′ 1 ∂q1 (13 & 14) = 1 p1 p1 −∂∆U(x) ∂p1 −q1 −c p1 · ∂∆U(x) ∂q1 = 1 −1 p1 ∂∆U(x) ∂x · ∂x ∂p1 + q1 −c p1 · ∂∆U(x) ∂x · ∂x ∂q1 (15 & 16) = 1 −1 p1 · ∂∆U(x) ∂x q1 −c p2 1 · (0, p2, p3, . . . , pn) + q1 −c p1 · −1 p1 (0, p2, . . . , pn) = 1. 5.2 Reflection Now, we turn to the reflective case, and again show that volume is conserved. Again, we assume without loss of generality that there is a boundary located at the hyperplane q1 = c. Lemma 2. Let T : ⟨q, p⟩→⟨q′, p′⟩be a transformation in Rn that takes a unit mass located at q := (q1, . . . , qn) and moves it with the constant momentum p := (p1, . . . , pn) till it reaches a plane q1 = c (at some point x := (c, x2, . . . , xn) where c is a constant). Subsequently the mass is bounced back (reflected) with momentum p′ = (−p1, p2, . . . , pn) The move is carried on for a total time period τ till it ends in q′. For all n ∈N, T satisfies the volume preservation property. Proof. Similar to Lemma 1, for i > 1, q′ i = qi+τ ·pi and p′ i = pi. Therefore, for any j ∈{2, . . . , n} s.t. j ̸= i, ∂q′ i ∂qj = ∂q′ i ∂pj = ∂p′ i ∂qj = ∂p′ i ∂pj = 0. Consequently, by equation (4), and since p′ 1 = −p1, |J| = ∂q′ 1 ∂q1 ∂q′ 1 ∂p1 ∂p′ 1 ∂q1 ∂p′ 1 ∂p1 = ∂q′ 1 ∂q1 ∂q′ 1 ∂p1 0 −1 = −∂q′ 1 ∂q1 (17) As before, let t1 be the time to reach x and t2 be the period between reaching x and the last point q′. That is, t1 def = c−q1 p1 and t2 def = τ −t1. It follows that q′ 1 def = c + p′ 1 · t2 is equal to 2c −τp1 −q1. Hence, |J| = 1. 5.3 Reflective Leapfrog Dynamics Theorem 1. In RHMC (Algorithm 1) for sampling from a continuous and piecewise distribution P which has affine partitioning boundaries, leapfrog simulation preserves volume in (q, p) space. Proof. We split the algorithm into several atomic transformations Ti. Each transformation is either (a) a momentum step, (b) a full position step with no reflection/refraction or (c) a full or partial position step where exactly one reflection or refraction occurs. 6 To prove that the total algorithm preserves volume, it is sufficient to show that the volume is preserved under each Ti (i.e. |JTi(q, p)| = 1) since: |JT1oT2o···oTm| = |JT1| · |JT2| · · · |JTm| Transformations of kind (a) and (b) are shear mappings and therefore they preserve the volume [9]. Now consider a (full or partial) position step where a single refraction occurs. If the reflective plane is in form q1 = c, by lemma 1, the volume preservation property holds. Otherwise, as long as the reflective plane is affine, via a rotation of basis vectors, the problem is reduced to the former case. Since volume is conserved under rotation, in this case the volume is also conserved. With similar reasoning, by lemma 2, reflection on a affine reflective boundary preserves volume. Thus, since all component transformations of RHMC leapfrog simulation preserve volume, the proof is complete. Along with the fact that the leapfrog dynamics are time-reversible, this shows that the algorithm satisfies detailed balance, and so has the correct stationary distribution. 6 Experiment Compared to baseline HMC, we expect that RHMC will simulate Hamiltonian dynamics more accurately and therefore leads to fewer rejected samples. On the other hand, this comes at the expense of slower leapfrog position steps since intersections, reflections and refractions must be computed. To test the trade off, we compare the RHMC to baseline HMC [9] and tuned Metroplis-Hastings (MH) with a simple isotropic Normal proposal distribution. MH is automatically tuned after [12] by testing 100 equidistant proposal variances in interval (0, 1] and accepting a variance for which the acceptance rate is closest to 0.24. The baseline HMC and RHMC number of steps L and step size ϵ are chosen to be 100 and 0.1 respectively. (Many other choices are in the Appendix.) While HMC performance is highly standard to these parameters [7] RHMC is consistently faster. The comparison takes place on a heavy tail piecewise model with (non-normalized) negative log probability U(q) = p q⊤A q if ∥q∥∞≤3 1 + p q⊤A q if 3 < ∥q∥∞≤6 +∞, otherwise (18) where A is a positive definite matrix. We carry out the experiment on three choices of (position space) dimensionalites, n = 2, 10 and 50. Due to the symmetry of the model, the ground truth expected value of q is known to be 0. Therefore, the absolute error of the expected value (estimated by a chain q(1), . . . , q(k) of MCMC samples) in each dimension d = 1, . . . , n is the absolute value of the mean of d-th element of the sample vectors. The worst mean absolute error (WMAE) over all dimensions is taken as the error measurement of the chain. WMAE q(1), . . . , q(k) = 1 k max d=1,...n k X s=1 qd s (19) For each algorithm, 20 Markov chains are run and the mean WMAE and 99% confidence intervals (as error bars) versus the number of iterations (i.e. Markov chain sizes) are time (milliseconds) are depicted in figure 2. All algorithms are implemented in java and run on a single thread of a 3.40GHz CPU. For each of the 20 repetitions, some random starting point is chosen uniformly and used for all three of the algorithms. We use a diagonal matrix for A where, for each repetition, each entry on the main diagonal is either exp(−5) or exp(5) with equal probabilities. As the results show, even in low dimensions, the extra cost of the position step is more or less compensated by its higher effective sample size but as the dimensionality increases, the RHMC significantly outperforms both baseline HMC and tuned MH. 7 10 0 10 1 10 2 10 3 10 4 0 1 2 3 4 5 6 Iteration (dim=2, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC 10 1 10 2 10 3 0 1 2 3 4 5 6 Time (dim=2, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC (a) (d) 10 0 10 1 10 2 10 3 10 4 0 1 2 3 4 5 6 Iteration (dim=10, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC 10 1 10 2 10 3 0 1 2 3 4 5 6 Time (dim=10, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC (b) (e) 10 0 10 1 10 2 10 3 10 4 0 1 2 3 4 5 6 Iteration (dim=50, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC 10 1 10 2 10 3 10 4 0 1 2 3 4 5 6 Time (dim=50, L=100, ε =0.1) Error Baseline.HMC Tuned.MH Reflective.HMC (c) (f) Figure 3: Error (worst mean absolute error per dimension) versus (a-c) iterations and (e-f) time (ms). Tuned.HM is Metropolis Hastings with a tuned isotropic Gaussian proposal distribution. (Many more examples in supplementary material.) 7 Conclusion We have presented a modification of the leapfrog dynamics for Hamiltonian Monte Carlo for piecewise smooth energy functions with affine boundaries (i.e. each region is a polytope), inspired by physical systems. Though traditional Hamiltonian Monte Carlo can in principle be used on such functions, the fact that the Hamiltonian will often be dramatically changed by the dynamics can result in a very low acceptance ratio, particularly in high dimensions. By better preserving the Hamiltonian, reflective Hamiltonian Monte Carlo (RHMC) accepts more moves and thus has a higher effective sample size, leading to much more efficient probabilistic inference. To use this method, one must be able to detect the first intersection of a position trajectory with polytope boundaries. 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] Hadi Mohasel Afshar, Scott Sanner, and Ehsan Abbasnejad. Linear-time gibbs sampling in piecewise graphical models. In Association for the Advancement of Artificial Intelligence, pages 665–673, 2015. [2] Steve Brooks, Andrew Gelman, Galin Jones, and Xiao-Li Meng. Handbook of Markov Chain Monte Carlo. CRC press, 2011. [3] Hans Adolph Buchdahl. An introduction to Hamiltonian optics. Courier Corporation, 1993. [4] Simon Duane, Anthony D Kennedy, Brian J Pendleton, and Duncan Roweth. Hybrid monte carlo. Physics letters B, 195(2):216–222, 1987. [5] Andrew G Glen, Lawrence M Leemis, and John H Drew. Computing the distribution of the product of two continuous random variables. Computational statistics & data analysis, 44(3):451–464, 2004. [6] Donald T Greenwood. Principles of dynamics. Prentice-Hall Englewood Cliffs, NJ, 1988. [7] Matthew D Homan and Andrew Gelman. The no-u-turn sampler: Adaptively setting path lengths in hamiltonian monte carlo. The Journal of Machine Learning Research, 15(1):1593– 1623, 2014. [8] David Lunn, David Spiegelhalter, Andrew Thomas, and Nicky Best. The bugs project: evolution, critique and future directions. Statistics in medicine, 28(25):3049–3067, 2009. [9] Radford M Neal. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011. [10] Ari Pakman and Liam Paninski. Auxiliary-variable exact hamiltonian monte carlo samplers for binary distributions. In Advances in Neural Information Processing Systems, pages 2490– 2498, 2013. [11] Ari Pakman and Liam Paninski. Exact hamiltonian monte carlo for truncated multivariate gaussians. Journal of Computational and Graphical Statistics, 23(2):518–542, 2014. [12] Gareth O Roberts, Andrew Gelman, Walter R Gilks, et al. Weak convergence and optimal scaling of random walk metropolis algorithms. The annals of applied probability, 7(1):110– 120, 1997. [13] Stan Development Team. Stan Modeling Language Users Guide and Reference Manual, Version 2.5.0, 2014. 9 | 2015 | 203 |
5,707 | Exploring Models and Data for Image Question Answering Mengye Ren1, Ryan Kiros1, Richard S. Zemel1,2 University of Toronto1 Canadian Institute for Advanced Research2 {mren, rkiros, zemel}@cs.toronto.edu Abstract This work aims to address the problem of image-based question-answering (QA) with new models and datasets. In our work, we propose to use neural networks and visual semantic embeddings, without intermediate stages such as object detection and image segmentation, to predict answers to simple questions about images. Our model performs 1.8 times better than the only published results on an existing image QA dataset. We also present a question generation algorithm that converts image descriptions, which are widely available, into QA form. We used this algorithm to produce an order-of-magnitude larger dataset, with more evenly distributed answers. A suite of baseline results on this new dataset are also presented. 1 Introduction Combining image understanding and natural language interaction is one of the grand dreams of artificial intelligence. We are interested in the problem of jointly learning image and text through a question-answering task. Recently, researchers studying image caption generation [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] have developed powerful methods of jointly learning from image and text inputs to form higher level representations from models such as convolutional neural networks (CNNs) trained on object recognition, and word embeddings trained on large scale text corpora. Image QA involves an extra layer of interaction between human and computers. Here the model needs to pay attention to details of the image instead of describing it in a vague sense. The problem also combines many computer vision sub-problems such as image labeling and object detection. In this paper we present our contributions to the problem: a generic end-to-end QA model using visual semantic embeddings to connect a CNN and a recurrent neural net (RNN), as well as comparisons to a suite of other models; an automatic question generation algorithm that converts description sentences into questions; and a new QA dataset (COCO-QA) that was generated using the algorithm, and a number of baseline results on this new dataset. In this work we assume that the answers consist of only a single word, which allows us to treat the problem as a classification problem. This also makes the evaluation of the models easier and more robust, avoiding the thorny evaluation issues that plague multi-word generation problems. 2 Related Work Malinowski and Fritz [11] released a dataset with images and question-answer pairs, the DAtaset for QUestion Answering on Real-world images (DAQUAR). All images are from the NYU depth v2 dataset [12], and are taken from indoor scenes. Human segmentation, image depth values, and object labeling are available in the dataset. The QA data has two sets of configurations, which differ by the 1 DAQUAR 1553 What is there in front of the sofa? Ground truth: table IMG+BOW: table (0.74) 2-VIS+BLSTM: table (0.88) LSTM: chair (0.47) COCOQA 5078 How many leftover donuts is the red bicycle holding? Ground truth: three IMG+BOW: two (0.51) 2-VIS+BLSTM: three (0.27) BOW: one (0.29) COCOQA 1238 What is the color of the teeshirt? Ground truth: blue IMG+BOW: blue (0.31) 2-VIS+BLSTM: orange (0.43) BOW: green (0.38) COCOQA 26088 Where is the gray cat sitting? Ground truth: window IMG+BOW: window (0.78) 2-VIS+BLSTM: window (0.68) BOW: suitcase (0.31) Figure 1: Sample questions and responses of a variety of models. Correct answers are in green and incorrect in red. The numbers in parentheses are the probabilities assigned to the top-ranked answer by the given model. The leftmost example is from the DAQUAR dataset, and the others are from our new COCO-QA dataset. number of object classes appearing in the questions (37-class and 894-class). There are mainly three types of questions in this dataset: object type, object color, and number of objects. Some questions are easy but many questions are very hard to answer even for humans. Since DAQUAR is the only publicly available image-based QA dataset, it is one of our benchmarks to evaluate our models. Together with the release of the DAQUAR dataset, Malinowski and Fritz presented an approach which combines semantic parsing and image segmentation. Their approach is notable as one of the first attempts at image QA, but it has a number of limitations. First, a human-defined possible set of predicates are very dataset-specific. To obtain the predicates, their algorithm also depends on the accuracy of the image segmentation algorithm and image depth information. Second, their model needs to compute all possible spatial relations in the training images. Even though the model limits this to the nearest neighbors of the test images, it could still be an expensive operation in larger datasets. Lastly the accuracy of their model is not very strong. We show below that some simple baselines perform better. Very recently there has been a number of parallel efforts on both creating datasets and proposing new models [13, 14, 15, 16]. Both Antol et al. [13] and Gao et al. [15] used MS-COCO [17] images and created an open domain dataset with human generated questions and answers. In Anto et al.’s work, the authors also included cartoon pictures besides real images. Some questions require logical reasoning in order to answer correctly. Both Malinowski et al. [14] and Gao et al. [15] use recurrent networks to encode the sentence and output the answer. Whereas Malinowski et al. use a single network to handle both encoding and decoding, Gao et al. used two networks, a separate encoder and decoder. Lastly, bilingual (Chinese and English) versions of the QA dataset are available in Gao et al.’s work. Ma et al. [16] use CNNs to both extract image features and sentence features, and fuse the features together with another multi-modal CNN. Our approach is developed independently from the work above. Similar to the work of Malinowski et al. and Gao et al., we also experimented with recurrent networks to consume the sequential question input. Unlike Gao et al., we formulate the task as a classification problem, as there is no single well- accepted metric to evaluate sentence-form answer accuracy [18]. Thus, we place more focus on a limited domain of questions that can be answered with one word. We also formulate and evaluate a range of other algorithms, that utilize various representations drawn from the question and image, on these datasets. 3 Proposed Methodology The methodology presented here is two-fold. On the model side we develop and apply various forms of neural networks and visual-semantic embeddings on this task, and on the dataset side we propose new ways of synthesizing QA pairs from currently available image description datasets. 2 t = 1 t = 2 t = T “How” “many” “books” LSTM ... Softmax One Two ... Red Bird .21 .56 ... .09 .01 Linear Image CNN Word Embedding Figure 2: VIS+LSTM Model 3.1 Models In recent years, recurrent neural networks (RNNs) have enjoyed some successes in the field of natural language processing (NLP). Long short-term memory (LSTM) [19] is a form of RNN which is easier to train than standard RNNs because of its linear error propagation and multiplicative gatings. Our model builds directly on top of the LSTM sentence model and is called the “VIS+LSTM” model. It treats the image as one word of the question. We borrowed this idea of treating the image as a word from caption generation work done by Vinyals et al. [1]. We compare this newly proposed model with a suite of simpler models in the Experimental Results section. 1. We use the last hidden layer of the 19-layer Oxford VGG Conv Net [20] trained on ImageNet 2014 Challenge [21] as our visual embeddings. The CNN part of our model is kept frozen during training. 2. We experimented with several different word embedding models: randomly initialized embedding, dataset-specific skip-gram embedding and general-purpose skip-gram embedding model [22]. The word embeddings are trained with the rest of the model. 3. We then treat the image as if it is the first word of the sentence. Similar to DeViSE [23], we use a linear or affine transformation to map 4096 dimension image feature vectors to a 300 or 500 dimensional vector that matches the dimension of the word embeddings. 4. We can optionally treat the image as the last word of the question as well through a different weight matrix and optionally add a reverse LSTM, which gets the same content but operates in a backward sequential fashion. 5. The LSTM(s) outputs are fed into a softmax layer at the last timestep to generate answers. 3.2 Question-Answer Generation The currently available DAQUAR dataset contains approximately 1500 images and 7000 questions on 37 common object classes, which might be not enough for training large complex models. Another problem with the current dataset is that simply guessing the modes can yield very good accuracy. We aim to create another dataset, to produce a much larger number of QA pairs and a more even distribution of answers. While collecting human generated QA pairs is one possible approach, and another is to synthesize questions based on image labeling, we instead propose to automatically convert descriptions into QA form. In general, objects mentioned in image descriptions are easier to detect than the ones in DAQUAR’s human generated questions, and than the ones in synthetic QAs based on ground truth labeling. This allows the model to rely more on rough image understanding without any logical reasoning. Lastly the conversion process preserves the language variability in the original description, and results in more human-like questions than questions generated from image labeling. As a starting point we used the MS-COCO dataset [17], but the same method can be applied to any other image description dataset, such as Flickr [24], SBU [25], or even the internet. 3 3.2.1 Pre-Processing & Common Strategies We used the Stanford parser [26] to obtain the syntatic structure of the original image description. We also utilized these strategies for forming the questions. 1. Compound sentences to simple sentences Here we only consider a simple case, where two sentences are joined together with a conjunctive word. We split the orginial sentences into two independent sentences. 2. Indefinite determiners “a(n)” to definite determiners “the”. 3. Wh-movement constraints In English, questions tend to start with interrogative words such as “what”. The algorithm needs to move the verb as well as the “wh-” constituent to the front of the sentence. For example: “A man is riding a horse” becomes “What is the man riding?” In this work we consider the following two simple constraints: (1) A-over-A principle which restricts the movement of a whword inside a noun phrase (NP) [27]; (2) Our algorithm does not move any wh-word that is contained in a clause constituent. 3.2.2 Question Generation Question generation is still an open-ended topic. Overall, we adopt a conservative approach to generating questions in an attempt to create high-quality questions. We consider generating four types of questions below: 1. Object Questions: First, we consider asking about an object using “what”. This involves replacing the actual object with a “what” in the sentence, and then transforming the sentence structure so that the “what” appears in the front of the sentence. The entire algorithm has the following stages: (1) Split long sentences into simple sentences; (2) Change indefinite determiners to definite determiners; (3) Traverse the sentence and identify potential answers and replace with “what”. During the traversal of object-type question generation, we currently ignore all the prepositional phrase (PP) constituents; (4) Perform wh-movement. In order to identify a possible answer word, we used WordNet [28] and the NLTK software package [29] to get noun categories. 2. Number Questions: We follow a similar procedure as the previous algorithm, except for a different way to identify potential answers: we extract numbers from original sentences. Splitting compound sentences, changing determiners, and wh-movement parts remain the same. 3. Color Questions: Color questions are much easier to generate. This only requires locating the color adjective and the noun to which the adjective attaches. Then it simply forms a sentence “What is the color of the [object]” with the “object” replaced by the actual noun. 4. Location Questions: These are similar to generating object questions, except that now the answer traversal will only search within PP constituents that start with the preposition “in”. We also added rules to filter out clothing so that the answers will mostly be places, scenes, or large objects that contain smaller objects. 3.2.3 Post-Processing We rejected the answers that appear too rarely or too often in our generated dataset. After this QA rejection process, the frequency of the most common answer words was reduced from 24.98% down to 7.30% in the test set of COCO-QA. 4 Experimental Results 4.1 Datasets Table 1 summarizes the statistics of COCO-QA. It should be noted that since we applied the QA pair rejection process, mode-guessing performs very poorly on COCO-QA. However, COCO-QA questions are actually easier to answer than DAQUAR from a human point of view. This encourages the model to exploit salient object relations instead of exhaustively searching all possible relations. COCO-QA dataset can be downloaded at http://www.cs.toronto.edu/˜mren/ imageqa/data/cocoqa 4 Table 1: COCO-QA question type break-down CATEGORY TRAIN % TEST % OBJECT 54992 69.84% 27206 69.85% NUMBER 5885 7.47% 2755 7.07% COLOR 13059 16.59% 6509 16.71% LOCATION 4800 6.10% 2478 6.36% TOTAL 78736 100.00% 38948 100.00% Here we provide some brief statistics of the new dataset. The maximum question length is 55, and average is 9.65. The most common answers are “two” (3116, 2.65%), “white” (2851, 2.42%), and “red” (2443, 2.08%). The least common are “eagle” (25, 0.02%) “tram” (25, 0.02%), and “sofa” (25, 0.02%). The median answer is “bed” (867, 0.737%). Across the entire test set (38,948 QAs), 9072 (23.29%) overlap in training questions, and 7284 (18.70%) overlap in training question-answer pairs. 4.2 Model Details 1. VIS+LSTM: The first model is the CNN and LSTM with a dimensionality-reduction weight matrix in the middle; we call this “VIS+LSTM” in our tables and figures. 2. 2-VIS+BLSTM: The second model has two image feature inputs, at the start and the end of the sentence, with different learned linear transformations, and also has LSTMs going in both the forward and backward directions. Both LSTMs output to the softmax layer at the last timestep. We call the second model “2-VIS+BLSTM”. 3. IMG+BOW: This simple model performs multinomial logistic regression based on the image features without dimensionality reduction (4096 dimension), and a bag-of-word (BOW) vector obtained by summing all the learned word vectors of the question. 4. FULL: Lastly, the “FULL” model is a simple average of the three models above. We release the complete details of the models at https://github.com/renmengye/ imageqa-public. 4.3 Baselines To evaluate the effectiveness of our models, we designed a few baselines. 1. GUESS: One very simple baseline is to predict the mode based on the question type. For example, if the question contains “how many” then the model will output “two.” In DAQUAR, the modes are “table”, “two”, and “white” and in COCO-QA, the modes are “cat”, “two”, “white”, and “room”. 2. BOW: We designed a set of “blind” models which are given only the questions without the images. One of the simplest blind models performs logistic regression on the BOW vector to classify answers. 3. LSTM: Another “blind” model we experimented with simply inputs the question words into the LSTM alone. 4. IMG: We also trained a counterpart “deaf” model. For each type of question, we train a separate CNN classification layer (with all lower layers frozen during training). Note that this model knows the type of question, in order to make its performance somewhat comparable to models that can take into account the words to narrow down the answer space. However the model does not know anything about the question except the type. 5. IMG+PRIOR: This baseline combines the prior knowledge of an object and the image understanding from the “deaf model”. For example, a question asking the color of a white bird flying in the blue sky may output white rather than blue simply because the prior probability of the bird being blue is lower. We denote c as the color, o as the class of the object of interest, and x as the 5 image. Assuming o and x are conditionally independent given the color, p(c|o, x) = p(c, o|x) P c∈C p(c, o|x) = p(o|c, x)p(c|x) P c∈C p(o|c, x)p(c|x) = p(o|c)p(c|x) P c∈C p(o|c)p(c|x) (1) This can be computed if p(c|x) is the output of a logistic regression given the CNN features alone, and we simply estimate p(o|c) empirically: ˆp(o|c) = count(o,c) count(c) . We use Laplace smoothing on this empirical distribution. 6. K-NN: In the task of image caption generation, Devlin et al. [30] showed that a nearest neighbors baseline approach actually performs very well. To see whether our model memorizes the training data for answering new question, we include a K-NN baseline in the results. Unlike image caption generation, here the similarity measure includes both image and text. We use the bag-ofwords representation learned from IMG+BOW, and append it to the CNN image features. We use Euclidean distance as the similarity metric; it is possible to improve the nearest neighbor result by learning a similarity metric. 4.4 Performance Metrics To evaluate model performance, we used the plain answer accuracy as well as the Wu-Palmer similarity (WUPS) measure [31, 32]. The WUPS calculates the similarity between two words based on their longest common subsequence in the taxonomy tree. If the similarity between two words is less than a threshold then a score of zero will be given to the candidate answer. Following Malinowski and Fritz [32], we measure all models in terms of accuracy, WUPS 0.9, and WUPS 0.0. 4.5 Results and Analysis Table 2 summarizes the learning results on DAQUAR and COCO-QA. For DAQUAR we compare our results with [32] and [14]. It should be noted that our DAQUAR results are for the portion of the dataset (98.3%) with single-word answers. After the release of our paper, Ma et al. [16] claimed to achieve better results on both datasets. Table 2: DAQUAR and COCO-QA results DAQUAR COCO-QA ACC. WUPS 0.9 WUPS 0.0 ACC. WUPS 0.9 WUPS 0.0 MULTI-WORLD [32] 0.1273 0.1810 0.5147 GUESS 0.1824 0.2965 0.7759 0.0730 0.1837 0.7413 BOW 0.3267 0.4319 0.8130 0.3752 0.4854 0.8278 LSTM 0.3273 0.4350 0.8162 0.3676 0.4758 0.8234 IMG 0.4302 0.5864 0.8585 IMG+PRIOR 0.4466 0.6020 0.8624 K-NN (K=31, 13) 0.3185 0.4242 0.8063 0.4496 0.5698 0.8557 IMG+BOW 0.3417 0.4499 0.8148 0.5592 0.6678 0.8899 VIS+LSTM 0.3441 0.4605 0.8223 0.5331 0.6391 0.8825 ASK-NEURON [14] 0.3468 0.4076 0.7954 2-VIS+BLSTM 0.3578 0.4683 0.8215 0.5509 0.6534 0.8864 FULL 0.3694 0.4815 0.8268 0.5784 0.6790 0.8952 HUMAN 0.6027 0.6104 0.7896 From the above results we observe that our model outperforms the baselines and the existing approach in terms of answer accuracy and WUPS. Our VIS+LSTM and Malinkowski et al.’s recurrent neural network model [14] achieved somewhat similar performance on DAQUAR. A simple average of all three models further boosts the performance by 1-2%, outperforming other models. It is surprising to see that the IMG+BOW model is very strong on both datasets. One limitation of our VIS+LSTM model is that we are not able to consume image features as large as 4096 dimensions at one time step, so the dimensionality reduction may lose some useful information. We tried to give IMG+BOW a 500 dim. image vector, and it does worse than VIS+LSTM (≈48%). 6 Table 3: COCO-QA accuracy per category OBJECT NUMBER COLOR LOCATION GUESS 0.0239 0.3606 0.1457 0.0908 BOW 0.3727 0.4356 0.3475 0.4084 LSTM 0.3587 0.4534 0.3626 0.3842 IMG 0.4073 0.2926 0.4268 0.4419 IMG+PRIOR 0.3739 0.4899 0.4451 K-NN 0.4799 0.3699 0.3723 0.4080 IMG+BOW 0.5866 0.4410 0.5196 0.4939 VIS+LSTM 0.5653 0.4610 0.4587 0.4552 2-VIS+BLSTM 0.5817 0.4479 0.4953 0.4734 FULL 0.6108 0.4766 0.5148 0.5028 By comparing the blind versions of the BOW and LSTM models, we hypothesize that in Image QA tasks, and in particular on the simple questions studied here, sequential word interaction may not be as important as in other natural language tasks. It is also interesting that the blind model does not lose much on the DAQUAR dataset, We speculate that it is likely that the ImageNet images are very different from the indoor scene images, which are mostly composed of furniture. However, the non-blind models outperform the blind models by a large margin on COCO-QA. There are three possible reasons: (1) the objects in MS-COCO resemble the ones in ImageNet more; (2) MS-COCO images have fewer objects whereas the indoor scenes have considerable clutter; and (3) COCO-QA has more data to train complex models. There are many interesting examples but due to space limitations we can only show a few in Figure 1 and Figure 3; full results are available at http://www.cs.toronto.edu/˜mren/ imageqa/results. For some of the images, we added some extra questions (the ones have an “a” in the question ID); these provide more insight into a model’s representation of the image and question information, and help elucidate questions that our models may accidentally get correct. The parentheses in the figures represent the confidence score given by the softmax layer of the respective model. Model Selection: We did not find that using different word embedding has a significant impact on the final classification results. We observed that fine-tuning the word embedding results in better performance and normalizing the CNN hidden image features into zero-mean and unit-variance helps achieve faster training time. The bidirectional LSTM model can further boost the result by a little. Object Questions: As the original CNN was trained for the ImageNet challenge, the IMG+BOW benefited significantly from its single object recognition ability. However, the challenging part is to consider spatial relations between multiple objects and to focus on details of the image. Our models only did a moderately acceptable job on this; see for instance the first picture of Figure 1 and the fourth picture of Figure 3. Sometimes a model fails to make a correct decision but outputs the most salient object, while sometimes the blind model can equally guess the most probable objects based on the question alone (e.g., chairs should be around the dining table). Nonetheless, the FULL model improves accuracy by 50% compared to IMG model, which shows the difference between pure object classification and image question answering. Counting: In DAQUAR, we could not observe any advantage in the counting ability of the IMG+BOW and the VIS+LSTM model compared to the blind baselines. In COCO-QA there is some observable counting ability in very clean images with a single object type. The models can sometimes count up to five or six. However, as shown in the second picture of Figure 3, the ability is fairly weak as they do not count correctly when different object types are present. There is a lot of room for improvement in the counting task, and in fact this could be a separate computer vision problem on its own. Color: In COCO-QA there is a significant win for the IMG+BOW and the VIS+LSTM against the blind ones on color-type questions. We further discovered that these models are not only able to recognize the dominant color of the image but sometimes associate different colors to different objects, as shown in the first picture of Figure 3. However, they still fail on a number of easy 7 COCOQA 33827 What is the color of the cat? Ground truth: black IMG+BOW: black (0.55) 2-VIS+LSTM: black (0.73) BOW: gray (0.40) COCOQA 33827a What is the color of the couch? Ground truth: red IMG+BOW: red (0.65) 2-VIS+LSTM: black (0.44) BOW: red (0.39) DAQUAR 1522 How many chairs are there? Ground truth: two IMG+BOW: four (0.24) 2-VIS+BLSTM: one (0.29) LSTM: four (0.19) DAQUAR 1520 How many shelves are there? Ground truth: three IMG+BOW: three (0.25) 2-VIS+BLSTM: two (0.48) LSTM: two (0.21) COCOQA 14855 Where are the ripe bananas sitting? Ground truth: basket IMG+BOW: basket (0.97) 2-VIS+BLSTM: basket (0.58) BOW: bowl (0.48) COCOQA 14855a What are in the basket? Ground truth: bananas IMG+BOW: bananas (0.98) 2-VIS+BLSTM: bananas (0.68) BOW: bananas (0.14) DAQUAR 585 What is the object on the chair? Ground truth: pillow IMG+BOW: clothes (0.37) 2-VIS+BLSTM: pillow (0.65) LSTM: clothes (0.40) DAQUAR 585a Where is the pillow found? Ground truth: chair IMG+BOW: bed (0.13) 2-VIS+BLSTM: chair (0.17) LSTM: cabinet (0.79) Figure 3: Sample questions and responses of our system examples. Adding prior knowledge provides an immediate gain on the IMG model in terms of accuracy on Color and Number questions. The gap between the IMG+PRIOR and IMG+BOW shows some localized color association ability in the CNN image representation. 5 Conclusion and Current Directions In this paper, we consider the image QA problem and present our end-to-end neural network models. Our model shows a reasonable understanding of the question and some coarse image understanding, but it is still very na¨ıve in many situations. While recurrent networks are becoming a popular choice for learning image and text, we showed that a simple bag-of-words can perform equally well compared to a recurrent network that is borrowed from an image caption generation framework [1]. We proposed a more complete set of baselines which can provide potential insight for developing more sophisticated end-to-end image question answering systems. As the currently available dataset is not large enough, we developed an algorithm that helps us collect large scale image QA dataset from image descriptions. Our question generation algorithm is extensible to many image description datasets and can be automated without requiring extensive human effort. We hope that the release of the new dataset will encourage more data-driven approaches to this problem in the future. Image question answering is a fairly new research topic, and the approach we present here has a number of limitations. First, our models are just answer classifiers. Ideally we would like to permit longer answers which will involve some sophisticated text generation model or structured output. But this will require an automatic free-form answer evaluation metric. Second, we are only focusing on a limited domain of questions. However, this limited range of questions allow us to study the results more in depth. Lastly, it is also hard to interpret why the models output a certain answer. By comparing our models with some baselines we can roughly infer whether they understood the image. Visual attention is another future direction, which could both improve the results (based on recent successes in image captioning [8]) as well as help explain the model prediction by examining the attention output at every timestep. Acknowledgments We would like to thank Nitish Srivastava for the support of Toronto Conv Net, from which we extracted the CNN image features. We would also like to thank anonymous reviewers for their valuable and helpful comments. References [1] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan, “Show and tell: A neural image caption generator,” in CVPR, 2015. [2] R. Kiros, R. Salakhutdinov, and R. S. Zemel, “Unifying visual-semantic embeddings with multimodal neural language models,” TACL, 2015. 8 [3] A. Karpathy, A. Joulin, and L. Fei-Fei, “Deep fragment embeddings for bidirectional image sentence mapping,” in NIPS, 2013. [4] J. Mao, W. Xu, Y. Yang, J. Wang, and A. L. Yuille, “Explain images with multimodal recurrent neural networks,” NIPS Deep Learning Workshop, 2014. [5] J. Donahue, L. A. Hendricks, S. Guadarrama, M. Rohrbach, S. Venugopalan, K. Saenko, and T. Darrell, “Long-term recurrent convolutional networks for visual recognition and description,” in CVPR, 2014. [6] X. Chen and C. L. Zitnick, “Learning a recurrent visual representation for image caption generation,” CoRR, vol. abs/1411.5654, 2014. [7] H. Fang, S. Gupta, F. N. Iandola, R. Srivastava, L. Deng, P. Doll´ar, J. Gao, X. He, M. Mitchell, J. C. Platt, C. L. Zitnick, and G. Zweig, “From captions to visual concepts and back,” in CVPR, 2015. [8] K. Xu, J. Ba, R. Kiros, K. Cho, A. C. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio, “Show, attend and tell: Neural image caption generation with visual attention,” in ICML, 2015. [9] R. Lebret, P. O. Pinheiro, and R. Collobert, “Phrase-based image captioning,” in ICML, 2015. [10] B. Klein, G. Lev, G. Lev, and L. Wolf, “Fisher vectors derived from hybrid Gaussian-Laplacian mixture models for image annotations,” in CVPR, 2015. [11] M. Malinowski and M. Fritz, “Towards a visual Turing challenge,” in NIPS Workshop on Learning Semantics, 2014. [12] N. Silberman, D. Hoiem, P. Kohli, and R. Fergus, “Indoor segmentation and support inference from RGBD images,” in ECCV, 2012. [13] S. Antol, A. Agrawal, J. Lu, M. Mitchell, D. Batra, C. L. Zitnick, and D. Parikh, “VQA: Visual Question Answering,” CoRR, vol. abs/1505.00468, 2015. [14] M. Malinowski, M. Rohrbach, and M. Fritz, “Ask Your Neurons: A Neural-based Approach to Answering Questions about Images,” CoRR, vol. abs/1505.01121, 2015. [15] H. Gao, J. Mao, J. Zhou, Z. Huang, L. Wang, and W. Xu, “Are you talking to a machine? dataset and methods for multilingual image question answering,” CoRR, vol. abs/1505.05612, 2015. [16] L. Ma, Z. Lu, and H. Li, “Learning to answer questions from image using convolutional neural network,” CoRR, vol. abs/1506.00333, 2015. [17] T. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Doll´ar, and C. L. Zitnick, “Microsoft COCO: Common Objects in Context,” in ECCV, 2014. [18] X. Chen, H. Fang, T.-Y. Lin, R. Vedantam, S. Gupta, P. Dollar, and C. L. Zitnick, “Microsoft COCO captions: Data collection and evaluation server,” CoRR, vol. abs/1504.00325, 2015. [19] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [20] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” in ICLR, 2015. [21] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. S. Bernstein, A. C. Berg, and L. Fei-Fei, “Imagenet large scale visual recognition challenge,” IJCV, 2015. [22] T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient estimation of word representations in vector space,” in ICLR, 2013. [23] A. Frome, G. S. Corrado, J. Shlens, S. Bengio, J. Dean, M. Ranzato, and T. Mikolov, “DeViSE: A deep visual-semantic embedding model,” in NIPS, 2013. [24] M. Hodosh, P. Young, and J. Hockenmaier, “Framing image description as a ranking task: Data, models and evaluation metrics,” J. Artif. Intell. Res. (JAIR), vol. 47, pp. 853–899, 2013. [25] V. Ordonez, G. Kulkarni, and T. L. Berg, “Im2text: Describing images using 1 million captioned photographs,” in NIPS, 2011. [26] D. Klein and C. D. Manning, “Accurate unlexicalized parsing,” in ACL, 2003. [27] N. Chomsky, Conditions on Transformations. New York: Academic Press, 1973. [28] C. Fellbaum, Ed., WordNet An Electronic Lexical Database. Cambridge, MA; London: The MIT Press, May 1998. [29] S. Bird, “NLTK: the natural language toolkit,” in ACL, 2006. [30] J. Devlin, S. Gupta, R. Girshick, M. Mitchell, and C. L. Zitnick, “Exploring nearest neighbor approaches for image captioning,” CoRR, vol. abs/1505.04467, 2015. [31] Z. Wu and M. Palmer, “Verb semantics and lexical selection,” in ACL, 1994. [32] M. Malinowski and M. Fritz, “A multi-world approach to question answering about real-world scenes based on uncertain input,” in NIPS, 2014. 9 | 2015 | 204 |
5,708 | Learning Structured Densities via Infinite Dimensional Exponential Families Siqi Sun TTI Chicago siqi.sun@ttic.edu Mladen Kolar University of Chicago mkolar@chicagobooth.edu Jinbo Xu TTI Chicago jinbo.xu@gmail.com Abstract Learning the structure of a probabilistic graphical models is a well studied problem in the machine learning community due to its importance in many applications. Current approaches are mainly focused on learning the structure under restrictive parametric assumptions, which limits the applicability of these methods. In this paper, we study the problem of estimating the structure of a probabilistic graphical model without assuming a particular parametric model. We consider probabilities that are members of an infinite dimensional exponential family [4], which is parametrized by a reproducing kernel Hilbert space (RKHS) H and its kernel k. One difficulty in learning nonparametric densities is the evaluation of the normalizing constant. In order to avoid this issue, our procedure minimizes the penalized score matching objective [10, 11]. We show how to efficiently minimize the proposed objective using existing group lasso solvers. Furthermore, we prove that our procedure recovers the graph structure with high-probability under mild conditions. Simulation studies illustrate ability of our procedure to recover the true graph structure without the knowledge of the data generating process. 1 Introduction Undirected graphical models, or Markov random fields [13], have been extensively studied and applied in fields ranging from computational biology [15, 28], to natural language processing [16, 20] and computer vision [9, 17]. In an undirected graphical model, conditional independence assumptions underlying a probability distribution are encoded in the graph structure. Furthermore, the joint probability density function can be factorized according to the cliques of the graph [14]. One of the fundamental problems in the literature is learning the structure of a graphical model given an i.i.d. sample from an unknown distribution. A lot of work has been done under specific parametric assumptions on the unknown distribution. For example, in Gaussian Graphical Models the structure of the graph is encoded by the sparsity pattern of the precision matrix [6, 30]. Similarly, in the context of exponential family graphical models, where the node conditional distribution given all the other nodes is a member of an exponential family, the structure is described by the non-zero coefficients [29]. Most existing approaches to learn the structure of a high-dimensional undirected graphical model are based on minimizing a penalized loss objective, where the loss is usually a log-likelihood or a composite likelihood and the penalty induces sparsity on the resulting parameter vector [see, for example, 6, 12, 18, 22, 24, 29, 30]. In addition to sparsity inducing penalties, methods that use other structural constraints have been proposed. For example, since many real-world networks are scale-free [1], several algorithms are designed specifically to learn structure of such networks 1 [5, 19]. Graphs tend to have cluster structure and learning simultaneously the structure and cluster assignment has been investigated [2, 27]. In this paper, we focus on learning the structure of a pairwise graphical models without assuming a parametric class of models. The main challenge in estimating nonparametric graphical models is computation of the log normalizing constant. To get around this problem, we propose to use score matching [10, 11] as a divergence, instead of the usual KL divergence, as it does not require evaluation of the log partition function. The probability density function is estimated by minimizing the expected distance between the model score function and the data score function, where the score function is defined as gradient of the corresponding probability density functions. The advantage of this measure is that the normalization constant is canceled out when computing the distance. In order to learn the underlying graph structure, we assume that the logarithm of the density is additive in node-wise and edge-wise potentials and use a sparsity inducing penalty to select non-zero edge potentials. As we will prove later, our procedure will allow us to consistently estimate the underlying graph structure. The rest of paper is organized as follows. We first introduce the notations, background and related work. Then we formulate our model, establish a representer theorem and present a group lasso algorithm to optimize the objective. Next we prove that our estimator is consistent by showing that it can recover the true graph with high probability given sufficient number of samples. Finally the results for simulated data are presented to demonstrate the correctness of our algorithm empirically. 1.1 Notations Let [n] denote the set {1, 2, . . . , n}. For a vector θ = (θ1, . . . , θd)T ∈Rd, let ∥θ∥p = (P i∈[d] |θi|p) 1 p denote its lp norm. Let column vector vec(D) denote the vectorization of matrix D, cat(a, b) denote the concatenation of two vectors a and b, and mat(aT 1 , . . . , aT d ) the matrix with rows given by aT 1 , . . . , aT d . For χ ⊆Rd, let Lp(χ, p0) denote the space of function for which the p-th power of absolute value is p0 integrable; and for f ∈Lp(χ, p0), let ∥f∥Lp(χ,p0) = ∥f∥p = ( R χ |f|pdx) 1 p denote its Lp norm. Throughout the paper, we denote H (or Hi, Hij) as Hilbert space and ⟨·, ·⟩H, ∥· ∥H as corresponding inner product and norm. For any operator C : H1 →H2, we use ∥C∥to denote the usual operator norm, which is defined as ∥C∥= inf{a ≥0 : ∥Cf∥H2 ≤a∥f∥H1 for all f ∈H1}; and ∥C∥HS to denote its Hilbert-Schmidt norm, which is defined as ∥C∥2 HS = X i∈I ∥Cei∥2 H2, where ei is an orthonormal basis of H for an index set I. Also, we use R(C) to denote operator C’s range space. For any f ∈H1 and g ∈H2, let f ⊗g denote their tensor product. 2 Background & Related Work 2.1 Learning graphical models in exponential families Let x = (x1, x2, ..., xd) be a d-dimensional random vector from a multivariate Gaussian distribution. It is well known that the conditional independency of two variables given all the others is encoded in the zero pattern of its precision matrix Ω, that is, xi and xj are conditionally independent given x−ij if and only if Ωij = 0, where x−ij is the vector of x without xi and xj. A sparse estimate of Ωcan be obtained by maximum-likelihood (joint selection) or pseudo-likelihood (neighborhood selection) optimization with an added l1 penalty [6, 22, 30]. Given n independent realizations of x (rows of X ∈Rn×d), the penalized maximum-likelihood estimate of the precision matrix can be obtained as ˆΩλ = arg min Ω≻0 tr( ˆSΩ) −log det Ω+ λ∥Ω∥1, (1) where ˆS = n−1XT X and λ controls the sparsity level of estimated graph. 2 The pseudo-likelihood method estimates the neighborhood of a node a by the non-zeros of the solution to a regularized linear model ˆθs = arg min θ 1 n∥Xs −X−sθ∥2 2 + λ∥θ∥1. (2) The estimated neighborhood is then ˆN(s) = {a : θsa ̸= 0}. Another way to specify a parametric graphical model is by assuming that each node-conditional distributions is a part of the exponential family [29]. Specifically, the conditional distribution of xs given x−s is assumed to be P(xs|x−s) = exp( X t∈N(s) θstxsxt + C(xs) −D(x−s, θ)), (3) where C is the base measure, D is the log-normalization constant and N(s) is the neighborhood a the node s. Similar to (2), the neighborhood of each node can be estimated by minimizing the negative log-likelihood with l1 penalty on θ. The optimization is tractable when the normalization constant D can be easily computed based on the model assumption. For example, under Poisson graphical model assumptions for count data, the normalization constant is −exp(P t∈N(s) θstxt). When using the neighborhood estimation, the graph can be estimated as the union of the neighborhoods of each node, which leads to consistent graph estimation [22, 29]. 2.2 Generalized Exponential Family and RKHS We say H is a RKHS associated with kernel k : χ × χ →R+ if and only if for each x ∈χ, the following two conditions are satisfied: (1) k(·, x) ∈H and (2) it has reproducing properties such that f(x) = ⟨f, k(·, x)⟩H for all f(·) ∈H, where k is a symmetric and positive semidefinite function. Denote the RKHS H with kernel k as H(k). For any f ∈H(k), there exists a set of xi and αi, such that f(·) = P∞ i=1 αik(·, xi). Similarly for any g ∈H(k), g(·) = P∞ j=1 βjk(·, yj), the inner product of f and g is defined as ⟨f, g⟩H = P∞ i,j=1 αiβjk(xi, yj). Therefore the norm of f simply is ∥f∥H = qP i,j αiαjk(xi, xj). The summation is guaranteed to be larger than or equal to zero because the kernel k is positive semidefinite. We consider the exponential family in infinite dimensions [4], where P = {pf(x) = ef(x)−A(f)q0(x), x ∈χ; f ∈F} and the function space F is defined as F = {f ∈H(k) : A(f) = log Z χ ef(x)q0(x)dx < ∞}, where q0(x) is the base measure, A(f) is a generalized normalization constant such that pf(x) is a valid probability density function, and H is a RKHS [3] associated with kernel k. To see it as a generalization of the exponential family, we show some examples that can generate useful finite dimension exponential families: • Normal: χ = R, k(x, y) = xy + x2y2 • Poisson: χ = N ∪{0}, k(x, y) = xy • Exponential: χ = R+, k(x, y) = xy. For more detailed information, please refer to [4]. When learning structure of a graphical model, we will further impose structural conditions on H(k) in order ensure that F consists of additive functions. 2.3 Score Matching Score matching is a convenient procedure that allows for estimating a probability density without computing the normalizing constant [10, 11]. It is based on minimizing Fisher divergence J(p∥p0) = 1 2 Z p(x)
∂log p(x) ∂x −∂log p0(x) ∂x
2 2 dx, (4) 3 where ∂log p(x) ∂x = ( ∂log p(x) ∂x1 , . . . , ∂log p(x) ∂xd ) is the score function. Observe that for p(x, θ) = 1 Z(θ)q(x, θ) the normalization constant Z(θ) cancels out in the gradient computation, which makes the divergence independent of Z(θ). Since the score matching objective involves the unknown oracle probability density function p0, it is typically not computable. However, under some mild conditions which we will discuss in METHODS section, (4) can be rewritten as J(p∥p0) = Z p0(x) X i∈[d] 1 2(∂log p(x) ∂xi )2 + ∂2 log p(x) ∂x2 i dx. (5) After substituting the expectation with an empirical average, we get ˆJ(p∥p0) = 1 n X a∈[n] X i∈[d] 1 2(∂log p(Xa) ∂xi )2 + ∂2 log p(Xa) ∂x2 i . (6) Compared to maximum likelihood estimation, minimizing ˆJ(p∥p0) is computationally tractable. While we will be able to estimate p0 only up to a scale factor, this will be sufficient for the purpose of graph structure estimation. 3 Methods 3.1 Model Formulation and Assumptions We assume that the true probability density function p0 is in P. Furthermore, for simplicity we assume that log p0(x) = f(x) = X i≤j (i,j)∈S f0,ij(xi, xj), where f0,ii(xi, xi) is a node potential and f0,ij(xi, xj) is an edge potential. The set S denotes the edge set of the graph. Extensions to models where potentials are defined over larger cliques are possible. We further assume that f0,ij ∈Hij(kij), where Hij is a RKHS with kernel kij. To simplify the notation, we use f0,ij(x) or kij(·, x) to denote f0,ij(xi, xj) and kij(·, (xi, xj)). If the context is clear, we drop the subscript for norm or inner product. Define H(S) = {f = X (i,j)∈S fij|fij ∈Hij} (7) as a set of functions that decompose as sum of bivariate functions on edge set S. Note that H(S) is also (a subset of) a RKHS with the norm ∥f∥2 H(S) = P (i,j)∈S ∥fij∥2 Hij and kernel k = P (i,j)∈S kij. Let Ω(f) = ∥f∥H,1 = P i≤j ∥fij∥Hij. For any edge set S (not necessarily the true edge set), we denote ΩS(fS) = P s∈S ∥fs∥Hs as the norm Ωreduced to S. Similarly, denote its dual norm as Ω∗ S[fS] = maxΩS(gS)≤1⟨fS, gS⟩[25]. Under the assumption that the unknown f0 is additive, the loss function becomes J(f) =1 2 Z p0(x) X i∈[d] ∂f(x) ∂xi −∂f0(x) ∂xi 2 dx =1 2 X i∈[d] X j,j′∈[d] ⟨fij −f0,ij, Z p0(x)∂kij(·, (xi, xj)) ∂xi ⊗∂kij′(·, (xi, xj′)) ∂xi dx(fij′ −f0,ij′)⟩ =1 2 X i∈[d] X j,j′∈[d] ⟨fij −f0,ij, Cijij′(fij′ −f0,ij′)⟩. Intuitively, C can be viewed as a d2 matrix, and the operator at position (ij, ij′) is Cij,ij′. For general (ij, i′j′), i ̸= i′ the corresponding operator simply is 0. Define CSS′ as Z p0(x) X (i,j)∈S,(i′,j′)∈S′ ∂kij(·, (xi, xj)) ∂xi ⊗∂ki′j′(·, (xi′, xj′)) ∂xi dx, 4 which intuitively can be treated as a sub matrix of C with rows S and columns S′. We will use this notation intensively in the main theorem and its proof. Following [26], we make the following assumptions. A1. Each kij is twice differentiable on χ × χ. A2. For any i and ˜xj ∈χj = [aj, bj], we assume that lim xi→a+ i or b− i ∂2kij(x, y) ∂xi∂yi |y=x p2 0(x) = 0, where x = (xi, ˜xj) and ai, bi could be −∞or ∞. A3. This condition ensures that J(p∥p0) < ∞for any p ∈P [for more details see 26]: ∥∂kij(·, x) ∂xi ∥Hij ∈L2(χ, p0), ∥∂2kij(·, x) ∂x2 i ∥Hij ∈L2(χ, p0). A4. The operator CSS, is compact and the smallest eigenvalue ωmin = λmin(CSS) > 0. A5. Ω∗ Sc[CScSC−1 SS] ≤1 −η, where η > 0. A6. f0 ∈R(C), which means there exists γ ∈H, such that f0 = Cγ. f0 is the oracle function. We will discuss the definition of operator C and Ω∗in section 4. Compared with [29], A4 can be interpreted as the dependency condition and the A5 is the incoherence condition, which is a standard condition for structure learning in high dimensional statistical estimators. 3.2 Estimation Procedure We estimate f by minimizing the following penalized score matching objective min f ˆLµ(f) = ˆJ(f) + µ 2 ∥f∥H,1 s.t. fij ∈Hij, (8) where ˆJ(f) is given in (6). The norm ∥f∥H,1 = P i≤j ∥fij∥Hij is used as a sparsity inducing penalty. A simplified form of ˆJ(f) is given below that will lead to efficient algorithm for solving (8). The following theorem states that the score matching objective can be written as a penalized quadratic function on f. Theorem 3.1 (i) The score matching objective can be represented as Lµ(f) = 1 2⟨f −f0, C(f −f0)⟩+ µ 2 ∥f∥H,1 (9) where C = R p0(x) P i∈[d] ∂k(·,x) ∂xi ⊗∂k(·,x) ∂xi dx is a trace operator. (ii) Given observed data Xn×d, the empirical estimation of Lµ is ˆLµ(f) =1 2⟨f, ˆCf⟩+ X i≤j ⟨fij, −ˆξij⟩+ µ 2 ∥f∥H,1 + const (10) where ˆC = 1 n P a∈[n] P i∈[d] ∂k(·,Xa) ∂xi ⊗∂k(·,Xa) ∂xi and ˆξij = 1 n P a∈[n] ∂2kij(·,(Xai,Xaj)) ∂x2 i + ∂2kij(·,(Xai,Xaj)) ∂x2 j if i ̸= j, or ˆξij = 1 n P a∈n ∂2kij(·,(Xai,Xaj)) ∂x2 i otherwise. Please refer to our supplementary material for detailed proof 1. The above theorem still requires us to minimize over F. Our next results shows that the solution is finite dimensional. That is, we establish a representer theorem for our problem. 1Please visit ttic.uchicago.edu/∼siqi for supplementary material and code. 5 Theorem 3.2 (i) The solution to (10) can be represented as ˆfij(·) = X b∈[n] βbij ∂kij(·, (Xbi, Xbj)) ∂xi + βbji ∂kij(·, (Xbi, Xbj)) ∂xj + αij ˆξij, (11) where i ≤j. (ii) Minimizing (10) is equivalent to minimizing the following quadratic function: 1 2n X ai X bj (βbijGab ij11 + βbjiGab ij12) + X j αijh1a ij !2 + X i≤j X b (βbijh1b ij + βbjih2b ij ) + X i≤j αij∥ˆξij∥2 + µ 2 ∥f∥H,1 = 1 2n X ai (DT ai · θ)2 + Etθ + µ 2 X i≤j q θt ijFijθij (12) where Gab ijrs = ∂2kij(Xa,Xb) ∂xr∂ys , hrb ij = ⟨∂kij(·,Xb) ∂xr , ˆξij⟩are constant that only depends on X, θ = cat(vec(α), vec(β)) is the vector parameter and θij = cat(αij, vec(β·ij)) is a group of parameters. Dai, E and F are corresponding constant vectors and matrices based on G, h and the order of parameters. Then the above problem can be solved by group lasso [7, 21]. The first part of theorem states our representer theorem, and the second part is obtained by plugging in (11) to (10). See supplementary material for a detailed proof. Theorem 3.2 provides us with an efficient way to minimize (8), as it reduced the optimization to a group lasso problem for which many efficient solvers exist. Let ˆf µ = arg minf∈H ˆLµ(f) denote the solution to (12). We can estimate the graph as follows: ˆSµ = {(i, j) : ∥ˆf µ ij∦= 0}, (13) That is, the graph is encoded in the sparsity pattern of ˆf µ. 4 Statistical Guarantees In this section we study statistical properties of the proposed estimator (13). Let S denote the true edge set and Sc its complement. We prove that ˆSµ recovers S with high probability when the sample size n is sufficiently large. Denote D = mat(DT 11, . . . , DT ai, . . . , DT nd). We will need the following result on the estimated operator ˆC, Proposition 4.1 (Lemma 5 in [8] or Theorem 5 in [26] ) (Properties of C) 1. ∥ˆC −C∥HS = Op0(n−1 2 ) 2. ∥(C + µL)−1∥≤ 1 µ min diag(L), ∥C(C + µL)−1∥≤1, where µ > 0 and L is diagonal with positive constants. The following result gives first order optimality conditions for the optimization problem (8). Proposition 4.2 (Optimality Condition) ˆJ(f) + µ 2 Ω(f)2 achieves optimality when the following two conditions are satisfied: (1) ∇fs ˆJ(f) + µΩ(f) fs ∥fs∥Hs = 0 ∀s ∈S (2) Ω∗ Sc[∇fSc ˆJ(f)] ≤µΩ(f). 6 With these preliminary results, we have the following main results. Theorem 4.3 Assume that conditions A1-A7 are satisfied. The regularization parameter µ is selected at the order of n−1 4 and satisfies µ ≤ ηκminωmin 4(1−η)κmax√ |S|+ η 5 , where κmin = mins∈S ∥f ∗ s ∥> 0 and κmax = maxs∈S ∥f ∗ s ∥> 0. Then P( ˆSµ = S) →1. Proof Idea: The theorem above is the main theoretical guarantee for our score matching estimator. We use the “witness” proof framework inspired by [23, 29]. Let f ∗denote the true density function and p∗the probability density function. We first construct a solution ˆfS on true edge set S as ˆfS = min fSc=0 ˆJ(f) + µ 2 ( X (i,j)∈S ∥fij∥)2 (14) and set ˆfSc as zero. Using Proposition 4.1, we prove that ∥ˆfS −f ∗ S∥= Op(n−1 4 ). Then we compute the subgradient on Sc and prove that its dual norm is upper bounded by µΩ(f) by using assumptions A4, A5 and A6. Therefore we construct a solution that satisfied the optimality condition and converges in probability to the true graph. Refer to supplementary material for detailed proof. 5 Experiments We illustrate performance of our method on two simulations. In our experiments, we use the same kernel defined as follows: k(x, y) = exp(−∥x −y∥2 2 2σ2 ) + r(xT y + c)2, (15) that is, the summation of a Gaussian kernel and a polynomial kernel. We set σ2 = 1.5, r = 0.1 and c = 0.5 for all the simulations. We report the true positive rate vs false positive rate (ROC) curve to measure the performance of different procedures. Let S be the true edge set, and let ˆSµ be the estimated graph. The true positive rate is defined as TPRµ = |S=1 and ˆSµ=1| |S=1| , and false positive rate is FPRµ = | ˆSµ=1 and S=0| |S=0| , where |·| is the cardinality of the set. The curve is then plotted based on 100 uniformly-sampled regularization parameters and based on 20 independent runs. In the first simulation, we apply our algorithm to data sampled from a simple chain graph-based Gaussian model (see Figure 1 for detail), and compare its performance with glasso [6]. We use the same sampling method as in [31] to generate the data: we set Ωs = 0.4 for s ∈S and its diagonal to a constant such that Ωis positive definite. We set the dimension d to 25 and change the sample size n ∈{20, 40, 60, 80, 100} data points. Except for the low sample size case (n = 20), the performance of our method is comparable with glasso, without utilizing the fact that the underlying distribution is of a particular parametric form. Intuitively, to capture the graph structure, the proposed nonparametric method requires more data because of much weaker assumptions. To further show the strength of our algorithm, we test it on a nonparanormal (NPN) distribution ([18]). A random vector x = (x1, . . . , xp) has a nonparanormal distribution if there exist functions (f1, . . . , fp) such that (f1(x1), . . . , fd(xd)) ∼N(µ, Σ). When f is monotone and differentiable, the probability density function is given by P(x) = 1 (2π) p 2 |Σ| 1 2 exp{−1 2(f(x) −µ)T Σ−1(f(x) −µ)} Y j |f ′ j|. Here the graph structure is still encoded in the sparsity pattern of Ω= Σ−1, that is, xi⊥xj|x−i,j if and only if Ωij = 0 [18]. In our experiments we use the “Symmetric Power Transformation” [18], that is, fj(zj) = σj( g0(zj −µj) qR g2 0(t −µj)φ( t−µj σj )dt ) + µj, 7 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Adjacent Matrix G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G GG GGGGG GGGG G GG 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Glasso FalsePositiveRate TruePositiveRate G 20 40 60 80 100 G GGGGGGGGGGGGGGGGGGGGGG G G G GG G G G GG G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 SME FalsePositiveRate TruePositiveRate G 20 40 60 80 100 Figure 1: The estimation results for Gaussian graphical models. left: The adjacent matrix of true graph. center: the ROC curve of glasso. right: the ROC curve of score matching estimator (SME). G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G GG GG G G G GG G G GG GGG G G G G G G GG GG GG GGG GG G G G GGGG G GGG 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Glasso FalsePositiveRate TruePositiveRate G 20 40 60 80 100 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G GGG GG GG GG GG GGGGG 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 NonParaNormal FalsePositiveRate TruePositiveRate G 20 40 60 80 100 GGGGGGGGGGGGGGGGGGGGGGGGGGGGG G GG GGGGG G GG G G G G GG G G GG G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G GG G G G G G G GG G G GGGGGGGGG GGGG GG GGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 SME FalsePositiveRate TruePositiveRate G 20 40 60 80 100 Figure 2: The estimated ROC curves of nonparanormal graphical models for glasso (left), NPN (center) and SME (right). where g0(t) = sign(t)|t|α, to transform data. For comparison with graph lasso, we first use a truncation method to Gaussianize the data, and then apply graphical lasso to the transformed data. See [18, 31] for details. From figure 2, without knowing the underlying data distribution, the score matching estimator outperforms glasso, and show similar results to nonparanormal when the sample size is large. 6 Discussion In this paper, we have proposed a new procedure for learning the structure of a nonparametric graphical model. Our procedure is based on minimizing a penalized score matching objective, which can be performed efficiently using existing group lasso solvers. Particularly appealing aspect of our approach is that it does not require computing the normalization constant. Therefore, our procedure can be applied to a very broad family of infinite dimensional exponential families. We have established that the procedure provably recovers the true underlying graphical structure with highprobability under mild conditions. In the future, we plan to investigate more efficient algorithms for solving (10), since it is often the case that ˆC is well structured and can be efficiently approximated. Acknowledgments The authors are grateful to the financial support from National Institutes of Health R01GM0897532, National Science Foundation CAREER award CCF-1149811 and IBM Corporation Faculty Research Fund at the University of Chicago Booth School of Business. This work was completed in part with resources provided by the University of Chicago Research Computing Center. 8 References [1] R. Albert. Scale-free networks in cell biology. Journal of cell science, 118(21):4947–4957, 2005. [2] C. Ambroise, J. Chiquet, C. Matias, et al. Inferring sparse gaussian graphical models with latent structure. Electronic Journal of Statistics, 3:205–238, 2009. [3] N. Aronszajn. Theory of reproducing kernels. Transactions of the American mathematical society, pages 337–404, 1950. [4] S. Canu and A. Smola. Kernel methods and the exponential family. Neurocomputing, 69(7):714–720, 2006. [5] A. Defazio and T. S. Caetano. A convex formulation for learning scale-free networks via submodular relaxation. In Advances in Neural Information Processing Systems, pages 1250–1258, 2012. [6] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008. [7] J. Friedman, T. Hastie, and R. Tibshirani. A note on the group lasso and a sparse group lasso. arXiv preprint arXiv:1001.0736, 2010. [8] K. Fukumizu, F. R. Bach, and A. Gretton. Statistical consistency of kernel canonical correlation analysis. The Journal of Machine Learning Research, 8:361–383, 2007. [9] S. Geman and C. Graffigne. Markov random field image models and their applications to computer vision. In Proceedings of the International Congress of Mathematicians, volume 1, page 2, 1986. [10] A. Hyv¨arinen. Estimation of non-normalized statistical models by score matching. In Journal of Machine Learning Research, pages 695–709, 2005. [11] A. Hyv¨arinen. Some extensions of score matching. Computational statistics & data analysis, 51(5):2499– 2512, 2007. [12] Y. Jeon and Y. Lin. An effective method for high-dimensional log-density anova estimation, with application to nonparametric graphical model building. Statistica Sinica, 16(2):353, 2006. [13] R. Kindermann, J. L. Snell, et al. Markov random fields and their applications, volume 1. American Mathematical Society Providence, RI, 1980. [14] D. Koller and N. Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. [15] Y. A. Kourmpetis, A. D. Van Dijk, M. C. Bink, R. C. van Ham, and C. J. ter Braak. Bayesian markov random field analysis for protein function prediction based on network data. PloS one, 5(2):e9293, 2010. [16] J. Lafferty, A. McCallum, and F. C. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 2001. [17] S. Z. Li. Markov random field modeling in Image Analysis. 2011. [18] H. Liu, J. Lafferty, and L. Wasserman. The nonparanormal: Semiparametric estimation of high dimensional undirected graphs. The Journal of Machine Learning Research, 10:2295–2328, 2009. [19] Q. Liu and A. T. Ihler. Learning scale free networks by reweighted l1 regularization. In International Conference on Artificial Intelligence and Statistics, pages 40–48, 2011. [20] C. D. Manning and H. Sch¨utze. Foundations of statistical natural language processing. MIT press, 1999. [21] L. Meier, S. Van De Geer, and P. B¨uhlmann. The group lasso for logistic regression. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(1):53–71, 2008. [22] N. Meinshausen and P. B¨uhlmann. High-dimensional graphs and variable selection with the lasso. The Annals of Statistics, pages 1436–1462, 2006. [23] P. Ravikumar, M. J. Wainwright, and J. Lafferty. High-dimensional graphical model selection using l1regularized logistic regression. 2008. [24] P. Ravikumar, M. J. Wainwright, J. D. Lafferty, et al. High-dimensional ising model selection using 1-regularized logistic regression. The Annals of Statistics, 38(3):1287–1319, 2010. [25] R. T. Rockafellar. Convex analysis. Number 28. Princeton university press, 1970. [26] B. Sriperumbudur, K. Fukumizu, R. Kumar, A. Gretton, and A. Hyv¨arinen. Density estimation in infinite dimensional exponential families. arXiv preprint arXiv:1312.3516, 2013. [27] S. Sun, H. Wang, and J. Xu. Inferring block structure of graphical models in exponential families. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 939–947, 2015. [28] Z. Wei and H. Li. A markov random field model for network-based analysis of genomic data. Bioinformatics, 23(12):1537–1544, 2007. [29] E. Yang, G. Allen, Z. Liu, and P. K. Ravikumar. Graphical models via generalized linear models. In Advances in Neural Information Processing Systems, pages 1358–1366, 2012. [30] M. Yuan and Y. Lin. Model selection and estimation in the gaussian graphical model. Biometrika, 94(1):19–35, 2007. [31] T. Zhao, H. Liu, K. Roeder, J. Lafferty, and L. Wasserman. The huge package for high-dimensional undirected graph estimation in r. The Journal of Machine Learning Research, 13(1):1059–1062, 2012. 9 | 2015 | 205 |
5,709 | Streaming Min-Max Hypergraph Partitioning Dan Alistarh Microsoft Research Cambridge, United Kingdom dan.alistarh@microsoft.com Jennifer Iglesias∗ Carnegie Mellon University Pittsburgh, PA jiglesia@andrew.cmu.edu Milan Vojnovic Microsoft Research Cambridge, United Kingdom milanv@microsoft.com Abstract In many applications, the data is of rich structure that can be represented by a hypergraph, where the data items are represented by vertices and the associations among items are represented by hyperedges. Equivalently, we are given an input bipartite graph with two types of vertices: items, and associations (which we refer to as topics). We consider the problem of partitioning the set of items into a given number of components such that the maximum number of topics covered by a component is minimized. This is a clustering problem with various applications, e.g. partitioning of a set of information objects such as documents, images, and videos, and load balancing in the context of modern computation platforms. In this paper, we focus on the streaming computation model for this problem, in which items arrive online one at a time and each item must be assigned irrevocably to a component at its arrival time. Motivated by scalability requirements, we focus on the class of streaming computation algorithms with memory limited to be at most linear in the number of components. We show that a greedy assignment strategy is able to recover a hidden co-clustering of items under a natural set of recovery conditions. We also report results of an extensive empirical evaluation, which demonstrate that this greedy strategy yields superior performance when compared with alternative approaches. 1 Introduction In a variety of applications, one needs to process data of rich structure that can be conveniently represented by a hypergraph, where associations of the data items, represented by vertices, are represented by hyperedges, i.e. subsets of items. Such data structure can be equivalently represented by a bipartite graph that has two types of vertices: vertices that represent items, and vertices that represent associations among items, which we refer to as topics. In this bipartite graph, each item is connected to one or more topics. The input can be seen as a graph with vertices belonging to (overlapping) communities. There has been significant work on partitioning a set of items into disjoint components such that similar items are assigned to the same component, see, e.g., [8] for a survey. This problem arises in the context of clustering of information objects such as documents, images or videos. For example, the goal may be to partition given collection of documents into disjoint sub-collections such that the maximum number of distinct topics covered by each sub-collection is minimized, resulting in a ∗Work performed in part while an intern with Microsoft Research. 1 Figure 1: A simple example of a set of items with overlapping associations to topics. Figure 2: An example of hidden coclustering with five hidden clusters. parsimonious summary. The same fundamental problem also arises in processing of complex data workloads, including enterprise emails [10], online social networks [18], graph data processing and machine learning computation platforms [20, 21, 2], and load balancing in modern streaming query processing platforms [24]. In this context, the goal is to partition a set of data items over a given number of servers to balance the load according to some given criteria. Problem Definition. We consider the min-max hypergraph partitioning problem defined as follows. The input to the problem is a set of items, a set of topics, a number of components to partition the set of items, and a demand matrix that specifies which particular subset of topics is associated with each individual item. Given a partitioning of the set of items, the cost of a component is defined as the number of distinct topics that are associated with items of the given component. The cost of a given partition is the maximum cost of a component. In other words, given an input hypergraph and a partition of the set of vertices into a given number of disjoints components, the cost of a component is defined to be the number of hyperedges that have at least one vertex assigned to this component. For example, for the simple input graph in Figure 1, a partition of the set of items into two components {1, 3} and {2, 4} amounts to the cost of the components each of value 2, thus, the cost of the partition is of value 2. The cost of a component is a submodular function as the distinct topics associated with items of the component correspond to a neighborhood set in the input bipartite graph. In the streaming computation model that we consider, items arrive sequentially one at a time, and each item needs to be assigned, irrevocably, to one component at its arrival time. This streaming computation model allows for limited memory to be used at any time during the execution whose size is restricted to be at most linear in the number of the components. Both these assumptions arise as part of system requirements for deployment in web-scale services. The min-max hypergraph partition problem is NP hard. The streaming computation problem is even more difficult, as less information is available to the algorithm when an item must be assigned. Contribution. In this paper, we consider the streaming min-max hypergraph partitioning problem. We identify a greedy item placement strategy which outperforms all alternative approaches considered on real-world datasets, and can be proven to have a non-trivial recovery property: it recovers hidden co-clusters of items in probabilistic inputs subject to a recovery condition. Specifically, we show that, given a set of hidden co-clusters to be placed onto k components, the greedy strategy will tend to place items from the same hidden cluster onto the same component, with high probability. In turn, this property implies that greedy will provide a constant factor approximation of the optimal partition on inputs satisfying the recovery property. The probabilistic input model we consider is defined as follows. The set of topics is assumed to be partitioned into a given number ℓ≥1 of disjoint hidden clusters. Each item is connected to topics according to a mixture probability distribution defined as follows. Each item first selects one of the hidden clusters as a home hidden cluster by drawing an independent sample from a uniform distribution over the hidden clusters. Then, it connects to each topic from its home hidden cluster independently with probability p, and it connects to each topic from each other hidden cluster with probability q ≤p. This defines a hidden co-clustering of the input bipartite graph; see Figure 2 for an example. This model is similar in spirit to the popular stochastic block model of an undirected graph, and it corresponds to a hidden co-clustering [6, 7, 17, 4] model of an undirected bipartite graph. We consider asymptotically accurate recovery of this hidden co-clustering. 2 A hidden cluster is said to be asymptotically recovered if the portion of items from the given hidden cluster assigned to the same partition goes to one asymptotically as the number of items observed grows large. An algorithm guarantees balanced asymptotic recovery if, additionally, it ensures that the cost of the most loaded partition is within a constant of the average partition load. Our main analytical result is showing that a simple greedy strategy provides balanced asymptotic recovery of hidden clusters (Theorem 1). We prove that a sufficient condition for the recovery of hidden clusters is that the number of hidden clusters ℓis at least k log k, where k is the number of components, and that the gap between the probability parameters q and p is sufficiently large: q < log r/(kr) < 2 log r/r ≤p, where r is the number of topics in a hidden cluster. Roughly speaking, this means that if the mean number of topics to which an item is associated with in its home hidden cluster of topics is at least twice as large as the mean number of topics to which an item is associated with from other hidden clusters of topics, then the simple greedy online algorithm guarantees asymptotic recovery. The proof is based on a coupling argument, where we first show that assigning an item to a partition based on the number of topics it has in common with each partition is similar to making the assignment proportionally to the number of items corresponding to the same hidden cluster present on each partition. In turn, this allows us to couple the assignment strategy with a Polya urn process [5] with “rich-get-richer” dynamics, which implies that the policy converges to assigning each item from a hidden cluster to the same partition. Additionally, this phenomenon occurs “in parallel” for each cluster. This recovery property will imply that this strategy will ensure a constant factor approximation of the optimum assignment. Further, we provide experimental evidence that this greedy online algorithm exhibits good performance for several real-world input bipartite graphs, outperforming more complex assignment strategies, and even some offline approaches. 2 Problem Definition and Basic Results In this section we provide a formal problem definition, and present some basic results on the computational hardness and lower bounds. Input. The input is defined by a set of items N = {1, 2, . . . , n}, a set of topics M = {1, 2, . . . , m}, and a given number of components k. Dependencies between items and topics are given by a demand matrix D = (di,l) ∈{0, 1}n×m where di,l = 1 indicates that item i needs topic l, and di,l = 0, otherwise.1 Alternatively, we can represent the input as a bipartite graph G = (N, M, E) where there is an edge (i, l) ∈E if and only if item i needs topic l or as a hypergraph H = (N, E) where a hyperedge e ∈E consists of all items that use the same topic. The Problem. An assignment of items to components is given by x ∈{0, 1}n×k where xi,j = 1 if item i is assigned to component j, and xi,j = 0, otherwise. Given an assignment of items to components x, the cost of component j is defined to be equal to the minimum number of distinct topics that are needed by this component to cover all the items assigned to it, i.e. cj(x) = ∑ l∈M min {∑ i∈N di,lxi,j, 1 } . As defined, the cost of each component is a submodular function of the items assigned to it. We consider the min-max hypergraph partitioning problem defined as follows: minimize max{c1(x), c2(x), . . . , ck(x)} subject to ∑ j∈[k] xi,j = 1 ∀i ∈[n] x ∈{0, 1}n×k (1) We note that this problem is an instance of the submodular load balancing, as defined in [23]. 1The framework allows for a natural generalization to allow for real-valued demands. In this paper we focus on {0, 1}-valued demands. 3 Basic Results. This problem is NP-Complete, by reduction from the subset sum problem. Proposition 1. The min-max hypergraph partitioning problem is NP-Complete. We now give a lower bound on the optimal value of the problem, using the observation that each topic needs to be made available on at least one component. Proposition 2. For every partition of the set of items in k components, the maximum cost of a component is larger than or equal to m/k, where m is the number of topics. We next analyze the performance of an algorithm which simply assigns each item independently to a component chosen uniformly at random from the set of all components upon its arrival. Although this is a popular strategy commonly deployed in practice (e.g. for load balancing in computation platforms), the following result shows that it does not yield a good solution for the min-max hypergraph partitioning problem. Proposition 3. The expected maximum load of a component under random assignment is at least (1 −∑m j=1(1 −1/k)nj/m) · m, where nj is the number of items associated with topic j. For instance, if we assume that nj ≥k for each topic j, we obtain that the expected maximum load is of at least (1 −1/e)m. This suggests that the performance of random assignment is poor: on an input where m topics form k disjoint clusters, and each item subscribes to a single cluster, the optimal solution has cost m/k, whereas, by the above claim, random assignment has approximate cost 2m/3, yielding a competitive ratio that is linear in k. Balanced Recovery of Hidden Co-Clusters. We relax the worst-case input requirements by defining a family of hidden co-clustering inputs. Our model is a generalization of the stochastic block model of a graph to the case of hypergraphs. We consider a set of topics R, partitioned into ℓclusters C1, C2, . . . , Cℓ, each of which contains r topics. Given these hidden clusters, each item is associated with topics as follows. Each item is first assigned a “home” cluster Ch, chosen uniformly at random among the hidden clusters. The item then connects to topics inside its home cluster by picking each topic independently with fixed probability p. Further, the item connects to topics from a fixed arbitrary “noise” set Qh of size at most r/2 outside its home cluster Ch, where the item is connected to each topic in Qh uniformly at random, with fixed probability q. (Sampling outside topics from the set of all possible topics would in the limit lead to every partition to contain all possible topics, which renders the problem trivial. We do not impose this limitation in the experimental validation.) Definition 1 (Hidden Co-Clustering). A bipartite graph is in HC(n, r, ℓ, p, q) if it is constructed using the above process, with n items and ℓclusters with r topics per cluster, where each item subscribes to topics inside its randomly chosen home cluster with probability p, and to topics from the noise set with probability q. At each time step t, a new item is presented in the input stream of items, and is immediately assigned to one of the k components, S1, S2, . . . , Sk, according to some algorithm. Algorithms do not know the number of hidden clusters or their size, but can examine previous assignments. Definition 2 (Asymptotic Balanced Recovery.). Given a hidden co-clustering HC(n, r, ℓ, p, q), we say an algorithm asymptotically recovers the hidden clusters C1, C2, . . . , Cℓif there exists a recovery time tR during its execution after which, for each hidden cluster Ci, there exists a component Sj such that each item with home cluster Ci is assigned to component Sj with probability that goes to 1 as the number of items grows large. Moreover, the recovery is balanced if the ratio between the maximum cost of a component and the average cost over components is upper bounded by a constant B > 0. 3 Streaming Algorithm and the Recovery Guarantee Recall that we consider the online problem, where we receive one item at a time together with all its corresponding topics. The item must be immediately and irrevocably assigned to some component. In the following, we describe the greedy strategy, specified in Algorithm 1. 4 Data: Hypergraph H = (V, E), received one item (vertex) at a time, k partitions, capacity bound c Result: A partition of V into k parts 1 Set initial partitions S1, S2, . . . , Sk to be empty sets 2 while there are incoming items do 3 Receive the next item t, and its topics R 4 I ←{i : |Si| ≤minj |Sj| + c} /* components not exceeding capacity */ 5 Compute ri = |Si ∩R| ∀i ∈I /* size of topic intersection */ 6 j ←arg maxi∈I ri /* if tied, choose a least loaded component */ 7 Sj ←Sj ∪R /* item t and its topics are assigned to Sj */ 8 return S1, S2, . . . , Sk Algorithm 1: The greedy algorithm. This strategy places each incoming item onto the component whose incremental cost (after adding the item and its topics) is minimized. The immediate goal is not balancing, but rather clustering similar items. This could in theory lead to large imbalances; to prevent this, we add a balancing constraint specifying the maximum load imbalance. If adding the item to the first candidate component would violate the balancing constraint, then the item is assigned to the first valid component, in decreasing order of the intersection size. 3.1 The Recovery Theorem In this section, we present our main theoretical result, which provides a sufficient condition for the greedy strategy to guarantee balanced asymptotic recovery of hidden clusters. Theorem 1 (The Recovery Theorem). For a random input consisting of a hidden co-cluster graph G in HC(n, r, ℓ, p, q) to be partitioned across k ≥2 components, if the number of clusters is ℓ≥ k log k, and the probabilities p and q satisfy p ≥2 log r/r, and q ≤log r/(rk), then the greedy algorithm ensures balanced asymptotic recovery of the hidden clusters. Remarks. Specifically, we prove that, under the given conditions, recovery occurs for each hidden cluster by the time r/ log r cluster items have been observed, with probability 1−1/rc, where c ≥1 is a constant. Moreover, clusters are randomly distributed among the k components. Together, these results can be used to bound the maximum cost of a partition to be at most a constant factor away the lower bound of rℓ/k given by Lemma 2. The extra cost comes from incorrect assignments before the recovery time, and from the imperfect balancing of clusters over the components. Corollary 1. The expected maximum load of a component is at most 2.4rℓ/k. 3.2 Proof Overview We now provide an overview of the main ideas of the proof, which is available in the full version of the paper. Preliminaries. We say that two random processes are coupled if their random choices are the same. We say that an event occurs with high probability (w.h.p.) if it occurs with probability at least 1 −1/rc, where c ≥1 is a constant. We make use of a Polya urn process [5], which is defined as follows. We start each of k ≥2 urns with one ball, and, at each step t, observe a new ball. We assign the new ball to urn i ∈{1, . . . , k} with probability proportional to (bi)γ, where γ > 0 is a fixed real constant, and bi is the number of balls in urn i at time t. We use the following classic result. Lemma 1 (Polya Urn Convergence [5]). Consider a finite k-bin Polya urn process with exponent γ > 1, and let xt i be the fraction of balls in urn i at time t. Then, almost surely, the limit Xi = limt→∞xt i exists for each 1 ≤i ≤k. Moreover, we have that there exists an urn j such that Xj = 1, and that Xi = 0, for all i ̸= j. Step 1: Recovering a Single Cluster. We first prove that, in the case of a single home cluster for all items, and two components (k = 2), with no balance constraints, the greedy algorithm with no balance constraints converges to a monopoly, i.e., eventually assigns all the items from 5 Dataset Items Topics # of Items # of Topics # edges Book Ratings Readers Books 107,549 105,283 965,949 Facebook App Data Users Apps 173,502 13,604 5,115,433 Retail Data Customers Items bought 74,333 16,470 947,940 Zune Podcast Data Listeners Podcasts 80,633 7928 1,037,999 Figure 3: A table showing the data sets and information about the items and topics. this cluster onto the same component, w.h.p. Formally, there exists some convergence time tR and some component Si such that, after time tR, all future items will be assigned to component Si, with probability at least 1 −1/rc. Our strategy will be to couple greedy assignment with a Polya urn process with exponent γ > 1, showing that the dynamics of the two processes are the same, w.h.p. There is one significant technical challenge that one needs to address: while the Polya process assigns new balls based on the ball counts of urns, greedy assigns items (and their respective topics) based on the number of topic intersections between the item and the partition. We resolve this issue by taking a two-tiered approach. Roughly, we first prove that, w.h.p., we can couple the number of items in a component with the number of unique topics assigned to the same component. We then prove that this is enough to couple the greedy assignment with a Polya urn process with exponent γ > 1. This will imply that greedy converges to a monopoly, by Lemma 1. We then extend this argument to a single cluster and k ≥3 components, but with no load balancing constraints. The crux of the extension is that we can apply the k = 2 argument to pairs of components to yield that some component achieves a monopoly. Lemma 2. Given a single cluster instance in HC(n, r, ℓ, p, q) with ℓ= 1, p ≥2 log r/r and q = 0 to be partitioned in k components, the greedy algorithm with no balancing constraints will eventually place every item in the cluster onto the same component w.h.p. Second Step: The General Case. We complete the proof of Theorem 1 by considering the general case with ℓ≥2 clusters and q > 0. We proceed in three sub-steps. We first show the recovery claim for general number of clusters ℓ≥2, but q = 0 and no balance constraints. This follows since, for q = 0, the algorithm’s choices with respect to clusters and their respective topics are independent. Hence clusters are assigned to components uniformly at random. Second, we extend the proof for any value q ≤log r/(rk), by showing that the existence of “noise” edges under this threshold only affects the algorithm’s choices with very low probability. Finally, we prove that the balance constraints are practically never violated for this type of input, as clusters are distributed uniformly at random. We obtain the following. Lemma 3. For a hidden co-cluster input, the greedy algorithm with q = 0 and without capacity constraints can be coupled with a version of the algorithm with q ≤log r/(rk) and a constant capacity constraint, w.h.p. Final Argument. Putting together Lemmas 2 and 3, we obtain that greedy ensures balanced recovery for general inputs in HC(n, r, ℓ, p, q), for parameter values ℓ≥k log k, p ≥2 log r/r, and q ≤log r/(rk). 4 Experimental Results Datasets and Evaluation. We first consider a set of real-world bipartite graph instances with a summary provided in Table 3. All these datasets are available online, except for Zune podcast subscriptions. We chose the consumer to be the item and the resource to be the topic. We provide an experimental validation of the analysis on synthetic co-cluster inputs in the full version of our paper. In our experiments, we considered partitioning of items onto k components for a range of values going from two to ten components. We report the maximum number of topics in a component normalized by the cost of a perfectly balanced solution m/k, where m is the total number of topics. Online Assignment Algorithms. We compared the following other online assignment strategies: 6 2 3 4 5 6 7 8 9 10 k 1 2 3 4 5 6 7 8 9 10 Normalized Maximum Load All on One Proportional Greedy (Decreasing Order) Balance Big Prefer Big Random Greedy (Random Order) Greedy (Decreasing Order) (a) Book Ratings 2 3 4 5 6 7 8 9 10 k 1 2 3 4 5 6 7 8 9 10 Normalized Maximum Load All on One Proportional Greedy (Decreasing Order) Balance Big Prefer Big Random Greedy (Random Order) Greedy (Decreasing Order) (b) Facebook App Data 2 3 4 5 6 7 8 9 10 k 1 2 3 4 5 6 7 8 9 10 Normalized Maximum Load All on One Proportional Greedy (Decreasing Order) Balance Big Prefer Big Random Greedy (Random Order) Greedy (Decreasing Order) (c) Retail Data 2 3 4 5 6 7 8 9 10 k 1 2 3 4 5 6 7 8 9 10 Normalized Maximum Load All on One Proportional Greedy (Decreasing Order) Balance Big Prefer Big Random Greedy (Random Order) Greedy (Decreasing Order) (d) Zune Podcast Data Figure 4: The normalized maximum load for various online assignment algorithms under different input bipartite graphs versus the numbers of components. • All-on-One: trivially assign all items and topics to one component. • Random: assign each item independently to a component chosen uniformly at random from the set of all components. • Balance Big: inspect the items in a random order and assign the large items to the least loaded component, and the small items according to greedy. An item is considered large if it subscribes to more than 100 topics, and small otherwise. • Prefer Big: inspect the items in a random order, and keep a buffer of up to 100 small items; when receiving a large item, put it on the least loaded component; when the buffer is full, place all the small items according to greedy. • Greedy: assign the items to the component they have the most topics in common with. We consider two variants: items arrive in random order, and items arrive in decreasing order of the number of topics. We allow a slack (parameter c) of up to 100 topics. • Proportional Allocation: inspect the items in decreasing order of the number of topics; the probability an item is assigned to a component is proportional to the number of common topics. Results. Greedy generally outperforms other online heuristics (see Figure 4). Also, its performance is improved if items arrive in decreasing order of number of topics. Intuitively, items with larger number of topics provide more information about the underlying structure of the bipartite graph than the items with smaller number of topics. Interestingly, adding randomness to the greedy assignment made it perform far worse; most times Proportional Assignment approached the worst case scenario. Random assignment outperformed Proportional Assignment and regularly outperformed Prefer Big and Balance Big item assignment strategies. Offline methods. We also tested the streaming algorithm for a wide range of synthetic input bipartite graphs according to the model defined in this paper, and several offline approaches for the problem including hMetis [11], label propagation, basic spectral methods, and PARSA [13]. We found that label propagation and spectral methods are extremely time and memory intensive on our inputs, due to the large number of topics and item-topic edges. hMetis returns within seconds, however the assignments were not competitive. However, hMetis provides balanced hypergraph cuts, which are not necessarily a good solution to our problem. 7 Compared to PARSA on bipartite graph inputs, greedy provides assignments with up to 3x higher max partition load. On social graphs, the performance difference can be as high as 5x. This discrepancy is natural since PARSA has the advantage of performing multiple passes through the input. 5 Related Work The related problem of min-max multi-way graph cut problem, originally introduced in [23], is defined as follows: given an input graph, the objective is to component the set of vertices such that the maximum number of edges adjacent to a component is minimized. A similar problem was recently studied, e.g. [1], with respect to expansion, defined as the ratio of the sum of weights of edges adjacent to a component and the minimum between the sum of the weights of vertices within and outside the given component. The balanced graph partition problem is a bi-criteria optimization problem where the goal is to find a balanced partition of the set of vertices that minimizes the total number of edges cut. The best known approximation ratio for this problem is poly-logarithmic in the number of vertices [12]. The balanced graph partition problem was also considered for the set of edges of a graph [2]. The related problem of community detection in an input graph data has been commonly studied for the planted partition model, also well known as stochastic block model. Tight conditions for recovery of hidden clusters are known from the recent work in [16] and [14], as well as various approximation algorithms, e.g. see [3]. Some variants of hypergraph partition problems were studied by the machine learning research community, including balanced cuts studied by [9] using relaxations based on the concept of total variation, and the maximum likelihood identification of hidden clusters [17]. The difference is that we consider the min-max multi-way cut problem for a hypergraph in the streaming computation model. PARSA [13] considers the same problem in an offline model, where the entire input is initially available to the algorithm, and provides an efficient distributed algorithm for optimizing multiple criteria. A key component of PARSA is a procedure for optimizing the order of examining vertices. By contrast, we focus on performance under arbitrary arrival order, and provide analytic guarantees under a stochastic input model. Streaming computation with limited memory was considered for various canonical problems such as principal component analysis [15], community detection [22], balanced graph partition [20, 21], and query placement [24]. For the class of (hyper)graph partition problems, most of the work is restricted to studying various streaming heuristics using empirical evaluations with a few notable exceptions. A first theoretical analysis of streaming algorithms for balanced graph partitioning was presented in [19] using the framework similar to the one deployed in this paper. The paper gives sufficient conditions for a greedy streaming strategy to recover clusters of vertices for the input graph according to stochastic block model, which makes irrevocable assignments of vertices as they are observed in the input stream and uses memory limited to grow linearly with the number of clusters. As in our case, the argument uses a reduction to Polya urn processes. The two main differences with our work is that we consider a different problem (min-max hypergraph partition) and this requires a novel proof technique based on a two-step reduction to Polya urn processes. Streaming algorithms for the recovery of clusters in a stochastic block model were also studied in [22], under a weaker computation model, which does not require irrevocable assignments of vertices at instances they are presented in the input stream and allows for memory polynomial in the number of vertices. 6 Conclusion We studied the min-max hypergraph partitioning problem in the streaming computation model with the size of memory limited to be at most linear in the number of the components of the partition. We established first approximation guarantees for inputs according to a random bipartite graph with hidden co-clusters, and evaluated performance on several real-world input graphs. There are several interesting open questions for future work. It is of interest to study the tightness of the given recovery condition, and, in general, better understand the trade-off between the memory size and the accuracy of the recovery. It is also of interest to consider the recovery problem for a wider set of random bipartite graph models. Another question of interest is to consider dynamic graph inputs with addition and deletion of items and topics. 8 References [1] N. Bansal, U. Feige, R. Krauthgamer, K. Makarychev, V. Nagarajan, J. SeffiNaor, and R. Schwartz. Min-max graph partitioning and small set expansion. SIAM J. on Computing, 43(2):872–904, 2014. [2] F. Bourse, M. Lelarge, and M. Vojnovic. Balanced graph edge partition. In Proc. of ACM KDD, 2014. [3] Y. Chen, S. Sanghavi, and H. Xu. Clustering sparse graphs. In Proc. of NIPS, 2012. [4] Y. Cheng and G. M. Church. Biclustering of expression data. In Ismb, volume 8, pages 93–103, 2000. [5] F. Chung, S. Handjani, and D. Jungreis. Generalizations of Polya’s urn problem. Annals of Combinatorics, (7):141–153, 2003. [6] I. S. Dhillon. Co-clustering documents and words using bipartite spectral graph partitioning. In Proc. of ACM KDD, 2001. [7] I. S. Dhillon, S. Mallela, and D. S. Modha. Information-theoretic co-clustering. In Proc. of ACM KDD, 2003. [8] S. Fortunato. Community detection in graphs. Physics Reports, 486(75), 2010. [9] M. Hein, S. Setzer, L. Jost, and S. S. Rangapuram. The total variation on hypergraphs - learning hypergraphs revisited. In Proc. of NIPS, 2013. [10] T. Karagiannis, C. Gkantsidis, D. Narayanan, and A. Rowstron. Hermes: clustering users in large-scale e-mail services. In Proc. of ACM SoCC, 2010. [11] G. Karypis and V. Kumar. Multilevel k-way hypergraph partitioning. VLSI Design, 11(3), 2000. [12] R. Krauthgamer, J. S. Naor, and R. Schwartz. Partitioning graphs into balanced components. 2009. [13] M. Li, D. G. Andersen, and A. J. Smola. Graph partitioning via parallel submodular approximation to accelerate distributed machine learning. arXiv preprint arXiv:1505.04636, 2015. [14] L. Massouli´e. Community detection thresholds and the weak Ramanujan property. In Proc. of ACM STOC, 2014. [15] I. Mitliagkas, C. Caramanis, and P. Jain. Memory limited, streaming PCA. In Proc. of NIPS, 2013. [16] E. Mossel, J. Neeman, and A. Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, pages 1–31, 2014. [17] L. O’Connor and S. Feizi. Biclustering using message passing. In Proc. of NIPS, 2014. [18] J. M. Pujol et al. The little engine(s) that could: Scaling online social networks. IEEE/ACM Trans. Netw., 20(4):1162–1175, 2012. [19] I. Stanton. Streaming balanced graph partitioning algorithms for random graphs. In Proc. of ACM-SIAM SODA, 2014. [20] I. Stanton and G. Kliot. Streaming graph partitioning for large distributed graphs. In Proc. of ACM KDD, 2012. [21] C. E. Tsourakakis, C. Gkantsidis, B. Radunovic, and M. Vojnovic. FENNEL: streaming graph partitioning for massive scale graphs. In Proc. of ACM WSDM, 2014. [22] S.-Y. Yun, M. Lelarge, and A. Proutiere. Streaming, memory limited algorithms for community detection. In Proc. of NIPS, 2014. [23] Z. Z. Svitkina and E. Tardos. Min-max multiway cut. In K. Jansen, S. Khanna, J. Rolim, and D. Ron, editors, Proc. of APPROX/RANDOM, pages 207–218. 2004. [24] B. Zong, C. Gkantsidis, and M. Vojnovic. Herding small streaming queries. In Proc. of ACM DEBS, 2015. 9 | 2015 | 206 |
5,710 | Principal Differences Analysis: Interpretable Characterization of Differences between Distributions Jonas Mueller CSAIL, MIT jonasmueller@csail.mit.edu Tommi Jaakkola CSAIL, MIT tommi@csail.mit.edu Abstract We introduce principal differences analysis (PDA) for analyzing differences between high-dimensional distributions. The method operates by finding the projection that maximizes the Wasserstein divergence between the resulting univariate populations. Relying on the Cramer-Wold device, it requires no assumptions about the form of the underlying distributions, nor the nature of their inter-class differences. A sparse variant of the method is introduced to identify features responsible for the differences. We provide algorithms for both the original minimax formulation as well as its semidefinite relaxation. In addition to deriving some convergence results, we illustrate how the approach may be applied to identify differences between cell populations in the somatosensory cortex and hippocampus as manifested by single cell RNA-seq. Our broader framework extends beyond the specific choice of Wasserstein divergence. 1 Introduction Understanding differences between populations is a common task across disciplines, from biomedical data analysis to demographic or textual analysis. For example, in biomedical analysis, a set of variables (features) such as genes may be profiled under different conditions (e.g. cell types, disease variants), resulting in two or more populations to compare. The hope of this analysis is to answer whether or not the populations differ and, if so, which variables or relationships contribute most to this difference. In many cases of interest, the comparison may be challenging primarily for three reasons: 1) the number of variables profiled may be large, 2) populations are represented by finite, unpaired, high-dimensional sets of samples, and 3) information may be lacking about the nature of possible differences (exploratory analysis). We will focus on the comparison of two high dimensional populations. Therefore, given two unpaired i.i.d. sets of samples Xpnq “ xp1q, . . . , xpnq „ PX and Ypmq “ yp1q, . . . , ypmq „ PY , the goal is to answer the following two questions about the underlying multivariate random variables X, Y P Rd: (Q1) Is PX “ PY ? (Q2) If not, what is the minimal subset of features S Ñ t1, . . . , du such that the marginal distributions differ PXS ‰ PYS while PXSC « PYSC for the complement? A finer version of (Q2) may additionally be posed which asks how much each feature contributes to the overall difference between the two probability distributions (with respect to the given scale on which the variables are measured). Many two-sample analyses have focused on characterizing limited differences such as mean shifts [1, 2]. More general differences beyond the mean of each feature remain of interest, however, including variance/covariance of demographic statistics such as income. It is also undesirable to restrict the analysis to specific parametric differences, especially in exploratory analysis where the nature of the underlying distributions may be unknown. In the univariate case, a number of nonparametric tests of equality of distributions are available with accompanying concentration results [3]. Popular examples of such divergences (also referred to as probability metrics) include: f-divergences 1 (Kullback-Leibler, Hellinger, total-variation, etc.), the Kolmogorov distance, or the Wasserstein metric [4]. Unfortunately, this simplicity vanishes as the dimensionality d grows, and complex test-statistics have been designed to address some of the difficulties that appear in high-dimensional settings [5, 6, 7, 8]. In this work, we propose the principal differences analysis (PDA) framework which circumvents the curse of dimensionality through explicit reduction back to the univariate case. Given a pre-specified statistical divergence D which measures the difference between univariate probability distributions, PDA seeks to find a projection β which maximizes DpβT X, βT Y q subject to the constraints ||β||2 § 1, β1 • 0 (to avoid underspecification). This reduction is justified by the Cramer-Wold device, which ensures that PX ‰ PY if and only if there exists a direction along which the univariate linearly projected distributions differ [9, 10, 11]. Assuming D is a positive definite divergence (meaning it is nonzero between any two distinct univariate distributions), the projection vector produced by PDA can thus capture arbitrary types of differences between high-dimensional PX and PY . Furthermore, the approach can be straightforwardly modified to address (Q2) by introducing a sparsity penalty on β and examining the features with nonzero weight in the resulting optimal projection. The resulting comparison pertains to marginal distributions up to the sparsity level. We refer to this approach as sparse differences analysis or SPARDA. 2 Related Work The problem of characterizing differences between populations, including feature selection, has received a great deal of study [2, 12, 13, 5, 1]. We limit our discussion to projection-based methods which, as a family of methods, are closest to our approach. For multivariate two-class data, the most widely adopted methods include (sparse) linear discriminant analysis (LDA) [2] and the logistic lasso [12]. While interpretable, these methods seek specific differences (e.g., covariance-rescaled average differences) or operate under stringent assumptions (e.g., log-linear model). In contrast, SPARDA (with a positive-definite divergence) aims to find features that characterize a priori unspecified differences between general multivariate distributions. Perhaps most similar to our general approach is Direction-Projection-Permutation (DiProPerm) procedure of Wei et al. [5], in which the data is first projected along the normal to the separating hyperplane (found using linear SVM, distance weighted discrimination, or the centroid method) followed by a univariate two-sample test on the projected data. The projections could also be chosen at random [1]. In contrast to our approach, the choice of the projection in such methods is not optimized for the test statistics. We note that by restricting the divergence measure in our technique, methods such as the (sparse) linear support vector machine [13] could be viewed as special cases. The divergence in this case would measure the margin between projected univariate distributions. While suitable for finding well-separated projected populations, it may fail to uncover more general differences between possibly multi-modal projected populations. 3 General Framework for Principal Differences Analysis For a given divergence measure D between two univariate random variables, we find the projection pβ that solves max βPB,||β||0§k DpβT p Xpnq, βT pY pmqq ( (1) where B :“ tβ P Rd : ||β||2 § 1, β1 • 0u is the feasible set, ||β||0 § k is the sparsity constraint, and βT p Xpnq denotes the observed random variable that follows the empirical distribution of n samples of βT X. Instead of imposing a hard cardinality constraint ||β||0 § k, we may instead penalize by adding a penalty term1 ´λ||β||0 or its natural relaxation, the `1 shrinkage used in Lasso [12], sparse LDA [2], and sparse PCA [14, 15]. Sparsity in our setting explicitly restricts the comparison to the marginal distributions over features with non-zero coefficients. We can evaluate the null hypothesis PX “ PY (or its sparse variant over marginals) using permutation testing (cf. [5, 16]) with statistic DppβT p Xpnq, pβT pY pmqq. 1In practice, shrinkage parameter λ (or explicit cardinality constraint k) may be chosen via cross-validation by maximizing the divergence between held-out samples. 2 The divergence D plays a key role in our analysis. If D is defined in terms of density functions as in f-divergence, one can use univariate kernel density estimation to approximate projected pdfs with additional tuning of the bandwidth hyperparameter. For a suitably chosen kernel (e.g. Gaussian), the unregularized PDA objective (without shrinkage) is a smooth function of β, and thus amenable to the projected gradient method (or its accelerated variants [17, 18]). In contrast, when D is defined over the cdfs along the projected direction – e.g. the Kolmogorov or Wasserstein distance that we focus on in this paper – the objective is nondifferentiable due to the discrete jumps in the empirical cdf. We specifically address the combinatorial problem implied by the Wasserstein distance. Moreover, since the divergence assesses general differences between distributions, Equation (1) is typically a non-concave optimization. To this end, we develop a semi-definite relaxation for use with the Wasserstein distance. 4 PDA using the Wasserstein Distance In the remainder of the paper, we focus on the squared L2 Wasserstein distance (a.k.a. Kantorovich, Mallows, Dudley, or earth-mover distance), defined as DpX, Y q “ min PXY EPXY ||X ´ Y ||2 s.t. pX, Y q „ PXY , X „ PX, Y „ PY (2) where the minimization is over all joint distributions over pX, Y q with given marginals PX and PY . Intuitively interpreted as the amount of work required to transform one distribution into the other, D provides a natural dissimilarity measure between populations that integrates both the fraction of individuals which are different and the magnitude of these differences. While component analysis based on the Wasserstein distance has been limited to [19], this divergence has been successfully used in many other applications [20]. In the univariate case, (2) may be analytically expressed as the L2 distance between quantile functions. We can thus efficiently compute empirical projected Wasserstein distances by sorting X and Y samples along the projection direction to obtain quantile estimates. Using the Wasserstein distance, the empirical objective in Equation (1) between unpaired sampled populations txp1q, . . . , xpnqu and typ1q, . . . , ypmqu can be shown to be max βPB ||β||0§k " min MPM, n ÿ i“1 m ÿ j“1 pβT xpiq ´ βT ypjqq2Mij * “ max βPB ||β||0§k " min MPM βT WMβ * (3) where M is the set of all n ˆ m nonnegative matching matrices with fixed row sums “ 1{n and column sums “ 1{m (see [20] for details), WM :“ ∞ i,jrZij b ZijsMij, and Zij :“ xpiq ´ ypjq. If we omitted (fixed) the inner minimization over the matching matrices and set λ “ 0, the solution of (3) would be simply the largest eigenvector of WM. Similarly, for the sparse variant without minizing over M, the problem would be solvable as sparse PCA [14, 15, 21]. The actual maxmin problem in (3) is more complex and non-concave with respect to β. We propose a two-step procedure similar to “tighten after relax” framework used to attain minimax-optimal rates in sparse PCA [21]. First, we first solve a convex relaxation of the problem and subsequently run a steepest ascent method (initialized at the global optimum of the relaxation) to greedily improve the current solution with respect to the original nonconvex problem whenever the relaxation is not tight. Finally, we emphasize that PDA (and SPARDA) not only computationally resembles (sparse) PCA, but the latter is actually a special case of the former in the Gaussian, paired-sample-differences setting. This connection is made explicit by considering the two-class problem with paired samples pxpiq, ypiqq where X, Y follow two multivariate Gaussian distributions. Here, the largest principal component of the (uncentered) differences xpiq ´ ypiq is in fact equivalent to the direction which maximizes the projected Wasserstein difference between the distribution of X ´ Y and a delta distribution at 0. 4.1 Semidefinite Relaxation The SPARDA problem may be expressed in terms of d ˆ d symmetric matrices B as max B min MPM tr pWMBq subject to trpBq “ 1, B © 0, ||B||0 § k2, rankpBq “ 1 (4) 3 where the correspondence between (3) and (4) comes from writing B “ βbβ (note that any solution of (3) will have unit norm). When k “ d, i.e., we impose no sparsity constraint as in PDA, we can relax by simply dropping the rank-constraint. The objective is then a supremum of linear functions of B and the resulting semidefinite problem is concave over a convex set and may be written as: max BPBr min MPM tr pWMBq (5) where Br is the convex set of positive semidefinite d ˆ d matrices with trace = 1. If B˚ P Rdˆd denotes the global optimum of this relaxation and rankpB˚q “ 1, then the best projection for PDA is simply the dominant eigenvector of B˚ and the relaxation is tight. Otherwise, we can truncate B˚ as in [14], treating the dominant eigenvector as an approximate solution to the original problem (3). To obtain a relaxation for the sparse version where k † d (SPARDA), we follow [14] closely. Because B “ βbβ implies ||B||0 § k2, we obtain an equivalent cardinality constrained problem by incorporating this nonconvex constraint into (4). Since trpBq “ 1 and ||B||F “ ||β||2 2 “ 1, a convex relaxation of the squared `0 constraint is given by ||B||1 § k. By selecting λ as the optimal Lagrange multiplier for this `1 constraint, we can obtain an equivalent penalized reformulation parameterized by λ rather than k [14]. The sparse semidefinite relaxation is thus the following concave problem max BPBr min MPM tr pWMBq ´ λ||B||1 ( (6) While the relaxation bears strong resemblance to DSPCA relaxation for sparse PCA, the inner maximization over matchings prevents direct application of general semidefinite programming solvers. Let MpBq denote the matching that minimizes tr pWMBq for a given B. Standard projected subgradient ascent could be applied to solve (6), where at the tth iterate the (matrix-valued) subgradient is WMpBptqq. However, this approach requires solving optimal transport problems with large n ˆ m matrices at each iteration. Instead, we turn to a dual form of (6), assuming n • m (cf. [22, 23]) max BPBr,uPRn,vPRm 1 m n ÿ i“1 m ÿ j“1 mint0, trprZijbZijs Bq´ui´vju` 1 n n ÿ i“1 ui` 1 m m ÿ j“1 vj´λ||B||1 (7) (7) is simply a maximization over B P Br, u P Rn, and v P Rm which no longer requires matching matrices nor their cumbersome row/column constraints. While dual variables u and v can be solved in closed form for each fixed B (via sorting), we describe a simple sub-gradient approach that works better in practice. RELAX Algorithm: Solves the dualized semidefinite relaxation of SPARDA (7). Returns the largest eigenvector of the solution to (6) as the desired projection direction for SPARDA. Input: d-dimensional data xp1q, . . . , xpnq and yp1q, . . . , ypmq (with n • m) Parameters: λ • 0 controls the amount of regularization, γ ° 0 is the step-size used for B updates, ⌘° 0 is the step-size used for updates of dual variables u and v, T is the maximum number of iterations without improvement in cost after which algorithm terminates. 1: Initialize βp0q – ” ? d d , . . . , ? d d ı , Bp0q – βp0q b βp0q P Br, up0q – 0nˆ1, vp0q – 0mˆ1 2: While the number of iterations since last improvement in objective function is less than T: 3: Bu – r1{n, . . . , 1{ns P Rn, Bv – r1{m, . . . , 1{ms P Rm, BB – 0dˆd 4: For i, j P t1, . . . , nu ˆ t1, . . . , mu: 5: Zij – xpiq ´ ypjq 6: If trprZij b ZijsBptqq ´ uptq i ´ vptq j † 0 : 7: Bui – Bui ´ 1{m , Bvj – Bvj ´ 1{m , BB – BB ` Zij b Zij {m 8: End For 9: upt`1q – uptq ` ⌘¨ Bu and vpt`1q – vptq ` ⌘¨ Bv 10: Bpt`1q – Projection ´ Bptq ` γ ||BB||F ¨ BB ; λ, γ{||BB||F ¯ Output: pβrelax P Rd defined as the largest eigenvector (based on corresponding eigenvalue’s magnitude) of the matrix Bpt˚q which attained the best objective value over all iterations. 4 Projection Algorithm: Projects matrix onto positive semidefinite cone of unit-trace matrices Br (the feasible set in our relaxation). Step 4 applies soft-thresholding proximal operator for sparsity. Input: B P Rdˆd Parameters: λ • 0 controls the amount of regularization, δ “ γ{||BB||F • 0 is the actual step-size used in the B-update. 1: Q⇤QT – eigendecomposition of B 2: w˚ – arg min ||w ´ diagp⇤q||2 2 : w P r0, 1sd, ||w||1 “ 1 ( (Quadratic program) 3: rB – Q ¨ diagtw˚ 1 , . . . , w˚ du ¨ QT 4: If λ ° 0: For r, s P t1, . . . , du2 : rBr,s – signp rBr,sq ¨ maxt0, | rBr,s| ´ δλu Output: rB P Br The RELAX algorithm (boxed) is a projected subgradient method with supergradients computed in Steps 3 - 8. For scaling to large samples, one may alternatively employ incremental supergradient directions [24] where Step 4 would be replaced by drawing random pi, jq pairs. After each subgradient step, projection back into the feasible set Br is done via a quadratic program involving the current solution’s eigenvalues. In SPARDA, sparsity is encouraged via the soft-thresholding proximal map corresponding to the `1 penalty. The overall form of our iterations matches subgradient-proximal updates (4.14)-(4.15) in [24]. By the convergence analysis in §4.2 of [24], the RELAX algorithm (as well as its incremental variant) is guaranteed to approach the optimal solution of the dual which also solves (6), provided we employ sufficiently large T and small step-sizes. In practice, fast and accurate convergence is attained by: (a) renormalizing the B-subgradient (Step 10) to ensure balanced updates of the unit-norm constrained B, (b) using diminishing learning rates which are initially set larger for the unconstrained dual variables (or even taking multiple subgradient steps in the dual variables per each update of B). 4.2 Tightening after relaxation It is unreasonable to expect that our semidefinite relaxation is always tight. Therefore, we can sometimes further refine the projection pβrelax obtained by the RELAX algorithm by using it as a starting point in the original non-convex optimization. We introduce a sparsity constrained tightening procedure for applying projected gradient ascent for the original nonconvex objective Jpβq “ minMPM βT WMβ where β is now forced to lie in BXSk and Sk :“ tβ P Rd : ||β||0 § ku. The sparsity level k is fixed based on the relaxed solution (k “ ||pβrelax||0). After initializing βp0q “ pβrelax P Rd, the tightening procedure iterates steps in the gradient direction of J followed by straightforward projections into the unit half-ball B and the set Sk (accomplished by greedily truncating all entries of β to zero besides the largest k in magnitude). Let Mpβq again denote the matching matrix chosen in response to β. J fails to be differentiable at the rβ where Mprβq is not unique. This occurs, e.g., if two samples have identical projections under rβ. While this situation becomes increasingly likely as n, m Ñ 8, J interestingly becomes smoother overall (assuming the distributions admit density functions). For all other β: Mpβ1q “ Mpβq where β1 lies in a small neighborhood around β and J admits a well-defined gradient 2WMpβqβ. In practice, we find that the tightening always approaches a local optimum of J with a diminishing stepsize. We note that, for a given projection, we can efficiently calculate gradients without recourse to matrices Mpβq or WMpβq by sorting βptqT xp1q, . . . , βptqT xpnq and βptqT yp1q, . . . , βptqT ypmq. The gradient is directly derivable from expression (3) where the nonzero Mij are determined by appropriately matching empirical quantiles (represented by sorted indices) since the univariate Wasserstein distance is simply the L2 distance between quantile functions [20]. Additional computation can be saved by employing insertion sort which runs in nearly linear time for almost sorted points (in iteration t ´ 1, the points have been sorted along the βpt´1q direction and their sorting in direction βptq is likely similar under small step-size). Thus the tightening procedure is much more efficient than the RELAX algorithm (respective runtimes are Opdn log nq vs. Opd3n2q per iteration). 5 We require the combined steps for good performance. The projection found by the tightening algorithm heavily depends on the starting point βp0q, finding only the closest local optimum (as in Figure 1a). It is thus important that βp0q is already a good solution, as can be produced by our RELAX algorithm. Additionally, we note that as first-order methods, both the RELAX and tightening algorithms are amendable to a number of (sub)gradient-acceleration schemes (e.g. momentum techniques, adaptive learning rates, or FISTA and other variants of Nesterov’s method [18, 17, 25]). 4.3 Properties of semidefinite relaxation We conclude the algorithmic discussion by highlighting basic conditions under which our PDA relaxation is tight. Assuming n, m Ñ 8, each of (i)-(iii) implies that the B˚ which maximizes (5) is nearly rank one, or equivalently B˚ « rβ b rβ (see Supplementary Information §S4 for intuition). Thus, the tightening procedure initialized at rβ will produce a global maximum of the PDA objective. (i) There exists direction in which the projected Wasserstein distance between X and Y is nearly as large as the overall Wasserstein distance in Rd. This occurs for example if ||ErXs ´ ErY s||2 is large while both ||CovpXq||F and ||CovpY q||F are small (the distributions need not be Gaussian). (ii) X „ NpµX, ⌃Xq and Y „ NpµY , ⌃Y q with µX ‰ µY and ⌃X « ⌃Y . (iii) X „ NpµX, ⌃Xq and Y „ NpµY , ⌃Y q with µX “ µY where the underlying covariance structure is such that arg maxBPBr ||pB1{2⌃XB1{2q1{2 ´ pB1{2⌃Y B1{2q1{2||2 F is nearly rank 1. For example, if the primary difference between covariances is a shift in the marginal variance of some features, i.e. ⌃Y « V ¨ ⌃X where V is a diagonal matrix. 5 Theoretical Results In this section, we characterize statistical properties of an empirical divergence-maximizing projection pβ :“ arg max βPB DpβT p Xpnq, βT pY pnqq, although we note that the algorithms may not succeed in finding such a global maximum for severely nonconvex problems. Throughout, D denotes the squared L2 Wasserstein distance between univariate distributions, C represents universal constants that change from line to line. All proofs are relegated to the Supplementary Information §S3. We make the following simplifying assumptions: (A1) n “ m (A2) X, Y admit continuous density functions (A3) X, Y are compactly supported with nonzero density in the Euclidean ball of radius R. Our theory can be generalized beyond (A1)-(A3) to obtain similar (but complex) statements through careful treatment of the distributions’ tails and zero-density regions where cdfs are flat. Theorem 1. Suppose there exists direction β˚ P B such that Dpβ˚T X, β˚T Y q • ∆. Then: DppβT p Xpnq, pβT pY pnqq ° ∆´ ✏ with probability greater than 1 ´ 4 exp ˆ ´ n✏2 16R4 ˙ Theorem 1 gives basic concentration results for the projections used in empirical applications our method. To relate distributional differences between X, Y in the ambient d-dimensional space with their estimated divergence along the univariate linear representation chosen by PDA, we turn to Theorems 2 and 3. Finally, Theorem 4 provides sparsistency guarantees for SPARDA in the case where X, Y exhibit large differences over a certain feature subset (of known cardinality). Theorem 2. If X and Y are identically distributed in Rd, then: DppβT p Xpnq, pβT pY pnqq † ✏ with probability greater than 1 ´ C1 ˆ 1 ` R2 ✏ ˙d exp ˆ ´C2 R4 n✏2 ˙ To measure the difference between the untransformed random variables X, Y P Rd, we define the following metric between distributions on Rd which is parameterized by a • 0 (cf. [11]): TapX, Y q :“ | Prp|X1| § a, . . . , |Xd| § aq ´ Prp|Y1| § a, . . . , |Yd| § aq| (8) 6 In addition to (A1)-(A3), we assume the following for the next two theorems: (A4) Y has subGaussian tails, meaning cdf FY satisfies: 1 ´ FY pyq § C y expp´y2{2q, (A5) ErXs “ ErY s “ 0 (note that mean differences can trivially be captured by linear projections, so these are not the differences of interest in the following theorems), (A6) Var(X`) = 1 for ` “ 1, . . . , d Theorem 3. Suppose D a • 0 s.t. TapX, Y q ° h pgp∆qq where h pgp∆qq :“ mint∆1, ∆2u with ∆1 :“ pa ` dqdpgp∆q ` dq ` expp´a2{2q ` exp ´ ´1{p ? 2 q ¯ (9) ∆2 :“ ` gp∆q ` expp´a2{2q ˘ ¨ d (10) :“ ||CovpXq||1, gp∆q :“ ∆4 ¨ p1 ` Φq´4, and Φ :“ sup↵PB supy |f↵T Y pyq| ( with f↵T Y pyq defined as the density of the projection of Y in the ↵direction. Then: DppβT p Xpnq, pβT pY pnqq ° C∆´ ✏ (11) with probability greater than 1 ´ C1 exp ` ´ C2 R4 n✏2˘ Theorem 4. Define C as in (11). Suppose there exists feature subset S Ä t1, . . . , du s.t. |S| “ k, TpXS, YSq • h pg p✏pd ` 1q{Cqq, and remaining marginal distributions XSC , YSC are identical. Then: pβpkq :“ arg max βPB tDpβT p Xpnq, βT pY pnqq : ||β||0 § ku satisfies pβpkq i ‰ 0 and pβpkq j “ 0 @ i P S, j P SC with probability greater than 1 ´ C1 ˆ 1 ` R2 ✏ ˙d´k exp ˆ ´C2 R4 n✏2 ˙ 6 Experiments Figure 1a illustrates the cost function of PDA pertaining to two 3-dimensional distributions (see details in Supplementary Information §S1). In this example, the point of convergence pβ of the tightening method after random initialization (in green) is significantly inferior to the solution produced by the RELAX algorithm (in red). It is therefore important to use RELAX before tightening as we advise. The synthetic MADELON dataset used in the NIPS 2003 feature selection challenge consists of points (n “ m “ 1000, d “ 500) which have 5 features scattered on the vertices of a fivedimensional hypercube (so that interactions between features must be considered in order to distinguish the two classes), 15 features that are noisy linear combinations of the original five, and 480 useless features [26]. While the focus of the challenge was on extracting features useful to classifiers, we direct our attention toward more interpretable models. Figure 1b demonstrates how well SPARDA (red), the top sparse principal component (black) [27], sparse LDA (green) [2], and the logistic lasso (blue) [12] are able to identify the 20 relevant features over different settings of their respective regularization parameters (which determine the cardinality of the vector returned by each method). The red asterisk indicates the SPARDA result with λ automatically selected via our crossvalidation procedure (without information of the underlying features’ importance), and the black asterisk indicates the best reported result in the challenge [26]. 0 100 200 300 400 500 0 5 10 15 20 MADELON Cardinality Relevant features 10 20 30 40 50 60 0.0 0.2 0.4 0.6 Two Sample Testing Data dimension (d) p value (a) (b) (c) Figure 1: (a) example where PDA is nonconvex, (b) SPARDA vs. other feature selection methods, (c) power of various tests for multi-dimensional problems with 3-dimensional differences. 7 The restrictive assumptions in logistic regression and linear discriminant analysis are not satisfied in this complex dataset resulting in poor performance. Despite being class-agnostic, PCA was successfully utilized by numerous challenge participants [26], and we find that the sparse PCA performs on par with logistic regression and LDA. Although the lasso fairly efficiently picks out 5 relevant features, it struggles to identify the rest due to severe multi-colinearity. Similarly, the challengewinning Bayesian SVM with Automatic Relevance Determination [26] only selects 8 of the 20 relevant features. In many applications, the goal is to thoroughly characterize the set of differences rather than select a subset of features that maintains predictive accuracy. SPARDA is better suited for this alternative objective. Many settings of λ return 14 of the relevant features with zero false positives. If λ is chosen automatically through cross-validation, the projection returned by SPARDA contains 46 nonzero elements of which 17 correspond to relevant features. Figure 1c depicts (average) p-values produced by SPARDA (red), PDA (purple), the overall Wasserstein distance in Rd (black), Maximum Mean Discrepancy [8] (green), and DiProPerm [5] (blue) in two-sample synthetically controlled problems where PX ‰ PY and the underlying differences have varying degrees of sparsity. Here, d indicates the overall number of features included of which only the first 3 are relevant (see Supplementary Information §S1 for details). As we evaluate the significance of each method’s statistic via permutation testing, all the tests are guaranteed to exactly control Type I error [16], and we thus only compare their respective power in determining PX ‰ PY setting. The figure demonstrates clear superiority of SPARDA which leverages the underlying sparsity to maintain high power even with the increasing overall dimensionality. Even when all the features differ (when d “ 3), SPARDA matches the power of methods that consider the full space despite only selecting a single direction (which cannot be based on mean-differences as there are none in this controlled data). This experiment also demonstrate that the unregularized PDA retains greater power than DiProPerm, a similar projection-based method [5]. Recent technological advances allow complete transcriptome profiling in thousands of individual cells with the goal of fine molecular characterization of cell populations (beyond the crude averagetissue-level expression measure that is currently standard) [28]. We apply SPARDA to expression measurements of 10,305 genes profiled in 1,691 single cells from the somatosensory cortex and 1,314 hippocampus cells sampled from the brains of juvenile mice [29]. The resulting pβ identifies many previously characterized subtype-specific genes and is in many respects more informative than the results of standard differential expression methods (see Supplementary Information §S2 for details). Finally, we also apply SPARDA to normalized data with mean-zero & unit-variance marginals in order to explicitly restrict our search to genes whose relationship with other genes’ expression is different between hippocampus and cortex cells. This analysis reveals many genes known to be heavily involved in signaling, regulating important processes, and other forms of functional interaction between genes (see Supplementary Information §S2.1 for details). These types of important changes cannot be detected by standard differential expression analyses which consider each gene in isolation or require gene-sets to be explicitly identified as features [28]. 7 Conclusion This paper introduces the overall principal differences methodology and demonstrates its numerous practical benefits of this approach. While we focused on algorithms for PDA & SPARDA tailored to the Wasserstein distance, different divergences may be better suited for certain applications. Further theoretical investigation of the SPARDA framework is of interest, particularly in the highdimensional d “ Opnq setting. Here, rich theory has been derived for compressed sensing and sparse PCA by leveraging ideas such as restricted isometry or spiked covariance [15]. A natural question is then which analogous properties of PX, PY theoretically guarantee the strong empirical performance of SPARDA observed in our high-dimensional applications. Finally, we also envision extensions of the methods presented here which employ multiple projections in succession, or adapt the approach to non-pairwise comparison of multiple populations. Acknowledgements This research was supported by NIH Grant T32HG004947. 8 References [1] Lopes M, Jacob L, Wainwright M (2011) A More Powerful Two-Sample Test in High Dimensions using Random Projection. NIPS : 1206–1214. [2] Clemmensen L, Hastie T, Witten D, Ersbø ll B (2011) Sparse Discriminant Analysis. Technometrics 53: 406–413. [3] van der Vaart AW, Wellner JA (1996) Weak Convergence and Empirical Processes. Springer. [4] Gibbs AL, Su FE (2002) On Choosing and Bounding Probability Metrics. International Statistical Review 70: 419–435. [5] Wei S, Lee C, Wichers L, Marron JS (2015) Direction-Projection-Permutation for High Dimensional Hypothesis Tests. Journal of Computational and Graphical Statistics . [6] Rosenbaum PR (2005) An exact distribution-free test comparing two multivariate distributions based on adjacency. Journal of the Royal Statistical Society Series B 67: 515–530. [7] Szekely G, Rizzo M (2004) Testing for equal distributions in high dimension. InterStat 5. [8] Gretton A, Borgwardt KM, Rasch MJ, Scholkopf B, Smola A (2012) A Kernel Two-Sample Test. The Journal of Machine Learning Research 13: 723–773. [9] Cramer H, Wold H (1936) Some Theorems on Distribution Functions. Journal of the London Mathematical Society 11: 290–294. [10] Cuesta-Albertos JA, Fraiman R, Ransford T (2007) A sharp form of the Cramer–Wold theorem. Journal of Theoretical Probability 20: 201–209. [11] Jirak M (2011) On the maximum of covariance estimators. Journal of Multivariate Analysis 102: 1032– 1046. [12] Tibshirani R (1996) Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B : 267–288. [13] Bradley PS, Mangasarian OL (1998) Feature Selection via Concave Minimization and Support Vector Machines. ICML : 82–90. [14] D’Aspremont A, El Ghaoui L, Jordan MI, Lanckriet GR (2007) A direct formulation for sparse PCA using semidefinite programming. SIAM Review : 434–448. [15] Amini AA, Wainwright MJ (2009) High-dimensional analysis of semidefinite relaxations for sparse principal components. The Annals of Statistics 37: 2877–2921. [16] Good P (1994) Permutation Tests: A Practical Guide to Resampling Methods for Testing Hypotheses. Spring-Verlag. [17] Duchi J, Hazan E, Singer Y (2011) Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research 12: 2121–2159. [18] Wright SJ (2010) Optimization Algorithms in Machine Learning. NIPS Tutorial . [19] Sandler R, Lindenbaum M (2011) Nonnegative Matrix Factorization with Earth Mover’s Distance Metric for Image Analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence 33: 1590–1602. [20] Levina E, Bickel P (2001) The Earth Mover’s distance is the Mallows distance: some insights from statistics. ICCV 2: 251–256. [21] Wang Z, Lu H, Liu H (2014) Tighten after Relax: Minimax-Optimal Sparse PCA in Polynomial Time. NIPS 27: 3383–3391. [22] Bertsekas DP (1998) Network Optimization: Continuous and Discrete Models. Athena Scientific. [23] Bertsekas DP, Eckstein J (1988) Dual coordinate step methods for linear network flow problems. Mathematical Programming 42: 203–243. [24] Bertsekas DP (2011) Incremental gradient, subgradient, and proximal methods for convex optimization: A survey. In: Optimization for Machine Learning, MIT Press. pp. 85–119. [25] Beck A, Teboulle M (2009) A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems. SIAM Journal on Imaging Sciences 2: 183–202. [26] Guyon I, Gunn S, Nikravesh M, Zadeh LA (2006) Feature Extraction: Foundations and Applications. Secaucus, NJ, USA: Springer-Verlag. [27] Zou H, Hastie T, Tibshirani R (2005) Sparse Principal Component Analysis. Journal of Computational and Graphical Statistics 67: 301–320. [28] Geiler-Samerotte KA, Bauer CR, Li S, Ziv N, Gresham D, et al. (2013) The details in the distributions: why and how to study phenotypic variability. Current opinion in biotechnology 24: 752–9. [29] Zeisel A, Munoz-Manchado AB, Codeluppi S, Lonnerberg P, La Manno G, et al. (2015) Cell types in the mouse cortex and hippocampus revealed by single-cell RNA-seq. Science 347: 1138–1142. 9 | 2015 | 207 |
5,711 | An Active Learning Framework using Sparse-Graph Codes for Sparse Polynomials and Graph Sketching Xiao Li UC Berkeley xiaoli@berkeley.edu Kannan Ramchandran∗ UC Berkeley kannanr@berkeley.edu Abstract Let f : {−1, 1}n →R be an n-variate polynomial consisting of 2n monomials, in which only s ≪2n coefficients are non-zero. The goal is to learn the polynomial by querying the values of f. We introduce an active learning framework that is associated with a low query cost and computational runtime. The significant savings are enabled by leveraging sampling strategies based on modern coding theory, specifically, the design and analysis of sparse-graph codes, such as Low-Density-Parity-Check (LDPC) codes, which represent the state-of-the-art of modern packet communications. More significantly, we show how this design perspective leads to exciting, and to the best of our knowledge, largely unexplored intellectual connections between learning and coding. The key is to relax the worst-case assumption with an ensemble-average setting, where the polynomial is assumed to be drawn uniformly at random from the ensemble of all polynomials (of a given size n and sparsity s). Our framework succeeds with high probability with respect to the polynomial ensemble with sparsity up to s = O(2δn) for any δ ∈(0, 1), where f is exactly learned using O(ns) queries in time O(ns log s), even if the queries are perturbed by Gaussian noise. We further apply the proposed framework to graph sketching, which is the problem of inferring sparse graphs by querying graph cuts. By writing the cut function as a polynomial and exploiting the graph structure, we propose a sketching algorithm to learn the an arbitrary n-node unknown graph using only few cut queries, which scales almost linearly in the number of edges and sub-linearly in the graph size n. Experiments on real datasets show significant reductions in the runtime and query complexity compared with competitive schemes. 1 Introduction One of the central problems in computational learning theory is the efficient learning of polynomials f(x) : x ∈{−1, 1}n →R. The task of learning an s-sparse polynomial f has been studied extensively in the literature, often in the context of Fourier analysis for pseudo-boolean functions (a real-valued function defined on a set of binary variables). Many concept classes, such as ω(1)-juntas, polynomial-sized circuits, decision trees and disjunctive normative form (DNF) formulas, have been proven very difficult [1] to learn in the worst-case with random examples. Almost all existing efficient algorithms are based on the membership query model [1, 6–8, 10, 11, 17], which provides arbitrary access to the value of f(x) given any x ∈{−1, 1}n. This makes a richer set of concept classes learnable in polynomial time poly(s, n). This is a form of what is now popularly referred to as active learning, which makes queries using different sampling strategies. For instance, [3,10] use regular subsampling and [9, 14, 18] use random sampling based on compressed sensing. However, they remain difficult to scale computationally, especially for large s and n. ∗This work was supported by grant NSF CCF EAGER 1439725. 1 In this paper, we are interested in learning polynomials with s = O(2δn) for some δ ∈(0, 1). Although this regime is not typically considered in the literature, we show that by relaxing the “worst-case” mindset to an ensemble-average setting (explained later), we can handle this more challenging regime and reduce both the number of queries and the runtime complexity, even if the queries are corrupted by Gaussian noise. In the spirit of active learning, we design a sampling strategy that makes queries to f based on modern coding theory and signal processing. The queries are formed by “strategically” subsampling the input to induce aliasing patterns in the dual domain based on sparse-graph codes. Then, our framework exploits the aliasing pattern (code structure) to reconstruct f by peeling the sparse coefficients with an iterative simple peeling decoder. Through a coding-theoretic lens, our algorithm achieves a low query complexity (capacity-approaching codes) and low computational complexity (peeling decoding). Further, we apply our proposed framework to graph sketching, which is the problem of inferring hidden sparse graphs with n nodes by actively querying graph cuts (see Fig. 1). Motivated by bioinformatics applications [2], learning hidden graphs from additive or cross-additive queries (i.e. edge counts within a set or across two sets) has gained considerable interest. This problem closely pertains to our learning framework because the cut function of any graph can be written as a sparse polynomial with respect to the binary variables x ∈{−1, +1}n indicating a graph partition for the cut [18]. Given query access to the cut value for an arbitrary partition of the graph, how many cut queries are needed to infer the hidden graph structure? What is the runtime for such inference? (a) Unknown Graph (b) Cut Query (c) Inferred Graph Figure 1: Given a set of n nodes, infer the graph structure by querying graph cuts. Most existing algorithms that achieve the optimal query cost for graph sketching (see [13]) are nonconstructive, except for a few algorithms [4, 5, 9, 18] that run in polynomial time in the graph size n. Inspired by our active learning framework, we derive a sketching algorithm associated with a query cost and runtime that are both sub-linear in the graph size n and almost-linear in the number of edges. To the best of our knowledge, this is the first constructive non-adaptive sketching scheme with sub-linear costs in the graph size n. In the following, we introduce the problem setup, our learning model, and summarize our contributions. 1.1 Problem Setup Our goal is to learn the following polynomial in terms of its coefficients: f(x) = X k∈Fn 2 α[k]χk(x), ∀x ∈{−1, 1}n, F2 := {0, 1}, (1) where k := [k[1], · · · , k[n]]T ∈Fn 2 is the index of the monomial1 χk(x) = Q i∈[n] xk[i] i , and α[k] ∈R is the coefficient. In this work, we consider an ensemble-average setting for learning. Definition 1 (Polynomial Ensemble). The polynomial ensemble F(s, n, A) is a collection of polynomials f : {−1, 1}n →R satisfying the following conditions: • the vector α := [· · · , α[k], · · · ]T is s-sparse with s = O(2δn) for some 0 < δ < 1; • the support supp (α) := {k : α[k] ̸= 0, k ∈Fn 2} is chosen uniformly at random over Fn 2; • each non-zero coefficient α[k] takes values from some set A according to α[k] ∼PA for all k ∈supp (α), and PA is some probability distribution over A. 1The notation is defined as [n] := {1, · · · , n}. 2 We consider active learning under the membership query model. Each query to f at x ∈{−1, 1}n returns the data-label pair (x, f(x) + ε), where ε is some additive noise. We propose a query framework that leads to a fast reconstruction algorithm, which outputs an estimate bα of the polynomial coefficients. The performance of our framework is evaluated by the probability of failing to recover the exact coefficients PF := Pr (bα ̸= α) = E 1bα̸=α , where 1(·) is the indicator function and the expectation is taken with respect to the noise ε, the randomized construction of our queries, as well as the random polynomial ensemble F(s, n, A). 1.2 Our Approach and Contributions Particularly relevant to this work are the algorithms on learning decision trees and boolean functions by uncovering the Fourier spectrum of f [3,5,10,12]. Recent papers further show that this problem can be formulated and solved as a compressed sensing problem using random queries [14, 18]. Specifically, [14] gives an algorithm using O(s2n) queries based on mutual coherence, whereas the Restricted Isometry Property (RIP) is used in [18] to give a query complexity of O(sn4). However, this formulation needs to estimate a length-2n vector and hence the complexity is exponential in n. To alleviate the computational burden, [9] proposes a pre-processing scheme to reduce the number of unknowns to 2s, which shortens the runtime to poly(2s, n) using O(n2s) samples. However, this method only works with very small s due to the exponential scaling. Under the sparsity regime s = O(2δn) for some 0 < δ < 1, existing algorithms [3,9,10,14,18], irrespective of using membership queries or random examples, do not immediately apply here because this may require 2n samples (and large runtime) due to the obscured polynomial scaling in s. In our framework, we show that f can be learned exactly in time almost-linear in s and strictly-linear in n, even when the queries are perturbed by random Gaussian noise. Theorem 1 (Noisy Learning). Let f ∈F(s, n, A) where A is some arbitrarily large but finite set. In the presence of noise ε ∼N(0, σ2), our algorithm learns f exactly in terms of the coefficients bα = α, which runs in time O(ns log s) using O(ns) queries with probability at least 1 −O(1/s). The proposed algorithm and proofs are given in the supplementary material. Further, we apply this framework on learning hidden graphs from cut queries. We consider an undirected weighted graph G = (V, E, W) with |E| = r edges and weights W ∈Rr, where V = {1, · · · , n} is given but the edge set E ⊆V × V is unknown. This generalizes to hypergraphs, where an edge can connect at most d nodes, called the rank of the graph. For a d-rank hypergraph with r edges, the cut function is a s-sparse d-bounded pseudo-boolean function (i.e. each monomial depending on at most d variables) where the sparsity is bounded by s = O(r2d−1) [9]. On the graph sketching problem, [18] uses O(sn4) random queries to sketch the sparse temporal changes of a hypergraph in polynomial time poly(nd). However, [9] shows that it becomes computationally infeasible for small graphs (e.g. n = 200 nodes, r = 3 edges with d = 4), while the LearnGraph algorithm [9] runs in time O(2rdM + n2d log n) using M = O(2rdd log n + 22d+1d2(log n + rd)) queries. Although this significantly reduces the runtime compared to [14, 18], the algorithm only tackles very sparse graphs due to the scaling 2r and n2. This implies that the sketching needs to be done on relatively small graphs (i.e. n = 1000 nodes) over fine sketching intervals (i.e. minutes) to suppress the sparsity (i.e. r = 10 within the sketching interval). In this work, we adapt and apply our learning framework to derive an efficient sketching algorithm, whose runtime scales as O(ds log s(log n + log s)) by using O(ds(log n + log s)) queries. We use our adapted algorithm on real datasets and find that we can handle much coarser sketching intervals (e.g. half an hour) and much larger hypergraphs (e.g. n = 105 nodes). 2 Learning Framework Our learning framework consists of a query generator and a reconstruction engine. Given the sparsity s and the number of variables n, the query generator strategically constructs queries (randomly) and the reconstruction engine recovers the s-sparse vector α. For notation convenience, we replace each boolean variable xi = (−1)m[i] with a binary variable m[i] ∈F2 for all i ∈[n]. Using the notation m = [m[1], · · · , m[n]]T in the Fourier expansion (1), we have u[m] = X k∈Fn 2 α[k](−1)⟨m,k⟩+ ε[m], (2) 3 where ⟨m, k⟩= ⊕i∈[n]m[i]k[i] over F2. Now the coefficients α[k] can be interpreted as the WalshHadamard Transform (WHT) coefficients of the polynomial f(x) for x ∈{−1, 1}n. 2.1 Membership Query: A Coding-Theoretic Design The building block of our query generator is the basic query set by subsampling and tiny WHTs: • Subsampling: we choose B = 2b samples u[m] indexed selectively by m = Mℓ+ d for ℓ∈Fb 2, where M ∈Fn×b 2 is the subsampling matrix and d ∈Fn 2 is the subsampling offset. • WHT: a very small B-point WHT is performed over the samples u[Mℓ+ d] for ℓ∈Fb 2, where each output coefficient can be obtained according to the aliasing property of WHT: U[j] = X k:MT k=j α[k](−1)⟨d,k⟩+ W[j], j ∈Fb 2, (3) where W[j] = 1 √ B P ℓ∈Fb 2 ε[Mℓ+ d](−1)⟨ℓ,j⟩is the observation noise with variance σ2. The B-point basic query set (3) implies that each coefficient U[j] is the weighted hash output of α[k] under the hash function MT k = j. From a coding-theoretic perspective, the coefficient U[j] for constitutes a parity constraint of the coefficients α[k], where α[k] enters the j-th parity if MT k = j. If we can induce a set of parity constraints that mimic good error-correcting codes with respect to the unknown coefficients α[k], the coefficients can be recovered iteratively in the spirit of peeling decoding, similar to that in LDPC codes. Now it boils down to the following questions: • How to choose the subsampling matrix M and how to choose the query set size B? • How to recover the coefficients α[k] from their aliased observations U[j]? In the following, we illustrate the principle of our learning framework through a simple example with n = 4 boolean variables and sparsity s = 4. 2.2 Main Idea: A Simple Example Suppose that the s = 4 non-zero coefficients are α[0100], α[0110], α[1010] and α[1111]. We choose B = s = 4 and use two patterns M1 = [0T 2×2, IT 2×2]T and M2 = [IT 2×2, 0T 2×2]T for subsampling, where all queries made using the same pattern Mi are called a query group. In this example, by enforcing a zero subsampling offset d = 0, we generate only one set of queries {Uc[j]}j∈Fb 2 under each pattern Mc according to (3). For example, under pattern M1, the chosen samples are u[0000], u[0001], u[0010], u[0011]. Then, the observations are obtained by a B-point WHT coefficients of these chosen samples. 01
10
11
00
01
10
11
00
α[0100]
α[0110]+α[1010]
α[1010]
α[1111]
α[0110]
α[1010]
α[1111]
α[0100]
α[0100]+α[0110]
α[1111]
Query Stage 1 Query Stage 2 Figure 2: Example of a bipartite graph for the observations. For illustration we assume the queries are noiseless: U1[00] = α[0000] + α[0100] + α[1000] + α[1100], U1[01] = α[0001] + α[0101] + α[1001] + α[1101], U1[10] = α[0010] + α[0110] + α[1010] + α[1110], U1[11] = α[0011] + α[0111] + α[1011] + α[1111]. Generally speaking, it is impossible to reconstruct the coefficients from these queries. However, since the coefficients are sparse, then the observations are reduced to U1[00] = α[0100], U2[00] = 0 U1[01] = 0, U2[01] = α[0100] + α[0110] U1[10] = α[0110] + α[1010], U2[10] = α[1010] U1[11] = α[1111], U2[11] = α[1111]. The observations are captured by a bipartite graph, which consists of s = 4 left nodes and 8 right nodes (see Fig. 2). 4 2.2.1 Oracle-based Decoding We illustrate how to decode the unknown α[k] from the bipartite graph in Fig. 2 with the help of an “oracle”, and then introduce how to get rid of this oracle. The right nodes can be categorized as: • Zero-ton: a right node is a zero-ton if it is not connected to any left node. • Single-ton: a right node is a single-ton if it is connected to only one left node. We refer to the index k and its associated value α[k] as the index-value pair (k, α[k]). • Multi-ton: a right node is a multi-ton if it is connected to more than one left node. The oracle informs the decoder exactly which right nodes are single-tons as well as the corresponding index-value pair (k, α[k]). Then, we can learn the coefficients iteratively as follows: Step (1) select all edges in the bipartite graph with right degree 1 (i.e. detect presence of single-tons and the index-value pairs informed by the oracle); Step (2) remove (peel off) these edges and the left and right end nodes of these single-ton edges; Step (3) remove (peel off) other edges connected to the left nodes that are removed in Step (2); Step (4) remove contributions of the left nodes removed in Step (3) from the remaining right nodes. Finally, decoding is successful if all edges are removed. Clearly, this simple example is only an illustration. In general, if there are C query groups associated with the subsampling patterns {Mc}C c=1 and query set size B, we define the bipartite graph ensemble below and derive the guidelines for choosing them to guarantee successful peeling-based recovery. Definition 2 (Sparse Graph Ensemble). The bipartite graph ensemble G(s, η, C, {Mc}c∈[C]) is a collection of C-regular bipartite graphs where • there are s left nodes, each associated with a distinct non-zero coefficient α[k]; • there are C groups of right nodes and B = 2b = ηs right nodes per group, and each right node is characterized by the observation Uc[j] indexed by j ∈Fb 2 in each group; • there exists an edge between left node α[k] and right node Uc[j] in group c if MT c k = j, and thus each left node has a regular degree C. Using the construction of {Mc}C c=1 given in the supplemental material, the decoding is successful over the ensemble G(s, η, C, {Mc}c∈[C]) if C and B are chosen appropriately. The key idea is to avoid excessive aliasing by exploiting a sufficiently large but finite number of groups C for diversity and maintaining the query set size B on par with the sparsity O(s). Lemma 1. If we construct our query generator using C query groups with B = ηs = 2b for some redundancy parameter η > 0 satisfying: C 2 3 4 5 6 · · · η 1.0000 0.4073 0.3237 0.2850 0.2616 · · · Table 1: Minimum value for η given the number of groups C then the oracle-based decoder learns f in O(s) peeling iterations with probability 1 −O(1/s). 2.2.2 Getting Rid of the Oracle Now we explain how to detect single-tons and obtain the index-value pair without an oracle. We exploit the diversity of subsampling offsets d from (3). Let Dc ∈FP ×n 2 be the offset matrix containing P subsampling offsets, where each row is a chosen offset. Denote by U c[j] := [· · · , Uc,p[j], · · · ]T the vector of observations (called observation bin) associated with the P offsets at the j-th right node, we have the general observation model for each right node in the bipartite graph as follows. Proposition 1. Given the offset matrix D ∈FP ×n 2 , we have U c[j] = X k : MT c k=j α[k](−1)Dck + wc[j], (4) where wc[j] ≜[· · · , Wc,p[j], · · · ]T contains noise samples with variance σ2, (−1)(·) is an elementwise exponentiation operator and (−1)Dck is the offset signature associated with α[k]. 5 In the same simple example, we keep the subsampling matrix M1 and use the set of offsets d0 = [0, 0, 0, 0]T , d1 = [1, 0, 0, 0]T , d2 = [0, 1, 0, 0]T , d3 = [0, 0, 1, 0]T and d4 = [0, 0, 0, 1]T such that D1 = [01×4; I4]. The observation bin associated with the subsampling pattern M1 is: U 1[j] = [U1,0[j], U1,1[j], U1,2[j], U1,3[j], U1,4[j]]T . (5) For example, observations U 1[01] and U 1[10] are given as U 1[01] = α[0100] × 1 (−1)0 (−1)1 (−1)0 (−1)0 , U 1[10] = α[0110] × 1 (−1)0 (−1)1 (−1)1 (−1)0 + α[1010] × 1 (−1)1 (−1)0 (−1)1 (−1)0 . With these bin observations, one can effectively determine if a check node is a zero-ton, a singleton or a multi-ton. For example, a single-ton, say U 1[01], satisfies |U1,0[01]| = |U1,1[01]| = |U1,2[01]| = |U1,3[01]| = |U1,4[01]|. Then, the index k = [k[1], k[2], k[3], k[4]]T and the value of a single-ton can be obtained by a simple ratio test (−1)bk[1] = U1,1[01] U1,0[01] = (−1)0 (−1)bk[2] = U1,2[01] U1,0[01] = (−1)1 (−1)bk[3] = U1,3[01] U1,0[01] = (−1)0 (−1)bk[4] = U1,4[01] U1,0[01] = (−1)0 =⇒ bk[1] = 0 bk[2] = 1 bk[3] = 0 bk[4] = 0 bα[bk] = U1,0[01] The above tests are easy to verify for all observations such that the index-value pair is obtained for peeling. In fact, this detection scheme for obtaining the oracle information is mentioned in the noiseless scenario [16] by using P = n + 1 offsets. However, this procedure fails in the presence of noise. In the following, we propose the general detection scheme for the noisy scenario while using P = O(n) offsets. 3 Learning in the Presence of Noise In this section, we propose a robust bin detection scheme that identifies the type of each observation bin and estimate the index-value pair (k, α[k]) of a single-ton in the presence of noise. For convenience, we drop the group index c and the node index j without loss of clarity, because the detection scheme is identical for all nodes from all groups. The bin detection scheme consists of the single-ton detection scheme and the zero-ton/multi-ton detection scheme, as described next. 3.1 Single-ton Detection Proposition 2. Given a single-ton with (k, α[k]) observed in the presence of noise N(0, σ2), then by collecting the signs of the observations, we have c = Dk ⊕sgn [α[k]] ⊕z where z contains P independent Bernoulli variables with probability at most Pe = e−ηBα2 min/2σ2, and the sign function is defined as sgn [x] = 1 if x < 0 and sgn [x] = 0 if x > 0. Note that the P-bit vector c is a received codeword of the n-bit message k over a binary symmetric channel (BSC) under an unknown flip sgn [α[k]]. Therefore, we can design the offset matrix D according to linear block codes. The codes should include 1 as a valid codeword such that both Dk and Dk ⊕1 can be decoded correctly and then obtain the correct codeword Dk and hence k. Definition 3. Let the offset matrix D ∈FP ×n 2 constitute a P × n generator matrix of some linear code, which satisfies a minimum distance βP with a code rate R(β) > 0 and β > Pe. Since there are n information bits in the index k, there exists some linear code (i.e. D) with block length P = n/R(β) that achieves a minimum distance of βP, where R(β) is the rate of the code [15]. As long as β > Pe, it is obvious that the unknown k can be decoded with exponentially decaying probability of error. Excellent examples include the class of expander codes or LDPC codes, which admits a linear time decoding algorithm. Therefore, the single-ton detection can be performed in time O(n), same as the noiseless case. 6 3.2 Zero-ton and Multi-ton Detection The single-ton detection scheme works when the underlying bin is indeed a single-ton. However, it does not work on isolating single-tons from zero-tons and multi-tons. We address this issue by further introducing P extra random offsets. Definition 4. Let the offset matrix eD ∈FP ×n 2 constitute a P × n random matrix consisting of independent identically distributed (i.i.d.) Bernoulli entries with probability 1/2. Denote by eU = [eU1, · · · , eUP ]T the observations associated with eD, we perform the following: • zero-ton verification: the bin is a zero-ton if ∥eU∥2/P ≤(1+γ)σ2/B for some γ ∈(0, 1). • multi-ton verification: the bin is a multi-ton if ∥eU −bα[bk](−1) e Dbk∥2 ≥(1 + γ)σ2/B, where (bk, bα[bk]) are the single-ton detection estimates. It is shown in the supplemental material that this bin detection scheme works with probability at least 1−O(1/s). Together with Lemma 1, the learning framework in the presence of noise succeeds with probability at least 1 −O(1/s). As detailed in the supplemental material, this leads to a overall sample complexity of O(sn) and runtime of O(ns log s). 4 Application in Hypergraph Sketching Consider a d-rank hypergraph G = (V, E) with |E| = r edges, where V = {1, · · · , n}. A cut S ⊆V is a set of selected vertices, denoted by the boolean cube x = [x1, · · · , xn] over {±1}n, where xi = −1 if i ∈S and xi = 1 if i /∈S. The value of a specific cut x can be written as f(x) = X e∈E " 1 − Y i∈e (1 + xi) 2 + Y i∈e (1 −xi) 2 !# . (6) Letting xi = (−1)m[i], we have f(x) = u[m] = P k∈Fn 2 c[k](−1)⟨k,m⟩with xi = (−1)m[i] for all i ∈[n], where the coefficient c[k] is a scaled WHT coefficient. Clearly, if the number of hyperedges is small r ≪2n and the maximum size of each hyperedge is small d ≪n, the coefficients c[k]’s are sparse and the sparsity can be well upper bounded by s ≤r2d−1. Now, we can use our learning framework to compute the sparse coefficients c[k] from only a few cut queries. Note that in the graph sketching problem, the weight of k is bounded by d due to the special structure of cut function. Therefore, in the noiseless setting, we can leverage the sparsity d and use much fewer offsets P ≪n in the spirit of compressed sensing. In the supplemental material, we adapt our framework to derive the GraphSketch bin detection scheme with even lower query costs and runtime. Proposition 3. The GraphSketch bin detection scheme uses P = O(d(log n + log s)) offsets and successfully detects single-tons and their index-value pairs with probability at least 1 −O(1/s). Next, we provide numerical experiments of our learning algorithm for sketching large random hypergraphs as well as actual hypergraphs formed by real datasets2. In Fig. 3, we compare the probability of success in sketching hypergraphs with n = 1000 nodes over 100 trials against the LearnGraph procedure3 in [9], by randomly generating r = 1 to 10 hyperedges with rank d = 5. The performance is plotted against the number of edges r and the query complexity of learning. As seen from Fig. 3, the query complexity of our framework is significantly lower (≤1%) than that of [9]. 4.1 Sketching the Yahoo! Messenger User Communication Pattern Dataset We sketch the hypergraphs extracted from Yahoo! Messenger User Communication Pattern Dataset [19], which records communications for 28 days. The dataset is recorded entry-wise as (day, time, transmitter, origin-zipcode, receiver, flag), where day and time represent the time stamp of each message, the transmitter and receiver represent the IDs of the sender and the recipient, the zipcode is a spatial stamp of each message, and the flag indicates if the recipient is in the contact list. There are 105 unique users and 5649 unique zipcodes. A hidden hypergraph structure is captured as follows. 2We used MATLAB on a Macbook Pro with an Intel Core i5 processor at 2.4 GHz and 8 GB RAM. 3We would like to acknowledge and thank the authors [9] for providing their source codes. 7 # of Queries # of Edges Prob. of Success 1 1.5 2 2.5 3 x 10 4 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 (a) Our Framework 1 1.5 2 2.5 3 x 10 4 0 5 10 0 0.5 1 1.5 2 # of Queries Run−time # of Edges Run−time (secs) (b) Our Framework # of Queries # of Edges Prob. of Success 1 1.5 2 2.5 3 x 10 6 1 2 3 4 5 6 7 8 9 10 0 0.2 0.4 0.6 0.8 1 (c) LearnGraph 1 1.5 2 2.5 3 x 10 6 0 5 10 0 10 20 30 40 # of Queries Run−time # of Edges Run−time (secs) (d) LearnGraph Figure 3: Sketching performance of random hypergraphs with n = 1000 nodes. Over an interval δt, each sender with a unique zipcode forms a hyperedge, and the recipients are the members of the hyperedge. By considering T consecutive intervals δt over a set of δz ≪5649 zipcodes, the communication pattern gives rise to a hypergraph with only few hyperedges in each interval and each hyperedge contains only few d nodes. The complete set of nodes in the hypergraph n is the set of recipients who are active during the T intervals. In Table 2, we choose the sketching interval δt = 0.5hr and consider T = 5 intervals. For each interval, we extract the communication hypergraph from the dataset by sketching the communications originating from a set of δz = 20 zipcodes4 by posing queries constructed at random in our framework. We average our performance over 100 trial runs and obtain the success probability. Temporal Graph n # of edges (E) degree (d) 1 −PF Run-time (sec) (9:00 a.m. ∼9:30 a.m.) 12648 87 9 0.97 422.3 (9:30 a.m. ∼10:00 a.m.) 12648 102 8 0.99 310.1 (10:00 a.m. ∼10:30 a.m.) 12648 109 7 0.99 291.4 (10:30 a.m. ∼11:00 a.m.) 12648 84 9 0.93 571.3 (11:00 a.m. ∼11:00 a.m.) 12648 89 10 0.93 295.1 Table 2: Sketching performance with C = 8 groups and P = 421 query sets of size B = 128. We maintain C = 8 groups of queries with P = 421 query sets of size B = 256 per group throughout all the experiments (i.e., 8.6 × 105 queries ≈60n). It is also seen that we can sketch the temporal communication hypergraphs from the real dataset over much larger intervals (0.5 hr) than that by LearnGraph (around 30 sec to 5 min), also more reliably in terms of success probability. 5 Conclusions In this paper, we introduce a coding-theoretic active learning framework for sparse polynomials under a much more challenging sparsity regime. The proposed framework effectively lowers the query complexity and especially the computational complexity. Our framework is useful in sketching large hypergraphs, where the queries are obtained by specific graph cuts. We further show via experiments that our learning algorithm performs very well over real datasets compared with existing approaches. 4We did now show the performance of LearnGraph because it fails to work on hypergraphs with the number of hyperedges at this scale with a reasonable number of queries (i.e., ≤1000n), as mentioned in [9]. 8 References [1] D. Angluin. Computational learning theory: survey and selected bibliography. In Proceedings of the twenty-fourth annual ACM symposium on Theory of computing, pages 351–369. ACM, 1992. [2] M. Bouvel, V. Grebinski, and G. Kucherov. Combinatorial search on graphs motivated by bioinformatics applications: A brief survey. In Graph-Theoretic Concepts in Computer Science, pages 16–27. Springer, 2005. [3] N. Bshouty and Y. Mansour. Simple learning algorithms for decision trees and multivariate polynomials. In Foundations of Computer Science, 1995. Proceedings., 36th Annual Symposium on, pages 304–311, Oct 1995. [4] N. H. Bshouty and H. Mazzawi. Optimal query complexity for reconstructing hypergraphs. In 27th International Symposium on Theoretical Aspects of Computer Science-STACS 2010, pages 143–154, 2010. [5] S.-S. Choi, K. Jung, and J. H. Kim. Almost tight upper bound for finding fourier coefficients of bounded pseudo-boolean functions. Journal of Computer and System Sciences, 77(6):1039– 1053, 2011. [6] S. A. Goldman. Computational learning theory. In Algorithms and theory of computation handbook, pages 26–26. Chapman & Hall/CRC, 2010. [7] J. Jackson. An efficient membership-query algorithm for learning dnf with respect to the uniform distribution. In Foundations of Computer Science, 1994 Proceedings., 35th Annual Symposium on, pages 42–53. IEEE, 1994. [8] M. J. Kearns. The computational complexity of machine learning. MIT press, 1990. [9] M. Kocaoglu, K. Shanmugam, A. G. Dimakis, and A. Klivans. Sparse polynomial learning and graph sketching. In Advances in Neural Information Processing Systems, pages 3122–3130, 2014. [10] E. Kushilevitz and Y. Mansour. Learning decision trees using the fourier spectrum. SIAM Journal on Computing, 22(6):1331–1348, 1993. [11] Y. Mansour. Learning boolean functions via the fourier transform. In Theoretical advances in neural computation and learning, pages 391–424. Springer, 1994. [12] Y. Mansour. Randomized interpolation and approximation of sparse polynomials. SIAM Journal on Computing, 24(2):357–368, 1995. [13] H. Mazzawi. Reconstructing Graphs Using Edge Counting Queries. PhD thesis, TechnionIsrael Institute of Technology, Faculty of Computer Science, 2011. [14] S. Negahban and D. Shah. Learning sparse boolean polynomials. In Communication, Control, and Computing (Allerton), 2012 50th Annual Allerton Conference on, pages 2032–2036. IEEE, 2012. [15] T. Richardson and R. Urbanke. Modern coding theory. Cambridge University Press, 2008. [16] R. Scheibler, S. Haghighatshoar, and M. Vetterli. A fast hadamard transform for signals with sub-linear sparsity. arXiv preprint arXiv:1310.1803, 2013. [17] B. Settles. Active learning literature survey. University of Wisconsin, Madison, 52:55–66, 2010. [18] P. Stobbe and A. Krause. Learning fourier sparse set functions. In International Conference on Artificial Intelligence and Statistics, pages 1125–1133, 2012. [19] Yahoo. Yahoo! webscope dataset ydata-ymessenger-user-communication-pattern-v1 0. 9 | 2015 | 208 |
5,712 | Efficient Thompson Sampling for Online Matrix-Factorization Recommendation Jaya Kawale, Hung Bui, Branislav Kveton Adobe Research San Jose, CA {kawale, hubui, kveton}@adobe.com Long Tran Thanh University of Southampton Southampton, UK ltt08r@ecs.soton.ac.uk Sanjay Chawla Qatar Computing Research Institute, Qatar University of Sydney, Australia sanjay.chawla@sydney.edu.au Abstract Matrix factorization (MF) collaborative filtering is an effective and widely used method in recommendation systems. However, the problem of finding an optimal trade-off between exploration and exploitation (otherwise known as the bandit problem), a crucial problem in collaborative filtering from cold-start, has not been previously addressed. In this paper, we present a novel algorithm for online MF recommendation that automatically combines finding the most relevant items with exploring new or less-recommended items. Our approach, called Particle Thompson sampling for MF (PTS), is based on the general Thompson sampling framework, but augmented with a novel efficient online Bayesian probabilistic matrix factorization method based on the Rao-Blackwellized particle filter. Extensive experiments in collaborative filtering using several real-world datasets demonstrate that PTS significantly outperforms the current state-of-the-arts. 1 Introduction Matrix factorization (MF) techniques have emerged as a powerful tool to perform collaborative filtering in large datasets [1]. These algorithms decompose a partially-observed matrix R ∈RN×M into a product of two smaller matrices, U ∈RN×K and V ∈RM×K, such that R ≈UV T . A variety of MF-based methods have been proposed in the literature and have been successfully applied to various domains. Despite their promise, one of the challenges faced by these methods is recommending when a new user/item arrives in the system, also known as the problem of coldstart. Another challenge is recommending items in an online setting and quickly adapting to the user feedback as required by many real world applications including online advertising, serving personalized content, link prediction and product recommendations. In this paper, we address these two challenges in the problem of online low-rank matrix completion by combining matrix completion with bandit algorithms. This setting was introduced in the previous work [2] but our work is the first satisfactory solution to this problem. In a bandit setting, we can model the problem as a repeated game where the environment chooses row i of R and the learning agent chooses column j. The Rij value is revealed and the goal (of the learning agent) is to minimize the cumulative regret with respect to the optimal solution, the highest entry in each row of R. The key design principle in a bandit setting is to balance between exploration and exploitation which solves the problem of cold start naturally. For example, in online advertising, exploration implies presenting new ads, about which little is known and observing subsequent feedback, while exploitation entails serving ads which are known to attract high click through rate. 1 While many solutions have been proposed for bandit problems, in the last five years or so, there has been a renewed interest in the use of Thompson sampling (TS) which was originally proposed in 1933 [3, 4]. In addition to having competitive empirical performance, TS is attractive due to its conceptual simplicity. An agent has to choose an action a (column) from a set of available actions so as to maximize the reward r, but it does not know with certainty which action is optimal. Following TS, the agent will select a with the probability that a is the best action. Let θ denotes the unknown parameter governing reward structure, and O1:t the history of observations currently available to the agent. The agent chooses a∗= a with probability Z I h E [r|a, θ] = max a′ E [r|a′, θ] i P(θ|O1:t)dθ which can be implemented by simply sampling θ from the posterior P(θ|O1:t) and let a∗= arg maxa′ E [r|a′, θ]. However for many realistic scenarios (including for matrix completion), sampling from P(θ|O1:t) is not computationally efficient and thus recourse to approximate methods is required to make TS practical. We propose a computationally-efficient algorithm for solving our problem, which we call Particle Thompson sampling for matrix factorization (PTS). PTS is a combination of particle filtering for online Bayesian parameter estimation and TS in the non-conjugate case when the posterior does not have a closed form. Particle filtering uses a set of weighted samples (particles) to estimate the posterior density. In order to overcome the problem of the huge parameter space, we utilize Rao-Blackwellization and design a suitable Monte Carlo kernel to come up with a computationally and statistically efficient way to update the set of particles as new data arrives in an online fashion. Unlike the prior work [2] which approximates the posterior of the latent item features by a single point estimate, our approach can maintain a much better approximation of the posterior of the latent features by a diverse set of particles. Our results on five different real datasets show a substantial improvement in the cumulative regret vis-a-vis other online methods. 2 Probabilistic Matrix Factorization ↵, β σv Vj σu Ui σ M N ⇥M Rij Figure 1: Graphical model of probabilistic matrix factorization model We first review the probabilistic matrix factorization approach to the low-rank matrix completion problem. In matrix completion, a portion Ro of the N × M matrix R = (rij) is observed, and the goal is to infer the unobserved entries of R. In probabilistic matrix factorization (PMF) [5], R is assumed to be a noisy perturbation of a rank-K matrix ¯R = UV ⊤where UN×K and VM×K are termed the user and item latent features (K is typically small). The full generative model of PMF is Ui i.i.d. ∼ N(0, σ2 uIK) Vj i.i.d. ∼ N(0, σ2 vIK) rij|U, V i.i.d. ∼ N(U ⊤ i Vj, σ2) (1) where the variances (σ2, σ2 U, σ2 V ) are the parameters of the model. We also consider a full Bayesian treatment where the variances σ2 U and σ2 V are drawn from an inverse Gamma prior (while σ2 is held fixed), i.e., λU = σ−2 U ∼Γ(α, β); λV = σ−2 V ∼Γ(α, β) (this is a special case of the Bayesian PMF [6] where we only consider isotropic Gaussians)1. Given this generative model, from the observed ratings Ro, we would like to estimate the parameters U and V which will allow us to “complete” the matrix R. PMF is a MAP point-estimate which finds U, V to maximize Pr(U, V |Ro, σ, σU, σV ) via (stochastic) gradient ascend (alternate least square can also be used [1]). Bayesian PMF [6] attempts to approximate the full posterior Pr(U, V |Ro, σ, α, β). The joint posterior of U and V are intractable; however, the structure of the graphical model (Fig. 1) can be exploited to derive an efficient Gibbs sampler. We now provide the expressions for the conditional probabilities of interest. Supposed that V and σU are known. Then the vectors Ui are independent for each user i. Let rts(i) = {j|rij ∈Ro} be the set of items rated by user i, observe that the ratings {Ro ij|j ∈rts(i)} are generated i.i.d. from Ui 1[6] considers the full covariance structure, but they also noted that isotropic Gaussians are effective enough. 2 following a simple conditional linear Gaussian model. Thus, the posterior of Ui has the closed form Pr(Ui|V, Ro, σ, σU) = Pr(Ui|Vrts(i), Ro i,rts(i), σU, σ) = N(Ui|µu i , (Λu i )−1) (2) where µu i = 1 σ2 (Λu i )−1ζu i ; Λu i = 1 σ2 X j∈rts(i) VjV ⊤ j + 1 σ2u IK; ζu i = X j∈rts(i) ro ijVj. (3) The conditional posterior of V , Pr(V |U, Ro, σV , σ) is similarly factorized into QM j=1 N(Vj|µv j, (Λv j)−1) where the mean and precision are similarly defined. The posterior of the precision λU = σ−2 U given U (and simiarly for λV ) is obtained from the conjugacy of the Gamma prior and the isotropic Gaussian Pr(λU|U, α, β) = Γ(λU|NK 2 + α, 1 2 ∥U∥2 F + β). (4) Although not required for Bayesian PMF, we give the likelihood expression Pr(Rij = r|V, Ro, σU, σ) = N(r|V ⊤ j µu i , 1 σ2 + V ⊤ j ΛV,iVj). (5) The advantage of the Bayesian approach is that uncertainty of the estimate of U and V are available which is crucial for exploration in a bandit setting. However, the bandit setting requires maitaining online estimates of the posterior as the ratings arrive over time which makes it rather awkward for MCMC. In this paper, we instead employ a sequential Monte-Carlo (SMC) method for online Bayesian inference [7, 8]. Similar to the Gibbs sampler [6], we exploit the above closed form updates to design an efficient Rao-Blackwellized particle filter [9] for maintaining the posterior over time. 3 Matrix-Factorization Recommendation Bandit In a typical deployed recommendation system, users and observed ratings (also called rewards) arrive over time, and the task of the system is to recommend item for each user so as to maximize the accumulated expected rewards. The bandit setting arises from the fact that the system needs to learn over time what items have the best ratings (for a given user) to recommend, and at the same time sufficiently explore all the items. We formulate the matrix factorization bandit as follows. We assume that ratings are generated following Eq. (1) with a fixed but unknown latent features (U ∗, V ∗). At time t, the environment chooses user it and the system (learning agent) needs to recommend an item jt. The user then rates the recommended item with rating rit,jt ∼N(U ∗ it ⊤V ∗ jt, σ2) and the agent receives this rating as a reward. We abbreviate this as ro t = rit,jt. The system recommends item jt using a policy that takes into account the history of the observed ratings prior to time t, ro 1:t−1, where ro 1:t = {(ik, jk, ro k)}t k=1. The highest expected reward the system can earn at time t is maxj U ∗ i ⊤V ∗ j , and this is achieved if the optimal item j∗(i) = arg maxj U ∗ i ⊤V ∗ j is recommended. Since (U ∗, V ∗) are unknown, the optimal item j∗(i) is also not known a priori. The quality of the recommendation system is measured by its expected cumulative regret: CR = E " n X t=1 [ro t −rit,j∗(it)] # = E " n X t=1 [ro t −max j U ∗ it ⊤V ∗ j ] # (6) where the expectation is taken with respect to the choice of the user at time t and also the randomness in the choice of the recommended items by the algorithm. 3.1 Particle Thompson Sampling for Matrix Factorization Bandit While it is difficult to optimize the cumulative regret directly, TS has been shown to work well in practice for contextual linear bandit [3]. To use TS for matrix factorization bandit, the main difficulty is to incrementally update the posterior of the latent features (U, V ) which control the reward structure. In this subsection, we describe an efficient Rao-Blackwellized particle filter (RBPF) designed to exploit the specific structure of the probabilistic matrix factorization model. Let θ = (σ, α, β) be the control parameters and let posterior at time t be pt = Pr(U, V, σU, σV , |ro 1:t, θ). The standard 3 Algorithm 1 Particle Thompson Sampling for Matrix Factorization (PTS) Global control params: σ, σU, σV ; for Bayesian version (PTS-B): σ, α, β 1: ˆp0 ←InitializeParticles() 2: Ro = ∅ 3: for t = 1, 2 . . . do 4: i ←current user 5: Sample d ∼ˆpt−1.w 6: ˜V ←ˆpt−1.V (d) 7: [If PTS-B] ˜σU ←ˆpt−1.σ(d) U 8: Sample ˜Ui ∼Pr(Ui| ˜V , ˜σU, σ, ro 1:t−1) ▷sample new Ui due to Rao-Blackwellization 9: ˆj ←arg maxj ˜U ⊤ i ˜Vj 10: Recommend ˆj for user i and observe rating r. 11: ro t ←(i, ˆj, r) 12: ˆpt ←UpdatePosterior(ˆpt−1, ro 1:t) 13: end for 14: procedure UPDATEPOSTERIOR(ˆp, ro 1:t) 15: ▷ˆp has the structure (w, particles) where particles[d] = (U (d), V (d), σ(d) U , σ(d) V ). 16: (i, j, r) ←ro t 17: ∀d, Λu i (d) ←Λu i (V (d), ro 1:t−1), ζu i (d) ←ζu i (V (d), ro 1:t−1) ▷see Eq. (3) 18: ∀d, wd ∝Pr(Rij = r|V (d), σ(d) U , σ, ro 1:t−1), see Eq.(5), P wd = 1 ▷Reweighting; see Eq.(5) 19: ∀d, i ∼ˆp.w; ˆp′.particles[d] ←ˆp.particles[i]; ∀d, ˆp′.wd ← 1 D ▷Resampling 20: for all d do ▷Move 21: Λu i (d) ←Λu i (d) + 1 σ2 VjV ⊤ j ; ζu i (d) ←ζu i (d) + rVj 22: ˆp′.U (d) i ∼Pr(Ui|ˆp′.V (d), ˆp′.σ(d) U , σ, ro 1:t) ▷see Eq. (2) 23: [If PTS-B] Update the norm of ˆp′.U (d) 24: Λv j (d) ←Λv j (V (d), ro 1:t), ζv j (d) ←ζu i (V (d), ro 1:t) 25: ˆp′.V (d) j ∼Pr(Vj|ˆp′.U (d), ˆp′.σ(d) V , σ, ro 1:t) 26: [If PTS-B] ˆp′.σ(d) U ∼Pr(σU|ˆp′.U (d), α, β) ▷see Eq.(4) 27: end for 28: return ˆp′ 29: end procedure particle filter would sample all of the parameters (U, V, σU, σV ). Unfortunately, in our experiments, degeneracy is highly problematic for such a vanilla particle filter (PF) even when σU, σV are assumed known (see Fig. 4(b)). Our RBPF algorithm maintains the posterior distribution pt as follows. Each of the particle conceptually represents a point-mass at V, σU (U and σV are integrated out analytically whenever possible)2. Thus, pt(V, σU) is approximated by ˆpt = 1 D PD d=1 δ(V (d),σ(d) U ) where D is the number of particles. Crucially, since the particle filter needs to estimate a set of non-time-vayring parameters, having an effective and efficient MCMC-kernel move Kt(V ′, σ′ U; V, σU) stationary w.r.t. pt is essential. Our design of the move kernel Kt are based on two observations. First, we can make use of U and σV as auxiliary variables, effectively sampling U, σV |V, σU ∼pt(U, σV |V, σU), and then V ′, σ′ U|U, σV ∼pt(V ′, σ′ U|U, σV ). However, this move would be highly inefficient due to the number of variables that need to be sampled at each update. Our second observation is the key to an efficient implementation. Note that latent features for all users except the current user U−it are independent of the current observed rating ro t : pt(U−it|V, σU) = pt−1(U−it|V, σU), therefore at time t we only have to resample Uit as there is no need to resample U−it. Furthermore, it suffices to resample the latent feature of the current item Vjt. This leads to an efficient implementation of the RBPF where each particle in fact stores3 U, V, σU, σV , where (U, σV ) are auxiliary variables, and for the kernel move Kt, we sample Uit|V, σU then V ′ jt|U, σV and σ′ U|U, α, β. The PTS algorithm is given in Algo. 1. At each time t, the complexity is O((( ˆN + ˆ M)K2 +K3)D) where ˆN and ˆ M are the maximum number of users who have rated the same item and the maximum 2When there are fewer users than items, a similar strategy can be derived to integrate out U and σV instead. 3This is not inconsistent with our previous statement that conceptually a particle represents only a pointmass distribution δV,σU . 4 number of items rated by the same user, respectively. The dependency on K3 arises from having to invert the precision matrix, but this is not a concern since the rank K is typically small. Line 24 can be replaced by an incremental update with caching: after line 22, we can incrementally update Λv j and ζv j for all item j previously rated by the current user i. This reduces the complexity to O(( ˆ MK2 + K3)D), a potentially significant improvement in a real recommendation systems where each user tends to rate a small number of items. 4 Analysis We believe that the regret of PTS can be bounded. However, the existing work on TS and bandits does not provide sufficient tools for proper analysis of our algorithm. In particular, while existing techniques can provide O(log T) (or O( √ T) for gap-independent) regret bounds for our problem, these bounds are typically linear in the number of entries of the observation matrix R (or at least linear in the number of users), which is typically very large, compared to T. Thus, an ideal regret bound in our setting is the one that has sub-linear dependency (or no dependency at all) on the number of users. A key obstacle of achieving this is that, while the conditional posteriors of U and V are Gaussians, neither their marginal and joint posteriors belong to well behaved classes (e.g., conjugate posteriors, or having closed forms). Thus, novel tools, that can handle generic posteriors, are needed for efficient analysis. Moreover, in the general setting, the correlation between Ro and the latent features U and V are non-linear (see, e.g., [10, 11, 12] for more details). As existing techniques are typically designed for efficiently learning linear regressions, they are not suitable for our problem. Nevertheless, we show how to bound the regret of TS in a very specific case of n × m rank-1 matrices, and we leave the generalization of these results for future work. In particular, we analyze the regret of PTS in the setting of Gopalan et al. [13]. We model our problem as follows. The parameter space is Θu × Θv, where Θu = {d, 2d, . . . , 1}N×1 and Θv = {d, 2d, . . . , 1}M×1 are discretizations of the parameter spaces of rank-1 factors u and v for some integer 1/d. For the sake of theoretical analysis, we assume that PTS can sample from the full posterior. We also assume that ri,j ∼N(u∗ i v∗ j , σ2) for some u∗∈Θu and v∗∈Θu. Note that in this setting, the highest-rated item in expectation is the same for all users. We denote this item by j∗= arg max 1≤j≤M v∗ j and assume that it is uniquely optimal, u∗ j∗> u∗ j for any j ̸= j∗. We leverage these properties in our analysis. The random variable Xt at time t is a pair of a random rating matrix Rt = {ri,j}N,M i=1,j=1 and a random row 1 ≤it ≤N. The action At at time t is a column 1 ≤jt ≤M. The observation is Yt = (it, rit,jt). We bound the regret of PTS as follows. Theorem 1. For any δ ∈(0, 1) and ϵ ∈(0, 1), there exists T ∗such that PTS on Θu × Θv recommends items j ̸= j∗in T ≥T ∗steps at most (2M 1+ϵ 1−ϵ σ2 d4 log T + B) times with probability of at least 1 −δ, where B is a constant independent of T. Proof. By Theorem 1 of Gopalan et al. [13], the number of recommendations j ̸= j∗is bounded by C(log T) + B, where B is a constant independent of T. Now we bound C(log T) by counting the number of times that PTS selects models that cannot be distinguished from (u∗, v∗) after observing Yt under the optimal action j∗. Let: Θj = (u, v) ∈Θu × Θv : ∀i : uivj∗= u∗ i v∗ j∗, vj ≥maxk̸=j vk be the set of such models where action j is optimal. Suppose that our algorithm chooses model (u, v) ∈Θj. Then the KL divergence between the distributions of ratings ri,j under models (u, v) and (u∗, v∗) is bounded from below as: DKL(uivj ∥u∗ i v∗ j ) = (uivj −u∗ i v∗ j )2 2σ2 ≥d4 2σ2 . for any i. The last inequality follows from the fact that uivj ≥uivj∗= u∗ i v∗ j∗> u∗ i v∗ j , because j∗is uniquely optimal in (u∗, v∗). We know that uivj −u∗ i v∗ j ≥d2 because the granularity of our discretization is d. Let i1, . . . , in be any n row indices. Then the KL divergence between the distributions of ratings in positions (i1, j), . . . , (in, j) under models (u, v) and (u∗, v∗) is Pn t=1 DKL(uitvj ∥u∗ itv∗ j ) ≥n d4 2σ2 . By Theorem 1 of Gopalan et al. [13], the models (u, v) ∈Θj are unlikely to be chosen by PTS in T steps when Pn t=1 DKL(uitvj ∥u∗ itv∗ j ) ≥log T. This happens after at most n ≥2 1+ϵ 1−ϵ σ2 d4 log T selections of (u, v) ∈Θj. Now we apply the same argument to all Θj, M −1 in total, and sum up the corresponding regrets. 5 Remarks: Note that Theorem 1 implies at O(2M 1+ϵ 1−ϵ σ2 d4 log T) regret bound that holds with high probability. Here, d2 plays the role of a gap ∆, the smallest possible difference between the expected ratings of item j ̸= j∗in any row i. In this sense, our result is O((1/∆2) log T) and is of a similar magnitude as the results in Gopalan et al. [13]. While we restrict u∗, v∗∈(0, 1]K×1 in the proof, this does not affect the algorithm. In fact, the proof only focuses on high probability events where the samples from the posterior are concentrated around the true parameters, and thus, are within (0, 1]K×1 as well. Extending our proof to the general setting is not trivial. In particular, moving from discretized parameters to continuous space introduces the abovementioned ill behaved posteriors. While increasing the value of K will violate the fact that the best item will be the same for all users, which allowed us to eliminate N from the regret bound. 5 Experiments and Results The goal of our experimental evaluation is twofold: (i) evaluate the PTS algorithm for making online recommendations with respect to various baseline algorithms on several real-world datasets and (ii) understand the qualitative performance and intuition of PTS. 5.1 Dataset description We use a synthetic dataset and five real world datasets to evaluate our approach. The synthetic dataset is generated as follows - At first we generate the user and item latent features (U and V ) of rank K by drawing from a Gaussian distribution N(0, σ2 u) and N(0, σ2 v) respectively. The true rating matrix is then R∗= UV T . We generate the observed rating matrix R from R∗by adding Gaussian noise N(0, σ2) to the true ratings. We use five real world datasets as follows: Movielens 100k, Movielens 1M, Yahoo Music4, Book crossing5 and EachMovie as shown in Table 1. Movielens 100k Movielens 1M Yahoo Music Book crossing EachMovie # users 943 6040 15400 6841 36656 # items 1682 3900 1000 5644 1621 # ratings 100k 1M 311,704 90k 2.58M Table 1: Characteristics of the datasets used in our study 5.2 Baseline measures There are no current approaches available that simultaneously learn both the user and item factors by sampling from the posterior in a bandit setting. From the currently available algorithms, we choose two kinds of baseline methods - one that sequentially updates the the posterior of the user features only while fixing the item features to a point estimate (ICF) and another that updates the MAP estimates of user and item features via stochastic gradient descent (SGD-Eps). A key challenge in online algorithms is unbiased offline evaluation. One problem in the offline setting is the partial information available about user feedback, i.e., we only have information about the items that the user rated. In our experiment, we restrict the recommendation space of all the algorithms to recommend among the items that the user rated in the entire dataset which makes it possible to empirically measure regret at every interaction. The baseline measures are as follows: 1) Random : At each iteration, we recommend a random movie to the user. 2) Most Popular : At each iteration, we recommend the most popular movie restricted to the movies rated by the user on the dataset. Note that this is an unrealistically optimistic baseline for an online algorithm as it is not possible to know the global popularity of the items beforehand. 3) ICF: The ICF algorithm [2] proceeds by first estimating the user and item latent factors (U and V ) on a initial training period and then for every interaction thereafter only updates the user features (U) assuming the item features (V ) as fixed. We run two scenarios for the ICF algorithm one in which we use 20% (icf-20) and 50% (icf-50) of the data as the training period respectively. During this period of training, we randomly recommend a movie to the user to compute the regret. We use the PMF implementation by [5] for estimating the U and V . 4) SGD-Eps: We learn the latent factors using an online variant of the PMF algorithm [5]. We use the stochastic gradient descent to update the latent factors with a mini-batch size of 50. In order to make a recommendation, we use the ϵ-greedy strategy and recommend the highest UiV T with a probability ϵ and make a random recommendations otherwise. (ϵ is set as 0.95 in our experiments.) 4http://webscope.sandbox.yahoo.com/ 5http://www.bookcrossing.com 6 5.3 Results on Synthetic Dataset We generated the synthetic dataset as mentioned earlier and run the PTS algorithm with 100 particles for recommendations. We simulate the setting as mentioned in Section 3 and assume that at time t, a random user it arrives and the system recommends an item jt. The user rates the recommended item rit,jt and we evaluate the performance of the model by computing the expected cumulative regret defined in Eq(6). Fig. 2 shows the cumulative regret of the algorithm on the synthetic data averaged over 100 runs using different size of the matrix and latent features K. The cumulative regret increases sub-linearly with the number of interactions and this gives us confidence that our approach works well on the synthetic dataset. 0 20 40 60 80 100 0 10 20 30 40 50 60 Iterations Cummulative Regret (a) N, M=10,K=1 0 100 200 300 400 500 0 20 40 60 80 100 120 140 160 180 200 Iterations Cummulative Regret (b) N, M=20,K=1 0 200 400 600 800 1000 0 50 100 150 200 250 300 350 400 450 Iterations Cummulative Regret (c) N, M=30,K=1 0 20 40 60 80 100 0 20 40 60 80 100 120 Iterations Cummulative Regret (d) N, M=10,K=2 0 20 40 60 80 100 0 20 40 60 80 100 120 140 Iterations Cummulative Regret (e) N, M=10,K=3 Figure 2: Cumulative regret on different sizes of the synthetic data and K averaged over 100 runs. 5.4 Results on Real Datasets 0 2 4 6 8 10 x 10 4 0 5 10 15 x 10 4 Iterations Cummulative Regret PTS random popular icf−20 icf−50 sgd−eps PTS−B (a) Movielens 100k 0 2 4 6 8 10 12 x 10 5 0 5 10 15 x 10 5 Iterations Cummulative Regret PTS random popular icf−20 icf−50 sgd−eps PTS−B (b) Movielens 1M 0 0.5 1 1.5 2 2.5 3 3.5 x 10 5 0 1 2 3 4 5 6 x 10 5 Iterations Cummulative Regret PTS random popular icf−20 icf−50 sgd−eps PTS−B (c) Yahoo Music 0 2 4 6 8 10 x 10 4 0 2 4 6 8 10 12 14 16 18 x 10 4 Iterations Cummulative Regret PTS random popular icf−50 sgd−eps PTS−B (d) Book Crossing 0 0.5 1 1.5 2 2.5 3 x 10 6 0 1 2 3 4 5 6 x 10 6 Iterations Cummulative Regret PTS random popular icf−20 icf−50 sgd−eps PTS−B (e) EachMovie Figure 3: Comparison with baseline methods on five datasets. Next, we evaluate our algorithms on five real datasets and compare them to the various baseline algorithms. We subtract the mean ratings from the data to centre it at zero. To simulate an extreme cold-start scenario we start from an empty set of user and rating. We then iterate over the datasets and assume that a random user it has arrived at time t and the system recommends an item jt constrained to the items rated by this user in the dataset. We use K = 2 for all the algorithms and use 30 particles for our approach. For PTS we set the value of σ2 = 0.5 and σ2 u = 1, σ2 v = 1. For PTS-B (Bayesian version, see Algo. 1 for more details), we set σ2 = 0.5 and the initial shape parameters of the Gamma distribution as α = 2 and β = 0.5. For both ICF-20 and ICF-50, we set σ2 = 0.5 and σ2 u = 1. Fig. 3 shows the cumulative regret of all the algorithms on the five datasets6. Our approach performs significantly better as compared to the baseline algorithms on this diverse set of datasets. PTS-B with no parameter tuning performs slightly better than PTS and achieves the best regret. It is important to note that both PTS and PTS-B performs comparable to or even better than the “most popular” baseline despite not knowing the global popularity in advance. Note that ICF is very sensitive to the length of the initial training period; it is not clear how to set this apriori. 6ICF-20 fails to run on the Bookcrossing dataset as the 20% data is too sparse for the PMF implementation. 7 −200 0 200 400 600 800 1000 0.5 1 1.5 2 2.5 3 3.5 4 Iterations x 1000 MSE test error pmf (a) Movielens 1M 0 20 40 60 80 100 −2 −1 0 1 2 3 4 Iterations MSE RB No RB (b) RB particle filter −0.4 −0.2 0 0.2 0.4 0.6 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 ICF−20 PTS−20 PTS−100 (c) Movie feature vector Figure 4: a) shows MSE on movielens 1M dataset, the red line is the MSE using the PMF algorithm b) shows performance of a RBPF (blue line) as compared to vanilla PF (red line) on a synthetic dataset N,M=10 and c) shows movie feature vectors for a movie with 384 ratings, the red dot is the feature vector from the ICF-20 algorithm (using 73 ratings). PTS-20 is the feature vector at 20% of the data (green dots) and PTS-100 at 100% (blue dots). We also evaluate the performance of our model in an offline setting as follows: We divide the datasets into training and test set and iterate over the training data triplets (it, jt, rt) by pretending that jt is the movie recommended by our approach and update the latent factors according to RBPF. We compute the recovered matrix ˆR as the average prediction UV T from the particles at each time step and compute the mean squared error (MSE) on the test dataset at each iteration. Unlike the batch method such as PMF which takes multiple passes over the data, our method was designed to have bounded update complexity at each iteration. We ran the algorithm using 80% data for training and the rest for testing and computed the MSE by averaging the results over 5 runs. Fig. 4(a) shows the average MSE on the movielens 1M dataset. Our MSE (0.7925) is comparable to the PMF MSE (0.7718) as shown by the red line. This demonstrates that the RBPF is performing reasonably well for matrix factorization. In addition, Fig. 4(b) shows that on the synthetic dataset, the vanilla PF suffers from degeneration as seen by the high variance. To understand the intuition why fixing the latent item features V as done in the ICF does not work, we perform an experiment as follows: We run the ICF algorithm on the movielens 100k dataset in which we use 20% of the data for training. At this point the ICF algorithm fixes the item features V and only updates the user features U. Next, we run our algorithm and obtain the latent features. We examined the features for one selected movie from the particles at two time intervals - one when the ICF algorithm fixes them at 20% and another one in the end as shown in the Fig. 4(c). It shows that movie features have evolved into a different location and hence fixing them early is not a good idea. 6 Related Work Probabilistic matrix completion in a bandit setting setting was introduced in the previous work by Zhao et al. [2]. The ICF algorithm in [2] approximates the posterior of the latent item features by a single point estimate. Several other bandit algorithms for recommendations have been proposed. Valko et al. [14] proposed a bandit algorithm for content-based recommendations. In this approach, the features of the items are extracted from a similarity graph over the items, which is known in advance. The preferences of each user for the features are learned independently by regressing the ratings of the items from their features. The key difference in our approach is that we also learn the features of the items. In other words, we learn both the user and item factors, U and V , while [14] learn only U. Kocak et al. [15] combine the spectral bandit algorithm in [14] with TS. Gentile et al. [16] propose a bandit algorithm for recommendations that clusters users in an online fashion based on the similarity of their preferences. The preferences are learned by regressing the ratings of the items from their features. The features of the items are the input of the learning algorithm and they only learn U. Maillard et al. [17] study a bandit problem where the arms are partitioned into unknown clusters unlike our work which is more general. 7 Conclusion We have proposed an efficient method for carrying out matrix factorization (M ≈UV T ) in a bandit setting. The key novelty of our approach is the combined use of Rao-Blackwellized particle filtering and Thompson sampling (PTS) in matrix factorization recommendation. This allows us to simultaneously update the posterior probability of U and V in an online manner while minimizing the cumulative regret. The state of the art, till now, was to either use point estimates of U and V or use a point estimate of one of the factor (e.g., U) and update the posterior probability of the other (V ). PTS results in substantially better performance on a wide variety of real world data sets. 8 References [1] Yehuda Koren, Robert Bell, and Chris Volinsky. Matrix factorization techniques for recommender systems. Computer, 42(8):30–37, 2009. [2] Xiaoxue Zhao, Weinan Zhang, and Jun Wang. Interactive collaborative filtering. In Proceedings of the 22nd ACM international conference on Conference on information & knowledge management, pages 1411–1420. ACM, 2013. [3] Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. In NIPS, pages 2249–2257, 2011. [4] Shipra Agrawal and Navin Goyal. Thompson sampling for contextual bandits with linear payoffs. In ICML (3), pages 127–135, 2013. [5] Ruslan Salakhutdinov and Andriy Mnih. Probabilistic matrix factorization. In NIPS, volume 1, pages 2–1, 2007. [6] Ruslan Salakhutdinov and Andriy Mnih. Bayesian probabilistic matrix factorization using markov chain monte carlo. In ICML, pages 880–887, 2008. [7] Nicolas Chopin. A sequential particle filter method for static models. Biometrika, 89(3):539– 552, 2002. [8] Pierre Del Moral, Arnaud Doucet, and Ajay Jasra. Sequential monte carlo samplers. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(3):411–436, 2006. [9] Arnaud Doucet, Nando De Freitas, Kevin Murphy, and Stuart Russell. Rao-blackwellised particle filtering for dynamic bayesian networks. In Proceedings of the Sixteenth conference on Uncertainty in artificial intelligence, pages 176–183. Morgan Kaufmann Publishers Inc., 2000. [10] A. Gelman and X. L Meng. A note on bivariate distributions that are conditionally normal. Amer. Statist., 45:125–126, 1991. [11] B. C. Arnold, E. Castillo, J. M. Sarabia, and L. Gonzalez-Vega. Multiple modes in densities with normal conditionals. Statist. Probab. Lett., 49:355–363, 2000. [12] B. C. Arnold, E. Castillo, and J. M. Sarabia. Conditionally specified distributions: An introduction. Statistical Science, 16(3):249–274, 2001. [13] Aditya Gopalan, Shie Mannor, and Yishay Mansour. Thompson sampling for complex online problems. In Proceedings of The 31st International Conference on Machine Learning, pages 100–108, 2014. [14] Michal Valko, R´emi Munos, Branislav Kveton, and Tom´aˇs Koc´ak. Spectral bandits for smooth graph functions. In 31th International Conference on Machine Learning, 2014. [15] Tom´aˇs Koc´ak, Michal Valko, R´emi Munos, and Shipra Agrawal. Spectral thompson sampling. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, 2014. [16] Claudio Gentile, Shuai Li, and Giovanni Zappella. Online clustering of bandits. arXiv preprint arXiv:1401.8257, 2014. [17] Odalric-Ambrym Maillard and Shie Mannor. Latent bandits. In Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014, pages 136–144, 2014. 9 | 2015 | 209 |
5,713 | Optimal Ridge Detection using Coverage Risk Yen-Chi Chen Department of Statistics Carnegie Mellon University yenchic@andrew.cmu.edu Christopher R. Genovese Department of Statistics Carnegie Mellon University genovese@stat.cmu.edu Shirley Ho Department of Physics Carnegie Mellon University shirleyh@andrew.cmu.edu Larry Wasserman Department of Statistics Carnegie Mellon University larry@stat.cmu.edu Abstract We introduce the concept of coverage risk as an error measure for density ridge estimation. The coverage risk generalizes the mean integrated square error to set estimation. We propose two risk estimators for the coverage risk and we show that we can select tuning parameters by minimizing the estimated risk. We study the rate of convergence for coverage risk and prove consistency of the risk estimators. We apply our method to three simulated datasets and to cosmology data. In all the examples, the proposed method successfully recover the underlying density structure. 1 Introduction Density ridges [10, 22, 15, 6] are one-dimensional curve-like structures that characterize high density regions. Density ridges have been applied to computer vision [2], remote sensing [21], biomedical imaging [1], and cosmology [5, 7]. Density ridges are similar to the principal curves [17, 18, 27]. Figure 1 provides an example for applying density ridges to learn the structure of our Universe. To detect density ridges from data, [22] proposed the ‘Subspace Constrained Mean Shift (SCMS)’ algorithm. SCMS is a modification of usual mean shift algorithm [14, 8] to adapt to the local geometry. Unlike mean shift that pushes every mesh point to a local mode, SCMS moves the meshes along a projected gradient until arriving at nearby ridges. Essentially, the SCMS algorithm detects the ridges of the kernel density estimator (KDE). Therefore, the SCMS algorithm requires a preselected parameter h, which acts as the role of smoothing bandwidth in the kernel density estimator. Despite the wide application of the SCMS algorithm, the choice of h remains an unsolved problem. Similar to the density estimation problem, a poor choice of h results in over-smoothing or undersmoothing for the density ridges. See the second row of Figure 1. In this paper, we introduce the concept of coverage risk which is a generalization of the mean integrated expected error from function estimation. We then show that one can consistently estimate the coverage risk by using data splitting or the smoothed bootstrap. This leads us to a data-driven selection rule for choosing the parameter h for the SCMS algorithm. We apply the proposed method to several famous datasets including the spiral dataset, the three spirals dataset, and the NIPS dataset. In all simulations, our selection rule allows the SCMS algorithm to detect the underlying structure of the data. 1 Figure 1: The cosmic web. This is a slice of the observed Universe from the Sloan Digital Sky Survey. We apply the density ridge method to detect filaments [7]. The top row is one example for the detected filaments. The bottom row shows the effect of smoothing. Bottom-Left: optimal smoothing. Bottom-Middle: under-smoothing. Bottom-Right: over-smoothing. Under optimal smoothing, we detect an intricate filament network. If we under-smooth or over-smooth the dataset, we cannot find the structure. 1.1 Density Ridges Density ridges are defined as follows. Assume X1, · · · , Xn are independently and identically distributed from a smooth probability density function p with compact support K. The density ridges [10, 15, 6] are defined as R = {x ∈K : V (x)V (x)T ∇p(x) = 0, λ2(x) < 0}, where V (x) = [v2(x), · · · vd(x)] with vj(x) being the eigenvector associated with the ordered eigenvalue λj(x) (λ1(x) ≥· · · ≥λd(x)) for Hessian matrix H(x) = ∇∇p(x). That is, R is the collection of points whose projected gradient V (x)V (x)T ∇p(x) = 0. It can be shown that (under appropriate conditions), R is a collection of 1-dimensional smooth curves (1-dimensional manifolds) in Rd. The SCMS algorithm is a plug-in estimate for R by using bRn = n x ∈K : bVn(x)bVn(x)T ∇bpn(x) = 0, bλ2(x) < 0 o , where bpn(x) = 1 nhd Pn i=1 K x−Xi h is the KDE and bVn and bλ2 are the associated quantities defined by bpn. Hence, one can clearly see that the parameter h in the SCMS algorithm plays the same role of smoothing bandwidth for the KDE. 2 2 Coverage Risk Before we introduce the coverage risk, we first define some geometric concepts. Let µℓbe the ℓdimensional Hausdorff measure [13]. Namely, µ1(A) is the length of set A and µ2(A) is the area of A. Let d(x, A) be the projection distance from point x to a set A. We define UR and U b Rn as random variables uniformly distributed over the true density ridges R and the ridge estimator bRn respectively. Assuming R and bRn are given, we define the following two random variables Wn = d(UR, bRn), f Wn = d(U b Rn, R). (1) Note that UR, U b Rn are random variables while R, bRn are sets. Wn is the distance from a randomly selected point on R to the estimator bRn and f Wn is the distance from a random point on bRn to R. Let Haus(A, B) = inf{r : A ⊂B ⊕r, B ⊂A ⊕r} be the Hausdorff distance between A and B where A ⊕r = {x : d(x, A) ≤r}. The following lemma gives some useful properties about Wn and f Wn. Lemma 1 Both random variables Wn and f Wn are bounded by Haus(c Mn, M). Namely, 0 ≤Wn ≤Haus( bRn, R), 0 ≤f Wn ≤Haus( bRn, R). (2) The cumulative distribution function (CDF) for Wn and f Wn are P(Wn ≤r| bRn) = µ1 R ∩( bRn ⊕r) µ1 (R) , P(f Wn ≤r| bRn) = µ1 bRn ∩(R ⊕r) µ1 bRn . (3) Thus, P(Wn ≤r| bRn) is the ratio of R being covered by padding the regions around bRn at distance r. This lemma follows trivially by definition so that we omit its proof. Lemma 1 links the random variables Wn and f Wn to the Hausdorff distance and the coverage for R and bRn. Thus, we call them coverage random variables. Now we define the L1 and L2 coverage risk for estimating R by bRn as Risk1,n = E(Wn + f Wn) 2 , Risk2,n = E(W 2 n + f W 2 n) 2 . (4) That is, Risk1,n (and Risk2,n) is the expected (square) projected distance between R and bRn. Note that the expectation in (4) applies to both bRn and UR. One can view Risk2,n as a generalized mean integrated square errors (MISE) for sets. A nice property of Risk1,n and Risk2,n is that they are not sensitive to outliers of R in the sense that a small perturbation of R will not change the risk too much. On the contrary, the Hausdorff distance is very sensitive to outliers. 2.1 Selection for Tuning Parameters Based on Risk Minimization In this section, we will show how to choose h by minimizing an estimate of the risk. We propose two risk estimators. The first estimator is based on the smoothed bootstrap [25]. We sample X∗ 1, · · · X∗ n from the KDE bpn and recompute the estimator bR∗ n. The we estimate the risk by d Risk1,n = E(W ∗ n + f W ∗ n|X1, · · · , Xn) 2 , d Risk2,n = E(W ∗2 n + f W ∗2 n |X1, · · · , Xn) 2 , (5) where W ∗ n = d(U b Rn, bR∗ n) and f W ∗ n = d(U b R∗n, bRn). 3 The second approach is to use data splitting. We randomly split the data into X† 11, · · · , X† 1m and X† 21, · · · , X† 2m, assuming n is even and 2m = n. We compute the estimated manifolds by using half of the data, which we denote as bR† 1,n and bR† 2,n. Then we compute d Risk † 1,n = E(W † 1,n + W † 2,n|X1, · · · , Xn) 2 , d Risk † 2,n = E(W †2 1,n + W †2 2,n|X1, · · · , Xn) 2 , (6) where W † 1,n = d(U b R† 1,n, bR† 2,n) and W † 2,n = d(U b R† 2,n, bR† 1,n). Having estimated the risk, we select h by h∗= argmin h≤¯hn d Risk † 1,n, (7) where ¯hn is an upper bound by the normal reference rule [26] (which is known to oversmooth, so that we only select h below this rule). Moreover, one can choose h by minimizing L2 risk as well. In [11], they consider selecting the smoothing bandwidth for local principal curves by self-coverage. This criterion is a different from ours. The self-coverage counts data points. The self-coverage is a monotonic increasing function and they propose to select the bandwidth such that the derivative is highest. Our coverage risk yields a simple trade-off curve and one can easily pick the optimal bandwidth by minimizing the estimated risk. 3 Manifold Comparison by Coverage The concepts of coverage in previous section can be generalized to investigate the difference between two manifolds. Let M1 and M2 be an ℓ1-dimensional and an ℓ2-dimensional manifolds (ℓ1 and ℓ2 are not necessarily the same). We define the coverage random variables W12 = d(UM1, M2), W21 = d(UM2, M1). (8) Then by Lemma 1, the CDF for W12 and W21 contains information about how M1 and M2 are different from each other: P(W12 ≤r) = µℓ1 (M1 ∩(M2 ⊕r)) µℓ2 (M1) , P(W21 ≤r) = µℓ2 (M2 ∩(M1 ⊕r)) µr2 (M1) . (9) P(W12 ≤r) is the coverage on M1 by padding regions with distance r around M2. We call the plots of the CDF of W12 and W21 coverage diagrams since they are linked to the coverage over M1 and M2. The coverage diagram allows us to study how two manifolds are different from each other. When ℓ1 = ℓ2, the coverage diagram can be used as a similarity measure for two manifolds. When ℓ1 ̸= ℓ2, the coverage diagram serves as a measure for quality of representing high dimensional objects by low dimensional ones. A nice property for coverage diagram is that we can approximate the CDF for W12 and W21 by a mesh of points (or points uniformly distributed) over M1 and M2. In Figure 2 we consider a Helix dataset whose support has dimension d = 3 and we compare two curves, a spiral curve (green) and a straight line (orange), to represent the Helix dataset. As can be seen from the coverage diagram (right panel), the green curve has better coverage at each distance (compared to the orange curve) so that the spiral curve provides a better representation for the Helix dataset. In addition to the coverage diagram, we can also use the following L1 and L2 losses as summary for the difference: Loss1(M1, M2) = E(W12 + W21) 2 , Loss2(M1, M2) = E(W 2 12 + W 2 21) 2 . (10) The expectation is take over UM1 and UM2 and both M1 and M2 here are fixed. The risks in (4) are the expected losses: Risk1,n = E Loss1(c Mn, M) , Risk2,n = E Loss2(c Mn, M) . (11) 4 G G GG G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGG G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGG G G G G G G G G G G G G G G G G G GG G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 r Coverage Figure 2: The Helix dataset. The original support for the Helix dataset (black dots) are a 3dimensional regions. We can use green spiral curves (d = 1) to represent the regions. Note that we also provide a bad representation using a straight line (orange). The coverage plot reveals the quality for representation. Left: the original data. Dashed line is coverage from data points (black dots) over green/orange curves in the left panel and solid line is coverage from green/orange curves on data points. Right: the coverage plot for the spiral curve (green) versus a straight line (orange). 4 Theoretical Analysis In this section, we analyze the asymptotic behavior for the coverage risk and prove the consistency for estimating the coverage risk by the proposed method. In particular, we derive the asymptotic properties for the density ridges. We only focus on L2 risk since by Jensen’s inequality, the L2 risk can be bounded by the L1 risk. Before we state our assumption, we first define the orientation of density ridges. Recall that the density ridge R is a collection of one dimensional curves. Thus, for each point x ∈R, we can associate a unit vector e(x) that represent the orientation of R at x. The explicit formula for e(x) can be found in Lemma 1 of [6]. Assumptions. (R) There exist β0, β1, β2, δR > 0 such that for all x ∈R ⊕δR, λ2(x) ≤−β1, λ1(x) ≥β0 −β1, ∥∇p(x)∥∥p(3)(x)∥max ≤β0(β1 −β2), (12) where ∥p(3)(x)∥max is the element wise norm to the third derivative. And for each x ∈R, |e(x)T ∇p(x)| ≥ λ1(x) λ1(x)−λ2(x). (K1) The kernel function K is three times bounded differetiable and is symmetric, non-negative and Z x2K(α)(x)dx < ∞, Z K(α)(x) 2 dx < ∞ for all α = 0, 1, 2, 3. (K2) The kernel function K and its partial derivative satisfies condition K1 in [16]. Specifically, let K = y 7→K(α) x −y h : x ∈Rd, h > 0, |α| = 0, 1, 2 (13) We require that K satisfies sup P N K, L2(P), ϵ∥F∥L2(P ) ≤ A ϵ v (14) 5 for some positive number A, v, where N(T, d, ϵ) denotes the ϵ-covering number of the metric space (T, d) and F is the envelope function of K and the supreme is taken over the whole Rd. The A and v are usually called the VC characteristics of K. The norm ∥F∥L2(P ) = supP R |F(x)|2dP(x). Assumption (R) appears in [6] and is very mild. The first two inequality in (12) are just the bound on eigenvalues. The last inequality requires the density around ridges to be smooth. The latter part of (R) requires the direction of ridges to be similar to the gradient direction. Assumption (K1) is the common condition for kernel density estimator see e.g. [28] and [24]. Assumption (K2) is to regularize the classes of kernel functions that is widely assumed [12, 15, 4]; any bounded kernel function with compact support satisfies this condition. Both (K1) and (K2) hold for the Gaussian kernel. Under the above condition, we derive the rate of convergence for the L2 risk. Theorem 2 Let Risk2,n be the L2 coverage risk for estimating the density ridges and level sets. Assume (K1–2) and (R) and p is at least four times bounded differentiable. Then as n →∞, h →0 and log n nhd+6 →0 Risk2,n = B2 Rh4 + σ2 R nhd+2 + o(h4) + o 1 nhd+2 , for some BR and σ2 R that depends only on the density p and the kernel function K. The rate in Theorem 2 shows a bias-variance decomposition. The first term involving h4 is the bias term while the latter term is the variance part. Thanks to the Jensen’s inequality, the rate of convergence for L1 risk is the square root of the rate Theorem 2. Note that we require the smoothing parameter h to decay slowly to 0 by log n nhd+6 →0. This constraint comes from the uniform bound for estimating third derivatives for p. We need this constraint since we need the smoothness for estimated ridges to converge to the smoothness for the true ridges. Similar result for density level set appears in [3, 20]. By Lemma 1, we can upper bound the L2 risk by expected square of the Hausdorff distance which gives the rate Risk2,n ≤E Haus2( bRn, R) = O(h4) + O log n nhd+2 (15) The rate under Hausdorff distance for density ridges can be found in [6] and the rate for density ridges appears in [9]. The rate induced by Theorem 2 agrees with the bound from the Hausdorff distance and has a slightly better rate for variance (without a log-n factor). This phenomena is similar to the MISE and L∞error for nonparametric estimation for functions. The MISE converges slightly faster (by a log-n factor) than square to the L∞error. Now we prove the consistency of the risk estimators. In particular, we prove the consistency for the smoothed bootstrap. The case of data splitting can be proved in the similar way. Theorem 3 Let Risk2,n be the L2 coverage risk for estimating the density ridges and level sets. Let d Risk2,n be the corresponding risk estimator by the smoothed bootstrap. Assume (K1–2) and (R) and p is at least four times bounded differentiable. Then as n →∞, h →0 and log n nhd+6 →0, d Risk2,n −Risk2,n Risk2,n P→0. Theorem 3 proves the consistency for risk estimation using the smoothed bootstrap. This also leads to the consistency for data splitting. 6 0.0 0.5 1.0 1.5 2.0 0.5 1.0 1.5 2.0 2.5 3.0 Smoothing Parameter (Estimated) L1 Coverage Risk G G G G G G G G G G G G G G G G G G G G 0.0 0.5 1.0 1.5 2.0 0.2 0.4 0.6 0.8 1.0 1.2 Smoothing Parameter (Estimated) L1 Coverage Risk G G G G G G G G G G G G G G G G G G G G 0.0 0.5 1.0 1.5 2.0 0.03 0.04 0.05 0.06 Smoothing Parameter (Estimated) L1 Coverage Risk G G G G G G G G G G G G G G G G G G G G Figure 3: Three different simulation datasets. Top row: the spiral dataset. Middle row: the three spirals dataset. Bottom row: NIPS character dataset. For each row, the leftmost panel shows the estimated L1 coverage risk using data splitting; the red straight line indicates the bandwidth selected by least square cross validation [19], which is either undersmooth or oversmooth. Then the rest three panels, are the result using different smoothing parameters. From left to right, we show the result for under-smoothing, optimal smoothing (using the coverage risk), and over-smoothing. Note that the second minimum in the coverage risk at the three spirals dataset (middle row) corresponds to a phase transition when the estimator becomes a big circle; this is also a locally stable structure. 5 Applications 5.1 Simulation Data We now apply the data splitting technique (7) to choose the smoothing bandwidth for density ridge estimation. Note that we use data splitting over smooth bootstrap since in practice, data splitting works better. The density ridge estimation can be done by the subspace constrain mean shift algorithm [22]. We consider three famous datasets: the spiral dataset, the three spirals dataset and a ‘NIPS’ dataset. Figure 3 shows the result for the three simulation datasets. The top row is the spiral dataset; the middle row is the three spirals dataset; the bottom row is the NIPS character dataset. For each row, from left to right the first panel is the estimated L1 risk by using data splitting. Note that there is no practical difference between L1 and L2 risk. The second to fourth panels are under-smoothing, optimal smoothing, and over-smoothing. Note that we also remove the ridges whose density is below 0.05 × maxx bpn(x) since they behave like random noise. As can be seen easily, the optimal bandwidth allows the density ridges to capture the underlying structures in every dataset. On the contrary, the under-smoothing and the over-smoothing does not capture the structure and have a higher risk. 7 0.0 0.2 0.4 0.6 0.8 1.0 0.9 1.0 1.1 1.2 1.3 1.4 1.5 Smoothing Parameter (Estimated) L1 Coverage Risk G G G G G G G G G G G G G G G G G G G G Figure 4: Another slice for the cosmic web data from the Sloan Digital Sky Survey. The leftmost panel shows the (estimated) L1 coverage risk (right panel) for estimating density ridges under different smoothing parameters. We estimated the L1 coverage risk by using data splitting. For the rest panels, from left to right, we display the case for under-smoothing, optimal smoothing, and over-smoothing. As can be seen easily, the optimal smoothing method allows the SCMS algorithm to detect the intricate cosmic network structure. 5.2 Cosmic Web Now we apply our technique to the Sloan Digital Sky Survey, a huge dataset that contains millions of galaxies. In our data, each point is an observed galaxy with three features: • z: the redshift, which is the distance from the galaxy to Earth. • RA: the right ascension, which is the longitude of the Universe. • dec: the declination, which is the latitude of the Universe. These three features (z, RA, dec) uniquely determine the location of a given galaxy. To demonstrate the effectiveness of our method, we select a 2-D slice of our Universe at redshift z = 0.050 −0.055 with (RA, dec) ∈[200, 240] × [0, 40]. Since the redshift difference is very tiny, we ignore the redshift value of the galaxies within this region and treat them as a 2-D data points. Thus, we only use RA and dec. Then we apply the SCMS algorithm (version of [7]) with data splitting method introduced in section 2.1 to select the smoothing parameter h. The result is given in Figure 4. The left panel provides the estimated coverage risk at different smoothing bandwidth. The rest panels give the result for under-smoothing (second panel), optimal smoothing (third panel) and over-smoothing (right most panel). In the third panel of Figure 4, we see that the SCMS algorithm detects the filament structure in the data. 6 Discussion In this paper, we propose a method using coverage risk, a generalization of mean integrated square error, to select the smoothing parameter for the density ridge estimation problem. We show that the coverage risk can be estimated using data splitting or smoothed bootstrap and we derive the statistical consistency for risk estimators. Both simulation and real data analysis show that the proposed bandwidth selector works very well in practice. The concept of coverage risk is not limited to density ridges; instead, it can be easily generalized to other manifold learning technique. Thus, we can use data splitting to estimate the risk and use the risk estimator to select the tuning parameters. This is related to the so-called stability selection [23], which allows us to select tuning parameters even in an unsupervised learning settings. 8 References [1] E. Bas, N. Ghadarghadar, and D. Erdogmus. Automated extraction of blood vessel networks from 3d microscopy image stacks via multi-scale principal curve tracing. In Biomedical Imaging: From Nano to Macro, 2011 IEEE International Symposium on, pages 1358–1361. IEEE, 2011. [2] E. Bas, D. Erdogmus, R. Draft, and J. W. Lichtman. Local tracing of curvilinear structures in volumetric color images: application to the brainbow analysis. Journal of Visual Communication and Image Representation, 23(8):1260–1271, 2012. [3] B. Cadre. Kernel estimation of density level sets. Journal of multivariate analysis, 2006. [4] Y.-C. Chen, C. R. Genovese, R. J. Tibshirani, and L. Wasserman. Nonparametric modal regression. arXiv preprint arXiv:1412.1716, 2014. [5] Y.-C. Chen, C. R. Genovese, and L. Wasserman. Generalized mode and ridge estimation. arXiv: 1406.1803, June 2014. [6] Y.-C. Chen, C. R. Genovese, and L. Wasserman. Asymptotic theory for density ridges. arXiv preprint arXiv:1406.5663, 2014. [7] Y.-C. Chen, S. Ho, P. E. Freeman, C. R. Genovese, and L. Wasserman. Cosmic web reconstruction through density ridges: Method and algorithm. arXiv preprint arXiv:1501.05303, 2015. [8] Y. Cheng. Mean shift, mode seeking, and clustering. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 17(8):790–799, 1995. [9] A. Cuevas, W. Gonzalez-Manteiga, and A. Rodriguez-Casal. Plug-in estimation of general level sets. Aust. N. Z. J. Stat., 2006. [10] D. Eberly. Ridges in Image and Data Analysis. Springer, 1996. [11] J. Einbeck. Bandwidth selection for mean-shift based unsupervised learning techniques: a unified approach via self-coverage. Journal of pattern recognition research., 6(2):175–192, 2011. [12] U. Einmahl and D. M. Mason. Uniform in bandwidth consistency for kernel-type function estimators. The Annals of Statistics, 2005. [13] L. C. Evans and R. F. Gariepy. Measure theory and fine properties of functions, volume 5. CRC press, 1991. [14] K. Fukunaga and L. Hostetler. The estimation of the gradient of a density function, with applications in pattern recognition. Information Theory, IEEE Transactions on, 21(1):32–40, 1975. [15] C. R. Genovese, M. Perone-Pacifico, I. Verdinelli, and L. Wasserman. Nonparametric ridge estimation. The Annals of Statistics, 42(4):1511–1545, 2014. [16] E. Gine and A. Guillou. Rates of strong uniform consistency for multivariate kernel density estimators. In Annales de l’Institut Henri Poincare (B) Probability and Statistics, 2002. [17] T. Hastie. Principal curves and surfaces. Technical report, DTIC Document, 1984. [18] T. Hastie and W. Stuetzle. Principal curves. Journal of the American Statistical Association, 84(406): 502–516, 1989. [19] M. C. Jones, J. S. Marron, and S. J. Sheather. A brief survey of bandwidth selection for density estimation. Journal of the American Statistical Association, 91(433):401–407, 1996. [20] D. M. Mason, W. Polonik, et al. Asymptotic normality of plug-in level set estimates. The Annals of Applied Probability, 19(3):1108–1142, 2009. [21] Z. Miao, B. Wang, W. Shi, and H. Wu. A method for accurate road centerline extraction from a classified image. 2014. [22] U. Ozertem and D. Erdogmus. Locally defined principal curves and surfaces. Journal of Machine Learning Research, 2011. [23] A. Rinaldo and L. Wasserman. Generalized density clustering. The Annals of Statistics, 2010. [24] D. W. Scott. Multivariate density estimation: theory, practice, and visualization, volume 383. John Wiley & Sons, 2009. [25] B. Silverman and G. Young. The bootstrap: To smooth or not to smooth? Biometrika, 74(3):469–479, 1987. [26] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman and Hall, 1986. [27] R. Tibshirani. Principal curves revisited. Statistics and Computing, 2(4):183–190, 1992. [28] L. Wasserman. All of Nonparametric Statistics. Springer-Verlag New York, Inc., 2006. — 9 | 2015 | 21 |
5,714 | Structured Transforms for Small-Footprint Deep Learning Vikas Sindhwani Tara N. Sainath Sanjiv Kumar Google, New York {sindhwani, tsainath, sanjivk}@google.com Abstract We consider the task of building compact deep learning pipelines suitable for deployment on storage and power constrained mobile devices. We propose a unified framework to learn a broad family of structured parameter matrices that are characterized by the notion of low displacement rank. Our structured transforms admit fast function and gradient evaluation, and span a rich range of parameter sharing configurations whose statistical modeling capacity can be explicitly tuned along a continuum from structured to unstructured. Experimental results show that these transforms can significantly accelerate inference and forward/backward passes during training, and offer superior accuracy-compactness-speed tradeoffs in comparison to a number of existing techniques. In keyword spotting applications in mobile speech recognition, our methods are much more effective than standard linear low-rank bottleneck layers and nearly retain the performance of state of the art models, while providing more than 3.5-fold compression. 1 Introduction Non-linear vector-valued transforms of the form, f(x, M) = s(Mx), where s is an elementwise nonlinearity, x is an input vector, and M is an m × n matrix of parameters are building blocks of complex deep learning pipelines and non-parametric function estimators arising in randomized kernel methods [20]. When M is a large general dense matrix, the cost of storing mn parameters and computing matrix-vector products in O(mn) time can make it prohibitive to deploy such models on lightweight mobile devices and wearables where battery life is precious and storage is limited. This is particularly relevant for “always-on” mobile applications, such as continuously looking for specific keywords spoken by the user or processing a live video stream onboard a mobile robot. In such settings, the models may need to be hosted on specialized low-power digital signal processing components which are even more resource constrained than the device CPU. A parsimonious structure typically imposed on parameter matrices is that of low-rankness [22]. If M is a rank r matrix, with r ≪min(m, n), then it has a (non-unique) product representation of the form M = GHT where G, H have only r columns. Clearly, this representation reduces the storage requirements to (mr + nr) parameters, and accelerates the matrix-vector multiplication time to O(mr+nr) via Mx = G(HT x). Another popular structure is that of sparsity [6] typically imposed during optimization via zero-inducing l0 or l1 regularizers. Other techniques include freezing M to be a random matrix as motivated via approximations to kernel functions [20], storing M in low fixed-precision formats [7, 24], using specific parameter sharing mechanisms [3], or training smaller models on outputs of larger models (“distillation”) [11]. Structured Matrices: An m × n matrix which can be described in much fewer than mn parameters is referred to as a structured matrix. Typically, the structure should not only reduce memory 1 requirements, but also dramatically accelerate inference and training via fast matrix-vector products and gradient computations. Below are classes of structured matrices arising pervasively in many contexts [18] with different types of parameter sharing (indicated by the color). (i) Toeplitz t0 t−1 . . . t−(n−1) t1 t0 . . . ... ... ... ... t−1 tn−1 . . . t1 t0 (ii) Vandermonde 1 v0 . . . vn−1 0 1 v1 . . . vn−1 1 ... ... ... ... 1 vn−1 . . . vn−1 n−1 (iii) Cauchy 1 u0−v0 . . . . . . 1 u0−vn−1 1 u1−v0 . . . . . . ... ... ... ... ... 1 un−1−v0 . . . . . . 1 un−1−vn−1 Toeplitz matrices have constant values along each of their diagonals. When the same property holds for anti-diagonals, the resulting class of matrices are called Hankel matrices. Toeplitz and Hankel matrices are intimately related to one-dimensional discrete convolutions [10], and arise naturally in time series analysis and dynamical systems. A Vandermonde matrix is determined by taking elementwise powers of its second column. A very important special case is the complex matrix associated with the Discrete Fourier transform (DFT) which has Vandermonde structure with vj = ωj n, j = 1 . . . n where ωn = exp −2πi n is the primitive nth root of unity. Similarly, the entries of n × n Cauchy matrices are completely defined by two length n vectors. Vandermonde and Cauchy matrices arise naturally in polynomial and rational interpolation problems. “Superfast” Numerical Linear Algebra: The structure in these matrices can be exploited for faster linear algebraic operations such as matrix-vector multiplication, inversion and factorization. In particular, the matrix-vector product can be computed in time O(n log n) for Toeplitz and Hankel matrices, and in time O(n log2 n) for Vandermonde and Cauchy matrices. Displacement Operators: At first glance, these matrices appear to have very different kinds of parameter sharing and consequently very different algorithms to support fast linear algebra. It turns out, however, that each structured matrix class described above, can be associated with a specific displacement operator, L : Rm×n 7→Rm×n which transforms each matrix, say M, in that class into an m × n matrix L[M] that has very low-rank, i.e. rank(L[M]) ≪min(m, n). This displacement rank approach, which can be traced back to a seminal 1979 paper [13], greatly unifies algorithm design and complexity analysis for structured matrices [13], [18], [14]. Generalizations of Structured Matrices: Consider deriving a matrix by taking arbitrary linear combinations of products of structured matrices and their inverses, e.g. α1T1T−1 2 + α2T3T−1 4 T5 where each Ti is a Toeplitz matrix. The parameter sharing structure in such a derived matrix is by no means apparent anymore. Yet, it turns out that the associated displacement operator remarkably continues to expose the underlying parsimony structure, i.e. such derived matrices are still mapped to relatively low-rank matrices! The displacement rank approach allows fast linear algebra algorithms to be seamlessly extended to these broader classes of matrices. The displacement rank parameter controls the degree of structure in these generalized matrices. Technical Preview, Contributions and Outline: We propose building deep learning pipelines where parameter matrices belong to the class of generalized structured matrices characterized by low displacement rank. In Section 2, we attempt to give a self-contained overview of the displacement rank approach [13], [18] drawing key results from the relevant literature on structured matrix computations (proved in our supplementary material [1] for completeness). In Section 3, we show that the proposed structured transforms for deep learning admit fast matrix multiplication and gradient computations, and have rich statistical modeling capacity that can be explicitly controlled by the displacement rank hyperparameter, covering, along a continuum, an entire spectrum of configurations from highly structured to unstructured matrices. While our focus in this paper is on Toeplitz-related transforms, our proposal extends to other structured matrix generalizations. In Section 4, we study inference and training-time acceleration with structured transforms as a function of displacement rank and dimensionality. We find that our approach compares highly favorably with numerous other techniques for learning size-constrained models on several benchmark datasets. Finally, we demonstrate our approach on mobile speech recognition applications where we are able to match the performance of much bigger state of the art models with a fraction of parameters. Notation: Let e1 . . . en denote the canonical basis elements of Rn (viewed as column vectors). In, 0n denote n × n identity and zero matrices respectively. Jn = [en . . . e1] is the anti-identity reflection matrix whose action on a vector is to reverse its entries. When the dimension is obvious 2 we may drop the subscript; for rectangular matrices, we may specify both the dimensions explicitly, e.g. we use 01×n for a zero-valued row-vector, and 1n for all ones column vector of length n. u ◦v denotes Hadamard (elementwise) product between two vectors v, u. For a complex vector u, ¯u will denote the vector of complex conjugate of its entries. The Discrete Fourier Transform (DFT) matrix will be denoted by Ω(or Ωn); we will also use fft(x) to denote Ωx, and ifft(x) to denote Ω−1x. For a vector v, diag(v) denotes a diagonal matrix given by diag(v)ii = vi. 2 Displacement Operators associated with Structured Matrices We begin by providing a brisk background on the displacement rank approach. Unless otherwise specified, for notational convenience we will henceforth assume squared transforms, i.e., m = n, and discuss rectangular transforms later. Proofs of various assertions can be found in our selfcontained supplementary material [1] or in [18, 19]. The Sylvester displacement operator, denoted as L = ∇A,B : Rn×n 7→Rn×n is defined by, ∇A,B[M] = AM −MB (1) where A ∈Rn×n, B ∈Rn×n are fixed matrices referred to as operator matrices. Closely related is the Stein displacement operator, denoted as L = △A,B : Rn×n 7→Rn×n, and defined by, △A,B[M] = M −AMB (2) By carefully choosing A and B one can instantiate Sylvester and Stein displacement operators with desirable properties. In particular, for several important classes of displacement operators, A and/or B are chosen to be an f-unit-circulant matrix defined as follows. Definition 2.1 (f-unit-Circulant Matrix). For a real-valued scalar f, the (n×n) f-circulant matrix, denoted by Zf, is defined as follows, Zf = [e2, e3 . . . en, fe1] = 0 0 . . . f 1 0 . . . 0 ... ... ... ... 0 . . . 1 0 = 01×(n−1) f In−1 0(n−1)×1 The f-unit-circulant matrix is associated with a basic downward shift-and-scale transformation, i.e., the matrix-vector product Zfv shifts the elements of the column vector v “downwards”, and scales and brings the last element vn to the “top”, resulting in [fvn, v1, . . . vn−1]T . It has several basic algebraic properties (see Proposition 1.1 [1]) that are crucial for the results stated in this section Figure 1 lists the rank of the Sylvester displacement operator in Eqn 1 when applied to matrices belonging to various structured matrix classes, where the operator matrices A, B in Eqn. 1 are chosen to be diagonal and/or f-unit-circulant. It can be seen that despite the difference in their structures, all these classes are characterized by very low displacement rank. Figure 2 shows how this low-rank transformation happens in the case of a 4 × 4 Toeplitz matrix (also see section 1, Lemma 1.2 [1]). Embedded in the 4 × 4 Toeplitz matrix T are two copies of a 3 × 3 Toeplitz matrix shown in black and red boxes. The shift and scale action of Z1 and Z−1 aligns these sub-matrices. By taking the difference, the Sylvester displacement operator nullifies the aligned submatrix leaving a rank 2 matrix with non-zero elements only along its first row and last column. Note that the negative sign introduced by TZ−1 term prevents the complete zeroing out of the value of t (marked by red star) and is hence critical for invertibility of the displacement action. Figure 1: Below r is rank(∇A,B[M]) Structured Matrix M A B r Toeplitz T, T−1 Z1 Z−1 ≤2 Hankel H, H−1 Z1 ZT 0 ≤2 T + H Z0 + ZT 0 Z0 + ZT 0 ≤4 Vandermonde V (v) diag(v) Z0 ≤1 V (v)−1 Z0 diag(v) ≤1 V (v)T ZT 0 diag(v) ≤1 Cauchy C(s, t) diag(s) diag(t) ≤1 C(s, t)−1 diag(t) diag(s) ≤1 Figure 2: Displacement Action on Toeplitz Matrix t u v w x t u v y x t u z y x t T z y x t t u v w x t u v y x t u Z1T downshift u v w -t t u v -x x t u -y y x t -z TZ−1 leftshift — = * * * * 0 0 0 * 0 0 0 * 0 0 0 * Z1T −TZ−1 3 Each class of structured matrices listed in Figure 1 can be naturally generalized by allowing the rank of the displacement operator to be higher. Specifically, given a displacement operator L, and displacement rank parameter r, one may consider the class of matrices M that satisfies rank(L(M)) ≤r. Clearly then, L[M] = GHT for rank r matrices G, H. We refer to rank(L(M)) as the displacement rank of M under L, and to the low-rank factors G, H ∈Rn×r as the associated low-displacement generators. For the operators listed in Table 1, these broader classes of structured matrices are correspondingly called Toeplitz-like, Vandermonde-like and Cauchy-like. Fast numerical linear algebra algorithms extend to such matrices [18]. In order to express structured matrices with low-displacement rank directly as a function of its lowdisplacement generators, we need to invert L and obtain a learnable parameterization. For Stein type displacement operator, the following elegant result is known (see proof in [1]): Theorem 2.2 ( [19], Krylov Decomposition). If an n×n matrix M is such that △A,B[M] = GHT where G = [g1 . . . gr], H = [h1 . . . hr] ∈Rn×r and the operator matrices satisfy: An = aI, Bn = bI for some scalars a, b, then M can be expressed as: M = 1 1 −ab r X j=1 krylov(A, gj)krylov(BT , hj)T (3) where krylov(A, v) is defined by: krylov(A, v) = [v Av A2v . . . An−1v] (4) Henceforth, our focus in this paper will be on Toeplitz-like matrices for which the displacement operator of interest (see Table 1) is of Sylvester type: ∇Z1,Z−1. In order to apply Theorem 2.2, one can switch between Sylvester and Stein operators, setting A = Z1 and B = Z−1 which both satisfy the conditions of Theorem 2.2 (see property 3, Proposition 1.1 [1]). The resulting expressions involve Krylov matrices generated by f-unit-circulant matrices which are called f-circulant matrices in the literature. Definition 2.3 (f-circulant matrix). Given a vector v, the f-Circulant matrix, Zf(v), is defined as follows: Zf(v) = krylov(Zf, v) = v0 fvn−1 . . . fv1 v1 v0 . . . fv2 ... ... ... fvn−1 vn−1 . . . v1 v0 Two special cases are of interest: f = 1 corresponds to Circulant matrices, and f = −1 corresponds to skew-Circulant matrices. Finally, one can obtain an explicit parameterization for Toeplitz-like matrices which turns out to involve taking sums of products of Circulant and skew-Circulant matrices. Theorem 2.4 ([18]). If an n × n matrix M satisfies ∇Z1,Z−1[M] = GHT where G = [g1 . . . gr], H = [h1 . . . hr] ∈Rn×r, then M can be written as: M = 1 2 r X j=1 Z1(gj)Z−1(Jhj) (5) 3 Learning Toeplitz-like Structured Transforms Motivated by Theorem 2.4, we propose learning parameter matrices of the form in Eqn. 5 by optimizing the displacement factors G, H. First, from the properties of displacement operators [18], it follows that this class of matrices is very rich from a statistical modeling perspective. Theorem 3.1 (Richness). The set of all n × n matrices that can be written as, M(G, H) = r X i=1 Z1(gi)Z−1(hi) (6) for some G = [g1 . . . gr], H = [h1 . . . hr] ∈Rn×r contains: 4 • All n × n Circulant and Skew-Circulant matrices for r ≥1. • All n × n Toeplitz matrices for r ≥2. • Inverses of Toeplitz matrices for r ≥2. • All products of the form A1 . . . At for r ≥2t. • All linear combinations of the form Pp i=1 βiA(i) 1 . . . A(i) t where r ≥2tp. • All n × n matrices for r = n. where each Ai above is a Toeplitz matrix or the inverse of a Toeplitz matrix. When we learn a parameter matrix structured as Eqn. 6 with displacement rank equal to 1 or 2, we also search over convolutional transforms. In this sense, structured transforms with higher displacement rank generalize (one-dimensional) convolutional layers. The displacement rank provides a knob on modeling capacity: low displacement matrices are highly structured and compact, while high displacement matrices start to contain increasingly unstructured dense matrices. Next, we show that associated structured transforms of the form f(x) = M(G, H)x admit fast evaluation, and gradient computations with respect to G, H. First we recall the following wellknown result concerning the diagonalization of f-Circulant matrices. Theorem 3.2 (Diagonalization of f-circulant matrices, Theorem 2.6.4 [18]). For any f ̸= 0, let f = [1, f 1 n , f 2 n , . . . f n−1 n ]T ∈Cn, and Df = diag(f). Then, Zf(v) = D−1 f Ω−1 diag(Ω(f ◦v))ΩDf (7) This result implies that for the special cases of f = 1 and f = −1 corresponding to Circulant and Skew-circulant matrices respectively, the matrix-vector multiplication can be computed in O(n log n) time via the Fast Fourier transform: y = Z1(v)x = ifft (fft(v) ◦fft(x)) (8) y = Z1(v)T x = ifft fft(v) ◦fft(x) (9) y = Z−1(v)x = ¯η ◦ifft (fft(η ◦v) ◦fft(η ◦x)) (10) y = Z−1(v)T x = ¯η ◦ifft (fft(η ◦v) ◦fft(η ◦x)) (11) where η = [1, η, η2 . . . ηn−1]T where η = (−1) 1 n = exp(i π n), the root of negative unity. In particular, a single matrix-vector product for Circulant and Skew-circulant matrices has the computational cost of 3 FFTs. Therefore, for matrices of the form in Eqn. 6 comprising of r products of Circulant and Skew-Circulant matrices, naively computing a matrix-vector product for a batch of b input vectors would take 6rb FFTs. However, this cost can be significantly lowered to that of 2(rb + r + b) FFTs by making the following observation: Y = r X i=1 Z1(gi)Z−1(hi)X = Ω−1 r X i=1 diag(Ωgi) Ωdiag(¯η) Ω−1 diag(Ω(η ◦hi)) ˜X ! where ˜X = Ωdiag(η) X. Here, (1) The FFT of the parameters, Ωgi and Ω(η ◦hi) is computed once and shared across multiple input vectors in the minibatch, (2) The (scaled) FFT of the input, (Ωdiag(η) X) is computed once and shared across the sum in Eqn. 6, and (3) The final inverse FFT is also shared. Thus, the following result is immediate. Theorem 3.3 (Fast Multiplication). Given an n × b matrix X, the matrix-matrix product, Y = (Pr i=1 Z1(gi)Z−1(hi)) X, can be computed at the cost of 2(rb + b + r) FFTs, using the following algorithm. Set η = [1, η, η2 . . . ηn−1]T where η = (−1) 1 n = exp(i π n) Initialize Y = 0n×b Set ˜X = fft(diag(η)X) Set ˜G = fft(G) = [˜g1 . . . ˜gr] and ˜H = fft(diag(η)H) = [˜h1 . . . ˜hr] for i = 1 to r ◦U = Z−1(hi)X = diag(¯η)ifft diag(˜hi)˜X ◦V = diag(˜gi) fft(U) 5 ◦Y = Y + V Set Y = ifft (Y) Return Y We now show that when our structured transforms are embedded in a deep learning pipeline, the gradient computation can also be accelerated. First, we note that the Jacobian structure of f-Circulant matrices has the following pleasing form. Proposition 3.4 (Jacobian of f-circulant transforms). The Jacobian of the map f(x, v) = Zf(v)x with respect to the parameters v is Zf(x). This leads to the following expressions for the Jacobians of the structured transforms of interest. Proposition 3.5 (Jacobians with respect to displacement generators G, H). Consider parameterized vector-valued transforms of the form, f(x, G, H) = r X i=1 Z1(gi)Z−1(hi)x (12) The Jacobians of f with respect to the jth column of G, H, i.e. gj, hj, at x, are as follows: Jgjf|x = Z1 (Z−1(hj)x) (13) Jhjf|x = Z1(gj)Z−1(x) (14) Based on Eqns. 13, 14 the gradient over a minibatch of size b requires computing, Pb i[Jgjf|xi]T δi and Pb i=1[Jhjf|xi]T δi where, {xi}b i=1 and {δi}b i=1 are batches of forward and backward inputs during backpropagation. These can be naively computed with 6rb FFTs. However, as before, by sharing FFT of the forward and backward inputs, and the fft of the parameters, this can be lowered to (4br + 4r + 2b) FFTs. Below we give matricized implementation. Proposition 3.6 (Fast Gradients). Let X, Z be n × b matrices whose columns are forward and backward inputs respectively of minibatch size b during backpropagation. The gradient with respect to gj, hj can be computed at the cost of (4br + 4r + 2b) FFTs as follows: Compute ˜Z = fft(Z), ˜X = fft(diag(η)X), ˜G = fft(G), ˜H = fft(diag(η)H) Gradient wrt gj (2b + 1 FFTs) ◦return ifft fft diag(¯η)ifft diag(˜hj)˜X ◦˜Z 1b Gradient wrt hj (2b + 1 FFTs) ◦return diag (¯η) ifft h ˜X ◦fft diag(η)ifft diag(˜gi)˜Z 1b i Rectangular Transforms: Variants of Theorems 2.2, 2.4 exist for rectangular transforms, see [19]. Alternatively, for m < n we can subsample the outputs of square n × n transforms at the cost of extra computations, while for m > n, assuming m is a multiple of n, we can stack m n output vectors of square n × n transforms. 4 Empirical Studies Acceleration with Structured Transforms: In Figure 3, we analyze the speedup obtained in practice using n × n Circulant and Toeplitz-like matrices relative to a dense unstructured n × n matrix (fully connected layer) as a function of displacement rank and dimension n. Three scenarios are considered: inference speed per test instance, training speed as implicitly dictated by forward passes on a minibatch, and gradient computations on a minibatch. Factors such as differences in cache optimization, SIMD vectorization and multithreading between Level-2 BLAS (matrix-vector multiplication), Level-3 BLAS (matrix-matrix multiplication) and FFT implementations (we use FFTW: http://www.fftw.org) influence the speedup observed in practice. Speedup gains start to show for dimensions as small as 512 for Circulant matrices. The gains become dramatic with acceleration of the order of 10 to 100 times for several thousand dimensions, even for higher displacement rank Toeplitz-like transforms. 6 0 10 20 30 10−1 100 101 102 Displacement Rank Speedup (unstructured / structured) Inference 0 10 20 30 10−1 100 101 102 Displacement Rank Forward Pass (minibatch 100) n=512 n=1024 n=2048 n=4096 n=8192 n=16384 n=32768 0 10 20 30 10−1 100 101 102 Displacement Rank Gradient (minibatch 100) Figure 3: Acceleration with n × n Structured Transforms (6-core 32-GB Intel(R) Xeon(R) machine; random datasets). In the plot, displacement rank = 0 corresponds to a Circulant Transform. Effectiveness for learning compact Neural Networks: Next, we compare the proposed structured transforms with several existing techniques for learning compact feedforward neural networks. We exactly replicate the experimental setting from the recent paper on HASHEDNETS [3] which uses several image classification datasets first prepared by [15]. MNIST is the original 10-class MNIST digit classification dataset with 60000 training examples and 10000 test examples. BG-IMG-ROT refers to a challenging version of MNIST where digits are randomly rotated and placed against a random black and white background. RECT (1200 training images, 50000 test images) and CONVEX (8000 training images, 50000 test images) are 2-class binary image datasets where the task is to distinguish between tall and wide rectangles, and whether the “on” pixels form a convex region or not, respectively. In all datasets, input images are of size 28 × 28. Several existing techniques are benchmarked in [3] for compressing a reference single hidden layer model with 1000 hidden nodes. • Random Edge Removal (RER) [5] where a fraction of weights are randomly frozen to be zero-valued. • Low-rank Decomposition (LRD) [9] • Neural Network (NN) where the hidden layer size is reduced to satisfy a parameter budget. • Dark Knowledge (DK) [11]: A small neural network is trained with respect to both the original labeled data, as well as soft targets generated by a full uncompressed neural network. • HashedNets (HN) [3]: This approach uses a low-cost hash function to randomly group connection weights which share the same value. • HashedNets with Dark Knowledge (HNDK): Trains a HashedNet with respect to both the original labeled data, as well as soft targets generated by a full uncompressed neural network. We consider learning models of comparable size with the weights in the hidden layer structured as a Toeplitz-like matrix. We also compare with the FASTFOOD approach of [25, 16] where the weight matrix is a product of diagonal parameter matrices and fixed permutation and Walsh-Hadamard matrices, also admitting O(n log n) multiplication and gradient computation time. The CIRCULANT Neural Network approach proposed in [4] is a special case of our framework (Theorem 3.1). Results in Table 1 show that Toeplitz-like structured transforms outperform all competing approaches on all datasets, sometimes by a very significant margin, with similar or drastically lesser number of parameters. It should also be noted that while random weight tying in HASHEDNETS reduces the number of parameters, the lack of structure in the resulting weight matrix cannot be exploited for FFT-like O(n log n) multiplication time. We note in passing that for HASHEDNETS weight matrices whose entries assume only one of B distinct values, the Mailman algorithm [17] can be used for faster matrix-vector multiplication, with complexity O(n2 log(B)/(log n)), which still is much slower than matrix-vector multiplication time for Toeplitz-like matrices. Also note that the distillation ideas of [11] are complementary to our approach and can further improve our results. RER LRD NN DK HN HNDK Fastfood CIRCULANT TOEPLITZ (1) TOEPLITZ (2) TOEPLITZ (3) MNIST 15.03 28.99 6.28 6.32 2.79 2.65 6.61 3.12 2.79 2.54 2.09 12406 12406 12406 12406 12406 12406 10202 8634 9418 10986 12554 BG-IMG-ROT 73.17 80.63 79.03 77.40 59.20 58.25 68.4 62.11 57.66 55.21 53.94 12406 12406 12406 12406 12406 12406 10202 8634 9418 10986 12554 CONVEX 37.22 39.93 34.37 31.85 31.77 30.43 33.92 24.76 17.43 16.18 20.23 12281 12281 12281 12281 12281 12281 3922 2352 3138 4706 6774 RECT 18.23 23.67 5.68 5.78 3.67 3.37 21.45 2.91 0.70 0.89 0.66 12281 12281 12281 12281 12281 12281 3922 2352 3138 4706 6774 Table 1: Error rate and number of parameters (italicized). Best results in blue. 7 Mobile Speech Recognition: We now demonstrate the techniques developed in this paper on a speech recognition application meant for mobile deployment. Specifically, we consider a keyword spotting (KWS) task, where a deep neural network is trained to detect a specific phrase, such as “Ok Google” [2]. The data used for these experiments consists of 10−15K utterances of selected phrases (such as “play-music”, “decline-call”), and a larger set of 396K utterances to serve as negative training examples. The utterances were randomly split into training, development and evaluation sets in the ratio of 80 : 5 : 15. We created a noisy evaluation set by artificially adding babble-type cafeteria noise at 0dB SNR to the “play-music” clean data set. We will refer to this noisy data set as CAFE0. We refer the reader to [23] for more details about the datasets. We consider the task of shrinking a large model for this task whose architecture is as follows [23]: the input layer consists of 40 dimensional log-mel filterbanks, stacked with a temporal context of 32, to produce an input of 32 × 40 whose dimensions are in time and frequency respectively. This input is fed to a convolutional layer with filter size 32 × 8, frequency stride 4 and 186 filters. The output of the convolutional layer is of size 9 × 186 = 1674. The output of this layer is fed to a 1674 × 1674 fully connected layer, followed by a softmax layer for predicting 4 classes constituting the phrase “playmusic”. The full training set contains about 90 million samples. We use asynchronous distributed stochastic gradient descent (SGD) in a parameter server framework [8], with 25 worker nodes for optimizing various models. The global learning rate is set to 0.002, while our structured transform layers use a layer-specific learning rate of 0.0005; both are decayed by an exponential factor of 0.1. 0.5 1 1.5 2 2.5 3 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 False Alarms per hour False Rejects play−music:cafe0 fullyconnected (2.8M) reference (122K) lowrank4 (13.4K) lowrank8 (26.8K) lowrank16 (53.6K) lowrank32 (107K) circulant (1674) fastfood (5022) toeplitz−disprank1 (3348) toeplitz−disprank2 (6696) toeplitz−disprank10 (33.5K) 5 10 15 20 25 30 35 40 96.4 96.6 96.8 97 97.2 97.4 97.6 97.8 98 98.2 98.4 Time (hours) Accuracy (%) play−music:accuracy fullyconnected (2.8M) reference (122K) lowrank4 (13.4K) lowrank8 (26.8K) lowrank16 (53.6K) lowrank32 (107K) circulant (1674) fastfood (5022) toeplitz−disprank1 (3348) toeplitz−disprank2 (6696) toeplitz−disprank10 (33.5K) Figure 4: “play-music” detection performance: (left) End-to-end keyword spotting performance in terms of false reject (FR) rate per false alarm (FA) rate (lower is better) (right): Classification accuracy as a function of training time. Displacement rank is in parenthesis for Toeplitz-like models. Results with 11 different models are reported in Figure 4 (left) including the state of the art keyword spotting model developed in [23]. At an operating point of 1 False Alarm per hour, the following observations can be made: With just 3348 parameters, a displacement rank=1 TOEPLITZ-LIKE structured transform outperforms a standard low-rank bottleneck model with rank=16 containing 16 times more parameters; it also lowers false reject rates from 10.2% with CIRCULANT and 14.2% with FASTFOOD transforms to about 8.2%. With displacement rank 10, the false reject rate is 6.2%, in comparison to 6.8% with the 3 times larger rank=32 standard low-rank bottleneck model. Our best Toeplitz-like model comes within 0.4% of the performance of the 80-times larger fully-connected and 3.6 times larger reference [23] models. In terms of raw classification accuracy as a function of training time, Figure 4 (right) shows that our models (with displacement ranks 1, 2 and 10) come within 0.2% accuracy of the fully-connected and reference models, and easily provide much better accuracy-time tradeoffs in comparison to standard low-rank bottleneck models, Circulant and Fastfood baselines. The conclusions are similar for other noise conditions (see supplementary material [1]). 5 Perspective We have introduced and shown the effectiveness of new notions of parsimony rooted in the theory of structured matrices. Our proposal can be extended to various other structured matrix classes, including Block and multi-level Toeplitz-like [12] matrices related to multidimensional convolution [21]. We hope that such ideas might lead to new generalizations of Convolutional Neural Networks. Acknowledgements: We thank Yu-hsin Chen, Carolina Parada, Rohit Prabhavalkar, Alex Gruenstein, Rajat Monga, Baris Sumengen, Kilian Weinberger and Wenlin Chen for their contributions. 8 References [1] Supplementary material: Structured transforms for small footprint deep learning. 2015. http://vikas.sindhwani.org/st_supplementary.pdf. [2] G. Chen, C. Parada, and G. Heigold. Small-footprint keyword spotting using deep neural networks. In ICASSP, 2014. [3] W. Chen, J. T. Wilson, S. Tyree, K. Q. Weinberger, and Y. Chen. Compressing neural networks with the hashing trick. In ICML, 2015. [4] Y. Cheng, F. X. Xu, R. S. Feris, S. Kumar, A. Choudhary, and S.-F. Chang. Fast neural networks with circulant projections. In arXiv:1502.03436, 2015. [5] D. C. Ciresan, U. Meier, J. Masci, L. M. Gambardella, and Schmidhuber. High-performance neural networks for visual object classification. In arXiv:1102.0183, 2011. [6] M. D. Collins and P. Kohli. Memory-bounded deep convolutional neural networks. In ICASSP, 2013. [7] M. Courbariaux, J.-P. David, and Y. Bengio. Low-precision storage for deep learning. In ICLR, 2015. [8] J. Dean, G. S. Corrado, R. Monga, K. Chen, M. Devin, Q. V. Le, M. Z. Mao, M. Ranzato, A. Senior, P. Tucker, K. Yang, , and A. Y. Ng. Large-scale distributed deep networks. In NIPS, 2012. [9] M. Denil, B. Shakibi, L. Dinh, and N. de Freitas. Predicting parameters in deep learning. In NIPS, 2013. [10] R. M. Gray. Toeplitz and circulant matrices: A review. Foundations and Trends in Communications and Information Theory, 2005. [11] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. In NIPS workshop, 2014. [12] T. Kailath and J. Chun. Generalized displacement structure for block toeplitz, toeplitz block and toeplitz-derived matrices. SIAM J. Matrix Anal. Appl., 15, 1994. [13] T. Kailath, S. Y. Kung, and M. Morf. Displacement ranks of matrices and linear equations. Journal of Mathematical Analysis and Applications, pages 395–407, 1979. [14] T. Kailath and A. H. Sayed. Displacement structure: Theory and applications. SIAM Review, 37, 1995. [15] H. Larochelle, D. Erhan, A. C. Courville, J. Bergstra, and Y. Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In ICML, 2007. [16] Q. Le, T. Sarlos, and A. Smola. Fastfood – approximating kernel expansions in loglinear time. In ICML, 2013. [17] E. Liberty and S. W. Zucker. The mailman algorithm: a note on matrix vector multiplication. In Information Processing Letters, 2009. [18] V. Pan. Structured Matrices and Polynomials: Unified Superfast Algorithms. Springer, 2001. [19] V. Pan. Inversion of displacement operators. SIAM Journal of Matrix Analysis and Applications, pages 660–677, 2003. [20] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [21] M. V. Rakhuba and I. V. Oseledets. Fast multidimensional convolution in low-rank tensor formats via cross approximation. SIAM J. Sci. Comput., 37, 2015. [22] T. Sainath, B. Kingsbury, V. Sindhwani, E. Arisoy, and B. Ramabhadran. Low-rank matrix factorization for deep neural network training with high-dimensional output targets. In ICASSP, 2013. [23] T. Sainath and C. Parada. Convolutional neural networks for small-footprint keyword spotting. In Proc. Interspeech, 2015. [24] V. Vanhoucke, A. Senior, and M. Z. Mao. Improving the speed of neural networks on cpus. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [25] Z. Yang, M. Moczulski, M. Denil, N. de Freitas, A. Smola, L. Song, and Z. Wang. Deep fried convnets. In arXiv:1412.7149, 2015. 9 | 2015 | 210 |
5,715 | Linear Multi-Resource Allocation with Semi-Bandit Feedback Tor Lattimore Department of Computing Science University of Alberta, Canada tor.lattimore@gmail.com Koby Crammer Department of Electrical Engineering The Technion, Israel koby@ee.technion.ac.il Csaba Szepesv´ari Department of Computing Science University of Alberta, Canada szepesva@ualberta.ca Abstract We study an idealised sequential resource allocation problem. In each time step the learner chooses an allocation of several resource types between a number of tasks. Assigning more resources to a task increases the probability that it is completed. The problem is challenging because the alignment of the tasks to the resource types is unknown and the feedback is noisy. Our main contribution is the new setting and an algorithm with nearly-optimal regret analysis. Along the way we draw connections to the problem of minimising regret for stochastic linear bandits with heteroscedastic noise. We also present some new results for stochastic linear bandits on the hypercube that significantly improve on existing work, especially in the sparse case. 1 Introduction Economist Thomas Sowell remarked that “The first lesson of economics is scarcity: There is never enough of anything to fully satisfy all those who want it.”1 The optimal allocation of resources is an enduring problem in economics, operations research and daily life. The problem is challenging not only because you are compelled to make difficult trade-offs, but also because the (expected) outcome of a particular allocation may be unknown and the feedback noisy. We focus on an idealised resource allocation problem where the economist plays a repeated resource allocation game with multiple resource types and multiple tasks to which these resources can be assigned. Specifically, we consider a (nearly) linear model with D resources and K tasks. In each time step t the economist chooses an allocation of resources Mt ∈RD×K where Mtk ∈RD is the kth column and represents the amount of each resource type assigned to the kth task. We assume that the kth task is completed successfully with probability min {1, ⟨Mtk, νk⟩} and νk ∈RD is an unknown non-negative vector that determines how the success rate of a given task depends on the quantity and type of resources assigned to it. Naturally we will limit the availability of resources by demanding that Mt satisfies PK k=1 Mtdk ≤1 for all resource types d. At the end of each time step the economist observes which tasks were successful. The objective is to maximise the number of successful tasks up to some time horizon n that is known in advance. This model is a natural generalisation of the one used by Lattimore et al. [2014], where it was assumed that there was a single resource type only. 1He went on to add that “The first lesson of politics is to disregard the first lesson of economics.” Sowell [1993] 1 An example application might be the problem of allocating computing resources on a server between a number of Virtual Private Servers (VPS). In each time step (some fixed interval) the controller chooses how much memory/cpu/bandwidth to allocate to each VPS. A VPS is said to fail in a given round if it fails to respond to requests in a timely fashion. The requirements of each VPS are unknown in advance, but do not change greatly with time. The controller should learn which VPS benefit the most from which resource types and allocate accordingly. The main contribution of this paper besides the new setting is an algorithm designed for this problem along with theoretical guarantees on its performance in terms of the regret. Along the way we present some additional results for the related problem of minimising regret for stochastic linear bandits on the hypercube. We also prove new concentration results for weighted least squares estimation, which may be independently interesting. The generalisation of the work of Lattimore et al. [2014] to multiple resources turns out to be fairly non-trivial. Those with knowledge of the theory of stochastic linear bandits will recognise some similarity. In particular, once the nonlinearity of the objective is removed, the problem is equivalent to playing K linear bandits in parallel, but where the limited resources constrain the actions of the learner and correspondingly the returns for each task. Stochastic linear bandits have recently been generating a significant body of research (e.g., Auer [2003], Dani et al. [2008], Rusmevichientong and Tsitsiklis [2010], Abbasi-Yadkori et al. [2011, 2012], Agrawal and Goyal [2012] and many others). A related problem is that of online combinatorial optimisation. This has an extensive literature, but most results are only applicable for discrete action sets, are in the adversarial setting, and cannot exploit the additional structure of our problem. Nevertheless, we refer the interested reader to (say) the recent work by Kveton et al. [2014] and references there-in. Also worth mentioning is that the resource allocation problem at hand is quite different to the “linear semi-bandit” proposed and analysed by Krishnamurthy et al. [2015] where the action set is also finite (the setting is different in many other ways besides). Given its similarity, it is tempting to apply the techniques of linear bandits to our problem. When doing so, two main difficulties arise. The first is that our payoffs are non-linear: the expected reward is a linear function only up to a point after which it is clipped. In the resource allocation problem this has a natural interpretation, which is that over-allocating resources beyond a certain point is fruitless. Fortunately, one can avoid this difficulty rather easily by ensuring that with high probability resources are never over-allocated. The second problem concerns achieving good regret regardless of the task specifics. In particular, when the number of tasks K is large and resources are at a premium the allocation problem behaves more like a K-armed bandit where the economist must choose the few tasks that can be completed successfully. For this kind of problem regret should scale in the worst case with √ K only [Auer et al., 2002, Bubeck and Cesa-Bianchi, 2012]. The standard linear bandits approach, on the other hand, would lead to a bound on the regret that depends linearly on K. To remedy this situation, we will exploit that if K is large and resources are scarce, then many tasks will necessarily be under-resourced and will fail with high probability. Since the noise model is Bernoulli, the variance of the noise for these tasks is extremely low. By using weighted least-squares estimators we are able to exploit this and thereby obtain an improved regret. An added benefit is that when resources are plentiful, then all tasks will succeed with high probability under the optimal allocation, and in this case the variance is also low. This leads to a poly-logarithmic regret for the resource-laden case where the optimal allocation fully allocates every task. 2 Preliminaries If F is some event, then ¬F is its complement (i.e., it is the event that F does not occur). If A is positive definite and x is a vector, then ∥x∥2 A = x⊤Ax stands for the weighted 2-norm. We write |x| to be the vector of element-wise absolute values of x. We let ν ∈RD×K be a matrix with columns ν1, . . . νK. All entries in ν are non-negative, but otherwise we make no global assumptions on ν. At each time step t the learner chooses an allocation matrix Mt ∈M where M = ( M ∈[0, 1]D×K : K X k=1 Mdk ≤1 for all d ) . The assumption that each resource type has a bound of 1 is non-restrictive, since the units of any resource can be changed to accommodate this assumption. We write Mtk ∈[0, 1]D for the kth 2 column of Mt. The reward at time step t is ∥Yt∥1 where Ytk ∈{0, 1} is sampled from a Bernoulli distribution with parameter ψ(⟨Mtk, νk⟩) = min {1, ⟨Mtk, νk⟩}. The economist observes all Ytk, however, not just the sum. The optimal allocation is denoted by M ∗and defined by M ∗= arg max M∈M K X k=1 ψ(⟨Mk, νk⟩) . We are primarily concerned with designing an allocation algorithm that minimises the expected (pseudo) regret of this problem, which is defined by Rn = n K X k=1 ψ(⟨M ∗ k, νk⟩) −E " n X t=1 K X k=1 ψ(⟨Mtk, νk⟩) # , where the expectation is taken over both the actions of the algorithm and the observed reward. Optimal Allocations If ν is known, then the optimal allocation can be computed by constructing an appropriate linear program. Somewhat surprisingly it may also be computed exactly in O(K log K + D log D) time using Algorithm 1 below. The optimal allocation is not so straight-forward as, e.g., simply allocating resources to the incomplete task for which the corresponding ν is largest in some dimension. For example, for K = 2 tasks and d = 2 resource types: ν = ν1 ν2 = 0 1/2 1/2 1 =⇒ M ∗= M ∗ 1 M ∗ 2 = 0 1 1/2 1/2 . Algorithm 1 Input: ν M = 0 ∈RD×K and B = 1 ∈RD while ∃k, d s.t ⟨Mk, νk⟩< 1 and Bd > 0 do A = {k : ⟨Mk, νk⟩< 1} and B = {d : Bd > 0} k, d = arg max (k,d)∈A×B min i∈A\{k} νdk νdi Mdk = min Bd, 1 −⟨Mk, νk⟩ νdk end while return M We see that even though ν22 is the largest parameter, the optimal allocation assigns only half of the second resource (d = 2) to this task. The right approach is to allocate resources to incomplete tasks using the ratios as prescribed by Algorithm 1. The intuition for allocating in this way is that resources should be allocated as efficiently as possible, and efficiency is determined by the ratio of the expected success due to the allocation of a resource and the amount of resources allocated. Theorem 1. Algorithm 1 returns M ∗. The proof of Theorem 1 and an implementation of Algorithm 1 may be found in the supplementary material. We are interested primarily in the case when ν is unknown, so Algorithm 1 will not be directly applicable. Nevertheless, the algorithm is useful as a module in the implementation of a subsequent algorithm that estimates ν from data. 3 Optimistic Allocation Algorithm We follow the optimism in the face of uncertainty principle. In each time step t, the algorithm constructs an estimator ˆνkt for each νk and a corresponding confidence set Ctk for which νk ∈Ctk holds with high probability. The algorithm then takes the optimistic action subject to the assumption that νk does indeed lie in Ctk for all k. The main difficulty is the construction of the confidence sets. Like other authors [Dani et al., 2008, Rusmevichientong and Tsitsiklis, 2010, Abbasi-Yadkori et al., 2011] we define our confidence sets to be ellipses, but the use of a weighted least-squares estimator means that our ellipses may be significantly smaller than the sets that would be available by using these previous works in a straightforward way. The algorithm accepts as input the number of tasks and resource types, the horizon and constants α > 0 and β where constant β is defined by δ = 1 nK , N = 4n4D2D , B ≥max k ∥νk∥2 2 , so that β = 1 + √ αB + 2 s log 6nN δ log 3nN δ !2 . (1) 3 Note that B must be a known bound on maxk ∥νk∥2 2, which might seem like a serious restriction, until one realizes that it is easy to add an initialisation phase where estimates are quickly made while incurring minimal additional regret, as was also done by Lattimore et al. [2014]. The value of α determines the level of regularisation in the least squares estimation and will be tuned later to optimise the regret. Algorithm 2 Optimistic Allocation Algorithm 1: Input K, D, n, α, β 2: for t ∈1, . . . , n do 3: // Compute confidence sets for all tasks k: 4: Gtk = αI + P τ<t γτkMτkM ⊤ τk 5: ˆνtk = G−1 tk P τ<t γτkMτYτk 6: Ctk = n ˜νk : ∥˜νk −ˆνtk∥2 Gtk ≤β o and C′ tk = n ˜νk : ∥˜νk −ˆνtk∥2 Gtk ≤4β o 7: // Compute optimistic allocation: 8: Mt = arg maxMt∈M max˜νk∈Ctk ψ(⟨Mtk, ˜νk⟩) 9: // Observe success indicators Ytk for all tasks k: 10: Ytk ∼Bernoulli(ψ(⟨Mtk, νk⟩)) 11: // Compute weights for all tasks k: 12: γ−1 tk = arg max˜νk∈C′ tk ⟨Mtk, ˜νk⟩(1 −⟨Mtk, ˜νk⟩) 13: end for Computational Efficiency We could not find an efficient implementation of Algorithm 2 because solving the bilinear optimisation problem in Line 8 is likely to be NP-hard (Bennett and Mangasarian [1993] and also Petrik and Zilberstein [2011]). In our experiments we used a simple algorithm based on optimising for M and ν in alternative steps combined with random restarts, but for large D and K this would likely not be efficient. In the supplementary material we present an alternative algorithm that is efficient, but relies on the assumption that ∥νk∥1 ≤1 for all k. In this regime it is impossible to over-allocate resources and this fact can be exploited to obtain an efficient and practical algorithm with strong guarantees. Along the way, we are able to construct an elegant algorithm for linear bandits on the hypercube that enjoys optimal regret and adapts to sparsity. Computing the weights γtk (Line 12) is (somewhat surprisingly) straight-forward. Define ¯ptk = ⟨Mtk, ˆνtk⟩+ 2 p β ∥Mtk∥G−1 tk and ptk = ⟨Mtk, ˆνtk⟩−2 p β ∥Mtk∥G−1 tk . Then the weights can be computed by γ−1 tk = ¯ptk(1 −¯ptk) if ¯ptk ≤1 2 ptk(1 −ptk) if ptk ≥1 2 1 4 otherwise . (2) A curious reader might wonder why the weights are computed by optimising within confidence set C′ tk, which has double the radius of Ctk. The reason is rather technical, but essentially if the true parameter νk were to lie on the boundary of the confidence set, then the corresponding weight could become infinite. For the analysis to work we rely on controlling the size of the weights. It is not clear whether or not this trick is really necessary. 4 Worst-case Regret for Algorithm 2 We now analyse the regret of Algorithm 2. First we offer a worst-case bound on the regret that depends on the time-horizon like O(√n). We then turn our attention to the resource-laden case where the optimal allocation satisfies ⟨M ∗ k, νk⟩= 1 for all k. In this instance we show that the dependence on the horizon is only poly-logarithmic, which would normally be unexpected when the 4 action-space is continuous. The improvement comes from the weighted estimation that exploits the fact that the variance of the noise under the optimal allocation vanishes. Theorem 2. Suppose Algorithm 2 is run with bound B ≥maxk ∥νk∥2 2. Then Rn ≤1 + 4D s 2βnK max k ∥νk∥∞+ 4 p β/α log(1 + 4n2) . Choosing α = B−1 log 6nN δ log 3nN δ and assuming that B ∈O(maxk ∥νk∥2 2), then Rn ∈O D3/2q nK max k ∥νk∥2 log n . The proof of Theorem 2 will follow by carefully analysing the width of the confidence sets as the algorithm makes allocations. We start by proving the validity of the confidence sets, and then prove the theorem. Weighted Least Squares Estimation For this sub-section we focus on the problem of estimating a single unknown ν = νk. Let M1, . . . , Mn be a sequence of allocations to task k with Mt ∈RD. Let {Ft}n t=0 be a filtration with Ft containing information available at the end of round t, which means that Mt is Ft−1measurable. Let γ1, . . . , γn be the sequence of weights chosen by Algorithm 2. The sequence of outcomes is Y1, . . . , Yn ∈{0, 1} for which E[Yt|Ft−1] = ψ(⟨Mt, ν⟩). The weighted regularised gram matrix is Gt = αI +P τ<t γτMτM ⊤ τ and the corresponding weighted least squares estimator is ˆνt = G−1 t X τ<t γtMτYτ . Theorem 3. If ∥ν∥2 2 ≤B and β is chosen as in Eq. (1), then ∥ˆνt −ν∥2 Gt ≤β for all t ≤n with probability at least 1 −δ = 1/(nK). Similar results exist in the literature for unweighted least-squares estimators (for example, Dani et al. [2008], Rusmevichientong and Tsitsiklis [2010], Abbasi-Yadkori et al. [2011]). In our case, however, Gt is the weighted gram matrix, which may be significantly larger than an unweighted version when the weights become large. The proof of Theorem 3 is unfortunately too long to include in the main text, but it may be found in the supplementary material. Analysing the Regret We start with some technical lemmas. Let F be the failure event that ∥ˆνtk −νk∥2 Gtk > β for some t ≤n and 1 ≤k ≤K. Lemma 4 (Abbasi-Yadkori et al. [2012]). Let x1, . . . , xn be an arbitrary sequence of vectors with ∥xt∥2 2 ≤c and let Gt = I + Pt−1 s=1 xsx⊤ s . Then Pn t=1 min n 1, ∥xt∥2 G−1 t o ≤2D log 1 + c·n D . Corollary 5. If F does not hold, then n X t=1 γtk min n 1, ∥Mtk∥2 G−1 tk o ≤8D log(1 + 4n2). The proof is omitted, but follows rather easily by showing that γtk can be moved inside the minimum at a price of increasing the loss at most by a factor of four, and then applying Lemma 4. See the supplementary material for the formal proof. Lemma 6. Suppose F does not hold, then K X k=1 γ−1 tk ≤D max k ∥νk∥∞+ 4 p β/α . 5 Proof. We exploit the fact that γ−1 tk is an estimate of the variance, which is small whenever ∥Mtk∥1 is small: γ−1 tk = arg max ˜νk∈C′ tk ⟨Mtk, ˜νk⟩(1 −⟨Mtk, ˜νk⟩) ≤arg max ˜νk∈C′ tk ⟨Mtk, ˜νk⟩ = ⟨Mtk, ν⟩+ arg max ˜νk∈Ctk′ ⟨Mtk, ˜νk −ν⟩ (a) ≤∥Mtk∥1 ∥νk∥∞+ 4 p β ∥Mtk∥G−1 tk (b) ≤∥Mtk∥1 ∥νk∥∞+ 4 p β ∥Mtk∥I/α (c) ≤∥Mtk∥1 ∥νk∥∞+ 4 p β/α , where (a) follows from Cauchy-Schwartz and the fact that νk ∈C′ tk, (b) since G−1 tk ≤I/α and basic linear algebra, (c) since ∥Mtk∥I/α = p 1/α ∥Mtk∥2 ≤ p 1/α ∥Mtk∥1. The result is completed since the resource constraints implies that PK k=1 ∥Mtk∥1 ≤D. Proof of Theorem 2. By Theorem 3 we have that F holds with probability at most δ = 1/(nK). If F does not hold, then by the definition of the confidence set we have νk ∈Ctk for all t and k. Therefore Rn = E n X t=1 K X k=1 (⟨M ∗ k, νk⟩−ψ(⟨Mtk, νk⟩)) ≤1 + E " 1 {¬F} n X t=1 K X k=1 ⟨M ∗ k −Mtk, νk⟩ # . Note that we were able to replace ψ(⟨Mtk, νk⟩) = ⟨Mtk, νk⟩, since if F does not hold, then Mtk will never be chosen in such a way that resources are over-allocated. We will now assume that F does not hold and bound the argument in the expectation. By the optimism principle we have: n X t=1 K X k=1 ⟨M ∗ k −Mtk, νk⟩ (a) ≤ n X t=1 K X k=1 min {1, ⟨Mtk, ˜νtk −νk⟩} (b) ≤ n X t=1 K X k=1 min n 1, ∥Mtk∥G−1 tk ∥˜νtk −νk∥Gtk o (c) ≤2 n X t=1 K X k=1 min n 1, ∥Mtk∥G−1 tk p β o (d) ≤2 v u u tn n X t=1 β K X k=1 min n 1, ∥Mtk∥G−1 tk o!2 (e) ≤2 v u u tn n X t=1 β K X k=1 γ−1 tk ! K X k=1 γtk min n 1, ∥Mtk∥2 G−1 tk o! (f) ≤2 v u u tnD max k ∥νk∥∞+ 4 r β α ! n X t=1 β K X k=1 γtk min n 1, ∥Mtk∥2 G−1 tk o! (g) ≤4D v u u t2βnK max k ∥νk∥∞+ 4 r β α ! log(1 + 4n2) . where (a) follows from the assumption that νk ∈Ctk for all t and k and since Mt is chosen optimistically, (b) by the Cauchy-Schwarz inequality, (c) by the definition of ˜νkt, which lies inside Ctk, (d) by Jensen’s inequality, (e) by Cauchy-Schwarz again, (f) follows from Lemma 6. Finally (g) follows from Corollary 5. 5 Regret in Resource-Laden Case We now show that if there are enough resources such that the optimal strategy can complete every task with certainty, then the regret of Algorithm 2 is poly-logarithmic (in contrast to O(√n) otherwise). As before we exploit the low variance, but now the variance is small because ⟨Mtk, νk⟩is 6 close to 1, while in the previous section we argued that this could not happen too often (there is no contradiction as the quantity maxk ∥νk∥appeared in the previous bound). Theorem 7. If PK k=1 ⟨M ∗ k, νk⟩= K, then Rn ≤1 + 8βKD log(1 + 4n2). Proof. We start by showing that the weights are large: γ−1 tk = max ν∈C′ tk ⟨Mtk, ν⟩(1 −⟨Mtk, ν⟩) ≤max ν∈C′ tk (1 −⟨Mtk, ν⟩) ≤ max ¯ν,ν∈C′ tk ⟨Mtk, ¯ν −ν⟩≤∥Mtk∥G−1 tk max ¯ν,ν∈C′ tk ∥¯ν −ν∥Gtk ≤∥Mtk∥G−1 tk 4 p β . Applying the optimism principle and using the bound above combined with Corollary 5 gives the result: ERn ≤1 + E " 1 {¬F} n X t=1 K X k=1 min {1, ⟨Mtk, ˜νkt −νk⟩} # ≤1 + 2E " 1 {¬F} n X t=1 K X k=1 min n 1, ∥Mtk∥G−1 tk p β o# = 1 + 2E " 1 {¬F} n X t=1 K X k=1 min n 1, γ−1 tk γtk ∥Mtk∥G−1 tk o p β # ≤1 + 8β E " 1 {¬F} n X t=1 K X k=1 min n 1, γtk ∥Mtk∥2 G−1 tk o# ≤1 + 8βKD log(1 + 4n2) . 6 Experiments We present two experiments to demonstrate the behaviour of Algorithm 2. All code and data is available in the supplementary material. Error bars indicate 95% confidence intervals, but sometimes they are too small to see (the algorithm is quite conservative, so the variance is very low). We used B = 10 for all experiments. The first experiment demonstrates the improvements obtained by using a weighted estimator over an unweighted one, and also serves to give some idea of the rate of learning. For this experiment we used D = K = 2 and n = 106 and ν = ν1 ν2 = 8/10 2/10 4/10 2 =⇒ M ∗= 1 0 1/2 1/2 and K X k=1 ⟨M ∗ k, νk⟩= 2 , where the kth column is the parameter/allocation for the kth task. We ran two versions of the algorithm. The first, exactly as given in Algorithm 2 and the second identical except that the weights were fixed to γtk = 4 for all t and k (this value is chosen because it corresponds to the minimum inverse variance for a Bernoulli variable). The data was produced by taking the average regret over 8 runs. The results are given in Fig. 1. In Fig. 2 we plot γtk. The results show that γtk is increasing linearly with t. This is congruent with what we might expect because in this regime the estimation error should drop with O(1/t) and the estimated variance is proportional to the estimation error. Note that the estimation error for the algorithm with γtk = 4 will be O( p 1/t). For the second experiment we show the algorithm adapting to the environment. We fix n = 5 × 105 and D = K = 2. For α ∈(0, 1) we define να = 1/2 α/2 1/2 α/2 =⇒ M ∗= 1 0 1 0 and K X k=1 ⟨M ∗ k, νk⟩= 1 . The unusual profile of the regret as α varies can be attributed to two factors. First, if α is small then the algorithm quickly identifies that resources should be allocated first to the first task. However, in the early stages of learning the algorithm is conservative in allocating to the first task to avoid overallocation. Since the remaining resources are given to the second task, the regret is larger for small 7 α because the gain from allocating to the second task is small. On the other hand, if α is close to 1, then the algorithm suffers the opposite problem. Namely, it cannot identify which task the resources should be assigned to. Of course, if α = 1, then the algorithm must simply learn that all resources can be allocated safely and so the regret is smallest here. An important point is that the algorithm never allocates all its resources at the start of the process because this risks over-allocation, so even in “easy” problems the regret will not vanish. Figure 1: Weighted vs unweighted estimation 0 1,000,000 0 20,000 40,000 60,000 80,000 t Regret Weighted Estimator Unweighted Estimator Figure 2: Weights 0 1,000,000 0 20 40 t γ γt1 γt2 Figure 3: “Gap” dependence 0.0 0.5 1.0 0 10,000 20,000 30,000 α Regret 7 Conclusions and Summary We introduced the stochastic multi-resource allocation problem and developed a new algorithm that enjoys near-optimal worst-case regret. The main drawback of the new algorithm is that its computation time is exponential in the dimension parameters, which makes practical implementations challenging unless both K and D are relatively small. Despite this challenge we were able to implement that algorithm using a relatively brutish approach to solving the optimisation problem, and this was sufficient to present experimental results on synthetic data showing that the algorithm is behaving as the theory predicts, and that the use of the weighted least-squares estimation is leading to a real improvement. Despite the computational issues, we think this is a reasonable first step towards a more practical algorithm as well as a solid theoretical understanding of the structure of the problem. As a consolation (and on their own merits) we include some other results: • An efficient (both in terms of regret and computation) algorithm for the case where overallocation is impossible. • An algorithm for linear bandits on the hypercube that enjoys optimal regret bounds and adapts to sparsity. • Theoretical analysis of weighted least-squares estimators, which may have other applications (e.g., linear bandits with heteroscedastic noise). There are many directions for future research. The most natural is to improve the practicality of the algorithm. We envisage such an algorithm might be obtained by following the program below: • Generalise the Thompson sampling analysis for linear bandits by Agrawal and Goyal [2012]. This is a highly non-trivial step, since it is no longer straight-forward to show that such an algorithm is optimistic with high probability. Instead it will be necessary to make do with some kind of local optimism for each task. • The method of estimation depends heavily on the algorithm over-allocating its resources only with extremely low probability, but this significantly slows learning in the initial phases when the confidence sets are large and the algorithm is acting conservatively. Ideally we would use a method of estimation that depended on the real structure of the problem, but existing techniques that might lead to theoretical guarantees (e.g., empirical process theory) do not seem promising if small constants are expected. It is not hard to think up extensions or modifications to the setting. For example, it would be interesting to look at an adversarial setting (even defining it is not so easy), or move towards a non-parametric model for the likelihood of success given an allocation. 8 References Yasin Abbasi-Yadkori, Csaba Szepesv´ari, and David Tax. Improved algorithms for linear stochastic bandits. In Advances in Neural Information Processing Systems, pages 2312–2320, 2011. Yasin Abbasi-Yadkori, David Pal, and Csaba Szepesvari. Online-to-confidence-set conversions and application to sparse stochastic bandits. In AISTATS, volume 22, pages 1–9, 2012. Shipra Agrawal and Navin Goyal. Thompson sampling for contextual bandits with linear payoffs. arXiv preprint arXiv:1209.3352, 2012. Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. The Journal of Machine Learning Research, 3:397–422, 2003. Peter Auer, Nicol´o Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47:235–256, 2002. Kristin P Bennett and Olvi L Mangasarian. Bilinear separation of two sets inn-space. Computational Optimization and Applications, 2(3):207–227, 1993. S´ebastien Bubeck and Nicol`o Cesa-Bianchi. Regret Analysis of Stochastic and Nonstochastic Multiarmed Bandit Problems. Foundations and Trends in Machine Learning. Now Publishers Incorporated, 2012. ISBN 9781601986269. Varsha Dani, Thomas P Hayes, and Sham M Kakade. Stochastic linear optimization under bandit feedback. In COLT, pages 355–366, 2008. Akshay Krishnamurthy, Alekh Agarwal, and Miroslav Dudik. Efficient contextual semi-bandit learning. arXiv preprint arXiv:1502.05890, 2015. Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Tight regret bounds for stochastic combinatorial semi-bandits. arXiv preprint arXiv:1410.0949, 2014. Tor Lattimore, Koby Crammer, and Csaba Szepesv´ari. Optimal resource allocation with semi-bandit feedback. In Proceedings of the 30th Conference on Uncertainty in Artificial Intelligence (UAI), 2014. Marek Petrik and Shlomo Zilberstein. Robust approximate bilinear programming for value function approximation. The Journal of Machine Learning Research, 12:3027–3063, 2011. Paat Rusmevichientong and John N Tsitsiklis. Linearly parameterized bandits. Mathematics of Operations Research, 35(2):395–411, 2010. Thomas Sowell. Is Reality Optional?: And Other Essays. Hoover Institution Press, 1993. 9 | 2015 | 211 |
5,716 | On the Optimality of Classifier Chain for Multi-label Classification Weiwei Liu Ivor W. Tsang∗ Centre for Quantum Computation and Intelligent Systems University of Technology, Sydney liuweiwei863@gmail.com, ivor.tsang@uts.edu.au Abstract To capture the interdependencies between labels in multi-label classification problems, classifier chain (CC) tries to take the multiple labels of each instance into account under a deterministic high-order Markov Chain model. Since its performance is sensitive to the choice of label order, the key issue is how to determine the optimal label order for CC. In this work, we first generalize the CC model over a random label order. Then, we present a theoretical analysis of the generalization error for the proposed generalized model. Based on our results, we propose a dynamic programming based classifier chain (CC-DP) algorithm to search the globally optimal label order for CC and a greedy classifier chain (CC-Greedy) algorithm to find a locally optimal CC. Comprehensive experiments on a number of real-world multi-label data sets from various domains demonstrate that our proposed CC-DP algorithm outperforms state-of-the-art approaches and the CCGreedy algorithm achieves comparable prediction performance with CC-DP. 1 Introduction Multi-label classification, where each instance can belong to multiple labels simultaneously, has significantly attracted the attention of researchers as a result of its various applications, ranging from document classification and gene function prediction, to automatic image annotation. For example, a document can be associated with a range of topics, such as Sports, Finance and Education [1]; a gene belongs to the functions of protein synthesis, metabolism and transcription [2]; an image may have both beach and tree tags [3]. One popular strategy for multi-label classification is to reduce the original problem into many binary classification problems. Many works have followed this strategy. For example, binary relevance (BR) [4] is a simple approach for multi-label learning which independently trains a binary classifier for each label. Recently, Dembczynski et al. [5] have shown that methods of multi-label learning which explicitly capture label dependency will usually achieve better prediction performance. Therefore, modeling the label dependency is one of the major challenges in multi-label classification problems. Many multi-label learning models [5, 6, 7, 8, 9, 10, 11, 12] have been developed to capture label dependency. Amongst them, the classifier chain (CC) model is one of the most popular methods due to its simplicity and promising experimental results [6]. CC works as follows: One classifier is trained for each label. For the (i + 1)th label, each instance is augmented with the 1st, 2nd, · · · , ith label as the input to train the (i + 1)th classifier. Given a new instance to be classified, CC firstly predicts the value of the first label, then takes this instance together with the predicted value as the input to predict the value of the next label. CC proceeds in this way until the last label is predicted. However, here is the question: Does the label order affect the performance of CC? Apparently yes, because different classifier chains involve different ∗Corresponding author 1 classifiers trained on different training sets. Thus, to reduce the influence of the label order, Read et al. [6] proposed the ensembled classifier chain (ECC) to average the multi-label predictions of CC over a set of random chain ordering. Since the performance of CC is sensitive to the choice of label order, there is another important question: Is there any globally optimal classifier chain which can achieve the optimal prediction performance for CC? If yes, how can the globally optimal classifier chain be found? To answer the last two questions, we first generalize the CC model over a random label order. We then present a theoretical analysis of the generalization error for the proposed generalized model. Our results show that the upper bound of the generalization error depends on the sum of reciprocal of square of the margin over the labels. Thus, we can answer the second question: the globally optimal CC exists only when the minimization of the upper bound is achieved over this CC. To find the globally optimal CC, we can search over q! different label orders1, where q denotes the number of labels, which is computationally infeasible for a large q. In this paper, we propose the dynamic programming based classifier chain (CC-DP) algorithm to simplify the search algorithm, which requires O(q3nd) time complexity. Furthermore, to speed up the training process, a greedy classifier chain (CC-Greedy) algorithm is proposed to find a locally optimal CC, where the time complexity of the CC-Greedy algorithm is O(q2nd). Notations: Assume xt ∈Rd is a real vector representing an input or instance (feature) for t ∈ {1, · · · , n}. n denotes the number of training samples. Yt ⊆{λ1, λ2, · · · , λq} is the corresponding output (label). yt ∈{0, 1}q is used to represent the label set Yt, where yt(j) = 1 if and only if λj ∈Yt. 2 Related work and preliminaries To capture label dependency, Hsu et al. [13] first use compressed sensing technique to handle the multi-label classification problem. They project the original label space into a low dimensional label space. A regression model is trained on each transformed label. Recovering multi-labels from the regression output usually involves solving a quadratic programming problem [13], and many works have been developed in this way [7, 14, 15]. Such methods mainly aim to use different projection methods to transform the original label space into another effective label space. Another important approach attempts to exploit the different orders (first-order, second-order and high-order) of label correlations [16]. Following this way, some works also try to provide a probabilistic interpretation for label correlations. For example, Guo and Gu [8] model the label correlations using a conditional dependency network; PCC [5] exploits a high-order Markov Chain model to capture the correlations between the labels and provide an accurate probabilistic interpretation of CC. Other works [6, 9, 10] focus on modeling the label correlations in a deterministic way, and CC is one of the most popular methods among them. This work will mainly focus on the deterministic high-order classifier chain. 2.1 Classifier chain Similar to BR, the classifier chain (CC) model [6] trains q binary classifiers hj (j ∈{1, · · · , q}). Classifiers are linked along a chain where each classifier hj deals with the binary classification problem for label λj. The augmented vector {xt, yt(1), · · · , yt(j)}n t=1 is used as the input for training classifier hj+1. Given a new testing instance x, classifier h1 in the chain is responsible for predicting the value of y(1) using input x. Then, h2 predicts the value of y(2) taking x plus the predicted value of y(1) as an input. Following in this way, hj+1 predicts y(j + 1) using the predicted value of y(1), · · · , y(j) as additional input information. CC passes label information between classifiers, allowing CC to exploit the label dependence and thus overcome the label independence problem of BR. Essentially, it builds a deterministic high-order Markov Chain model to capture the label correlations. 1! represents the factorial notation. 2 2.2 Ensembled classifier chain Different classifier chains involve different classifiers learned on different training sets and thus the order of the chain itself clearly affects the prediction performance. To solve the issue of selecting a chain order for CC, Read et al. [6] proposed the extension of CC, called ensembled classifier chain (ECC), to average the multi-label predictions of CC over a set of random chain ordering. ECC first randomly reorders the labels {λ1, λ2, · · · , λq} many times. Then, CC is applied to the reordered labels for each time and the performance of CC is averaged over those times to obtain the final prediction performance. 3 Proposed model and generalization error analysis 3.1 Generalized classifier chain We generalize the CC model over a random label order, called generalized classifier chain (GCC) model. Assume the labels {λ1, λ2, · · · , λq} are randomly reordered as {ζ1, ζ2, · · · , ζq}, where ζj = λk means label λk moves to position j from k. In the GCC model, classifiers are also linked along a chain where each classifier hj deals with the binary classification problem for label ζj (λk). GCC follows the same training and testing procedures as CC, while the only difference is the label order. In the GCC model, for input xt, yt(j) = 1 if and only if ζj ∈Yt. 3.2 Generalization error analysis In this section, we analyze the generalization error bound of the multi-label classification problem using GCC based on the techniques developed for the generalization performance of classifiers with a large margin [17] and perceptron decision tree [18]. Let X represent the input space. Both s and ¯s are m samples drawn independently according to an unknown distribution D. We denote logarithms to base 2 by log. If S is a set, |S| denotes its cardinality. ∥· ∥means the l2 norm. We train a support vector machine(SVM) for each label ζj. Let {xt}n t=1 as the feature and {yt(ζj)}n t=1 as the label, the output parameter of SVM is defined as [wj, bj] = SV M({xt, yt(ζ1), · · · , yt(ζj−1)}n t=1, {yt(ζj)}n t=1). The margin for label ζj is defined as: γj = 1 ||wj||2 (1) We begin with the definition of the fat shattering dimension. Definition 1 ([19]). Let H be a set of real valued functions. We say that a set of points P is γshattered by H relative to r = (rp)p∈P if there are real numbers rp indexed by p ∈P such that for all binary vectors b indexed by P, there is a function fb ∈H satisfying fb(p) = {≥rp + γ if bp = 1 ≤rp −γ otherwise The fat shattering dimension fat(γ) of the set H is a function from the positive real numbers to the integers which maps a value γ to the size of the largest γ-shattered set, if this is finite, or infinity otherwise. Assume H is the real valued function class and h ∈H. l(y, h(x)) denotes the loss function. The expected error of h is defined as erD[h] = E(x,y)∼D[l(y, h(x))], where (x, y) drawn from the unknown distribution D. Here we select 0-1 loss function. So, erD[h] = P(x,y)∼D(h(x) ̸= y). ers[h] is defined as ers[h] = 1 n n∑ t=1 [yt ̸= h(xt)].2 Suppose N(ϵ, H, s) is the ϵ-covering number of H with respect to the l∞pseudo-metric measuring the maximum discrepancy on the sample s. The notion of the covering number can be referred to the Supplementary Materials. We introduce the following general corollary regarding the bound of the covering number: 2The expression [yt ̸= h(xt)] evaluates to 1 if yt ̸= h(xt) is true and to 0 otherwise. 3 Corollary 1 ([17]). Let H be a class of functions X →[a, b] and D a distribution over X. Choose 0 < ϵ < 1 and let d = fat(ϵ/4) ≤em. Then E(N(ϵ, H, s)) ≤2 (4m(b −a)2 ϵ2 )d log(2em(b−a)/(dϵ)) (2) where the expectation E is over samples s ∈Xm drawn according to Dm. We study the generalization error bound of the specified GCC with the specified number of labels and margins. Let G be the set of classifiers of GCC, G = {h1, h2, · · · , hq}. ers[G] denotes the fraction of the number of errors that GCC makes on s. Define ˆx ∈X × {0, 1}, ˆhj(ˆx) = hj(x)(1 − y(j)) −hj(x)y(j). If an instance x ∈X is correctly classified by hj, then ˆhj(ˆx) < 0. Moreover, we introduce the following proposition: Proposition 1. If an instance x ∈X is misclassified by a GCC model, then ∃hj ∈G, ˆhj(ˆx) ≥0. Lemma 1. Given a specified GCC model with q labels and with margins γ1, γ2, · · · , γq for each label satisfying ki = fat(γi/8), where fat is continuous from the right. If GCC has correctly classified m multi-labeled examples s generated independently according to the unknown (but fixed) distribution D and ¯s is a set of another m multi-labeled examples, then we can bound the following probability to be less than δ: P 2m{s¯s : ∃a GCC model, it correctly classifies s, fraction of ¯s misclassified > ϵ(m, q, δ)} < δ, where ϵ(m, q, δ) = 1 m(Q log(32m)+log 2q δ ) and Q = ∑q i=1 ki log( 8em ki ). Proof. (of Lemma 1). Suppose G is a GCC model with q labels and with margins γ1, γ2, · · · , γq, the probability event in Lemma 1 can be described as A = {s¯s : ∃G, ki = fat(γi/8), ers[G] = 0, er¯s[G] > ϵ}. Let ˆs and ˆ¯s denote two different set of m examples, which are drawn i.i.d. from the distribution D × {0, 1}. Applying the definition of ˆx, ˆh and Proposition 1, the event can also be written as A = {ˆsˆ¯s : ∃G, ˆγi = γi/2, ki = fat(ˆγi/4), ers[G] = 0, ri = maxtˆhi(ˆxt), 2ˆγi = −ri, |{ˆy ∈ˆ¯s : ∃hi ∈G, ˆhi(ˆy) ≥2ˆγi + ri}| > mϵ}. Here, −maxtˆhi(ˆxt) means the minimal value of |hi(x)| which represents the margin for label ζi, so 2ˆγi = −ri. Let γki = min{γ′ : fat(γ′/4) ≤ki}, so γki ≤ˆγi, we define the following function: π(ˆh) = 0 if ˆh ≥0 −2γki if ˆh ≤−2γki ˆh otherwise so π(ˆh) ∈[−2γki, 0]. Let π( ˆG) = {π(ˆh) : h ∈G}. Let Bki ˆsˆ¯s represent the minimal γki-cover set of π( ˆG) in the pseudo-metric dˆsˆ¯s. We have that for any hi ∈G, there exists ˜f ∈Bki ˆsˆ¯s , |π(ˆhi(ˆz)) −π( ˜f(ˆz))| < γki, for all ˆz ∈ˆsˆ¯s. For all ˆx ∈ˆs, by the definition of ri, ˆhi(ˆx) ≤ri = −2ˆγi, and γki ≤ˆγi, ˆhi(ˆx) ≤−2γki, π(ˆhi(ˆx)) = −2γki, so π( ˜f(ˆx)) < −2γki + γki = −γki. However, there are at least mϵ points ˆy ∈ˆ¯s such that ˆhi(ˆy) ≥0, so π( ˜f(ˆy)) > −γki > maxtπ( ˜f(ˆxt)). Since π only reduces separation between output values, we conclude that the inequality ˜f(ˆy) > maxt ˜f(ˆxt) holds. Moreover, the mϵ points in ˆ¯s with the largest ˜f values must remain for the inequality to hold. By the permutation argument, at most 2−mϵ of the sequences obtained by swapping corresponding points satisfy the conditions for fixed ˜f. As for any hi ∈G, there exists ˜f ∈Bki ˆsˆ¯s , so there are |Bki ˆsˆ¯s | possibilities of ˜f that satisfy the inequality for ki. Note that |Bki ˆsˆ¯s | is a positive integer which is usually bigger than 1 and by the union bound, we get the following inequality: P(A) ≤(E(|Bk1 ˆsˆ¯s |) + · · · + E(|Bkq ˆsˆ¯s |))2−mϵ ≤(E(|Bk1 ˆsˆ¯s |) × · · · × E(|Bkq ˆsˆ¯s |))2−mϵ Since every set of points γ-shattered by π( ˆG) can be γ-shattered by ˆG, so fatπ( ˆ G)(γ) ≤fat ˆ G(γ), where ˆG = {ˆh : h ∈G}. Hence, by Corollary 1 (setting [a, b] to [−2γki, 0], ϵ to γki and m to 2m), E(|Bki ˆsˆ¯s |) = E(N(γki, π( ˆG),ˆsˆ¯s)) ≤2(32m)d log( 8em d ) 4 where d = fatπ( ˆ G)(γki/4) ≤fat ˆ G(γki/4) ≤ki. Thus E(|Bki ˆsˆ¯s |) ≤2(32m)ki log( 8em ki ), and we obtain P(A) ≤(E(|Bk1 ˆsˆ¯s |) × · · · × E(|Bkq ˆsˆ¯s |))2−mϵ ≤ q ∏ i=1 2(32m)ki log( 8em ki ) = 2q(32m)Q where Q = ∑q i=1 ki log( 8em ki ). And so (E(|Bk1 ˆsˆ¯s |) × · · · × E(|Bkq ˆsˆ¯s |))2−mϵ < δ provided ϵ(m, q, δ) ≥1 m ( Q log(32m) + log 2q δ ) as required. Lemma 1 applies to a particular GCC model with a specified number of labels and a specified margin for each label. In practice, we will observe the margins after running the GCC model. Thus, we must bound the probabilities uniformly over all of the possible margins that can arise to obtain a practical bound. The generalization error bound of the multi-label classification problem using GCC is shown as follows: Theorem 1. Suppose a random m multi-labeled sample can be correctly classified using a GCC model, and suppose this GCC model contains q classifiers with margins γ1, γ2, · · · , γq for each label. Then we can bound the generalization error with probability greater than 1−δ to be less than 130R2 m ( Q′ log(8em) log(32m) + log 2(2m)q δ ) where Q′ = ∑q i=1 1 (γi)2 and R is the radius of a ball containing the support of the distribution. Before proving Theorem 1, we state one key Symmetrization lemma and Theorem 2. Lemma 2 (Symmetrization). Let H be the real valued function class. s and ¯s are m samples both drawn independently according to the unknown distribution D. If mϵ2 ≥2, then Ps(sup h∈H |erD[h] −ers[h]| ≥ϵ) ≤2Ps¯s(sup h∈H |er¯s[h] −ers[h]| ≥ϵ/2) (3) The proof details of this lemma can be found in the Supplementary Material. Theorem 2 ([20]). Let H be restricted to points in a ball of M dimensions of radius R about the origin, then fatH(γ) ≤min {R2 γ2 , M + 1 } (4) Proof. (of Theorem 1). We must bound the probabilities over different margins. We first use Lemma 2 to bound the probability of error in terms of the probability of the discrepancy between the performance on two halves of a double sample. Then we combine this result with Lemma 1. We must consider all possible patterns of ki’s for label ζi. The largest value of ki is m. Thus, for fixed q, we can bound the number of possibilities by mq. Hence, there are mq of applications of Lemma 1. Let ci = {γ1, γ2, · · · , γq} denote the i-th combination of margins varied in {1, · · · , m}q. G denotes a set of GCC models. The generalization error of G can be represented as erD[G] and ers[G] is 0, where G ∈G. The uniform convergence bound of the generalization error is Ps(sup G∈G |erD[G] −ers[G]| ≥ϵ) Applying Lemma 2, Ps(sup G∈G |erD[G]−ers[G]| ≥ϵ) ≤2Ps¯s(sup G∈G |er¯s[G] −ers[G]| ≥ϵ/2) Let Jci = {s¯s : ∃a GCC model G with q labels and with margins ci : ki = fat(γi/8), ers[G] = 0, er¯s[G] ≥ϵ/2}. Clearly, Ps¯s(sup G∈G |er¯s[G] −ers[G]| ≥ϵ/2) ≤P mq( mq ∪ i=1 Jci ) 5 As ki still satisfies ki = fat(γi/8), Lemma 1 can still be applied to each case of P mq(Jci). Let δk = δ/mq. Applying Lemma 1 (replacing δ by δk/2), we get: P mq(Jci) < δk/2 where ϵ(m, k, δk/2) ≥2/m(Q log(32m) + log 2×2q δk ) and Q = ∑q i=1 ki log( 4em ki ). By the union bound, it suffices to show that P mq(∪mq i=1 Jci) ≤∑mq i=1 P mq(Jci) < δk/2 × mq = δ/2. Applying Lemma 2, Ps(sup G∈G |erD[G] −ers[G]| ≥ϵ) ≤2Ps¯s(sup G∈G |er¯s[G] −ers[G]| ≥ϵ/2) ≤2P mq( mq ∪ i=1 Jci ) < δ Thus, Ps(supG∈G |erD[G] −ers[G]| ≤ϵ) ≥1 −δ. Let R be the radius of a ball containing the support of the distribution. Applying Theorem 2, we get ki = fat(γi/8) ≤65R2/(γi)2. Note that we have replaced the constant 82 = 64 by 65 in order to ensure the continuity from the right required for the application of Lemma 1. We have upperbounded log(8em/ki) by log(8em). Thus, erD[G] ≤2/m ( Q log(32m) + log 2(2m)q δ ) ≤130R2 m ( Q′ log(8em) log(32m) + log 2(2m)q δ ) where Q′ = ∑q i=1 1 (γi)2 . Given the training data size and the number of labels, Theorem 1 reveals one important factor in reducing the generalization error bound for the GCC model: the minimization of the sum of reciprocal of square of the margin over the labels. Thus, we obtain the following Corollary: Corollary 2 (Globally Optimal Classifier Chain). Suppose a random m multi-labeled sample with q labels can be correctly classified using a GCC model, this GCC model is the globally optimal classifier chain if and only if the minimization of Q′ in Theorem 1 is achieved over this classifier chain. Given the number of labels q, there are q! different label orders. It is very expensive to find the globally optimal CC, which can minimize Q′, by searching over all of the label orders. Next, we discuss two simple algorithms. 4 Optimal classifier chain algorithm In this section, we propose two simple algorithms for finding the optimal CC based on our result in Section 3. To clearly state the algorithms, we redefine the margins with label order information. Given label set M = {λ1, λ2, · · · , λq}, suppose a GCC model contains q classifiers. Let oi(1 ≤ oi ≤q) denote the order of λi in the GCC model, γoi i represents the margin for label λi, with previous oi −1 labels as the augmented input. If oi = 1, then γ1 i represents the margin for label λi, without augmented input. Then Q′ is redefined as Q′ = ∑q i=1 1 (γ oi i )2 . 4.1 Dynamic programming algorithm To simplify the search algorithm mentioned before, we propose the CC-DP algorithm to find the globally optimal CC. Note that Q′ = ∑q i=1 1 (γ oi i )2 = 1 (γ oq q )2 + · · · + [ 1 (γ ok+1 k+1 )2 + ∑k j=1 1 (γ oj j )2 ] , we explore the idea of DP to iteratively optimize Q′ over a subset of M with the length of 1, 2, · · · , q. Finally, we can obtain the optimal Q′ over M. Assume i ∈{1, · · · , q}. Let V (i, η) be the optimal Q′ over a subset of M with the length of η(1 ≤η ≤q), where the label order is ending by label λi. Suppose M η i represent the corresponding label set for V (i, η). When η = q, V (i, q) be the optimal Q′ over M, where the label order is ending by label λi. The DP equation is written as: V (i, η + 1) = min j̸=i,λi̸∈M η j { 1 (γη+1 i )2 + V (j, η) } (5) 6 where γη+1 i is the margin for label λi, with M η j as the augmented input. The initial condition of DP is: V (i, 1) = 1 (γ1 i )2 and M 1 i = {λi}. Then, the optimal Q′ over M can be obtained by solving mini∈{1,··· ,q} V (i, q). Assume the training of linear SVM takes O(nd). The CC-DP algorithm is shown as the following bottom-up procedure: from the bottom, we first compute V (i, 1) = 1 (γ1 i )2 , which takes O(nd). Then we compute V (i, 2) = minj̸=i,λi̸∈M 1 j { 1 (γ2 i )2 + V (j, 1)}, which requires at most O(qnd), and set M 2 i = M 1 j ∪{λi}. Similarly, it takes at most O(q2nd) time complexity to calculate V (i, q). Last, we iteratively solve this DP Equation, and use mini∈{1,··· ,q} V (i, q) to get the optimal solution, which requires at most O(q3nd) time complexity. Theorem 3 (Correctness of CC-DP). Q′ can be minimized by CC-DP, which means this Algorithm can find the globally optimal CC. The proof can be referred to in the Supplementary Materials. 4.2 Greedy algorithm We propose a CC-Greedy algorithm to find a locally optimal CC to speed up the CC-DP algorithm. To save time, we construct only one classifier chain with the locally optimal label order. Based on the training instances, we select the label from {λ1, λ2, · · · , λq} as the first label, if the maximum margin can be achieved over this label, without augmented input. The first label is denoted by ζ1. Then we select the label from the remainder as the second label, if the maximum margin can be achieved over this label with ζ1 as the augmented input. We continue in this way until the last label is selected. Finally, this algorithm will converge to the locally optimal CC. We present the details of the CC-Greedy algorithm in the Supplementary Materials, where the time complexity of this algorithm is O(q2nd). 5 Experiment In this section, we perform experimental studies on a number of benchmark data sets from different domains to evaluate the performance of our proposed algorithms for multi-label classification. All the methods are implemented in Matlab and all experiments are conducted on a workstation with a 3.2GHZ Intel CPU and 4GB main memory running 64-bit Windows platform. 5.1 Data sets and baselines We conduct experiments on eight real-world data sets with various domains from three websites.345 Following the experimental settings in [5] and [7], we preprocess the LLog, yahoo art, eurlex sm and eurlex ed data sets. Their statistics are presented in the Supplementary Materials. We compare our algorithms with some baseline methods: BR, CC, ECC, CCA [14] and MMOC [7]. To perform a fair comparison, we use the same linear classification/regression package LIBLINEAR [21] with L2-regularized square hinge loss (primal) to train the classifiers for all the methods. ECC is averaged over several CC predictions with random order and the ensemble size in ECC is set to 10 according to [5, 6]. In our experiment, the running time of PCC and EPCC [5] on most data sets, like slashdot and yahoo art, takes more than one week. From the results in [5], ECC is comparable with EPCC and outperforms PCC, so we do not consider PCC and EPCC here. CCA and MMOC are two state-of-the-art encoding-decoding [13] methods. We cannot get the results of CCA and MMOC on yahoo art 10, eurlex sm 10 and eurlex ed 10 data sets in one week. Following [22], we consider the Example-F1, Macro-F1 and Micro-F1 measures to evaluate the prediction performance of all methods. We perform 5-fold cross-validation on each data set and report the mean and standard error of each evaluation measurement. The running time complexity comparison is reported in the Supplementary Materials. 3http://mulan.sourceforge.net 4http://meka.sourceforge.net/#datasets 5http://cse.seu.edu.cn/people/zhangml/Resources.htm#data 7 Table 1: Results of Example-F1 on the various data sets (mean ± standard deviation). The best results are in bold. Numbers in square brackets indicate the rank. Data set BR CC ECC CCA MMOC CC-Greedy CC-DP yeast 0.6076 ± 0.019[6] 0.5850± 0.033[7] 0.6096± 0.018[5] 0.6109 ± 0.024[4] 0.6132 ± 0.021 [3] 0.6144± 0.021[1] 0.6135± 0.015[2] image 0.5247 ± 0.025[7] 0.5991± 0.021[1] 0.5947± 0.015[4] 0.5947 ± 0.009[4] 0.5960 ± 0.012[3] 0.5939± 0.021[6] 0.5976± 0.015[2] slashdot 0.4898 ± 0.024[6] 0.5246± 0.028[4] 0.5123± 0.027[5] 0.5260 ± 0.021[3] 0.4895 ± 0.022[7] 0.5266± 0.022[2] 0.5268± 0.022[1] enron 0.4792 ± 0.017[7] 0.4799± 0.011[6] 0.4848± 0.014[4] 0.4812 ± 0.024[5] 0.4940 ± 0.016[1] 0.4894 ± 0.016[2] 0.4880± 0.015[3] LLog 10 0.3138 ± 0.022[6] 0.3219± 0.028[4] 0.3223± 0.030[3] 0.2978 ± 0.026[7] 0.3153 ± 0.026[5] 0.3269± 0.023[2] 0.3298± 0.025[1] yahoo art 10 0.4840 ± 0.023[5] 0.5013± 0.022[4] 0.5070± 0.020[3] 0.5131± 0.015[2] 0.5135± 0.020[1] eurlex sm 10 0.8594 ± 0.003[5] 0.8609± 0.004[1] 0.8606± 0.003[3] 0.8600± 0.004[4] 0.8609± 0.004[1] eurlex ed 10 0.7170 ± 0.012[5] 0.7176± 0.012[4] 0.7183± 0.013[2] 0.7183± 0.013[2] 0.7190± 0.013[1] Average Rank 5.88 3.88 3.63 4.60 3.80 2.63 1.50 5.2 Prediction performance Example-F1 results for our method and baseline approaches in respect of the different data sets are reported in Table 1. Other measure results are reported in the Supplementary Materials. From the results, we can see that: 1) BR is much inferior to other methods in terms of Example-F1. Our experiment provides empirical evidence that the label correlations exist in many real word data sets and because BR ignores the information about the correlations between the labels, BR achieves poor performance on most data sets. 2) CC improves the performance of BR, however, it underperforms ECC. This result verifies the answer to our first question stated in Section 1: the label order does affect the performance of CC; ECC, which averages over several CC predictions with random order, improves the performance of CC. 3) CC-DP and CC-Greedy outperforms CCA and MMOC. This studies verify that optimal CC achieve competitive results compared with stateof-the-art encoding-decoding approaches. 4) Our proposed CC-DP and CC-Greedy algorithms are successful on most data sets. This empirical result also verifies the answers to the last two questions stated in Section 1: the globally optimal CC exists and CC-DP can find the globally optimal CC which achieves the best prediction performance; the CC-Greedy algorithm achieves comparable prediction performance with CC-DP, while it requires lower time complexity than CC-DP. In the experiment, our proposed algorithms are much faster than CCA and MMOC in terms of both training and testing time, and achieve the same testing time with CC. Through the training time for our algorithms is slower than BR, CC and ECC. Our extensive empirical studies show that our algorithms achieve superior performance than those baselines. 6 Conclusion To improve the performance of multi-label classification, a plethora of models have been developed to capture label correlations. Amongst them, classifier chain is one of the most popular approaches due to its simplicity and good prediction performance. Instead of proposing a new learning model, we discuss three important questions in this work regarding the optimal classifier chain stated in Section 1. To answer these questions, we first propose a generalized CC model. We then provide a theoretical analysis of the generalization error for the proposed generalized model. Based on our results, we obtain the answer to the second question: the globally optimal CC exists only if the minimization of the upper bound is achieved over this CC. It is very expensive to search over q! different label orders to find the globally optimal CC. Thus, we propose the CC-DP algorithm to simplify the search algorithm, which requires O(q3nd) complexity. To speed up the CC-DP algorithm, we propose a CC-Greedy algorithm to find a locally optimal CC, where the time complexity of the CCGreedy algorithm is O(q2nd). Comprehensive experiments on eight real-world multi-label data sets from different domains verify our theoretical studies and the effectiveness of proposed algorithms. Acknowledgments This research was supported by the Australian Research Council Future Fellowship FT130100746. References [1] Robert E. Schapire and Yoram Singer. BoosTexter: A Boosting-based System for Text Categorization. Machine Learning, 39(2-3):135–168, 2000. 8 [2] Zafer Barutc¸uoglu and Robert E. Schapire and Olga G. Troyanskaya. Hierarchical multi-label prediction of gene function. Bioinformatics, 22(7):22–7, 2006. [3] Matthew R. Boutell and Jiebo Luo and Xipeng Shen and Christopher M. Brown. Learning Multi-Label Scene Classification. Pattern Recognition, 37(9):1757–1771, 2004. [4] Grigorios Tsoumakas and Ioannis Katakis and Ioannis P. Vlahavas. Mining Multi-label Data. In Data Mining and Knowledge Discovery Handbook, pages 667–685, 2010. Springer US. [5] Krzysztof Dembczynski and Weiwei Cheng and Eyke H¨ullermeier. Bayes Optimal Multilabel Classification via Probabilistic Classifier Chains. Proceedings of the 27th International Conference on Machine Learning, pages 279–286, Haifa, Israel, 2010. Omnipress. [6] Jesse Read and Bernhard Pfahringer and Geoffrey Holmes and Eibe Frank. Classifier Chains for Multilabel Classification. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases: Part II, pages 254–269, Berlin, Heidelberg, 2009. Springer-Verlag. [7] Yi Zhang and Jeff G. Schneider. Maximum Margin Output Coding. Proceedings of the 29th International Conference on Machine Learning, pages 1575–1582, New York, NY, 2012. Omnipress. [8] Yuhong Guo and Suicheng Gu. Multi-Label Classification Using Conditional Dependency Networks. Proceedings of the Twenty-Second International Joint Conference on Artificial Intelligence, pages 1300– 1305, Barcelona, Catalonia, Spain, 2011. AAAI Press. [9] Sheng-Jun Huang and Zhi-Hua Zhou. Multi-Label Learning by Exploiting Label Correlations Locally. Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence, Toronto, Ontario, Canada, 2012. AAAI Press. [10] Feng Kang and Rong Jin and Rahul Sukthankar. Correlated Label Propagation with Application to Multilabel Learning. 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 1719–1726, New York, NY, 2006. IEEE Computer Society. [11] Weiwei Liu and Ivor W. Tsang. Large Margin Metric Learning for Multi-Label Prediction. Proceedings of the Twenty-Ninth Conference on Artificial Intelligence, pages 2800–2806, Texas, USA, 2015. AAAI Press. [12] Mingkui Tan and Qinfeng Shi and Anton van den Hengel and Chunhua Shen and Junbin Gao and Fuyuan Hu and Zhen Zhang. Learning Graph Structure for Multi-Label Image Classification via Clique Generation. The IEEE Conference on Computer Vision and Pattern Recognition, 2015. [13] Daniel Hsu and Sham Kakade and John Langford and Tong Zhang. Multi-Label Prediction via Compressed Sensing. Advances in Neural Information Processing Systems, pages 772–780, 2009. Curran Associates, Inc. [14] Yi Zhang and Jeff G. Schneider. Multi-Label Output Codes using Canonical Correlation Analysis. Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 873– 882, Fort Lauderdale, USA, 2011. JMLR.org. [15] Farbound Tai and Hsuan-Tien Lin. Multilabel Classification with Principal Label Space Transformation. Neural Computation, 24(9):2508–2542, 2012. [16] Min-Ling Zhang and Kun Zhang. Multi-label learning by exploiting label dependency. Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 999–1008, QWashington, DC, USA, 2010. ACM. [17] John Shawe-Taylor and Peter L. Bartlett and Robert C. Williamson and Martin Anthony. Structural Risk Minimization Over Data-Dependent Hierarchies. IEEE Transactions on Information Theory, 44(5):1926– 1940, 1998. [18] Kristin P. Bennett and Nello Cristianini and John Shawe-Taylor and Donghui Wu. Enlarging the Margins in Perceptron Decision Trees. Machine Learning, 41(3):295–313, 2000. [19] Michael J. Kearns and Robert E. Schapire. Efficient Distribution-free Learning of Probabilistic Concepts. Proceedings of the 31st Symposium on the Foundations of Computer Science, pages 382–391, Los Alamitos, CA, 1990. IEEE Computer Society Press. [20] Peter L. Bartlett and John Shawe-Taylor. Generalization Performance of Support Vector Machines and Other Pattern Classifiers. Advances in Kernel Methods - Support Vector Learning, pages 43–54, Cambridge, MA, USA, 1998. MIT Press. [21] Rong-En Fan and Kai-Wei Chang and Cho-Jui Hsieh and Xiang-Rui Wang and Chih-Jen Lin. LIBLINEAR: A Library for Large Linear Classification. Journal of Machine Learning Research, 9:1871–1874, 2008. [22] Qi Mao and Ivor Wai-Hung Tsang and Shenghua Gao. Objective-Guided Image Annotation. IEEE Transactions on Image Processing, 22(4):1585–1597, 2013. 9 | 2015 | 212 |
5,717 | Consistent Multilabel Classification Oluwasanmi Koyejo⇤ Department of Psychology, Stanford University sanmi@stanford.edu Nagarajan Natarajan⇤ Department of Computer Science, University of Texas at Austin naga86@cs.utexas.edu Pradeep Ravikumar Department of Computer Science, University of Texas at Austin pradeepr@cs.utexas.edu Inderjit S. Dhillon Department of Computer Science, University of Texas at Austin inderjit@cs.utexas.edu Abstract Multilabel classification is rapidly developing as an important aspect of modern predictive modeling, motivating study of its theoretical aspects. To this end, we propose a framework for constructing and analyzing multilabel classification metrics which reveals novel results on a parametric form for population optimal classifiers, and additional insight into the role of label correlations. In particular, we show that for multilabel metrics constructed as instance-, micro- and macroaverages, the population optimal classifier can be decomposed into binary classifiers based on the marginal instance-conditional distribution of each label, with a weak association between labels via the threshold. Thus, our analysis extends the state of the art from a few known multilabel classification metrics such as Hamming loss, to a general framework applicable to many of the classification metrics in common use. Based on the population-optimal classifier, we propose a computationally efficient and general-purpose plug-in classification algorithm, and prove its consistency with respect to the metric of interest. Empirical results on synthetic and benchmark datasets are supportive of our theoretical findings. 1 Introduction Modern classification problems often involve the prediction of multiple labels simultaneously associated with a single instance e.g. image tagging by predicting multiple objects in an image. The growing importance of multilabel classification has motivated the development of several scalable algorithms [8, 12, 18] and has led to the recent surge in theoretical analysis [1, 3, 7, 16] which helps guide and understand practical advances. While recent results have advanced our knowledge of optimal population classifiers and consistent learning algorithms for particular metrics such as the Hamming loss and multilabel F-measure [3, 4, 5], a general understanding of learning with respect to multilabel classification metrics has remained an open problem. This is in contrast to the more traditional settings of binary and multiclass classification where several recently established results have led to a rich understanding of optimal and consistent classification [9, 10, 11]. This manuscript constitutes a step towards establishing results for multilabel classification at the level of generality currently enjoyed only in these traditional settings. Towards a generalized analysis, we propose a framework for multilabel sample performance metrics and their corresponding population extensions. A classification metric is constructed to measure the utility1 of a classifier, as defined by the practitioner or end-user. The utility may be measured using ⇤Equal contribution. 1Equivalently, we may define the loss as the negative utility. 1 the sample metric given a finite dataset, and further generalized to the population metric with respect to a given data distribution (i.e. with respect to infinite samples). Two distinct approaches have been proposed for studying the population performance of classifier in the classical settings of binary and multiclass classification, described by Ye et al. [17] as decision theoretic analysis (DTA) and empirical utility maximization (EUM). DTA population utilities measure the expected performance of a classifier on a fixed-size test set, while EUM population utilities are directly defined as a function of the population confusion matrix. However, state-of-the-art analysis of multilabel classification has so-far lacked such a distinction. The proposed framework defines both EUM and DTA multilabel population utility as generalizations of the aforementioned classic definitions. Using this framework, we observe that existing work on multilabel classification [1, 3, 7, 16] have exclusively focused on optimizing the DTA utility of (specific) multilabel metrics. Averaging of binary classification metrics remains one of the most widely used approaches for defining multilabel metrics. Given a binary label representation, such metrics are constructed via averaging with respect to labels (instance-averaging), with respect to examples separately for each label (macro-averaging), or with respect to both labels and examples (micro-averaging). We consider a large sub-family of such metrics where the underlying binary metric can be constructed as a fraction of linear combinations of true positives, false positives, false negatives and true negatives [9]. Examples in this family include the ubiquitous Hamming loss, the averaged precision, the multilabel averaged F-measure, and the averaged Jaccard measure, among others. Our key result is that a Bayes optimal multilabel classifier for such metrics can be explicitly characterized in a simple form – the optimal classifier thresholds the label-wise conditional probability marginals, and the label dependence in the underlying distribution is relevant to the optimal classifier only through the threshold parameter. Further, the threshold is shared by all the labels when the metric is instance-averaged or micro-averaged. This result is surprising and, to our knowledge, a first result to be shown at this level of generality for multilabel classification. The result also sheds additional insight into the role of label correlations in multilabel classification – answering prior conjectures by Dembczy´nski et al. [3] and others. We provide a plug-in estimation based algorithm that is efficient as well as theoretically consistent, i.e. the true utility of the empirical estimator approaches the optimal (EUM) utility of the Bayes classifier (Section 4). We also present experimental evaluation on synthetic and real-world benchmark multilabel datasets comparing different estimation algorithms (Section 5) for representative multilabel performance metrics selected from the studied family. The results observed in practice are supportive of what the theory predicts. 1.1 Related Work We briefly highlight closely related theoretical results in the multilabel learning literature. Gao and Zhou [7] consider the consistency of multilabel learning with respect to DTA utility, with a focus on two specific losses – Hamming and rank loss (the corresponding measures are defined in Section 2). Surrogate losses are devised which result in consistent learning with respect to these metrics. In contrast, we propose a plug-in estimation based algorithm which directly estimates the Bayes optimal, without going through surrogate losses. Dembczynski et al. [2] analyze the DTA population optimal classifier for the multilabel rank loss, showing that the Bayes optimal is independent of label correlations in the unweighted case, and construct certain weighted univariate losses which are DTA consistent surrogates in the more general weighted case. Perhaps the work most closely related to ours is by Dembczynski et al. [4] who propose a novel DTA consistent plug-in rule estimation based algorithm for multilabel F-measure. Cheng et al. [1] consider optimizing popular losses in multilabel learning such as Hamming, rank and subset 0/1 loss (which is the multilabel analog of the classical 0-1 loss). They propose a probabilistic version of classifier chains (first introduced by Read et al. [13]) for estimating the Bayes optimal with respect to subset 0/1 loss, though without rigorous theoretical justification. 2 A Framework for Multilabel Classification Metrics Consider multilabel classification with M labels, where each instance is denoted by x 2 X. For convenience, we will focus on the common binary encoding, where the labels are represented by a vector y 2 Y = {0, 1}M, so ym = 1 iff the mth label is associated with the instance, and 2 ym = 0 otherwise. The goal is to learn a multilabel classifier f : X 7! Y that optimizes a certain performance metric with respect to P – a fixed data generating distribution over the domain X ⇥Y, using a training set of instance-label pairs (x(n), y(n)), n = 1, 2, . . . , N drawn (typically assumed iid.) from P. Let X and Y denote the random variables for instances and labels respectively, and let denote the performance (utility) metric of interest. Most classification metrics can be represented as functions of the entries of the confusion matrix. In case of binary classification, the confusion matrix is specified by four numbers, i.e., true positives, true negatives, false positives and false negatives. Similarly, we construct the following primitives for multilabel classification: c TP(f)m,n = Jfm(x(n)) = 1, y(n) m = 1K c FP(f)m,n = Jfm(x(n)) = 1, y(n) m = 0K c TN(f)m,n = Jfm(x(n)) = 0, y(n) m = 0K c FN(f)m,n = Jfm(x(n)) = 0, y(n) m = 1K (1) where JZK denotes the indicator function that is 1 if the predicate Z is true or 0 otherwise. It is clear that most multilabel classification metrics considered in the literature can be written as a function of the MN primitives defined in (1). In the following, we consider a construction which is of sufficient generality to capture all multilabel metrics in common use. Let Ak(f) : {c TP(f)m,n, c FP(f)m,n, c TN(f)m,n, c FN(f)m,n}M,N m=1,n=1 7! R, k = 1, 2, . . . , K represent a set of K functions. Consider sample multilabel metrics constructed as functions: : {Ak(f)}K k=1 7! [0, 1). We note that the metric need not decompose over individual instances. Equipped with this definition of a sample performance metric , consider the population utility of a multilabel classifier f defined as: U(f; , P) = ({E [ Ak(f) ]}K k=1), (2) where the expectation is over iid draws from the joint distribution P. Note that this can be seen as a multilabel generalization of the so-called Empirical Utility Maximization (EUM) style classifiers studied in binary [9, 10] and multiclass [11] settings. Our goal is to learn a multilabel classifier that maximizes U(f; , P) for general performance metrics . Define the (Bayes) optimal multilabel classifier as: f ⇤ = argmax f:X ! {0,1}M U(f; , P). (3) Let U(f ⇤ ; , P) = U⇤ . We say that ˆf is a consistent estimator of f ⇤ if U(ˆf; , P) p! U⇤ . Examples. The averaged accuracy (1 - Hamming loss) used in multilabel classification corresponds to simply choosing: A1(f) = 1 MN PM m=1 PN n=1 c FP(f)m,n + c FN(f)m,n and Ham(f) = 1 −A1(f). The measure corresponding to rank loss2 can be obtained by choosing Ak(f) = 1 M 2 PM m1=1 PM m2=1 ⇣ c FP(f)m1,k ⌘⇣ c FN(f)m2,k ⌘ , for k = 1, 2, . . . , N and Rank = 1 − 1 N PN k=1 Ak(f). Note that the choice of {Ak}, and therefore , is not unique. Remark 1. Existing results on multilabel classification have focused on decision-theoretic analysis (DTA) style classifiers, where the utility is defined as: UDTA(f; , P) = E ⇥ ({Ak(f)}K k=1) ⇤ , (4) and the expectation is over iid samples from P. Furthermore, there are no theoretical results for consistency with respect to general performance metrics in this setting (See Appendix B.2). For the remainder of this manuscript, we refer to U(f; P) as the utility defined in (2). We will also drop the argument f (e.g. write c TP(f) as c TP) when it is clear from the context. 2.1 A Framework for Averaged Binary Multilabel Classification Metrics The most popular class of multilabel performance metrics consists of averaged binary performance metrics, that correspond to particular settings of {Ak(f)} using certain averages as described in the following. For the remainder of this subsection, the metric : [0, 1]4 ! [0, 1) will refer to a binary classification metric as is typically applied to a binary confusion matrix. 2A subtle but important aspect of the definition of rank loss in the existing literature, including [2] and [7], is that the Bayes optimal is allowed to be a real-valued function and may not correspond to a label decision. 3 Micro-averaging: Micro-averaged multilabel performance metrics micro are defined by averaging over both labels and examples. Let: c TP(f) = 1 MN N X n=1 M X m=1 c TP(f)m,n, c FP(f) = 1 MN N X n=1 M X m=1 c FP(f)m,n, (5) c TN(f) and c FN(f) are defined similarly, then the micro-averaged multilabel performance metrics are given by: micro({Ak(f)}K k=1) := (c TP, c FP, c TN, c FN). (6) Thus, for micro-averaging, one applies a binary performance metric to the confusion matrix defined by the averaged quantities described in (5). Macro-averaging: The metric macro measures average classification performance across labels. Define the averaged measures: c TPm(f) = 1 N N X n=1 c TP(f)m,n, c FPm(f) = 1 N N X n=1 c FP(f)m,n, c TNm(f) and c FNm(f) are defined similarly. The macro-averaged performance metric is given by: macro({Ak(f)}K k=1) := 1 M M X m=1 (c TPm, c FPm, c TNm, c FNm). (7) Instance-averaging: The metric instance measures the average classification performance across examples. Define the averaged measures: c TPn(f) = 1 M M X m=1 c TP(f)m,n, c FPn(f) = 1 M M X m=1 c FP(f)m,n, c TNn(f) and c FNn(f) are defined similarly. The instance-averaged performance metric is given by: instance({Ak(f)}K k=1) := 1 N N X n=1 (c TPn, c FPn, c TNn, c FNn). (8) 3 Characterizing the Bayes Optimal Classifier for Multilabel Metrics We now characterize the optimal multilabel classifier for the large family of metrics outlined in Section 2.1 ( micro, macro and instance) with respect to the EUM utility. We begin by observing that while micro-averaging and instance-averaging seem quite different when viewed as sample averages, they are in fact equivalent at the population level. Thus, we need only focus on micro to characterize instance as well. Proposition 1. For a given binary classification metric , consider the averaged multilabel metrics micro defined in (6) and instance defined in (8). For any f, U(f; micro, P) ⌘U(f; instance, P). In particular, f ⇤ ⇤ micro ⌘f ⇤ ⇤ instance. We further restrict our study to metrics selected from the linear-fractional metric family, recently studied in the context of binary classification [9]. Any in this family can be written as: (c TP, c FP, c FN, c TN) = a0 + a11c TP + a10c FP + a01 c FN + a00 c TN b0 + b11c TP + b10c FP + b01 c FN + b00 c TN , where a0, b0, aij, bij, i, j 2 {0, 1} are fixed, and c TP, c FP, c FN, c TN are defined as in Section 2.1. Many popular multilabel metrics can be derived using linear-fractional . Some examples include3: Fβ : Fβ = (1 + β2)c TP (1 + β2)c TP + β2 c FN + c FP Hamming : Ham = c TP + c TN Jaccard : Jacc = c TP c TP + c FP + c FN Precision : Prec = c TP c TP + c FP (9) 3Note that Hamming is typically defined as the loss, given by 1 − Ham. 4 Define the population quantities: ⇡= PM m=1 P(Ym = 1) and γ(f) = PM m=1 P(fm(x) = 1). Let TP(f) = E h c TP(f) i , where the expectation is over iid draws from P. From (5), it follows that, FP(f) := E h c FP(f) i = γ(f) −TP(f), TN(f) = 1 −⇡−γ(f) + TP(f) and FN(f) = γ(f) −TP(f). Now, the population utility (2) corresponding to micro can be written succinctly as: U(f; micro, P) = (TP(f), FP(f), FN(f), TN(f)) = c0 + c1TP(f) + c2γ(f) d0 + d1TP(f) + d2γ(f) (10) with the constants: c0 = a01⇡+ a00 −a00⇡+ a0, c1 = a11 −a10 −a01 + a00, c2 = a10 −a00 and d0 = b01⇡+ b00 −b00⇡+ b0, d1 = b11 −b10 −b01 + b00, d2 = b10 −b00. We assume that the joint P has a density µ that satisfies dP = µdx, and define ⌘m(x) = P(Ym = 1|X = x). Our first main result characterizes the Bayes optimal multilabel classifier f ⇤ micro. Theorem 2. Given the constants {c1, c2, c0} and {d1, d2, d0}, define: δ⇤= d2 U⇤ micro −c2 c1 −d1 U⇤ micro . (11) The optimal Bayes classifier f ⇤:= f ⇤ micro defined in (3) is given by: 1. When c1 > d1 U⇤ micro, f ⇤takes the form f ⇤ m(x) = J⌘m(x) > δ⇤K, for m 2 [M]. 2. When c1 < d1 U⇤ micro, f ⇤takes the form f ⇤ m(x) = J⌘m(x) < δ⇤K, for m 2 [M]. The proof is provided in Appendix A.2, and applies equivalently to instance-averaging. Theorem 2 recovers existing results in binary [9] settings (See Appendix B.1 for details), and is sufficiently general to capture many of the multilabel metrics used in practice. Our proof is closely related to the binary classification case analyzed in Theorem 2 of [9], but differs in the additional averaging across labels. A key observation from Theorem 2 is that the optimal multilabel classifier can be obtained by thresholding the marginal instance-conditional probability for each label P(Ym = 1|x) and, importantly, that the optimal classifiers for all the labels share the same threshold δ⇤. Thus, the effect of the joint distribution is only in the threshold parameter. We emphasize that while the presented results characterize the optimal population classifier, incorporating label correlations into the prediction algorithm may have other benefits with finite samples, such as statistical efficiency when there are known structural similarities between the marginal distributions [3]. Further analysis is left for future work. The Bayes optimal for the macro-averaged population metric is straightforward to establish. We observe that the threshold is not shared in this case. Proposition 3. For a given linear-fractional metric , consider the macro-averaged multilabel metric macro defined in (7). Let c1 > d1 U⇤ macro and f ⇤= f ⇤ ⇤macro(x). We have, for m = 1, 2, . . . , M: f ⇤ m = J⌘m(x) > δ⇤ mK, where δ⇤ m 2 [0, 1] is a constant that depends on the metric and the label-wise instance-conditional marginals of P. Analogous results hold for c1 < d1 U⇤ macro. Remark 2. It is clear that micro-, macro- and instance- averaging are equivalent at the population level when the metric is linear. This is a straightforward consequence of the observation that the corresponding sample utilities are the same. More generally, micro-, macro- and instanceaveraging are equivalent whenever the optimal threshold is a constant independent of P, such as for linear metrics, where d1 = d2 = 0 so δ⇤= −c2 c1 (cf. Corollary 4 of Koyejo et al. [9]). Thus, our analysis recovers known results for Hamming loss [3, 7]. 4 Consistent Plug-in Estimation Algorithm Importantly, the Bayes optimal characterization points to a simple plug-in estimation algorithm that enjoys consistency as follows. First, one obtains an estimate ˆ⌘m(x) of the marginal instanceconditional probability ⌘m(x) = P(Ym = 1|x) for each label m (see Reid and Williamson [14]) 5 using a training sample. Then, the given metric micro(f) is maximized on a validation sample. For the remainder of this manuscript, we assume wlog. that c1 > d1 U⇤. Note that in order to maximize over {fδ : fm(x) = J⌘m(x) > δK 8m = 1, 2, . . . , M, δ 2 (0, 1)}, it suffices to optimize: ˆδ = argmax δ2(0,1) micro(ˆfδ), (12) where micro is the micro-averaged sample metric defined in (6) (similarly for instance). Though the threshold search is over a continuous space δ 2 (0, 1) the number of distinct micro(ˆfδ) values given a training sample of size N is at most NM. Thus (12) can be solved efficiently on a finite sample. Algorithm 1: Plugin-Estimator for micro and instance Input: Training examples S = {x(n), y(n)}N n=1 and metric micro (or instance). for m = 1, 2, . . . , M do 1. Select the training data for label m: Sm = {x(n), y(n) m }N n=1. 2. Split the training data Sm into two sets Sm1 and Sm2. 3. Estimate ˆ⌘m(x) using Sm1, define ˆfm(x) = Jˆ⌘m(x) > δK. end for Obtain ˆδ by solving (12) on S2 = [M m=1Sm2. Return: ˆfˆδ. Consistency of the proposed algorithm. The following theorem shows that the plug-in procedure of Algorithm 1 results in a consistent classifier. Theorem 4. Let micro be a linear-fractional metric. If the estimates ˆ⌘m(x) satisfy ˆ⌘m p! ⌘m, 8m, then the output multilabel classifier ˆfˆδ of Algorithm 1 is consistent. The proof is provided in Appendix A.4. From Proposition 1, it follows that consistency holds for instance as well. Additionally, in light of Proposition 3, we may apply the learning algorithms proposed by [9] for binary classification independently for each label to obtain a consistent estimator for macro. 5 Experiments We present two sets of results. The first is an experimental validation on synthetic data with known ground truth probabilities. The results serve to verify our main result (Theorem 2) characterizing the Bayes optimal for averaged multilabel metrics. The second is an experimental evaluation of the plugin estimator algorithms for micro-, instance-, and macro-averaged multilabel metrics on benchmark datasets. 5.1 Synthetic data: Verification of Bayes optimal We consider the micro-averaged F1 metric in (9) for multilabel classification with 4 labels. We sample a set of five 2-dimensional vectors x = {x(1), x(2), . . . , x(5)} from the standard Gaussian. The conditional probability ⌘m for label m is modeled using a sigmoid function: ⌘m(x) = P(Ym = 1|x) = 1 1+exp −wT mx, using a vector wm sampled from the standard Gaussian. The Bayes optimal f ⇤(x) 2 {0, 1}4 that maximizes the micro-averaged F1 population utility is then obtained by exhaustive search over all possible label vectors for each instance. In Figure 1 (a)-(d), we plot the conditional probabilities (wrt. the sample index) for each label, the corresponding f ⇤ m for each x, and the optimal threshold δ⇤using (11). We observe that the optimal multilabel classifier indeed thresholds P(Ym|x) for each label m, and furthermore, that the threshold is same for all the labels, as stated in Theorem 2. 6 (a) (b) (c) (d) Figure 1: Bayes optimal classifier for multilabel F1 measure on synthetic data with 4 labels, and distribution supported on 5 instances. Plots from left to right show the Bayes optimal classifier prediction for instances, and for labels 1 through 4. Note that the optimal δ⇤at which the label-wise marginal ⌘m(x) is thresholded is shared, conforming to Theorem 2 (larger plots are included in Appendix C). 5.2 Benchmark data: Evaluation of plug-in estimators We now evaluate the proposed plugin-estimation (Algorithm 1) that is consistent for micro- and instance-averaged multilabel metrics. We focus on two metrics, F1 and Jaccard, listed in (9). We compare Algorithm 1, designed to optimize micro-averaged (or instance-averaged) multilabel metrics to two related plugin-estimation methods: (i) a separate threshold δ⇤ m tuned for each label m individually – this optimizes the utility corresponding to the macro-averaged metric, but is not consistent for micro-averaged or instance-averaged metrics, and is the most common approach in practice. We refer to this as Macro-Thres, (ii) a constant threshold 1/2 for all the labels – this is known to be optimal for averaged accuracy (equiv. Hamming loss), but not for non-decomposable F1 or Jaccard metrics. We refer to this as Binary Relevance (BR) [15]. We use four benchmark multilabel datasets4 in our experiments: (i) SCENE, an image dataset consisting of 6 labels, with 1211 training and 1196 test instances, (ii) BIRDS, an audio dataset consisting of 19 labels, with 323 training and 322 test instances, (iii) EMOTIONS, a music dataset consisting of 6 labels, with 393 training and 202 test instances, and (iv) CAL500, a music dataset consisting of 174 labels, with 400 training and 100 test instances5. We perform logistic regression (with L2 regularization) on a separate subsample to obtain estimates of ˆ⌘m(x) of P(Ym = 1|x), for each label m (as described in Section 4). All the methods we evaluate rely on obtaining a good estimator for the conditional probability. So we exclude labels that are associated with very few instances – in particular, we train and evaluate using labels associated with at least 20 instances, in each dataset, for all the methods. In Table 1, we report the micro-averaged F1 and Jaccard metrics on the test set for Algorithm 1, Macro-Thres and Binary Relevance. We observe that estimating a fixed threshold for all the labels (Algorithm 1) consistently performs better than estimating thresholds for each label (Macro-Thres) and than using threshold 1/2 for all labels (BR); this conforms to our main result in Theorem 2 and the consistency analysis of Algorithm 1 in Theorem 4. A similar trend is observed for the instanceaveraged metrics computed on the test set, shown in Table 2. Proposition 1 shows that maximizing the population utilities of micro-averaged and instance-averaged metrics are equivalent; the result holds in practice as presented in Table 2. Finally, we report macro-averaged metrics computed on test set in Table 3. We observe that Macro-Thres is competitive in 3 out of 4 datasets; this conforms to Proposition 3 which shows that in the case of macro-averaged metrics, it is optimal to tune a threshold specific to each label independently. Beyond consistency, we note that by using more samples, joint threshold estimation enjoys additional statistical efficiency, while separate threshold estimation enjoys greater flexibility. This trade-off may explain why Algorithm 1 achieves the best performance in three out of four datasets in Table 3, though it is not consistent for macro-averaged metrics. 4The datasets were obtained from http://mulan.sourceforge.net/datasets-mlc.html. 5Original CAL500 dataset does not provide splits; we split the data randomly into train and test sets. 7 DATASET BR Algorithm 1 Macro-Thres BR Algorithm 1 Macro-Thres F1 Jaccard SCENE 0.6559 0.6847 ± 0.0072 0.6631 ± 0.0125 0.4878 0.5151 ± 0.0084 0.5010 ± 0.0122 BIRDS 0.4040 0.4088 ± 0.0130 0.2871 ± 0.0734 0.2495 0.2648 ± 0.0095 0.1942 ± 0.0401 EMOTIONS 0.5815 0.6554 ± 0.0069 0.6419 ± 0.0174 0.3982 0.4908 ± 0.0074 0.4790 ± 0.0077 CAL500 0.3647 0.4891 ± 0.0035 0.4160 ± 0.0078 0.2229 0.3225 ± 0.0024 0.2608 ± 0.0056 Table 1: Comparison of plugin-estimator methods on multilabel F1 and Jaccard metrics. Reported values correspond to micro-averaged metric (F1 and Jaccard) computed on test data (with standard deviation, over 10 random validation sets for tuning thresholds). Algorithm 1 is consistent for microaveraged metrics, and performs the best consistently across datasets. DATASET BR Algorithm 1 Macro-Thres BR Algorithm 1 Macro-Thres F1 Jaccard SCENE 0.5695 0.6422 ± 0.0206 0.6303 ± 0.0167 0.5466 0.5976 ± 0.0177 0.5902 ± 0.0176 BIRDS 0.1209 0.1390 ± 0.0110 0.1390 ± 0.0259 0.1058 0.1239 ± 0.0077 0.1195 ± 0.0096 EMOTIONS 0.4787 0.6241 ± 0.0204 0.6156 ± 0.0170 0.4078 0.5340 ± 0.0072 0.5173 ± 0.0086 CAL500 0.3632 0.4855 ± 0.0035 0.4135 ± 0.0079 0.2268 0.3252 ± 0.0024 0.2623 ± 0.0055 Table 2: Comparison of plugin-estimator methods on multilabel F1 and Jaccard metrics. Reported values correspond to instance-averaged metric (F1 and Jaccard) computed on test data (with standard deviation, over 10 random validation sets for tuning thresholds). Algorithm 1 is consistent for instance-averaged metrics, and performs the best consistently across datasets. DATASET BR Algorithm 1 Macro-Thres BR Algorithm 1 Macro-Thres F1 Jaccard SCENE 0.6601 0.6941 ± 0.0205 0.6737 ± 0.0137 0.5046 0.5373 ± 0.0177 0.5260 ± 0.0176 BIRDS 0.3366 0.3448 ± 0.0110 0.2971 ± 0.0267 0.2178 0.2341 ± 0.0077 0.2051 ± 0.0215 EMOTIONS 0.5440 0.6450 ± 0.0204 0.6440 ± 0.0164 0.3982 0.4912 ± 0.0072 0.4900 ± 0.0133 CAL500 0.1293 0.2687 ± 0.0035 0.3226 ± 0.0068 0.0880 0.1834 ± 0.0024 0.2146 ± 0.0036 Table 3: Comparison of plugin-estimator methods on multilabel F1 and Jaccard metrics. Reported values correspond to the macro-averaged metric computed on test data (with standard deviation, over 10 random validation sets for tuning thresholds). Macro-Thres is consistent for macro-averaged metrics, and is competitive in three out of four datasets. Though not consistent for macro-averaged metrics, Algorithm 1 achieves the best performance in three out of four datasets. 6 Conclusions and Future Work We have proposed a framework for the construction and analysis of multilabel classification metrics and corresponding population optimal classifiers. Our main result is that for a large family of averaged performance metrics, the EUM optimal multilabel classifier can be explicitly characterized by thresholding of label-wise marginal instance-conditional probabilities, with weak label dependence via a shared threshold. We have also proposed efficient and consistent estimators for maximizing such multilabel performance metrics in practice. Our results are a step forward in the direction of extending the state-of-the-art understanding of learning with respect to general metrics in binary and multiclass settings. Our work opens up many interesting research directions, including the potential for further generalization of our results beyond averaged metrics, and generalized results for DTA population optimal classification, which is currently only well-understood for the F-measure. Acknowledgments: We acknowledge the support of NSF via CCF-1117055, CCF-1320746 and IIS1320894, and NIH via R01 GM117594-01 as part of the Joint DMS/NIGMS Initiative to Support Research at the Interface of the Biological and Mathematical Sciences. 8 References [1] Weiwei Cheng, Eyke H¨ullermeier, and Krzysztof J Dembczynski. Bayes optimal multilabel classification via probabilistic classifier chains. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 279–286, 2010. [2] Krzysztof Dembczynski, Wojciech Kotlowski, and Eyke H¨ullermeier. Consistent multilabel ranking through univariate losses. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 1319–1326, 2012. [3] Krzysztof Dembczy´nski, Willem Waegeman, Weiwei Cheng, and Eyke H¨ullermeier. On label dependence and loss minimization in multi-label classification. Machine Learning, 88(1-2): 5–45, 2012. [4] Krzysztof Dembczynski, Arkadiusz Jachnik, Wojciech Kotlowski, Willem Waegeman, and Eyke H¨ullermeier. Optimizing the F-measure in multi-label classification: Plug-in rule approach versus structured loss minimization. In Proceedings of the 30th International Conference on Machine Learning, pages 1130–1138, 2013. [5] Krzysztof J Dembczynski, Willem Waegeman, Weiwei Cheng, and Eyke H¨ullermeier. An exact algorithm for F-measure maximization. In Advances in Neural Information Processing Systems, pages 1404–1412, 2011. [6] Luc Devroye. A probabilistic theory of pattern recognition, volume 31. Springer, 1996. [7] Wei Gao and Zhi-Hua Zhou. On the consistency of multi-label learning. Artificial Intelligence, 199:22–44, 2013. [8] Ashish Kapoor, Raajay Viswanathan, and Prateek Jain. Multilabel classification using bayesian compressed sensing. In Advances in Neural Information Processing Systems, pages 2645– 2653, 2012. [9] Oluwasanmi O Koyejo, Nagarajan Natarajan, Pradeep K Ravikumar, and Inderjit S Dhillon. Consistent binary classification with generalized performance metrics. In Advances in Neural Information Processing Systems, pages 2744–2752, 2014. [10] Harikrishna Narasimhan, Rohit Vaish, and Shivani Agarwal. On the statistical consistency of plug-in classifiers for non-decomposable performance measures. In Advances in Neural Information Processing Systems, pages 1493–1501, 2014. [11] Harikrishna Narasimhan, Harish Ramaswamy, Aadirupa Saha, and Shivani Agarwal. Consistent multiclass algorithms for complex performance measures. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 2398–2407, 2015. [12] James Petterson and Tib´erio S Caetano. Submodular multi-label learning. In Advances in Neural Information Processing Systems, pages 1512–1520, 2011. [13] Jesse Read, Bernhard Pfahringer, Geoff Holmes, and Eibe Frank. Classifier chains for multilabel classification. Machine learning, 85(3):333–359, 2011. [14] Mark D Reid and Robert C Williamson. Composite binary losses. The Journal of Machine Learning Research, 9999:2387–2422, 2010. [15] Grigorios Tsoumakas, Ioannis Katakis, and Ioannis Vlahavas. Mining multi-label data. In Data mining and knowledge discovery handbook, pages 667–685. Springer, 2010. [16] Willem Waegeman, Krzysztof Dembczynski, Arkadiusz Jachnik, Weiwei Cheng, and Eyke H¨ullermeier. On the bayes-optimality of f-measure maximizers. Journal of Machine Learning Research, 15:3333–3388, 2014. [17] Nan Ye, Kian Ming A Chai, Wee Sun Lee, and Hai Leong Chieu. Optimizing F-measures: a tale of two approaches. In Proceedings of the International Conference on Machine Learning, 2012. [18] Hsiang-Fu Yu, Prateek Jain, Purushottam Kar, and Inderjit Dhillon. Large-scale multi-label learning with missing labels. In Proceedings of the 31st International Conference on Machine Learning, pages 593–601, 2014. 9 | 2015 | 213 |
5,718 | A Normative Theory of Adaptive Dimensionality Reduction in Neural Networks Cengiz Pehlevan Simons Center for Data Analysis Simons Foundation New York, NY 10010 cpehlevan@simonsfoundation.org Dmitri B. Chklovskii Simons Center for Data Analysis Simons Foundation New York, NY 10010 dchklovskii@simonsfoundation.org Abstract To make sense of the world our brains must analyze high-dimensional datasets streamed by our sensory organs. Because such analysis begins with dimensionality reduction, modeling early sensory processing requires biologically plausible online dimensionality reduction algorithms. Recently, we derived such an algorithm, termed similarity matching, from a Multidimensional Scaling (MDS) objective function. However, in the existing algorithm, the number of output dimensions is set a priori by the number of output neurons and cannot be changed. Because the number of informative dimensions in sensory inputs is variable there is a need for adaptive dimensionality reduction. Here, we derive biologically plausible dimensionality reduction algorithms which adapt the number of output dimensions to the eigenspectrum of the input covariance matrix. We formulate three objective functions which, in the offline setting, are optimized by the projections of the input dataset onto its principal subspace scaled by the eigenvalues of the output covariance matrix. In turn, the output eigenvalues are computed as i) soft-thresholded, ii) hard-thresholded, iii) equalized thresholded eigenvalues of the input covariance matrix. In the online setting, we derive the three corresponding adaptive algorithms and map them onto the dynamics of neuronal activity in networks with biologically plausible local learning rules. Remarkably, in the last two networks, neurons are divided into two classes which we identify with principal neurons and interneurons in biological circuits. 1 Introduction Our brains analyze high-dimensional datasets streamed by our sensory organs with efficiency and speed rivaling modern computers. At the early stage of such analysis, the dimensionality of sensory inputs is drastically reduced as evidenced by anatomical measurements. Human retina, for example, conveys signals from ≈125 million photoreceptors to the rest of the brain via ≈1 million ganglion cells [1] suggesting a hundred-fold dimensionality reduction. Therefore, biologically plausible dimensionality reduction algorithms may offer a model of early sensory processing. In a seminal work [2] Oja proposed that a single neuron may compute the first principal component of activity in upstream neurons. At each time point, Oja’s neuron projects a vector composed of firing rates of upstream neurons onto the vector of synaptic weights by summing up currents generated by its synapses. In turn, synaptic weights are adjusted according to a Hebbian rule depending on the activities of only the postsynaptic and corresponding presynaptic neurons [2]. Following Oja’s work, many multineuron circuits were proposed to extract multiple principal components of the input, for a review see [3]. However, most multineuron algorithms did not meet the same level of rigor and biological plausibility as the single-neuron algorithm [2, 4] which can be derived using a normative approach, from a principled objective function [5], and contains only lo1 cal Hebbian learning rules. Algorithms derived from principled objective functions either did not posess local learning rules [6, 4, 7, 8] or had other biologically implausible features [9]. In other algorithms, local rules were chosen heuristically rather than derived from a principled objective function [10, 11, 12, 9, 3, 13, 14, 15, 16]. There is a notable exception to the above observation but it has other shortcomings. The twolayer circuit with reciprocal synapses [17, 18, 19] can be derived from the minimization of the representation error. However, the activity of principal neurons in the circuit is a dummy variable without its own dynamics. Therefore, such principal neurons do not integrate their input in time, contradicting existing experimental observations. Other normative approaches use an information theoretical objective to compare theoretical limits with experimentally measured information in single neurons or populations [20, 21, 22] or to calculate optimal synaptic weights in a postulated neural network [23, 22]. Recently, a novel approach to the problem has been proposed [24]. Starting with the Multidimensional Scaling (MDS) strain cost function [25, 26] we derived an algorithm which maps onto a neuronal circuit with local learning rules. However, [24] had major limitations, which are shared by vairous other multineuron algorithms: 1. The number of output dimensions was determined by the fixed number of output neurons precluding adaptation to the varying number of informative components. A better solution would be to let the network decide, depending on the input statistics, how many dimensions to represent [14, 15]. The dimensionality of neural activity in such a network would be usually less than the maximum set by the number of neurons. 2. Because output neurons were coupled by anti-Hebbian synapses which are most naturally implemented by inhibitory synapses, if these neurons were to have excitatory outputs, as suggested by cortical anatomy, they would violate Dale’s law (i.e. each neuron uses only one fast neurotransmitter). Here, following [10], by anti-Hebbian we mean synaptic weights that get more negative with correlated activity of pre- and postsynaptic neurons. 3. The output had a wide dynamic range which is difficult to implement using biological neurons with a limited range. A better solution [27, 13] is to equalize the output variance across neurons. In this paper, we advance the normative approach of [24] by proposing three new objective functions which allow us to overcome the above limitations. We optimize these objective functions by proceeding as follows. In Section 2, we formulate and solve three optimization problems of the form: Offline setting : Y∗= arg min Y L (X, Y) . (1) Here, the input to the network, X = [x1, . . . , xT ] is an n × T matrix with T centered input data samples in Rn as its columns and the output of the network, Y = [y1, . . . , yT ] is a k×T matrix with corresponding outputs in Rk as its columns. We assume T >> k and T >> n. Such optimization problems are posed in the so-called offline setting where outputs are computed after seeing all data. Whereas the optimization problems in the offline setting admit closed-form solution, such setting is ill-suited for modeling neural computation on the mechanistic level and must be replaced by the online setting. Indeed, neurons compute an output, yT , for each data sample presentation, xT , before the next data sample is presented and past outputs cannot be altered. In such online setting, optimization is performed at every time step, T, on the objective which is a function of all inputs and outputs up to time T. Moreover, an online algorithm (also known as streaming) is not capable of storing all previous inputs and outputs and must rely on a smaller number of state variables. In Section 3, we formulate three corresponding online optimization problems with respect to yT , while keeping all the previous outputs fixed: Online setting : yT ←arg min yT L (X, Y) . (2) Then we derive algorithms solving these problems online and map their steps onto the dynamics of neuronal activity and local learning rules for synaptic weights in three neural networks. We show that the solutions of the optimization problems and the corresponding online algorithms remove the limitations outlined above by performing the following computational tasks: 2 x1 xn . . . y1 yk anti-Hebbian synapses A D x2 Hebbian B E C F x1 xn . . . y1 yk x2 α α α α β input eig. x1 xn . . . x2 output eig. input eig. input eig. output eig. output eig. Principal Inter-neurons z1 zl y1 yk z1 zl Figure 1: Input-output functions of the three offline solutions and neural network implementations of the corresponding online algorithms. A-C. Inputoutput functions of covariance eigenvalues. A. Soft-thresholding. B. Hard-thresholding. C. Equalization after thresholding. D-F. Corresponding network architectures. 1. Soft-thresholding the eigenvalues of the input covariance matrix, Figure 1A: eigenvalues below the threshold are set to zero and the rest are shrunk by the threshold magnitude. Thus, the number of output dimensions is chosen adaptively. This algorithm maps onto a single-layer neural network with the same architecture as in [24], Figure 1D, but with modified learning rules. 2. Hard-thresholding of input eigenvalues, Figure 1B: eigenvalues below the threshold vanish as before, but eigenvalues above the threshold remain unchanged. The steps of such algorithm map onto the dynamics of neuronal activity in a network which, in addition to principal neurons, has a layer of interneurons reciprocally connected with principal neurons and each other, Figure 1E. 3. Equalization of non-zero eigenvalues, Figure 1C. The corresponding network’s architecture, Figure 1F, lacks reciprocal connections among interneurons. As before, the number of abovethreshold eigenvalues is chosen adaptively and cannot exceed the number of principal neurons. If the two are equal, this network whitens the output. In Section 4, we demonstrate that the online algorithms perform well on a synthetic dataset and, in Discussion, we compare our neural circuits with biological observations. 2 Dimensionality reduction in the offline setting In this Section, we introduce and solve, in the offline setting, three novel optimization problems whose solutions reduce the dimensionality of the input. We state our results in three Theorems which are proved in the Supplementary Material. 2.1 Soft-thresholding of covariance eigenvalues We consider the following optimization problem in the offline setting: min Y
X⊤X −Y⊤Y −αTIT
2 F , (3) where α ≥0 and IT is the T ×T identity matrix. To gain intuition behind this choice of the objective function let us expand the squared norm and keep only the Y-dependent terms: arg min Y
X⊤X −Y⊤Y −αTIT
2 F = arg min Y
X⊤X −Y⊤Y
2 F + 2αT Tr Y⊤Y , (4) where the first term matches the similarity of input and output[24] and the second term is a nuclear norm of Y⊤Y known to be a convex relaxation of the matrix rank used for low-rank matrix modeling [28]. Thus, objective function (3) enforces low-rank similarity matching. We show that the optimal output Y is a projection of the input data, X, onto its principal subspace. The subspace dimensionality is set by m, the number of eigenvalues of the data covariance matrix, C = 1 T XX⊤= 1 T PT t=1 xtx⊤ t , that are greater than or equal to the parameter α. 3 Theorem 1. Suppose an eigen-decomposition of X⊤X = VXΛXVX ⊤, where ΛX = diag λX 1 , . . . , λX T with λX 1 ≥. . . ≥λX T . Note that ΛX has at most n nonzero eigenvalues coinciding with those of TC. Then, Y∗= Uk STk(ΛX, αT)1/2 VX k ⊤, (5) are optima of (3), where STk(ΛX, αT) = diag ST λX 1 , αT , . . . , ST λX k , αT , ST is the softthresholding function, ST(a, b) = max(a−b, 0), VX k consists of the columns of VX corresponding to the top k eigenvalues, i.e. VX k = vX 1 , . . . , vX k and Uk is any k × k orthogonal matrix, i.e. Uk ∈O(k). The form (5) uniquely defines all optima of (3), except when k < m, λX k > αT and λX k = λX k+1. 2.2 Hard-thresholding of covariance eigenvalues Consider the following minimax problem in the offline setting: min Y max Z
X⊤X −Y⊤Y
2 F −
Y⊤Y −Z⊤Z −αTIT
2 F , (6) where α ≥0 and we introduced an internal variable Z, which is an l × T matrix Z = [z1, . . . , zT ] with zt ∈Rl. The intuition behind this objective function is again based on similarity matching but rank regularization is applied indirectly via the internal variable, Z. Theorem 2. Suppose an eigen-decomposition of X⊤X = VXΛXVX ⊤, where ΛX = diag λX 1 , . . . , λX T with λX 1 ≥. . . ≥λX T ≥0. Assume l ≥min(k, m). Then, Y∗= Uk HTk(ΛX, αT)1/2 VX k ⊤, Z∗= Ul STl,min(k,m)(ΛX, αT)1/2 VX l ⊤, (7) are optima of (6), where HTk(ΛX, αT) = diag HT λX 1 , αT , . . . , HT λX k , αT , HT(a, b) = aΘ(a −b) with Θ() being the step function: Θ(a −b) = 1 if a ≥b and Θ(a −b) = 0 if a < b, STl,min(k,m)(ΛX, αT) = diag ST λX 1 , αT , . . . , ST λX min(k,m), αT , 0, . . . , 0 | {z } l−min(k,m) ,VX p = vX 1 , . . . , vX p and Up ∈O(p). The form (7) uniquely defines all optima (6) except when either 1) α is an eigenvalue of C or 2) k < m and λX k = λX k+1. 2.3 Equalizing thresholded covariance eigenvalues Consider the following minimax problem in the offline setting: min Y max Z Tr −X⊤XY⊤Y + Y⊤YZ⊤Z + αTY⊤Y −βTZ⊤Z , (8) where α ≥0 and β > 0. This objective function follows from (6) after dropping the quartic Z term. Theorem 3. Suppose an eigen-decomposition of X⊤X is X⊤X = VXΛXVX ⊤, where ΛX = diag λX 1 , . . . , λX T with λX 1 ≥. . . ≥λX T ≥0. Assume l ≥min(k, m). Then, Y∗= Uk p βT Θk(ΛX, αT)1/2 VX k ⊤, Z∗= Ul Σl×T OΛY ∗VX ⊤, (9) are optima of (8), where Θk(ΛX, αT) = diag Θ λX 1 −αT , . . . , Θ λX k −αT , Σl×T is an l × T rectangular diagonal matrix with top min(k, m) diagonals are set to arbitrary nonnegative constants and the rest are zero, OΛY ∗is a block-diagonal orthogonal matrix that has two blocks: the top block is min(k, m) dimensional and the bottom block is T −min(k, m) dimensional, Vp = vX 1 , . . . , vX p , and Up ∈O(p). The form (9) uniquely defines all optima of (8) except when either 1) α is an eigenvalue of C or 2) k < m and λX k = λX k+1. Remark 1. If k = m, then Y is full-rank and 1 T YY⊤= βIk, implying that the output is whitened, equalizing variance across all channels. 3 Online dimensionality reduction using Hebbian/anti-Hebbian neural nets In this Section, we formulate online versions of the dimensionality reduction optimization problems presented in the previous Section, derive corresponding online algorithms and map them onto the dynamics of neural networks with biologically plausible local learning rules. The order of subsections corresponds to that in the previous Section. 4 3.1 Online soft-thresholding of eigenvalues Consider the following optimization problem in the online setting: yT ←arg min yT
X⊤X −Y⊤Y −αTIT
2 F . (10) By keeping only the terms that depend on yT we get the following objective for (2): L = −4x⊤ T T −1 X t=1 xty⊤ t ! yT + 2y⊤ T T −1 X t=1 yty⊤ t + αTIm ! yT −2∥xT ∥2∥yT ∥2 + ∥yT ∥4. (11) In the large-T limit, the last two terms can be dropped since the first two terms grow linearly with T and dominate. The remaining cost is a positive definite quadratic form in yT and the optimization problem is convex. At its minimum, the following equality holds: T −1 X t=1 yty⊤ t + αTIm ! yT = T −1 X t=1 ytx⊤ t ! xT . (12) While a closed-form analytical solution via matrix inversion exists for yT , we are interested in biologically plausible algorithms. Instead, we use a weighted Jacobi iteration where yT is updated according to: yT ←(1 −η) yT + η WY X T xT −WY Y T yT , (13) where η is the weight parameter, and WY X T and WY Y T are normalized input-output and outputoutput covariances, W Y X T,ik = T −1 P t=1 yt,ixt,k αT + T −1 P t=1 y2 t,i , W Y Y T,i,j̸=i = T −1 P t=1 yt,iyt,j αT + T −1 P t=1 y2 t,i , W Y Y T,ii = 0. (14) Iteration (13) can be implemented by the dynamics of neuronal activity in a single-layer network, Figure 1D. Then, WY X T and WY Y T represent the weights of feedforward (xt →yt) and lateral (yt →yt) synaptic connections, respectively. Remarkably, synaptic weights appear in the online solution despite their absence in the optimization problem formulation (3). Previously, nonnormalized covariances have been used as state variables in an online dictionary learning algorithm [29]. To formulate a fully online algorithm, we rewrite (14) in a recursive form. This requires introducing a scalar variable DY T,i representing cumulative activity of a neuron i up to time T −1, DY T,i = αT + T −1 P t=1 y2 t,i. Then, at each data sample presentation, T, after the output yT converges to a steady state, the following updates are performed: DY T +1,i ←DY T,i + α + y2 T,i, W Y X T +1,ij ←W Y X T,ij + yT,ixT,j − α + y2 T,i W Y X T,ij /DY T +1,i, W Y Y T +1,i,j̸=i ←W Y Y T,ij + yT,iyT,j − α + y2 T,i W Y Y T,ij /DY T +1,i. (15) Hence, we arrive at a neural network algorithm that solves the optimization problem (10) for streaming data by alternating between two phases. After a data sample is presented at time T, in the first phase of the algorithm (13), neuron activities are updated until convergence to a fixed point. In the second phase of the algorithm, synaptic weights are updated for feedforward connections according to a local Hebbian rule (15) and for lateral connections according to a local anti-Hebbian rule (due to the (−) sign in equation (13)). Interestingly, in the α = 0 limit, these updates have the same form as the single-neuron Oja rule [24, 2], except that the learning rate is not a free parameter but is determined by the cumulative neuronal activity 1/DY T +1,i [4, 5]. 3.2 Online hard-thresholding of eigenvalues Consider the following minimax problem in the online setting, where we assume α > 0: {yT , zT } ←arg min yT arg max zT
X⊤X −Y⊤Y
2 F −
Y⊤Y −Z⊤Z −αTIT
2 F . (16) By keeping only those terms that depend on yT or zT and considering the large-T limit, we get the 5 following objective: L = 2αT ∥yT ∥2 −4x⊤ T T −1 X t=1 xty⊤ t ! yT −2z⊤ T T −1 X t=1 ztz⊤ t + αTIk ! zT + 4y⊤ T T −1 X t=1 ytz⊤ t ! zT . (17) Note that this objective is strongly convex in yT and strongly concave in zT . The solution of this minimax problem is the saddle-point of the objective function, which is found by setting the gradient of the objective with respect to {yT , zT } to zero [30]: αTyT = T −1 X t=1 ytx⊤ t ! xT − T −1 X t=1 ytz⊤ t ! zT , T −1 X t=1 ztz⊤ t + αTIk ! zT = T −1 X t=1 zty⊤ t ! yT . (18) To obtain a neurally plausible algorithm, we solve these equations by a weighted Jacobi iteration: yT ←(1 −η) yT + η WY X T xT −WY Z T zT , zT ←(1 −η) zT + η WZY T yT −WZZ T zT . (19) Here, similarly to (14), WT are normalized covariances that can be updated recursively: DY T +1,i ←DY T,i + α, DZ T +1,i ←DZ T,i + α + z2 T,i W Y X T +1,ij ←W Y X T,ij + yT,ixT,j −αW Y X T,ij /DY T +1,i W Y Z T +1,ij ←W Y Z T,ij + yT,izT,j −αW Y Z T,ij /DY T +1,i W ZY T +1,i,j ←W ZY T,ij + zT,iyT,j − α + z2 T,i W ZY T,ij /DZ T +1,i W ZZ T +1,i,j̸=i ←W ZZ T,ij + zT,izT,j − α + z2 T,i W ZZ T,ij /DZ T +1,i, W ZZ T,ii = 0. (20) Equations (19) and (20) define an online algorithm that can be naturally implemented by a neural network with two populations of neurons: principal and interneurons, Figure 1E. Again, after each data sample presentation, T, the algorithm proceeds in two phases. First, (19) is iterated until convergence by the dynamics of neuronal activities. Second, synaptic weights are updated according to local, anti-Hebbian (for synapses from interneurons) and Hebbian (for all other synapses) rules. 3.3 Online thresholding and equalization of eigenvalues Consider the following minimax problem in the online setting, where we assume α > 0 and β > 0: {yT , zT } ←arg min yT arg max zT Tr −X⊤XY⊤Y + Y⊤YZ⊤Z + αTY⊤Y −βTZ⊤Z . (21) By keeping only those terms that depend on yT or zT and considering the large-T limit, we get the following objective: L = αT ∥yT ∥2 −2x⊤ T T −1 X t=1 xty⊤ t ! yT −βT ∥zT ∥2 + 2y⊤ T T −1 X t=1 ytz⊤ t ! zT . (22) This objective is strongly convex in yT and strongly concave in zT and its saddle point is given by: αTyT = T −1 X t=1 ytx⊤ t ! xT − T −1 X t=1 ytz⊤ t ! zT , βTzT = T −1 X t=1 zty⊤ t ! yT . (23) To obtain a neurally plausible algorithm, we solve these equations by a weighted Jacobi iteration: yT ←(1 −η) yT + η WY X T xT −WY Z T zT , zT ←(1 −η) zT + ηWZY T yT , (24) As before, WT are normalized covariances which can be updated recursively: DY T +1,i ←DY T,i + α, DZ T +1,i ←DZ T,i + β W Y X T +1,ij ←W Y X T,ij + yT,ixT,j −αW Y X T,ij /DY T +1,i W Y Z T +1,ij ←W Y Z T,ij + yT,izT,j −αW Y Z T,ij /DY T +1,i W ZY T +1,i,j ←W ZY T,ij + zT,iyT,j −βW ZY T,ij /DZ T +1,i. (25) Equations (24) and (25) define an online algorithm that can be naturally implemented by a neural network with principal neurons and interneurons. As beofre, after each data sample presentation at 6 A B C 1 T Subspace Error Eigenvalue Error T -1.50 T -1.56 Subspace Error Eigenvalue Error Subspace Error Eigenvalue Error 103 102 10 1 10-1 10-2 10-3 10 102 103 104 10 1 10-1 10-2 10-3 10-4 1 T 10 102 103 104 ∝ ∝ T -1.53 T -1.43 10 1 10-1 10-2 10-3 1 T 10 102 103 104 ∝ ∝ T -1.33 T -1.80 ∝ ∝ 1 T 103 102 10 1 10-1 10-2 10-3 10 102 103 104 1 T 10 102 103 104 103 102 10 1 10-1 10-2 T -1.48 ∝ 1 T 10 102 103 104 10 1 10-1 10-2 10-3 T -1.41 T -1.38 ∝ ∝ Figure 2: Performance of the three neural networks: soft-thresholding (A), hard-thresholding (B), equalization after thresholding (C). Top: eigenvalue error, bottom: subspace error as a function of data presentations. Solid lines - means and shades - stds over 10 runs. Red - principal, blue inter-neurons. Dashed lines - best-fit power laws. For metric definitions see text. time T, the algorithm, first, iterates (24) by the dynamics of neuronal activities until convergence and, second, updates synaptic weights according to local anti-Hebbian (for synapses from interneurons) and Hebbian (25) (for all other synapses) rules. While an algorithm similar to (24), (25), but with predetermined learning rates, was previously given in [15, 14], it has not been derived from an optimization problem. Plumbley’s convergence analysis of his algorithm [14] suggests that at the fixed point of synaptic updates, the interneuron activity is also a projection onto the principal subspace. This result is a special case of our offline solution, (9), supported by the online numerical simulations (next Section). 4 Numerical simulations Here, we evaluate the performance of the three online algorithms on a synthetic dataset, which is generated by an n = 64 dimensional colored Gaussian process with a specified covariance matrix. In this covariance matrix, the eigenvalues, λ1..4 = {5, 4, 3, 2} and the remaining λ5..60 are chosen uniformly from the interval [0, 0.5]. Correlations are introduced in the covariance matrix by generating random orthonormal eigenvectors. For all three algorithms, we choose α = 1 and, for the equalizing algorithm, we choose β = 1. In all simulated networks, the number of principal neurons, k = 20, and, for the hard-thresholding and the equalizing algorithms, the number of interneurons, l = 5. Synaptic weight matrices were initialized randomly, and synaptic update learning rates, 1/DY 0,i and 1/DZ 0,i were initialized to 0.1. Network dynamics is run with a weight η = 0.1 until the relative change in yT and zT in one cycle is < 10−5. To quantify the performance of these algorithms, we use two different metrics. The first metric, eigenvalue error, measures the deviation of output covariance eigenvalues from their optimal offline values given in Theorems 1, 2 and 3. The eigenvalue error at time T is calculated by summing squared differences between the eigenvalues of 1 T YY⊤or 1 T ZZ⊤, and their optimal offline values at time T. The second metric, subspace error, quantifies the deviation of the learned subspace from the true principal subspace. To form such metric, at each T, we calculate the linear transformation that maps inputs, xT , to outputs, yT = FY X T xT and zT = FZX T xT , at the fixed points of the neural dynamics stages ((13), (19), (24)) of the three algorithms. Exact expressions for these matrices for all algorithms are given in the Supplementary Material. Then, at each T, the deviation is
Fm,T F⊤ m,T −UX m,T UX ⊤ m,T
2 F , where Fm,T is an n × m matrix whose columns are the top m right singular vectors of FT , Fm,T F⊤ m,T is the projection matrix to the subspace spanned by these singular vectors, UX m,T is an n×m matrix whose columns are the principal eigenvectors of the input covariance matrix C at time T, UX m,T UX ⊤ m,T is the projection matrix to the principal subspace. 7 Further numerical simulations comparing the performance of the soft-thresholding algorithm with α = 0 with other neural principal subspace algorithms can be found in [24]. 5 Discussion and conclusions We developed a normative approach for dimensionality reduction by formulating three novel optimization problems, the solutions of which project the input onto its principal subspace, and rescale the data by i) soft-thresholding, ii) hard-thresholding, iii) equalization after thresholding of the input eigenvalues. Remarkably we found that these optimization problems can be solved online using biologically plausible neural circuits. The dimensionality of neural activity is the number of either input covariance eigenvalues above the threshold, m, (if m < k) or output neurons, k (if k ≤m). The former case is ubiquitous in the analysis of experimental recordings, for a review see [31]. Interestingly, the division of neurons into two populations, principal and interneurons, in the last two models has natural parallels in biological neural networks. In biology, principal neurons and interneurons usually are excitatory and inhibitory respectively. However, we cannot make such an assignment in our theory, because the signs of neural activities, xT and yT , and, hence, the signs of synaptic weights, W, are unconstrained. Previously, interneurons were included into neural circuits [32], [33] outside of the normative approach. Similarity matching in the offline setting has been used to analyze experimentally recorded neuron activity lending support to our proposal. Semantically similar stimuli result in similar neural activity patterns in human (fMRI) and monkey (electrophysiology) IT cortices [34, 35]. In addition, [36] computed similarities among visual stimuli by matching them with the similarity among corresponding retinal activity patterns (using an information theoretic metric). We see several possible extensions to the algorithms presented here: 1) Our online objective functions may be optimized by alternative algorithms, such as gradient descent, which map onto different circuit architectures and learning rules. Interestingly, gradient descent-ascent on convex-concave objectives has been previously related to the dynamics of principal and interneurons [37]. 2) Inputs coming from a non-stationary distribution (with time-varying covariance matrix) can be processed by algorithms derived from the objective functions where contributions from older data points are “forgotten”, or “discounted”. Such discounting results in higher learning rates in the corresponding online algorithms, even at large T, giving them the ability to respond to variations in data statistics [24, 4]. Hence, the output dimensionality can track the number of input dimensions whose eigenvalues exceed the threshold. 3) In general, the output of our algorithms is not decorrelated. Such decorrelation can be achieved by including a correlation-penalizing term in our objective functions [38]. 4) Choosing the threshold parameter α requires an a priori knowledge of input statistics. A better solution, to be presented elsewhere, would be to let the network adjust such threshold adaptively, e.g. by filtering out all the eigenmodes with power below the mean eigenmode power. 5) Here, we focused on dimensionality reduction using only spatial, as opposed to the spatio-temporal, correlation structure. We thank L. Greengard, A. Sengupta, A. Grinshpan, S. Wright, A. Barnett and E. Pnevmatikakis. References [1] David H Hubel. Eye, brain, and vision. Scientific American Library/Scientific American Books, 1995. [2] E Oja. Simplified neuron model as a principal component analyzer. J Math Biol, 15(3):267–273, 1982. [3] KI Diamantaras and SY Kung. Principal component neural networks: theory and applications. John Wiley & Sons, Inc., 1996. [4] B Yang. Projection approximation subspace tracking. IEEE Trans. Signal Process., 43(1):95–107, 1995. [5] T Hu, ZJ Towfic, C Pehlevan, A Genkin, and DB Chklovskii. A neuron as a signal processing device. In Asilomar Conference on Signals, Systems and Computers, pages 362–366. IEEE, 2013. [6] E Oja. Principal components, minor components, and linear neural networks. Neural Networks, 5(6):927– 935, 1992. [7] R Arora, A Cotter, K Livescu, and N Srebro. Stochastic optimization for pca and pls. In Allerton Conf. on Communication, Control, and Computing, pages 861–868. IEEE, 2012. [8] J Goes, T Zhang, R Arora, and G Lerman. Robust stochastic principal component analysis. In Proc. 17th Int. Conf. on Artificial Intelligence and Statistics, pages 266–274, 2014. 8 [9] Todd K Leen. Dynamics of learning in recurrent feature-discovery networks. NIPS, 3, 1990. [10] P F¨oldiak. Adaptive network for optimal linear feature extraction. In Int. Joint Conf. on Neural Networks, pages 401–405. IEEE, 1989. [11] TD Sanger. Optimal unsupervised learning in a single-layer linear feedforward neural network. Neural networks, 2(6):459–473, 1989. [12] J Rubner and P Tavan. A self-organizing network for principal-component analysis. EPL, 10:693, 1989. [13] MD Plumbley. A hebbian/anti-hebbian network which optimizes information capacity by orthonormalizing the principal subspace. In Proc. 3rd Int. Conf. on Artificial Neural Networks, pages 86–90, 1993. [14] MD Plumbley. A subspace network that determines its own output dimension. Tech. Rep., 1994. [15] MD Plumbley. Information processing in negative feedback neural networks. Network-Comp Neural, 7(2):301–305, 1996. [16] P Vertechi, W Brendel, and CK Machens. Unsupervised learning of an efficient short-term memory network. In NIPS, pages 3653–3661, 2014. [17] BA Olshausen and DJ Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision Res, 37(23):3311–3325, 1997. [18] AA Koulakov and D Rinberg. Sparse incomplete representations: a potential role of olfactory granule cells. Neuron, 72(1):124–136, 2011. [19] S Druckmann, T Hu, and DB Chklovskii. A mechanistic model of early sensory processing based on subtracting sparse representations. In NIPS, pages 1979–1987, 2012. [20] AL Fairhall, GD Lewen, W Bialek, and RRR van Steveninck. Efficiency and ambiguity in an adaptive neural code. Nature, 412(6849):787–792, 2001. [21] SE Palmer, O Marre, MJ Berry, and W Bialek. Predictive information in a sensory population. PNAS, 112(22):6908–6913, 2015. [22] E Doi, JL Gauthier, GD Field, J Shlens, et al. Efficient coding of spatial information in the primate retina. J Neurosci, 32(46):16256–16264, 2012. [23] R Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988. [24] C Pehlevan, T Hu, and DB Chklovskii. A hebbian/anti-hebbian neural network for linear subspace learning: A derivation from multidimensional scaling of streaming data. Neural Comput, 27:1461–1495, 2015. [25] G Young and AS Householder. Discussion of a set of points in terms of their mutual distances. Psychometrika, 3(1):19–22, 1938. [26] WS Torgerson. Multidimensional scaling: I. theory and method. Psychometrika, 17(4):401–419, 1952. [27] HG Barrow and JML Budd. Automatic gain control by a basic neural circuit. Artificial Neural Networks, 2:433–436, 1992. [28] EJ Cand`es and B Recht. Exact matrix completion via convex optimization. Found Comput Math, 9(6):717–772, 2009. [29] J Mairal, F Bach, J Ponce, and G Sapiro. Online learning for matrix factorization and sparse coding. JMLR, 11:19–60, 2010. [30] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge university press, 2004. [31] P Gao and S Ganguli. On simplicity and complexity in the brave new world of large-scale neuroscience. Curr Opin Neurobiol, 32:148–155, 2015. [32] M Zhu and CJ Rozell. Modeling inhibitory interneurons in efficient sensory coding models. PLoS Comput Biol, 11(7):e1004353, 2015. [33] PD King, J Zylberberg, and MR DeWeese. Inhibitory interneurons decorrelate excitatory cells to drive sparse code formation in a spiking model of v1. J Neurosci, 33(13):5475–5485, 2013. [34] N Kriegeskorte, M Mur, DA Ruff, R Kiani, et al. Matching categorical object representations in inferior temporal cortex of man and monkey. Neuron, 60(6):1126–1141, 2008. [35] R Kiani, H Esteky, K Mirpour, and K Tanaka. Object category structure in response patterns of neuronal population in monkey inferior temporal cortex. J Neurophysiol, 97(6):4296–4309, 2007. [36] G Tkaˇcik, E Granot-Atedgi, R Segev, and E Schneidman. Retinal metric: a stimulus distance measure derived from population neural responses. PRL, 110(5):058104, 2013. [37] HS Seung, TJ Richardson, JC Lagarias, and JJ Hopfield. Minimax and hamiltonian dynamics of excitatory-inhibitory networks. NIPS, 10:329–335, 1998. [38] C Pehlevan and DB Chklovskii. Optimization theory of hebbian/anti-hebbian networks for pca and whitening. In Allerton Conf. on Communication, Control, and Computing, 2015. 9 | 2015 | 214 |
5,719 | Hidden Technical Debt in Machine Learning Systems D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips {dsculley,gholt,dgg,edavydov,toddphillips}@google.com Google, Inc. Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-Franc¸ois Crespo, Dan Dennison {ebner,vchaudhary,mwyoung,jfcrespo,dennison}@google.com Google, Inc. Abstract Machine learning offers a fantastically powerful toolkit for building useful complex prediction systems quickly. This paper argues it is dangerous to think of these quick wins as coming for free. Using the software engineering framework of technical debt, we find it is common to incur massive ongoing maintenance costs in real-world ML systems. We explore several ML-specific risk factors to account for in system design. These include boundary erosion, entanglement, hidden feedback loops, undeclared consumers, data dependencies, configuration issues, changes in the external world, and a variety of system-level anti-patterns. 1 Introduction As the machine learning (ML) community continues to accumulate years of experience with live systems, a wide-spread and uncomfortable trend has emerged: developing and deploying ML systems is relatively fast and cheap, but maintaining them over time is difficult and expensive. This dichotomy can be understood through the lens of technical debt, a metaphor introduced by Ward Cunningham in 1992 to help reason about the long term costs incurred by moving quickly in software engineering. As with fiscal debt, there are often sound strategic reasons to take on technical debt. Not all debt is bad, but all debt needs to be serviced. Technical debt may be paid down by refactoring code, improving unit tests, deleting dead code, reducing dependencies, tightening APIs, and improving documentation [8]. The goal is not to add new functionality, but to enable future improvements, reduce errors, and improve maintainability. Deferring such payments results in compounding costs. Hidden debt is dangerous because it compounds silently. In this paper, we argue that ML systems have a special capacity for incurring technical debt, because they have all of the maintenance problems of traditional code plus an additional set of ML-specific issues. This debt may be difficult to detect because it exists at the system level rather than the code level. Traditional abstractions and boundaries may be subtly corrupted or invalidated by the fact that data influences ML system behavior. Typical methods for paying down code level technical debt are not sufficient to address ML-specific technical debt at the system level. This paper does not offer novel ML algorithms, but instead seeks to increase the community’s awareness of the difficult tradeoffs that must be considered in practice over the long term. We focus on system-level interactions and interfaces as an area where ML technical debt may rapidly accumulate. At a system-level, an ML model may silently erode abstraction boundaries. The tempting re-use or chaining of input signals may unintentionally couple otherwise disjoint systems. ML packages may be treated as black boxes, resulting in large masses of “glue code” or calibration layers that can lock in assumptions. Changes in the external world may influence system behavior in unintended ways. Even monitoring ML system behavior may prove difficult without careful design. 1 2 Complex Models Erode Boundaries Traditional software engineering practice has shown that strong abstraction boundaries using encapsulation and modular design help create maintainable code in which it is easy to make isolated changes and improvements. Strict abstraction boundaries help express the invariants and logical consistency of the information inputs and outputs from an given component [8]. Unfortunately, it is difficult to enforce strict abstraction boundaries for machine learning systems by prescribing specific intended behavior. Indeed, ML is required in exactly those cases when the desired behavior cannot be effectively expressed in software logic without dependency on external data. The real world does not fit into tidy encapsulation. Here we examine several ways that the resulting erosion of boundaries may significantly increase technical debt in ML systems. Entanglement. Machine learning systems mix signals together, entangling them and making isolation of improvements impossible. For instance, consider a system that uses features x1, ...xn in a model. If we change the input distribution of values in x1, the importance, weights, or use of the remaining n −1 features may all change. This is true whether the model is retrained fully in a batch style or allowed to adapt in an online fashion. Adding a new feature xn+1 can cause similar changes, as can removing any feature xj. No inputs are ever really independent. We refer to this here as the CACE principle: Changing Anything Changes Everything. CACE applies not only to input signals, but also to hyper-parameters, learning settings, sampling methods, convergence thresholds, data selection, and essentially every other possible tweak. One possible mitigation strategy is to isolate models and serve ensembles. This approach is useful in situations in which sub-problems decompose naturally such as in disjoint multi-class settings like [14]. However, in many cases ensembles work well because the errors in the component models are uncorrelated. Relying on the combination creates a strong entanglement: improving an individual component model may actually make the system accuracy worse if the remaining errors are more strongly correlated with the other components. A second possible strategy is to focus on detecting changes in prediction behavior as they occur. One such method was proposed in [12], in which a high-dimensional visualization tool was used to allow researchers to quickly see effects across many dimensions and slicings. Metrics that operate on a slice-by-slice basis may also be extremely useful. Correction Cascades. There are often situations in which model ma for problem A exists, but a solution for a slightly different problem A′ is required. In this case, it can be tempting to learn a model m′ a that takes ma as input and learns a small correction as a fast way to solve the problem. However, this correction model has created a new system dependency on ma, making it significantly more expensive to analyze improvements to that model in the future. The cost increases when correction models are cascaded, with a model for problem A′′ learned on top of m′ a, and so on, for several slightly different test distributions. Once in place, a correction cascade can create an improvement deadlock, as improving the accuracy of any individual component actually leads to system-level detriments. Mitigation strategies are to augment ma to learn the corrections directly within the same model by adding features to distinguish among the cases, or to accept the cost of creating a separate model for A′. Undeclared Consumers. Oftentimes, a prediction from a machine learning model ma is made widely accessible, either at runtime or by writing to files or logs that may later be consumed by other systems. Without access controls, some of these consumers may be undeclared, silently using the output of a given model as an input to another system. In more classical software engineering, these issues are referred to as visibility debt [13]. Undeclared consumers are expensive at best and dangerous at worst, because they create a hidden tight coupling of model ma to other parts of the stack. Changes to ma will very likely impact these other parts, potentially in ways that are unintended, poorly understood, and detrimental. In practice, this tight coupling can radically increase the cost and difficulty of making any changes to ma at all, even if they are improvements. Furthermore, undeclared consumers may create hidden feedback loops, which are described more in detail in section 4. 2 Undeclared consumers may be difficult to detect unless the system is specifically designed to guard against this case, for example with access restrictions or strict service-level agreements (SLAs). In the absence of barriers, engineers will naturally use the most convenient signal at hand, especially when working against deadline pressures. 3 Data Dependencies Cost More than Code Dependencies In [13], dependency debt is noted as a key contributor to code complexity and technical debt in classical software engineering settings. We have found that data dependencies in ML systems carry a similar capacity for building debt, but may be more difficult to detect. Code dependencies can be identified via static analysis by compilers and linkers. Without similar tooling for data dependencies, it can be inappropriately easy to build large data dependency chains that can be difficult to untangle. Unstable Data Dependencies. To move quickly, it is often convenient to consume signals as input features that are produced by other systems. However, some input signals are unstable, meaning that they qualitatively or quantitatively change behavior over time. This can happen implicitly, when the input signal comes from another machine learning model itself that updates over time, or a data-dependent lookup table, such as for computing TF/IDF scores or semantic mappings. It can also happen explicitly, when the engineering ownership of the input signal is separate from the engineering ownership of the model that consumes it. In such cases, updates to the input signal may be made at any time. This is dangerous because even “improvements” to input signals may have arbitrary detrimental effects in the consuming system that are costly to diagnose and address. For example, consider the case in which an input signal was previously mis-calibrated. The model consuming it likely fit to these mis-calibrations, and a silent update that corrects the signal will have sudden ramifications for the model. One common mitigation strategy for unstable data dependencies is to create a versioned copy of a given signal. For example, rather than allowing a semantic mapping of words to topic clusters to change over time, it might be reasonable to create a frozen version of this mapping and use it until such a time as an updated version has been fully vetted. Versioning carries its own costs, however, such as potential staleness and the cost to maintain multiple versions of the same signal over time. Underutilized Data Dependencies. In code, underutilized dependencies are packages that are mostly unneeded [13]. Similarly, underutilized data dependencies are input signals that provide little incremental modeling benefit. These can make an ML system unnecessarily vulnerable to change, sometimes catastrophically so, even though they could be removed with no detriment. As an example, suppose that to ease the transition from an old product numbering scheme to new product numbers, both schemes are left in the system as features. New products get only a new number, but old products may have both and the model continues to rely on the old numbers for some products. A year later, the code that stops populating the database with the old numbers is deleted. This will not be a good day for the maintainers of the ML system. Underutilized data dependencies can creep into a model in several ways. • Legacy Features. The most common case is that a feature F is included in a model early in its development. Over time, F is made redundant by new features but this goes undetected. • Bundled Features. Sometimes, a group of features is evaluated and found to be beneficial. Because of deadline pressures or similar effects, all the features in the bundle are added to the model together, possibly including features that add little or no value. • ǫ-Features. As machine learning researchers, it is tempting to improve model accuracy even when the accuracy gain is very small or when the complexity overhead might be high. • Correlated Features. Often two features are strongly correlated, but one is more directly causal. Many ML methods have difficulty detecting this and credit the two features equally, or may even pick the non-causal one. This results in brittleness if world behavior later changes the correlations. Underutilized dependencies can be detected via exhaustive leave-one-feature-out evaluations. These should be run regularly to identify and remove unnecessary features. 3 Figure 1: Only a small fraction of real-world ML systems is composed of the ML code, as shown by the small black box in the middle. The required surrounding infrastructure is vast and complex. Static Analysis of Data Dependencies. In traditional code, compilers and build systems perform static analysis of dependency graphs. Tools for static analysis of data dependencies are far less common, but are essential for error checking, tracking down consumers, and enforcing migration and updates. One such tool is the automated feature management system described in [12], which enables data sources and features to be annotated. Automated checks can then be run to ensure that all dependencies have the appropriate annotations, and dependency trees can be fully resolved. This kind of tooling can make migration and deletion much safer in practice. 4 Feedback Loops One of the key features of live ML systems is that they often end up influencing their own behavior if they update over time. This leads to a form of analysis debt, in which it is difficult to predict the behavior of a given model before it is released. These feedback loops can take different forms, but they are all more difficult to detect and address if they occur gradually over time, as may be the case when models are updated infrequently. Direct Feedback Loops. A model may directly influence the selection of its own future training data. It is common practice to use standard supervised algorithms, although the theoretically correct solution would be to use bandit algorithms. The problem here is that bandit algorithms (such as contextual bandits [9]) do not necessarily scale well to the size of action spaces typically required for real-world problems. It is possible to mitigate these effects by using some amount of randomization [3], or by isolating certain parts of data from being influenced by a given model. Hidden Feedback Loops. Direct feedback loops are costly to analyze, but at least they pose a statistical challenge that ML researchers may find natural to investigate [3]. A more difficult case is hidden feedback loops, in which two systems influence each other indirectly through the world. One example of this may be if two systems independently determine facets of a web page, such as one selecting products to show and another selecting related reviews. Improving one system may lead to changes in behavior in the other, as users begin clicking more or less on the other components in reaction to the changes. Note that these hidden loops may exist between completely disjoint systems. Consider the case of two stock-market prediction models from two different investment companies. Improvements (or, more scarily, bugs) in one may influence the bidding and buying behavior of the other. 5 ML-System Anti-Patterns It may be surprising to the academic community to know that only a tiny fraction of the code in many ML systems is actually devoted to learning or prediction – see Figure 1. In the language of Lin and Ryaboy, much of the remainder may be described as “plumbing” [11]. It is unfortunately common for systems that incorporate machine learning methods to end up with high-debt design patterns. In this section, we examine several system-design anti-patterns [4] that can surface in machine learning systems and which should be avoided or refactored where possible. 4 Glue Code. ML researchers tend to develop general purpose solutions as self-contained packages. A wide variety of these are available as open-source packages at places like mloss.org, or from in-house code, proprietary packages, and cloud-based platforms. Using generic packages often results in a glue code system design pattern, in which a massive amount of supporting code is written to get data into and out of general-purpose packages. Glue code is costly in the long term because it tends to freeze a system to the peculiarities of a specific package; testing alternatives may become prohibitively expensive. In this way, using a generic package can inhibit improvements, because it makes it harder to take advantage of domain-specific properties or to tweak the objective function to achieve a domain-specific goal. Because a mature system might end up being (at most) 5% machine learning code and (at least) 95% glue code, it may be less costly to create a clean native solution rather than re-use a generic package. An important strategy for combating glue-code is to wrap black-box packages into common API’s. This allows supporting infrastructure to be more reusable and reduces the cost of changing packages. Pipeline Jungles. As a special case of glue code, pipeline jungles often appear in data preparation. These can evolve organically, as new signals are identified and new information sources added incrementally. Without care, the resulting system for preparing data in an ML-friendly format may become a jungle of scrapes, joins, and sampling steps, often with intermediate files output. Managing these pipelines, detecting errors and recovering from failures are all difficult and costly [1]. Testing such pipelines often requires expensive end-to-end integration tests. All of this adds to technical debt of a system and makes further innovation more costly. Pipeline jungles can only be avoided by thinking holistically about data collection and feature extraction. The clean-slate approach of scrapping a pipeline jungle and redesigning from the ground up is indeed a major investment of engineering effort, but one that can dramatically reduce ongoing costs and speed further innovation. Glue code and pipeline jungles are symptomatic of integration issues that may have a root cause in overly separated “research” and “engineering” roles. When ML packages are developed in an ivorytower setting, the result may appear like black boxes to the teams that employ them in practice. A hybrid research approach where engineers and researchers are embedded together on the same teams (and indeed, are often the same people) can help reduce this source of friction significantly [16]. Dead Experimental Codepaths. A common consequence of glue code or pipeline jungles is that it becomes increasingly attractive in the short term to perform experiments with alternative methods by implementing experimental codepaths as conditional branches within the main production code. For any individual change, the cost of experimenting in this manner is relatively low—none of the surrounding infrastructure needs to be reworked. However, over time, these accumulated codepaths can create a growing debt due to the increasing difficulties of maintaining backward compatibility and an exponential increase in cyclomatic complexity. Testing all possible interactions between codepaths becomes difficult or impossible. A famous example of the dangers here was Knight Capital’s system losing $465 million in 45 minutes, apparently because of unexpected behavior from obsolete experimental codepaths [15]. As with the case of dead flags in traditional software [13], it is often beneficial to periodically reexamine each experimental branch to see what can be ripped out. Often only a small subset of the possible branches is actually used; many others may have been tested once and abandoned. Abstraction Debt. The above issues highlight the fact that there is a distinct lack of strong abstractions to support ML systems. Zheng recently made a compelling comparison of the state ML abstractions to the state of database technology [17], making the point that nothing in the machine learning literature comes close to the success of the relational database as a basic abstraction. What is the right interface to describe a stream of data, or a model, or a prediction? For distributed learning in particular, there remains a lack of widely accepted abstractions. It could be argued that the widespread use of Map-Reduce in machine learning was driven by the void of strong distributed learning abstractions. Indeed, one of the few areas of broad agreement in recent years appears to be that Map-Reduce is a poor abstraction for iterative ML algorithms. 5 The parameter-server abstraction seems much more robust, but there are multiple competing specifications of this basic idea [5, 10]. The lack of standard abstractions makes it all too easy to blur the lines between components. Common Smells. In software engineering, a design smell may indicate an underlying problem in a component or system [7]. We identify a few ML system smells, not hard-and-fast rules, but as subjective indicators. • Plain-Old-Data Type Smell. The rich information used and produced by ML systems is all to often encoded with plain data types like raw floats and integers. In a robust system, a model parameter should know if it is a log-odds multiplier or a decision threshold, and a prediction should know various pieces of information about the model that produced it and how it should be consumed. • Multiple-Language Smell. It is often tempting to write a particular piece of a system in a given language, especially when that language has a convenient library or syntax for the task at hand. However, using multiple languages often increases the cost of effective testing and can increase the difficulty of transferring ownership to other individuals. • Prototype Smell. It is convenient to test new ideas in small scale via prototypes. However, regularly relying on a prototyping environment may be an indicator that the full-scale system is brittle, difficult to change, or could benefit from improved abstractions and interfaces. Maintaining a prototyping environment carries its own cost, and there is a significant danger that time pressures may encourage a prototyping system to be used as a production solution. Additionally, results found at small scale rarely reflect the reality at full scale. 6 Configuration Debt Another potentially surprising area where debt can accumulate is in the configuration of machine learning systems. Any large system has a wide range of configurable options, including which features are used, how data is selected, a wide variety of algorithm-specific learning settings, potential pre- or post-processing, verification methods, etc. We have observed that both researchers and engineers may treat configuration (and extension of configuration) as an afterthought. Indeed, verification or testing of configurations may not even be seen as important. In a mature system which is being actively developed, the number of lines of configuration can far exceed the number of lines of the traditional code. Each configuration line has a potential for mistakes. Consider the following examples. Feature A was incorrectly logged from 9/14 to 9/17. Feature B is not available on data before 10/7. The code used to compute feature C has to change for data before and after 11/1 because of changes to the logging format. Feature D is not available in production, so a substitute features D′ and D′′ must be used when querying the model in a live setting. If feature Z is used, then jobs for training must be given extra memory due to lookup tables or they will train inefficiently. Feature Q precludes the use of feature R because of latency constraints. All this messiness makes configuration hard to modify correctly, and hard to reason about. However, mistakes in configuration can be costly, leading to serious loss of time, waste of computing resources, or production issues. This leads us to articulate the following principles of good configuration systems: • It should be easy to specify a configuration as a small change from a previous configuration. • It should be hard to make manual errors, omissions, or oversights. • It should be easy to see, visually, the difference in configuration between two models. • It should be easy to automatically assert and verify basic facts about the configuration: number of features used, transitive closure of data dependencies, etc. • It should be possible to detect unused or redundant settings. • Configurations should undergo a full code review and be checked into a repository. 6 7 Dealing with Changes in the External World One of the things that makes ML systems so fascinating is that they often interact directly with the external world. Experience has shown that the external world is rarely stable. This background rate of change creates ongoing maintenance cost. Fixed Thresholds in Dynamic Systems. It is often necessary to pick a decision threshold for a given model to perform some action: to predict true or false, to mark an email as spam or not spam, to show or not show a given ad. One classic approach in machine learning is to choose a threshold from a set of possible thresholds, in order to get good tradeoffs on certain metrics, such as precision and recall. However, such thresholds are often manually set. Thus if a model updates on new data, the old manually set threshold may be invalid. Manually updating many thresholds across many models is time-consuming and brittle. One mitigation strategy for this kind of problem appears in [14], in which thresholds are learned via simple evaluation on heldout validation data. Monitoring and Testing. Unit testing of individual components and end-to-end tests of running systems are valuable, but in the face of a changing world such tests are not sufficient to provide evidence that a system is working as intended. Comprehensive live monitoring of system behavior in real time combined with automated response is critical for long-term system reliability. The key question is: what to monitor? Testable invariants are not always obvious given that many ML systems are intended to adapt over time. We offer the following starting points. • Prediction Bias. In a system that is working as intended, it should usually be the case that the distribution of predicted labels is equal to the distribution of observed labels. This is by no means a comprehensive test, as it can be met by a null model that simply predicts average values of label occurrences without regard to the input features. However, it is a surprisingly useful diagnostic, and changes in metrics such as this are often indicative of an issue that requires attention. For example, this method can help to detect cases in which the world behavior suddenly changes, making training distributions drawn from historical data no longer reflective of current reality. Slicing prediction bias by various dimensions isolate issues quickly, and can also be used for automated alerting. • Action Limits. In systems that are used to take actions in the real world, such as bidding on items or marking messages as spam, it can be useful to set and enforce action limits as a sanity check. These limits should be broad enough not to trigger spuriously. If the system hits a limit for a given action, automated alerts should fire and trigger manual intervention or investigation. • Up-Stream Producers. Data is often fed through to a learning system from various upstream producers. These up-stream processes should be thoroughly monitored, tested, and routinely meet a service level objective that takes the downstream ML system needs into account. Further any up-stream alerts must be propagated to the control plane of an ML system to ensure its accuracy. Similarly, any failure of the ML system to meet established service level objectives be also propagated down-stream to all consumers, and directly to their control planes if at all possible. Because external changes occur in real-time, response must also occur in real-time as well. Relying on human intervention in response to alert pages is one strategy, but can be brittle for time-sensitive issues. Creating systems to that allow automated response without direct human intervention is often well worth the investment. 8 Other Areas of ML-related Debt We now briefly highlight some additional areas where ML-related technical debt may accrue. Data Testing Debt. If data replaces code in ML systems, and code should be tested, then it seems clear that some amount of testing of input data is critical to a well-functioning system. Basic sanity checks are useful, as more sophisticated tests that monitor changes in input distributions. 7 Reproducibility Debt. As scientists, it is important that we can re-run experiments and get similar results, but designing real-world systems to allow for strict reproducibility is a task made difficult by randomized algorithms, non-determinism inherent in parallel learning, reliance on initial conditions, and interactions with the external world. Process Management Debt. Most of the use cases described in this paper have talked about the cost of maintaining a single model, but mature systems may have dozens or hundreds of models running simultaneously [14, 6]. This raises a wide range of important problems, including the problem of updating many configurations for many similar models safely and automatically, how to manage and assign resources among models with different business priorities, and how to visualize and detect blockages in the flow of data in a production pipeline. Developing tooling to aid recovery from production incidents is also critical. An important system-level smell to avoid are common processes with many manual steps. Cultural Debt. There is sometimes a hard line between ML research and engineering, but this can be counter-productive for long-term system health. It is important to create team cultures that reward deletion of features, reduction of complexity, improvements in reproducibility, stability, and monitoring to the same degree that improvements in accuracy are valued. In our experience, this is most likely to occur within heterogeneous teams with strengths in both ML research and engineering. 9 Conclusions: Measuring Debt and Paying it Off Technical debt is a useful metaphor, but it unfortunately does not provide a strict metric that can be tracked over time. How are we to measure technical debt in a system, or to assess the full cost of this debt? Simply noting that a team is still able to move quickly is not in itself evidence of low debt or good practices, since the full cost of debt becomes apparent only over time. Indeed, moving quickly often introduces technical debt. A few useful questions to consider are: • How easily can an entirely new algorithmic approach be tested at full scale? • What is the transitive closure of all data dependencies? • How precisely can the impact of a new change to the system be measured? • Does improving one model or signal degrade others? • How quickly can new members of the team be brought up to speed? We hope that this paper may serve to encourage additional development in the areas of maintainable ML, including better abstractions, testing methodologies, and design patterns. Perhaps the most important insight to be gained is that technical debt is an issue that engineers and researchers both need to be aware of. Research solutions that provide a tiny accuracy benefit at the cost of massive increases in system complexity are rarely wise practice. Even the addition of one or two seemingly innocuous data dependencies can slow further progress. Paying down ML-related technical debt requires a specific commitment, which can often only be achieved by a shift in team culture. Recognizing, prioritizing, and rewarding this effort is important for the long term health of successful ML teams. Acknowledgments This paper owes much to the important lessons learned day to day in a culture that values both innovative ML research and strong engineering practice. Many colleagues have helped shape our thoughts here, and the benefit of accumulated folk wisdom cannot be overstated. We would like to specifically recognize the following: Roberto Bayardo, Luis Cobo, Sharat Chikkerur, Jeff Dean, Philip Henderson, Arnar Mar Hrafnkelsson, Ankur Jain, Joe Kovac, Jeremy Kubica, H. Brendan McMahan, Satyaki Mahalanabis, Lan Nie, Michael Pohl, Abdul Salem, Sajid Siddiqi, Ricky Shan, Alan Skelly, Cory Williams, and Andrew Young. A short version of this paper was presented at the SE4ML workshop in 2014 in Montreal, Canada. 8 References [1] R. Ananthanarayanan, V. Basker, S. Das, A. Gupta, H. Jiang, T. Qiu, A. Reznichenko, D. Ryabkov, M. Singh, and S. Venkataraman. Photon: Fault-tolerant and scalable joining of continuous data streams. In SIGMOD ’13: Proceedings of the 2013 international conference on Management of data, pages 577– 588, New York, NY, USA, 2013. [2] A. Anonymous. Machine learning: The high-interest credit card of technical debt. SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop). [3] L. Bottou, J. Peters, J. Qui˜nonero Candela, D. X. Charles, D. M. Chickering, E. Portugaly, D. Ray, P. Simard, and E. Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. Journal of Machine Learning Research, 14(Nov), 2013. [4] W. J. Brown, H. W. McCormick, T. J. Mowbray, and R. C. Malveau. Antipatterns: refactoring software, architectures, and projects in crisis. 1998. [5] T. M. Chilimbi, Y. Suzue, J. Apacible, and K. Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In 11th USENIX Symposium on Operating Systems Design and Implementation, OSDI ’14, Broomfield, CO, USA, October 6-8, 2014., pages 571–582, 2014. [6] B. Dalessandro, D. Chen, T. Raeder, C. Perlich, M. Han Williams, and F. Provost. Scalable handsfree transfer learning for online advertising. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1573–1582. ACM, 2014. [7] M. Fowler. Code smells. http://http://martinfowler.com/bliki/CodeSmell.html. [8] M. Fowler. Refactoring: improving the design of existing code. Pearson Education India, 1999. [9] J. Langford and T. Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in neural information processing systems, pages 817–824, 2008. [10] M. Li, D. G. Andersen, J. W. Park, A. J. Smola, A. Ahmed, V. Josifovski, J. Long, E. J. Shekita, and B. Su. Scaling distributed machine learning with the parameter server. In 11th USENIX Symposium on Operating Systems Design and Implementation, OSDI ’14, Broomfield, CO, USA, October 6-8, 2014., pages 583–598, 2014. [11] J. Lin and D. Ryaboy. Scaling big data mining infrastructure: the twitter experience. ACM SIGKDD Explorations Newsletter, 14(2):6–19, 2013. [12] H. B. McMahan, G. Holt, D. Sculley, M. Young, D. Ebner, J. Grady, L. Nie, T. Phillips, E. Davydov, D. Golovin, S. Chikkerur, D. Liu, M. Wattenberg, A. M. Hrafnkelsson, T. Boulos, and J. Kubica. Ad click prediction: a view from the trenches. In The 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD 2013, Chicago, IL, USA, August 11-14, 2013, 2013. [13] J. D. Morgenthaler, M. Gridnev, R. Sauciuc, and S. Bhansali. Searching for build debt: Experiences managing technical debt at google. In Proceedings of the Third International Workshop on Managing Technical Debt, 2012. [14] D. Sculley, M. E. Otey, M. Pohl, B. Spitznagel, J. Hainsworth, and Y. Zhou. Detecting adversarial advertisements in the wild. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Diego, CA, USA, August 21-24, 2011, 2011. [15] Securities and E. Commission. SEC Charges Knight Capital With Violations of Market Access Rule, 2013. [16] A. Spector, P. Norvig, and S. Petrov. Google’s hybrid approach to research. Communications of the ACM, 55 Issue 7, 2012. [17] A. Zheng. The challenges of building machine learning tools for the masses. SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop). 9 | 2015 | 215 |
5,720 | NEXT: A System for Real-World Development, Evaluation, and Application of Active Learning Kevin Jamieson UC Berkeley kjamieson@berkeley.edu Lalit Jain, Chris Fernandez, Nick Glattard, Robert Nowak University of Wisconsin - Madison {ljain,crfernandez,glattard,rdnowak}@wisc.edu Abstract Active learning methods automatically adapt data collection by selecting the most informative samples in order to accelerate machine learning. Because of this, real-world testing and comparing active learning algorithms requires collecting new datasets (adaptively), rather than simply applying algorithms to benchmark datasets, as is the norm in (passive) machine learning research. To facilitate the development, testing and deployment of active learning for real applications, we have built an open-source software system for large-scale active learning research and experimentation. The system, called NEXT, provides a unique platform for real-world, reproducible active learning research. This paper details the challenges of building the system and demonstrates its capabilities with several experiments. The results show how experimentation can help expose strengths and weaknesses of active learning algorithms, in sometimes unexpected and enlightening ways. 1 Introduction We use the term “active learning” to refer to algorithms that employ adaptive data collection in order to accelerate machine learning. By adaptive data collection we mean processes that automatically adjust, based on previously collected data, to collect the most useful data as quickly as possible. This broad notion of active learning includes multi-armed bandits, adaptive data collection in unsupervised learning (e.g. clustering, embedding, etc.), classification, regression, and sequential experimental design. Perhaps the most familiar example of active learning arises in the context of classification. There active learning algorithms select examples for labeling in a sequential, dataadaptive fashion, as opposed to passive learning algorithms based on preselected training data. The key to active learning is adaptive data collection. Because of this, real-world testing and comparing active learning algorithms requires collecting new datasets (adaptively), rather than simply applying algorithms to benchmark datasets, as is the norm in (passive) machine learning research. In this adaptive paradigm, algorithm and network response time, human fatigue, the differing label quality of humans, and the lack of i.i.d. responses are all real-world concerns of implementing active learning algorithms. Due to many of these conditions being impossible to faithfully simulate active learning algorithms must be evaluated on real human participants. Adaptively collecting large-scale datasets can be difficult and time-consuming. As a result, active learning has remained a largely theoretical research area, and practical algorithms and experiments are few and far between. Most experimental work in active learning with real-world data is simulated by letting the algorithm adaptively select a small number of labeled examples from a large labeled dataset. This requires a large, labeled data set to begin with, which limits the scope and scale of such experimental work. Also, it does not address the practical issue of deploying active learning algorithms and adaptive data collection for real applications. To address these issues, we have built a software system called NEXT, which provides a unique platform for real-world, large-scale, reproducible active learning research, enabling 1 Web Request Queue Web API 1 Waiting… Thanks! 2 3 4 5 6 processAnswer getQuery updateModel Web Request Queue Web API 7 8 9 Algorithm Manager Algorithm Manager processAnswer getQuery updateModel 10 11b 11a 12b 12a Model Update Queue 1. Request query display from web API 2. Submit job to web-request queue 3. Asynchronous worker accepts job 4. Request routed to proper algorithm 5. Query generated, sent back to API 6. Query display returned to client 7. Answer reported to web API 8. Submit job to web-request queue 9. Asynchronous worker accepts job 10. Answer routed to proper algorithm 11a. Answer acknowledged to API 12a. Answer acknowledged to Client 11b. Submit job to model-update queue 12b. Synchronous worker accepts job Figure 1: NEXT Active Learning Data Flow def getQuery( context ): // GET suff. statistics stats from database // use stats, context to create query return query def processAnswer( query,answer ): // SET (query,answer) in database // update model or ENQUEUE job for later return “Thanks!” def updateModel( ): // GET all (query,answer) pairs S // use S to update model to create stats // SET suff. statistics stats in database Figure 2: Example algorithm prototype that active learning researcher implements. Each algorithm has access to the database and the ability to enqueue jobs that are executed in order, one at a time. 1. machine learning researchers to easily deploy and test new active learning algorithms; 2. applied researchers to employ active learning methods for real-world applications. Many of today’s state-of-the-art machine learning tools, such as kernel methods and deep learning, have developed and witnessed wide-scale adoption in practice because of both theoretical work and extensive experimentation, testing and evaluation on real-world datasets. Arguably, some of the deepest insights and greatest innovations have come through experimentation. The goal of NEXT is to enable the same sort of real-world experimentation for active learning. We anticipate this will lead to new understandings and breakthroughs, just as it has for passive learning. This paper details the challenges of building active learning systems and our open-source solution, the NEXT system1. We also demonstrate the system’s capabilities for real active learning experimentation. The results show how experimentation can help expose strengths and weaknesses of well-known active learning algorithms, in sometimes unexpected and enlightening ways. 2 What’s NEXT? At the heart of active learning is a process for sequentially and adaptively gathering data most informative to the learning task at hand as quickly as possible. At each step, an algorithm must decide what data to collect next. The data collection itself is often from human helpers who are asked to answer queries, label instances or inspect data. Crowdsourcing platforms such as Amazon’s Mechanical Turk or Crowd Flower provide access to potentially thousands of users answering queries on-demand. Parallel data collection at a large scale imposes design and engineering challenges unique to active learning due to the continuous interaction between data collection and learning. Here we describe the main features and contributions of the NEXT system. System Functionality - A data flow diagram for NEXT is presented in Figure 1. Consider an individual client among the crowd tasked with answering a series of classification questions. The client interacts with NEXT through a website which requests a new query to be presented from the NEXT web api. Tasked with potentially handling thousands of such requests simultaneously, the API will enqueue the query request to be processed by a worker pool (workers can be thought of as processes living on one or many machines pulling from the same queue). Once the job is accepted by a worker, it is routed through the worker’s algorithm manager (described in the extensibility section below) and the algorithm then chooses a query based on previously collected data and sufficient statistics. The query is then sent back to the client through the API to be displayed. After the client answers the query, the same initial process as above is repeated but this time the answer is routed to the ‘processAnswer’ endpoint of the algorithm. Since multiple users are getting 1The NEXT system is open source and available https://github.com/nextml/NEXT. 2 queries and reporting answers at the same time, there is a potential for two different workers to attempt to update the model, or the statistics used to generate new queries, at the same time, and potentially overwrite each other’s work. A simple way NEXT avoids this race condition is to provide a locking queue to each algorithm so that when a worker accepts a job from this queue, the queue is locked until that job is finished. Hence, when the answer is reported to the algorithm, the ‘processAnswer’ code block may either update the model asynchronously itself, or submit a ‘modelUpdate’ job to this locking model update queue to process the answer later synchronously (see Section 4 for details). After processing the answer, the worker returns an acknowledgement response to the client. Of this data flow, NEXT handles the API, enqueueing and scheduling of jobs, and algorithm management. The researcher interested in deploying their algorithm is responsible for implementing getQuery, processAnswer and updateModel. Figure 2 shows pseudo-code for the functions that must be implemented for each algorithm in the NEXT system; see the supplementary materials for an explicit example involving an active SVM classifier. A key challenge here is latency. A getQuery request uses the current learned model to decide what queries to serve next. Humans will notice delays greater than roughly 400 ms. Therefore, it is imperative that the system can receive and process a response, update the model, and select the next query within 400 ms. Accounting for 100-200 ms in communication latency each way, the system must perform all necessary processing within 50-100 ms. While in some applications one can compute good queries offline and serve them as needed without further computation, other applications, such as contextual bandits for personalized content recommendation, require that the query depend on the context provided by the user (e.g. their cookies) and consequently, must be computed in real time. Realtime Computing - Research in active learning focuses on reducing the sample complexity of the learning process (i.e., minimizing number of labeled and unlabeled examples needed to learn an accurate model) and sometimes addresses the issue of computational complexity. In the latter case, the focus is usually on polynomial-time algorithms, but not necessarily realtime algorithms. Practical active learning systems face a tradeoff between how frequently models are updated and how carefully new queries are selected. If the model is updated less frequently, then time can be spent on carefully selecting a batch of new queries. However, selecting in large batches may potentially reduce some of the gains afforded by active learning, since later queries will be based on old, stale information. Updating the model frequently may be possible, but then the time available for selecting queries may be very short, resulting in suboptimal selections and again potentially defeating the aim of active learning. Managing this tradeoff is the chief responsibility of the algorithm designer, but to make these design choices, the algorithm designer must be able to easily gauge the effects of different algorithmic choices. In the NEXT system, the tradeoff is explicitly managed by modifying when and how often the updateModel command is run and what it does. The system helps with making these decisions by providing extensive dashboards describing both the statistical and computational performance of the algorithms. Reproducible research - Publishing data and software needed to reproduce experimental results is essential to scientific progress in all fields. Due to the adaptive nature of data collection in active learning experiments, it is not enough to simply publish data gathered in a previous experiment. For other researchers to recreate the experiment, the must be able to also reconstruct the exact adaptive process that was used to collect the data. This means that the complete system, including any web facing crowd sourcing tools, not just algorithm code and data, must be made publicly available and easy to use. By leveraging cloud computing, NEXT abstracts away the difficulties of building a data collection system and lets the researcher focus on active learning algorithm design. Any other researcher can replicate an experiment with just a few keystrokes in under one hour by just using the same experiment initialization parameters. Expert data collection for the non expert - NEXT puts state-of-the-art active learning algorithms in the hands of non-experts interested in collecting data in more efficient ways. This includes psychologists, social scientists, biologists, security analysts and researchers in any other field in which large amounts of data is collected, sometimes at a large dollar cost and time expense. Choosing an appropriate active learning algorithm is perhaps an easier step for non-experts compared to data collection. While there exist excellent tools to help researchers perform relatively simple experiments on Mechanical Turk (e.g. PsiTurk [1] or AutoMan [2]), implementing active learning to collect data requires building a sophisticated system like the one described in this paper. To determine the needs 3 of potential users, the NEXT system was built in close collaboration with cognitive scientists at our home institution. They helped inform design decisions and provided us with participants to beta-test the system in a real-world environment. Indeed, the examples used in this paper were motivated by related studies developed by our collaborators in psychology. NEXT is accessible through a REST Web API and can be easily deployed in the cloud with minimal knowledge and expertise using automated scripts. NEXT provides researchers a set of example templates and widgets that can be used as graphical user interfaces to collect data from participants (see supplementary materials for examples). Multiple Algorithms and Extensibility - NEXT provides a platform for applications and algorithms. Applications are general active learning tasks, such as linear classification, and algorithms are particular implementations of that application (e.g., random sampling or uncertainty sampling with a C-SVM). Experiments involve one application type but they may involve several different algorithms, enabling the evaluation and comparison of different algorithms. The algorithm manager in Figure 1 is responsible for routing each query and reported answer to the algorithms involved in an experiment. For experiments involving multiple algorithms, this routing could be round-robin, randomized, or optimized in a more sophisticated manner. For example, it is possible to implement a multi-armed bandit algorithm inside the algorithm manager in order to select algorithms adaptively to minimize some notion of regret. Each application defines an algorithm management module and a contract for the three functions of active learning: getQuery, processAnswer, and modelUpdate as described in Figure 2. Each algorithm implemented in NEXT will gain access to a locking synchronous queue for model updates, logging functionality, automated dashboards for performance statistics and timing, load balancing, and graphical user interfaces for participants. To implement a new algorithm, a developer must write the associated getQuery, processAnswer, and updateModel functions in Python (see examples in supplementary materials); the rest is handled automatically by NEXT. We hope this ease of use will encourage researchers to experiment with and compare new active learning algorithms. NEXT is hosted on Github and we urge users to push their local application and algorithm implementations to the repository. 3 Example Applications NEXT is capable of hosting any active (or passive) learning application. To demonstrate the capabilities of the system, we look at two applications motivated by cognitive science studies. The collected raw data along with instructions to easily reproduce these examples, which can be used as templates to extend, are available on the NEXT project page. 3.1 Pure exploration for dueling bandits The first experiment type we consider is a pure-exploration problem in the dueling bandits framework [3], based on the New Yorker Caption Contest2 . Each week New Yorker readers are invited to submit captions for a cartoon, and a winner is picked from among these entries. We used a dataset from the contest for our experiments. Participants in our experiment are shown a cartoon along with two captions. Each participant’s task is to pick the caption they think is the funnier of the two. This is repeated with many caption pairs and different participants. The objective of the learning algorithm is to determine which caption participants think is the funniest overall as quickly as possible (i.e., using as few comparative judgments as possible). In our experiments, we chose an arbitrary cartoon and n = 25 arbitrary captions from a curated set from the New Yorker dataset (the cartoon and all 25 captions can be found in the supplementary materials). The number of captions was limited to 25 primarily to keep the experimental dollar cost reasonable, but the NEXT system is capable of handling arbitrarily large numbers of captions (arms) and duels. Dueling Bandit Algorithms - There are several notions of a “best” arm in the dueling bandit framework, including the Condorcet, Copeland, and Borda criteria. We focus on the Borda criterion in this experiment for two reasons. First, algorithms based on the Condorcet or Copeland criterion 2We thank Bob Mankoff, cartoon editor of The New Yorker, for sharing the cartoon and caption data used in our experiments. www.newyorker.com 4 Caption Plurality vote Thompson UCB Successive Elim. Random Beat the Mean My last of... 0.215 ± 0.013 0.638 ± 0.013 0.645 ± 0.017 0.640 ± 0.033 0.638 ± 0.031 0.663 ± 0.030 The last g... 0.171 ± 0.013 0.632 ± 0.017 0.653 ± 0.016 0.665 ± 0.033 0.678 ± 0.030 0.657 ± 0.031 The women’... 0.151 ± 0.013 0.619 ± 0.026 0.608 ± 0.023 0.532 ± 0.032 0.519 ± 0.030 0.492 ± 0.032 Do you eve... 0.121 ± 0.013 0.587 ± 0.027 0.534 ± 0.036 0.600 ± 0.030 0.578 ± 0.032 0.653 ± 0.033 I’m drowni... 0.118 ± 0.013 0.617 ± 0.018 0.623 ± 0.020 0.588 ± 0.032 0.594 ± 0.032 0.667 ± 0.031 Think of i... 0.087 ± 0.013 0.564 ± 0.031 0.500 ± 0.044 0.595 ± 0.032 0.640 ± 0.034 0.618 ± 0.033 They promi... 0.075 ± 0.013 0.620 ± 0.021 0.623 ± 0.021 0.592 ± 0.032 0.613 ± 0.029 0.632 ± 0.033 Want to ge... 0.061 ± 0.013 0.418 ± 0.061 0.536 ± 0.037 0.566 ± 0.031 0.621 ± 0.031 0.482 ± 0.032 Table 1: Dueling bandit results for identifying the “funniest” caption for a New Yorker cartoon. Darker shading corresponds to an algorithm’s rank-order of its predictions for the winner. generally require sampling all !25 2 " = 300 possible pairs of arms/captions multiple times [4, 3]. Algorithms based on the Borda criterion do not necessarily require such exhaustive sampling, making them more attractive for large-scale problems [5]. Second, one can reduce dueling bandits with the Borda criterion to the standard multi-armed bandit problem using a scheme known as the Borda Reduction (BR) [5], allowing one to use a number of well-known and tested bandit algorithms. The algorithms considered in our experiment are: random uniform sampling with BR, Successive Elimination with BR [6], UCB with BR [7], Thompson Sampling with BR [8], and Beat the Mean [9] which was originally designed for identifying the Condorcet winner (see the supplementary materials for more implementation details). Experimental Setup and Results - We posted 1250 NEXT tasks to Mechanical Turk each of which asked a unique participant to make 25 comparison judgements for $0.15. For each comparative judgment, one of the five algorithms was chosen uniformly at random to select the caption pair and the participant’s decision was used to update that algorithm only. Each algorithm ranked the captions in order of the empirical Borda score estimates, except the Beat the Mean algorithm which used its modified Borda score [9].To compare the quality of these results, we collected data in two different ways. First, we took union of the top-5 captions from each algorithm, resulting in 8 “top captions,” and asked a different set of 1497 participants to vote for the funniest of these 8 (one vote per participant); we denote this the plurality vote ranking. The number of captions shown to each participant was limited to 8 for practical reasons (e.g., display, voting ease). The results of the experiment are summarized in Table 1. Each row corresponds to one of the 8 top captions and the columns correspond to different algorithms. Each table entry is the Borda score estimated by the corresponding algorithm, followed by a bound on its standard deviation. The bound is based on a Bernoulli model for the responses and is simply p 1/(4k), where k is the number judgments collected for the corresponding caption (which depends on the algorithm). The relative ranking of the scores is what is relevant here, but the uncertainties given an indication of each algorithm’s certainty of these scores. In the table, each algorithm’s best guess at the “funniest” captions are highlighted in decreasing order with darker to lighter shades. Overall, the predicted captions of the algorithms, which generally optimize for the Borda criterion, appear to be in agreement with the result of the plurality vote. One thing that should be emphasized is that the uncertainty (standard deviation) of the top arm scores of Thompson Sampling and UCB is about half the uncertainty observed for the top three arms of the other methods, which suggests that these algorithms can provide confident answers with 1/4 of the samples needed by other algorithms. This is the result of Thompson Sampling and UCB being more aggressive and adaptive early on, compared to the other methods, and therefore we recommend them for applications of this sort. We conclude that Thompson Sampling and UCB perform best for this application and require significantly fewer samples than non-adaptive random sampling or other bandit algorithms. The results of a replication of this study can be found in the supplementary materials, from which the same conclusions can be made. 3.2 Active Non-metric Multidimensional Scaling Finding low-dimensional representations is a fundamental problem in machine learning. Non-metric multidimensional scaling (NMDS) is a classic technique that embeds a set of items into a low5 dimensional metric space so that distances in that space predict a given set of (non-metric) human judgments of the form “k is closer to i than j.” This learning task is more formidable than the dueling bandits problem in a number of ways, providing an interesting contrast in terms of demands and tradeoffs in the system. First, NMDS involves triples of items, rather than pairs, posing greater challenges to scalability. Second, updating the embedding as new data are collected is much more computationally intensive, which makes managing the tradeoff between updating the embedding and carefully selecting new queries highly non-trivial. Formally, the NMDS problem is defined as follows. Given a set S comparative judgments and an embedding dimension d ≥1, the ideal goal is to identify a set of points {x1, . . . , xn} ⇢Rd such that ||xi −xk||2 < ||xj −xk||2 if “k is closer to i than j” is one of the given comparative judgments. In situations where no embedding exists that agrees with all of the judgments in S, the goal is to find an embedding that agrees on as many judgements as possible. Active learning can be used to accelerate this learning process as follows. Once an embedding is found based on a subset of judgments, the relative locations of the objects, at least at a coarse level, are constrained. Consequently, many other judgments (not yet collected) can be predicted from the coarse embedding, while others are still highly uncertain. The goal of active learning algorithms in this setting is to adaptively select as few triplet queries (e.g., “is k closer to i or j?”) as possible in order to identify the structure of the embedding. Active Sampling Algorithms - NMDS is usually posed as an optimization problem. Note that ||xi −xk||2 < ||xj −xk||2 () xT i xi −2xT i xk −xT j xj + 2xT j xk () hXXT , Hi,j,ki where X = (x1, x2, . . . , xn)T 2 Rn⇥d and Hi,j,k is an all-zeros matrix except for the sub-matrix eH = [1, 0, −1; 0, −1, 1; −1, 1, 0] defined on the indices [i, j, k]⇥[i, j, k]. This suggests an optimization: minX2Rn⇥d 1 |S| P (i,j,k)2S ` ! hXXT , Hi,j,ki " , where ` in the literature has taken the form of hinge-loss, logistic-loss, or a general negative log-likelihood of a probabilistic model [10, 11, 12]. One may also recognize the similarity of this optimization problem with that of learning a linear classifier; here XXT plays the role of a hyperplane and the Hi,j,k matrices are labeled examples. Indeed, we apply active learning approaches developed for linear classifiers, like uncertainty sampling [13], to NMDS. Two active learning algorithms have been proposed in the past for this specific application [11, 14]. Here we consider four data collection methods, inspired by these past works: 1) (passive) uniform random sampling, 2) uncertainty sampling based off an embedding discovered by minimizing a hinge-loss objective 3) approximate maximum information gain sampling using the Crowd Kernel approach in [11], and 4) approximate maximum information gain sampling using the t-STE distribution in [12]. Care was taken in the implementations to make these algorithms perform as well as possible in a realtime environment, and we point the interested reader to the Supplementary Materials and source code for details. Experimental Setup and Results - We have used NEXT for NMDS in many applications, including embedding faces, words, numbers and images. Here we focus on a particular set of synthetic 3d shape images that can be found in the supplementary materials. Each shape can be represented by a single parameter reflecting it’s smoothness, so an accurate embedding should recover a one dimensional manifold. The dataset consists of n = 30 shapes selected uniformly from the 1d manifold, and so in total there are 30 !29 2 " = 12180 unique triplet queries that could be asked. For all algorithms we set d = 2 for a 2d embedding (although we hope to see the intrinsic 1d manifold in the result). Each participant was asked to answer 50 triplet queries and 400 total participants contributed to the experiment. For each query, an algorithm was chosen uniformly at random from the union of the set of algorithms plus an additional random algorithm whose queries were used for the hold-out set. Consequently, each algorithm makes approximately 4000 queries. We consider three different algorithms for generating embeddings from triplets, 1) embedding that minimizes hinge loss that we call “Hinge” [10], 2) the Crowd Kernel embedding with µ = 0.05 that we call “CK” [11], and 3) and the t-STE embedding ↵= 1 [12]. We wish to evaluate the sampling strategies, not the embedding strategies, so we apply each embedding strategy to each sampling procedure described above. To evaluate the algorithms, we sort the collected triplets for each algorithm by timestamp, and then every 300 triplets we compute an embedding using that algorithm’s answers and each strategy for 6 Figure 3: (Top) Stimuli used for the experiment. (Left) Triplet prediction error. (Right) Nearest neighbor prediction accuracy. identifying an embedding. In Figure 10, the left panel evaluates the triplet prediction performance of the embeddings on the entire collected hold-out set of triplets while the right panel evaluates the nearest neighbor prediction of the algorithms. For each point in the embedding we look at its true nearest neighbor on the manifold in which the data was generated and we say an embedding accurately predicts the nearest neighbor if the true nearest neighbor is within the top three nearest neighbors of the point in the embedding, we then average over all points. Because this is just a single trial, the evaluation curves are quite rough. The results of a replication of this experiment can be found in the supplementary materials from which the same conclusions are made. We conclude across both metrics and all sampling algorithms, the embeddings produced by minimizing hinge loss do not perform as well as those from Crowd Kernel or t-STE. In terms of predicting triplets, the experiment provides no evidence that the active selection of triplets provides any improvement over random selection. In terms of nearest neighbor prediction, UncertaintySampling may have a slight edge, but it is very difficult to make any conclusions with certainty. As in all deployed active learning studies, we can not rule out the possibility that it is our implementation that is responsible for the disappointment and not the algorithms themselves. However, we note that when simulating human responses with Bernoulli noise under similar load conditions, uncertainty sampling outperformed all other algorithms by a measurable margin leading us to believe that these active learning algorithms may not be robust to human feedback. To sum up, in this application there is no evidence for gains from adaptive sampling, but Crowd Kernel and t-STE do appear to provide slightly better embeddings than the hinge loss optimization. But we caution that this is but a single, possibly unrepresentative datapoint. 4 Implementation details of NEXT The entire NEXT system was designed with machine learning researchers and practitioners in mind rather than engineers with deep systems background. NEXT is almost completely written in Python, but algorithms can be implemented in any programming language and wrapped in a python wrapper. We elected to use a variety of startup scripts and Dockerfor deployment to automate the provisioning process and minimize configuration issues. Details on specific software packages used can be found in the supplementary materials. Many components of NEXT can be scaled to work in a distributed environment. For example, serving many (near) simultaneous ‘getQuery’ requests is straightforward; one can simply enlarge the pool of workers by launching additional slave machines and point them towards the web request 7 queue, just like typical web-apps are scaled. This approach to scaling active learning has been studied rigorously [15]. Processing tasks such as data fitting and selection can also be accelerated using standard distributed platforms (see next section). A more challenging scaling issue arises in the learning process. Active learning algorithms update models sequentially as data are collected and the models guide the selection of new data. Recall that this serial process is handled by a model update queue. When a worker accepts a job from the queue, the queue is locked until that job is finished. The processing times required for model fitting and data selection introduce latencies that may reduce possible speedups afforded by active learning compared to passive learning (since the rate of ‘getQuery’ requests could exceed the processing rate of the learning algorithm). If the number of algorithms running in parallel outnumber the number of workers dedicated to serving the synchronous locking model update queues, performance can be improved by adding more slave machines, and thus workers, to process the queues. Simulating a load with stress-tests and inspecting the provided dashboards on NEXT of CPU, memory, queue size, model-staleness, etc. makes deciding the number of machines for an expected load a straightforward task. An algorithm in NEXT could also bypass the locking synchronous queue by employing asynchronous schemes like [16] directly in processAnswer. This could speed up processing through parallelization, but could reduce active learning speedups since workers may overwrite the previous work of others. 5 Related Work and Discussion There have been some examples of deployed active learning with human feedback; for human perception [11, 17], interactive search and citation screening [18, 19], and in particular by research groups from industry, for web content personalization and contextual advertising [20, 21]. However, these remain special purpose implementations, while the proposed NEXT system provides a flexible and general-purpose active learning platform that is versatile enough to develop, test, and field any of these specific applications. Moreover, previous real-world deployments have been difficult to replicate. NEXT could have a profound effect on research reproducibility; it allows anyone to easily replicate past (and future) algorithm implementations, experiments, and applications. There exist many sophisticated libraries and systems for performing machine learning at scale. Vowpal Wabbit [22], MLlib [23], Oryx [24] and GraphLab [25] are all excellent examples of state-of-theart software systems designed to perform inference tasks like classification, regression, or clustering at enormous scale. Many of these systems are optimized for operating on a fixed, static dataset, making them incomparable to NEXT. But some, like Vowpal Wabbit have some active learning support. The difference between these systems and NEXT is that their goal was to design and implement the best possible algorithms for very specific tasks that will take the fullest advantage of each system’s own capabilities. These systems provide great libraries of machine learning tools, whereas NEXT is an experimental platform to develop, test, and compare active learning algorithms and to allow practitioners to easily use active learning methods for data collection. In the crowd-sourcing space there exist excellent tools like PsiTurk [1], AutoMan [2], and CrowdFlower [26] that provide functionality to simplify various aspects of crowdsourcing, including automated task management and quality assurance controls. While successful in this aim, these crowd programming libraries do not incorporate the necessary infrastructure for deploying active learning across participants or adaptive data acquisition strategies. NEXT provides a unique platform for developing active crowdsourcing capabilities and may play a role in optimizing the use of humancomputational resources like those discussed in [27]. Finally, while systems like Oryx [24] and Velox [28] that leverage Apache Spark are made for deployment on the web and model serving, they were designed for very specific types of models that limit their versatility and applicability. They were also built for an audience with a greater familiarity with systems and understandably prioritize computational performance over, for example, the human-time it might take a cognitive scientist or active learning theorist to figure out how to actively crowdsource a large human-subject study using Amazon’s Mechanical Turk. At the time of this submission, NEXT has been used to ask humans hundreds of thousands of actively selected queries in ongoing cognitive science studies. Working closely with cognitive scientists who relied on the system for their research helped us make NEXT predictable, reliable, easy to use and, we believe, ready for everyone. 8 References [1] T.M. Gureckis, J. Martin, J. McDonnell, et al. psiTurk: An open-source framework for conducting replicable behavioral experiments online. (in press). [2] Daniel W Barowy, Charlie Curtsinger, Emery D Berger, and Andrew McGregor. Automan: A platform for integrating human-based and digital computation. ACM SIGPLAN Notices, 47(10):639–654, 2012. [3] Yisong Yue, Josef Broder, Robert Kleinberg, and Thorsten Joachims. The k-armed dueling bandits problem. Journal of Computer and System Sciences, 78(5), 2012. [4] Tanguy Urvoy, Fabrice Clerot, Raphael F´eraud, and Sami Naamane. Generic exploration and k-armed voting bandits. In Proceedings of the 30th International Conference on Machine Learning, 2013. [5] Kevin Jamieson, Sumeet Katariya, Atul Deshpande, and Robert Nowak. Sparse dueling bandits. AISTATS, 2015. [6] Eyal Even-Dar, Shie Mannor, and Yishay Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. The Journal of Machine Learning Research, 7:1079–1105, 2006. [7] Kevin Jamieson, Matthew Malloy, Robert Nowak, and S´ebastien Bubeck. lil’ucb: An optimal exploration algorithm for multi-armed bandits. In Proceedings of The 27th Conference on Learning Theory, 2014. [8] Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. In Advances in neural information processing systems, pages 2249–2257, 2011. [9] Yisong Yue and Thorsten Joachims. Beat the mean bandit. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 241–248, 2011. [10] Sameer Agarwal, Josh Wills, Lawrence Cayton, et al. Generalized non-metric multidimensional scaling. In International Conference on Artificial Intelligence and Statistics, pages 11–18, 2007. [11] Omer Tamuz, Ce Liu, Ohad Shamir, Adam Kalai, and Serge J Belongie. Adaptively learning the crowd kernel. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), 2011. [12] Laurens Van Der Maaten and Kilian Weinberger. Stochastic triplet embedding. In Machine Learning for Signal Processing (MLSP), 2012 IEEE International Workshop on, pages 1–6. IEEE, 2012. [13] Burr Settles. Active learning literature survey. University of Wisconsin, Madison, 52(55-66):11. [14] Kevin G Jamieson and Robert D Nowak. Low-dimensional embedding using adaptively selected ordinal data. In Allerton Conference on Communication, Control, and Computing, 2011. [15] Alekh Agarwal, Leon Bottou, Miroslav Dudik, and John Langford. Para-active learning. arXiv preprint arXiv:1310.8243, 2013. [16] Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems, 2011. [17] All our ideas. http://allourideas.org/. Accessed: 2015-09-15. [18] Byron C Wallace, Kevin Small, Carla E Brodley, Joseph Lau, and Thomas A Trikalinos. Deploying an interactive machine learning system in an evidence-based practice center: abstrackr. In Proceedings of the 2nd ACM SIGHIT International Health Informatics Symposium, pages 819–824. ACM, 2012. [19] Kyle H Ambert, Aaron M Cohen, Gully APC Burns, Eilis Boudreau, and Kemal Sonmez. Virk: an active learning-based system for bootstrapping knowledge base development in the neurosciences. Frontiers in neuroinformatics, 7, 2013. [20] Lihong Li, Wei Chu, John Langford, and Robert E Schapire. A contextual-bandit approach to personalized news article recommendation. In International conference on World wide web. ACM, 2010. [21] Deepak Agarwal, Bee-Chung Chen, and Pradheep Elango. Explore/exploit schemes for web content optimization. In Data Mining, 2009. ICDM. Ninth IEEE International Conference on. IEEE, 2009. [22] Alekh Agarwal, Olivier Chapelle, Miroslav Dud´ık, and John Langford. A reliable effective terascale linear learning system. The Journal of Machine Learning Research, 15(1):1111–1133, 2014. [23] Xiangrui Meng et al. MLlib: Machine learning in apache spark. arXiv:1505.06807, 2015. [24] Oryx 2. https://github.com/OryxProject/oryx. Accessed: 2015-06-05. [25] Yucheng Low, Danny Bickson, Joseph Gonzalez, et al. Distributed graphlab: a framework for machine learning and data mining in the cloud. Proceedings of the VLDB Endowment, 5(8):716–727, 2012. [26] CrowdFlower. http://www.crowdflower.com/. Accessed: 2015-06-05. [27] Seungwhan Moon and Jaime G Carbonell. Proactive learning with multiple class-sensitive labelers. In Data Science and Advanced Analytics (DSAA), 2014 International Conference on. IEEE, 2014. [28] Daniel Crankshaw, Peter Bailis, Joseph E Gonzalez, et al. The missing piece in complex analytics: Low latency, scalable model management and serving with velox. CIDR, 2015. 9 | 2015 | 216 |
5,721 | A Pseudo-Euclidean Iteration for Optimal Recovery in Noisy ICA James Voss The Ohio State University vossj@cse.ohio-state.edu Mikhail Belkin The Ohio State University mbelkin@cse.ohio-state.edu Luis Rademacher The Ohio State University lrademac@cse.ohio-state.edu Abstract Independent Component Analysis (ICA) is a popular model for blind signal separation. The ICA model assumes that a number of independent source signals are linearly mixed to form the observed signals. We propose a new algorithm, PEGI (for pseudo-Euclidean Gradient Iteration), for provable model recovery for ICA with Gaussian noise. The main technical innovation of the algorithm is to use a fixed point iteration in a pseudo-Euclidean (indefinite “inner product”) space. The use of this indefinite “inner product” resolves technical issues common to several existing algorithms for noisy ICA. This leads to an algorithm which is conceptually simple, efficient and accurate in testing. Our second contribution is combining PEGI with the analysis of objectives for optimal recovery in the noisy ICA model. It has been observed that the direct approach of demixing with the inverse of the mixing matrix is suboptimal for signal recovery in terms of the natural Signal to Interference plus Noise Ratio (SINR) criterion. There have been several partial solutions proposed in the ICA literature. It turns out that any solution to the mixing matrix reconstruction problem can be used to construct an SINR-optimal ICA demixing, despite the fact that SINR itself cannot be computed from data. That allows us to obtain a practical and provably SINR-optimal recovery method for ICA with arbitrary Gaussian noise. 1 Introduction Independent Component Analysis refers to a class of methods aiming at recovering statistically independent signals by observing their unknown linear combination. There is an extensive literature on this and a number of related problems [7]. In the ICA model, we observe n-dimensional realizations x(1), . . . , x(N) of a latent variable model X = Pm k=1 SkAk = AS where Ak denotes the kth column of the n × m mixing matrix A and S = (S1, . . . , Sm)T is the unseen latent random vector of “signals”. It is assumed that S1, . . . , Sm are independent and non-Gaussian. The source signals and entries of A may be either real- or complex-valued. For simplicity, we will assume throughout that S has zero mean, as this may be achieved in practice by centering the observed data. Many ICA algorithms use the preprocessing “whitening” step whose goal is to orthogonalize the independent components. In the noiseless, case this is commonly done by computing the square root of the covariance matrix of X. Consider now the noisy ICA model X = AS + η with additive 0-mean noise η independent of S. It turns out that the introduction of noise makes accurate recovery of the signals significantly more involved. Specifically, whitening using the covariance matrix does not work in the noisy ICA model as the covariance matrix combines both signal and noise. For the case when the noise is Gaussian, matrices constructed from higher order statistics (specifically, cumulants) can be used instead of the covariance matrix. However, these matrices are not in general positive definite and thus the square root cannot always be extracted. This limits the applicability of 1 several previous methods, such as [1, 2, 9]. The GI-ICA algorithm proposed in [21] addresses this issue by using a complicated quasi-orthogonalization step followed by an iterative method. In this paper (section 2), we develop a simple and practical one-step algorithm, PEGI (for pseudoEuclidean Gradient Iteration) for provably recovering A (up to the unavoidable ambiguities of the model) in the case when the noise is Gaussian (with an arbitrary, unknown covariance matrix). The main technical innovation of our approach is to formulate the recovery problem as a fixed point method in an indefinite (pseudo-Euclidean) “inner product” space. The second contribution of the paper is combining PEGI with the analysis of objectives for optimal recovery in the noisy ICA model. In most applications of ICA (e.g., speech separation [18], MEG/EEG artifact removal [20] and others) one cares about recovering the signals s(1), . . . , s(N). This is known as the source recovery problem. This is typically done by first recovering the matrix A (up to an appropriate scaling of the column directions). At first, source recovery and recovering the mixing matrix A appear to be essentially equivalent. In the noiseless ICA model, if A in invertible1 then s(t) = A−1x(t) recovers the sources. On the other hand, in the noisy model, the exact recovery of the latent sources s(t) becomes impossible even if A is known exactly. Part of the “noise” can be incorporated into the “signal” preserving the form of the model. Even worse, neither A nor S are defined uniquely as there is an inherent ambiguity in the setting. There could be many equivalent decompositions of the observed signal as X = A′S′ + η′ (see the discussion in section 3). We consider recovered signals of the form ˆS(B) := BX for a choice of m × n demixing matrix B. Signal recovery is considered optimal if the coordinates of ˆS(B) = ( ˆS1(B), . . . , ˆSm(B)) maximize Signal to Interference plus Noise Ratio (SINR) within any fixed model X = AS + η. Note that the value of SINR depends on the decomposition of the observed data into “noise” and “signal”: X = A′S′ + η′. Surprisingly, the SINR optimal demixing matrix does not depend on the decomposition of data into signal plus noise. As such, SINR optimal ICA recovery is well defined given access to data despite the inherent ambiguity in the model. Further, it will be seen that the SINR optimal demixing can be constructed from cov(X) and the directions of the columns of A (which are also well-defined across signal/noise decompositions). Our SINR-optimal demixing approach combined with the PEGI algorithm provides a complete SINR-optimal recovery algorithm in the ICA model with arbitrary Gaussian noise. We note that the ICA papers of which we are aware that discuss optimal demixing do not observe that SINR optimal demixing is invariant to the choice of signal/noise decomposition. Instead, they propose more limited strategies for improving the demixing quality within a fixed ICA model. For instance, Joho et al. [14] show how SINR-optimal demixing can be approximated with extra sensors when assuming a white additive noise, and Koldovsk`y and Tichavsk`y [16] discuss how to achieve asymptotically low bias ICA demixing assuming white noise within a fixed ICA model. However, the invariance of the SINR-optimal demixing matrix appears in the array sensor systems literature [6]. Finally, in section 4, we demonstrate experimentally that our proposed algorithm for ICA outperforms existing practical algorithms at the task of noisy signal recovery, including those specifically designed for beamforming, when given sufficiently many samples. Moreover, most existing practical algorithms for noisy source recovery have a bias and cannot recover the optimal demixing matrix even with infinite samples. We also show that PEGI requires significantly fewer samples than GI-ICA [21] to perform ICA accurately. 1.1 The Indeterminacies of ICA Notation: We use M ∗to denote the entry-wise complex conjugate of a matrix M, M T to denote its transpose, M H to denote its conjugate transpose, and M † to denote its Moore-Penrose pseudoinverse. Before proceeding with our results, we discuss the somewhat subtle issue of indeterminacies in ICA. These ambiguities arise from the fact that the observed X may have multiple decompositions into ICA models X = AS + η and X = A′S′ + η′. 1A−1 can be replaced with A† (A’s pseudoinverse) in the discussion below for over-determined ICA. 2 Noise-free ICA has two natural indeterminacies. For any nonzero constant α, the contribution of the kth component AkSk to the model can equivalently be obtained by replacing Ak with αAk and Sk with the rescaled signal 1 αSk. To lessen this scaling indeterminacy, we use the convention2 that cov(S) = I throughout this paper. As such, each source Sk (or equivalently each Ak) is defined up to a choice of sign (a unit modulus factor in the complex case). In addition, there is an ambiguity in the order of the latent signals. For any permutation π of [m] (where [m] := {1, . . . , m}), the ICA models X = Pm k=1 SkAk and X = Pm k=1 Sπ(k)Aπ(k) are indistinguishable. In the noise free setting, A is said to be recovered if we recover each column of A up to a choice of sign (or up to a unit modulus factor in the complex case) and an unknown permutation. As the sources S1, . . . , Sm are only defined up to the same indeterminacies, inverting the recovered matrix ˜A to obtain a demixing matrix works for signal recovery. In the noisy ICA setting, there is an additional indeterminacy in the definition of the sources. Consider a 0-mean axis-aligned Gaussian random vector ξ. Then, the noisy ICA model X = A(S + ξ) + η in which ξ is considered part of the latent source signal S′ = S+ξ, and the model X = AS+(Aξ +η) in which ξ is part of the noise are indistinguishable. In particular, the latent source S and its covariance are ill-defined. Due to this extra indeterminacy, the lengths of the columns of A no longer have a fully defined meaning even when we assume cov(S) = I. In the noisy setting, A is said to be recovered if we obtain the columns of A up to non-zero scalar multiplicative factors and an arbitrary permutation. The last indeterminacy is the most troubling as it suggests that the power of each source signal is itself ill-defined in the noisy setting. Despite this indeterminacy, it is possible to perform an SINR-optimal demixing without additional assumptions about what portion of the signal is source and what portion is noise. In section 3, we will see that SINR-optimal source recovery takes on a simple form: Given any solution ˜A which recovers A up to the inherent ambiguities of noisy ICA, then ˜AH cov(X)† is an SINR-optimal demixing matrix. 1.2 Related Work and Contributions Independent Component Analysis is probably the most used model for Blind Signal Separation. It has seen numerous applications and has generated a vast literature, including in the noisy and underdetermined settings. We refer the reader to the books [7, 13] for a broad overview of the subject. It was observed early on by Cardoso [4] that ICA algorithms based soley on higher order cumulant statistics are invariant to additive Gaussian noise. This observation has allowed the creation of many algorithms for recovering the ICA mixing matrix in the noisy and often underdetermined settings. Despite the significant work on noisy ICA algorithms, they remain less efficient, more specialized, or less practical than the most popular noise free ICA algorithms. Research on cumulant-based noisy ICA can largely be split into several lines of work which we only highlight here. Some algorithms such as FOOBI [4] and BIOME [1] directly use the tensor structure of higher order cumulants. In another line of work, De Lathauwer et al. [8] and Yeredor [23] have suggested algorithms which jointly diagonalize cumulant matrices in a manner reminiscent of the noise-free JADE algorithm [3]. In addition, Yeredor [22] and Goyal et al. [11] have proposed ICA algorithms based on random directional derivatives of the second characteristic function. Each line of work has its advantages and disadvantages. The joint diagonalization algorithms and the tensor based algorithms tend to be practical in the sense that they use redundant cumulant information in order to achieve more accurate results. However, they have a higher memory complexity than popular noise free ICA algorithms such as FastICA [12]. While the tensor methods (FOOBI and BIOME) can be used when there are more sources than the dimensionality of the space (the underdetermined ICA setting), they require all the latent source signals to have positive order 2k cumulants (k ≥2, a predetermined fixed integer) as they rely on taking a matrix square root. Finally, the methods based on random directional derivatives of the second characteristic function rely heavily upon randomness in a manner not required by the most popular noise free ICA algorithms. We continue a line of research started by Arora et al. [2] and Voss et al. [21] on fully determined noisy ICA which addresses some of these practical issues by using a deflationary approach reminiscent of FastICA. Their algorithms thus have lower memory complexity and are more scalable to high dimensional data than the joint diagonalization and tensor methods. However, both works require 2Alternatively, one may place the scaling information in the signals by setting ∥Ak∥= 1 for each k. 3 a preprocessing step (quasi-orthogonalization) to orthogonalize the latent signals which is based on taking a matrix square root. Arora et al. [2] require each latent signal to have positive fourth cumulant in order to carry out this preprocessing step. In contrast, Voss et al. [21] are able to perform quasi-orthogonalization with source signals of mixed sign fourth cumulants; but their quaseorthogonalization step is more complicated and can run into numerical issues under sampling error. We demonstrate that quasi-orthogonalization is unnecessary. We introduce the PEGI algorithm to work within a (not necessarily positive definite) inner product space instead. Experimentally, this leads to improved demixing performance. In addition, we handle the case of complex signals. Finally, another line of work attempts to perform SINR-optimal source recovery in the noisy ICA setting. It was noted by Koldovsk`y and Tichavsk`y [15] that for noisy ICA, traditional ICA algorithms such as FastICA and JADE actually outperform algorithms which first recover A in the noisy setting and then use the resulting approximation of A† to perform demixing. It was further observed that A† is not the optimal demixing matrix for source recovery. Later, Koldovsk`y and Tichavsk`y [17] proposed an algorithm based on FastICA which performs a low SINR-bias beamforming. 2 Pseudo-Euclidean Gradient Iteration ICA In this section, we introduce the PEGI algorithm for recovering A in the “fully determined” noisy ICA setting where m ≤n. PEGI relies on the idea of Gradient Iteration introduced Voss et al. [21]. However, unlike GI-ICA Voss et al. [21], PEGI does not require the source signals to be orthogonalized. As such, PEGI does not require the complicated quasi-orthogonalization preprocessing step of GI-ICA which can be inaccurate to compute in practice. We sketch the Gradient Iteration algorithm in Section 2.1, and then introduce PEGI in Section 2.2. For simplicity, we limit this discussion to the case of real-valued signals. A mild variation of our PEGI algorithm works for complex-valued signals, and its construction is provided in the supplementary material. In this section we assume a noisy ICA model X = AS + η such that η is arbitrary Gaussian and independent of S. We also assume that m ≤n, that m is known, and that the columns of A are linearly independent. 2.1 Gradient Iteration with Orthogonality The gradient iteration relies on the properties of cumulants. We will focus on the fourth cumulant, though similar constructions may be given using other even order cumulants of higher order. For a zero-mean random variable X, the fourth order cumulant may be defined as κ4(X) := E[X4] − 3E[X2]2 [see 7, Chapter 5, Section 1.2]. Higher order cumulants have nice algebraic properties which make them useful for ICA. In particular, κ4 has the following properties: (1) (Independence) If X and Y are independent, then κ4(X + Y ) = κ4(X) + κ4(Y ). (2) (Homogeneity) If α is a scalar, then κ4(αX) = α4κ4(X). (3) (Vanishing Gaussians) If X is normally distributed then κ4(X) = 0. We consider the following function defined on the unit sphere: f(u) := κ4(⟨X, u⟩). Expanding f(u) using the above properties we obtain: f(u) = κ4 Xm k=1⟨Ak, u⟩Sk + ⟨u, η⟩ = Xm k=1⟨Ak, u⟩4κ4(Sk) . Taking derivatives we obtain: ∇f(u) = 4 Xm k=1⟨Ak, u⟩3κ4(Sk)Ak (1) Hf(u) = 12 Xm k=1⟨Ak, u⟩2κ4(Sk)AkAT k = AD(u)AT (2) where D(u) is a diagonal matrix with entries D(u)kk = 12⟨Ak, u⟩2κ4(Sk). We also note that f(u), ∇f(u), and Hf(u) have natural sample estimates (see [21]). Voss et al. [21] introduced GI-ICA as a fixed point algorithm under the assumption that the columns of A are orthogonal but not necessarily unit vectors. The main idea is that the update u ←∇f(u)/∥∇f(u)∥is a form of a generalized power iteration. From equation (1), each Ak may be considered as a direction in a hidden orthogonal basis of the space. During each iteration, the Ak coordinate of u is raised to the 3rd power and multiplied by a constant. Treating this iteration as a fixed point update, it was shown that given a random starting point, this iterative procedure converges rapidly to one of the columns of A (up to a choice of sign). The rate of convergence is cubic. 4 However, the GI-ICA algorithm requires a somewhat complicated preprocessing step called quasi-orthogonalization to linearly transform the data to make columns of A orthogonal. Quasiorthogonalization makes use of evaluations of Hessians of the fourth cumulant function to construct a matrix of the form C = ADAT where D has all positive diagonal entries—a task which is complicated by the possibility that the latent signals Si may have fourth order cumulants of differing signs—and requires taking the matrix square root of a positive definite matrix of this form. However, the algorithm used for constructing C under sampling error is not always positive definite in practice, which can make the preprocessing step fail. We will show how our PEGI algorithm makes quasi-orthogonalization unnecessary, in particular, resolving this issue. 2.2 Gradient Iteration in a Pseudo-Euclidean Space We now show that the gradient iteration can be performed using in a pseudo-Euclidean space in which the columns of A are orthogonal. The natural candidate for the “inner product space” would be to use ⟨·, ·⟩∗defined as ⟨u, v⟩∗:= uT (AAT )†v. Clearly, ⟨Ai, Aj⟩∗= δij gives the desired orthogonality property. However, there are two issues with this “inner product space”: First, it is only an inner product space when A is invertible. This turns out not to be a major issue, and we move forward largely ignoring this point. The second issue is more fundamental: We only have access to AAT in the noise free setting where cov(X) = AAT . In the noisy setting, we have access to matrices of the form Hf(u) = AD(u)AT from equation (2) instead. Algorithm 1 Recovers a column of A up to a scaling factor if u0 is generically chosen. Inputs: Unit vector u0, C, ∇f k ←1 repeat uk ←∇f(C†uk−1)/∥∇f(C†uk−1)∥ k ←k + 1 until Convergence (up to sign) return uk We consider a pseudo-Euclidean inner product defined as follows: Let C = ADAT where D is a diagonal matrix with non-zero diagonal entries, and define ⟨·, ·⟩C by ⟨u, v⟩C = uT C†v. When D contains negative entries, this is not a proper inner product since C is not positive definite. In particular, ⟨Ak, Ak⟩C = AT k (ADAT )†Ak = d−1 kk may be negative. Nevertheless, when k ̸= j, ⟨Ak, Aj⟩C = AT k (ADAT )†Aj = 0 gives that the columns of A are orthogonal in this space. We define functions αk : Rn →R by αk(u) = (A†u)k such that for any u ∈span(A1, . . . , Am), then u = Pm i=1 αi(u)Ai is the expansion of u in its Ai basis. Continuing from equation (1), for any u ∈Sn−1 we see ∇f(C†u) = 4 Pn k=1⟨Ak, C†u⟩3κ4(Sk)Ak = 4 Pn k=1⟨Ak, u⟩3 Cκ4(Sk)Ak is the gradient iteration recast in the ⟨·, ·⟩C space. Expanding u in its Ak basis, we obtain ∇f(C†u) = 4 Xm k=1(αk(u)⟨Ak, Ak⟩C)3κ4(Sk)Ak = 4 Xm k=1 αk(u)3(d−3 kk κ4(Sk))Ak , (3) which is a power iteration in the unseen Ak coordinate system. As no assumptions are made upon the κ4(Sk) values, the d−3 kk scalings which were not present in eq. (1) cause no issues. Using this update, we obtain Alg. 1, a fixed point method for recovering a single column of A up to an unknown scaling. Before proceeding, we should clarify the notion of fixed point convergence in Algorithm 1. We say that the sequence {uk}∞ k=0 converges to v up to sign if there exists a sequence {ck}∞ k=0 such that each ck ∈{±1} and ckuk →v as k →∞. We have the following convergence guarantee. Theorem 1. If u0 is chosen uniformly at random from Sn−1, then with probability 1, there exists ℓ∈[m] such that the sequence {uk}∞ k=0 defined as in Algorithm 1 converges to Aℓ/∥Aℓ∥up to sign. Further, the rate of convergence is cubic. Due to limited space, we omit the proof of Theorem 1. It is similar to the proof of [21, Theorem 4]. In practice, we test near convergence by checking if we are still making significant progress. In particular, for some predefined ϵ > 0, if there exists a sign value ck ∈{±1} such that ∥uk − ckuk−1∥< ϵ, then we declare convergence achieved and return the result. As there are only two choices for ck, this is easily checked, and we exit the loop if this condition is met. Full ICA Recovery Via the Pseudo-Euclidean GI-Update. We are able to recover a single column of A up to its unknown scale. However, for full recovery of A, we would like (given recovered columns Aℓ1, . . . , Aℓj) to be able to recover a column Ak such that k ̸∈{ℓ1, . . . , ℓj} on demand. The idea behind the simultaneous recovery of all columns of A is two-fold. First, instead of just finding columns of A using Algorithm 1, we simultaneously find rows of A†. Then, using the 5 recovered columns of A and rows of A†, we project u onto the orthogonal complement of the recovered columns of A within the ⟨·, ·⟩C pseudo-inner product space. Recovering rows of A†. Suppose we have access to a column Ak (which may be achieved using Algorithm 1). Let A† k· denote the kth row of A†. Then, we note that C†Ak = (ADAT )†Ak = d−1 kk (AT )† k = d−1 kk (A† k·)T recovers A† k· up to an arbitrary, unknown constant d−1 kk . However, the constant d−1 kk may be recovered by noting that ⟨Ak, Ak⟩C = (C†Ak)T Ak = d−1 kk . As such, we may estimate A† k· as [C†Ak/((C†Ak)T Ak)]T . Algorithm 2 Full ICA matrix recovery algorithm. Returns two matrices: (1) ˜A is the recovered mixing matrix for the noisy ICA model X = AS + η, and (2) ˜B is a running estimate of ˜A†. 1: Inputs: C, ∇f 2: ˜A ←0, ˜B ←0 3: for j ←1 to m do 4: Draw u uniformly at random from Sn−1. 5: repeat 6: u ←u −˜A ˜Bu 7: u ←∇f(C†u)/∥∇f(C†u)∥. 8: until Convergence (up to sign) 9: ˜Aj ←u 10: ˜Bj· ←[C†Aj/((C†Aj)T Aj)]T 11: end for 12: return ˜A, ˜B Enforcing Orthogonality During the GI Update. Given access to a vector u = Pm k=1 αk(u)Ak + PA⊥u (where PA⊥is the projection onto the orthogonal complements of the range of A), some recovered columns Aℓ1, . . . , Aℓr, and corresponding rows of A†, we may zero out the components of u corresponding to the recovered columns of A. Letting u′ = u −Pr j=1 AℓjA† ℓj·u, then u′ = P k∈[m]\{ℓ1,...,ℓr} αk(u)Ak + PA⊥u. In particular, u′ is orthogonal (in the ⟨·, ·⟩C space) to the previously recovered columns of A. This allows the non-orthogonal gradient iteration algorithm to recover a new column of A. Using these ideas, we obtain Algorithm 2, which is the PEGI algorithm for recovery of the mixing matrix A in noisy ICA up to the inherent ambiguities of the problem. Within this Algorithm, step 6 enforces orthogonality with previously found columns of A, guaranteeing that convergence to a new column of A. Practical Construction of C. In our implementation, we set C = 1 12 Pn k=1 Hf(ek), as it can be shown from equation (2) that Pn k=1 Hf(ek) = ADAT with dkk = ∥Ak∥2κ4(Sk). This deterministically guarantees that each latent signal has a significant contribution to C. 3 SINR Optimal Recovery in Noisy ICA In this section, we demonstrate how to perform SINR optimal ICA within the noisy ICA framework given access to an algorithm (such as PEGI) to recover the directions of the columns of A. To this end, we first discuss the SINR optimal demixing solution within any decomposition of the ICA model into signal and noise as X = AS + η. We then demonstrate that the SINR optimal demixing matrix is actually the same across all possible model decompositions, and that it can be recovered. The results in this section hold in greater generality than in section 2. They hold even if m ≥n (the underdetermined setting) and even if the additive noise η is non-Gaussian. Consider B an m × n demixing matrix, and define ˆS(B) := BX the resulting approximation to S. It will also be convenient to estimate the source signal S one coordinate at a time: Given a row vector b, we define ˆS(b) := bX. If b = Bk· (the kth row of B), then ˆS(b) = [ˆS(B)]k = ˆSk(B) is our estimate to the kth latent signal Sk. Within a specific ICA model X = AS + η, signal to intereference-plus-noise ratio (SINR) is defined by the following equation: SINRk(b) := var(bAkSk) var(bAS −bAkSk) + var(bη) = var(bAkSk) var(bAX) −var(bAkSk) . (4) SINRk is the variance of the contribution of kth source divided by the variance of the noise and interference contributions within the signal. Given access to the mixing matrix A, we define Bopt = AH(AAH + cov(η))†. Since cov(X) = AAH + cov(η), it follows that Bopt = AH cov(X)†. Here, cov(X)† may be estimated from data, but due to the ambiguities of the noisy ICA model, A (and specifically its column norms) cannot be. Koldovsk`y and Tichavsk`y [15] observed that when η is a white Gaussian noise, Bopt jointly maximizes SINRk for each k ∈[m], i.e., SINRk takes on its maximal value at (Bopt)k·. We generalize this result in Proposition 2 below to include arbitrary non-spherical, potentially non-Gaussian noise. 6 (a) Accuracy under additive Gaussian noise. (b) Bias under additive Gaussian noise. Figure 1: SINR performance comparison of ICA algorithms. It is interesting to note that even after the data is whitened, i.e. cov(X) = I, the optimal SINR solution is different from the optimal solution in the noiseless case unless A is an orthogonal matrix, i.e. A† = AH. This is generally not the case, even if η is white Gaussian noise. Proposition 2. For each k ∈[m], (Bopt)k· is a maximizer of SINRk. The proof of Proposition 2 can be found in the supplementary material. Since SINR is scale invariant, Proposition 2 implies that any matrix of the form DBopt = DAH cov(X)† where D is a diagonal scaling matrix (with non-zero diagonal entries) is an SINRoptimal demixing matrix. More formally, we have the following result. Theorem 3. Let ˜A be an n × m matrix containing the columns of A up to scale and an arbitrary permutation. Then, ( ˜AH cov(X)†)π(k)· is a maximizer of SINRk. By Theorem 3, given access to a matrix ˜A which recovers the directions of the columns of A, then ˜AH cov(X)† is the SINR-optimal demixing matrix. For ICA in the presence of Gaussian noise, the directions of the columns of A are well defined simply from X, that is, the directions of the columns of A do not depend on the decomposition of X into signal and noise (see the discussion in section 1.1 on ICA indeterminacies). The problem of SINR optimal demixing is thus well defined for ICA in the presence of Gaussian noise, and the SINR optimal demixing matrix can be estimated from data without any additional assumptions on the magnitude of the noise in the data. Finally, we note that in the noise-free case, the SINR-optimal source recovery simplifies to be ˜A†. Corollary 4. Suppose that X = AS is a noise free (possibly underdetermined) ICA model. Suppose that ˜A ∈Rn×m contains the columns of A up to scale and permutation, i.e., there exists diagonal matrix D with non-zero entries and a permutation matrix Π such that ˜A = ADΠ. Then ˜A† is an SINR-optimal demixing matrix. Corollary 4 is consistent with known beamforming results. In particular, it is known that A† is optimal (in terms of minimum mean squared error) for underdetermined ICA [19, section 3B]. 4 Experimental Results We compare the proposed PEGI algorithm with existing ICA algorithms. In addition to qorth+GI-ICA (i.e., GI-ICA with quasi-orthogonalization for preprocessing), we use the following baselines: JADE [3] is a popular fourth cumulant based ICA algorithm designed for the noise free setting. We use the implementation of Cardoso and Souloumiac [5]. FastICA [12] is a popular ICA algorithm designed for the noise free setting based on a deflationary approach of recovering one component at a time. We use the implementation of G¨avert et al. [10]. 1FICA [16, 17] is a variation of FastICA with the tanh contrast function designed to have low bias for performing SINR-optimal beamforming in the presence of Gaussian noise. Ainv performs oracle demixing algorithm which uses A† as the demixing matrix. SINR-opt performs oracle demixing using AH cov(X)† to achieve SINR-optimal demixing. 7 We compare these algorithms on simulated data with n = m. We constructed mixing matrices A with condition number 3 via a reverse singular value decomposition (A = UΛV T ). The matrices U and V were random orthogonal matrices, and Λ was chosen to have 1 as its minimum and 3 as its maximum singular values, with the intermediate singular values chosen uniformly at random. We drew data from a noisy ICA model X = AS + η where cov(η) = Σ was chosen to be malaligned with cov(AS) = AAT . We set Σ = p(10I −AAT ) where p is a constant defining the noise power. It can be shown that p = maxv var(vT η) maxv var(vT AS) is the ratio of the maximum directional noise variance to the maximum directional signal variance. We generated 100 matrices A for our experiments with 100 corresponding ICA data sets for each sample size and noise power. When reporting results, we apply each algorithm to each of the 100 data sets for the corresponding sample size and noise power and we report the mean performance. The source distributions used in our ICA experiments were the Laplace and Bernoulli distribution with parameters 0.05 and 0.5 respectively, the t-distribution with 3 and 5 degrees of freedom respectively, the exponential distribution, and the uniform distribution. Each distribution was normalized to have unit variance, and the distributions were each used twice to create 14-dimensional data. We compare the algorithms using either SINR or the SINR loss from the optimal demixing matrix (defined by SINR Loss = [Optimal SINR −Achieved SINR]). In Figure 1b, we compare our proprosed ICA algorithm with various ICA algorithms for signal recovery. In the PEGI-κ4+SINR algorithm, we use PEGI-κ4 to estimate A, and then perform demixing using the resulting estimate of AH cov(X)−1, the formula for SINR-optimal demixing. It is apparent that when given sufficient samples, PEGI-κ4+SINR provides the best SINR demixing. JADE, FastICA-tanh, and 1FICA each have a bias in the presence of additive Gaussian noise which keeps them from being SINR-optimal even when given many samples. Figure 2: Accuracy comparison of PEGI using pseudo-inner product spaces and GI-ICA using quasi-orthogonalization. In Figure 1a, we compare algorithms at various sample sizes. The PEGI-κ4+SINR algorithm relies more heavily on accurate estimates of fourth order statistics than JADE, and the FastICA-tanh and 1FICA algorithms do not require the estimation of fourth order statistics. For this reason, PEGI-κ4+SINR requires more samples than the other algorithms in order to be run accurately. However, once sufficient samples are taken, PEGI-κ4+SINR outperforms the other algorithms including 1FICA, which is designed to have low SINR bias. We also note that while not reported in order to avoid clutter, the kurtosis-based FastICA performed very similarly to FastICA-tanh in our experiments. In order to avoid clutter, we did not include qorth+GI-ICA-κ4+SINR (the SINR optimal demixing estimate constructed using qorth+GIICA-κ4 to estimate A) in the figures 1b and 1a. It is also assymptotically unbiased in estimating the directions of the columns of A, and similar conclusions could be drawn using qorth+GI-ICA-κ4 in place of PEGI-κ4. However, in Figure 2, we see that PEGI-κ4+SINR requires fewer samples than qorth+GI-ICA-κ4+SINR to achieve good performance. This is particularly highlighted in the medium sample regime. On the Performance of Traditional ICA Algorithms for Noisy ICA. An interesting observation [first made in 15] is that the popular noise free ICA algorithms JADE and FastICA perform reasonably well in the noisy setting. In Figures 1b and 1a, they significantly outperform demixing using A−1 for source recovery. It turns out that this may be explained by a shared preprocessing step. Both JADE and FastICA rely on a whitening preprocessing step in which the data are linearly transformed to have identity covariance. It can be shown in the noise free setting that after whitening, the mixing matrix A is a rotation matrix. These algorithms proceed by recovering an orthogonal matrix ˜A to approximate the true mixing matrix A. Demixing is performed using ˜A−1 = ˜AH. Since the data is white (has identity covariance), then the demixing matrix ˜AH = ˜AH cov(X)−1 is an estimate of the SINR-optimal demixing matrix. Nevertheless, the traditional ICA algorithms give a biased estimate of A under additive Gaussian noise. 8 References [1] L. Albera, A. Ferr´eol, P. Comon, and P. Chevalier. Blind identification of overcomplete mixtures of sources (BIOME). Linear algebra and its applications, 391:3–30, 2004. [2] S. Arora, R. Ge, A. Moitra, and S. Sachdeva. Provable ICA with unknown Gaussian noise, with implications for Gaussian mixtures and autoencoders. In NIPS, pages 2384–2392, 2012. [3] J. Cardoso and A. Souloumiac. Blind beamforming for non-Gaussian signals. In Radar and Signal Processing, IEE Proceedings F, volume 140(6), pages 362–370. IET, 1993. [4] J.-F. Cardoso. Super-symmetric decomposition of the fourth-order cumulant tensor. Blind identification of more sources than sensors. In ICASSP, pages 3109–3112. IEEE, 1991. [5] J.-F. Cardoso and A. Souloumiac. Matlab JADE for real-valued data v 1.8. http://perso. telecom-paristech.fr/˜cardoso/Algo/Jade/jadeR.m, 2005. [Online; accessed 8-May2013]. [6] P. Chevalier. Optimal separation of independent narrow-band sources: Concept and performance 1. Signal Processing, 73(12):27 – 47, 1999. ISSN 0165-1684. [7] P. Comon and C. Jutten, editors. Handbook of Blind Source Separation. Academic Press, 2010. [8] L. De Lathauwer, B. De Moor, and J. Vandewalle. Independent component analysis based on higher-order statistics only. In Statistical Signal and Array Processing, 1996. Proceedings., 8th IEEE Signal Processing Workshop on, pages 356–359. IEEE, 1996. [9] L. De Lathauwer, J. Castaing, and J. Cardoso. Fourth-order cumulant-based blind identification of underdetermined mixtures. Signal Processing, IEEE Transactions on, 55(6):2965–2973, June 2007. ISSN 1053-587X. doi: 10.1109/TSP.2007.893943. [10] H. G¨avert, J. Hurri, J. S¨arel¨a, and A. Hyv¨arinen. Matlab FastICA v 2.5. http://research.ics. aalto.fi/ica/fastica/code/dlcode.shtml, 2005. [Online; accessed 1-May-2013]. [11] N. Goyal, S. Vempala, and Y. Xiao. Fourier PCA and robust tensor decomposition. In STOC, pages 584–593, 2014. [12] A. Hyv¨arinen and E. Oja. Independent component analysis: Algorithms and applications. Neural Networks, 13(4-5):411–430, 2000. [13] A. Hyv¨arinen, J. Karhunen, and E. Oja. Independent component analysis. John Wiley & Sons, 2001. [14] M. Joho, H. Mathis, and R. H. Lambert. Overdetermined blind source separation: Using more sensors than source signals in a noisy mixture. In Proc. International Conference on Independent Component Analysis and Blind Signal Separation. Helsinki, Finland, pages 81–86, 2000. [15] Z. Koldovsk`y and P. Tichavsk`y. Methods of fair comparison of performance of linear ICA techniques in presence of additive noise. In ICASSP, pages 873–876, 2006. [16] Z. Koldovsk`y and P. Tichavsk`y. Asymptotic analysis of bias of fastica-based algorithms in presence of additive noise. Technical report, Technical report, 2007. [17] Z. Koldovsk`y and P. Tichavsk`y. Blind instantaneous noisy mixture separation with best interference-plusnoise rejection. In Independent Component Analysis and Signal Separation, pages 730–737. Springer, 2007. [18] S. Makino, T.-W. Lee, and H. Sawada. Blind speech separation. Springer, 2007. [19] B. D. Van Veen and K. M. Buckley. Beamforming: A versatile approach to spatial filtering. IEEE assp magazine, 5(2):4–24, 1988. [20] R. Vig´ario, J. Sarela, V. Jousmiki, M. Hamalainen, and E. Oja. Independent component approach to the analysis of EEG and MEG recordings. Biomedical Engineering, IEEE Transactions on, 47(5):589–593, 2000. [21] J. R. Voss, L. Rademacher, and M. Belkin. Fast algorithms for Gaussian noise invariant independent component analysis. In Advances in Neural Information Processing Systems 26, pages 2544–2552. 2013. [22] A. Yeredor. Blind source separation via the second characteristic function. Signal Processing, 80(5): 897–902, 2000. [23] A. Yeredor. Non-orthogonal joint diagonalization in the least-squares sense with application in blind source separation. Signal Processing, IEEE Transactions on, 50(7):1545–1553, 2002. 9 | 2015 | 217 |
5,722 | Learning Structured Output Representation using Deep Conditional Generative Models Kihyuk Sohn∗† Xinchen Yan† Honglak Lee† ∗NEC Laboratories America, Inc. † University of Michigan, Ann Arbor ksohn@nec-labs.com, {xcyan,honglak}@umich.edu Abstract Supervised deep learning has been successfully applied to many recognition problems. Although it can approximate a complex many-to-one function well when a large amount of training data is provided, it is still challenging to model complex structured output representations that effectively perform probabilistic inference and make diverse predictions. In this work, we develop a deep conditional generative model for structured output prediction using Gaussian latent variables. The model is trained efficiently in the framework of stochastic gradient variational Bayes, and allows for fast prediction using stochastic feed-forward inference. In addition, we provide novel strategies to build robust structured prediction algorithms, such as input noise-injection and multi-scale prediction objective at training. In experiments, we demonstrate the effectiveness of our proposed algorithm in comparison to the deterministic deep neural network counterparts in generating diverse but realistic structured output predictions using stochastic inference. Furthermore, the proposed training methods are complimentary, which leads to strong pixel-level object segmentation and semantic labeling performance on Caltech-UCSD Birds 200 and the subset of Labeled Faces in the Wild dataset. 1 Introduction In structured output prediction, it is important to learn a model that can perform probabilistic inference and make diverse predictions. This is because we are not simply modeling a many-to-one function as in classification tasks, but we may need to model a mapping from single input to many possible outputs. Recently, the convolutional neural networks (CNNs) have been greatly successful for large-scale image classification tasks [17, 30, 27] and have also demonstrated promising results for structured prediction tasks (e.g., [4, 23, 22]). However, the CNNs are not suitable in modeling a distribution with multiple modes [32]. To address this problem, we propose novel deep conditional generative models (CGMs) for output representation learning and structured prediction. In other words, we model the distribution of highdimensional output space as a generative model conditioned on the input observation. Building upon recent development in variational inference and learning of directed graphical models [16, 24, 15], we propose a conditional variational auto-encoder (CVAE). The CVAE is a conditional directed graphical model whose input observations modulate the prior on Gaussian latent variables that generate the outputs. It is trained to maximize the conditional log-likelihood, and we formulate the variational learning objective of the CVAE in the framework of stochastic gradient variational Bayes (SGVB) [16]. In addition, we introduce several strategies, such as input noise-injection and multi-scale prediction training methods, to build a more robust prediction model. In experiments, we demonstrate the effectiveness of our proposed algorithm in comparison to the deterministic neural network counterparts in generating diverse but realistic output predictions using stochastic inference. We demonstrate the importance of stochastic neurons in modeling the structured output when the input data is partially provided. Furthermore, we show that the proposed training schemes are complimentary, leading to strong pixel-level object segmentation and labeling performance on Caltech-UCSD Birds 200 and the subset of Labeled Faces in the Wild dataset. 1 In summary, the contribution of the paper is as follows: • We propose CVAE and its variants that are trainable efficiently in the SGVB framework, and introduce novel strategies to enhance robustness of the models for structured prediction. • We demonstrate the effectiveness of our proposed algorithm with Gaussian stochastic neurons in modeling multi-modal distribution of structured output variables. • We achieve strong semantic object segmentation performance on CUB and LFW datasets. The paper is organized as follows. We first review related work in Section 2. We provide preliminaries in Section 3 and develop our deep conditional generative model in Section 4. In Section 5, we evaluate our proposed models and report experimental results. Section 6 concludes the paper. 2 Related work Since the recent success of supervised deep learning on large-scale visual recognition [17, 30, 27], there have been many approaches to tackle mid-level computer vision tasks, such as object detection [6, 26, 31, 9] and semantic segmentation [4, 3, 23, 22], using supervised deep learning techniques. Our work falls into this category of research in developing advanced algorithms for structured output prediction, but we incorporate the stochastic neurons to model the conditional distributions of complex output representation whose distribution possibly has multiple modes. In this sense, our work shares a similar motivation to the recent work on image segmentation tasks using hybrid models of CRF and Boltzmann machine [13, 21, 37]. Compared to these, our proposed model is an end-to-end system for segmentation using convolutional architecture and achieves significantly improved performance on challenging benchmark tasks. Along with the recent breakthroughs in supervised deep learning methods, there has been a progress in deep generative models, such as deep belief networks [10, 20] and deep Boltzmann machines [25]. Recently, the advances in inference and learning algorithms for various deep generative models significantly enhanced this line of research [2, 7, 8, 18]. In particular, the variational learning framework of deep directed graphical model with Gaussian latent variables (e.g., variational autoencoder [16, 15] and deep latent Gaussian models [24]) has been recently developed. Using the variational lower bound of the log-likelihood as the training objective and the reparameterization trick, these models can be easily trained via stochastic optimization. Our model builds upon this framework, but we focus on modeling the conditional distribution of output variables for structured prediction problems. Here, the main goal is not only to model the complex output representation but also to make a discriminative prediction. In addition, our model can effectively handle large-sized images by exploiting the convolutional architecture. The stochastic feed-forward neural network (SFNN) [32] is a conditional directed graphical model with a combination of real-valued deterministic neurons and the binary stochastic neurons. The SFNN is trained using the Monte Carlo variant of generalized EM by drawing multiple samples from the feed-forward proposal distribution and weighing them differently with importance weights. Although our proposed Gaussian stochastic neural network (which will be described in Section 4.2) looks similar on surface, there are practical advantages in optimization of using Gaussian latent variables over the binary stochastic neurons. In addition, thanks to the recognition model used in our framework, it is sufficient to draw only a few samples during training, which is critical in training very deep convolutional networks. 3 Preliminary: Variational Auto-encoder The variational auto-encoder (VAE) [16, 24] is a directed graphical model with certain types of latent variables, such as Gaussian latent variables. A generative process of the VAE is as follows: a set of latent variable z is generated from the prior distribution pθ(z) and the data x is generated by the generative distribution pθ(x|z) conditioned on z: z ∼pθ(z), x ∼pθ(x|z). In general, parameter estimation of directed graphical models is often challenging due to intractable posterior inference. However, the parameters of the VAE can be estimated efficiently in the stochastic gradient variational Bayes (SGVB) [16] framework, where the variational lower bound of the log-likelihood is used as a surrogate objective function. The variational lower bound is written as: log pθ(x) = KL (qφ(z|x)∥pθ(z|x)) + Eqφ(z|x) −log qφ(z|x) + log pθ(x, z) (1) ≥−KL (qφ(z|x)∥pθ(z)) + Eqφ(z|x) log pθ(x|z) (2) 2 In this framework, a proposal distribution qφ(z|x), which is also known as a “recognition” model, is introduced to approximate the true posterior pθ(z|x). The multilayer perceptrons (MLPs) are used to model the recognition and the generation models. Assuming Gaussian latent variables, the first term of Equation (2) can be marginalized, while the second term is not. Instead, the second term can be approximated by drawing samples z(l) (l = 1, ..., L) by the recognition distribution qφ(z|x), and the empirical objective of the VAE with Gaussian latent variables is written as follows: eLVAE(x; θ, φ) = −KL (qφ(z|x)∥pθ(z)) + 1 L L X l=1 log pθ(x|z(l)), (3) where z(l) = gφ(x, ϵ(l)), ϵ(l) ∼N(0, I). Note that the recognition distribution qφ(z|x) is reparameterized with a deterministic, differentiable function gφ(·, ·), whose arguments are data x and the noise variable ϵ. This trick allows error backpropagation through the Gaussian latent variables, which is essential in VAE training as it is composed of multiple MLPs for recognition and generation models. As a result, the VAE can be trained efficiently using stochastic gradient descent (SGD). 4 Deep Conditional Generative Models for Structured Output Prediction As illustrated in Figure 1, there are three types of variables in a deep conditional generative model (CGM): input variables x, output variables y, and latent variables z. The conditional generative process of the model is given in Figure 1(b) as follows: for given observation x, z is drawn from the prior distribution pθ(z|x), and the output y is generated from the distribution pθ(y|x, z). Compared to the baseline CNN (Figure 1(a)), the latent variables z allow for modeling multiple modes in conditional distribution of output variables y given input x, making the proposed CGM suitable for modeling one-to-many mapping. The prior of the latent variables z is modulated by the input x in our formulation; however, the constraint can be easily relaxed to make the latent variables statistically independent of input variables, i.e., pθ(z|x) = pθ(z) [15]. Deep CGMs are trained to maximize the conditional log-likelihood. Often the objective function is intractable, and we apply the SGVB framework to train the model. The variational lower bound of the model is written as follows (complete derivation can be found in the supplementary material): log pθ(y|x) ≥−KL (qφ(z|x, y)∥pθ(z|x)) + Eqφ(z|x,y) log pθ(y|x, z) (4) and the empirical lower bound is written as: eLCVAE(x, y; θ, φ) = −KL (qφ(z|x, y)∥pθ(z|x)) + 1 L L X l=1 log pθ(y|x, z(l)), (5) where z(l) = gφ(x, y, ϵ(l)), ϵ(l) ∼N(0, I) and L is the number of samples. We call this model conditional variational auto-encoder1 (CVAE). The CVAE is composed of multiple MLPs, such as recognition network qφ(z|x, y), (conditional) prior network pθ(z|x), and generation network pθ(y|x, z). In designing the network architecture, we build the network components of the CVAE on top of the baseline CNN. Specifically, as shown in Figure 1(d), not only the direct input x, but also the initial guess ˆy made by the CNN are fed into the prior network. Such a recurrent connection has been applied for structured output prediction problems [23, 13, 28] to sequentially update the prediction by revising the previous guess while effectively deepening the convolutional network. We also found that a recurrent connection, even one iteration, showed significant performance improvement. Details about network architectures can be found in the supplementary material. 4.1 Output inference and estimation of the conditional likelihood Once the model parameters are learned, we can make a prediction of an output y from an input x by following the generative process of the CGM. To evaluate the model on structured output prediction tasks (i.e., in testing time), we can measure a prediction accuracy by performing a deterministic inference without sampling z, i.e., y∗= arg maxy pθ(y|x, z∗), z∗= E z|x .2 1Although the model is not trained to reconstruct the input x, our model can be viewed as a type of VAE that performs auto-encoding of the output variables y conditioned on the input x at training time. 2Alternatively, we can draw multiple z’s from the prior distribution and use the average of the posteriors to make a prediction, i.e., y∗= arg maxy 1 L PL l=1 pθ(y|x, z(l)), z(l) ∼pθ(z|x). 3 Y X pᶚ(y|x) (a) CNN Y X Z pᶚ(y|x,z) pᶚ(z|x) (b) CGM (generation) Y X Z qᶰ(z|x,y) (c) CGM (recognition) Y X Z pᶚ(y|x,z) pᶚ(z|x) Y (d) recurrent connection Figure 1: Illustration of the conditional graphical models (CGMs). (a) the predictive process of output Y for the baseline CNN; (b) the generative process of CGMs; (c) an approximate inference of Z (also known as recognition process [16]); (d) the generative process with recurrent connection. Another way to evaluate the CGMs is to compare the conditional likelihoods of the test data. A straightforward approach is to draw samples z’s using the prior network and take the average of the likelihoods. We call this method the Monte Carlo (MC) sampling: pθ(y|x) ≈1 S S X s=1 pθ(y|x, z(s)), z(s) ∼pθ(z|x) (6) It usually requires a large number of samples for the Monte Carlo log-likelihood estimation to be accurate. Alternatively, we use the importance sampling to estimate the conditional likelihoods [24]: pθ(y|x) ≈1 S S X s=1 pθ(y|x, z(s))pθ(z(s)|x) qφ(z(s)|x, y) , z(s) ∼qφ(z|x, y) (7) 4.2 Learning to predict structured output Although the SGVB learning framework has shown to be effective in training deep generative models [16, 24], the conditional auto-encoding of output variables at training may not be optimal to make a prediction at testing in deep CGMs. In other words, the CVAE uses the recognition network qφ(z|x, y) at training, but it uses the prior network pθ(z|x) at testing to draw samples z’s and make an output prediction. Since y is given as an input for the recognition network, the objective at training can be viewed as a reconstruction of y, which is an easier task than prediction. The negative KL divergence term in Equation (5) tries to close the gap between two pipelines, and one could consider allocating more weights on the negative KL term of an objective function to mitigate the discrepancy in encoding of latent variables at training and testing, i.e., −(1 + β)KL (qφ(z|x, y)∥pθ(z|x)) with β ≥0. However, we found this approach ineffective in our experiments. Instead, we propose to train the networks in a way that the prediction pipelines at training and testing are consistent. This can be done by setting the recognition network the same as the prior network, i.e., qφ(z|x, y) = pθ(z|x), and we get the following objective function: eLGSNN(x, y; θ, φ) = 1 L L X l=1 log pθ(y|x, z(l)) , where z(l) = gθ(x, ϵ(l)), ϵ(l) ∼N(0, I) (8) We call this model Gaussian stochastic neural network (GSNN).3 Note that the GSNN can be derived from the CVAE by setting the recognition network and the prior network equal. Therefore, the learning tricks, such as reparameterization trick, of the CVAE can be used to train the GSNN. Similarly, the inference (at testing) and the conditional likelihood estimation are the same as those of CVAE. Finally, we combine the objective functions of two models to obtain a hybrid objective: eLhybrid = α eLCVAE + (1 −α) eLGSNN, (9) where α balances the two objectives. Note that when α = 1, we recover the CVAE objective; when α = 0, the trained model will be simply a GSNN without the recognition network. 4.3 CVAE for image segmentation and labeling Semantic segmentation [5, 23, 6] is an important structured output prediction task. In this section, we provide strategies to train a robust prediction model for semantic segmentation problems. Specifically, to learn a high-capacity neural network that can be generalized well to unseen data, we propose to train the network with 1) multi-scale prediction objective and 2) structured input noise. 3If we assume a covariance matrix of auxiliary Gaussian latent variables ϵ to 0, we have a deterministic counterpart of GSNN, which we call a Gaussian deterministic neural network (GDNN). 4 4.3.1 Training with multi-scale prediction objective Y1/2 Y1/4 X 1/4 1 loss loss 1/2 loss + + Y ... Figure 2: Multi-scale prediction. As the image size gets larger (e.g., 128 × 128), it becomes more challenging to make a fine-grained pixel-level prediction (e.g., image reconstruction, semantic label prediction). The multi-scale approaches have been used in the sense of forming a multi-scale image pyramid for an input [5], but not much for multi-scale output prediction. Here, we propose to train the network to predict outputs at different scales. By doing so, we can make a global-to-local, coarse-to-fine-grained prediction of pixel-level semantic labels. Figure 2 describes the multi-scale prediction at 3 different scales (1/4, 1/2, and original) for the training. 4.3.2 Training with input omission noise Adding noise to neurons is a widely used technique to regularize deep neural networks during the training [17, 29]. Similarly, we propose a simple regularization technique for semantic segmentation: corrupt the input data x into ˜x according to noise process and optimize the network with the following objective: eL(˜x, y). The noise process could be arbitrary, but for semantic image segmentation, we consider random block omission noise. Specifically, we randomly generate a squared mask of width and height less than 40% of the image width and height, respectively, at random position and set pixel values of the input image inside the mask to 0. This can be viewed as providing more challenging output prediction task during training that simulates block occlusion or missing input. The proposed training strategy also is related to the denoising training methods [34], but in our case, we inject noise to the input data only and do not reconstruct the missing input. 5 Experiments We demonstrate the effectiveness of our approach in modeling the distribution of the structured output variables. For the proof of concept, we create an artificial experimental setting for structured output prediction using MNIST database [19]. Then, we evaluate the proposed CVAE models on several benchmark datasets for visual object segmentation and labeling, such as Caltech-UCSD Birds (CUB) [36] and Labeled Faces in the Wild (LFW) [12]. Our implementation is based on MatConvNet [33], a MATLAB toolbox for convolutional neural networks, and Adam [14] for adaptive learning rate scheduling algorithm of SGD optimization. 5.1 Toy example: MNIST To highlight the importance of probabilistic inference through stochastic neurons for structured output variables, we perform an experiment using MNIST database. Specifically, we divide each digit image into four quadrants, and take one, two, or three quadrant(s) as an input and the remaining quadrants as an output.4 As we increase the number of quadrants for an output, the input to output mapping becomes more diverse (in terms of one-to-many mapping). We trained the proposed models (CVAE, GSNN) and the baseline deep neural network and compare their performance. The same network architecture, the MLP with two-layers of 1, 000 ReLUs for recognition, conditional prior, or generation networks, followed by 200 Gaussian latent variables, was used for all the models in various experimental settings. The early stopping is used during the training based on the estimation of the conditional likelihoods on the validation set. negative CLL 1 quadrant 2 quadrants 3 quadrants validation test validation test validation test NN (baseline) 100.03 99.75 62.14 62.18 26.01 25.99 GSNN (Monte Carlo) 100.03 99.82 62.48 62.41 26.20 26.29 CVAE (Monte Carlo) 68.62 68.39 45.57 45.34 20.97 20.96 CVAE (Importance Sampling) 64.05 63.91 44.96 44.73 20.97 20.95 Performance gap 35.98 35.91 17.51 17.68 5.23 5.33 - per pixel 0.061 0.061 0.045 0.045 0.027 0.027 Table 1: The negative CLL on MNIST database. We increase the number of quadrants for an input from 1 to 3. The performance gap between CVAE (importance sampling) and NN is reported. 4Similar experimental setting has been used in the multimodal learning framework, where the left- and right halves of the digit images are used as two data modalities [1, 28]. 5 ground -truth NN CVAE ground -truth NN CVAE Figure 3: Visualization of generated samples with (left) 1 quadrant and (right) 2 quadrants for an input. We show in each row the input and the ground truth output overlaid with gray color (first), samples generated by the baseline NNs (second), and samples drawn from the CVAEs (rest). For qualitative analysis, we visualize the generated output samples in Figure 3. As we can see, the baseline NNs can only make a single deterministic prediction, and as a result the output looks blurry and doesn’t look realistic in many cases. In contrast, the samples generated by the CVAE models are more realistic and diverse in shape; sometimes they can even change their identity (digit labels), such as from 3 to 5 or from 4 to 9, and vice versa. We also provide a quantitative evidence by estimating the conditional log-likelihoods (CLLs) in Table 1. The CLLs of the proposed models are estimated in two ways as described in Section 4.1. For the MC estimation, we draw 10, 000 samples per example to get an accurate estimate. For the importance sampling, however, 100 samples per example were enough to obtain an accurate estimation of the CLL. We observed that the estimated CLLs of the CVAE significantly outperforms the baseline NN. Moreover, as measured by the per pixel performance gap, the performance improvement becomes more significant as we use smaller number of quadrants for an input, which is expected as the input-output mapping becomes more diverse. 5.2 Visual Object Segmentation and Labeling Caltech-UCSD Birds (CUB) database [36] includes 6, 033 images of birds from 200 species with annotations such as a bounding box of birds and a segmentation mask. Later, Yang et al. [37] annotated these images with more fine-grained segmentation masks by cropping the bird patches using the bounding boxes and resized them into 128 × 128 pixels. The training/test split proposed in [36] was used in our experiment, and for validation purpose, we partition the training set into 10 folds and cross-validated with the mean intersection over union (IoU) score over the folds. The final prediction on the test set was made by averaging the posterior from ensemble of 10 networks that are trained on each of the 10 folds separately. We increase the number of training examples via “data augmentation” by horizontally flipping the input and output images. We extensively evaluate the variations of our proposed methods, such as CVAE, GSNN, and the hybrid model, and provide a summary results on segmentation mask prediction task in Table 2. Specifically, we report the performance of the models with different network architectures and training methods (e.g., multi-scale prediction or noise-injection training). First, we note that the baseline CNN already beat the previous state-of-the-art that is obtained by the max-margin Boltzmann machine (MMBM; pixel accuracy: 90.42, IoU: 75.92 with GraphCut for post-processing) [37] even without post-processing. On top of that, we observed significant performance improvement with our proposed deep CGMs.5 In terms of prediction accuracy, the GSNN performed the best among our proposed models, and performed even better when it is trained with hybrid objective function. In addition, the noise-injection training (Section 4.3) further improves the performance. Compared to the baseline CNN, the proposed deep CGMs significantly reduce the prediction error, e.g., 21% reduction in test pixel-level accuracy at the expense of 60% more time for inference.6 Finally, the performance of our two winning entries (GSNN and hybrid) on the validation sets are both significantly better than their deterministic counterparts (GDNN) with p-values less than 0.05, which suggests the benefit of stochastic latent variables. 5As in the case of baseline CNNs, we found that using the multi-scale prediction was consistently better than the single-scale counterpart for all our models. So, we used the multi-scale prediction by default. 6Mean inference time per image: 2.32 (ms) for CNN and 3.69 (ms) for deep CGMs, measured using GeForce GTX TITAN X card with MatConvNet; we provide more information in the supplementary material. 6 Model (training) CUB (val) CUB (test) LFW pixel IoU pixel IoU pixel (val) pixel (test) MMBM [37] – – 90.42 75.92 – – GLOC [13] – – – – – 90.70 CNN (baseline) 91.17 ±0.09 79.64 ±0.24 92.30 81.90 92.09 ±0.13 91.90 ±0.08 CNN (msc) 91.37 ±0.09 80.09 ±0.25 92.52 82.43 92.19 ±0.10 92.05 ±0.06 GDNN (msc) 92.25 ±0.09 81.89 ±0.21 93.24 83.96 92.72 ±0.12 92.54 ±0.04 GSNN (msc) 92.46 ±0.07 82.31 ±0.19 93.39 84.26 92.88 ±0.08 92.61 ±0.09 CVAE (msc) 92.24 ±0.09 81.86 ±0.23 93.03 83.53 92.80 ±0.30 92.62 ±0.06 hybrid (msc) 92.60 ±0.08 82.57 ±0.26 93.35 84.16 92.95 ±0.21 92.77 ±0.06 GDNN (msc, NI) 92.92 ±0.07 83.20 ±0.19 93.78 85.07 93.59 ±0.12 93.25 ±0.06 GSNN (msc, NI) 93.09 ±0.09 83.62 ±0.21 93.91 85.39 93.71 ±0.09 93.51 ±0.07 CVAE (msc, NI) 92.72 ±0.08 82.90 ±0.22 93.48 84.47 93.29 ±0.17 93.22 ±0.08 hybrid (msc, NI) 93.05 ±0.07 83.49 ±0.19 93.78 85.07 93.69 ±0.12 93.42 ±0.07 Table 2: Mean and standard error of labeling accuracy on CUB and LFW database. The performance of the best or statistically similar (i.e., p-value ≥0.05 to the best performing model) models are bold-faced. “msc” refers multi-scale prediction training and “NI” refers the noise-injection training. Models CUB (val) CUB (test) LFW (val) LFW (test) CNN (baseline) 4269.43 ±130.90 4329.94 ±91.71 6370.63 ±790.53 6434.09 ±756.57 GDNN (msc, NI) 3386.19 ±44.11 3450.41 ±33.36 4710.46 ±192.77 5170.26 ±166.81 GSNN (msc, NI) 3400.24 ±59.42 3461.87 ±25.57 4582.96 ±225.62 4829.45 ±96.98 CVAE (msc, NI) 801.48 ±4.34 801.31 ±1.86 1262.98 ±64.43 1267.58 ±57.92 hybrid (msc, NI) 1019.93 ±8.46 1021.44 ±4.81 1836.98 ±127.53 1867.47 ±111.26 Table 3: Mean and standard error of negative CLL on CUB and LFW database. The performance of the best and statistically similar models are bold-faced. We also evaluate the negative CLL and summarize the results in Table 3. As expected, the proposed CGMs significantly outperform the baseline CNN while the CVAE showed the highest CLL. Labeled Faces in the Wild (LFW) database [12] has been widely used for face recognition and verification benchmark. As mentioned in [11], the face images that are segmented and labeled into semantically meaningful region labels (e.g., hair, skin, clothes) can greatly help understanding of the image through the visual attributes, which can be easily obtained from the face shape. Following region labeling protocols [35, 13], we evaluate the performance of face parts labeling on the subset of LFW database [35], which contains 1, 046 images that are labeled into 4 semantic categories, such as hair, skin, clothes, and background. We resized images into 128 × 128 and used the same network architecture to the one used in the CUB experiment. We provide summary results of pixel-level segmentation accuracy in Table 2 and the negative CLL in Table 3. We observe a similar trend as previously shown for the CUB database; the proposed deep CGMs outperform the baseline CNN in terms of segmentation accuracy as well as CLL. However, although the accuracies of the CGM variants are higher, the performance of GDNN was not significantly behind than those of GSNN and hybrid models. This may be because the level of variations in the output space of LFW database is less than that of CUB database as the face shapes are more similar and better aligned across examples. Finally, our methods significantly outperform other existing methods, which report 90.0% in [35] or 90.7% in [13], setting the state-of-the-art performance on the LFW segmentation benchmark. 5.3 Object Segmentation with Partial Observations We experimented on object segmentation under uncertainties (e.g., partial input and output observations) to highlight the importance of recognition network in CVAE and the stochastic neurons for missing value imputation. We randomly omit the input pixels at different levels of omission noise (25%, 50%, 70%) and different block sizes (1, 4, 8), and the task is to predict the output segmentation labels for the omitted pixel locations while given the partial labels for the observed input pixels. This can also be viewed as a segmentation task with noisy or partial observations (e.g., occlusions). To make a prediction for CVAE with partial output observation (yo), we perform iterative inference of unobserved output (yu) and the latent variables (z) (in a similar fashion to [24]), i.e., yu ∼pθ(yu|x, z) ↔z ∼qφ(z|x, yo, yu). (10) 7 Input ground -truth CNN CVAE Input ground -truth CNN CVAE Figure 4: Visualization of the conditionally generated samples: (first row) input image with omission noise (noise level: 50%, block size: 8), (second row) ground truth segmentation, (third) prediction by GDNN, and (fourth to sixth) the generated samples by CVAE on CUB (left) and LFW (right). Dataset CUB (IoU) LFW (pixel) noise block GDNN CVAE GDNN CVAE level size 25% 1 89.37 98.52 96.93 99.22 4 88.74 98.07 96.55 99.09 8 90.72 96.78 97.14 98.73 50% 1 74.95 95.95 91.84 97.29 4 70.48 94.25 90.87 97.08 8 76.07 89.10 92.68 96.15 70% 1 62.11 89.44 85.27 89.71 4 57.68 84.36 85.70 93.16 8 63.59 76.87 87.83 92.06 Table 4: Segmentation results with omission noise on CUB and LFW database. We report the pixel-level accuracy on the first validation set. We report the summary results in Table 4. The CVAE performs well even when the noise level is high (e.g., 50%), where the GDNN significantly fails. This is because the CVAE utilizes the partial segmentation information to iteratively refine the prediction of the rest. We visualize the generated samples at noise level of 50% in Figure 4. The prediction made by the GDNN is blurry, but the samples generated by the CVAE are sharper while maintaining reasonable shapes. This suggests that the CVAE can also be potentially useful for interactive segmentation (i.e., by iteratively incorporating partial output labels). 6 Conclusion Modeling multi-modal distribution of the structured output variables is an important research question to achieve good performance on structured output prediction problems. In this work, we proposed stochastic neural networks for structured output prediction based on the conditional deep generative model with Gaussian latent variables. The proposed model is scalable and efficient in inference and learning. We demonstrated the importance of probabilistic inference when the distribution of output space has multiple modes, and showed strong performance in terms of segmentation accuracy, estimation of conditional log-likelihood, and visualization of generated samples. Acknowledgments This work was supported in part by ONR grant N00014-13-1-0762 and NSF CAREER grant IIS-1453651. We thank NVIDIA for donating a Tesla K40 GPU. References [1] G. Andrew, R. Arora, J. Bilmes, and K. Livescu. Deep canonical correlation analysis. In ICML, 2013. [2] Y. Bengio, E. Thibodeau-Laufer, G. Alain, and J. Yosinski. Deep generative stochastic networks trainable by backprop. In ICML, 2014. [3] D. Ciresan, A. Giusti, L. M. Gambardella, and J. Schmidhuber. Deep neural networks segment neuronal membranes in electron microscopy images. In NIPS, 2012. [4] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Scene parsing with multiscale feature learning, purity trees, and optimal covers. In ICML, 2012. [5] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Learning hierarchical features for scene labeling. T. PAMI, 35(8):1915–1929, 2013. [6] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Region-based convolutional networks for accurate object detection and segmentation. T. PAMI, PP(99):1–1, 2015. [7] I. Goodfellow, M. Mirza, A. Courville, and Y. Bengio. Multi-prediction deep Boltzmann machines. In NIPS, 2013. 8 [8] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, 2014. [9] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In ECCV, 2014. [10] G. E. Hinton, S. Osindero, and Y. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [11] G. B. Huang, M. Narayana, and E. Learned-Miller. Towards unconstrained face recognition. In CVPR Workshop on Perceptual Organization in Computer Vision, 2008. [12] G. B. Huang, M. Ramesh, T. Berg, and E. Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, 2007. [13] A. Kae, K. Sohn, H. Lee, and E. Learned-Miller. Augmenting CRFs with Boltzmann machine shape priors for image labeling. In CVPR, 2013. [14] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [15] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling. Semi-supervised learning with deep generative models. In NIPS, 2014. [16] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2013. [17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. [18] H. Larochelle and I. Murray. The neural autoregressive distribution estimator. JMLR, 15:29–37, 2011. [19] 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. [20] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng. Unsupervised learning of hierarchical representations with convolutional deep belief networks. Communications of the ACM, 54(10):95–103, 2011. [21] Y. Li, D. Tarlow, and R. Zemel. Exploring compositional high order pattern potentials for structured output learning. In CVPR, 2013. [22] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [23] P. Pinheiro and R. Collobert. Recurrent convolutional neural networks for scene parsing. In ICML, 2013. [24] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. [25] R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In AISTATS, 2009. [26] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. OverFeat: Integrated recognition, localization and detection using convolutional networks. In ICLR, 2013. [27] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2014. [28] K. Sohn, W. Shang, and H. Lee. Improved multimodal deep learning with variation of information. In NIPS, 2014. [29] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15(1):1929–1958, 2014. [30] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. [31] C. Szegedy, A. Toshev, and D. Erhan. Deep neural networks for object detection. In NIPS, 2013. [32] Y. Tang and R. Salakhutdinov. Learning stochastic feedforward neural networks. In NIPS, 2013. [33] A. Vedaldi and K. Lenc. MatConvNet – convolutional neural networks for MATLAB. In ACMMM, 2015. [34] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008. [35] N. Wang, H. Ai, and F. Tang. What are good parts for hair shape modeling? In CVPR, 2012. [36] P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. [37] J. Yang, S. S´af´ar, and M.-H. Yang. Max-margin Boltzmann machines for object segmentation. In CVPR, 2014. 9 | 2015 | 218 |
5,723 | Estimating Mixture Models via Mixtures of Polynomials Sida I. Wang Arun Tejasvi Chaganty Percy Liang Computer Science Department, Stanford University, Stanford, CA, 94305 {sidaw,chaganty,pliang}@cs.stanford.edu Abstract Mixture modeling is a general technique for making any simple model more expressive through weighted combination. This generality and simplicity in part explains the success of the Expectation Maximization (EM) algorithm, in which updates are easy to derive for a wide class of mixture models. However, the likelihood of a mixture model is non-convex, so EM has no known global convergence guarantees. Recently, method of moments approaches offer global guarantees for some mixture models, but they do not extend easily to the range of mixture models that exist. In this work, we present Polymom, an unifying framework based on method of moments in which estimation procedures are easily derivable, just as in EM. Polymom is applicable when the moments of a single mixture component are polynomials of the parameters. Our key observation is that the moments of the mixture model are a mixture of these polynomials, which allows us to cast estimation as a Generalized Moment Problem. We solve its relaxations using semidefinite optimization, and then extract parameters using ideas from computer algebra. This framework allows us to draw insights and apply tools from convex optimization, computer algebra and the theory of moments to study problems in statistical estimation. Simulations show good empirical performance on several models. 1 Introduction Mixture models play a central role in machine learning and statistics, with diverse applications including bioinformatics, speech, natural language, and computer vision. The idea of mixture modeling is to explain data through a weighted combination of simple parametrized distributions [1, 2]. In practice, maximum likelihood estimation via Expectation Maximization (EM) has been the workhorse for these models, as the parameter updates are often easily derivable. However, EM is well-known to suffer from local optima. The method of moments, dating back to Pearson [3] in 1894, is enjoying a recent revival [4, 5, 6, 7, 8, 9, 10, 11, 12, 13] due to its strong global theoretical guarantees. However, current methods depend strongly on the specific distributions and are not easily extensible to new ones. In this paper, we present a method of moments approach, which we call Polymom, for estimating a wider class of mixture models in which the moment equations are polynomial equations (Section 2). Solving general polynomial equations is NP-hard, but our key insight is that for mixture models, the moments equations are mixtures of polynomials equations and we can hope to solve them if the moment equations for each mixture component are simple polynomials equations that we can solve. Polymom proceeds as follows: First, we recover mixtures of monomials of the parameters from the data moments by solving an instance of the Generalized Moment Problem (GMP) [14, 15] (Section 3). We show that for many mixture models, the GMP can be solved with basic linear algebra and in the general case, can be approximated by an SDP in which the moment equations are linear constraints. Second, we extend multiplication matrix ideas from the computer algebra literature [16, 1 mixture model xt data point (RD) zt latent mixture component ([K]) ✓k parameters of component k (RP ) ⇡k mixing proportion of p(z = k) [✓k]K k=1 all model parameters moments of data φn(x) observation function fn(✓) observation function moments of parameters Ly the Riesz linear functional y↵ y↵= Ly(✓↵), ↵th moment µ probability measure for y y (y↵)↵the moment sequence Mr(y) moment matrix of degree r sizes D data dimensions K mixture components P parameters of mixture components T data points N constraints [N] {1, . . . , N} r degree of the moment matrix s(r) size of the degree r moment matrix polynomials R[✓] polynomial ring in variables ✓ N set of non-negative integers ↵, β, γ vector of exponents (in NP or ND) ✓↵ monomial QP p=1 ✓↵p p an↵ coefficient of ✓↵in fn(✓) Table 1: Notation: We use lowercase letters (e.g., d) for indexing, and the corresponding uppercase letter to denote the upper limit (e.g., D, in “sizes”). We use lowercase letters (e.g., ✓k,p) for scalars, lowercase bold letters (e.g., ✓) for vectors, and bold capital letters (e.g., M) for matrices. z x z ⇠Multinomial(⇡1, ⇡2) x | z ⇠N(⇠z, σz) 2 R ✓k = (⇠k, σk) 2 R2 1. Write down a mixture model φ(x) E−! f(✓) x ⇠ x2 ⇠2 + σ2 x3 ⇠3 + 3⇠σ2 ... ... 2. Derive single mixture moment equations x1 ⇠p(x; ✓⇤) ... xT ⇠p(x; ✓⇤) 3. Add data user specified framework specified Mr(y) = 2 664 1 ⇠ ⇠2 σ2 1 y0,0 y1,0 y2,0 y0,1 ⇠ y1,0 y2,0 y3,0 y1,1 ⇠2 y2,0 y3,0 y4,0 y2,1 σ2 y0,1 y1,1 y2,1 y0,2 3 775 minimize y tr(Mr(y)) s.t. Mr(y) ⌫0, y0,0 = 1 y1,0 = 1 T PT t xt y2,0 + y0,1 = 1 T PT t x2 t y3,0 + 3y1,1 = 1 T PT t x3 t . . . 4. Recover parameter moments (y) Mr(y) = VPV> # sim. diag. P = diag([⇡1, ⇡2]) V = 2 666666664 v(✓1) v(✓2) 1 1 1 ⇠ 2 −2 σ2 3 5 ⇠2 4 4 ⇠σ2 6 −10 σ4 9 25 ⇠2σ2 12 20 3 777777775 5. Solve for parameters Figure 1: An overview of applying the Polymom framework. 17, 18, 19] to extract the parameters by solving a certain generalized eigenvalue problem (Section 4). Polymom improves on previous method of moments approaches in both generality and flexibility. First, while tensor factorization has been the main driver for many of the method of moments approaches for many types of mixture models, [6, 20, 9, 8, 21, 12], each model required specific adaptations which are non-trivial even for experts. In contrast, Polymom provides a unified principle for tackling new models that is as turnkey as computing gradients or EM updates. To use Polymom (Figure 1), one only needs to provide a list of observation functions (φn) and derive their expected values expressed symbolically as polynomials in the parameters of the specified model (fn). Polymom then estimates expectations of φn and outputs parameter estimates of the specified model. Since Polymom works in an optimization framework, we can easily incorporate constraints such as non-negativity and parameter tying which is difficult to do in the tensor factorization paradigm. In simulations, we compared Polymom with EM and tensor factorization and found that Polymom performs similarly or better (Section 5). This paper assumes identifiability and infinite data. With the exception of a few specific models in Section 5, we defer issues of general identifiability and sample complexity to future work. 2 2 Problem formulation 2.1 The method of moments estimator In a mixture model, each data point x 2 RD is associated with a latent component z 2 [K]: z ⇠Multinomial(⇡), x | z ⇠p(x; ✓⇤ z), (1) where ⇡= (⇡1, . . . , ⇡K) are the mixing coefficients, ✓⇤ k 2 RP are the true model parameters for the kth mixture component, and x 2 RD is the random variable representing data. We restrict our attention to mixtures where each component distribution comes from the same parameterized family. For example, for a mixture of Gaussians, ✓⇤ k = (⇠⇤ k 2 RD, ⌃⇤ k 2 RD⇥D) consists of the mean and covariance of component k. We define N observation functions φn : RD ! R for n 2 [N] and define fn(✓) to be the expectation of φn over a single component with parameters ✓, which we assume is a simple polynomial: fn(✓) := Ex⇠p(x;✓)[φn(x)] = X ↵ an↵✓↵, (2) where ✓↵= QP p=1 ✓↵p p . The expectation of each observation function E[φn(x)] can then be expressed as a mixture of polynomials of the true parameters E[φn(x)] = PK k=1 ⇡kE[φn(x)|z = k] = PK k=1 ⇡kfn(✓⇤ k). The method of moments for mixture models seeks parameters [✓k]K k=1 that satisfy the moment conditions E[φn(x)] = K X k=1 ⇡kfn(✓k). (3) where E[φn(x)] can be estimated from the data: 1 T PT t=1 φn(xt) p! E[φn(x)]. The goal of this work is to find parameters satisfying moment conditions that can be written in the mixture of polynomial form (3). We assume that the N observations functions φ1, . . . , φN uniquely identify the model parameters (up to permutation of the components). Example 2.1 (1-dimensional Gaussian mixture). Consider a K-mixture of 1D Gaussians with parameters ✓k = [⇠k, σ2 k] corresponding to the mean and variance, respectively, of the k-th component (Figure 1: steps 1 and 2). We choose the observation functions, φ(x) = [x1, . . . , x6], which have corresponding moment polynomials, f(✓) = [⇠, ⇠2 +σ2, ⇠3 +3⇠σ2, . . . ]. For example, instantiating (3), E[x2] = PK k=1 ⇡k(⇠2 k + σ2 k). Given φ(x) and f(✓⇤), and data, the Polymom framework can recover the parameters. Note that the 6 moments we use have been shown by [3] to be sufficient for a mixture of two Gaussians. Example 2.2 (Mixture of linear regressions). Consider a mixture of linear regressions [22, 9], where each data point x = [x, y] is drawn from component k by sampling x from an unknown distribution independent of k and setting y = wkx + ✏, where ✏⇠N(0, σ2 k). The parameters ✓k = (wk, σ2 k) are the slope and noise variance for each component k. Let us take our observation functions to be φ(x) = [x, xy, xy2, x2, . . . , x3y2], for which the moment polynomials are f(✓) = [E[x], E[x2]w, E[x3]w2 + E[x]σ2, E[x2], . . .]. In Example 2.1, the coefficients an↵in the polynomial fn(✓) are just constants determined by integration. For the conditional model in Example 2.2, the coefficients depends on the data. However, we cannot handle arbitrary data dependence, see Section D for sufficient conditions and counterexamples. 2.2 Solving the moment conditions Our goal is to recover model parameters ✓⇤ 1, . . . , ✓⇤ K 2 RP for each of the K components of the mixture model that generated the data as well as their respective mixing proportions ⇡1, . . . , ⇡K 2 R. To start, let’s ignore sampling noise and identifiability issues and suppose that we are given exact moment conditions as defined in (3). Each condition fn 2 R[✓] is a polynomial of the parameters ✓, for n = 1, . . . , N. 3 Equation 3 is a polynomial system of N equations in the K + K ⇥P variables [⇡1, . . . , ⇡K] and [✓1, . . . , ✓K] 2 RP ⇥K. It is natural to ask if standard polynomial solving methods can solve (3) in the case where each fn(✓) is simple. Unfortunately, the complexity of general polynomial equation solving is lower bounded by the number of solutions, and each of the K! permutations of the mixture components corresponds to a distinct solution of (3) under this polynomial system representation. While several methods can take advantage of symmetries in polynomial systems [23, 24], they still cannot be adapted to tractably solve (3) to the best of our knowledge. The key idea of Polymom is to exploit the mixture representation of the moment equations (3). Specifically, let µ⇤be a particular “mixture” over the component parameters ✓⇤ 1, . . . , ✓⇤ k (i.e. µ⇤is a probability measure). Then we can express the moment conditions (3) in terms of µ⇤: E[φn(x)] = Z fn(✓) µ⇤(d✓), where µ⇤(✓) = K X k=1 ⇡kδ(✓−✓⇤ k). (4) As a result, solving the original moment conditions (3) is equivalent to solving the following feasibility problem over µ, but where we deliberately “forget” the permutation of the components by using µ to represent the problem: find µ 2 M+(RP ), the set of probability measures over RP s.t. R fn(✓) µ(d✓) = E[φn(x)], n = 1, . . . , N µ is K-atomic (i.e. sum of K deltas). (5) If the true model parameters [✓⇤ k]K k=1 can be identified by the N observed moments up to permutation, then the measure µ⇤(✓) = PK k=1 ⇡kδ(✓−✓⇤ k) solving Problem 5 is also unique. Polymom solves Problem 5 in two steps: 1. Moment completion (Section 3): We show that Problem 5 over the measure µ can be relaxed to an SDP over a certain (parameter) moment matrix Mr(y) whose optimal solution is Mr(y⇤) = PK k=1 ⇡kvr(✓⇤ k)vr(✓⇤ k)>, where vr(✓⇤ k) is the vector of all monomials of degree at most r. 2. Solution extraction (Section 4): We then take Mr(y) and construct a series of generalized eigendecomposition problems, whose eigenvalues yield [✓⇤ k]K k=1. Remark. From this point on, distributions and moments refer to µ⇤which is over parameters, not over the data. All the structure about the data is captured in the moment conditions (3). 3 Moment completion The first step is to reformulate Problem 5 as an instance of the Generalized Moment Problem (GMP) introduced by [15]. A reference on the GMP, algorithms for solving GMPs, and its various extensions is [14]. We start by observing that Problem 5 really only depends on the integrals of monomials under the measure µ: for example, if fn(✓) = 2✓3 1 −✓2 1✓2, then we only need to know the integrals over the constituent monomials (y3,0 := R ✓3 1µ(d✓) and y2,1 := R ✓2 1✓2µ(d✓)) in order to evaluate the integral over fn. This suggests that we can optimize over the (parameter) moment sequence y = (y↵)↵2NP , rather than the measure µ itself. We say that the moment sequence y has a representing measure µ if y↵= R ✓↵µ(d✓) for all ↵, but we do not assume that such a µ exists. The Riesz linear functional Ly : R[✓] ! R is defined to be the linear map such that Ly(✓↵) := y↵and Ly(1) = 1. For example, Ly(2✓3 1 −✓2 1✓2 + 3) = 2y3,0 −y2,1 + 3. If y has a representing measure µ, then Ly simply maps polynomials f to integrals of f against µ. The key idea of the GMP approach is to convexify the problem by treating y as free variables and then introduce constraints to guarantee that y has a representing measure. First, let vr(✓) := [✓↵: |↵| r] 2 R[✓]s(r) be the vector of all s(r) monomials of degree no greater than r. Then, define the truncated moment matrix as Mr(y) := Ly(vr(✓)vr(✓)T), where the linear functional Ly is applied elementwise (see Example 3.1 below). If y has a representing measure µ, then Mr(y) is simply a (positive) integral over rank 1 matrices vr(✓)vr(✓)T with respect to µ, so necessarily 4 Mr(y) ⌫0 holds. Furthermore, by Theorem 1 [25], for y to have a K-atomic representing measure, it is sufficient that rank(Mr(y)) = rank(Mr−1(y)) = K. So Problem 5 is equivalent to find y 2 RN (or equivalently, find M(y)) s.t. P ↵an↵y↵= E[φn(x)], n = 1, . . . , N Mr(y) ⌫0, y0 = 1 rank(Mr(y)) = K and rank(Mr−1(y)) = K. (6) Unfortunately, the rank constraints in Problem 6 are not tractable. We use the following relaxation to obtain our final (convex) optimization problem minimize y tr(CMr(y)) s.t. P ↵an↵y↵= E[φn(x)], n = 1, . . . , N Mr(y) ⌫0, y0 = 1 (7) where C ≻0 is a chosen scaling matrix. A common choice is C = Is(r) corresponding to minimizing the nuclear norm of the moment matrix, the usual convex relaxation for rank. Section A discusses some other choices of C. Example 3.1 (moment matrix for a 1-dimensional Gaussian mixture). Recall that the parameters ✓= [⇠, σ2] are the mean and variance of a one dimensional Gaussian. Let us choose the monomials v2(✓) = [1, ⇠, ⇠2, σ2]. Step 4 for Figure 1 shows the moment matrix when using r = 2. Each row and column of the moment matrix is labeled with a monomial and entry (i, j) is subscripted by the product of the monomials in row i and column j. For φ2(x) := x2, we have f2(✓) = ⇠2 + c, which leads to the linear constraint y2,0 + y0,1 −E[x2] = 0. For φ3(x) = x3, f3(✓) = ⇠3 + 3⇠c, leading to the constraint y3,0 + 3y1,1 −E[x3] = 0. Related work. Readers familiar with the sum of squares and polynomial optimization literature [26, 27, 28, 29] will note that Problem 7 is similar to the SDP relaxation of a polynomial optimization problem. However, in typical polynomial optimization, we are only interested in solutions ✓⇤that actually satisfy the given constraints, whereas here we are interested in K solutions [✓⇤ k]K k=1, whose mixture satisfies constraints corresponding to the moment conditions (3). Within machine learning, generalized PCA has been formulated as a moment problem [30] and the Hankel matrix (basically the moment matrix) has been used to learn weighted automata [13]. While similar tools are used, the conceptual approach and the problems considered are different. For example, the moment matrix of this paper consists of unknown moments of the model parameters, whereas exisiting works considered moments of the data that are always directly observable. Constraints. Constraints such as non-negativity (for parameters which represent probabilities or variances) and parameter tying [31] are quite common in graphical models and are not easily addressed with existing method of moments approaches. The GMP framework allows us to incorporate some constraints using localizing matrices [32]. Thus, we can handle constraints during the estimation procedure rather than projecting back onto the constraint set as a post-processing step. This is necessary for models that only become identifiable by the observed moments after constraints are taken into account. We describe this method and its learning implications in Section C.1. Guarantees and statistical efficiency. In some circumstances, e.g. in three-view mixture models or the mixture of linear regressions, the constraints fully determine the moment matrix – we consider these cases in Section 5 and Appendix B. While there are no general guarantee on Problem 7, the flat extension theorem tells us when the moment matrix corresponds to a unique solution (more discussions in Appendix A): Theorem 1 (Flat extension theorem [25]). Let y be the solution to Problem 7 for a particular r. If Mr(y) ⌫0 and rank(Mr−1(y)) = rank(Mr(y)) then y is the optimal solution to Problem 6 for K = rank(Mr(y)) and there exists a unique K-atomic supporting measure µ of Mr(y). Recovering Mr(y) is linearly dependent on small perturbations of the input [33], suggesting that the method has polynomial sample complexity for most models where the moments concentrate at a polynomially rate. Finally, in Appendix C, we discuss a few other important considerations like noise robustness, making Problem 7 more statistical efficient, along with some technical results on the moment completion problem and some open problems. 5 4 Solution extraction Having completed the (parameter) moment matrix Mr(y) (Section 3), we now turn to the problem of extracting the model parameters [✓⇤ k]K k=1. The solution extraction method we present is based on ideas from solving multivariate polynomial systems where the solutions are eigenvalues of certain multiplication matrices [16, 17, 34, 35].1 The main advantage of the solution extraction view is that higher-order moments and structure in parameters are handled in the framework without modelspecific effort. Recall that the true moment matrix is Mr(y⇤) = PK k=1 ⇡kv(✓⇤ k)v(✓⇤ k)T, where v(✓) := [✓↵1, . . . , ✓↵s(r)] 2 R[✓]s(r) contains all the monomials up to degree r. We use ✓= [✓1, . . . , ✓P ] for variables and [✓⇤ k]K k=1 for the true solutions to these variables (note the boldface). For example, ✓⇤ k,p := (✓⇤ k)p denotes the pth value of the kth component, which corresponds to a solution for the variable ✓p. Typically, s(r) ≫K, P and the elements of v(✓) are arranged in a degree ordering so that ||↵i||1 ||↵j||1 for i j. We can also write Mr(y⇤) as Mr(y⇤) = VPV>, where the canonical basis V := [v(✓⇤ 1), . . . , v(✓⇤ K)] 2 Rs(r)⇥K and P := diag(⇡1, . . . , ⇡K). At the high level, we want to factorize Mr(y⇤) to get V, however we cannot simply eigen-decompose Mr(y⇤) since V is not orthogonal. To overcome this challenge, we will exploit the internal structure of V to construct several other matrices that share the same factors and perform simultaneous diagonalization. Specifically, let V[β1; . . . ; βK] 2 RK⇥K be a sub-matrix of V with only the rows corresponding to monomials with exponents β1, . . . , βK 2 NP . Typically, β1, . . . , βK are just the first K monomials in v. Now consider the exponent γp 2 NP which is 1 in position p and 0 elsewhere, corresponding to the monomial ✓γp = ✓p. The key property of the canonical basis is that multiplying each column k by a monomial ✓⇤ k,p just performs a “shift” to another set of rows: V[β1; . . . ; βK] Dp = V ⇥ β1 + γp; . . . ; βK + γp ⇤ , where Dp := diag(✓⇤ 1,p, . . . , ✓⇤ K,p). (8) Note that Dp contains the pth parameter for all K mixture components. Example 4.1 (Shifting the canonical basis). Let ✓= [✓1, ✓2] and the true solutions be ✓⇤ 1 = [2, 3] and ✓⇤ 2 = [−2, 5]. To extract the solution for ✓1 (which are (✓⇤ 1,1, ✓⇤ 2,1)), let β1 = (1, 0), β2 = (1, 1), and γ1 = (1, 0). V = 2 6666664 v(✓1) v(✓2) 1 1 1 ✓1 2 −2 ✓2 3 5 ✓2 1 4 4 ✓1✓2 6 −10 ✓2 2 9 25 ✓2 1✓2 12 20 3 7777775 v1 v2 ✓1 2 −2 ✓1✓2 6 −10 / | {z } V[β1;β2] 2 0 0 −2 / | {z } diag(✓1,1,✓2,1) = v1 v2 ✓2 1 4 4 ✓2 1✓2 12 20 / | {z } V[β1+γ1;β2+γ1] (9) While the above reveals the structure of V, we don’t know V. However, we recover its column space U 2 Rs(r)⇥K from the moment matrix Mr(y⇤), for example with an SVD. Thus, we can relate U and V by a linear transformation: V = UQ, where Q 2 RK⇥K is some unknown invertible matrix. Equation 8 can now be rewritten as: U[β1; . . . ; βK]Q Dp = U ⇥ β1 + γp; . . . ; βK + γp ⇤ Q, p = 1, . . . , P, (10) which is a generalized eigenvalue problem where Dp are the eigenvalues and Q are the eigenvectors. Crucially, the eigenvalues, Dp = diag(✓⇤ 1,p, . . . , ✓⇤ K,p) give us solutions to our parameters. Note that for any choice of β1, . . . , βK and p 2 [P], we have generalized eigenvalue problems that share eigenvectors Q, though their eigenvectors Dp may differ. Corresponding eigenvalues (and hence solutions) can be obtained by solving a simultaneous generalized eigenvalue problem, e.g., by using random projections like Algorithm B of [4] or more robust [37] simutaneous diagonalization algorithms [38, 39, 40]. 1 [36] is a short overview and [35] is a comprehensive treatment including numerical issues. 6 Table 2: Applications of the Polymom framework. See Appendix B.2 for more details. Mixture of linear regressions Model Observation functions x = [x, υ] is observed where x 2 RD is drawn from an unspecified distribution and υ ⇠N(w · x, σ2I), and σ is known. The parameters are ✓⇤ k = (wk) 2 RD. φ↵,b(x) = x↵υb for 0 |↵| 3, b 2 [2]. Moment polynomials f↵,1(✓) = PP p=1 E[x↵+γp]wp f↵,2(✓) = E[x↵]σ2+PP p,q=1 E[x↵xpxq]wpwq, where the γp 2 NP is 1 in position p and 0 elsewhere. Mixture of Gaussians Model Observation functions x 2 RD is observed where x is drawn from a Gaussian with diagonal covariance: x ⇠N(⇠, diag(c)). The parameters are ✓⇤ k = (⇠k, ck) 2 RD+D. φ↵(x) = x↵for 0 |↵| 4. Moment polynomials f↵(✓) = QD d=1 h↵d(⇠d, cd). 2 Multiview mixtures Model Observation functions With 3 views, x = [x(1), x(2), x(3)] is observed where x(1), x(2), x(3) 2 RD and x(`) is drawn from an unspecified distribution with mean ⇠(`) for ` 2 [3]. The parameters are ✓⇤ k = (⇠(1) k , ⇠(2) k , ⇠(3) k ) 2 RD+D+D. φijk(x) = x(1) i x(2) j x(3) k where 1 i, j, k D. Moment polynomials fijk(✓) = ⇠(1) i ⇠(2) j ⇠(3) k . We describe one approach to solve (10), which is similar to Algorithm B of [4]. The idea is to take P random weighted combinations of the equations (10) and solve the resulting (generalized) eigendecomposition problems. Let R 2 RP ⇥P be a random matrix whose entries are drawn from N(0, 1). Then for each q = 1, . . . Q, solve U[β1; . . . ; βK] −1 ⇣PP p=1 Rq,pU ⇥ β1 + γp; . . . ; βK + γp ⇤⌘ Q = QDq. The resulting eigenvalues can be collected in ⇤2 RP ⇥K, where ⇤q,k = Dq,k,k. Note that by definition ⇤q,k = PP p=1 Rq,p✓⇤ k,p, so we can simply invert to obtain [✓⇤ 1, . . . , ✓⇤ K] = R−1⇤. Although this simple approach does not have great numerical properties, these eigenvalue problems are solvable if the eigenvalues [λq,1, . . . , λq,K] are distinct for all q, which happens with probability 1 as long as the parameters ✓⇤ k are different from each other. In Appendix B.1, we show how a prior tensor decomposition algorithm from [4] can be seen as solving Equation 10 for a particular instantiation of β1, . . . βK. 5 Applications Let us now look at some applications of Polymom. Table 2 presents several models with corresponding observation functions and moment polynomials. It is fairly straightforward to write down observation functions for a given model. The moment polynomials can then be derived by computing expectations under the model– this step can be compared to deriving gradients for EM. We implemented Polymom for several mixture models in Python (code: https://github. com/sidaw/polymom). We used CVXOPT to handle the SDP and the random projections algorithm from to extract solutions. In Table 3, we show the relative error maxk ||✓k −✓⇤ k||2/||✓⇤ k||2 averaged over 10 random models of each class. In the rest of this section, we will discuss guarantees on parameter recovery for each of these models. 2 h↵(⇠, c) = Pb↵/2c i=0 a↵,↵−2i⇠↵−2ici and a↵,i be the absolute value of the coefficient of the degree i term of the ↵th (univariate) Hermite polynomial. For example, the first few are h1(⇠, c) = ⇠, h2(⇠, c) = ⇠2 + c, h3(⇠, c) = ⇠3 + 3⇠c, h4(⇠, c) = ⇠4 + 6⇠2c + 3c2. 7 Methd. EM TF Poly EM TF Poly EM TF Poly Gaussians K, D T = 103 T = 104 T = 105 spherical 2, 2 0.37 2.05 0.58 0.24 0.73 0.29 0.19 0.36 0.14 diagonal 2, 2 0.44 2.15 0.48 0.48 4.03 0.40 0.38 2.46 0.35 constrained 2, 2 0.49 7.52 0.38 0.47 2.56 0.30 0.34 3.02 0.29 Others K, D T = 104 T = 105 T = 106 3-view 3, 3 0.38 0.51 0.57 0.31 0.33 0.26 0.36 0.16 0.12 lin. reg. 2, 2 3.51 2.60 2.52 Table 3: T is the number of samples, and the error metric is defined above. Methods: EM: sklearn initialized with k-means using 5 random restarts; TF: tensor power method implemented in Python; Poly: Polymom by solving Problem 7. Models: for mixture of Gaussians, we have σ ⇡2||µ1 − µ2||2. spherical and diagonal describes the type of covariance matrix. The mean parameters of constrained Gaussians satisfies µ1 + µ2 = 1. The best result is bolded. TF only handles spherical variance, but it was of interest to see what TF does if the data is drawn from mixture of Gaussians with diagonal covariance, these results are in strikeout. Mixture of Linear Regressions. We can guarantee that Polymom can recover parameters for this model when K D by showing that Problem 6 can be solved exactly: observe that while no entry of the moment matrix M3(y) is directly observed, each observation gives us a linear constraint on the entries of the moment matrix and when K D, there are enough equations that this system admits an unique solution for y. Chaganty et al. [9] were also able to recover parameters for this model under the same conditions (K D) by solving a series of low-rank tensor recovery problems, which ultimately requires the computation of the same moments described above. In contrast, the Polymom framework makes the dependence on moments upfront and takes care of the heavy-lifting in a problem-agnostic manner. Lastly, the model can be extended to handle per component noise by including σ as a parameter, an extension that is not possible using the method in [9]. Multiview Mixtures. We can guarantee parameter recovery when K D by proving that Problem 7 can be solved exactly (see Section B.2). Mixture of Gaussians. In this case however, the moment conditions are non-trivial and we cannot guarantee recovery of the true parameters. However, Polymom is guaranteed to recover a mixture of Gaussians that match the moments. We can also apply constraints to the model: consider the case of 2d mixture where the mean parameters for all components lies on a parabola ⇠1 −⇠2 2 = 0. In this case, we just need to add constraints to Problem 7: y(1,0)+β −y(0,2)+β = 0 for all β 2 N2 up to degree |β| 2r −2. By incorporating these constraints at estimation time, we can possibly identify the model parameters with less moments. See Section C for more details. 6 Conclusion We presented an unifying framework for learning many types of mixture models via the method of moments. For example, for the mixture of Gaussians, we can apply the same algorithm to both mixtures in 1D needing higher-order moments [3, 11] and mixtures in high dimensions where lowerorder moments suffice [6]. The Generalized Moment Problem [15, 14] and its semidefinite relaxation hierarchies is what gives us the generality, although we rely heavily on the ability of nuclear norm minimization to recover the underlying rank. As a result, while we always obtain parameters satisfying the moment conditions, there are no formal guarantees on consistent estimation. The second main tool is solution extraction, which characterizes a more general structure of mixture models compared the tensor structure observed by [6, 4]. This view draws connections to the literature on solving polynomial systems, where many techniques might be useful [35, 18, 19]. Finally, through the connections we’ve drawn, it is our hope that Polymom can make the method of moments as turnkey as EM on more latent-variable models, as well as improve the statistical efficiency of method of moments procedures. Acknowledgments. This work was supported by a Microsoft Faculty Research Fellowship to the third author and a NSERC PGS-D fellowship for the first author. 8 References [1] D. M. Titterington, A. F. Smith, and U. E. Makov. Statistical analysis of finite mixture distributions, volume 7. Wiley New York, 1985. [2] G. McLachlan and D. Peel. Finite mixture models. John Wiley & Sons, 2004. [3] K. Pearson. Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 185:71–110, 1894. [4] A. Anandkumar, D. Hsu, and S. M. Kakade. A method of moments for mixture models and hidden Markov models. In Conference on Learning Theory (COLT), 2012. [5] A. Anandkumar, D. P. Foster, D. Hsu, S. M. Kakade, and Y. Liu. Two SVDs suffice: Spectral decompositions for probabilistic topic modeling and latent Dirichlet allocation. In Advances in Neural Information Processing Systems (NIPS), 2012. [6] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. arXiv, 2013. [7] D. Hsu, S. M. Kakade, and P. Liang. Identifiability and unmixing of latent parse trees. In Advances in Neural Information Processing Systems (NIPS), 2012. [8] D. Hsu and S. M. Kakade. Learning mixtures of spherical Gaussians: Moment methods and spectral decompositions. In Innovations in Theoretical Computer Science (ITCS), 2013. [9] A. Chaganty and P. Liang. Spectral experts for estimating mixtures of linear regressions. In International Conference on Machine Learning (ICML), 2013. [10] A. T. Kalai, A. Moitra, and G. Valiant. Efficiently learning mixtures of two Gaussians. In Symposium on Theory of Computing (STOC), pages 553–562, 2010. [11] M. Hardt and E. Price. Sharp bounds for learning a mixture of two Gaussians. arXiv preprint arXiv:1404.4997, 2014. [12] R. Ge, Q. Huang, and S. M. Kakade. Learning mixtures of Gaussians in high dimensions. arXiv preprint arXiv:1503.00424, 2015. [13] B. Balle, X. Carreras, F. M. Luque, and A. Quattoni. Spectral learning of weighted automata - A forwardbackward perspective. Machine Learning, 96(1):33–63, 2014. [14] J. B. Lasserre. Moments, Positive Polynomials and Their Applications. Imperial College Press, 2011. [15] J. B. Lasserre. A semidefinite programming approach to the generalized problem of moments. Mathematical Programming, 112(1):65–92, 2008. [16] H. J. Stetter. Multivariate polynomial equations as matrix eigenproblems. WSSIA, 2:355–371, 1993. [17] H. M. M¨oller and H. J. Stetter. Multivariate polynomial equations with multiple zeros solved by matrix eigenproblems. Numerische Mathematik, 70(3):311–329, 1995. [18] B. Sturmfels. Solving systems of polynomial equations. American Mathematical Society, 2002. [19] D. Henrion and J. Lasserre. Detecting global optimality and extracting solutions in GloptiPoly. In Positive polynomials in control, pages 293–310, 2005. [20] A. Anandkumar, R. Ge, D. Hsu, and S. Kakade. A tensor spectral approach to learning mixed membership community models. In Conference on Learning Theory (COLT), pages 867–881, 2013. [21] A. Anandkumar, R. Ge, and M. Janzamin. Provable learning of overcomplete latent variable models: Semi-supervised and unsupervised settings. arXiv preprint arXiv:1408.0553, 2014. [22] K. Viele and B. Tong. Modeling with mixtures of linear regressions. Statistics and Computing, 12(4):315– 330, 2002. [23] B. Sturmfels. Algorithms in invariant theory. Springer Science & Business Media, 2008. [24] R. M. Corless, K. Gatermann, and I. S. Kotsireas. Using symmetries in the eigenvalue method for polynomial systems. Journal of Symbolic Computation, 44(11):1536–1550, 2009. [25] R. E. Curto and L. A. Fialkow. Solution of the truncated complex moment problem for flat data, volume 568. American Mathematical Society, 1996 1996. [26] J. B. Lasserre. Global optimization with polynomials and the problem of moments. SIAM Journal on Optimization, 11(3):796–817, 2001. [27] M. Laurent. Sums of squares, moment matrices and optimization over polynomials. In Emerging applications of algebraic geometry, pages 157–270, 2009. [28] P. A. Parrilo and B. Sturmfels. Minimizing polynomial functions. Algorithmic and quantitative real algebraic geometry, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 60:83– 99, 2003. [29] P. A. Parrilo. Semidefinite programming relaxations for semialgebraic problems. Mathematical programming, 96(2):293–320, 2003. [30] N. Ozay, M. Sznaier, C. M. Lagoa, and O. I. Camps. GPCA with denoising: A moments-based convex approach. In Computer Vision and Pattern Recognition (CVPR), pages 3209–3216, 2010. 9 | 2015 | 219 |
5,724 | A Tractable Approximation to Optimal Point Process Filtering: Application to Neural Encoding Yuval Harel, Ron Meir Department of Electrical Engineering Technion – Israel Institute of Technology Technion City, Haifa, Israel {yharel@tx,rmeir@ee}.technion.ac.il Manfred Opper Department of Artificial Intelligence Technical University Berlin Berlin 10587, Germany opperm@cs.tu-berlin.de Abstract The process of dynamic state estimation (filtering) based on point process observations is in general intractable. Numerical sampling techniques are often practically useful, but lead to limited conceptual insight about optimal encoding/decoding strategies, which are of significant relevance to Computational Neuroscience. We develop an analytically tractable Bayesian approximation to optimal filtering based on point process observations, which allows us to introduce distributional assumptions about sensory cell properties, that greatly facilitate the analysis of optimal encoding in situations deviating from common assumptions of uniform coding. The analytic framework leads to insights which are difficult to obtain from numerical algorithms, and is consistent with experiments about the distribution of tuning curve centers. Interestingly, we find that the information gained from the absence of spikes may be crucial to performance. 1 Introduction The task of inferring a hidden dynamic state based on partial noisy observations plays an important role within both applied and natural domains. A widely studied problem is that of online inference of the hidden state at a given time based on observations up to to that time, referred to as filtering [1]. For the linear setting with Gaussian noise and quadratic cost, the solution is well known since the early 1960s both for discrete and continuous times, leading to the celebrated Kalman and the Kalman-Bucy filters [2, 3], respectively. In these cases the exact posterior distribution is Gaussian, resulting in closed form recursive update equations for the mean and variance of this distribution, implying finite-dimensional filters. However, beyond some very specific settings [4], the optimal filter is infinite-dimensional and impossible to compute in closed form, requiring either approximate analytic techniques (e.g., the extended Kalman filter (e.g., [1]), the unscented filter [5]) or numerical procedures (e.g., particle filters [6]). The latter usually require time discretization and a finite number of particles, resulting in loss of precision . For many practical tasks (e.g., queuing [7] and optical communication [8]) and biologically motivated problems (e.g., [9]) a natural observation process is given by a point process observer, leading to a nonlinear infinite-dimensional optimal filter (except in specific settings, e.g., finite state spaces, [7, 10]). We consider a continuous-state and continuous-time multivariate hidden Markov process observed through a set of sensory neuron-like elements characterized by multi-dimensional unimodal tuning functions, representing the elements’ average firing rate. The tuning function parameters are characterized by a distribution allowing much flexibility. The actual firing of each cell is random and is given by a Poisson process with rate determined by the input and by the cell’s tuning function. Inferring the hidden state under such circumstances has been widely studied within the Computational Neuroscience literature, mostly for static stimuli. In the more challenging and practically important dynamic setting, much work has been devoted to the development of numerical sampling techniques 1 for fast and effective approximation of the posterior distribution (e.g., [11]). In this work we are less concerned with algorithmic issues, and more with establishing closed-form analytic expressions for an approximately optimal filter (see [10, 12, 13] for previous work in related, but more restrictive settings), and using these to characterize the nature of near-optimal encoders, namely determining the structure of the tuning functions for optimal state inference. A significant advantage of the closed form expressions over purely numerical techniques is the insight and intuition that is gained from them about qualitative aspects of the system. Moreover, the leverage gained by the analytic computation contributes to reducing the variance inherent to Monte Carlo approaches. Technically, given the intractable infinite-dimensional nature of the posterior distribution, we use a projection method replacing the full posterior at each point in time by a projection onto a simple family of distributions (Gaussian in our case). This approach, originally developed in the Filtering literature [14, 15], and termed Assumed Density Filtering (ADF), has been successfully used more recently in Machine Learning [16, 17]. As far as we are aware, this is the first application of this methodology to point process filtering. The main contributions of the paper are the following: (i) Derivation of closed form recursive expressions for the continuous time posterior mean and variance within the ADF approximation, allowing for the incorporation of distributional assumptions over sensory variables. (ii) Characterization of the optimal tuning curves (encoders) for sensory cells in a more general setting than hitherto considered. Specifically, we study the optimal shift of tuning curve centers, providing an explanation for observed experimental phenomena [18]. (iii) Demonstration that absence of spikes is informative, and that, depending on the relationship between the tuning curve distribution and the dynamic process (the ‘prior’), may significantly improve the inference. This issue has not been emphasized in previous studies focusing on homogeneous populations. We note that most previous work in the field of neural encoding/decoding has dealt with static observations and was based on the Fisher information, which often leads to misleading qualitative results (e.g., [19, 20]). Our results address the full dynamic setting in continuous time, and provide results for the posterior variance, which is shown to yield an excellent approximation of the posterior Mean Square Error (MSE). Previous work addressing non-uniform distributions over tuning curve parameters [21] used static univariate observations and was based on Fisher information rather than the MSE itself. 2 Problem formulation 2.1 Dense Gaussian neural code We consider a dynamical system with state Xt ∈Rn, observed through an observation process N describing the firing patterns of sensory neurons in response to the process X. The observed process is a diffusion process obeying the Stochastic Differential Equation (SDE) dXt = A (Xt) dt + D (Xt) dWt, (t ≥0) where A (·) , D (·) are arbitrary functions and Wt is standard Brownian motion. The initial condition X0 is assumed to have a continuous distribution with a known density. The observation process N is a marked point process [8] defined on [0, ∞) × Rm, meaning that each point, representing the firing of a neuron, is identified by its time t ∈[0, ∞), and a mark θ ∈Rm. In this work the mark is interpreted as a parameter of the firing neuron, which we refer to as the neuron’s preferred stimulus. Specifically, a neuron with parameter θ is taken to have firing rate λ (x; θ) = h exp −1 2 ∥Hx −θ∥2 Σ−1 tc , in response to state x, where H ∈Rm×n and Σtc ∈Rm×m , m ≤n, are fixed matrices, and the notation ∥y∥2 M denotes yT My. The choice of Gaussian form for λ facilitates analytic tractability. The inclusion of the matrix H allows using high-dimensional models where only some dimensions are observed, for example when the full state includes velocities but only locations are directly observable. We also define Nt ≜N ([0, t) × Rm), i.e., Nt is the total number of points up to time t, regardless of their location θ, and denote by Nt the sequence of points up to time t — formally, 2 the process N restricted to [0, t) × Rm. Following [8], we use the notation ˆ b a ˆ U f (t, θ) N (dt × dθ) ≜ X i 1 {ti ∈[a, b] , θi ∈U} f (ti, θi) , (1) for U ⊆Rm and any function f, where (ti, θi) are respectively the time and mark of the i-th point of the process N. Consider a network with M sensory neurons, having random preferred stimuli θ = {θi} M i=1 that are drawn independently from a common distribution with probability density f (θ), which we refer to as the population density. Positing a distribution for the preferred stimuli allows us to obtain simple closed form solutions, and to optimize over distribution parameters rather than over the higherdimensional space of all the θi. The total rate of spikes with preferred stimuli in a set A ⊂Rm, given Xt = x, is then λA (x; θ) = h P i 1{θi∈A} exp −1 2 ∥Hx −θi∥2 Σ−1 tc . Averaging over f (θ), we have the expected rate λA (x) ≜EλA (x; θ) = hM ´ A f (θ) exp −1 2 ∥Hx −θ∥2 Σ−1 tc dθ. We now obtain an infinite neural network by considering the limit M →∞while holding λ0 = hM fixed. In the limit we have λA (x; θ) →λA (x), so that the process N has density λt (θ, Xt) = λ0f (θ) exp −1 2 ∥HXt −θ∥2 Σ−1 tc , (2) meaning that the expected number of points in a small rectangle [t, t + dt] × Q i [θi, θi + dθi], conditioned on the history X[0,t], Nt, is λt (θ, Xt) dt Q i dθi + o (dt, |dθ|). A finite network can be obtained as a special case by taking f to be a sum of delta functions. For analytic tractability, we assume that f (θ) is Gaussian with center c and covariance Σpop, namely f (θ) = N(θ; c, Σpop). We refer to c as the population center. Previous work [22, 20, 23] considered the case where neurons’ preferred stimuli uniformly cover the space, obtained by removing the factor f (θ) from (2). Then, the total firing rate ´ λt (θ, x) dθ is independent of x, which simplifies the analysis, and leads to a Gaussian posterior (see [22]). We refer to the assumption that ´ λt (θ, x) dθ is independent of x as uniform coding. The uniform coding case may be obtained from our model by taking the limit Σ−1 pop →0 with λ0/ p det Σpop held constant. 2.2 Optimal encoding and decoding We consider the question of optimal encoding and decoding under the above model. The process of neural decoding is assumed to compute (exactly or approximately) the full posterior distribution of Xt given Nt. The problem of neural encoding is then to choose the parameters φ = (c, Σpop, Σtc), which govern the statistics of the observation process N, given a specific decoding scheme. To quantify the performance of the encoding-decoding system, we summarize the result of decoding using a single estimator ˆXt = ˆXt (Nt), and define the Mean Square Error (MSE) as ϵt ≜trace[(Xt −ˆXt)(Xt −ˆXt)T ]. We seek ˆXt and φ that solve minφ limt→∞min ˆ Xt E [ϵt] = minφ limt→∞E[min ˆ Xt E[ϵt|Nt]]. The inner minimization problem in this equation is solved by the MSE-optimal decoder, which is the posterior mean ˆXt = µt ≜E [Xt|Nt]. The posterior mean may be computed from the full posterior obtained by decoding. The outer minimization problem is solved by the optimal encoder. In principle, the encoding/decoding problem can be solved for any value of t. In order to assess performance it is convenient to consider the steady-state limit t →∞ for the encoding problem. Below, we find a closed form approximate solution to the decoding problem for any t using ADF. We then explore the problem of choosing the steady-state optimal encoding parameters φ using Monte Carlo simulations. Note that if decoding is exact, the problem of optimal encoding becomes that of minimizing the expected posterior variance. 3 3 Neural decoding 3.1 Exact filtering equations Let P (·, t) denote the posterior density of Xt given Nt, and Et P [·] the posterior expectation given Nt. The prior density P (·, 0) is assumed to be known. The problem of filtering a diffusion process X from a doubly stochastic Poisson process driven by X is formally solved in [24]. The result is extended to marked point processes in [22], where the authors derive a stochastic PDE for the posterior density1, dP (x, t) = L∗P (x, t) dt + P (x, t) ˆ θ∈Rm λt (θ, x) −ˆλt (θ) ˆλt (θ) N (dt × dθ) −ˆλt (θ) dθ dt , (3) where the integral with respect to N is interpreted as in (1), L is the state’s infinitesimal generator (Kolmogorov’s backward operator), defined as Lf (x) = lim∆t→0+ (E [f (Xt+∆t) |Xt = x] −f (x)) /∆t, L∗ is L’s adjoint operator (Kolmogorov’s forward operator), and ˆλt (θ) ≜Et P [λt (θ, Xt)] = ´ P (x, t) λt (θ, x) dx. The stochastic PDE (3) is usually intractable. In [22, 23] the authors consider linear dynamics with uniform coding and Gaussian prior. In this case, the posterior is Gaussian, and (3) leads to closed form ODEs for its moments. When the uniform coding assumption is violated, the posterior is no longer Gaussian. Still, we can obtain exact equations for the posterior moments, as follows. Let µt = Et P Xt, ˜Xt = Xt −µt, Σt = Et P [ ˜Xt ˜XT t ]. Using (3), and the known results for L for diffusion processes (see supplementary material), the first two posterior moments can be shown to obey the following equations between spikes (see [23] for the finite population case): dµt dt = Et P [A (Xt)] + Et P Xt ˆ ˆλt (θ) −λt (θ, Xt) dθ dΣt dt = Et P h A (Xt) ˜XT t i + Et P h ˜XtA (Xt)T i + Et P h D (Xt) D (Xt)T i +Et P ˜Xt ˜XT t ˆ ˆλt (θ) −λt (θ, Xt) dθ . (4) 3.2 ADF approximation While equations (4) are exact, they are not practical, since they require computation of Et P [·]. We now proceed to find an approximate closed form for (4). Here we present the main ideas of the derivation. The formulation presented here assumes, for simplicity, an open-loop setting where the system is passively observed. It can be readily extended to a closed-loop control-based setting, and is presented in this more general framework in the supplementary material, including full details. To bring (4) to a closed form, we use ADF with an assumed Gaussian density (see [16] for details). Conceptually, this may be envisioned as integrating (4) while replacing the distribution P by its approximating Gaussian “at each time step”. Assuming the moments are known exactly, the Gaussian is obtained by matching the first two moments of P [16]. Note that the solution of the resulting equations does not in general match the first two moments of the exact solution, though it may approximate it. Abusing notation, in the sequel we use µt, Σt to refer to the ADF approximation rather than to the exact values. Substituting the normal distribution N(x; µt, Σt) for P(x, t) to compute the expectations involving λt in (4), and using (2) and the Gaussian form of f(θ), results in computable Gaussian integrals. Other terms may also be computed in closed form if the function A, D can be expanded as power series. This computation yields approximate equations for µt, Σt between spikes. The updates at spike times can similarly be computed in closed form either from (3) or directly from a Bayesian update of the posterior (see supplementary material, or e.g., [13]). 1The model considered in [22] assumes linear dynamics and uniform coding – meaning that the total rate of Nt, namely ´ θ λt (θ, Xt) dθ, is independent of Xt. However, these assumption are only relevant to establish other proposition in that paper. The proof of equation (3) still holds as is in our more general setting. 4 −6 −4 −2 0 2 4 6 µ population density firing rate for µ=0 −6 −4 −2 0 2 4 6 ¹t −1 0 1 d¹t=dt d¾t=dt −5 0 5 Xt ¹t §¾t N(t;µ) 0 2 4 6 8 10 t 0 4 8 ¾ 2 t Figure 1: Left Changes to the posterior moments between spikes as a function of the current posterior mean estimate, for a static 1-d state. The parameters are a = d = 0, H = 1, σ2 pop = 1, σ2 tc = 0.2, c = 0, λ0 = 10, σt = 1. The bottom plot shows the density of preferred stimuli f (θ) and tuning curve for a neuron with preferred stimulus θ = 0. Right An example of filtering a linear one-dimensional process. Each dot correspond to a spike with the vertical location indicating the preferred stimulus θ. The curves to the right of the graph show the preferred stimulus density (black), and a tuning curve centered at θ = 0 (gray). The tuning curve and preferred stimulus density are normalized to the same height for visualization. The bottom graph shows the posterior variance, with the vertical lines showing spike times. Parameters are: a = −0.1, d = 2, H = 1, σ2 pop = 2, σ2 tc = 0.2, c = 0, λ0 = 10, µ0 = 0, σ2 0 = 1. Note the decrease of the posterior variance following t = 4 even though no spikes are observed. For simplicity, we assume that the dynamics are linear, dXt = AXt dt + D dWt, resulting in the filtering equations dµt = Aµtdt + gtΣtHT St (Hµt −c) dt + Σt−HT Stc t− ˆ θ∈Rm (θ −Hµt−) N (dt × dθ) (5) dΣt = AΣt + ΣtAT + DDT dt + gtΣtHT h St −St (Hµt −c) (Hµt −c)T St i HΣtdt −Σt−HT Stc t−HΣt−dNt, (6) where Stc t ≜ Σtc + HΣtHT −1 , St ≜ Σtc + Σpop + HΣtHT −1, and gt ≜ ˆ ˆλ (θ) dθ = ˆ Et P [λ (θ, Xt)] dθ = λ0p det (ΣtcSt) exp −1 2 ∥Hµt −c∥2 St is the posterior expected total firing rate. Expressions including t−are to be interpreted as left limits f (t−) = lims→t−f (s), which are necessary since the solution is discontinuous at spike times. The last term in (5) is to be interpreted as in (1). It contributes an instantaneous jump in µt at the time of a spike with preferred stimulus θ, moving Hµt closer to θ. Similarly, the last term in (6) contributes an instantaneous jump in Σt at each spike time, which is the same regardless of spike location. All other terms describe the evolution of the posterior between spikes: the first few terms in (5)-(6) are the same as in the dynamics of the prior, as in [13, 23], whereas the terms involving gt correspond to information from the absence of spikes. Note that the latter scale with gt, the expected total firing rate, i.e., lack of spikes becomes “more informative” the higher the expected rate of spikes. It is illustrative to consider these equations in the scalar case m = n = 1, with H = 1. Letting σ2 t = Σt, σ2 tc = Σtc, σ2 pop = Σpop, a = A, d = D yields dµt = aµtdt + gt σ2 t σ2 t + σ2 tc + σ2pop (µt −c) dt + σ2 t− σ2 t−+ σ2 tc ˆ θ∈R (θ −µt−) N (dt × dθ) (7) dσ2 t = 2aσ2 t + d2 + gt σ2 t σ2 t + σ2 tc + σ2pop " 1 − (µt −c)2 σ2 t + σ2 tc + σ2pop # σ2 t ! dt − σ2 t− σ2 t−+ σ2 tc σ2 t−dNt, (8) 5 0 2 4 6 8 10 12 14 t −0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 x Uniform coding filter vs. ADF True state ADF Uniform coding filter 0 2 4 6 8 10 ¾ 2 pop 100 101 102 MSE Accumulated MSE for ADF and uniform-coding filter ADF uniform Figure 2: Left Illustration of information gained between spikes. A static state Xt = 0.5, shown in a dotted line, is observed and filtered twice: with the correct value σ2 pop = 0.5 (“ADF”, solid blue line), and with σ2 pop = ∞(“Uniform coding filter”, dashed line). The curves to the right of the graph show the preferred stimulus density (black), and a tuning curve centered at θ = 0 (gray). Both filters are initialized with µ0 = 0, σ2 0 = 1. Right Comparison of MSE for the ADF filter and the uniform coding filter. The vertical axis shows the integral of the square error integrated over the time interval [5, 10], averaged over 1000 trials. Shaded areas indicate estimated errors, computed as the sample standard deviation divided by the square root of the number of trials. Parameters in both plots are a = d = 0, c = 0, σ2 pop = 0.5, σ2 tc = 0.1, H = 1, λ0 = 10. where gt = λ0p 2πσ2 tcN µt; c, σ2 t + σ2 tc + σ2 pop . Figure 1 (left) shows how µt, σ2 t change between spikes for a static 1-dimensional state (a = d = 0). In this case, all terms in the filtering equations drop out except those involving gt. The term involving gt in dµt pushes µt away from c in the absence of spikes. This effect weakens as |µt −c| grows due to the factor gt, consistent with the idea that far from c, the lack of spikes is less surprising, hence less informative. The term involving gt in dσ2 t increases the variance when µt is near c, otherwise decreases it. 3.3 Information from lack of spikes An interesting aspect of the filtering equations (5)-(6) is that the dynamics of the posterior density between spikes differ from the prior dynamics. This is in contrast to previous models which assumed uniform coding: the (exact) filtering equations appearing in [22] and [23] have the same form as (5)(6) except that they do not include the correction terms involving gt, so that between spikes the dynamics are identical to the prior dynamics. This reflects the fact that lack of spikes in a time interval is an indication that the total firing rate is low; in the uniform coding case, this is not informative, since the total firing rate is independent of the state. Figure 2 (left) illustrates the information gained from lack of spikes. A static scalar state is observed by a process with rate (2), and filtered twice: once with the correct value of σpop, and once with σpop →∞, as in the uniform coding filter of [23]. Between spikes, the ADF estimate moves away from the population center c = 0, whereas the uniform coding estimate remains fixed. The size of this effect decreases with time, as the posterior variance estimate (not shown) decreases. The reduction in filtering errors gained from the additional terms in (5)-(6) is illustrated in Figure 2 (right). Despite the approximation involved, the full filter significantly outperforms the uniform coding filter. The difference disappears as σpop increases and the population becomes uniform. Special cases To gain additional insight into the filtering equations, we consider their behavior in several limits. (i) As σ2 pop →∞, spikes become rare as the density f (θ) approaches 0 for any θ. The total expected rate of spikes gt also approaches 0, and the terms corresponding to information from lack of spikes vanish. Other terms in the equations are unaffected. (ii) In the limit σ2 tc →∞, each neuron fires as a Poisson process with a constant rate independent of the observed state. The total expected firing rate gt saturates at its maximum, λ0. Therefore the preferred stimuli of spiking neurons provide no information, nor does the presence or absence of spikes. Accordingly, all terms other than those related to the prior dynamics vanish. (iii) The uniform coding case [22, 23] is obtained as a special case in the limit σ2 pop →∞with λ0/σpop constant. In this limit the terms involving gt drop out, recovering the (exact) filtering equations in [22]. 6 4 Optimal neural encoding We model the problem of optimal neural encoding as choosing the parameters c, Σpop, Σtc of the population and tuning curves, so as to minimize the steady-state MSE. As noted above, when the estimate is exactly the posterior mean, this is equivalent to minimizing the steady-state expected posterior variance. The posterior variance has the advantage of being less noisy than the square error itself, since by definition it is the mean of the square error (of the posterior mean) under conditioning by Nt. We explore the question of optimal neural encoding by measuring the steady-state variance through Monte Carlo simulations of the system dynamics and the filtering equations (5)-(6). Since the posterior mean and variance computed by ADF are approximate, we verified numerically that the variance closely matches the MSE in the steady state when averaged across many trials (see supplementary material), suggesting that asymptotically the error in estimating µt and Σt is small. 4.1 Optimal population center We now consider the question of the optimal value for the population center c. Intuitively, if the prior distribution of the process X is unimodal with mode x0, the optimal population center is at Hx0, to produce the most spikes. On the other hand, the terms involving gt in the filtering equation (5)-(6) suggest that the lack of spikes is also informative. Moreover, as seen in Figure 1 (left), the posterior variance is reduced between spikes only when the current estimate is far enough from c. These considerations suggest that there is a trade-off between maximizing the frequency of spikes and maximizing the information obtained from lack of spikes, yielding an optimal value for c that differs from Hx0. We simulated a simple one-dimensional process to determine the optimal value of c which minimizes the approximate posterior variance Σt. Figure 3 (left) shows the posterior variance for varying values of the population center c and base firing rate λ0. For each firing rate, we note the value of c minimizing the posterior variance (the optimal population center), as well as the value of cm = argminc (dσt/dt|µt=0), which maximizes the reduction in the posterior variance when the current state estimate µt is at the process equilibrium x0 = 0. Consistent with the discussion above, the optimal value lies between 0 (where spikes are most abundant) and cm (where lack of spikes is most informative). As could be expected, the optimal center is closer to 0 the higher the base firing rate. Similarly, wide tuning curves, which render the spikes less informative, lead to an optimal center farther from 0 (Figure 3, right). A shift of the population center relative to the prior mode has been observed physiologically in encoding of inter-aural time differences for localization of sound sources [25]. In [18], this phenomenon was explained in a finite population model based on maximization of Fisher information. This is in contrast to the results of [21], which consider a heterogeneous population where the tuning curve width scales roughly inversely with neuron density. In this case, the population density maximizing the Fisher information is shown to be monotonic with the prior, i.e., more neurons should be assigned to more probable states. This apparent discrepancy may be due to the scaling of tuning curve widths in [21], which produces roughly constant total firing rate, i.e., uniform coding. This demonstrates that a non-constant total firing rate, which renders lack of spikes informative, may be necessary to explain the physiologically observed shift phenomenon. 4.2 Optimization of population distribution Next, we consider the optimization of the population distribution, namely, the simultaneous optimization of the population center c and the population variance Σpop in the case of a static scalar state. Previous work using a finite neuron population and a Fisher information-based criterion [18] has shown that the optimal distribution of preferred stimuli depends on the prior variance. When it is small relative to the tuning curve width, optimal encoding is achieved by placing all preferred stimuli at a fixed distance from the prior mean. On the other hand, when the prior variance is large relative to the tuning curve width, optimal encoding is uniform (see figure 2 in [18]). Similar results are obtained with our model, as shown in Figure 4. Here, a static scalar state drawn from N(0, σ2 p) is filtered by a population with tuning curve width σtc = 1 and preferred stimulus density N(c, σ2 pop). In Figure 4 (left), the prior distribution is narrow relative to the tuning curve width, leading to an optimal population with a narrow population distribution far from the origin. In 7 0.0 0.2 0.4 0.6 0.8 1.0 c 100 101 102 ¸0 Steady-state posterior stdev / prior stdev argminc¾ 2 t argmincd¾2 j¹ =0 0.40 0.48 0.56 0.64 0.72 0.80 0.88 0.96 0.0 0.2 0.4 0.6 0.8 1.0 c 0.75 0.80 0.85 ¾t=¾0 0.0 0.5 1.0 1.5 2.0 c 0.2 0.4 0.6 0.8 1.0 ¾tc Steady-state posterior stdev / prior stdev 0.54 0.60 0.66 0.72 0.78 0.84 0.90 0.96 Figure 3: Optimal population center location for filtering a linear one-dimensional process. Both graphs show the ratio of posterior standard deviation to the prior steady-state standard deviation of the process, along with the value of c minimizing the posterior variance (blue line), and minimizing the reduction of posterior variance when µt = 0 (yellow line). The process is initialized from its steady-state distribution. The posterior variance is estimated by averaging over the time interval [5, 10] and across 1000 trials for each data point. Parameters for both graphs: a = −1, d = 0.5, σ2 pop = 0.1. In the graph on the left, σ2 tc = 0.01; on the right, λ0 = 50. 0 1 2 3 4 5 c 10-2 10-1 100 101 102 ¾pop Steady-state variance, narrow prior −0.35 −0.30 −0.25 −0.20 −0.15 −0.10 −0.05 0.00 log10(post. stdev / prior stdev) 0 1 2 3 4 5 c 10-2 10-1 100 101 102 ¾pop Steady-state variance, wide prior −1.00 −0.75 −0.50 −0.25 0.00 0.25 0.50 0.75 log10(post. stdev / prior stdev) Figure 4: Optimal population distribution depends on prior variance relative to tuning curve width. A static scalar state drawn from N(0, σ2 p) is filtered with tuning curve σtc = 1 and preferred stimulus density N(c, σ2 pop). Both graphs show the posterior standard deviation relative to the prior standard deviation σp. In the left graph, the prior distribution is narrow, σ2 p = 0.1, whereas on the right, it is wide, σ2 p = 10. In both cases the filter is initialized with the correct prior, and the square error is averaged over the time interval [5, 10] and across 100 trials for each data point. Figure 4 (right), the prior is wide relative to the tuning curve width, leading to an optimal population with variance that roughly matches the prior variance. When both the tuning curves and the population density are narrow relative to the prior, so that spikes are rare (low values of σpop in Figure 4 (right)), the ADF approximation becomes poor, resulting in MSEs larger than the prior variance. 5 Conclusions We have introduced an analytically tractable Bayesian approximation to point process filtering, allowing us to gain insight into the generally intractable infinite-dimensional filtering problem. The approach enables the derivation of near-optimal encoding schemes going beyond previously studied uniform coding assumptions. The framework is presented in continuous time, circumventing temporal discretization errors and numerical imprecisions in sampling-based methods, applies to fully dynamic setups, and directly estimates the MSE rather than lower bounds to it. It successfully explains observed experimental results, and opens the door to many future predictions. Future work will include a development of previously successful mean field approaches [13] within our more general framework, leading to further analytic insight. Moreover, the proposed strategy may lead to practically useful decoding of spike trains. References [1] B.D. Anderson and J.B. Moore. Optimal Filtering. Dover, 2005. 1 [2] R.E. Kalman and R.S. Bucy. New results in linear filtering and prediction theory. J. of Basic Eng., Trans. ASME, Series D, 83(1):95–108, 1961. 1 8 [3] R.E. Kalman. A new approach to linear filtering and prediction problems. J. Basic Eng., Trans. ASME, Series D., 82(1):35–45, 1960. 1 [4] F. Daum. Nonlinear filters: beyond the kalman filter. Aerospace and Electronic Systems Magazine, IEEE, 20(8):57–69, 2005. 1 [5] S. Julier, J. Uhlmann, and H. Durrant-Whyte. A new method for the nonlinear transformation of means and covariances in filters and estimators. IEEE Trans. Autom. Control, 45(3):477–482, 2000. 1 [6] A. Doucet and A.M. Johansen. A tutorial on particle filtering and smoothing: fifteen years later. In D. Crisan and B. Rozovskii, editors, Handbook of Nonlinear Filtering, pages 656–704. Oxford, UK: Oxford University Press, 2009. 1 [7] P. Br´emaud. Point Processes and Queues: Martingale Dynamics. Springer, New York, 1981. 1 [8] D.L. Snyder and M.I. Miller. Random Point Processes in Time and Space. Springer, second edition edition, 1991. 1, 2.1 [9] P. Dayan and L.F. Abbott. Theoretical Neuroscience: Computational and Mathematical Modeling of Neural Systems. MIT Press, 2005. 1 [10] O. Bobrowski, R. Meir, and Y.C. Eldar. Bayesian filtering in spiking neural networks: noise, adaptation, and multisensory integration. Neural Comput, 21(5):1277–1320, May 2009. 1 [11] Y. Ahmadian, J.W. Pillow, and L. Paninski. Efficient markov chain monte carlo methods for decoding neural spike trains. Neural Comput, 23(1):46–96, Jan 2011. 1 [12] A.K. Susemihl, R. Meir, and M. Opper. Analytical results for the error in filtering of gaussian processes. 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 2303–2311. 2011. 1 [13] A.K. Susemihl, R. Meir, and M. 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, 2013. 1, 3.2, 3.2, 5 [14] P.S. Maybeck. Stochastic Models, Estimation, and Control. Academic Press, 1979. 1 [15] D. Brigo, B. Hanzon, and F. LeGland. A differential geometric approach to nonlinear filtering: the projection filter. Automatic Control, IEEE Transactions on, 43:247–252, 1998. 1 [16] M. Opper. A Bayesian approach to online learning. In D. Saad, editor, Online Learning in Neural Networks, pages 363–378. Cambridge university press, 1998. 1, 3.2 [17] T.P. Minka. Expectation propagation for approximate bayesian inference. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pages 362–369. Morgan Kaufmann Publishers Inc., 2001. 1 [18] N.S. Harper and D. McAlpine. Optimal neural population coding of an auditory spatial cue. Nature, 430(7000):682–686, Aug 2004. n1397b. 1, 4.1, 4.2 [19] M. Bethge, D. Rotermund, and K. Pawelzik. Optimal short-term population coding: when fisher information fails. Neural Comput, 14(10):2317–2351, Oct 2002. 1 [20] S. Yaeli and R. Meir. Error-based analysis of optimal tuning functions explains phenomena observed in sensory neurons. Front Comput Neurosci, 4:130, 2010. 1, 2.1 [21] D. Ganguli and E.P. Simoncelli. Efficient sensory encoding and bayesian inference with heterogeneous neural populations. Neural Comput, 26(10):2103–2134, 2014. 1, 4.1 [22] I. Rhodes and D. Snyder. Estimation and control performance for space-time point-process observations. IEEE Transactions on Automatic Control, 22(3):338–346, 1977. 2.1, 3.1, 3.1, 1, 3.3, 3.3 [23] A.K. Susemihl, R. Meir, and M. Opper. Optimal Neural Codes for Control and Estimation. Advances in Neural Information Processing Systems, pages 1–9, 2014. 2.1, 3.1, 3.2, 3.3, 3.3 [24] D. Snyder. Filtering and detection for doubly stochastic Poisson processes. IEEE Transactions on Information Theory, 18(1):91–102, January 1972. 3.1 [25] A. Brand, O. Behrend, T. Marquardt, D. McAlpine, and B. Grothe. Precise inhibition is essential for microsecond interaural time difference coding. Nature, 417(6888):543–547, 2002. 4.1 9 | 2015 | 22 |
5,725 | Online Learning with Gaussian Payoffs and Side Observations Yifan Wu1 Andr´as Gy¨orgy2 Csaba Szepesv´ari1 1Dept. of Computing Science University of Alberta {ywu12,szepesva}@ualberta.ca 2Dept. of Electrical and Electronic Engineering Imperial College London a.gyorgy@imperial.ac.uk Abstract We consider a sequential learning problem with Gaussian payoffs and side observations: after selecting an action i, the learner receives information about the payoff of every action j in the form of Gaussian observations whose mean is the same as the mean payoff, but the variance depends on the pair (i, j) (and may be infinite). The setup allows a more refined information transfer from one action to another than previous partial monitoring setups, including the recently introduced graph-structured feedback case. For the first time in the literature, we provide non-asymptotic problem-dependent lower bounds on the regret of any algorithm, which recover existing asymptotic problem-dependent lower bounds and finitetime minimax lower bounds available in the literature. We also provide algorithms that achieve the problem-dependent lower bound (up to some universal constant factor) or the minimax lower bounds (up to logarithmic factors). 1 Introduction Online learning in stochastic environments is a sequential decision problem where in each time step a learner chooses an action from a given finite set, observes some random feedback and receives a random payoff. Several feedback models have been considered in the literature: The simplest is the full information case where the learner observes the payoff of all possible actions at the end of every round. A popular setup is the case of bandit feedback, where the learner only observes its own payoff and receives no information about the payoff of other actions [1]. Recently, several papers considered a more refined setup, called graph-structured feedback, that interpolates between the full-information and the bandit case: here the feedback structure is described by a (possibly directed) graph, and choosing an action reveals the payoff of all actions that are connected to the selected one, including the chosen action itself. This problem, motivated for example by social networks, has been studied extensively in both the adversarial [2, 3, 4, 5] and the stochastic cases [6, 7]. However, most algorithms presented heavily depend on the self-observability assumption, that is, that the payoff of the selected action can be observed. Removing this self-loop assumption leads to the so-called partial monitoring case [5]. In the absolutely general partial monitoring setup the learner receives some general feedback that depends on its choice (and the environment), with some arbitrary (but known) dependence [8, 9]. While the partial monitoring setup covers all other problems, its analysis has concentrated on the finite case where both the set of actions and the set of feedback signals are finite [8, 9], which is in contrast to the standard full information and bandit settings where the feedback is typically assumed to be real-valued. To our knowledge there are only a few exceptions to this case: in [5], graph-structured feedback is considered without the self-loop assumption, while continuous action spaces are considered in [10] and [11] with special feedback structure (linear and censored observations, resp.). In this paper we consider a generalization of the graph-structured feedback model that can also be viewed as a general partial monitoring model with real-valued feedback. We assume that selecting 1 an action i the learner can observe a random variable Xij for each action j whose mean is the same as the payoff of j, but its variance σ2 ij depends on the pair (i, j). For simplicity, throughout the paper we assume that all the payoffs and the Xij are Gaussian. While in the graph-structured feedback case one either has observation on an action or not, but the observation always gives the same amount of information, our model is more refined: Depending on the value of σ2 ij, the information can be of different quality. For example, if σ2 ij = ∞, trying action i gives no information about action j. In general, for any σ2 ij < ∞, the value of the information depends on the time horizon T of the problem: when σ2 ij is large relative to T (and the payoff differences of the actions) essentially no information is received, while a small variance results in useful observations. After defining the problem formally in Section 2, we provide non-asymptotic problem-dependent lower bounds in Section 3, which depend on the distribution of the observations through their mean payoffs and variances. To our knowledge, these are the first such bounds presented for any stochastic partial monitoring problem beyond the full-information setting: previous work either presented asymptotic problem-dependent lower bounds (e.g., [12, 7]), or finite-time minimax bounds (e.g., [9, 3, 5]). Our bounds can recover all previous bounds up to some universal constant factors not depending on the problem. In Section 4, we present two algorithms with finite-time performance guarantees for the case of graph-structured feedback without the self-observability assumption. While due to their complicated forms it is hard to compare our finite-time upper and lower bounds, we show that our first algorithm achieves the asymptotic problem-dependent lower bound up to problem-independent multiplicative factors. Regarding the minimax regret, the hardness (eΘ(T 1/2) or eΘ(T 2/3) regret1) of partial monitoring problems is characterized by their global/local observability property [9] or, in case of the graph-structured feedback model, by their strong/weak observability property [5]. In the same section we present another algorithm that achieves the minimax regret (up to logarithmic factors) under both strong and weak observability, and achieves an O(log3/2 T) problem-dependent regret. Earlier results for the stochastic graph-structured feedback problems [6, 7] provided only asymptotic problem-dependent lower bounds and performance bounds that did not match the asymptotic lower bounds or the minimax rate up to constant factors. A related combinatorial partial monitoring problem with linear feedback was considered in [10], where the presented algorithm was shown to satisfy both an eO(T 2/3) minimax bound and a logarithmic problem dependent bound. However, the dependence on the problem structure in that paper is not optimal, and, in particular, the paper does not achieve the O( √ T) minimax bound for easy problems. Finally, we draw conclusions and consider some interesting future directions in Section 5. Proofs can be found in the long version of this paper [13]. 2 Problem Formulation Formally, we consider an online learning problem with Gaussian payoffs and side observations: Suppose a learner has to choose from K actions in every round. When choosing an action, the learner receives a random payoff and also some side observations corresponding to other actions. More precisely, each action i ∈[K] = {1, . . . , K} is associated with some parameter θi, and the payoff Yt,i to action i in round t is normally distributed random variable with mean θi and variance σ2 ii, while the learner observes a K-dimensional Gaussian random vector Xt,i whose jth coordinate is a normal random variable with mean θj and variance σ2 ij (we assume 0 ≤σij ≤∞) and the coordinates of Xt,i are independent of each other. We assume the following: (i) the random variables (Xt, Yt)t are independent for all t; (ii) the parameter vector θ is unknown to the learner but the variance matrix Σ = (σ2 ij)i,j∈[K] is known in advance; (iii) θ ∈[0, D]K for some D > 0; (iv) mini∈[K] σij ≤σ < ∞for all j ∈[K], that is, the expected payoff of each action can be observed. The goal of the learner is to maximize its payoff or, in other words, minimize the expected regret RT = T max i∈[K] θi − T X t=1 E [Yt,it] where it is the action selected by the learner in round t. Note that the problem encompasses several common feedback models considered in online learning (modulo the Gaussian assumption), and makes it possible to examine more delicate observation structures: 1Tilde denotes order up to logarithmic factors. 2 Full information: σij = σj < ∞for all i, j ∈[K]. Bandit: σii < ∞and σij = ∞for all i ̸= j ∈[K]. Partial monitoring with feedback graphs [5]: Each action i ∈[K] is associated with an observation set Si ⊂[K] such that σij = σj < ∞if j ∈Si and σij = ∞otherwise. We will call the uniform variance version of these problems when all the finite σij are equal to some σ ≥0. Some interesting features of the problem can be seen when considering the generalized full information case , when all entries of Σ are finite. In this case, the greedy algorithm, which estimates the payoff of each action by the average of the corresponding observed samples and selects the one with the highest average, achieves at most a constant regret for any time horizon T.2 On the other hand, the constant can be quite large: in particular, when the variance of some observations are large relative to the gaps dj = maxi θi −θj, the situation is rather similar to a partial monitoring setup for a smaller, finite time horizon. In this paper we are going to analyze this problem and present algorithms and lower bounds that are able to “interpolate” between these cases and capture the characteristics of the different regimes. 2.1 Notation Define CN T = {c ∈NK : ci ≥0 , P i∈[K] ci = T} and let N(T) ∈CN T denote the number of plays over all actions taken by some algorithm in T rounds. Also let CR T = {c ∈RK : ci ≥ 0 , P i∈[K] ci = T}. We will consider environments with different expected payoff vectors θ ∈Θ, but the variance matrix Σ will be fixed. Therefore, an environment can be specified by θ; oftentimes, we will explicitly denote the dependence of different quantities on θ: The probability and expectation functionals under environment θ will be denoted by Pr (·; θ) and E [·; θ], respectively. Furthermore, let ij(θ) be the jth best action (ties are broken arbitrarily, i.e., θi1 ≥θi2 ≥· · · ≥θiK) and define di(θ) = θi1(θ) −θi for any i ∈[K]. Then the expected regret under environment θ is RT (θ) = P i∈[K] E [Ni(T); θ] di(θ). For any action i ∈[K], let Si = {j ∈[K] : σij < ∞} denote the set of actions whose parameter θj is observable by choosing action i. Throughout the paper, log denotes the natural logarithm and ∆n denotes the n-dimensional simplex for any positive integer n. 3 Lower Bounds The aim of this section is to derive generic, problem-dependent lower bounds to the regret, which are also able to provide minimax lower bounds. The hardness in deriving such bounds is that for any fixed θ and Σ, the dumb algorithm that always selects i1(θ) achieves zero regret (obviously, the regret of this algorithm is linear for any θ′ with i1(θ) ̸= i1(θ′)), so in general it is not possible to give a lower bound for a single instance. When deriving asymptotic lower bounds, this is circumvented by only considering consistent algorithms whose regret is sub-polynomial for any problem [12]. However, this asymptotic notion of consistency is not applicable to finite-horizon problems. Therefore, following ideas of [14], for any problem we create a family of related problems (by perturbing the mean payoffs) such that if the regret of an algorithm is “too small” in one of the problems than it will be “large” in another one, while it still depends on the original problem parameters (note that deriving minimax bounds usually only involves perturbing certain special “worst-case” problems). As a warm-up, and to show the reader what form of a lower bound can be expected, first we present an asymptotic lower bound for the uniform-variance version of the problem of partial monitoring with feedback graphs. The result presented below is an easy consequence of [12], hence its proof is omitted. An algorithm is said to be consistent if supθ∈Θ RT (θ) = o(T γ) for every γ > 0. Now assume for simplicity that there is a unique optimal action in environment θ, that is, θi1(θ) > θi for all i ̸= i1 and let Cθ = c ∈[0, ∞)K : X i:j∈Si ci ≥2σ2 d2 j(θ) for all j ̸= i1(θ) , X i:i1(θ)∈Si ci ≥ 2σ2 d2 i2(θ)(θ) . 2To see this, notice that the error of identifying the optimal action decays exponentially with the number of rounds. 3 Then, for any consistent algorithm and for any θ with θi1(θ) > θi2(θ), lim inf T →∞ RT (θ) log T ≥inf c∈Cθ ⟨c, d(θ)⟩. (1) Note that the right hand side of (1) is 0 for any generalized full information problem (recall that the expected regret is bounded by a constant for such problems), but it is a finite positive number for other problems. Similar bounds have been provided in [6, 7] for graph-structured feedback with self-observability (under non-Gaussian assumptions on the payoffs). In the following we derive finite time lower bounds that are also able to replicate this result. 3.1 A General Finite Time Lower Bound First we derive a general lower bound. For any θ, θ′ ∈Θ and q ∈∆|CN T |, define f(θ, q, θ′) as f(θ, q, θ′) = inf q′∈∆|CN T | X a∈CN T q′(a) ⟨a, d(θ′)⟩ such that X a∈CN T q(a) log q(a) q′(a) ≤ X i∈[K] Ii(θ, θ′) X a∈CN T q(a)ai , where Ii(θ, θ′) is the KL-divergence between Xt,i(θ) and Xt,i(θ′), given by Ii(θ, θ′) = KL(Xt,i(θ); Xt,i(θ′)) = PK j=1(θj −θ′ j)2/2σ2 ij. Clearly, f(θ, q, θ′) is a lower bound on RT (θ′) for any algorithm for which the distribution of N(T) is q. The intuition behind the allowed values of q′ is that we want q′ to be as similar to q as the environments θ and θ′ look like for the algorithm (through the feedback (Xt,it)t). Now define g(θ, c) = inf q∈∆|CN T | sup θ′∈Θ f(θ, q, θ′), such that X a∈CN T q(a)a = c ∈CR T . g(θ, c) is a lower bound of the worst-case regret of any algorithm with E [N(T); θ] = c. Finally, for any x > 0, define b(θ, x) = inf c∈Cθ,x ⟨c, d(θ)⟩ where Cθ,x = {c ∈CR T ; g(θ, c) ≤x}. Here Cθ,B contains all the possible values of E [N(T); θ] that can be achieved by some algorithm whose lower bound g on the worst-case regret is smaller than x. These definitions give rise to the following theorem: Theorem 1. Given any B > 0, for any algorithm such that supθ′∈Θ RT (θ′) ≤B, we have, for any environment θ ∈Θ, RT (θ) ≥b(θ, B). Remark 2. If B is picked as the minimax value of the problem given the observation structure Σ, the theorem states that for any minimax optimal algorithm the expected regret for a certain θ is lower bounded by b(θ, B). 3.2 A Relaxed Lower Bound Now we introduce a relaxed but more interpretable version of the finite-time lower bound of Theorem 1, which can be shown to match the asymptotic lower bound (1). The idea of deriving the lower bound is the following: instead of ensuring that the algorithm performs well in the most adversarial environment θ′, we consider a set of “bad” environments and make sure that the algorithm performs well on them, where each “bad” environment θ′ is the most adversarial one by only perturbing one coordinate θi of θ. However, in order to get meaningful finite-time lower bounds, we need to perturb θ more carefully than in the case of asymptotic lower bounds. The reason for this is that for any sub-optimal action i, if θi is very close to θi1(θ), then E [Ni(T); θ] is not necessarily small for a good algorithm for θ. If it is small, one can increase θi to obtain an environment θ′ where i is the best action and the algorithm performs bad; otherwise, when E [Ni(T); θ] is large, we need to decrease θi to make the 4 algorithm perform badly in θ′. Moreover, when perturbing θi to be better than θi1(θ), we cannot make θ′ i −θi1(θ) arbitrarily small as in asymptotic lower-bound arguments, because when θ′ i −θi1(θ) is small, large E Ni1(θ); θ′ , and not necessarily large E [Ni(T); θ′], may also lead to low finite-time regret in θ′. In the following we make this argument precise to obtain an interpretable lower bound. 3.2.1 Formulation We start with defining a subset of CR T that contains the set of “reasonable” values for E [N(T); θ]. For any θ ∈Θ and B > 0, let C′ θ,B = c ∈CR T : K X j=1 cj σ2 ji ≥mi(θ, B) for all i ∈[K] where mi, the minimum sample size required to distinguish between θi and its worst-case perturbation, is defined as follows: For i ̸= i1, if θi1 = D,3 then mi(θ, B) = 0. Otherwise let mi,+(θ, B) = max ϵ∈(di(θ),D−θi] 1 ϵ2 log T (ϵ−di(θ)) 8B , mi,−(θ, B) = max ϵ∈(0,θi] 1 ϵ2 log T (ϵ+di(θ)) 8B , and let ϵi,+ and ϵi,−denote the value of ϵ achieving the maximum in mi,+ and mi,−, respectively. Then, define mi(θ, B) = mi,+(θ, B) if di(θ) ≥4B/T; min {mi,+(θ, B), mi,−(θ, B)} if di(θ) < 4B/T . For i = i1, then mi1(θ, B) = 0 if θi2(θ) = 0, else the definitions for i ̸= i1 change by replacing di(θ) with di2(θ)(θ) (and switching the + and −indices): mi1(θ),−(θ, B) = max ϵ∈(di2(θ)(θ),θi1(θ)] 1 ϵ2 log T (ϵ−di2(θ)(θ)) 8B , mi1(θ),+(θ, B) = max ϵ∈(0,D−θi1(θ)] 1 ϵ2 log T (ϵ+di2(θ)(θ)) 8B where ϵi1(θ),−and ϵi1(θ),+ are the maximizers for ϵ in the above expressions. Then, define mi1(θ)(θ, B) = mi1(θ),−(θ, B) if di2(θ)(θ) ≥4B/T; min mi1(θ),+(θ, B), mi1(θ),−(θ, B) if di2(θ)(θ) < 4B/T . Note that ϵi,+ and ϵi,−can be expressed in closed form using the Lambert W : R →R function satisfying W(x)eW (x) = x: for any i ̸= i1(θ), ϵi,+ = min ( D −θi , 8√eBe W di(θ)T 16√eB /T + di(θ) ) , ϵi,−= min ( θi , 8√eBe W −di(θ)T 16√eB /T −di(θ) ) , (2) and similar results hold for i = i1, as well. Now we can give the main result of this section, a simplified version of Theorem 1: Corollary 3. Given B > 0, for any algorithm such that supλ∈Θ RT (λ) ≤B, we have, for any environment θ ∈Θ, RT (θ) ≥b′(θ, B) = minc∈C′ θ,B ⟨c, d(θ)⟩. Next we compare this bound to existing lower bounds. 3.2.2 Comparison to the Asymptotic Lower Bound (1) Now we will show that our finite time lower bound in Corollary 3 matches the asymptotic lower bound in (1) up to some constants. Pick B = αT β for some α > 0 and 0 < β < 1. For simplicity, we only consider θ which is “away from” the boundary of Θ (so that the minima in (2) are 3Recall that θi ∈[0, D]. 5 achieved by the second terms) and has a unique optimal action. Then, for i ̸= i1(θ), it is easy to show that ϵi,+ = di(θ) 2W (di(θ)T 1−β/(16α√e)) + di(θ) by (2) and mi(θ, B) = 1 ϵ2 i,+ log T (ϵi,+−di(θ)) 8B for large enough T. Then, using the fact that log x −log log x ≤W(x) ≤log x for x ≥e, it follows that limT →∞mi(θ, B)/ log T = (1 −β)/d2 i (θ), and similarly we can show that limT →∞mi1(θ)(θ, B)/ log T = (1 −β)/d2 i2(θ)(θ). Thus, C′ θ,B → (1−β) log T 2 Cθ, under the assumptions of (1), as T →∞. This implies that Corollary 3 matches the asymptotic lower bound of (1) up to a factor of (1 −β)/2. 3.2.3 Comparison to Minimax Bounds Now we will show that our θ-dependent finite-time lower bound reproduces the minimax regret bounds of [2] and [5], except for the generalized full information case. The minimax bounds depend on the following notion of observability: An action i is strongly observable if either i ∈Si or [K] \ {i} ⊂{j : i ∈Sj}. i is weakly observable if it is not strongly observable but there exists j such that i ∈Sj (note that we already assumed the latter condition for all i). Let W(Σ) be the set of all weakly observable actions. Σ is said to be strongly observable if W(Σ) = ∅. Σ is weakly observable if W(Σ) ̸= ∅. Next we will define two key qualities introduced by [2] and [5] that characterize the hardness of a problem instance with feedback structure Σ: A set A ⊂[K] is called an independent set if for any i ∈A, Si ∩A ⊂{i}. The independence number κ(Σ) is defined as the cardinality of the largest independent set. For any pair of subsets A, A′ ⊂[K], A is said to be dominating A′ if for any j ∈A′ there exists i ∈A such that j ∈Si. The weak domination number ρ(Σ) is defined as the cardinality of the smallest set that dominates W(Σ). Corollary 4. Assume that σij = ∞for some i, j ∈[K], that is, we are not in the generalized full information case. Then, (i) if Σ is strongly observable, with B = ασ p κ(Σ)T for some α > 0, we have supθ∈Θ b′(θ, B) ≥ σ√ κ(Σ)T 64eα for T ≥64e2α2σ2κ(Σ)3/D2. (ii) If Σ is weakly observable, with B = α(ρ(Σ)D)1/3(σT)2/3 log−2/3 K for some α > 0, we have supθ∈Θ b′(θ, B) ≥(ρ(Σ)D)1/3(σT )2/3 log−2/3 K 51200e2α2 . Remark 5. In Corollary 4, picking α = 1 8√e for strongly observable Σ and α = 1 73 for weakly observable Σ gives formal minimax lower bounds: (i) If Σ is strongly observable, for any algorithm we have supθ∈Θ RT (θ) ≥ σ√ κ(Σ)T 8√e for T ≥eσ2κ(Σ)3/D2. (ii) If Σ is weakly observable, for any algorithm we have supθ∈Θ RT (θ) ≥(ρ(Σ)D)1/3(σT )2/3 73 log2/3 K . 4 Algorithms In this section we present two algorithms and their finite-time analysis for the uniform variance version of our problem (where σij is either σ or ∞). The upper bound for the first algorithm matches the asymptotic lower bound in (1) up to constants. The second algorithm achieves the minimax lower bounds of Corollary 4 up to logarithmic factors, as well as O(log3/2 T) problem-dependent regret. In the problem-dependent upper bounds of both algorithms, we assume that the optimal action is unique, that is, di2(θ)(θ) > 0. 4.1 An Asymptotically Optimal Algorithm Let c(θ) = argminc∈Cθ ⟨c, d(θ)⟩; note that increasing ci1(θ)(θ) does not change the value of ⟨c, d(θ)⟩(since di1(θ)(θ) = 0), so we take the minimum value of ci1(θ)(θ) in this definition. Let ni(t) = Pt−1 s=1 I {i ∈Sis} be the number of observations for action i before round t and ˆθt,i be the empirical estimate of θi based on the first ni(t) observations. Let Ni(t) = Pt−1 s=1 I {is = i} be the number of plays for action i before round t. Note that this definition of Ni(t) is different from that in the previous sections since it excludes round t. 6 Algorithm 1 1: Inputs: Σ, α, β : N →[0, ∞). 2: For t = 1, ..., K, observe each action i at least once by playing it such that t ∈Sit. 3: Set exploration count ne(K + 1) = 0. 4: for t = K + 1, K + 2, ... do 5: if N(t) 4α log t ∈Cˆθt then 6: Play it = i1(ˆθt). 7: Set ne(t + 1) = ne(t). 8: else 9: if mini∈[K] ni(t) < β(ne(t))/K then 10: Play it such that argmini∈[K] ni(t) ∈Sit. 11: else 12: Play it such that Ni(t) < ci(ˆθt)4α log t. 13: end if 14: Set ne(t + 1) = ne(t) + 1. 15: end if 16: end for Our first algorithm is presented in Algorithm 1. The main idea, coming from [15], is that by forcing exploration over all actions, the solution c(θ) of the linear program can be well approximated while paying a constant price. This solves the main difficulty that, without getting enough observations on each action, we may not have good enough estimates for d(θ) and c(θ). One advantage of our algorithm compared to that of [15] is that we use a nondecreasing, sublinear exploration schedule β(n) (β : N →[0, ∞)) instead of a constant rate β(n) = βn. This resolves the problem that, to achieve asymptotically optimal performance, some parameter of the algorithm needs to be chosen according to dmin(θ) as in [15]. The expected regret of Algorithm 1 is upper bounded as follows: Theorem 6. For any θ ∈Θ, ϵ > 0, α > 2 and any non-decreasing β(n) that satisfies 0 ≤β(n) ≤ n/2 and β(m + n) ≤β(m) + β(n) for m, n ∈N, RT (θ) ≤ 2K + 2 + 4K/(α −2) dmax(θ) + 4Kdmax(θ) T X s=0 exp −β(s)ϵ2 2Kσ2 + 2dmax(θ)β 4α log T X i∈[K] ci(θ, ϵ) + K + 4α log T X i∈[K] ci(θ, ϵ)di(θ) . where ci(θ, ϵ) = sup{ci(θ′) : |θ′ j −θj| ≤ϵ for all j ∈[K]}. Further specifying β(n) and using the continuity of c(θ) around θ, it immediately follows that Algorithm 1 achieves asymptotically optimal performance: Corollary 7. Suppose the conditions of Theorem 6 hold. Assume, furthermore, that β(n) satisfies β(n) = o(n) and P∞ s=0 exp −β(s)ϵ2 2Kσ2 < ∞for any ϵ > 0, then for any θ such that c(θ) is unique, lim sup T →∞ RT (θ)/ log T ≤4α inf c∈C(θ) ⟨c, d(θ)⟩. Note that any β(n) = anb with a ∈(0, 1 2], b ∈(0, 1) satisfies the requirements in Theorem 6 and Corollary 7. Also note that the algorithms presented in [6, 7] do not achieve this asymptotic bound. 4.2 A Minimax Optimal Algorithm Next we present an algorithm achieving the minimax bounds. For any A, A′ ⊂[K], let c(A, A′) = argmaxc∈∆|A| mini∈A′ P j:i∈Sj cj (ties are broken arbitrarily) and m(A, A′) = mini∈A′ P j:i∈Sj cj(A, A′). For any A ⊂[K] and |A| ≥2, let AS = {i ∈A : ∃j ∈A, i ∈Sj} and AW = A−AS. Furthermore, let gr,i(δ) = σ q 2 log(8K2r3/δ) ni(r) where ni(r) = Pr−1 s=1 is,i and ˆθr,i be the empirical estimate of θi based on first ni(r) observations (i.e., the average of the samples). The algorithm is presented in Algorithm 2. It follows a successive elimination process: it explores all possibly optimal actions (called “good actions” later) based on some confidence intervals until only one action remains. While doing exploration, the algorithm first tries to explore the good actions by only using good ones. However, due to weak observability, some good actions might have to be explored by actions that have already been eliminated. To control this exploration-exploitation trade off, we use a sublinear function γ to control the exploration of weakly observable actions. In the following we present high-probability bounds on the performance of the algorithm, so, with a slight abuse of notation, RT (θ) will denote the regret without expectation in the rest of this section. 7 Algorithm 2 1: Inputs: Σ, δ. 2: Set t1 = 0, A1 = [K]. 3: for r = 1, 2, ... do 4: Let αr = min1≤s≤r,AW s ̸=∅m([K] , AW s ) and γ(r) = (σαrtr/D)2/3. (Define αr = 1 if AW s = ∅for all 1 ≤s ≤r.) 5: if AW r ̸= ∅and mini∈AW r ni(r) < mini∈AS r ni(r) and mini∈AW r ni(r) < γ(r) then 6: Set cr = c([K] , AW r ). 7: else 8: Set cr = c(Ar, AS r ). 9: end if 10: Play ir = ⌈cr · ∥cr∥0⌉and set tr+1 ←tr + ∥ir∥1. 11: Ar+1 ←{i ∈Ar : ˆθr+1,i + gr+1,i(δ) ≥maxj∈Ar ˆθr+1,j −gr+1,j(δ)}. 12: if |Ar+1| = 1 then 13: Play the only action in the remaining rounds. 14: end if 15: end for Theorem 8. For any δ ∈(0, 1) and any θ ∈Θ, RT (θ) ≤(ρ(Σ)D)1/3(σT)2/3 · 7 p 6 log(2KT/δ) + 125σ2K3/D + 13K3D with probability at least 1 −δ if Σ is weakly observable, while RT (θ) ≤2KD + 80σ r κ(Σ)T · 6 log K log 2KT δ with probability at least 1 −δ if Σ is strongly observable. Theorem 9 (Problem-dependent upper bound). For any δ ∈(0, 1) and any θ ∈Θ such that the optimal action is unique, with probability at least 1 −δ, RT (θ) ≤1603ρ(Σ)Dσ2 d2 min(θ) (log(2KT/δ))3/2 + 14K3D + 125σ2K3/D + 15 ρ(Σ)Dσ21/3 125σ2/D2 + 10 K2 (log(2KT/δ))1/2 . Remark 10. Picking δ = 1/T gives an O(log3/2 T) upper bound on the expected regret. Remark 11. Note that Algortihm 2 is similar to the UCB-LP algorithm of [7], which admits a better problem-dependent upper bound (although does not achieve it with optimal problem-dependent constants), but it does not achieve the minimax bound even under strong observability. 5 Conclusions and Open Problems We considered a novel partial-monitoring setup with Gaussian side observations, which generalizes the recently introduced setting of graph-structured feedback, allowing finer quantification of the observed information from one action to another. We provided non-asymptotic problem-dependent lower bounds that imply existing asymptotic problem-dependent and non-asymptotic minimax lower bounds (up to some constant factors) beyond the full information case. We also provided an algorithm that achieves the asymptotic problem-dependent lower bound (up to some universal constants) and another algorithm that achieves the minimax bounds under both weak and strong observability. However, we think this is just the beginning. For example, we currently have no algorithm that achieves both the problem dependent and the minimax lower bounds at the same time. Also, our upper bounds only correspond to the graph-structured feedback case. It is of great interest to go beyond the weak/strong observability in characterizing the hardness of the problem, and provide algorithms that can adapt to any correspondence between the mean payoffs and the variances (the hardness is that one needs to identify suboptimal actions with good information/cost trade-off). Acknowledgments This work was supported by the Alberta Innovates Technology Futures through the Alberta Ingenuity Centre for Machine Learning (AICML) and NSERC. During this work, A. Gy¨orgy was with the Department of Computing Science, University of Alberta. 8 References [1] S´ebatien Bubeck and Nicol`o Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012. [2] Shie Mannor and Ohad Shamir. From bandits to experts: on the value of side-observations. In Advances in Neural Information Processing Systems 24 (NIPS), pages 684–692, 2011. [3] Noga Alon, Nicolo Cesa-Bianchi, Claudio Gentile, and Yishay Mansour. From bandits to experts: A tale of domination and independence. In Advances in Neural Information Processing Systems 26 (NIPS), pages 1610–1618, 2013. [4] Tom´aˇs Koc´ak, Gergely Neu, Michal Valko, and R´emi Munos. Efficient learning by implicit exploration in bandit problems with side observations. In Advances in Neural Information Processing Systems 27 (NIPS), pages 613–621, 2014. [5] Noga Alon, Nicol`o Cesa-Bianchi, Ofer Dekel, and Tomer Koren. Online learning with feedback graphs: beyond bandits. In Proceedings of The 28th Conference on Learning Theory (COLT), pages 23–35, 2015. [6] St´ephane Caron, Branislav Kveton, Marc Lelarge, and Smriti Bhagat. Leveraging side observations in stochastic bandits. In Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence (UAI), pages 142–151, 2012. [7] Swapna Buccapatnam, Atilla Eryilmaz, and Ness B. Shroff. Stochastic bandits with side observations on networks. SIGMETRICS Perform. Eval. Rev., 42(1):289–300, June 2014. [8] Nicol`o Cesa-Bianchi and G´abor Lugosi. Prediction, Learning, and Games. Cambridge University Press, Cambridge, 2006. [9] G´abor Bart´ok, Dean P. Foster, D´avid P´al, Alexander Rakhlin, and Csaba Szepesv´ari. Partial monitoring – classification, regret bounds, and algorithms. Mathematics of Operations Research, 39:967–997, 2014. [10] Tian Lin, Bruno Abrahao, Robert Kleinberg, John Lui, and Wei Chen. Combinatorial partial monitoring game with linear feedback and its applications. In Proceedings of the 31st International Conference on Machine Learning (ICML), pages 901–909, 2014. [11] Tor Lattimore, Andr´as Gy¨orgy, and Csaba Szepesv´ari. On learning the optimal waiting time. In Peter Auer, Alexander Clark, Thomas Zeugmann, and Sandra Zilles, editors, Algorithmic Learning Theory, volume 8776 of Lecture Notes in Computer Science, pages 200–214. Springer International Publishing, 2014. [12] Todd L. Graves and Tze Leung Lai. Asymptotically efficient adaptive choice of control laws incontrolled markov chains. SIAM Journal on Control and Optimization, 35(3):715–743, 1997. [13] Yifan Wu, Andr´as Gy¨orgy, and Csaba Szepesv´ari. Online learning with Gaussian payoffs and side observations. arXiv preprint arXiv:1510.08108, 2015. [14] Lihong Li, R´emi Munos, and Csaba Szepesv´ari. Toward minimax off-policy value estimation. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics (AISTATS), pages 608–616, 2015. [15] Stefan Magureanu, Richard Combes, and Alexandre Proutiere. Lipschitz bandits: Regret lower bounds and optimal algorithms. In Proceedings of The 27th Conference on Learning Theory (COLT), pages 975–999, 2014. [16] Emilie Kaufmann, Olivier Capp´e, and Aur´elien Garivier. On the complexity of best arm identification in multi-armed bandit models. The Journal of Machine Learning Research, 2015. (to appear). [17] Richard Combes and Alexandre Proutiere. Unimodal bandits: Regret lower bounds and optimal algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML), pages 521–529, 2014. 9 | 2015 | 220 |
5,726 | Gradient-free Hamiltonian Monte Carlo with Efficient Kernel Exponential Families Heiko Strathmann∗Dino Sejdinovic+ Samuel Livingstoneo Zoltan Szabo∗Arthur Gretton∗ ∗Gatsby Unit University College London +Department of Statistics University of Oxford oSchool of Mathematics University of Bristol Abstract We propose Kernel Hamiltonian Monte Carlo (KMC), a gradient-free adaptive MCMC algorithm based on Hamiltonian Monte Carlo (HMC). On target densities where classical HMC is not an option due to intractable gradients, KMC adaptively learns the target’s gradient structure by fitting an exponential family model in a Reproducing Kernel Hilbert Space. Computational costs are reduced by two novel efficient approximations to this gradient. While being asymptotically exact, KMC mimics HMC in terms of sampling efficiency, and offers substantial mixing improvements over state-of-the-art gradient free samplers. We support our claims with experimental studies on both toy and real-world applications, including Approximate Bayesian Computation and exact-approximate MCMC. 1 Introduction Estimating expectations using Markov Chain Monte Carlo (MCMC) is a fundamental approximate inference technique in Bayesian statistics. MCMC itself can be computationally demanding, and the expected estimation error depends directly on the correlation between successive points in the Markov chain. Therefore, efficiency can be achieved by taking large steps with high probability. Hamiltonian Monte Carlo [1] is an MCMC algorithm that improves efficiency by exploiting gradient information. It simulates particle movement along the contour lines of a dynamical system constructed from the target density. Projections of these trajectories cover wide parts of the target’s support, and the probability of accepting a move along a trajectory is often close to one. Remarkably, this property is mostly invariant to growing dimensionality, and HMC here often is superior to random walk methods, which need to decrease their step size at a much faster rate [1, Sec. 4.4]. Unfortunately, for a large class of problems, gradient information is not available. For example, in Pseudo-Marginal MCMC (PM-MCMC) [2, 3], the posterior does not have an analytic expression, but can only be estimated at any given point, e.g. in Bayesian Gaussian Process classification [4]. A related setting is MCMC for Approximate Bayesian Computation (ABC-MCMC), where the posterior is approximated through repeated simulation from a likelihood model [5, 6]. In both cases, HMC cannot be applied, leaving random walk methods as the only mature alternative. There have been efforts to mimic HMC’s behaviour using stochastic gradients from mini-batches in Big Data [7], or stochastic finite differences in ABC [8]. Stochastic gradient based HMC methods, however, often suffer from low acceptance rates or additional bias that is hard to quantify [9]. Random walk methods can be tuned by matching scaling of steps and target. For example, Adaptive Metropolis-Hastings (AMH) [10, 11] is based on learning the global scaling of the target from the history of the Markov chain. Yet, for densities with nonlinear support, this approach does not work very well. Recently, [12] introduced a Kernel Adaptive Metropolis-Hastings (KAMH) algorithm whose proposals are locally aligned to the target. By adaptively learning target covariance in a Reproducing Kernel Hilbert Space (RKHS), KAMH achieves improved sampling efficiency. 1 In this paper, we extend the idea of using kernel methods to learn efficient proposal distributions [12]. Rather than locally smoothing the target density, however, we estimate its gradients globally. More precisely, we fit an infinite dimensional exponential family model in an RKHS via score matching [13, 14]. This is a non-parametric method of modelling the log unnormalised target density as an RKHS function, and has been shown to approximate a rich class of density functions arbitrarily well. More importantly, the method has been empirically observed to be relatively robust to increasing dimensionality – in sharp contrast to classical kernel density estimation [15, Sec. 6.5]. Gaussian Processes (GP) were also used in [16] as an emulator of the target density in order to speed up HMC, however, this requires access to the target in closed form, to provide training points for the GP. We require our adaptive KMC algorithm to be computationally efficient, as it deals with highdimensional MCMC chains of growing length. We develop two novel approximations to the infinite dimensional exponential family model. The first approximation, score matching lite, is based on computing the solution in terms of a lower dimensional, yet growing, subspace in the RKHS. KMC with score matching lite (KMC lite) is geometrically ergodic on the same class of targets as standard random walks. The second approximation uses a finite dimensional feature space (KMC finite), combined with random Fourier features [17]. KMC finite is an efficient online estimator that allows to use all of the Markov chain history, at the cost of decreased efficiency in unexplored regions. A choice between KMC lite and KMC finite ultimately depends on the ability to initialise the sampler within high-density regions of the target; alternatively, the two approaches could be combined. Experiments show that KMC inherits the efficiency of HMC, and therefore mixes significantly better than state-of-the-art gradient-free adaptive samplers on a number of target densities, including on synthetic examples, and when used in PM-MCMC and ABC-MCMC. All code can be found at https://github.com/karlnapf/kernel_hmc 2 Background and Previous Work Let the domain of interest X be a compact1 subset of Rd, and denote the unnormalised target density on X by π. We are interested in constructing a Markov chain x1 →x2 →. . . such that limt→∞xt ∼π. By running the Markov chain for a long time T, we can consistently approximate any expectation w.r.t. π. Markov chains are constructed using the Metropolis-Hastings algorithm, which at the current state xt draws a point from a proposal mechanism x∗∼Q(·|xt), and sets xt+1 ←x∗with probability min(1, [π(x∗)Q(xt|x∗)]/[π(xt)Q(x∗|xt)]), and xt+1 ←xt otherwise. We assume that π is intractable,2 i.e. that we can neither evaluate π(x) nor3 ∇log π(x) for any x, but can only estimate it unbiasedly via ˆπ(x). Replacing π(x) with ˆπ(x) results in PM-MCMC [2, 3], which asymptotically remains exact (exact-approximate inference). (Kernel) Adaptive Metropolis-Hastings In the absence of ∇log π, the usual choice of Q is a random walk, i.e. Q(·|xt) = N(·|xt, Σt). A popular choice of the scaling is Σt ∝I. When the scale of the target density is not uniform across dimensions, or if there are strong correlations, the AMH algorithm [10, 11] improves mixing by adaptively learning global covariance structure of π from the history of the Markov chain. For cases where the local scaling does not match the global covariance of π, i.e. the support of the target is nonlinear, KAMH [12] improves mixing by learning the target covariance in a RKHS. KAMH proposals are Gaussian with a covariance that matches the local covariance of π around the current state xt, without requiring access to ∇log π. Hamiltonian Monte Carlo Hamiltonian Monte Carlo (HMC) uses deterministic, measurepreserving maps to generate efficient Markov transitions [1, 18]. Starting from the negative log target, referred to as the potential energy U(q) = −log π(q), we introduce an auxiliary momentum variable p ∼exp(−K(p)) with p ∈X. The joint distribution of (p, q) is then proportional to exp (−H(p, q)), where H(p, q) := K(p) + U(q) is called the Hamiltonian. H(p, q) defines a Hamiltonian flow, parametrised by a trajectory length t ∈R, which is a map φH t : (p, q) 7→(p∗, q∗) for which H(p∗, q∗) = H(p, q). This allows constructing π-invariant Markov chains: for a chain at state q = xt, repeatedly (i) re-sample p′ ∼exp(−K(·)), and then (ii) apply the Hamiltonian flow 1The compactness restriction is imposed to satisfy the assumptions in [13]. 2π is analytically intractable, as opposed to computationally expensive in the Big Data context. 3Throughout the paper ∇denotes the gradient operator w.r.t. to x. 2 for time t, giving (p∗, q∗) = φH t (p′, q). The flow can be generated by the Hamiltonian operator ∂K ∂p ∂ ∂q −∂U ∂q ∂ ∂p (1) In practice, (1) is usually unavailable and we need to resort to approximations. Here, we limit ourselves to the leap-frog integrator; see [1] for details. To correct for discretisation error, a Metropolis acceptance procedure can be applied: starting from (p′, q), the end-point of the approximate trajectory is accepted with probability min [1, exp (−H(p∗, q∗) + H(p′, q))]. HMC is often able to propose distant, uncorrelated moves with a high acceptance probability. Intractable densities In many cases the gradient of log π(q) = −U(q) cannot be written in closed form, leaving random-walk based methods as the state-of-the-art [11, 12]. We aim to overcome random-walk behaviour, so as to obtain significantly more efficient sampling [1]. 3 Kernel Induced Hamiltonian Dynamics KMC replaces the potential energy in (1) by a kernel induced surrogate computed from the history of the Markov chain. This surrogate does not require gradients of the log-target density. The surrogate induces a kernel Hamiltonian flow, which can be numerically simulated using standard leap-frog integration. As with the discretisation error in HMC, any deviation of the kernel induced flow from the true flow is corrected via a Metropolis acceptance procedure. This here also contains the estimation noise from ˆπ and re-uses previous values of ˆπ, c.f. [3, Table 1]. Consequently, the stationary distribution of the chain remains correct, given that we take care when adapting the surrogate. Infinite Dimensional Exponential Families in a RKHS We construct a kernel induced potential energy surrogate whose gradients approximate the gradients of the true potential energy U in (1), without accessing π or ∇π directly, but only using the history of the Markov chain. To that end, we model the (unnormalised) target density π(x) with an infinite dimensional exponential family model [13] of the form const × π(x) ≈exp (⟨f, k(x, ·)⟩H −A(f)) , (2) which in particular implies ∇f ≈−∇U = ∇log π. Here H is a RKHS of real valued functions on X. The RKHS has a uniquely associated symmetric, positive definite kernel k : X × X →R, which satisfies f(x) = ⟨f, k(x, ·)⟩H for any f ∈H [19]. The canonical feature map k(·, x) ∈H here takes the role of the sufficient statistics while f ∈H are the natural parameters, and A(f) := log ´ X exp(⟨f, k(x, ·)⟩H)dx is the cumulant generating function. Eq. (2) defines broad class of densities: when universal kernels are used, the family is dense in the space of continuous densities on compact domains, with respect to e.g. Total Variation and KL [13, Section 3]. It is possible to consistently fit an unnormalised version of (2) by directly minimising the expected gradient mismatch between the model (2) and the true target density π (observed through the Markov chain history). This is achieved by generalising the score matching approach [14] to infinite dimensional parameter spaces. The technique avoids the problem of dealing with the intractable A(f), and reduces the problem to solving a linear system. More importantly, the approach is observed to be relatively robust to increasing dimensions. We return to estimation in Section 4, where we develop two efficient approximations. For now, assume access to an ˆf ∈H such that ∇f(x) ≈∇log π(x). Kernel Induced Hamiltonian Flow We define a kernel induced Hamiltonian operator by replacing U in the potential energy part ∂U ∂p ∂ ∂q in (1) by our kernel surrogate Uk = f. It is clear that, depending on Uk, the resulting kernel induced Hamiltonian flow differs from the original one. That said, any bias on the resulting Markov chain, in addition to discretisation error from the leap-frog integrator, is naturally corrected for in the Pseudo-Marginal Metropolis step. We accept an end-point φHk t (p′, q) of a trajectory starting at (p′, q) along the kernel induced flow with probability min h 1, exp −H φHk t (p′, q) + H(p′, q) i , (3) where H φHk t (p′, q) corresponds to the true Hamiltonian at φHk t (p′, q). Here, in the PseudoMarginal context, we replace both terms in the ratio in (3) by unbiased estimates, i.e., we replace 3 HMC 0 100 200 300 400 500 Leap-frog steps 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Acceptance prob. KMC 0 100 200 300 400 500 Leap-frog steps 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Acceptance prob. Figure 1: Hamiltonian trajectories on a 2-dimensional standard Gaussian. End points of such trajectories (red stars to blue stars) form the proposal of HMC-like algorithms. Left: Plain Hamiltonian trajectories oscillate on a stable orbit, and acceptance probability is close to one. Right: Kernel induced trajectories and acceptance probabilities on an estimated energy function. π(q) within H with an unbiased estimator ˆπ(q). Note that this also involves ‘recycling’ the estimates of H from previous iterations to ensure anyymptotic correctness, c.f. [3, Table 1]. Any deviations of the kernel induced flow from the true flow result in a decreased acceptance probability (3). We therefore need to control the approximation quality of the kernel induced potential energy to maintain high acceptance probability in practice. See Figure 1 for an illustrative example. 4 Two Efficient Estimators for Exponential Families in RKHS We now address estimating the infinite dimensional exponential family model (2) from data. The original estimator in [13] has a large computational cost. This is problematic in the adaptive MCMC context, where the model has to be updated on a regular basis. We propose two efficient approximations, each with its strengths and weaknesses. Both are based on score matching. 4.1 Score Matching Following [14], we model an unnormalised log probability density log π(x) with a parametric model log ˜πZ(x; f) := log ˜π(x; f) −log Z(f), (4) where f is a collection of parameters of yet unspecified dimension (c.f. natural parameters of (2)), and Z(f) is an unknown normalising constant. We aim to find ˆf from a set of n samples4 D := {xi}n i=1 ∼π such that π(x) ≈˜π(x; ˆf) × const. From [14, Eq. 2], the criterion being optimised is the expected squared distance between gradients of the log density, so-called score functions, J(f) = 1 2 ˆ X π(x) ∥∇log ˜π(x; f) −∇log π(x)∥2 2 dx, where we note that the normalising constants vanish from taking the gradient ∇. As shown in [14, Theorem 1], it is possible to compute an empirical version without accessing π(x) or ∇log π(x) other than through observed samples, ˆJ(f) = 1 n X x∈D d X ℓ=1 " ∂2 log ˜π(x; f) ∂x2 ℓ + 1 2 ∂log ˜π(x; f) ∂xℓ 2# . (5) Our approximations of the original model (2) are based on minimising (5) using approximate scores. 4.2 Infinite Dimensional Exponential Families Lite The original estimator of f in (2) takes a dual form in a RKHS sub-space spanned by nd + 1 kernel derivatives, [13, Thm. 4]. The update of the proposal at the iteration t of MCMC requires inversion of a (td + 1) × (td + 1) matrix. This is clearly prohibitive if we are to run even a moderate number of iterations of a Markov chain. Following [12], we take a simple approach to avoid prohibitive computational costs in t: we form a proposal using a random sub-sample of fixed size n from the Markov chain history, z := {zi}n i=1 ⊆{xi}t i=1. In order to avoid excessive computation when d is large, we replace the full dual solution with a solution in terms of span ({k(zi, ·)}n i=1), which covers the support of the true density by construction, and grows with increasing n. That is, we assume that the model (4) takes the ‘light’ form 4We assume a fixed sample set here but will use both the full chain history {xi}t i=1 or a sub-sample later. 4 f(x) = n X i=1 αik(zi, x), (6) where α ∈Rn are real valued parameters that are obtained by minimising the empirical score matching objective (5). This representation is of a form similar to [20, Section 4.1], the main differences being that the basis functions are chosen randomly, the basis set grows with n, and we will require an additional regularising term. The estimator is summarised in the following proposition, which is proved in Appendix A. Proposition 1. Given a set of samples z = {zi}n i=1 and assuming f(x) = Pn i=1 αik(zi, x) for the Gaussian kernel of the form k(x, y) = exp −σ−1∥x −y∥2 2 , and λ > 0, the unique minimiser of the λ∥f∥2 H-regularised empirical score matching objective (5) is given by ˆαλ = −σ 2 (C + λI)−1b, (7) where b ∈Rn and C ∈Rn×n are given by b = d X ℓ=1 2 σ (Ksℓ+ DsℓK1 −2DxℓKxℓ) −K1 and C = d X ℓ=1 [DxℓK −KDxℓ] [KDxℓ−DxℓK] , with entry-wise products sℓ:= xℓ⊙xℓand Dx := diag(x). The estimator costs O(n3 + dn2) computation (for computing C, b, and for inverting C) and O(n2) storage, for a fixed random chain history sub-sample size n. This can be further reduced via low-rank approximations to the kernel matrix and conjugate gradient methods, which are derived in Appendix A. Gradients of the model are given as ∇f(x) = Pn i=1 αi∇k(x, xi), i.e. they simply require to evaluate gradients of the kernel function. Evaluation and storage of ∇f(·) both cost O(dn). 4.3 Exponential Families in Finite Feature Spaces Instead of fitting an infinite-dimensional model on a subset of the available data, the second estimator is based on fitting a finite dimensional approximation using all available data {xi}t i=1, in primal form. As we will see, updating the estimator when a new data point arrives can be done online. Define an m-dimensional approximate feature space Hm = Rm, and denote by φx ∈Hm the embedding of a point x ∈X = Rd into Hm = Rm. Assume that the embedding approximates the kernel function as a finite rank expansion k(x, y) ≈φ⊤ x φy. The log unnormalised density of the infinite model (2) can be approximated by assuming the model in (4) takes the form f(x) = ⟨θ, φx⟩Hm = θ⊤φx (8) To fit θ ∈Rm, we again minimise the score matching objective (5), as proved in Appendix B. Proposition 2. Given a set of samples x = {xi}t i=1 and assuming f(x) = θ⊤φx for a finite dimensional feature embedding x 7→φx ∈Rm, and λ > 0, the unique minimiser of the λ∥θ∥2 2regularised empirical score matching objective (5) is given by ˆθλ := (C + λI)−1b, (9) where b := −1 n t X i=1 d X ℓ=1 ¨φℓ xi ∈Rm, C := 1 n t X i=1 d X ℓ=1 ˙φℓ xi ˙φℓ xi T ∈Rm×m, with ˙φℓ x := ∂ ∂xℓφx and ¨φℓ x := ∂2 ∂x2 ℓφx. An example feature embedding based on random Fourier features [17, 21] and a standard Gaussian kernel is φx = q 2 m cos(ωT 1 x + u1), . . . , cos(ωT mx + um) , with ωi ∼N(ω) and ui ∼Uniform[0, 2π]. The estimator has a one-off cost of O(tdm2 + m3) computation and O(m2) storage. Given that we have computed a solution based on the Markov chain history {xi}t i=1, however, it is straightforward to update C, b, and the solution ˆθλ online, after a new point xt+1 arrives. This is achieved by storing running averages and performing low-rank updates of matrix inversions, and costs O(dm2) computation and O(m2) storage, independent of t. Further details are given in Appendix B. Gradients of the model are ∇f(x) = [∇φx]⊤ˆθ , i.e., they require the evaluation of the gradient of the feature space embedding, costing O(md) computation and and O(m) storage. 5 Algorithm 1 Kernel Hamiltonian Monte Carlo – Pseudo-code Input: Target (possibly noisy estimator) ˆπ, adaptation schedule at, HMC parameters, Size of basis m or sub-sample size n. At iteration t + 1, current state xt, history {xi}t i=1, perform (1-4) with probability at KMC lite: 1. Update sub-sample z ⊆{xi}t i=1 2. Re-compute C, b from Prop. 1 3. Solve ˆαλ = −σ 2 (C + λI)−1b 4. ∇f(x) ←Pn i=1 αi∇k(x, zi) KMC finite: 1. Update to C, b from Prop. 2 2. Perform rank-d update to C−1 3. Update ˆθλ = (C + λI)−1b 4. ∇f(x) ←[∇φx]⊤ˆθ 5. Propose (p′, x∗) with kernel induced Hamiltonian flow, using ∇xU = ∇xf 6. Perform Metropolis step using ˆπ: accept xt+1 ←x∗w.p. (3) and reject xt+1 ←xt otherwise If ˆπ is noisy and x∗was accepted, store above ˆπ(x∗) for evaluating (3) in the next iteration 5 Kernel Hamiltonian Monte Carlo Constructing a kernel induced Hamiltonian flow as in Section 3 from the gradients of the infinite dimensional exponential family model (2), and approximate estimators (6),(8), we arrive at a gradient free, adaptive MCMC algorithm: Kernel Hamiltonian Monte Carlo (Algorithm 1). Computational Efficiency, Geometric Ergodicity, and Burn-in KMC finite using (8) allows for online updates using the full Markov chain history, and therefore is a more elegant solution than KMC lite, which has greater computational cost and requires sub-sampling the chain history. Due to the parametric nature of KMC finite, however, the tails of the estimator are not guaranteed to decay. For example, the random Fourier feature embedding described below Proposition 2 contains periodic cosine functions, and therefore oscillates in the tails of (8), resulting in a reduced acceptance probability. As we will demonstrate in the experiments, this problem does not appear when KMC finite is initialised in high-density regions, nor after burn-in. In situations where information about the target density support is unknown, and during burn-in, we suggest to use the lite estimator (7), whose gradients decay outside of the training data. As a result, KMC lite is guaranteed to fall back to a Random Walk Metropolis in unexplored regions, inheriting its convergence properties, and smoothly transitions to HMC-like proposals as the MCMC chain grows. A proof of the proposition below can be found in Appendix C. Proposition 3. Assume d = 1, π(x) has log-concave tails, the regularity conditions of [22, Thm 2.2] (implying π-irreducibility and smallness of compact sets), that MCMC adaptation stops after a fixed time, and a fixed number L of ϵ-leapfrog steps. If lim sup∥x∥2→∞∥∇f(x)∥2 = 0, and ∃M : ∀x : ∥∇f(x)∥2 ≤M, then KMC lite is geometrically ergodic from π-almost any starting point. Vanishing adaptation MCMC algorithms that use the history of the Markov chain for constructing proposals might not be asymptotically correct. We follow [12, Sec. 4.2] and the idea of ‘vanishing adaptation’ [11], to avoid such biases. Let {at}∞ i=0 be a schedule of decaying probabilities such that limt→∞at = 0 and P∞ t=0 at = ∞. We update the density gradient estimate according to this schedule in Algorithm 1. Intuitively, adaptation becomes less likely as the MCMC chain progresses, but never fully stops, while sharing asymptotic convergence with adaptation that stops at a fixed point [23, Theorem 1]. Note that Proposition 3 is a stronger statement about the convergence rate. Free Parameters KMC has two free parameters: the Gaussian kernel bandwidth σ, and the regularisation parameter λ. As KMC’s performance depends on the quality of the approximate infinite dimensional exponential family model in (6) or (8), a principled approach is to use the score matching objective function in (5) to choose σ, λ pairs via cross-validation (using e.g. ‘hot-started’ blackbox optimisation). Earlier adaptive kernel-based MCMC methods [12] did not address parameter choice. 6 Experiments We start by quantifying performance of KMC finite on synthetic targets. We emphasise that these results can be reproduced with the lite version. 6 102 103 104 n 100 101 d 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100 101 d 0.0 0.2 0.4 0.6 0.8 1.0 n=5000 HMC KMC median KMC 25%-75% KMC 5%-95% 102 103 104 n 0.0 0.2 0.4 0.6 0.8 1.0 d=8 Figure 2: Hypothetical acceptance probability of KMC finite on a challening target in growing dimensions. Left: As a function of n = m (x-axis) and d (y-axis). Middle/right: Slices through left plot with error bars for fixed n = m and as a function of d (left), and for fixed d as a function of n = m (right). 0 500 1000 1500 2000 n 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Acc. rate 0 500 1000 1500 2000 n 0 2 4 6 8 10 ∥ˆE[X]∥ 0 500 1000 1500 2000 n 0 5 10 15 20 25 30 35 Minimum ESS HMC KMC RW KAMH Figure 3: Results for the 8-dimensional synthetic Banana. As the amout of observed data increases, KMC performance approaches HMC – outperforming KAMH and RW. 80% error bars over 30 runs. KMC Finite: Stability of Trajectories in High Dimensions In order to quantify efficiency in growing dimensions, we study hypothetical acceptance rates along trajectories on the kernel induced Hamiltonian flow (no MCMC yet) on a challenging Gaussian target: We sample the diagonal entries of the covariance matrix from a Gamma(1,1) distribution and rotate with a uniformly sampled random orthogonal matrix. The resulting target is challenging to estimate due to its ‘non-singular smoothness’, i.e., substantially differing length-scales across its principal components. As a single Gaussian kernel is not able to effeciently represent such scaling families, we use a rational quadratic kernel for the gradient estimation, whose random features are straightforward to compute. Figure 2 shows the average acceptance over 100 independent trials as a function of the number of (ground truth) samples and basis functions, which are set to be equal n = m, and of dimension d. In low to moderate dimensions, gradients of the finite estimator lead to acceptance rates comparable to plain HMC. On targets with more ‘regular’ smoothness, the estimator performs well in up to d ≈100, with less variance. See Appendix D.1 for details. KMC Finite: HMC-like Mixing on a Synthetic Example We next show that KMC’s performance approaches that of HMC as it sees more data. We compare KMC, HMC, an isotropic random walk (RW), and KAMH on the 8-dimensional nonlinear banana-shaped target; see Appendix D.2. We here only quantify mixing after a sufficient burn-in (burn-in speed is included in next example). We quantify performance on estimating the target’s mean, which is exactly 0. We tuned the scaling of KAMH and RW to achieve 23% acceptance. We set HMC parameters to achieve 80% acceptance and then used the same parameters for KMC. We ran all samplers for 2000+200 iterations from a random start point, discarded the burn-in and computed acceptance rates, the norm of the empirical mean ∥ˆE[x]∥, and the minimum effective sample size (ESS) across dimensions. For KAMH and KMC, we repeated the experiment for an increasing number of burn-in samples and basis functions m = n. Figure 3 shows the results as a function of m = n. KMC clearly outperforms RW and KAMH, and eventually achieves performance close to HMC as n = m grows. KMC Lite: Pseudo-Marginal MCMC for GP Classification on Real World Data We next apply KMC to sample from the marginal posterior over hyper-parameters of a Gaussian Process Classification (GPC) model on the UCI Glass dataset [24]. Classical HMC cannot be used for this problem, due to the intractability of the marginal data likelihood. Our experimental protocol mostly follows [12, Section 5.1], see Appendix D.3, but uses only 6000 MCMC iterations without discarding a burn-in, i.e., we study how fast KMC initially explores the target. We compare convergence in terms of all mixed moments of order up to 3 to a set of benchmark samples (MMD [25], lower is better). KMC randomly uses between 1 and 10 leapfrog steps of a size chosen uniformly in [0.01, 0.1], 7 0 1000 2000 3000 4000 5000 Iterations 102 103 104 105 106 107 MMD from ground truth KMC KAMH RW 0 20 40 60 80 100 Lag −0.4 −0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Autocorrelation KMC RW HABC −10 0 10 20 30 40 50 θ1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 p(θ1) Figure 4: Left: Results for 9-dimensional marginal posterior over length scales of a GPC model applied to the UCI Glass dataset. The plots shows convergence (no burn-in discarded) of all mixed moments up to order 3 (lower MMD is better). Middle/right: ABC-MCMC auto-correlation and marginal θ1 posterior for a 10-dimensional skew normal likelihood. While KMC mixes as well as HABC, it does not suffer from any bias (overlaps with RW, while HABC is significantly different) and requires fewer simulations per proposal. a standard Gaussian momentum, and a kernel tuned by cross-validation, see Appendix D.3. We did not extensively tune the HMC parameters of KMC as the described settings were sufficient. Both KMC and KAMH used 1000 samples from the chain history. Figure 4 (left) shows that KMC’s burnin contains a short ‘exploration phase’ where produced estimates are bad, due to it falling back to a random walk in unexplored regions, c.f. Proposition 3. From around 500 iterations, however, KMC clearly outperforms both RW and the earlier state-of-the-art KAMH. These results are backed by the minimum ESS (not plotted), which is around 415 for KMC and is around 35 and 25 for KAMH and RW, respectively. Note that all samplers effectively stop improving from 3000 iterations – indicating a burn-in bias. All samplers took 1h time, with most time spent estimating the marginal likelihood. KMC Lite: Reduced Simulations and no Additional Bias in ABC We now apply KMC in the context of Approximate Bayesian Computation (ABC), which often is employed when the data likelihood is intractable but can be obtained by simulation, see e.g. [6]. ABC-MCMC [5] targets an approximate posterior by constructing an unbiased Monte Carlo estimator of the approximate likelihood. As each such evaluation requires expensive simulations from the likelihood, the goal of all ABC methods is to reduce the number of such simulations. Accordingly, Hamiltonian ABC was recently proposed [8], combining the synthetic likelihood approach [26] with gradients based on stochastic finite differences. We remark that this requires to simulate from the likelihood in every leapfrog step, and that the additional bias from the Gaussian likelihood approximation can be problematic. In contrast, KMC does not require simulations to construct a proposal, but rather ‘invests’ simulations into an accept/reject step (3) that ensures convergence to the original ABC target. Figure 4 (right) compares performance of RW, HABC (sticky random numbers and SPAS, [8, Sec. 4.3, 4.4]), and KMC on a 10-dimensional skew-normal distribution p(y|θ) = 2N (θ, I) Φ (⟨α, y⟩) with θ = α = 1 · 10. KMC mixes as well as HABC, but HABC suffers from a severe bias. KMC also reduces the number of simulations per proposal by a factor 2L = 100. See Appendix D.4 for details. 7 Discussion We have introduced KMC, a kernel-based gradient free adaptive MCMC algorithm that mimics HMC’s behaviour by estimating target gradients in an RKHS. In experiments, KMC outperforms random walk based sampling methods in up to d = 50 dimensions, including the recent kernelbased KAMH [12]. KMC is particularly useful when gradients of the target density are unavailable, as in PM-MCMC or ABC-MCMC, where classical HMC cannot be used. We have proposed two efficient empirical estimators for the target gradients, each with different strengths and weaknesses, and have given experimental evidence for the robustness of both. Future work includes establishing theoretical consistency and uniform convergence rates for the empirical estimators, for example via using recent analysis of random Fourier Features with tight bounds [21], and a thorough experimental study in the ABC-MCMC context where we see a lot of potential for KMC. It might also be possible to use KMC as a precomputing strategy to speed up classical HMC as in [27]. For code, see https://github.com/karlnapf/kernel_hmc 8 References [1] R.M. Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011. [2] M.A. Beaumont. Estimation of population growth or decline in genetically monitored populations. Genetics, 164(3):1139–1160, 2003. [3] C. Andrieu and G.O. Roberts. The pseudo-marginal approach for efficient Monte Carlo computations. The Annals of Statistics, 37(2):697–725, April 2009. [4] M. Filippone and M. Girolami. Pseudo-marginal Bayesian inference for Gaussian Processes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014. [5] P. Marjoram, J. Molitor, V. Plagnol, and S. Tavar´e. Markov chain Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences, 100(26):15324–15328, 2003. [6] S.A. Sisson and Y. Fan. Likelihood-free Markov chain Monte Carlo. Handbook of Markov chain Monte Carlo, 2010. [7] T. Chen, E. Fox, and C. Guestrin. Stochastic Gradient Hamiltonian Monte Carlo. In ICML, pages 1683–1691, 2014. [8] E. Meeds, R. Leenders, and M. Welling. Hamiltonian ABC. In UAI, 2015. [9] M. Betancourt. The Fundamental Incompatibility of Hamiltonian Monte Carlo and Data Subsampling. arXiv preprint arXiv:1502.01510, 2015. [10] H. Haario, E. Saksman, and J. Tamminen. Adaptive proposal distribution for random walk Metropolis algorithm. Computational Statistics, 14(3):375–395, 1999. [11] C. Andrieu and J. Thoms. A tutorial on adaptive MCMC. Statistics and Computing, 18(4):343– 373, December 2008. [12] D. Sejdinovic, H. Strathmann, M. Lomeli, C. Andrieu, and A. Gretton. Kernel Adaptive Metropolis-Hastings. In ICML, 2014. [13] B. Sriperumbudur, K. Fukumizu, R. Kumar, A. Gretton, and A. Hyv¨arinen. Density Estimation in Infinite Dimensional Exponential Families. arXiv preprint arXiv:1312.3516, 2014. [14] A. Hyv¨arinen. Estimation of non-normalized statistical models by score matching. JMLR, 6:695–709, 2005. [15] Larry Wasserman. All of nonparametric statistics. Springer, 2006. [16] C.E. Rasmussen. Gaussian Processes to Speed up Hybrid Monte Carlo for Expensive Bayesian Integrals. Bayesian Statistics 7, pages 651–659, 2003. [17] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pages 1177–1184, 2007. [18] M. Betancourt, S. Byrne, and M. Girolami. Optimizing The Integrator Step Size for Hamiltonian Monte Carlo. arXiv preprint arXiv:1503.01916, 2015. [19] A. Berlinet and C. Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer, 2004. [20] A. Hyv¨arinen. Some extensions of score matching. Computational Statistics & Data Analysis, 51:2499–2512, 2007. [21] B.K. Sriperumbudur and Z. Szab´o. Optimal rates for random Fourier features. In NIPS, 2015. [22] G.O. Roberts and R.L. Tweedie. Geometric convergence and central limit theorems for multidimensional Hastings and Metropolis algorithms. Biometrika, 83(1):95–110, 1996. [23] G.O. Roberts and J.S. Rosenthal. Coupling and ergodicity of adaptive Markov chain Monte Carlo algorithms. Journal of Applied Probability, 44(2):458–475, 03 2007. [24] K. Bache and M. Lichman. UCI Machine Learning Repository, 2013. [25] A. Gretton, K. Borgwardt, B. Sch¨olkopf, A. J. Smola, and M. Rasch. A kernel two-sample test. JMLR, 13:723–773, 2012. [26] S. N. Wood. Statistical inference for noisy nonlinear ecological dynamic systems. Nature, 466(7310):1102–1104, 08 2010. [27] C. Zhang, B. Shahbaba, and H. Zhao. Hamiltonian Monte Carlo Acceleration Using Neural Network Surrogate functions. arXiv preprint arXiv:1506.05555, 2015. [28] J. Shawe-Taylor and N. Cristianini. Kernel methods for pattern analysis. Cambridge university press, 2004. [29] Q. Le, T. Sarl´os, and A. Smola. Fastfood–approximating kernel expansions in loglinear time. In ICML, 2013. [30] K.L. Mengersen and R.L. Tweedie. Rates of convergence of the Hastings and Metropolis algorithms. The Annals of Statistics, 24(1):101–121, 1996. 9 | 2015 | 221 |
5,727 | Approximating Sparse PCA from Incomplete Data Abhisek Kundu ∗ Petros Drineas † Malik Magdon-Ismail ‡ Abstract We study how well one can recover sparse principal components of a data matrix using a sketch formed from a few of its elements. We show that for a wide class of optimization problems, if the sketch is close (in the spectral norm) to the original data matrix, then one can recover a near optimal solution to the optimization problem by using the sketch. In particular, we use this approach to obtain sparse principal components and show that for m data points in n dimensions, O(ϵ−2˜k max{m, n}) elements gives an ϵ-additive approximation to the sparse PCA problem (˜k is the stable rank of the data matrix). We demonstrate our algorithms extensively on image, text, biological and financial data. The results show that not only are we able to recover the sparse PCAs from the incomplete data, but by using our sparse sketch, the running time drops by a factor of five or more. 1 Introduction Principal components analysis constructs a low dimensional subspace of the data such that projection of the data onto this subspace preserves as much information as possible (or equivalently maximizes the variance of the projected data). The earliest reference to principal components analysis (PCA) is in [15]. Since then, PCA has evolved into a classic tool for data analysis. A challenge for the interpretation of the principal components (or factors) is that they can be linear combinations of all the original variables. When the original variables have direct physical significance (e.g. genes in biological applications or assets in financial applications) it is desirable to have factors which have loadings on only a small number of the original variables. These interpretable factors are sparse principal components (SPCA). The question we address is not how to better perform sparse PCA; rather, it is whether one can perform sparse PCA on incomplete data and be assured some degree of success. (i.e., can we do sparse PCA when we have a small sample of data points and those data points have missing features?). Incomplete data is a situation that one is confronted with all too often in machine learning. For example, with user-recommendation data, one does not have all the ratings of any given user. Or in a privacy preserving setting, a client may not want to give us all entries in the data matrix. In such a setting, our goal is to show that if the samples that we do get are chosen carefully, the sparse PCA features of the data can be recovered within some provable error bounds. A significant part of this work is to demonstrate our algorithms on a variety of data sets. More formally, The data matrix is A ∈Rm×n (m data points in n dimensions). Data matrices often have low effective rank. Let Ak be the best rank-k approximation to A; in practice, it is often possible to choose a small value of k for which ∥A−Ak∥2 is small. The best rank-k approximation Ak is obtained by projecting A onto the subspace spanned by its top-k principal components Vk, which is the n × k matrix containing the top-k right singular vectors of A. These top-k principal ∗Department of Computer Science, Rensselaer Polytechnic Institute, Troy, NY, kundua2@rpi.edu. †Department of Computer Science, Rensselaer Polytechnic Institute, Troy, NY, drinep@cs.rpi.edu. ‡Department of Computer Science, Rensselaer Polytechnic Institute, Troy, NY, magdon@cs.rpi.edu. 1 components are the solution to the variance maximization problem: Vk = arg max V∈Rn×k,VT V=I trace(VT AT AV). We denote the maximum variance attainable by OPTk, which is the sum of squares of the topk singular values of A. To get sparse principal components, we add a sparsity constraint to the optimization problem: every column of V should have at most r non-zero entries (the sparsity parameter r is an input), Sk = arg max V∈Rn×k,VT V=I,∥V(i)∥0≤r trace(VT AT AV). (1) The sparse PCA problem is itself a very hard problem that is not only NP-hard, but also inapproximable [12] There are many heuristics for obtaining sparse factors [2, 18, 20, 5, 4, 14, 16] including some approximation algorithms with provable guarantees [1]. The existing research typically addresses the task of getting just the top principal component (k = 1) (some exceptions are [11, 3, 19, 9]). While the sparse PCA problem is hard and interesting, it is not the focus of this work. We address the question: What if we do not know A, but only have a sparse sampling of some of the entries in A (incomplete data)? The sparse sampling is used to construct a sketch of A, denoted ˜A. There is not much else to do but solve the sparse PCA problem with the sketch ˜A instead of the full data A to get ˜Sk, ˜Sk = arg max V∈Rn×k,VT V=I,∥V(i)∥0≤r trace(VT ˜AT ˜AV). (2) We study how ˜Sk performs as an approximation to Sk with respective to the objective that we are trying to optimize, namely trace(ST AT AS) — the quality of approximation is measured with respect to the true A. We show that the quality of approximation is controlled by how well ˜AT ˜A approximates AT A as measured by the spectral norm of the deviation AT A −˜AT ˜A. This is a general result that does not rely on how one constructs the sketch ˜A. Theorem 1 (Sparse PCA from a Sketch) Let Sk be a solution to the sparse PCA problem that solves (1), and ˜Sk a solution to the sparse PCA problem for the sketch ˜A which solves (2). Then, trace(˜Sk T AT A˜Sk) ≥trace(Sk T AT ASk) −2k∥AT A −˜AT ˜A∥2. Theorem 1 says that if we can closely approximate A with ˜A, then we can compute, from ˜A, sparse components which capture almost as much variance as the optimal sparse components computed from the full data A. In our setting, the sketch ˜A is computed from a sparse sampling of the data elements in A (incomplete data). To determine which elements to sample, and how to form the sketch, we leverage some recent results in elementwise matrix completion ([8]). In a nutshell, if one samples larger data elements with higher probability than smaller data elements, then, for the resulting sketch ˜A, the error ∥AT A −˜AT ˜A∥2 will be small. The details of the sampling scheme and how the error depends on the number of samples is given in Section 2.1. Combining the bound on ∥A−˜A∥2 from Theorem 4 in Section 2.1 with Theorem 1, we get our main result: Theorem 2 (Sampling Complexity for Sparse PCA) Sample s data-elements from A ∈Rm×n to form the sparse sketch ˜A using Algorithm 1. Let Sk be a solution to the sparse PCA problem that solves (1), and let ˜Sk, which solves (2), be a solution to the sparse PCA problem for the sketch ˜A formed from the s sampled data elements. Suppose the number of samples s satisfies s ≥2k2ϵ−2(ρ2 + ϵγ/(3k)) log((m + n)/δ) (ρ2 and γ are dimensionless quantities that depend only on A). Then, with probability at least 1 −δ trace(˜Sk T AT A˜Sk) ≥trace(Sk T AT ASk) −2ϵ(2 + ϵ/k)∥A∥2 2. 2 The dependence of ρ2 and γ on A are given in Section 2.1. Roughly speaking, we can ignore the term with γ since it is multiplied by ϵ/k, and ρ2 = O(˜k max{m, n}), where ˜k is the stable (numerical) rank of A. To paraphrase Theorem 2, when the stable rank is a small constant, with O(k2 max{m, n}) samples, one can recover almost as good sparse principal components as with all data (the price being a small fraction of the optimal variance, since OPTk ≥∥A∥2 2). As far as we know, the only prior work related to the problem we consider here is [10] which proposed a specific method to construct sparse PCA from incomplete data. However, we develop a general tool that can be used with any existing sparse PCA heuristic. Moreover, we derive much simpler bounds (Theorems 1 and 2) using matrix concentration inequalities, as opposed to ϵ-net arguments in [10]. We also give an application of Theorem 1 to running sparse PCA after “denoising” the data using a greedy thresholding algorithm that sets the small elements to zero (see Theorem 3). Such denoising is appropriate when the observed matrix has been element-wise perturbed by small noise, and the uncontaminated data matrix is sparse and contains large elements. We show that if an appropriate fraction of the (noisy) data is set to zero, one can still recover sparse principal components. This gives a principled approach to regularizing sparse PCA in the presence of small noise when the data is sparse. Not only do our algorithms preserve the quality of the sparse principal components, but iterative algorithms for sparse PCA, whose running time is proportional to the number of non-zero entries in the input matrix, benefit from the sparsity of ˜A. Our experiments show about five-fold speed gains while producing near-comparable sparse components using less than 10% of the data. Discussion. In summary, we show that one can recover sparse PCA from incomplete data while gaining computationally at the same time. Our result holds for the optimal sparse components from A versus from ˜A. One cannot efficiently find these optimal components (since the problem is NPhard to even approximate), so one runs a heuristic, in which case the approximation error of the heuristic would have to be taken into account. Our experiments show that using the incomplete data with the heuristics is just as good as those same heuristics with the complete data. In practice, one may not be able to sample the data, but rather the samples are given to you. Our result establishes that if the samples are chosen with larger values being more likely, then one can recover sparse PCA. In practice one has no choice but to run the sparse PCA on these sampled elements and hope. Our theoretical results suggest that the outcome will be reasonable. This is because, while we do not have specific control over what samples we get, the samples are likely to represent the larger elements. For example, with user-recommendation data, users are more likely to rate items they either really like (large positive value) or really dislike (large negative value). Notation. We use bold uppercase (e.g., X) for matrices and bold lowercase (e.g., x) for column vectors. The i-th row of X is X(i), and the i-th column of X is X(i). Let [n] denote the set {1, 2, ..., n}. E(X) is the expectation of a random variable X; for a matrix, E(X) denotes the element-wise expectation. For a matrix X ∈Rm×n, the Frobenius norm ∥X∥F is ∥X∥2 F = Pm,n i,j=1 X2 ij, and the spectral (operator) norm ∥X∥2 is ∥X∥2 = max∥y∥2=1∥Xy∥2. We also have the ℓ1 and ℓ0 norms: ∥X∥ℓ1 = Pm,n i,j=1 |Xij| and ∥X∥0 (the number of non-zero entries in X). The k-th largest singular value of X is σk(X). and log x is the natural logarithm of x. 2 Sparse PCA from a Sketch In this section, we will prove Theorem 1 and give a simple application to zeroing small fluctuations as a way to regularize to noise. In the next section we will use a more sophisticated way to select the elements of the matrix allowing us to tolerate a sparser matrix (more incomplete data) but still recovering sparse PCA to reasonable accuracy. Theorem 1 will be a corollary of a more general result, for a class of optimization problems involving a Lipschitz-like objective function over an arbitrary (not necessarily convex) domain. Let f(V, X) be a function that is defined for a matrix variable V and a matrix parameter X. The optimization variable V is in some feasible set S which is arbitrary. The parameter X is also arbitrary. We assume that f is locally Lipschitz in X with, that is |f(V, X) −f(V, ˜X)| ≤γ(X)∥X −˜X∥2 ∀V ∈S. 3 (Note we allow the “Lipschitz constant” to depend on the fixed matrix X but not the variables V, ˜X; this is more general than a globally Lipshitz objective) The next lemma is the key tool we need to prove Theorem 1 and it may be on independent interest in other optimization settings. We are interested in maximizing f(V, X) w.r.t. V to obtain V∗. But, we only have an approximation ˜X for X, and so we maximize f(V, ˜X) to obtain ˜V∗, which will be a suboptimal solution with respect to X. We wish to bound f(V∗, X) −f( ˜V∗, X) which quantifies how suboptimal ˜V∗is w.r.t. X. Lemma 1 (Surrogate optimization bound) Let f(V, X) be γ-locally Lipschitz w.r.t. X over the domain V ∈S. Define V∗= arg maxV∈S f(V, X); ˜V∗= arg maxV∈S f(V, ˜X). Then, f(V∗, X) −f( ˜V∗, X) ≤2γ(X)∥X −˜X∥2. In the lemma, the function f and the domain S are arbitrary. In our setting, X ∈Rn×n, the domain S = {V ∈Rn×k; VT V = Ik; ∥V(j)∥0 ≤r}, and f(V, X) = trace(VT XV). We first show that f is Lipschitz w.r.t. X with γ = k (a constant independent of X). Let the representation of V by its columns be V = [v1, . . . , vk]. Then, |trace(VT XV) −trace(VT ˜XV)| = |trace((X −˜X)VVT )| ≤ k X i=1 σi(X −˜X) ≤k∥X −˜X∥2 where, σi(A) is the i-th largest singular value of A (we used Von-neumann’s trace inequality and the fact that VVT is a k-dimensional projection). Now, by Lemma 1, trace(V∗T XV∗) − trace( ˜V∗T X ˜V∗) ≤2k∥X −˜X∥2. Theorem 1 follows by setting X = AT A and ˜X = ˜AT ˜A 1. Greedy thresholding. We give the simplest scenario of incomplete data where Theorem 1 gives some reassurance that one can compute good sparse principal components. Suppose the smallest data elements have been set to zero. This can happen, for example, if only the largest elements are measured, or in a noisy setting if the small elements are treated as noise and set to zero. So ˜Aij = Aij |Aij| ≥δ; 0 |Aij| < δ. Recall ˜k = ∥A∥2 F /∥A∥2 2 (stable rank of A), and define ∥Aδ∥2 F = P |Aij|<δ A2 ij. Let A = ˜A + ∆. By construction, ∥∆∥2 F = ∥Aδ∥2 F . Then, ∥AT A −˜A T ˜A∥2 = ∥AT ∆+ ∆T A −∆T ∆∥2 ≤2∥A∥2∥∆∥2 + ∥∆∥2 2. (3) Suppose the zeroing of elements only loses a fraction of the energy in A, i.e. δ is selected so that ∥Aδ∥2 F ≤ϵ2∥A∥2 F /˜k; that is an ϵ/˜k fraction of the total variance in A has been lost in the unmeasured (or zero) data. Then ∥∆∥2 ≤∥∆∥F ≤ϵ∥A∥F / p ˜k = ϵ∥A∥2. Theorem 3 Suppose that ˜A is created from A by zeroing all elements that are less than δ, and δ is such that the truncated norm satisfies ∥Aδ∥2 2 ≤ϵ2∥A∥2 F /˜k. Then the sparse PCA solution ˜V∗ satisfies trace( ˜V∗T AA ˜V∗) ≥trace(V∗T AAT V∗) −2kϵ∥A∥2 2(2 + ϵ). Theorem 3 shows that it is possible to recover sparse PCA after setting small elements to zero. This is appropriate when most of the elements in A are small noise and a few of the elements in A contain large data elements. For example if the data consists of sparse O(√nm) large elements (of magnitude, say, 1) and many nm −O(√nm) small elements whose magnitude is o(1/√nm) (high signal-to-noise setting), then ∥Aδ∥2 2/∥A∥2 2 →0 and with just a sparse sampling of the O(√nm) large elements (very incomplete data), we recover near optimal sparse PCA. Greedily keeping only the large elements of the matrix requires a particular structure in A to work, and it is based on a crude Frobenius-norm bound for the spectral error. In Section 2.1, we use recent results in element-wise matrix sparsification to choose the elements in a randomized way, with a bias toward large elements. With high probability, one can directly bound the spectral error and hence get better performance. 1Theorem 1 can also be proved as follows: trace(VT XV) −trace( ˜VT X ˜V) = trace(VT XV) − trace(VT ˜XV) + trace(VT ˜XV) −trace( ˜VT X ˜V) ≤k∥X −˜X∥2 + trace(VT ˜XV) −trace( ˜VT X ˜V) ≤ k∥X −˜X∥2 + trace( ˜VT ˜X ˜V) −trace( ˜VT X ˜V) ≤2k∥X −˜X∥2. 4 Algorithm 1 Hybrid (ℓ1, ℓ2)-Element Sampling Input: A ∈Rm×n; # samples s; probabilities {pij}. 1: Set ˜A = 0m×n. 2: for t = 1 . . . s (i.i.d. trials with replacement) do 3: Randomly sample indices (it, jt) ∈[m] × [n] with P [(it, jt) = (i, j)] = pij. 4: Update ˜A: ˜Aij ←˜Aij + Aij/(s · pij). 5: return ˜A (with at most s non-zero entries). 2.1 An (ℓ1, ℓ2)-Sampling Based Sketch In the previous section, we created the sketch by deterministically setting the small data elements to zero. Instead, we could randomly select the data elements to keep. It is natural to bias this random sampling toward the larger elements. Therefore, we define sampling probabilities for each data element Aij which are proportional to a mixture of the absolute value and square of the element: pij = α |Aij| ∥A∥ℓ1 + (1 −α) A2 ij ∥A∥2 F , (4) where α ∈(0, 1] is a mixing parameter. Such a sampling probability was used in [8] to sample data elements in independent trials to get a sketch ˜A. We repeat the prototypical algorithm for element-wise matrix sampling in Algorithm 1. Note that unlike with the deterministic zeroing of small elements, in this sampling scheme, one samples the element Aij with probability pij and then rescales it by 1/pij. To see the intuition for this rescaling, consider the expected outcome for a single sample: E[ ˜Aij] = pij · (Aij/pij) + (1 − pij) · 0 = Aij; that is, ˜A is a sparse but unbiased estimate for A. This unbiasedness holds for any choice of the sampling probabilities pij defined over the elements of A in Algorithm 1. However, for an appropriate choice of the sampling probabilities, we get much more than unbiasedness; we can control the spectral norm of the deviation, ∥A −˜A∥2. In particular, the hybrid-(ℓ1, ℓ2) distribution in (4) was analyzed in [8], where they suggest an optimal choice for the mixing parameter α∗which minimizes the theoretical bound on ∥A −˜A∥2. This algorithm to choose α∗is summarized in Algorithm 1 of [8]. Using the probabilities in (4) to create the sketch ˜A using Algorithm 1, with α∗selected using Algorithm 1 of [8], one can prove a bound for ∥A−˜A∥2. We state a simplified version of the bound from [8] in Theorem 4. Theorem 4 ([8]) Let A ∈Rm×n and let ϵ > 0 be an accuracy parameter. Define probabilities pij as in (4) with α∗chosen using Algorithm 1 of [8]. Let ˜A be the sparse sketch produced using Algorithm 1 with a number of samples s ≥2ϵ−2(ρ2 + γϵ/3) log((m + n)/δ), where ρ2 = ˜k · max{m, n} α · ˜k · ∥A∥2/ ∥A∥ℓ1 + (1 −α) −1 , and γ ≤1 + p mn˜k/α. Then, with probability at least 1 −δ, ∥A −˜A∥2 ≤ϵ∥A∥2. 3 Experiments We show the experimental performance of sparse PCA from a sketch using several real data matrices. As we mentioned, sparse PCA is NP-Hard, and so we must use heuristics. These heuristics are discussed next, followed by the data, the experimental design and finally the results. Algorithms for Sparse PCA: Let G (ground truth) denote the algorithm which computes the principal components (which may not be sparse) of the full data matrix A; the optimal variance is OPTk. We consider six heuristics for getting sparse principal components. 5 Gmax,r The r largest-magnitude entries in each principal component generated by G. Gsp,r r-sparse components using the Spasm toolbox of [17] with A. Hmax,r The r largest entries of the principal components for the (ℓ1, ℓ2)-sampled sketch ˜A. Hsp,r r-sparse components using Spasm with the (ℓ1, ℓ2)-sampled sketch ˜A. Umax,r The r largest entries of the principal components for the uniformly sampled sketch ˜A. Usp,r r-sparse components using Spasm with the uniformly sampled sketch ˜A. Output of an algorithm Z is sparse principal components V, and our metric is f(Z) = trace(VT AT AV), where A is the original centered data. We consider the following statistics. f(Gmax,r) f(Gsp,r) Relative loss of greedy thresholding versus Spasm, illustrating the value of a good sparse PCA algorithm. Our sketch based algorithms do not address this loss. f(Hmax/sp,r) f(Gmax/sp,r) Relative loss of using the (ℓ1, ℓ2)-sketch ˜A instead of complete data A. A ratio close to 1 is desired. f(Umax/sp,r) f(Gmax/sp,r) Relative loss of using the uniform sketch ˜A instead of complete data A. A benchmark to highlight the value of a good sketch. We also report the computation time for the algorithms. We show results to confirm that sparse PCA algorithms using the (ℓ1, ℓ2)-sketch are nearly comparable to those same algorithms on the complete data; and, gain in computation time from sparse sketch is proportional to the sparsity. Data Sets: We show results on image, text, stock, and gene expression data. • Digit Data (m = 2313, n = 256): We use the [7] handwritten zip-code digit images (300 pixels/inch in 8-bit gray scale). Each pixel is a feature (normalized to be in [−1, 1]). Each 16 × 16 digit image forms a row of the data matrix A. We focus on three digits: “6” (664 samples), “9” (644 samples), and “1” (1005 samples). • TechTC Data (m = 139, n = 15170): We use the Technion Repository of Text Categorization Dataset (TechTC, see [6]) from the Open Directory Project (ODP). We removed words (features) with fewer than 5 letters. Each document (row) has unit norm. • Stock Data (m = 7056, n = 1218): We use S&P100 stock market data with 7056 snapshots of prices for 1218 stocks. The prices of each day form a row of the data matrix and a principal component represents an “index” of sorts – each stock is a feature. • Gene Expression Data (m = 107, n = 22215): We use GSE10072 gene expression data for lung cancer from the NCBI Gene Expression Omnibus database. There are 107 samples (58 lung tumor cases and 49 normal lung controls) forming the rows of the data matrix, with 22,215 probes (features) from the GPL96 platform annotation table. 3.1 Results We report results for primarily the top principal component (k = 1) which is the case most considered in the literature. When k > 1, our results do not qualitatively change. We note the optimal mixing parameter α∗using Algorithm 1 of [8] for various datasets in Table 1. Handwritten Digits. We sample approximately 7% of the elements from the centered data using (ℓ1, ℓ2)-sampling, as well as uniform sampling. The performance for small r is shown in Table 1, including the running time τ. For this data, f(Gmax,r)/f(Gsp,r) ≈0.23 (r = 10), so it is important to use a good sparse PCA algorithm. We see from Table 1 that the (ℓ1, ℓ2)-sketch significantly outperforms the uniform sketch. A more extensive comparison of recovered variance is given in Figure 2(a). We also observe a speed-up of a factor of about 6 for the (ℓ1, ℓ2)-sketch. We point out that the uniform sketch is reasonable for the digits data because most data elements are close to either +1 or −1, since the pixels are either black or white. We show a visualization of the principal components in Figure 1. We observe that the sparse components from the (ℓ1, ℓ2)-sketch are almost identical to that of from the complete data. TechTC Data. We sample approximately 5% of the elements from the centered data using our (ℓ1, ℓ2)-sampling, as well as uniform sampling. For this data, f(Gmax,r)/f(Gsp,r) ≈0.84 (r = 10). We observe a very significant performance difference between the (ℓ1, ℓ2)-sketch and uniform sketch. A more extensive comparison of recovered variance is given in Figure 2(b). We also observe 6 α∗ r f(Hmax/sp,r) f(Gmax/sp,r) τ(G) τ(H) f(Umax/sp,r) f(Gmax/sp,r) τ(G) τ(U) Digit .42 40 0.99/0.90 6.21 1.01/0.70 5.33 TechTC 1 40 0.94/0.99 5.70 0.41/0.38 5.96 Stock .10 40 1.00/1.00 3.72 0.66/0.66 4.76 Gene .92 40 0.82/0.88 3.61 0.65/0.15 2.53 Table 1: Comparison of sparse principal components from the (ℓ1, ℓ2)-sketch and uniform sketch. (a) r = 100% (b) r = 50% (c) r = 30% (d) r = 10% Figure 1: [Digits] Visualization of top-3 sparse principal components. In each figure, left panel shows Gsp,r and right panel shows Hsp,r. 20 40 60 80 100 0.6 0.8 1 Sparsity constraint: r (percent) f(Hsp,r)/f(Gsp,r) f(Usp,r)/f(Gsp,r) 20 40 60 80 100 0.2 0.4 0.6 0.8 Sparsity constraint: r (percent) f(Hsp,r)/f(Gsp,r) f(Usp,r)/f(Gsp,r) 20 40 60 80 100 0.6 0.8 1 Sparsity constraint: r (percent) f(Hsp,r)/f(Gsp,r) f(Usp,r)/f(Gsp,r) 20 40 60 80 100 0.2 0.4 0.6 0.8 Sparsity constraint: r (percent) f(Hsp,r)/f(Gsp,r) f(Usp,r)/f(Gsp,r) (a) Digit (b) TechTC (c) Stock (d) Gene Figure 2: Performance of sparse PCA for (ℓ1, ℓ2)-sketch and uniform sketch over an extensive range for the sparsity constraint r. The performance of the uniform sketch is significantly worse highlighting the importance of a good sketch. a speed-up of a factor of about 6 for the (ℓ1, ℓ2)-sketch. Unlike the digits data which is uniformly near ±1, the text data is “spikey” and now it is important to sample with a bias toward larger elements, which is why the uniform-sketch performs very poorly. As a final comparison, we look at the actual sparse top component with sparsity parameter r = 10. The topic IDs in the TechTC data are 10567=”US: Indiana: Evansville” and 11346=”US: Florida”. The top-10 features (words) in the full PCA on the complete data are shown in Table 2. In Table 3 we show which words appear in the top sparse principal component with sparsity r = 10 using various sparse PCA algorithms. We observe that the sparse PCA from the (ℓ1, ℓ2)-sketch with only 5% of the data sampled matches quite closely with the same sparse PCA algorithm using the complete data (Gmax/sp,r matches Hmax/sp,r). Stock Data. We sample about 2% of the non-zero elements from the centered data using the (ℓ1, ℓ2)sampling, as well as uniform sampling. For this data, f(Gmax,r)/f(Gsp,r) ≈0.96 (r = 10). We observe a very significant performance difference between the (ℓ1, ℓ2)-sketch and uniform sketch. A more extensive comparison of recovered variance is given in Figure 2(c). We also observe a speed-up of a factor of about 4 for the (ℓ1, ℓ2)-sketch. Similar to TechTC data this dataset is also “spikey”, so biased sampling toward larger elements significantly outperforms the uniform-sketch. Gene Expression Data. We sample about 9% of the elements from the centered data using the (ℓ1, ℓ2)-sampling, as well as uniform sampling. For this data, f(Gmax,r)/f(Gsp,r) ≈0.05 (r = 10) 7 ID Top 10 in Gmax,r ID Other words 1 evansville 11 service 2 florida 12 small 3 south 13 frame 4 miami 14 tours 5 indiana 15 faver 6 information 16 transaction 7 beach 17 needs 8 lauderdale 18 commercial 9 estate 19 bullet 10 spacer 20 inlets 21 producer Table 2: [TechTC] Top ten words in top principal component of the complete data (the other words are discovered by some of the sparse PCA algorithms). Gmax,r Hmax,r Umax,r Gsp,r Hsp,r Usp,r 1 1 6 1 1 6 2 2 14 2 2 14 3 3 15 3 3 15 4 4 16 4 4 16 5 5 17 5 5 17 6 7 7 6 7 7 7 6 18 7 8 18 8 8 19 8 6 19 9 11 20 9 12 20 10 12 21 13 11 21 Table 3: [TechTC] Relative ordering of the words (w.r.t. Gmax,r) in the top sparse principal component with sparsity parameter r = 10. which means a good sparse PCA algorithm is imperative. We observe a very significant performance difference between the (ℓ1, ℓ2)-sketch and uniform sketch. A more extensive comparison of recovered variance is given in Figure 2(d). We also observe a speed-up of a factor of about 4 for the (ℓ1, ℓ2)-sketch. Similar to TechTC data this dataset is also “spikey”, and consequently biased sampling toward larger elements significantly outperforms the uniform-sketch. Performance of Other Sketches: We briefly report on other options for sketching A. We consider suboptimal α (not α∗from Algorithm 1 of [8] ) in (4) to construct a suboptimal hybrid distribution, and use this in proto-Algorithm 1 to construct a sparse sketch. Figure 3 reveals that a good sketch using the α∗is important. 20 40 60 80 100 0.85 0.9 0.95 Sparsity constraint: r (percent) f(Hsp,r), α∗= 0.1 f(Hsp,r), α = 1.0 Figure 3: [Stock data] Performance of sketch using suboptimal α to illustrate the importance of the optimal mixing parameter α∗. Conclusion: It is possible to use a sparse sketch (incomplete data) to recover nearly as good sparse principal components as one would have gotten with the complete data. We mention that, while Gmax which uses the largest weights in the unconstrained PCA does not perform well with respect to the variance, it does identify good features. A simple enhancement to Gmax is to recalibrate the sparse component after identifying the features - this is an unconstrained PCA problem on just the columns of the data matrix corresponding to the features. This method of recalibrating can be used to improve any sparse PCA algorithm. Our algorithms are simple and efficient, and many interesting avenues for further research remain. Can the sampling complexity for the top-k sparse PCA be reduced from O(k2) to O(k). We suspect that this should be possible by getting a better bound on Pk i=1 σi(AT A−˜AT ˜A); we used the crude bound k∥AT A −˜AT ˜A∥2. We also presented a general surrogate optimization bound which may be of interest in other applications. In particular, it is pointed out in [13] that though PCA optimizes variance, a more natural way to look at PCA is as the linear projection of the data that minimizes the information loss. [13] gives efficient algorithms to find sparse linear dimension reduction that minimizes information loss – the information loss of sparse PCA can be considerably higher than optimal. To minimize information loss, the objective to maximize is f(V) = trace(AT AV(AV)†A). It would be interesting to see whether one can recover sparse low-information-loss linear projectors from incomplete data. Acknowledgments: AK and PD are partially supported by NSF IIS-1447283 and IIS-1319280. 8 References [1] M. Asteris, D. Papailiopoulos, and A. Dimakis. Non-negative sparse PCA with provable guarantees. In Proc. ICML, 2014. [2] J. Cadima and I. Jolliffe. Loadings and correlations in the interpretation of principal components. Applied Statistics, 22:203–214, 1995. [3] T. T. Cai, Z. Ma, and Y. Wu. Sparse pca: Optimal rates and adaptive estimation. The Annals of Statistics, 41(6):3074–3110, 2013. [4] Alexandre d’Aspremont, Francis Bach, and Laurent El Ghaoui. Optimal solutions for sparse principal component analysis. Journal of Machine Learning Research, 9:1269–1294, June 2008. [5] Alexandre d’Aspremont, Laurent El Ghaoui, Michael I. Jordan, and Gert R. G. Lanckriet. A direct formulation for sparse PCA using semidefinite programming. SIAM Review, 49(3):434– 448, 2007. [6] E. Gabrilovich and S. Markovitch. Text categorization with many redundant features: using aggressive feature selection to make SVMs competitive with C4.5. In Proceedings of International Conference on Machine Learning, 2004. [7] J. J. Hull. A database for handwritten text recognition research. In IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 550–554, 16(5), 1994. [8] A. Kundu, P. Drineas, and M. Magdon-Ismail. Recovering PCA from Hybrid-(ℓ1, ℓ2) Sparse Sampling of Data Elements. In http://arxiv.org/pdf/1503.00547v1.pdf, 2015. [9] J. Lei and V. Q. Vu. Sparsistency and agnostic inference in sparse pca. The Annals of Statistics, 43(1):299–322, 2015. [10] Karim Lounici. Sparse principal component analysis with missing observations. arxiv report: http://arxiv.org/abs/1205.7060, 2012. [11] Z. Ma. Sparse principal component analysis and iterative thresholding. The Annals of Statistics, 41(2):772–801, 2013. [12] M. Magdon-Ismail. NP-hardness and inapproximability of sparse pca. arxiv report: http://arxiv.org/abs/1502.05675, 2015. [13] M. Magdon-Ismail and C. Boutsidis. arxiv report: http://arxiv.org/abs/1502.06626, 2015. [14] B. Moghaddam, Y. Weiss, and S. Avidan. Generalized spectral bounds for sparse LDA. In Proc. ICML, 2006. [15] K. Pearson. On lines and planes of closest fit to systems of points in space. Philosophical Magazine, 2:559–572, 1901. [16] Haipeng Shen and Jianhua Z. Huang. Sparse principal component analysis via regularized low rank matrix approximation. Journal of Multivariate Analysis, 99:1015–1034, July 2008. [17] K. Sjstrand, L.H. Clemmensen, R. Larsen, and B. Ersbll. Spasm: A matlab toolbox for sparse statistical modeling. In Journal of Statistical Software (Accepted for publication), 2012. [18] N. Trendafilov, I. T. Jolliffe, and M. Uddin. A modified principal component technique based on the lasso. Journal of Computational and Graphical Statistics, 12:531–547, 2003. [19] Z. Wang, H. Lu, and H. Liu. Nonconvex statistical optimization: Minimax-optimal sparse pca in polynomial time. http://arxiv.org/abs/1408.5352?context=cs.LG, 2014. [20] H. Zou, T. Hastie, and R. Tibshirani. Sparse principal component analysis. Journal of Computational & Graphical Statistics, 15(2):265–286, 2006. 9 | 2015 | 222 |
5,728 | Regularization-Free Estimation in Trace Regression with Symmetric Positive Semidefinite Matrices Martin Slawski Ping Li Department of Statistics & Biostatistics Department of Computer Science Rutgers University Piscataway, NJ 08854, USA {martin.slawski@rutgers.edu, pingli@stat.rutgers.edu} Matthias Hein Department of Computer Science Department of Mathematics Saarland University Saarbr¨ucken, Germany hein@cs.uni-saarland.de Abstract Trace regression models have received considerable attention in the context of matrix completion, quantum state tomography, and compressed sensing. Estimation of the underlying matrix from regularization-based approaches promoting low-rankedness, notably nuclear norm regularization, have enjoyed great popularity. In this paper, we argue that such regularization may no longer be necessary if the underlying matrix is symmetric positive semidefinite (spd) and the design satisfies certain conditions. In this situation, simple least squares estimation subject to an spd constraint may perform as well as regularization-based approaches with a proper choice of regularization parameter, which entails knowledge of the noise level and/or tuning. By contrast, constrained least squares estimation comes without any tuning parameter and may hence be preferred due to its simplicity. 1 Introduction Trace regression models of the form yi = tr(X⊤ i Σ∗) + εi, i = 1, . . . , n, (1) where Σ∗∈Rm1×m2 is the parameter of interest to be estimated given measurement matrices Xi ∈ Rm1×m2 and observations yi contaminated by errors εi, i = 1, . . . , n, have attracted considerable interest in high-dimensional statistical inference, machine learning and signal processing over the past few years. Research in these areas has focused on a setting with few measurements n ≪m1·m2 and Σ∗being (approximately) of low rank r ≪min{m1, m2}. Such setting is relevant to problems such as matrix completion [6, 23], compressed sensing [5, 17], quantum state tomography [11] and phase retrieval [7]. A common thread in these works is the use of the nuclear norm of a matrix as a convex surrogate for its rank [18] in regularized estimation amenable to modern optimization techniques. This approach can be seen as natural generalization of ℓ1-norm (aka lasso) regularization for the linear regression model [24] that arises as a special case of model (1) in which both Σ∗and {Xi}n i=1 are diagonal. It is inarguable that in general regularization is essential if n < m1 · m2. The situation is less clear if Σ∗is known to satisfy additional constraints that can be incorporated in estimation. Specifically, in the present paper we consider the case in which m1 = m2 = m and Σ∗ is known to be symmetric positive semidefinite (spd), i.e. Σ∗∈Sm + with Sm + denoting the positive semidefinite cone in the space of symmetric real m × m matrices Sm. The set Sm + deserves specific interest as it includes covariance matrices and Gram matrices in kernel-based learning [20]. It is rather common for these matrices to be of low rank (at least approximately), given the widespread use of principal components analysis and low-rank kernel approximations [28]. In the present paper, we focus on the usefulness of the spd constraint for estimation. We argue that if Σ∗is spd and the measurement matrices {Xi}n i=1 obey certain conditions, constrained least squares estimation min Σ∈Sm + 1 2n n X i=1 (yi −tr(X⊤ i Σ))2 (2) may perform similarly well in prediction and parameter estimation as approaches employing nuclear norm regularization with proper choice of the regularization parameter, including the interesting 1 regime n < δm, where δm = dim(Sm) = m(m + 1)/2. Note that the objective in (2) only consists of a data fitting term and is hence convenient to work with in practice since there is no free parameter. Our findings can be seen as a non-commutative extension of recent results on non-negative least squares estimation for linear regression [16, 21]. Related work. Model (1) with Σ∗∈Sm + has been studied in several recent papers. A good deal of these papers consider the setup of compressed sensing in which the {Xi}n i=1 can be chosen by the user, with the goal to minimize the number of observations required to (approximately) recover Σ∗. For example, in [27], recovery of Σ∗being low-rank from noiseless observations (εi = 0, i = 1, . . . , n) by solving a feasibility problem over Sm + is considered, which is equivalent to the constrained least squares problem (1) in a noiseless setting. In [3, 8], recovery from rank-one measurements is considered, i.e., for {xi}n i=1 ⊂Rm yi = x⊤ i Σ∗xi + εi = tr(X⊤ i Σ∗) + εi, with Xi = xix⊤ i , i = 1, . . . , n. (3) As opposed to [3, 8], where estimation based on nuclear norm regularization is proposed, the present work is devoted to regularization-free estimation. While rank-one measurements as in (3) are also in the center of interest herein, our framework is not limited to this case. In [3] an application of (3) to covariance matrix estimation given only one-dimensional projections {x⊤ i zi}n i=1 of the data points is discussed, where the {zi}n i=1 are i.i.d. from a distribution with zero mean and covariance matrix Σ∗. In fact, this fits the model under study with observations yi = (x⊤ i zi)2 = x⊤ i ziz⊤ i xi = x⊤ i Σ∗xi + εi, εi = x⊤ i {ziz⊤ i −Σ∗}xi, i = 1, . . . , n. (4) Specializing (3) to the case in which Σ∗= σ∗(σ∗)⊤, one obtains the quadratic model yi = |x⊤ i σ∗|2 + εi (5) which (with complex-valued σ∗) is relevant to the problem of phase retrieval [14]. The approach of [7] treats (5) as an instance of (1) and uses nuclear norm regularization to enforce rank-one solutions. In follow-up work [4], the authors show a refined recovery result stating that imposing an spd constraint −without regularization −suffices. A similar result has been proven independently by [10]. However, the results in [4] and [10] only concern model (5). After posting an extended version [22] of the present paper, a generalization of [4, 10] to general low-rank spd matrices has been achieved in [13]. Since [4, 10, 13] consider bounded noise, whereas the analysis herein assumes Gaussian noise, our results are not direclty comparable to those in [4, 10, 13]. Notation. Md denotes the space of real d × d matrices with inner product ⟨M, M ′⟩:= tr(M ⊤M ′). The subspace of symmetric matrices Sd has dimension δd := d(d + 1)/2. M ∈Sd has an eigen-decomposition M = UΛU ⊤= Pd j=1 λj(M)uju⊤ j , where λ1(M) = λmax(M) ≥ λ2(M) ≥. . . ≥λd(M) = λmin(M), Λ = diag(λ1(M), . . . , λd(M)), and U = [u1 . . . ud]. For q ∈[1, ∞) and M ∈Sd, ∥M∥q := (Pd j=1 |λj(M)|q)1/q denotes the Schatten-q-norm (q = 1: nuclear norm; q = 2 Frobenius norm ∥M∥F, q = ∞: spectral norm ∥M∥∞:= max1≤j≤d |λj(M)|). Let S1(d) = {M ∈Sd : ∥M∥1 = 1} and S+ 1 (d) = S1(d) ∩Sd +. The symbols ⪰, ⪯, ≻, ≺refer to the semidefinite ordering. For a set A and α ∈R, αA := {αa, a ∈A}. It is convenient to re-write model (1) as y = X(Σ∗) + ε, where y = (yi)n i=1, ε = (εi)n i=1 and X : Mm →Rn is a linear map defined by (X(M))i = tr(X⊤ i M), i = 1, . . . , n, referred to as sampling operator. Its adjoint X ∗: Rn →Mm is given by the map v 7→Pn i=1 viXi. Supplement. The appendix contains all proofs, additional experiments and figures. 2 Analysis Preliminaries. Throughout this section, we consider a special instance of model (1) in which yi = tr(XiΣ∗) + εi, where Σ∗∈Sm +, Xi ∈Sm, and εi i.i.d. ∼N(0, σ2), i = 1, . . . , n. (6) The assumption that the errors {εi}n i=1 are Gaussian is made for convenience as it simplifies the stochastic part of our analysis, which could be extended to sub-Gaussian errors. Note that w.l.o.g., we may assume that {Xi}n i=1 ⊂Sm. In fact, since Σ∗∈Sm, for any M ∈Mm we have that tr(MΣ∗) = tr(M symΣ∗), where M sym = (M + M ⊤)/2. 2 In the sequel, we study the statistical performance of the constrained least squares estimator bΣ ∈argmin Σ∈Sm + 1 2n∥y −X(Σ)∥2 2 (7) under model (6). More specifically, under certain conditions on X, we shall derive bounds on (a) 1 n∥X(Σ∗) −X(bΣ)∥2 2, and (b) ∥bΣ −Σ∗∥1, (8) where (a) will be referred to as “prediction error” below. The most basic method for estimating Σ∗ is ordinary least squares (ols) estimation bΣols ∈argmin Σ∈Sm 1 2n∥y −X(Σ)∥2 2, (9) which is computationally simpler than (7). While (7) requires convex programming, (9) boils down to solving a linear system of equations in δm = m(m + 1)/2 variables. On the other hand, the prediction error of ols scales as OP(dim(range(X))/n), where dim(range(X)) can be as large as min{n, δm}, in which case the prediction error vanishes only if δm/n →0 as n →∞. Moreover, the estimation error ∥bΣols −Σ∗∥1 is unbounded unless n ≥δm. Research conducted over the past few years has thus focused on methods dealing successfully with the case n < δm as long as the target Σ∗has additional structure, notably low-rankedness. Indeed, if Σ∗has rank r ≪m, the intrinsic dimension of the problem becomes (roughly) mr ≪δm. In a large body of work, nuclear norm regularization, which serves as a convex surrogate of rank regularization, is considered as a computationally convenient alternative for which a series of adaptivity properties to underlying lowrankedness has been established, e.g. [5, 15, 17, 18, 19]. Complementing (9) with nuclear norm regularization yields the estimator bΣ1 ∈argmin Σ∈Sm 1 2n∥y −X(Σ)∥2 2 + λ∥Σ∥1, (10) where λ > 0 is a regularization parameter. In case an spd constraint is imposed (10) becomes bΣ1+ ∈argmin Σ∈Sm + 1 2n∥y −X(Σ)∥2 2 + λ tr(Σ). (11) Our analysis aims at elucidating potential advantages of the spd constraint in the constrained least squares problem (7) from a statistical point of view. It turns out that depending on properties of X, the behaviour of bΣ can range from a performance similar to the least squares estimator bΣols on the one hand to a performance similar to the nuclear norm regularized estimator bΣ1+ with properly chosen/tuned λ on the other hand. The latter case appears to be remarkable: bΣ may enjoy similar adaptivity properties as nuclear norm regularized estimators even though bΣ is obtained from a pure data fitting problem without explicit regularization. 2.1 Negative result We first discuss a negative example of X for which the spd-constrained estimator bΣ does not improve (substantially) over the unconstrained estimator bΣols. At the same time, this example provides clues on conditions to be imposed on X to achieve substantially better performance. Random Gaussian design. Consider the Gaussian orthogonal ensemble (GOE) GOE(m) = {X = (xjk), {xjj}m j=1 i.i.d. ∼N(0, 1), {xjk = xkj}1≤j<k≤m i.i.d. ∼N(0, 1/2)}. Gaussian measurements are common in compressed sensing. It is hence of interest to study measurements {Xi}n i=1 i.i.d. ∼GOE(m) in the context of the constrained least squares problem (7). The following statement points to a serious limitation associated with such measurements. Proposition 1. Consider Xi i.i.d. ∼GOE(m), i = 1, . . . , n. For any ε > 0, if n ≤(1 −ε)δm/2, with probability at least 1 −32 exp(−ε2δm), there exists ∆∈Sm +, ∆̸= 0 such that X(∆) = 0. Proposition 1 implies that if the number of measurements drops below 1/2 of the ambient dimension δm, estimating Σ∗based on (7) becomes ill-posed; the estimation error ∥bΣ −Σ∗∥1 is unbounded, irrespective of the rank of Σ∗. Geometrically, the consequence of Proposition 1 is that the convex cone CX = {z ∈Rn : z = X(∆), ∆∈Sm +} contains 0. Unless 0 is contained in the boundary of CX (we conjecture that this event has measure zero), this means that CX = Rn, i.e. the spd constraint becomes vacuous. 3 2.2 Slow Rate Bound on the Prediction Error We present a positive result on the spd-constrained least squares estimator bΣ under an additional condition on the sampling operator X. Specifically, the prediction error will be bounded as 1 n∥X(Σ∗) −X(bΣ)∥2 2 = O(λ0∥Σ∗∥1 + λ2 0), where λ0 = 1 n∥X ∗(ε)∥∞, (12) with λ0 typically being of the order O( p m/n) (up to log factors). The rate in (12) can be a significant improvement of what is achieved by bΣols if ∥Σ∗∥1 = tr(Σ∗) is small. If λ0 = o(∥Σ∗∥1) that rate coincides with those of the nuclear norm regularized estimators (10), (11) with regularization parameter λ ≥λ0, cf. Theorem 1 in [19]. For nuclear norm regularized estimators, the rate O(λ0∥Σ∗∥1) is achieved for any choice of X and is slow in the sense that the squared prediction error only decays at the rate n−1/2 instead of n−1. Condition on X. In order to arrive at a suitable condition to be imposed on X so that (12) can be achieved, it makes sense to re-consider the negative example of Proposition 1, which states that as long as n is bounded away from δm/2 from above, there is a non-trivial ∆∈Sm + such that X(∆) = 0. Equivalently, dist(PX , 0) = min∆∈S+ 1 (m)∥X(∆)∥2 = 0, where PX := {z ∈Rn : z = X(∆), ∆∈S+ 1 (m)}, and S+ 1 (m) := {∆∈Sm + : tr(∆) = 1}. In this situation, it is impossible to derive a non-trivial bound on the prediction error as dist(PX , 0) = 0 may imply CX = Rn so that ∥X(Σ∗) −X(bΣ)∥2 2 = ∥ε∥2 2. To rule this out, the condition dist(PX , 0) > 0 is natural. More strongly, one may ask for the following: There exists a constant τ > 0 such that τ2 0 (X) := min ∆∈S+ 1 (m) 1 n∥X(∆)∥2 2 ≥τ 2. (13) An analogous condition is sufficient for a slow rate bound in the vector case, cf. [21]. However, the condition for the slow rate bound in Theorem 1 below is somewhat stronger than (13). Condition 1. There exist constants R∗> 1, τ∗> 0 s.t. τ 2(X, R∗) ≥τ 2 ∗, where for R ∈R τ 2(X, R) = dist2(RPX, PX )/n = min A∈RS+ 1 (m) B∈S+ 1 (m) 1 n∥X(A) −X(B)∥2 2. The following condition is sufficient for Condition 1 and in some cases much easier to check. Proposition 2. Suppose there exists a ∈Rn, ∥a∥2 ≤1, and constants 0 < φmin ≤φmax s.t. λmin(n−1/2X ∗(a)) ≥φmin, and λmax(n−1/2X ∗(a)) ≤φmax. Then for any ζ > 1, X satisfies Condition 1 with R∗= ζ(φmax/φmin) and τ2 ∗= (ζ −1)2φ2 max. The condition of Proposition 2 can be phrased as having a positive definite matrix in the image of the unit ball under X ∗, which, after scaling by 1/√n, has its smallest eigenvalue bounded away from zero and a bounded condition number. As a simple example, suppose that X1 = √nI. Invoking Proposition 2 with a = (1, 0, . . . , 0)⊤and ζ = 2, we find that Condition 1 is satisfied with R∗= 2 and τ 2 ∗= 1. A more interesting example is random design where the {Xi}n i=1 are (sample) covariance matrices, where the underlying random vectors satisfy appropriate tail or moment conditions. Corollary 1. Let πm be a probability distribution on Rm with second moment matrix Γ := Ez∼πm[zz⊤] satisfying λmin(Γ) > 0. Consider the random matrix ensemble M(πm, q) = n 1 q Pq k=1 zkz⊤ k , {zk}q k=1 i.i.d. ∼πm o . (14) Suppose that {Xi}n i=1 i.i.d. ∼M(πm, q) and let bΓn := 1 n Pn i=1 Xi and 0 < ǫn < λmin(Γ). Under the event {∥Γ −bΓn∥∞≤ǫn}, X satisfies Condition 1 with R∗= 2(λmax(Γ) + ǫn) λmin(Γ) −ǫn and τ 2 ∗= (λmax(Γ) + ǫn)2. 4 It is instructive to spell out Corollary 1 with πm as the standard Gaussian distribution on Rm. The matrix bΓn equals the sample covariance matrix computed from N = n · q samples. It is well-known [9] that for m, N large, λmax(bΓn) and λmin(bΓn) concentrate sharply around (1+ηn)2 and (1−ηn)2, respectively, where ηn = p m/N. Hence, for any γ > 0, there exists Cγ > 1 so that if N ≥Cγm, it holds that R∗≤2 + γ. Similar though weaker concentration results for ∥Γ −bΓn∥∞exist for the broader class of distributions πm with finite fourth moments [26]. Specialized to q = 1, Corollary 1 yields a statement about X made up from random rank-one measurements Xi = ziz⊤ i , i = 1, . . . , n, cf. (3). The preceding discussion indicates that Condition 1 tends to be satisfied in this case. Theorem 1. Suppose that model (6) holds with X satisfying Condition 1 with constants R∗and τ 2 ∗. We then have 1 n∥X(Σ∗) −X(bΣ)∥2 2 ≤max ( 2(1 + R∗)λ0∥Σ∗∥1, 2λ0∥Σ∗∥1 + 8 λ0 R∗ τ∗ 2) where, for any µ ≥0, with probability at least 1 −(2m)−µ λ0 ≤σ q (1 + µ)2 log(2m) V 2 n n , where V 2 n =
1 n Pn i=1 X2 i
∞. Remark: Under the scalings R∗= O(1) and τ 2 ∗= Ω(1), the bound of Theorem 1 is of the order O(λ0∥Σ∗∥1 + λ2 0) as announced at the beginning of this section. For given X, the quantity τ 2(X, R) can be evaluated by solving a least squares problem with spd constraints. Hence it is feasible to check in practice whether Condition 1 holds. For later reference, we evaluate the term V 2 n for M(πm, q) with πm as standard Gaussian distribution. As shown in the supplement, with high probability, V 2 n = O(m log n) holds as long as m = O(nq). 2.3 Bound on the Estimation Error In the previous subsection, we did not make any assumptions about Σ∗apart from Σ∗∈Sm +. Henceforth, we suppose that Σ∗is of low rank 1 ≤r ≪m and study the performance of the constrained least squares estimator (7) for prediction and estimation in such setting. Preliminaries. Let Σ∗= UΛU ⊤be the eigenvalue decomposition of Σ∗, where U = U∥ U⊥ m × r m × (m −r) Λr 0r×(m−r) 0(m−r)×r 0(m−r)×(m−r) where Λr is diagonal with positive diagonal entries. Consider the linear subspace T⊥= {M ∈Sm : M = U⊥AU ⊤ ⊥, A ∈Sm−r}. From U ⊤ ⊥Σ∗U⊥= 0, it follows that Σ∗is contained in the orthogonal complement T = {M ∈Sm : M = U∥B + B⊤U ⊤ ∥, B ∈Rr×m}, of dimension mr −r(r −1)/2 ≪δm if r ≪m. The image of T under X is denoted by T . Conditions on X. We introduce the key quantities the bound in this subsection depends on. Separability constant. τ 2(T) = 1 ndist2 (T , PX ) , PX := {z ∈Rn : z = X(∆), ∆∈T⊥∩S+ 1 (m)} = min Θ∈T, Λ∈S+ 1 (m)∩T⊥ 1 n∥X(Θ) −X(Λ)∥2 2 Restricted eigenvalue. φ2(T) = min 0̸=∆∈T ∥X(∆)∥2 2/n ∥∆∥2 1 . As indicated by the following statement concerning the noiseless case, for bounding ∥bΣ −Σ∗∥, it is inevitable to have lower bounds on the above two quantities. 5 Proposition 3. Consider the trace regression model (1) with εi = 0, i = 1, . . . , n. Then argmin Σ∈Sm + 1 2n∥X(Σ∗) −X(Σ)∥2 2 = {Σ∗} for all Σ∗∈T ∩Sm + if and only if it holds that τ 2(T) > 0 and φ2(T) > 0. Correlation constant. Moreover, we use of the following the quantity. It is not clear to us if it is intrinsically required, or if its appearance in our bound is for merely technical reasons. µ(T) = max 1 n ⟨X(∆), X(∆′)⟩: ∥∆∥1 ≤1, ∆∈T, ∆′ ∈S+ 1 (m) ∩T⊥ . We are now in position to provide a bound on ∥bΣ −Σ∗∥1. Theorem 2. Suppose that model (6) holds with Σ∗as considered throughout this subsection and let λ0 be defined as in Theorem 1. We then have ∥bΣ −Σ∗∥1 ≤max ( 8λ0 µ(T) τ 2(T)φ2(T) 3 2 + µ(T) φ2(T) + 4λ0 1 φ2(T) + 1 τ 2(T) , 8λ0 φ2(T) 1 + µ(T) φ2(T) , 8λ0 τ 2(T) ) . Remark. Given Theorem 2 an improved bound on the prediction error scaling with λ2 0 in place of λ0 can be derived, cf. (26) in Appendix D. The quality of the bound of Theorem 2 depends on how the quantities τ 2(T), φ2(T) and µ(T) scale with n, m and r, which is design-dependent. Accordingly, the estimation error in nuclear norm can be non-finite in the worst case and O(λ0r) in the best case, which matches existing bounds for nuclear norm regularization (cf. Theorem 2 in [19]). • The quantity τ 2(T) is specific to the geometry of the constrained least squares problem (7) and hence of critical importance. For instance, it follows from Proposition 1 that for standard Gaussian measurements, τ 2(T) = 0 with high probability once n < δm/2. The situation can be much better for random spd measurements (14) as exemplified for measurements Xi = ziz⊤ i with zi i.i.d. ∼N(0, I) in Appendix H. Specifically, it turns out that τ 2(T) = Ω(1/r) as long as n = Ω(m · r). • It is not restrictive to assume φ2(T) is positive. Indeed, without that assumption, even an oracle estimator based on knowledge of the subspace T would fail. Reasonable sampling operators X have rank min{n, δm} so that the nullspace of X only has a trivial intersection with the subspace T as long as n ≥dim(T) = mr −r(r −1)/2. • For fixed T, computing µ(T) entails solving a biconvex (albeit non-convex) optimization problem in ∆∈T and ∆′ ∈S+ 1 (m)∩T⊥. Block coordinate descent is a practical approach to such optimization problems for which a globally optimal solution is out of reach. In this manner we explore the scaling of µ(T) numerically as done for τ2(T). We find that µ(T) = O(δm/n) so that µ(T) = O(1) apart from the regime n/δm →0, without ruling out the possibility of undersampling, i.e. n < δm. 3 Numerical Results In this section, we empirically study properties of the estimator bΣ. In particular, its performance relative to regularization-based methods is explored. We also present an application to spiked covariance estimation for the CBCL face image data set and stock prices from NASDAQ. Comparison with regularization-based approaches. We here empirically evaluate ∥bΣ −Σ∗∥1 relative to well-known regularization-based methods. Setup. We consider rank-one Wishart measurement matrices Xi = ziz⊤ i , zi i.i.d. ∼N(0, I), i = 1, . . . , n, fix m = 50 and let n ∈{0.24, 0.26, . . ., 0.36, 0.4, . . ., 0.56} · m2 and r ∈{1, 2, . . ., 10} vary. Each configuration of (n, r) is run with 50 replications. In each of these, we generate data yi = tr(XiΣ∗) + σεi, σ = 0.1, i = 1, . . . , n, (15) where Σ∗is generated randomly as rank r Wishart matrices and the {εi}n i=1 are i.i.d. N(0, 1). 6 600 700 800 900 1000 1100 1200 1300 1400 0.03 0.04 0.05 0.06 0.07 0.08 0.09 n r: 1 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle 600 700 800 900 1000 1100 1200 1300 1400 0.06 0.08 0.1 0.12 0.14 0.16 n r: 2 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle 600 700 800 900 1000 1100 1200 1300 1400 0.15 0.2 0.25 0.3 0.35 n r: 4 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle 600 700 800 900 1000 1100 1200 1300 1400 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 n r: 6 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle 700 800 900 1000 1100 1200 1300 1400 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 n r: 8 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle 800 900 1000 1100 1200 1300 1400 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 n r: 10 |Sigma − Sigma*|1 constrained LS regularized LS # regularized LS Chen et al. # Chen et al. oracle Figure 1: Average estimation error (over 50 replications) in nuclear norm for fixed m = 50 and certain choices of n and r. In the legend, “LS” is used as a shortcut for “least squares”. Chen et al. refers to (16). “#”indicates an oracular choice of the tuning parameter. “oracle” refers to the ideal error σr p m/n. Best seen in color. Regularization-based approaches. We compare bΣ to the corresponding nuclear norm regularized estimator in (11). Regarding the choice of the regularization parameter λ, we consider the grid λ∗· {0.01, 0.05, 0.1, 0.3, 0.5, 1, 2, 4, 8, 16}, where λ∗= σ p m/n as recommended in [17] and pick λ so that the prediction error on a separate validation data set of size n generated from (15) is minimized. Note that in general, neither σ is known nor an extra validation data set is available. Our goal here is to ensure that the regularization parameter is properly tuned. In addition, we consider an oracular choice of λ where λ is picked from the above grid such that the performance measure of interest (the distance to the target in the nuclear norm) is minimized. We also compare to the constrained nuclear norm minimization approach of [8]: min Σ tr(Σ) subject to Σ ⪰0, and ∥y −X(Σ)∥1 ≤λ. (16) For λ, we consider the grid nσ p 2/π · {0.2, 0.3, . . ., 1, 1.25}. This specific choice is motivated by the fact that E[∥y −X(Σ∗)∥1] = E[∥ε∥1] = nσ p 2/π. Apart from that, tuning of λ is performed as for the nuclear norm regularized estimator. In addition, we have assessed the performance of the approach in [3], which does not impose an spd constraint but adds another constraint to (16). That additional constraint significantly complicates optimization and yields a second tuning parameter. Thus, instead of doing a 2D-grid search, we use fixed values given in [3] for known σ. The results are similar or worse than those of (16) (note in particular that positive semidefiniteness is not taken advantage of in [3]) and are hence not reported. Discussion of the results. We conclude from Figure 1 that in most cases, the performance of the constrained least squares estimator does not differ much from that of the regularization-based methods with careful tuning. For larger values of r, the constrained least squares estimator seems to require slightly more measurements to achieve competitive performance. Real Data Examples. We now present an application to recovery of spiked covariance matrices which are of the form Σ∗= Pr j=1 λjuju⊤ j + σ2I, where r ≪m and λj ≫σ2 > 0, j = 1, . . . , r. This model appears frequently in connection with principal components analysis (PCA). Extension to the spiked case. So far, we have assumed that Σ∗is of low rank, but it is straightforward to extend the proposed approach to the case in which Σ∗is spiked as long as σ2 is known or an estimate is available. A constrained least squares estimator of Σ∗takes the form bΣ + σ2I, where bΣ ∈argmin Σ∈Sm + 1 2n∥y −X(Σ + σ2I)∥2 2. (17) The case of σ2 unknown or general (unknown) diagonal perturbation is left for future research. 7 0 2 4 6 8 10 12 −1.4 −1.2 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 n / (m * r) log10(|Sigma − Sigma*|F) β = 1 (all samples) β = 0.4 β = 0.08 β = 0.008 β = 1/N (1 sample) oracle CBCL 0 1 2 3 4 5 6 −0.5 0 0.5 1 1.5 2 n / (m * r) log10(|Sigma − Sigma*|F) β = 1 (all samples) β = 0.4 β = 0.08 β = 0.008 β = 1/N (1 sample) oracle NASDAQ Figure 2: Average reconstruction errors log10∥bΣ −Σ∗∥F in dependence of n/(mr) and the parameter β. “oracle” refers to the best rank r-approximation Σr. Data sets. (i) The CBCL facial image data set [1] consist of N = 2429 images of 19 × 19 pixels (i.e., m = 361). We take Σ∗as the sample covariance matrix of this data set. It turns out that Σ∗can be well approximated by Σr, r = 50, where Σr is the best rank r approximation to Σ∗ obtained from computing its eigendecomposition and setting to zero all but the top r eigenvalues. (ii) We construct a second data set from the daily end prices of m = 252 stocks from the technology sector in NASDAQ, starting from the beginning of the year 2000 to the end of the year 2014 (in total N = 3773 days, retrieved from finance.yahoo.com). We take Σ∗as the resulting sample correlation matrix and choose r = 100. Experimental setup. As in preceding measurements, we consider n random Wishart measurements for the operator X, where n = C(mr), where C ranges from 0.25 to 12. Since ∥Σr −Σ∗∥F/∥Σ∗∥F ≈10−3 for both data sets, we work with σ2 = 0 in (17) for simplicity. To make recovery of Σ∗more difficult, we make the problem noisy by using observations yi = tr(XiSi), i = 1, . . . , n, (18) where Si is an approximation to Σ∗obtained from the sample covariance respectively sample correlation matrix of βN data points randomly sampled with replacement from the entire data set, i = 1, . . . , n, where β ranges from 0.4 to 1/N (Si is computed from a single data point). For each choice of n and β, the reported results are averages over 20 replications. Results. For the CBCL data set, as shown in Figure 2, bΣ accurately approximates Σ∗once the number of measurements crosses 2mr. Performance degrades once additional noise is introduced to the problem by using measurements (18). Even under significant perturbations (β = 0.08), reasonable reconstruction of Σ∗remains possible, albeit the number of required measurements increases accordingly. In the extreme case β = 1/N, the error is still decreasing with n, but millions of samples seems to be required to achieve reasonable reconstruction error. The general picture is similar for the NASDAQ data set, but the difference between using measurements based on the full sample correlation matrix on the one hand and approximations based on random subsampling (18) on the other hand are more pronounced. 4 Conclusion We have investigated trace regression in the situation that the underlying matrix is symmetric positive semidefinite. Under restrictions on the design, constrained least squares enjoys similar statistical properties as methods employing nuclear norm regularization. This may come as a surprise, as regularization is widely regarded as necessary in small sample settings. Acknowledgments The work of Martin Slawski and Ping Li is partially supported by NSF-DMS-1444124, NSF-III1360971, ONR-N00014-13-1-0764, and AFOSR-FA9550-13-1-0137. 8 References [1] CBCL face dataset. http://cbcl.mit.edu/software-datasets/FaceData2.html. [2] D. Amelunxen, M. Lotz, M. McCoy, and J. Tropp. Living on the edge: phase transitions in convex programs with random data. Information and Inference, 3:224–294, 2014. [3] T. Cai and A. Zhang. ROP: Matrix recovery via rank-one projections. The Annals of Statistics, 43:102– 138, 2015. [4] E. Candes and X. Li. Solving quadratic equations via PhaseLift when there are about as many equations as unknowns. Foundation of Computational Mathematics, 14:1017–1026, 2014. [5] E. Candes and Y. Plan. Tight oracle bounds for low-rank matrix recovery from a minimal number of noisy measurements. IEEE Transactions on Information Theory, 57:2342–2359, 2011. [6] E. Candes and B. Recht. Exact matrix completion via convex optimization. Foundation of Computational Mathematics, 9:2053–2080, 2009. [7] E. Candes, T. Strohmer, and V. Voroninski. PhaseLift: exact and stable signal recovery from magnitude measurements via convex programming. Communications on Pure and Applied Mathematics, 66:1241– 1274, 2012. [8] Y. Chen, Y. Chi, and A. Goldsmith. Exact and Stable Covariance Estimation from Quadratic Sampling via Convex Programming. IEEE Transactions on Information Theory, 61:4034–4059, 2015. [9] K. Davidson and S. Szarek. Handbook of the Geometry of Banach Spaces, volume 1, chapter Local operator theory, random matrices and Banach spaces, pages 317–366. 2001. [10] L. Demanet and P. Hand. Stable optimizationless recovery from phaseless measurements. Journal of Fourier Analysis and its Applications, 20:199–221, 2014. [11] D. Gross, Y.-K. Liu, S. Flammia, S. Becker, and J. Eisert. Quantum State Tomography via Compressed Sensing. Physical Review Letters, 105:150401–15404, 2010. [12] R. Horn and C. Johnson. Matrix Analysis. Cambridge University Press, 1985. [13] M. Kabanva, R. Kueng, and H. Rauhut und U. Terstiege. Stable low rank matrix recovery via null space properties. arXiv:1507.07184, 2015. [14] M. Klibanov, P. Sacks, and A. Tikhonarov. The phase retrieval problem. Inverse Problems, 11:1–28, 1995. [15] V. Koltchinskii, K. Lounici, and A. Tsybakov. Nuclear-norm penalization and optimal rates for noisy low-rank matrix completion. The Annals of Statistics, 39:2302–2329, 2011. [16] N. Meinshausen. Sign-constrained least squares estimation for high-dimensional regression. The Electronic Journal of Statistics, 7:1607–1631, 2013. [17] S. Negahban and M. Wainwright. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. The Annals of Statistics, 39:1069–1097, 2011. [18] B. Recht, M. Fazel, and P. Parillo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Review, 52:471–501, 2010. [19] A. Rohde and A. Tsybakov. Estimation of high-dimensional low-rank matrices. The Annals of Statistics, 39:887–930, 2011. [20] B. Sch¨olkopf and A. Smola. Learning with kernels. MIT Press, Cambridge, Massachussets, 2002. [21] M. Slawski and M. Hein. Non-negative least squares for high-dimensional linear models: consistency and sparse recovery without regularization. The Electronic Journal of Statistics, 7:3004–3056, 2013. [22] M. Slawski, P. Li, and M. Hein. Regularization-free estimation in trace regression with positive semidefinite matrices. arXiv:1504.06305, 2015. [23] N. Srebro, J. Rennie, and T. Jaakola. Maximum margin matrix factorization. In Advances in Neural Information Processing Systems 17, pages 1329–1336, 2005. [24] R. Tibshirani. Regression shrinkage and variable selection via the lasso. Journal of the Royal Statistical Society Series B, 58:671–686, 1996. [25] J. Tropp. User-friendly tools for random matrices: An introduction. 2014. http://users.cms. caltech.edu/˜jtropp/. [26] R. Vershynin. How close is the sample covariance matrix to the actual covariance matrix ? Journal of Theoretical Probability, 153:405–419, 2012. [27] M. Wang, W. Xu, and A. Tang. A unique ’nonnegative’ solution to an underdetermined system: from vectors to matrices. IEEE Transactions on Signal Processing, 59:1007–1016, 2011. [28] C. Williams and M. Seeger. Using the Nystr¨om method to speed up kernel machines. In Advances in Neural Information Processing Systems 14, pages 682–688, 2001. 9 | 2015 | 223 |
5,729 | Learning visual biases from human imagination Carl Vondrick Hamed Pirsiavash† Aude Oliva Antonio Torralba Massachusetts Institute of Technology †University of Maryland, Baltimore County {vondrick,oliva,torralba}@mit.edu hpirsiav@umbc.edu Abstract Although the human visual system can recognize many concepts under challenging conditions, it still has some biases. In this paper, we investigate whether we can extract these biases and transfer them into a machine recognition system. We introduce a novel method that, inspired by well-known tools in human psychophysics, estimates the biases that the human visual system might use for recognition, but in computer vision feature spaces. Our experiments are surprising, and suggest that classifiers from the human visual system can be transferred into a machine with some success. Since these classifiers seem to capture favorable biases in the human visual system, we further present an SVM formulation that constrains the orientation of the SVM hyperplane to agree with the bias from human visual system. Our results suggest that transferring this human bias into machines may help object recognition systems generalize across datasets and perform better when very little training data is available. 1 Introduction Computer vision researchers often go through great lengths to remove dataset biases from their models [32, 20]. However, not all biases are adversarial. Even natural recognition systems, such as the human visual system, have biases. Some of the most well known human biases, for example, are the canonical perspective (prefer to see objects from a certain perspective) [26] and Gestalt laws of grouping (tendency to see objects in collections of parts) [11]. We hypothesize that biases in the human visual system can be beneficial for visual understanding. Since recognition is an underconstrained problem, the biases that the human visual system developed may provide useful priors for perception. In this paper, we develop a novel method to learn some biases from the human visual system and incorporate them into computer vision systems. We focus our approach on learning the biases that people may have for the appearance of objects. To illustrate our method, consider what may seem like an odd experiment. Suppose we sample i.i.d. white noise from a standard normal distribution, and treat it as a point in a visual feature space, e.g. CNN or HOG. What is the chance that this sample corresponds to visual features of a car image? Fig.1a visualizes some samples [35] and, as expected, we see noise. But, let us not stop there. We next generate one hundred fifty thousand points from the same distribution, and ask workers on Amazon Mechanical Turk to classify visualizations of each sample as a car or not. Fig.1c visualizes the average of visual features that workers believed were cars. Although our dataset consists of only white noise, a car emerges! Sampling noise may seem unusual to computer vision researchers, but a similar procedure, named classification images, has gained popularity in human psychophysics [2] for estimating an approximate template the human visual system internally uses for recognition [18, 4]. In the procedure, an observer looks at an image perturbed with random noise and indicates whether they perceive a target category. After a large number of trials, psychophysics researchers can apply basic statistics to extract an approximation of the internal template the observer used for recognition. Since the 1 White Noise CNN Features Template for Car Human Visual System Figure 1: Although all image patches on the left are just noise, when we show thousands of them to online workers and ask them to find ones that look like cars, a car emerges in the average, shown on the right. This noise-driven method is based on well known tools in human psychophysics that estimates the biases that the human visual system uses for recognition. We explore how to transfer these biases into a machine. procedure is done with noise, the estimated template reveals some of the cues that the human visual system used for discrimination. We propose to extend classification images to estimate biases from the human visual system. However, our approach makes two modifications. Firstly, we estimate the template in state-of-the-art computer vision feature spaces [8, 19], which allows us to incorporate these biases into learning algorithms in computer vision systems. To do this, we take advantage of algorithms that invert visual features back to images [35]. By estimating these biases in a feature space, we can learn biases for how humans may correspond mid-level features, such as shapes and colors, with objects. To our knowledge, we are the first to estimate classification images in vision feature spaces. Secondly, we want our template to be biased by the human visual system and not our choice of dataset. Unlike classification images, we do not perturb real images; instead our approach only uses visualizations of feature space noise to estimate the templates. We capitalize on the ability of people to discern visual objects from random noise in a systematic manner [16]. 2 Related Work Mental Images: Our methods build upon work to extract mental images from a user’s head for both general objects [15], faces [23], and scenes [17]. However, our work differs because we estimate mental images in state-of-the-art computer vision feature spaces, which allows us to integrate the mental images into a machine recognition system. Visual Biases: Our paper studies biases in the human visual system similar to [26, 11], but we wish to transfer these biases into a computer recognition system. We extend ideas [24] to use computer vision to analyze these biases. Our work is also closely related to dataset biases [32, 28], which motivates us to try to transfer favorable biases into recognition systems. Human-in-the-Loop: The idea to transfer biases from the human mind into object recognition is inspired by many recent works that puts a human in the computer vision loop [6, 27], trains recognition systems with active learning [33], and studies crowdsourcing [34, 31]. The primary difference of these approaches and our work is, rather than using crowds as a workforce, we want to extract biases from the worker’s visual systems. Feature Visualization: Our work explores a novel application of feature visualizations [36, 35, 22]. Rather than using feature visualizations to diagnose computer vision systems, we use them to inspect and learn biases in the human visual system. Transfer Learning: We also build upon methods in transfer learning to incorporate priors into learning algorithms. A common transfer learning method for SVMs is to change the regularization term ||w||2 2 to ||w −c||2 2 where c is the prior [29, 37]. However, this imposes a prior on both the norm and orientation of w. In our case, since the visual bias does not provide an additional prior on the norm, we present a SVM formulation that constrains only the orientation of w to be close to c. 2 (a) RGB (b) HOG (c) CNN Figure 2: We visualize white noise in RGB and feature spaces. To visualize white noise features, we use feature inversion algorithms [35]. White noise in feature space has correlations in image space that white noise in RGB does not. We capitalize on this structure to estimate visual biases in feature space without using real images. Our approach extends sign constraints on SVMs [12], but instead enforces orientation constraints. Our method enforces a hard orientation constraint, which builds on soft orientation constraints [3]. 3 Classification Images Review The procedure classification images is a popular method in human psychophysics that attempts to estimate the internal template that the human visual system might use for recognition of a category [18, 4]. We review classification images in this section as it is the inspiration for our method. The goal is to approximate the template ˜c ∈Rd that a human observer uses to discriminate between two classes A and B, e.g. male vs. female faces, or chair vs. not chair. Suppose we have intensity images a ∈A ⊆Rd and b ∈B ⊆Rd. If we sample white noise ϵ ∼N(0d, Id) and ask an observer to indicate the class label for a + ϵ, most of the time the observer will answer with the correct class label A. However, there is a chance that ϵ might manipulate a to cause the observer to mistakenly label a + ϵ as class B. The insight into classification images is that, if we perform a large number of trials, then we can estimate a decision function f(·) that discriminates between A and B, but makes the same mistakes as the observer. Since f(·) makes the same errors, it provides an estimate of the template that the observer internally used to discriminate A from B. By analyzing this model, we can then gain insight into how a visual system might recognize different categories. Since psychophysics researchers are interested in models that are interpretable, classification images are often linear approximations of the form f(x; ˜c) = ˜cT x. The template ˜c ∈Rd can be estimated in many ways, but the most common is a sum of the stimulus images: ˜c = (µAA + µBA) −(µAB + µBB) (1) where µXY is the average image where the true class is X and the observer predicted class Y . The template c is fairly intuitive: it will have large positive value on locations that the observer used to predict A, and large negative value for locations correlated with predicting B. Although classification images is simple, this procedure has led to insights in human perception. For example, [30] used classification images to study face processing strategies in the human visual system. For a complete analysis of classification images, we refer readers to review articles [25, 10]. 4 Estimating Human Biases in Feature Spaces Standard classification images is performed with perturbing real images with white noise. However, this approach may negatively bias the template by the choice of dataset. Instead, we are interested in estimating templates that capture biases in the human visual system and not datasets. We propose to estimate these templates by only sampling white noise (with no real images). Unfortunately, sampling just white noise in RGB is extremely unlikely to result in a natural image (see Fig.2a). To overcome this, we can estimate the templates in feature spaces [8, 19] used in computer vision. Feature spaces encode higher abstractions of images (such as gradients, shapes, or colors). While sampling white noise in feature space may still not lay on the manifold of natural images, it is more likely to capture statistics relevant for recognition. Since humans cannot directly interpret abstract feature spaces, we can use feature inversion algorithms [35, 36] to visualize them. Using these ideas, we first sample noise from a zero-mean, unit-covariance Gaussian distribution x ∼N(0d, Id). We then invert the noise feature x back to an image φ−1(x) where φ−1(·) is the 3 Car Television Person Bottle Fire Hydrant CNN HOG Figure 3: We visualize some biases estimated from trials by Mechanical Turk workers. feature inverse. By instructing people to indicate whether a visualization of noise is a target category or not, we can build a linear template c ∈Rd that approximates people’s internal templates: c = µA −µB (2) where µA ∈Rd is the average, in feature space, of white noise that workers incorrectly believe is the target object, and similarly µB ∈Rd is the average of noise that workers believe is noise. Eqn.2 is a special case of the original classification images Eqn.1 where the background class B is white noise and the positive class A is empty. Instead, we rely on humans to hallucinate objects in noise to form µA. Since we build these biases with only white Gaussian noise and no real images, our approach may be robust to many issues in dataset bias [32]. Instead, templates from our method can inherit the biases for the appearances of objects present in the human visual system, which we suspect provides advantageous signals about the visual world. In order to estimate c from noise, we need to perform many trials, which we can conduct effectively on Amazon Mechanical Turk [31]. We sampled 150, 000 points from a standard normal multivariate distribution, and inverted each sample with the feature inversion algorithm from HOGgles [35]. We then instructed workers to indicate whether they see the target category or not in the visualization. Since we found that the interpretation of noise visualizations depends on the scale, we show the worker three different scales. We paid workers 10¢ to label 100 images, and workers often collectively solved the entire batch in a few hours. In order to assure quality, we occasionally gave workers an easy example to which we knew the answer, and only retained work from workers who performed well above chance. We only used the easy examples to qualify workers, and discarded them when computing the final template. 5 Visualizing Biases Although subjects are classifying zero-mean, identity covariance white Gaussian noise with no real images, objects can emerge after many trials. To show this, we performed experiments with both HOG [8] and the last convolutional layer (pool5) of a convolutional neural network (CNN) trained on ImageNet [19, 9] for several common object categories. We visualize some of the templates from our method in Fig.3. Although the templates are blurred, they seem to show significant detail about the object. For example, in the car template, we can clearly see a vehicle-like object in the center sitting on top of a dark road and lighter sky. The television template resembles a rectangular structure, and the fire hydrant templates reveals a red hydrant with two arms on the side. The templates seem to contain the canonical perspective of objects [26], but also extends them with color and shape biases. In these visualizations, we have assumed that all workers on Mechanical Turk share the same appearance bias of objects. However, this assumption is not necessarily true. To examine this, we instructed workers on Mechanical Turk to find “sport balls” in CNN noise, and clustered workers by their geographic location. Fig.4 shows the templates for both India and the United States. Even 4 (a) India (b) United States Figure 4: We grouped users by their geographic location (US or India) and instructed each group to classify CNN noise as a sports ball or not, which allows us to see how biases can vary by culture. Indians seem to imagine a red ball, which is the standard color for a cricket ball and the predominant sport in India. Americans seem to imagine a brown or orange ball, which could be an American football or basketball, both popular sports in the U.S. though both sets of workers were labeling noise from the same distribution, Indian workers seemed to imagine red balls, while American workers tended to imagine orange/brown balls. Remarkably, the most popular sport in India is cricket, which is played with a red ball, and popular sports in the United States are American football and basketball, which are played with brown/orange balls. We conjecture that Americans and Indians may have different mental images of sports balls in their head and the color is influenced by popular sports in their country. This effect is likely attributed to phenomena in social psychology where human perception can be influenced by culture [7, 5]. Since environment plays a role in the development of the human vision system, people from different cultures likely develop slightly different images inside their head. 6 Leveraging Humans Biases for Recognition If the biases we learn are beneficial for recognition, then we would expect them to perform above chance at recognizing objects in real images. To evaluate this, we use the visual biases c directly as a classifier for object recognition. We quantify their performance on object classification in realworld images using the PASCAL VOC 2011 dataset [13], evaluating against the validation set. Since PASCAL VOC does not have a fire hydrant category, we downloaded 63 images from Flickr with fire hydrants and added them to the validation set. We report performance as the average precision on a precision-recall curve. The results in Fig.5 suggest that biases from the human visual system do capture some signals useful for classifying objects in real images. Although the classifiers are estimated using only white noise, in most cases the templates are significantly outperforming chance, suggesting that biases from the human visual system may be beneficial computationally. Our results suggest that shape is an important bias to discriminate objects in CNN feature space. Notice how the top classifications in Fig.6 tend to share the same rough shape by category. For example, the classifier for person finds people that are upright, and the television classifier fires on rectangular shapes. The confusions are quantified Fig.7: bottles are often confused as people, and cars are confused as buses. Moreover, some templates appear to rely on color as well. Fig.6 suggests that the classifier for fire-hydrant correctly favors red objects, which is evidenced by it frequently firing on people wearing red clothes. The bottle classifier seems to be incorrectly biased towards blue objects, which contributes to its poor performance. person car bottle tv firehydrant 0 20 40 60 80 AP HOG CNN Chance car person f-hydrant bottle tv HOG 22.9 45.5 0.8 15.9 27.0 CNN 27.5 65.6 5.9 6.0 23.8 Chance 7.3 32.3 0.3 4.5 2.6 Figure 5: We show the average precision (AP) for object classification on PASCAL VOC 2011 using templates estimated with noise. Even though the template is created without a dataset, it performs significantly above chance. 5 Car Person Television Bottle Fire Hydrant Figure 6: We show some of the top classifications from the human biases estimated with CNN features. Note that real data is not used in building these models. 0 0.1 0.2 0.3 0.4 horse diningtable motorbike sofa tvmonitor boat train bus aeroplane car Predicted Category Probability of Retrieval car 0 0.1 0.2 0.3 0.4 diningtable sofa chair boat train aeroplane person bus car tvmonitor Predicted Category Probability of Retrieval tvmonitor 0 0.2 0.4 0.6 0.8 tvmonitor bird car chair motorbike cat dog firehydrant bottle person Predicted Category Probability of Retrieval firehydrant Figure 7: We plot the class confusions for some human biases on top classifications with CNN features. We show only the top 10 classes for visualization. Notice that many of the confusions may be sensible, e.g. the classifier for car tends to retrieve vehicles, and the fire hydrant classifier commonly mistakes people and bottles. While the motivation of this experiment has been to study whether human biases are favorable for recognition, our approach has some applications. Although templates estimated from white noise will likely never be a substitute for massive labeled datasets, our approach can be helpful for recognizing objects when no training data is available. Rather, our approach enables us to build classifiers for categories that a person has only imagined and never seen. In our experiments, we evaluated on common categories to make evaluation simpler, but in principle our approach can work for rare categories as well. We also wish to note that the CNN features used here are trained to classify images on ImageNet [9] LSVRC 2012, and hence had access to data. However, we showed competitive results for HOG as well, which is a hand-crafted feature, as well as results for a category that the CNN network did not see during training (fire hydrants). 7 Learning with Human Biases Our experiments to visualize the templates and use them as object recognition systems suggest that visual biases from the human visual system provide some signals that are useful for discriminating objects in real world images. In this section, we investigate how to incorporate these signals into learning algorithms when there is some training data available. We present an SVM that constrains the separating hyperplane to have an orientation similar to the human bias we estimated. 7.1 SVM with Orientation Constraints Let xi ∈Rm be a training point and yi ∈{−1, 1} be its label for 1 ≤i ≤n. A standard SVM seeks a separating hyperplane w ∈ Rm with a bias b ∈ R that maximizes the margin between positive and negative examples. We wish to add the constraint that the SVM hyperplane w must be at most cos−1(θ) degrees away from the bias template c: 6 c w cos-1(θ) Figure 8 min w,b,ξ λ 2 wT w + n X i=1 ξi s.t. yi wT xi + b ≥1 −ξi, ξi ≥0 (3a) θ ≤ wT c √ wT w (3b) where ξi ∈R are the slack variables, λ is the regularization hyperparameter, and Eqn.3b is the orientation prior such that θ ∈(0, 1] bounds the maximum angle that the w is allowed to deviate from c. Note that we have assumed, without loss of generality, that ||c||2 = 1. Fig.8 shows a visualization of this orientation constraint. The feasible space for the solution is the grayed hypercone. The SVM solution w is not allowed to deviate from the prior classifier c by more than cos−1(θ) degrees. 7.2 Optimization We optimize Eqn.3 efficiently by writing the objective as a conic program. We rewrite Eqn.3b as √ wT w ≤ wT c θ and introduce an auxiliary variable α ∈R such that √ wT w ≤α ≤ wT c θ . Substituting these constraints into Eqn.3 and replacing the SVM regularization term with λ 2 α2 leads to the conic program: min w,b,ξ,α λ 2 α2 + n X i=1 ξi s.t. yi wT xi + b ≥1 −ξi, ξi ≥0, √ wT w ≤α (4a) α ≤wT c θ (4b) Since at the minimum a2 = wT w, Eqn.4 is equivalent to Eqn.3, but in a standard conic program form. As conic programs are convex by construction, we can then optimize it efficiently using offthe-shelf solvers, which we use MOSEK [1]. Note that removing Eqn.4b makes it equivalent to the standard SVM. cos−1(θ) specifies the angle of the cone. In our experiments, we found 30◦to be reasonable. While this angle is not very restrictive in low dimensions, it becomes much more restrictive as the number of dimensions increases [21]. 7.3 Experiments We previously used the bias template as a classifier for recognizing objects when there is no training data available. However, in some cases, there may be a few real examples available for learning. We can incorporate the bias template into learning using an SVM with orientation constraints. Using the same evaluation procedure as the previous section, we compare three approaches: 1) a single SVM trained with only a few positives and the entire negative set, 2) the same SVM with orientation priors for cos(θ) = 30◦on the human bias, and 3) the human bias alone. We then follow the same experimental setup as before. We show full results for the SVM with orientation priors in Fig.9. In general, biases from the human visual system can assist the SVM when the amount of positive training data is only a few examples. In these low data regimes, acquiring classifiers from the human visual system can improve performance with a margin, sometimes 10% AP. Furthermore, standard computer vision datasets often suffer from dataset biases that harm cross dataset generalization performance [32, 28]. Since the template we estimate is biased by the human visual system and not datasets (there is no dataset), we believe our approach may help cross dataset generalization. We trained an SVM classifier with CNN features to recognize cars on Caltech 101 [14], but we tested it on object classification with PASCAL VOC 2011. Fig.10a suggest that, by constraining the SVM to be close to the human bias for car, we are able to improve the generalization performance of our classifiers, sometimes over 5% AP. We then tried the reverse experiment in Fig.10b: we trained on PASCAL VOC 2011, but tested on Caltech 101. While PASCAL VOC provides a much better sample of the visual world, the orientation priors still help generalization performance when there is little training data available. These results suggest that incorporating the biases from the human visual system may help alleviate some dataset bias issues in computer vision. 7 0 positives 1 positive 5 positives Category Chance Human SVM SVM+Human SVM SVM+Human car 7.3 27.5 11.6 29.0 37.8 43.5 person 32.3 65.6 55.2 69.3 70.1 73.7 f-hydrant 0.3 5.9 1.7 7.0 50.1 50.1 bottle 4.5 6.0 11.2 11.7 38.1 38.7 tv 2.6 23.8 38.6 43.1 66.7 68.8 Figure 9: We show AP for the SVM with orientation priors for object classification on PASCAL VOC 2011 for varying amount of positive data with CNN features. All results are means over random subsamples of the training sets. SVM+Hum refers to SVM with the human bias as an orientation prior. SVM 0.2 0.4 0.6 0.8 C 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 θ AP Car Classification (CNN, train on Caltech 101, test on PASCAL) SVM+C #pos=1 SVM+C #pos=5 SVM+C #pos=62 C only (a) Train on Caltech 101, Test on PASCAL SVM 0.2 0.4 0.6 0.8 C 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 θ AP Car Classification (CNN, train on PASCAL, test on Caltech 101) SVM+C #pos=1 SVM+C #pos=5 SVM+C #pos=1152 C only (b) Train on PASCAL, Test on Caltech 101 Figure 10: Since bias from humans is estimated with only noise, it tends to be biased towards the human visual system instead of datasets. (a) We train an SVM to classify cars on Caltech 101 that is constrained towards the bias template, and evaluate it on PASCAL VOC 2011. For every training set size, constraining the SVM to the human bias with θ ≈0.75 is able to improve generalization performance. (b) We train a constrained SVM on PASCAL VOC 2011 and test on Caltech 101. For low data regimes, the human bias may help boost performance. 8 Conclusion Since the human visual system is one of the best recognition systems, we hypothesize that its biases may be useful for visual understanding. In this paper, we presented a novel method to estimate some biases that people have for the appearance of objects. By estimating these biases in state-of-the-art computer vision feature spaces, we can transfer these templates into a machine, and leverage them computationally. Our experiments suggest biases from the human visual system may provide useful signals for computer vision systems, especially when little, if any, training data is available. Acknowledgements: We thank Aditya Khosla for important discussions, and Andrew Owens and Zoya Bylinskii for helpful comments. Funding for this research was partially supported by a Google PhD Fellowship to CV, and a Google research award and ONR MURI N000141010933 to AT. References [1] The MOSEK Optimization Software. http://mosek.com/. [2] A. Ahumada Jr. Perceptual classification images from vernier acuity masked by noise. 1996. [3] Y. Aytar and A. Zisserman. Tabula rasa: Model transfer for object category detection. In ICCV, 2011. [4] B. L. Beard and A. J. Ahumada Jr. A technique to extract relevant image features for visual tasks. In SPIE, 1998. [5] C. Blais, R. E. Jack, C. Scheepers, D. Fiset, and R. Caldara. Culture shapes how we look at faces. PLoS One, 2008. 8 [6] S. Branson, C. Wah, F. Schroff, B. Babenko, P. Welinder, P. Perona, and S. Belongie. Visual recognition with humans in the loop. 2010. [7] H. F. Chua, J. E. Boland, and R. E. Nisbett. Cultural variation in eye movements during scene perception. Proceedings of the National Academy of Sciences of the United States of America, 2005. [8] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. [9] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. [10] M. P. Eckstein and A. J. Ahumada. Classification images: A tool to analyze visual strategies. Journal of Vision, 2002. [11] W. D. Ellis. A source book of Gestalt psychology. Psychology Press, 1999. [12] A. Epshteyn and G. DeJong. Rotational prior knowledge for svms. In ECML. 2005. [13] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge. IJCV, 2010. [14] L. Fei-Fei, R. Fergus, and P. Perona. One-shot learning of object categories. PAMI, 2006. [15] M. Ferecatu and D. Geman. A statistical framework for image category search from a mental picture. PAMI, 2009. [16] F. Gosselin and P. G. Schyns. Superstitious perceptions reveal properties of internal representations. Psychological Science, 2003. [17] M. R. Greene, A. P. Botros, D. M. Beck, and L. Fei-Fei. Visual noise from natural scene statistics reveals human scene category representations. arXiv, 2014. [18] A. A. Jr and J. Lovell. Stimulus features in signal detection. The Journal of the Acoustical Society of America, 1971. [19] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [20] B. Kulis, K. Saenko, and T. Darrell. What you saw is not what you get: Domain adaptation using asymmetric kernel transforms. In CVPR, pages 1785–1792, 2011. [21] S. Li. Concise formulas for the area and volume of a hyperspherical cap. Asian Journal of Mathematics and Statistics, 2011. [22] A. Mahendran and A. Vedaldi. Understanding deep image representations by inverting them. CVPR, 2015. [23] M. C. Mangini and I. Biederman. Making the ineffable explicit: Estimating the information employed for face classifications. Cognitive Science, 2004. [24] E. Mezuman and Y. Weiss. Learning about canonical views from internet image collections. In NIPS, 2012. [25] R. F. Murray. Classification images: A review. Journal of Vision, 2011. [26] S. Palmer, E. Rosch, and P. Chase. Canonical perspective and the perception of objects. Attention and performance IX, 1981. [27] D. Parikh and C. Zitnick. Human-debugging of machines. In NIPS WCSSWC, 2011. [28] J. Ponce, T. L. Berg, M. Everingham, D. A. Forsyth, M. Hebert, S. Lazebnik, M. Marszalek, C. Schmid, B. C. Russell, A. Torralba, et al. Dataset issues in object recognition. In Toward category-level object recognition. 2006. [29] R. Salakhutdinov, A. Torralba, and J. Tenenbaum. Learning to share visual appearance for multiclass object detection. In CVPR, 2011. [30] A. B. Sekuler, C. M. Gaspar, J. M. Gold, and P. J. Bennett. Inversion leads to quantitative, not qualitative, changes in face processing. Current Biology, 2004. [31] A. Sorokin and D. Forsyth. Utility data annotation with amazon mechanical turk. In CVPR Workshops, 2008. [32] A. Torralba and A. Efros. Unbiased look at dataset bias. In CVPR. [33] S. Vijayanarasimhan and K. Grauman. Large-scale live active learning: Training object detectors with crawled data and crowds. In CVPR, 2011. [34] L. Von Ahn, R. Liu, and M. Blum. Peekaboom: a game for locating objects in images. In SIGCHI Human Factors, 2006. [35] C. Vondrick, A. Khosla, T. Malisiewicz, and A. Torralba. HOGgles: Visualizing Object Detection Features. ICCV, 2013. [36] P. Weinzaepfel, H. J´egou, and P. P´erez. Reconstructing an image from its local descriptors. In CVPR, 2011. [37] J. Yang, R. Yan, and A. G. Hauptmann. Adapting svm classifiers to data with shifted distributions. In ICDM Workshops, 2007. 9 | 2015 | 224 |
5,730 | End-To-End Memory Networks Sainbayar Sukhbaatar Dept. of Computer Science Courant Institute, New York University sainbar@cs.nyu.edu Arthur Szlam Jason Weston Rob Fergus Facebook AI Research New York {aszlam,jase,robfergus}@fb.com Abstract We introduce a neural network with a recurrent attention model over a possibly large external memory. The architecture is a form of Memory Network [23] but unlike the model in that work, it is trained end-to-end, and hence requires significantly less supervision during training, making it more generally applicable in realistic settings. It can also be seen as an extension of RNNsearch [2] to the case where multiple computational steps (hops) are performed per output symbol. The flexibility of the model allows us to apply it to tasks as diverse as (synthetic) question answering [22] and to language modeling. For the former our approach is competitive with Memory Networks, but with less supervision. For the latter, on the Penn TreeBank and Text8 datasets our approach demonstrates comparable performance to RNNs and LSTMs. In both cases we show that the key concept of multiple computational hops yields improved results. 1 Introduction Two grand challenges in artificial intelligence research have been to build models that can make multiple computational steps in the service of answering a question or completing a task, and models that can describe long term dependencies in sequential data. Recently there has been a resurgence in models of computation using explicit storage and a notion of attention [23, 8, 2]; manipulating such a storage offers an approach to both of these challenges. In [23, 8, 2], the storage is endowed with a continuous representation; reads from and writes to the storage, as well as other processing steps, are modeled by the actions of neural networks. In this work, we present a novel recurrent neural network (RNN) architecture where the recurrence reads from a possibly large external memory multiple times before outputting a symbol. Our model can be considered a continuous form of the Memory Network implemented in [23]. The model in that work was not easy to train via backpropagation, and required supervision at each layer of the network. The continuity of the model we present here means that it can be trained end-to-end from input-output pairs, and so is applicable to more tasks, i.e. tasks where such supervision is not available, such as in language modeling or realistically supervised question answering tasks. Our model can also be seen as a version of RNNsearch [2] with multiple computational steps (which we term “hops”) per output symbol. We will show experimentally that the multiple hops over the long-term memory are crucial to good performance of our model on these tasks, and that training the memory representation can be integrated in a scalable manner into our end-to-end neural network model. 2 Approach Our model takes a discrete set of inputs x1, ..., xn that are to be stored in the memory, a query q, and outputs an answer a. Each of the xi, q, and a contains symbols coming from a dictionary with V words. The model writes all x to the memory up to a fixed buffer size, and then finds a continuous representation for the x and q. The continuous representation is then processed via multiple hops to output a. This allows backpropagation of the error signal through multiple memory accesses back to the input during training. 1 2.1 Single Layer We start by describing our model in the single layer case, which implements a single memory hop operation. We then show it can be stacked to give multiple hops in memory. Input memory representation: Suppose we are given an input set x1, .., xi to be stored in memory. The entire set of {xi} are converted into memory vectors {mi} of dimension d computed by embedding each xi in a continuous space, in the simplest case, using an embedding matrix A (of size d×V ). The query q is also embedded (again, in the simplest case via another embedding matrix B with the same dimensions as A) to obtain an internal state u. In the embedding space, we compute the match between u and each memory mi by taking the inner product followed by a softmax: pi = Softmax(uT mi). (1) where Softmax(zi) = ezi/ P j ezj. Defined in this way p is a probability vector over the inputs. Output memory representation: Each xi has a corresponding output vector ci (given in the simplest case by another embedding matrix C). The response vector from the memory o is then a sum over the transformed inputs ci, weighted by the probability vector from the input: o = X i pici. (2) Because the function from input to output is smooth, we can easily compute gradients and backpropagate through it. Other recently proposed forms of memory or attention take this approach, notably Bahdanau et al. [2] and Graves et al. [8], see also [9]. Generating the final prediction: In the single layer case, the sum of the output vector o and the input embedding u is then passed through a final weight matrix W (of size V × d) and a softmax to produce the predicted label: ˆa = Softmax(W(o + u)) (3) The overall model is shown in Fig. 1(a). During training, all three embedding matrices A, B and C, as well as W are jointly learned by minimizing a standard cross-entropy loss between ˆa and the true label a. Training is performed using stochastic gradient descent (see Section 4.2 for more details). Question q Output Input Embedding B Embedding C Weights Softmax Weighted Sum pi ci mi Sentences {xi} Embedding A o W Softmax Predicted Answer a^ u u Inner Product Out3 In3 B Sentences W a^ {xi} o1 u1 o2 u2 o3 u3 A1 C1 A3 C3 A2 C2 Question q Out2 In2 Out1 In1 Predicted Answer (a) (b) Figure 1: (a): A single layer version of our model. (b): A three layer version of our model. In practice, we can constrain several of the embedding matrices to be the same (see Section 2.2). 2.2 Multiple Layers We now extend our model to handle K hop operations. The memory layers are stacked in the following way: • The input to layers above the first is the sum of the output ok and the input uk from layer k (different ways to combine ok and uk are proposed later): uk+1 = uk + ok. (4) 2 • Each layer has its own embedding matrices Ak, Ck, used to embed the inputs {xi}. However, as discussed below, they are constrained to ease training and reduce the number of parameters. • At the top of the network, the input to W also combines the input and the output of the top memory layer: ˆa = Softmax(WuK+1) = Softmax(W(oK + uK)). We explore two types of weight tying within the model: 1. Adjacent: the output embedding for one layer is the input embedding for the one above, i.e. Ak+1 = Ck. We also constrain (a) the answer prediction matrix to be the same as the final output embedding, i.e W T = CK, and (b) the question embedding to match the input embedding of the first layer, i.e. B = A1. 2. Layer-wise (RNN-like): the input and output embeddings are the same across different layers, i.e. A1 = A2 = ... = AK and C1 = C2 = ... = CK. We have found it useful to add a linear mapping H to the update of u between hops; that is, uk+1 = Huk + ok. This mapping is learnt along with the rest of the parameters and used throughout our experiments for layer-wise weight tying. A three-layer version of our memory model is shown in Fig. 1(b). Overall, it is similar to the Memory Network model in [23], except that the hard max operations within each layer have been replaced with a continuous weighting from the softmax. Note that if we use the layer-wise weight tying scheme, our model can be cast as a traditional RNN where we divide the outputs of the RNN into internal and external outputs. Emitting an internal output corresponds to considering a memory, and emitting an external output corresponds to predicting a label. From the RNN point of view, u in Fig. 1(b) and Eqn. 4 is a hidden state, and the model generates an internal output p (attention weights in Fig. 1(a)) using A. The model then ingests p using C, updates the hidden state, and so on1. Here, unlike a standard RNN, we explicitly condition on the outputs stored in memory during the K hops, and we keep these outputs soft, rather than sampling them. Thus our model makes several computational steps before producing an output meant to be seen by the “outside world”. 3 Related Work A number of recent efforts have explored ways to capture long-term structure within sequences using RNNs or LSTM-based models [4, 7, 12, 15, 10, 1]. The memory in these models is the state of the network, which is latent and inherently unstable over long timescales. The LSTM-based models address this through local memory cells which lock in the network state from the past. In practice, the performance gains over carefully trained RNNs are modest (see Mikolov et al. [15]). Our model differs from these in that it uses a global memory, with shared read and write functions. However, with layer-wise weight tying our model can be viewed as a form of RNN which only produces an output after a fixed number of time steps (corresponding to the number of hops), with the intermediary steps involving memory input/output operations that update the internal state. Some of the very early work on neural networks by Steinbuch and Piske[19] and Taylor [21] considered a memory that performed nearest-neighbor operations on stored input vectors and then fit parametric models to the retrieved sets. This has similarities to a single layer version of our model. Subsequent work in the 1990’s explored other types of memory [18, 5, 16]. For example, Das et al. [5] and Mozer et al. [16] introduced an explicit stack with push and pop operations which has been revisited recently by [11] in the context of an RNN model. Closely related to our model is the Neural Turing Machine of Graves et al. [8], which also uses a continuous memory representation. The NTM memory uses both content and address-based access, unlike ours which only explicitly allows the former, although the temporal features that we will introduce in Section 4.1 allow a kind of address-based access. However, in part because we always write each memory sequentially, our model is somewhat simpler, not requiring operations like sharpening. Furthermore, we apply our memory model to textual reasoning tasks, which qualitatively differ from the more abstract operations of sorting and recall tackled by the NTM. 1Note that in this view, the terminology of input and output from Fig. 1 is flipped - when viewed as a traditional RNN with this special conditioning of outputs, A becomes part of the output embedding of the RNN and C becomes the input embedding. 3 Our model is also related to Bahdanau et al. [2]. In that work, a bidirectional RNN based encoder and gated RNN based decoder were used for machine translation. The decoder uses an attention model that finds which hidden states from the encoding are most useful for outputting the next translated word; the attention model uses a small neural network that takes as input a concatenation of the current hidden state of the decoder and each of the encoders hidden states. A similar attention model is also used in Xu et al. [24] for generating image captions. Our “memory” is analogous to their attention mechanism, although [2] is only over a single sentence rather than many, as in our case. Furthermore, our model makes several hops on the memory before making an output; we will see below that this is important for good performance. There are also differences in the architecture of the small network used to score the memories compared to our scoring approach; we use a simple linear layer, whereas they use a more sophisticated gated architecture. We will apply our model to language modeling, an extensively studied task. Goodman [6] showed simple but effective approaches which combine n-grams with a cache. Bengio et al. [3] ignited interest in using neural network based models for the task, with RNNs [14] and LSTMs [10, 20] showing clear performance gains over traditional methods. Indeed, the current state-of-the-art is held by variants of these models, for example very large LSTMs with Dropout [25] or RNNs with diagonal constraints on the weight matrix [15]. With appropriate weight tying, our model can be regarded as a modified form of RNN, where the recurrence is indexed by memory lookups to the word sequence rather than indexed by the sequence itself. 4 Synthetic Question and Answering Experiments We perform experiments on the synthetic QA tasks defined in [22] (using version 1.1 of the dataset). A given QA task consists of a set of statements, followed by a question whose answer is typically a single word (in a few tasks, answers are a set of words). The answer is available to the model at training time, but must be predicted at test time. There are a total of 20 different types of tasks that probe different forms of reasoning and deduction. Here are samples of three of the tasks: Sam walks into the kitchen. Brian is a lion. Mary journeyed to the den. Sam picks up an apple. Julius is a lion. Mary went back to the kitchen. Sam walks into the bedroom. Julius is white. John journeyed to the bedroom. Sam drops the apple. Bernhard is green. Mary discarded the milk. Q: Where is the apple? Q: What color is Brian? Q: Where was the milk before the den? A. Bedroom A. White A. Hallway Note that for each question, only some subset of the statements contain information needed for the answer, and the others are essentially irrelevant distractors (e.g. the first sentence in the first example). In the Memory Networks of Weston et al. [22], this supporting subset was explicitly indicated to the model during training and the key difference between that work and this one is that this information is no longer provided. Hence, the model must deduce for itself at training and test time which sentences are relevant and which are not. Formally, for one of the 20 QA tasks, we are given example problems, each having a set of I sentences {xi} where I ≤320; a question sentence q and answer a. Let the jth word of sentence i be xij, represented by a one-hot vector of length V (where the vocabulary is of size V = 177, reflecting the simplistic nature of the QA language). The same representation is used for the question q and answer a. Two versions of the data are used, one that has 1000 training problems per task and a second larger one with 10,000 per task. 4.1 Model Details Unless otherwise stated, all experiments used a K = 3 hops model with the adjacent weight sharing scheme. For all tasks that output lists (i.e. the answers are multiple words), we take each possible combination of possible outputs and record them as a separate answer vocabulary word. Sentence Representation: In our experiments we explore two different representations for the sentences. The first is the bag-of-words (BoW) representation that takes the sentence xi = {xi1, xi2, ..., xin}, embeds each word and sums the resulting vectors: e.g mi = P j Axij and ci = P j Cxij. The input vector u representing the question is also embedded as a bag of words: u = P j Bqj. This has the drawback that it cannot capture the order of the words in the sentence, which is important for some tasks. We therefore propose a second representation that encodes the position of words within the sentence. This takes the form: mi = P j lj · Axij, where · is an element-wise multiplication. lj is a 4 column vector with the structure lkj = (1 −j/J) −(k/d)(1 −2j/J) (assuming 1-based indexing), with J being the number of words in the sentence, and d is the dimension of the embedding. This sentence representation, which we call position encoding (PE), means that the order of the words now affects mi. The same representation is used for questions, memory inputs and memory outputs. Temporal Encoding: Many of the QA tasks require some notion of temporal context, i.e. in the first example of Section 2, the model needs to understand that Sam is in the bedroom after he is in the kitchen. To enable our model to address them, we modify the memory vector so that mi = P j Axij + TA(i), where TA(i) is the ith row of a special matrix TA that encodes temporal information. The output embedding is augmented in the same way with a matrix Tc (e.g. ci = P j Cxij + TC(i)). Both TA and TC are learned during training. They are also subject to the same sharing constraints as A and C. Note that sentences are indexed in reverse order, reflecting their relative distance from the question so that x1 is the last sentence of the story. Learning time invariance by injecting random noise: we have found it helpful to add “dummy” memories to regularize TA. That is, at training time we can randomly add 10% of empty memories to the stories. We refer to this approach as random noise (RN). 4.2 Training Details 10% of the bAbI training set was held-out to form a validation set, which was used to select the optimal model architecture and hyperparameters. Our models were trained using a learning rate of η = 0.01, with anneals every 25 epochs by η/2 until 100 epochs were reached. No momentum or weight decay was used. The weights were initialized randomly from a Gaussian distribution with zero mean and σ = 0.1. When trained on all tasks simultaneously with 1k training samples (10k training samples), 60 epochs (20 epochs) were used with learning rate anneals of η/2 every 15 epochs (5 epochs). All training uses a batch size of 32 (but cost is not averaged over a batch), and gradients with an ℓ2 norm larger than 40 are divided by a scalar to have norm 40. In some of our experiments, we explored commencing training with the softmax in each memory layer removed, making the model entirely linear except for the final softmax for answer prediction. When the validation loss stopped decreasing, the softmax layers were re-inserted and training recommenced. We refer to this as linear start (LS) training. In LS training, the initial learning rate is set to η = 0.005. The capacity of memory is restricted to the most recent 50 sentences. Since the number of sentences and the number of words per sentence varied between problems, a null symbol was used to pad them all to a fixed size. The embedding of the null symbol was constrained to be zero. On some tasks, we observed a large variance in the performance of our model (i.e. sometimes failing badly, other times not, depending on the initialization). To remedy this, we repeated each training 10 times with different random initializations, and picked the one with the lowest training error. 4.3 Baselines We compare our approach2 (abbreviated to MemN2N) to a range of alternate models: • MemNN: The strongly supervised AM+NG+NL Memory Networks approach, proposed in [22]. This is the best reported approach in that paper. It uses a max operation (rather than softmax) at each layer which is trained directly with supporting facts (strong supervision). It employs n-gram modeling, nonlinear layers and an adaptive number of hops per query. • MemNN-WSH: A weakly supervised heuristic version of MemNN where the supporting sentence labels are not used in training. Since we are unable to backpropagate through the max operations in each layer, we enforce that the first memory hop should share at least one word with the question, and that the second memory hop should share at least one word with the first hop and at least one word with the answer. All those memories that conform are called valid memories, and the goal during training is to rank them higher than invalid memories using the same ranking criteria as during strongly supervised training. • LSTM: A standard LSTM model, trained using question / answer pairs only (i.e. also weakly supervised). For more detail, see [22]. 2 MemN2N source code is available at https://github.com/facebook/MemNN. 5 4.4 Results We report a variety of design choices: (i) BoW vs Position Encoding (PE) sentence representation; (ii) training on all 20 tasks independently vs jointly training (joint training used an embedding dimension of d = 50, while independent training used d = 20); (iii) two phase training: linear start (LS) where softmaxes are removed initially vs training with softmaxes from the start; (iv) varying memory hops from 1 to 3. The results across all 20 tasks are given in Table 1 for the 1k training set, along with the mean performance for 10k training set3. They show a number of interesting points: • The best MemN2N models are reasonably close to the supervised models (e.g. 1k: 6.7% for MemNN vs 12.6% for MemN2N with position encoding + linear start + random noise, jointly trained and 10k: 3.2% for MemNN vs 4.2% for MemN2N with position encoding + linear start + random noise + non-linearity4, although the supervised models are still superior. • All variants of our proposed model comfortably beat the weakly supervised baseline methods. • The position encoding (PE) representation improves over bag-of-words (BoW), as demonstrated by clear improvements on tasks 4, 5, 15 and 18, where word ordering is particularly important. • The linear start (LS) to training seems to help avoid local minima. See task 16 in Table 1, where PE alone gets 53.6% error, while using LS reduces it to 1.6%. • Jittering the time index with random empty memories (RN) as described in Section 4.1 gives a small but consistent boost in performance, especially for the smaller 1k training set. • Joint training on all tasks helps. • Importantly, more computational hops give improved performance. We give examples of the hops performed (via the values of eq. (1)) over some illustrative examples in Fig. 2 and in the supplementary material. Baseline MemN2N Strongly PE 1 hop 2 hops 3 hops PE PE LS Supervised LSTM MemNN PE LS PE LS PE LS PE LS LS RN LW Task MemNN [22] [22] WSH BoW PE LS RN joint joint joint joint joint 1: 1 supporting fact 0.0 50.0 0.1 0.6 0.1 0.2 0.0 0.8 0.0 0.1 0.0 0.1 2: 2 supporting facts 0.0 80.0 42.8 17.6 21.6 12.8 8.3 62.0 15.6 14.0 11.4 18.8 3: 3 supporting facts 0.0 80.0 76.4 71.0 64.2 58.8 40.3 76.9 31.6 33.1 21.9 31.7 4: 2 argument relations 0.0 39.0 40.3 32.0 3.8 11.6 2.8 22.8 2.2 5.7 13.4 17.5 5: 3 argument relations 2.0 30.0 16.3 18.3 14.1 15.7 13.1 11.0 13.4 14.8 14.4 12.9 6: yes/no questions 0.0 52.0 51.0 8.7 7.9 8.7 7.6 7.2 2.3 3.3 2.8 2.0 7: counting 15.0 51.0 36.1 23.5 21.6 20.3 17.3 15.9 25.4 17.9 18.3 10.1 8: lists/sets 9.0 55.0 37.8 11.4 12.6 12.7 10.0 13.2 11.7 10.1 9.3 6.1 9: simple negation 0.0 36.0 35.9 21.1 23.3 17.0 13.2 5.1 2.0 3.1 1.9 1.5 10: indefinite knowledge 2.0 56.0 68.7 22.8 17.4 18.6 15.1 10.6 5.0 6.6 6.5 2.6 11: basic coreference 0.0 38.0 30.0 4.1 4.3 0.0 0.9 8.4 1.2 0.9 0.3 3.3 12: conjunction 0.0 26.0 10.1 0.3 0.3 0.1 0.2 0.4 0.0 0.3 0.1 0.0 13: compound coreference 0.0 6.0 19.7 10.5 9.9 0.3 0.4 6.3 0.2 1.4 0.2 0.5 14: time reasoning 1.0 73.0 18.3 1.3 1.8 2.0 1.7 36.9 8.1 8.2 6.9 2.0 15: basic deduction 0.0 79.0 64.8 24.3 0.0 0.0 0.0 46.4 0.5 0.0 0.0 1.8 16: basic induction 0.0 77.0 50.5 52.0 52.1 1.6 1.3 47.4 51.3 3.5 2.7 51.0 17: positional reasoning 35.0 49.0 50.9 45.4 50.1 49.0 51.0 44.4 41.2 44.5 40.4 42.6 18: size reasoning 5.0 48.0 51.3 48.1 13.6 10.1 11.1 9.6 10.3 9.2 9.4 9.2 19: path finding 64.0 92.0 100.0 89.7 87.4 85.6 82.8 90.7 89.9 90.2 88.0 90.6 20: agent’s motivation 0.0 9.0 3.6 0.1 0.0 0.0 0.0 0.0 0.1 0.0 0.0 0.2 Mean error (%) 6.7 51.3 40.2 25.1 20.3 16.3 13.9 25.8 15.6 13.3 12.4 15.2 Failed tasks (err. > 5%) 4 20 18 15 13 12 11 17 11 11 11 10 On 10k training data Mean error (%) 3.2 36.4 39.2 15.4 9.4 7.2 6.6 24.5 10.9 7.9 7.5 11.0 Failed tasks (err. > 5%) 2 16 17 9 6 4 4 16 7 6 6 6 Table 1: Test error rates (%) on the 20 QA tasks for models using 1k training examples (mean test errors for 10k training examples are shown at the bottom). Key: BoW = bag-of-words representation; PE = position encoding representation; LS = linear start training; RN = random injection of time index noise; LW = RNN-style layer-wise weight tying (if not stated, adjacent weight tying is used); joint = joint training on all tasks (as opposed to per-task training). 5 Language Modeling Experiments The goal in language modeling is to predict the next word in a text sequence given the previous words x. We now explain how our model can easily be applied to this task. 3More detailed results for the 10k training set can be found in the supplementary material. 4Following [17] we found adding more non-linearity solves tasks 17 and 19, see the supplementary material. 6 Story (1: 1 supporting fact) Support Hop 1 Hop 2 Hop 3 Story (2: 2 supporting facts) Support Hop 1 Hop 2 Hop 3 Daniel went to the bathroom. 0.00 0.00 0.03 John dropped the milk. 0.06 0.00 0.00 Mary travelled to the hallway. 0.00 0.00 0.00 John took the milk there. yes 0.88 1.00 0.00 John went to the bedroom. 0.37 0.02 0.00 Sandra went back to the bathroom. 0.00 0.00 0.00 John travelled to the bathroom. yes 0.60 0.98 0.96 John moved to the hallway. yes 0.00 0.00 1.00 Mary went to the office. 0.01 0.00 0.00 Mary went back to the bedroom. 0.00 0.00 0.00 Story (16: basic induction) Support Hop 1 Hop 2 Hop 3 Story (18: size reasoning) Support Hop 1 Hop 2 Hop 3 Brian is a frog. yes 0.00 0.98 0.00 The suitcase is bigger than the chest. yes 0.00 0.88 0.00 Lily is gray. 0.07 0.00 0.00 The box is bigger than the chocolate. 0.04 0.05 0.10 Brian is yellow. yes 0.07 0.00 1.00 The chest is bigger than the chocolate. yes 0.17 0.07 0.90 Julius is green. 0.06 0.00 0.00 The chest fits inside the container. 0.00 0.00 0.00 Greg is a frog. yes 0.76 0.02 0.00 The chest fits inside the box. 0.00 0.00 0.00 Where is John? Answer: bathroom Prediction: bathroom Where is the milk? Answer: hallway Prediction: hallway What color is Greg? Answer: yellow Prediction: yellow Does the suitcase fit in the chocolate? Answer: no Prediction: no Figure 2: Example predictions on the QA tasks of [22]. We show the labeled supporting facts (support) from the dataset which MemN2N does not use during training, and the probabilities p of each hop used by the model during inference. MemN2N successfully learns to focus on the correct supporting sentences. Penn Treebank Text8 # of # of memory Valid. Test # of # of memory Valid. Test Model hidden hops size perp. perp. hidden hops size perp. perp. RNN [15] 300 133 129 500 184 LSTM [15] 100 120 115 500 122 154 SCRN [15] 100 120 115 500 161 MemN2N 150 2 100 128 121 500 2 100 152 187 150 3 100 129 122 500 3 100 142 178 150 4 100 127 120 500 4 100 129 162 150 5 100 127 118 500 5 100 123 154 150 6 100 122 115 500 6 100 124 155 150 7 100 120 114 500 7 100 118 147 150 6 25 125 118 500 6 25 131 163 150 6 50 121 114 500 6 50 132 166 150 6 75 122 114 500 6 75 126 158 150 6 100 122 115 500 6 100 124 155 150 6 125 120 112 500 6 125 125 157 150 6 150 121 114 500 6 150 123 154 150 7 200 118 111 Table 2: The perplexity on the test sets of Penn Treebank and Text8 corpora. Note that increasing the number of memory hops improves performance. Figure 3: Average activation weight of memory positions during 6 memory hops. White color indicates where the model is attending during the kth hop. For clarity, each row is normalized to have maximum value of 1. A model is trained on (left) Penn Treebank and (right) Text8 dataset. We now operate on word level, as opposed to the sentence level. Thus the previous N words in the sequence (including the current) are embedded into memory separately. Each memory cell holds only a single word, so there is no need for the BoW or linear mapping representations used in the QA tasks. We employ the temporal embedding approach of Section 4.1. Since there is no longer any question, q in Fig. 1 is fixed to a constant vector 0.1 (without embedding). The output softmax predicts which word in the vocabulary (of size V ) is next in the sequence. A cross-entropy loss is used to train model by backpropagating the error through multiple memory layers, in the same manner as the QA tasks. To aid training, we apply ReLU operations to half of the units in each layer. We use layer-wise (RNN-like) weight sharing, i.e. the query weights of each layer are the same; the output weights of each layer are the same. As noted in Section 2.2, this makes our architecture closely related to an RNN which is traditionally used for language 7 modeling tasks; however here the “sequence” over which the network is recurrent is not in the text, but in the memory hops. Furthermore, the weight tying restricts the number of parameters in the model, helping generalization for the deeper models which we find to be effective for this task. We use two different datasets: Penn Tree Bank [13]: This consists of 929k/73k/82k train/validation/test words, distributed over a vocabulary of 10k words. The same preprocessing as [25] was used. Text8 [15]: This is a a pre-processed version of the first 100M million characters, dumped from Wikipedia. This is split into 93.3M/5.7M/1M character train/validation/test sets. All word occurring less than 5 times are replaced with the <UNK> token, resulting in a vocabulary size of ∼44k. 5.1 Training Details The training procedure we use is the same as the QA tasks, except for the following. For each mini-batch update, the ℓ2 norm of the whole gradient of all parameters is measured5 and if larger than L = 50, then it is scaled down to have norm L. This was crucial for good performance. We use the learning rate annealing schedule from [15], namely, if the validation cost has not decreased after one epoch, then the learning rate is scaled down by a factor 1.5. Training terminates when the learning rate drops below 10−5, i.e. after 50 epochs or so. Weights are initialized using N(0, 0.05) and batch size is set to 128. On the Penn tree dataset, we repeat each training 10 times with different random initializations and pick the one with smallest validation cost. However, we have done only a single training run on Text8 dataset due to limited time constraints. 5.2 Results Table 2 compares our model to RNN, LSTM and Structurally Constrained Recurrent Nets (SCRN) [15] baselines on the two benchmark datasets. Note that the baseline architectures were tuned in [15] to give optimal perplexity6. Our MemN2N approach achieves lower perplexity on both datasets (111 vs 115 for RNN/SCRN on Penn and 147 vs 154 for LSTM on Text8). Note that MemN2N has ∼1.5x more parameters than RNNs with the same number of hidden units, while LSTM has ∼4x more parameters. We also vary the number of hops and memory size of our MemN2N, showing the contribution of both to performance; note in particular that increasing the number of hops helps. In Fig. 3, we show how MemN2N operates on memory with multiple hops. It shows the average weight of the activation of each memory position over the test set. We can see that some hops concentrate only on recent words, while other hops have more broad attention over all memory locations, which is consistent with the idea that succesful language models consist of a smoothed n-gram model and a cache [15]. Interestingly, it seems that those two types of hops tend to alternate. Also note that unlike a traditional RNN, the cache does not decay exponentially: it has roughly the same average activation across the entire memory. This may be the source of the observed improvement in language modeling. 6 Conclusions and Future Work In this work we showed that a neural network with an explicit memory and a recurrent attention mechanism for reading the memory can be successfully trained via backpropagation on diverse tasks from question answering to language modeling. Compared to the Memory Network implementation of [23] there is no supervision of supporting facts and so our model can be used in a wider range of settings. Our model approaches the same performance of that model, and is significantly better than other baselines with the same level of supervision. On language modeling tasks, it slightly outperforms tuned RNNs and LSTMs of comparable complexity. On both tasks we can see that increasing the number of memory hops improves performance. However, there is still much to do. Our model is still unable to exactly match the performance of the memory networks trained with strong supervision, and both fail on several of the 1k QA tasks. Furthermore, smooth lookups may not scale well to the case where a larger memory is required. For these settings, we plan to explore multiscale notions of attention or hashing, as proposed in [23]. Acknowledgments The authors would like to thank Armand Joulin, Tomas Mikolov, Antoine Bordes and Sumit Chopra for useful comments and valuable discussions, and also the FAIR Infrastructure team for their help and support. 5In the QA tasks, the gradient of each weight matrix is measured separately. 6They tuned the hyper-parameters on Penn Treebank and used them on Text8 without additional tuning, except for the number of hidden units. See [15] for more detail. 8 References [1] C. G. Atkeson and S. Schaal. Memory-based neural networks for robot learning. Neurocomputing, 9:243–269, 1995. [2] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations (ICLR), 2015. [3] Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. J. Mach. Learn. Res., 3:1137–1155, Mar. 2003. [4] J. Chung, C¸ . G¨ulc¸ehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint: 1412.3555, 2014. [5] S. Das, C. L. Giles, and G.-Z. Sun. Learning context-free grammars: Capabilities and limitations of a recurrent neural network with an external stack memory. In In Proceedings of The Fourteenth Annual Conference of Cognitive Science Society, 1992. [6] J. Goodman. A bit of progress in language modeling. CoRR, cs.CL/0108005, 2001. [7] A. Graves. Generating sequences with recurrent neural networks. arXiv preprint: 1308.0850, 2013. [8] A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. arXiv preprint: 1410.5401, 2014. [9] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. DRAW: A recurrent neural network for image generation. CoRR, abs/1502.04623, 2015. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735– 1780, 1997. [11] A. Joulin and T. Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. NIPS, 2015. [12] J. Koutn´ık, K. Greff, F. J. Gomez, and J. Schmidhuber. A clockwork RNN. In ICML, 2014. [13] M. P. Marcus, M. A. Marcinkiewicz, and B. Santorini. Building a large annotated corpus of english: The Penn Treebank. Comput. Linguist., 19(2):313–330, June 1993. [14] T. Mikolov. Statistical language models based on neural networks. Ph. D. thesis, Brno University of Technology, 2012. [15] T. Mikolov, A. Joulin, S. Chopra, M. Mathieu, and M. Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint: 1412.7753, 2014. [16] M. C. Mozer and S. Das. A connectionist symbol manipulator that discovers the structure of context-free languages. NIPS, pages 863–863, 1993. [17] B. Peng, Z. Lu, H. Li, and K. Wong. Towards Neural Network-based Reasoning. ArXiv preprint: 1508.05508, 2015. [18] J. Pollack. The induction of dynamical recognizers. Machine Learning, 7(2-3):227–252, 1991. [19] K. Steinbuch and U. Piske. Learning matrices and their applications. IEEE Transactions on Electronic Computers, 12:846–862, 1963. [20] M. Sundermeyer, R. Schl¨uter, and H. Ney. LSTM neural networks for language modeling. In Interspeech, pages 194–197, 2012. [21] W. K. Taylor. Pattern recognition by means of automatic analogue apparatus. Proceedings of The Institution of Electrical Engineers, 106:198–209, 1959. [22] J. Weston, A. Bordes, S. Chopra, and T. Mikolov. Towards AI-complete question answering: A set of prerequisite toy tasks. arXiv preprint: 1502.05698, 2015. [23] J. Weston, S. Chopra, and A. Bordes. Memory networks. In International Conference on Learning Representations (ICLR), 2015. [24] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhutdinov, R. Zemel, and Y. Bengio. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. ArXiv preprint: 1502.03044, 2015. [25] W. Zaremba, I. Sutskever, and O. Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. 9 | 2015 | 225 |
5,731 | Fast Distributed k-Center Clustering with Outliers on Massive Data Gustavo Malkomes, Matt J. Kusner, Wenlin Chen Department of Computer Science and Engineering Washington University in St. Louis St. Louis, MO 63130 {luizgustavo,mkusner,wenlinchen}@wustl.edu Kilian Q. Weinberger Department of Computer Science Cornell University Ithaca, NY 14850 kqw4@cornell.edu Benjamin Moseley Department of Computer Science and Engineering Washington University in St. Louis St. Louis, MO 63130 bmoseley@wustl.edu Abstract Clustering large data is a fundamental problem with a vast number of applications. Due to the increasing size of data, practitioners interested in clustering have turned to distributed computation methods. In this work, we consider the widely used kcenter clustering problem and its variant used to handle noisy data, k-center with outliers. In the noise-free setting we demonstrate how a previously-proposed distributed method is actually an O(1)-approximation algorithm, which accurately explains its strong empirical performance. Additionally, in the noisy setting, we develop a novel distributed algorithm that is also an O(1)-approximation. These algorithms are highly parallel and lend themselves to virtually any distributed computing framework. We compare each empirically against the best known sequential clustering methods and show that both distributed algorithms are consistently close to their sequential versions. The algorithms are all one can hope for in distributed settings: they are fast, memory efficient and they match their sequential counterparts. 1 Introduction Clustering is a fundamental machine learning problem with widespread applications. Example applications include grouping documents or webpages by their similarity for search engines [30] or grouping web users by their demographics for targeted advertising [2]. In a clustering problem one is given as input a set U of n data points, characterized by a set of features, and is asked to cluster (partition) points so that points in a cluster are similar by some measure. Clustering is a well understood task on modestly sized data sets; however, today practitioners seek to cluster datasets of massive size. Once data becomes too voluminous, sequential algorithms become ineffective due to their running time and insufficient memory to store the data. Practitioners have turned to distributed methods, in particular MapReduce [13], to efficiently process massive data sets. One of the most fundamental clustering problems is the k-center problem. Here, it is assumed that for any two input points a pair-wise distance can be computed that reflects their dissimilarity (typically these arise from a metric space). The objective is to choose a subset of k points (called centers) that give rise to a clustering of the input set into k clusters. Each input point is assigned to the cluster defined by its closest center (out of the k center points). The k-center objective selects these centers to minimize the farthest distance of any point to its cluster center. 1 The k-center problem has been studied for over three decades and is a fundamental task used for exemplar based clustering [22]. It is known to be NP-Hard and, further, no algorithm can achieve a (2−ϵ)-approximation for any ϵ > 0 unless P=NP [16, 20]. In the sequential setting, there are algorithms which match this bound achieving a 2-approximation [16, 20]. The k-center problem is popular for clustering datasets which are not subject to noise since the objective is sensitive to error in the data because the worst case (maximum) distance of a point to the centers is used for the objective. In the case where data can be noisy [1, 18, 19], previous work has considered the k-centers with outliers problem [10]. In this problem, the objective is the same, but additionally one may discard a set of z points from the input. These z points are the outliers and are ignored in the objective. Here, the best known algorithm is a 3-approximation [10]. Once datasets become large, the known algorithms for these two problems become ineffective. Due to this, previous work on clustering has resorted to alternative algorithmics. There have been several works on streaming algorithms [3, 17, 24, 26]. Others have focused on distributed computing [6, 7, 14, 25]. The work in the distributed setting has focused on algorithms which are implementable in MapReduce, but are also inherently parallel and work in virtually any distributed computing framework. The work of [14] was the first to consider k-center clustering in the distributed setting. Their work gave an O(1)-round O(1)-approximate MapReduce algorithm. Their algorithm is a sampling based MapReduce algorithm which can be used for a variety of clustering objectives. Unfortunately, as the authors point out in their paper, the algorithm does not always perform well empirically for the k-center objective since the objective function is very sensitive to missing data points and the sampling can cause large errors in the solution. The work of Kumar et al. [23] gave a (1−1 e)-approximation algorithm for submodular function maximization subject to a cardinality constraint in the MapReduce setting, however, their algorithm requires a non-constant number of MapReduce rounds. Whereas, Mirzasoleiman et al. [25] (recently, extended in [8]) gave a two MapReduce rounds algorithm but their approximation ratio is not constant. It is known that an exact algorithm for submodular maximization subject to a cardinality constraint gives an exact algorithm for the k-center problem. Unfortunately, both problems are NPHard and the reduction is not approximation preserving. Therefore, their theoretical results do not imply a nontrivial approximation for the k-center problem. For these problems, the following questions loom: What can be achieved for k-center clustering with or without outliers in the large-scale distributed setting? What underlying algorithmic ideas are needed for the k-center with outliers problem to be solved in the distributed setting? The k-center with outliers problem has not been studied in the distributed setting. Given the complexity of the sequential algorithm, it is not clear what such an algorithm would look like. Contributions. In this work, we consider the k-center and k-center with outliers problems in the distributed computing setting. Although the algorithms are highly parallel and work in virtually any distributed computing framework, they are particularly well suited for the MapReduce [13] as they require only small amounts of inter-machine communication and very little memory on each machine. We therefore state our results for the MapReduce framework [13]. We will assume throughout the paper that our algorithm is given some number of machines, m, to process the data. We first begin by considering a natural interpretation of the algorithm of Mirzasoleiman et al. [25] on submodular optimization for the k-center problem. The algorithm we introduce runs in two MapReduce rounds and achieves a small constant approximation. Theorem 1.1. There is a two round MapReduce algorithm which achieves a 4-approximation for the k-center problem which communicates O(km) amount of data assuming the data is already partitioned across the machines. The algorithm uses O(max{n/m, mk}) memory on each machine. Next we consider the k-center with outliers problem. This problem is far more challenging and previous distributed techniques do not lend themselves to this problem. Here we combine the algorithm developed for the problem without outliers with the sequential algorithm for k-center with outliers. We show a two round MapReduce algorithm that achieves an O(1)-approximation. Theorem 1.2. There is a two round MapReduce algorithm which achieves a 13-approximation for the k-center with outliers problem which communicates O(km log n) amount of data assuming the data is already partitioned across the machines. The algorithm uses O(max{n/m, m(k+z) log n}) memory on each machine. 2 Finally, we perform experiments with both algorithms on real world datasets. For k-center we observe that the quality of the solutions is effectively the same as that of the sequential algorithm for all values of k—the best one could hope for. For the k-center problem with outliers our algorithm matches the sequential algorithm as the values of k and z vary and it significantly outperforms the algorithm which does not explicitly consider outliers. Somewhat surprisingly our algorithm achieves an order of magnitude speed-up over the sequential algorithm even if it is run sequentially. 2 Preliminaries Map-Reduce. We will consider algorithms in the distributed setting where our algorithms are given m machines. We define our algorithms in a general distributed manner, but they particularly suited to the MapReduce model [21]. This model has become widely used both in theory and in applied machine learning [4, 5, 9, 12, 15, 21, 25, 27, 31]. In the MapReduce setting, algorithms run in rounds. In each round the machines are allowed to run a sequential computation without machine communication. Between rounds, data is distributed amongst the machines in preparation for new computation. The goal is to design an algorithm which runs in a small number of rounds since the main running time bottleneck is distributing the data amongst the machine between each round. Generally it is assumed that each of the machines uses sublinear memory [21]. The motivation here is that since MapReduce is used to process large data sets, the memory on the machines should be much smaller than the input size to the problem. It is additionally assumed that there is enough memory to store the entire dataset across all machines. Our algorithms fall into this category and the memory required on each machine scales inversely with m. k-center (with outliers) problem. In the problems considered, there is a universe U of n points. Between each pair of points u, v ∈U there is a distance d(u, v) specifying their dissimilarity. The points are assumed to lie in a metric space which implies that for all u, v, u′ ∈U we have that 1. d(u, u)=0, 2. d(u, v)=d(v, u), and 3. d(u, v)≤d(u, u′)+d(u′, v) (triangle inequality). For a set X of points, we let dX(u) := minv∈X{d(u, v)} denote the minimum distance of a point u ∈U to any point in X. In the k-center problem, the goal is to choose a set of centers X of k points such that maxv∈U dX(v) is minimized (i.e., dX(v) is the distance between v and its cluster center and we would like to minimize the largest distance, across all points). In the k-center with outliers problem, the goal is to choose a set X of k points and a set Z of z points such that maxv∈U\Z dX(v) is minimized. Note that in this problem the algorithm simply needs to choose the set X as the optimal set of Z points is well defined: It is the set of points in U farthest from the centers X. Algorithm 1 Sequential k-center GREEDY(U, k) 1: X = ∅ 2: Add any point u ∈U to X 3: while |X| < k do 4: u = argmaxv∈U dX(v) 5: X = X ∪{u} 6: end while Sequential algorithms The most widely used k-center (without outliers) algorithm is the following simple greedy procedure, summarized in pseudo-code in Algorithm 1. The algorithm sets X = ∅and then iteratively adds points from U to X until |X| = k. At each step, the algorithm greedily selects the farthest point in U from X, and then adds this point to the updated set X. This algorithm is natural and efficient and is known to give a 2-approximation for the k-center problem [20]. However, it is also inherently sequential and does not lend itself to the distributed setting (except for very small k). A na¨ıve MapReduce implementation can be obtained by finding the element v ∈U to maximize dX(v) in a distributed fashion (line 4 in Algorithm 1). This, however, requires k rounds of MapReduce that must distribute the entire dataset each round. Therefore it is unsuitably inefficient for many real world problems. The sequential algorithm for k-center with outliers is more complicated due to the increased difficulty of the problem (for reference see: [10]). This algorithm is even more fundamentally sequential than Algorithm 1. 3 k-Center in MapReduce In this section we consider the k-center problem where no outliers are allowed. As mentioned before, a similar variant of this problem has been previously studied in Mirzasoleiman et al. [25] in the distributed setting. The work of Mirzasoleiman et al. considers submodular maximization and showed a min{ 1 k, 1 m}-approximation where m is the number of machines. Their algorithm was shown to perform extremely well in practice (in a slightly modified clustering setup). The 3 k-center problem can be mapped to submodular maximization, but the standard reduction is not approximation preserving and their result does not imply a non-trivial approximation for k-center. In this section, we give a natural interpretation of their algorithm without submodular maximization. Algorithm 2 summarizes a distributed approach for solving the k-center problem. First the data points of U are partitioned across all m machines. Then each machine i runs the GREEDY algorithm on the partition they are given to compute a set Ci of k points. These points are assigned to a single machine, which runs GREEDY again to compute the final solution. The algorithm runs in two MapReduce rounds and the only information communicated is Ci for each i if the data is already assigned to machines. Thus, we have the following proposition. Proposition 3.1. The algorithm GREEDY-MR runs in two MapReduce rounds and communicates O(km) amount of data assuming the data is originally partitioned across the machines. The algorithm uses O(max{n/m, mk}) memory on each machine. Algorithm 2 Distributed k-center GREEDY-MR(U, k) 1: Partition U into m equal sized sets U1, . . . , Um where machine i receives Ui. 2: Machine i assigns Ci = GREEDY(Ui, k) 3: All sets Ci are assigned to machine 1 4: Machine 1 sets X = GREEDY(∪m i=1Ci, k) 5: Output X We aim to bound the approximation ratio of GREEDY-MR. Let OPT denote the optimal solution value for the k-center problem. The previous proposition and following lemma give Theorem 1.1. Lemma 3.2. The algorithm GREEDY-MR is a 4-approximation algorithm. Proof. We first show for any i that dCi(u) ≤ 2OPT for any u ∈Ui. Indeed, say that this is not the case for sake of contradiction for some i. Then for some u ∈Ui, dCi(u) > 2OPT which implies u is distance greater than 2OPT from all points in Ci. By definition of GREEDY for any pair of points v, v′ ∈Ci it must be the case that d(v, v′) ≥dCi(u) > 2OPT (otherwise u would have been included in Ci). Thus, in the set {u} ∪Ci there are k + 1 points all of distance greater than 2OPT from each other. However, then two of these points v, v′ ∈({u} ∪Ci) must be assigned to the same center v∗in the optimal solution. Using the triangle inequality and the definition of OPT it must be the case that d(v, v′) ≤d(v∗, v) + d(v∗, v′) ≤2OPT, a contradiction. Thus, for all points u ∈Ui, it must be that dCi(u) ≤2OPT. Let X denote the output solution by GREEDY-MR. We can show a similar result for points in ∪m i=1Ci when compared to X. That is, we show that dX(u) ≤2OPT for any u ∈∪m i=1Ci. Indeed, say that this is not the case for sake of contradiction. Then for some u ∈∪m i=1Ci, dX(u) > 2OPT which implies u is distance greater than 2OPT from all points in X. By definition of GREEDY for any pair of points v, v′ ∈∪m i=1Ci it must be that d(v, v′) ≥dX(u) > 2OPT. Thus, in the set {u} ∪X there are k+1 points all of distance greater than 2OPT from each other. However, then two of these points v, v′ ∈({u}∪X) must be assigned to the same center v∗in the optimal solution. Using the triangle inequality and the definition of OPT it must be the case that d(v, v′) ≤d(v∗, v)+d(v∗, v′) ≤2OPT, a contradiction. Thus, for all points u ∈∪m i=1Ci, it must be that dX(u) ≤2OPT. Now we put these together to get a 4-approximation. Consider any point u ∈U. If u is in Ci for any i, it must be the case that dX(u) ≤2OPT by the above argument. Otherwise, u is not in Ci for any i. Let Uj be the partition which u belongs to. We know that u is within distance 2OPT to some point v ∈Cj and further we know that v is within distance 2OPT from X from the above arguments. Thus, using the triangle inequality, dX(u) ≤d(u, v) + dX(v) ≤2OPT + 2OPT ≤4OPT. 4 k-center with Outliers In this section, we consider the k-center with outliers problem and give the first MapReduce algorithm for the problem. The problem is more challenging than the version without outliers because one has to also determine which points to discard, which can drastically change which centers should be chosen. Intuitively, the right algorithmic strategy is to choose centers such that there are many points around them. Given that they are surrounded by many points, this is a strong indicator that these points are not outliers. This idea was formalized in the algorithm of Charikar et al. [10], a well-known and influential algorithm for this problem in the single machine setting. Algorithm 3 summarizes the approach of Charikar et al. [10]. It takes as input the set of points U, the desired number centers k and a parameter G. The parameter G is a ‘guess’ of the optimal solution’s value. The algorithm’s performance is best when G = OPT where OPT denotes the 4 optimal k-center objective after discarding z points. The number of outliers to be discarded, z, is not a parameter of the algorithm and is communicated implicitly through G. The value of G can be determined by doing a binary search on possible values of G—between the minimum and maximum distances of any two points. Algorithm 3 Sequential k-center with outliers [10] OUTLIERS(U, k, G) 1: U ′ = U, X = ∅ 2: while |X| < k do 3: ∀u ∈U ′ let Bu ={v : v ∈U ′, du,v ≤G} 4: Let v′ = argmaxu∈U ′|Bu| 5: Set X = X ∪{v′} 6: Compute B′ v′ ={v : v ∈U ′, dv′,v ≤3G} 7: U ′ = U ′ \ B′ v′ 8: end while For each point u ∈U, the set Bu contains points within distance G of u. The algorithm adds the point v′ to the solution set which covers the largest number of points with Bv′. The idea here is to add points which have many points nearby (and thus large Bv′). Then the algorithm removes all points from the universe which are within distance 3G from v′ and continues until k points are chosen to be in the set X. Recall that in the outliers problem, choosing the centers is a well defined solution and the outliers are simply the farthest z points from the centers. Further, it can be shown that when G = OPT, after selecting the k centers, there are at most z outliers remaining in U ′. It is known that this algorithm gives a 3-approximation [10]—however it is not efficient on large or even medium sized datasets due to the computation of the sets Bu within each iteration. For instance, it can take ≈100 hours on a data set with 45, 000 points. We now give a distributed approach (Algorithm 4) for clustering with outliers. This algorithm is naturally parallel, yet it is significantly faster even if run sequentially on a single machine. It uses a sub-procedure (Algorithm 5) which is a generalization of OUTLIERS. Algorithm 4 Distributed k-center with outliers OUTLIERS-MR(U, k, z, G, α, β) 1: Partition U into m equal sized sets U1, . . . , Um where machine i receives Ui. 2: Machines i sets Ci = GREEDY(Ui, k + z) 3: For each point c ∈Ci, machine i set wc = |{v : v ∈Ui, d(v, c) = dCi(v)}| + 1 4: All sets Ci are assigned to machine 1 with the weights of the points in Ci 5: Machine 1 sets X = CLUSTER(∪m i=1Ci, k, G) 6: Output X The algorithm first partitions the points across the m machines (e.g., set Ui goes to machine i). Each machine i runs the GREEDY algorithm on Ui, but selects k+z points rather than k. This results in a set Ci. For each c ∈Ci, we assign a weight wc that is the number of points in Ui that have c as their closest point in Ci (i.e., if Ci defines an intermediate clustering of Ui then wc is the number of points in the ccluster). The algorithm then runs a variation of OUTLIERS called CLUSTER, described in Algorithm 5, on only the points in ∪m i=1Ci. The main differences are that CLUSTER represents each point c by the number of points wc closest to it, and that it uses 5G and 11G for the radii in Bu and B′ u. Algorithm 5 Clustering subroutine CLUSTER(U, k, G) 1: U ′ = U, X = ∅ 2: while |X| < k do 3: ∀u ∈U compute Bu = {v : v ∈U ′, du,v ≤5G} 4: Let v′ = argmaxu∈U P u′∈Bu wu′ 5: Set X = X ∪{v′} 6: Compute B′ v′ ={v : v ∈U ′, dv′,v ≤11G} 7: U ′ = U ′ \ B′ v′ 8: end while 9: Output X The total machine-wise communication required for OUTLIERS-MR is that needed to send each of the sets Ci to Machine 1 along with their weights. Each weight can have size at most n, so it only requires O(log n) space to encode the weight. This gives the following proposition. Proposition 4.1. OUTLIERS-MR runs in two MapReduce rounds and communicates O((k + z)m log n) amount of data assuming the data is originally partitioned across the machines. The algorithm uses O(max{n/m, m(k + z) log n}) memory on each machine. Our goal is to show that OUTLIERS-MR is an O(1)-approximation algorithm (Theorem 1.2). We first present intermediate lemmas and give proof sketches, leaving intermediate proofs to the supplementary material. We overload notation and let OPT denote a fixed optimal solution as well as 5 the optimal objective to the problem. We will assume throughout the proof that G=OPT, as we can perform a binary search to find ˆG=OPT(1 + ϵ) for arbitrarily small ϵ>0 when running CLUSTER on a single machine. We first claim that any point in Ui is not too far from any point in Ci. Lemma 4.2. For every point u ∈Ui it is the case that dCi(u) ≤2OPT for all 1 ≤i ≤m. Given the above lemma, let O1, . . . , Ok denote the clusters in the optimal solution. A cluster in OPT is defined as a subset of the points in U, not including outliers identified by OPT, that are closest to some fixed center chosen by OPT. The high level idea of our proof is similar to that used in [10]. Our goal is to show that when our algorithm choses each center, the set of points discarded from U ′ in CLUSTER can be mapped to some cluster in the optimal solution. At the end of CLUSTER there should be at most z points in U ′, which are the outliers in the optimal solution. Knowing that we only discard points from U ′ close to centers we choose, this will imply the approximation bound. For every point u ∈U, which must fall into some Ui, we let c(u) denote the closest point in Ci to u (i.e., c(u) is the closest intermediate cluster center found by GREEDY to u). Consider the output of CLUSTER, X = {x1, x2, . . . , xk}, ordered by how elements were added to X. We will say that an optimal cluster Oi is marked at CLUSTER iteration j if there is a point u ∈Oi such that c(u) /∈U ′ just before xj is added to X. Essentially if a cluster is marked, we can make no guarantee about covering it within some radius of xj (which will then be discarded). Figure 1 shows examples where Oi is (and is not) marked. We begin by noting that when xj is added to X that the weight of the points removed from U ′ is at least as large as the maximum number of points in an unmarked cluster in the optimal solution. Lemma 4.3. When xj is added, then P u′∈Bxj wu′ ≥|Oi| for any unmarked cluster Oi. marked Oi unmarked Oi Oi u c(u) U 0 9 v c(v) c(v0) v0 deleted from U 0 Oi c(u) U 0 v c(v) c(v0) v0 u 8 Figure 1: Examples in which Oi is/is not marked. Given this result, the following lemma considers a point v that is in some cluster Oi. If c(v) is within the ball Bxj for xj added to X, then intuitively, this means that we cover all of the points in Oi with B′ xj. Another way to say this is that after we remove the ball B′ xj, no points in Oi contribute weight to any point in U ′. Lemma 4.4. Consider that xj is to be added to X. Say that c(v) ∈Bxj for some point v ∈Oi for some i. Then, for every point u ∈Oi either c(u) ∈B′ xj or c(u) has already been removed from U ′. See the supplementary material for the proof. The final lemma below states that the weight of the points in ∪xi:1≤i≤kB′ xi is at least as large as the number of points in ∪1≤i≤kOi. Further, we know that | ∪1≤i≤k Oi| = n −z since OPT has z outliers. Viewing the points in B′ xi as being assigned to xi in the algorithm’s solution then this shows that the number of points covered is at least as large as the number of points that the optimal solution covers. Hence, there cannot be more than z points uncovered by our algorithm. Lemma 4.5. Pk i=1 P u∈B′xi wu ≥n −z Finally, we are ready to complete the proof of Theorem 1.2. Proof of [Theorem 1.2] Lemma 4.5 implies that the sum of the weights of the points which are in ∪xi:1≤i≤kB′ xi are at least n −z. We know that every point u contributes to the weight of some point c(u) which is in Ci for 1 ≤i ≤m and by Lemma 4.2 d(u, c(u)) ≤2OPT. We map every point u ∈U to xi, such that c(u) ∈B′ xi. By definition of B′ xi and Lemma 4.2 it is the case d(u, xi) ≤13OPT by the triangle inequality. Thus, we have mapped n −z points to some point in X within distance 13OPT. Hence, our algorithm discards at most n−z points and achieves a 13-approximation. With Proposition 4.1 we have shown Theorem 1.2. 2 5 Experiments We evaluate the real-world performance of the above clustering algorithms on seven clustering datasets, described in Table 1. We compare all methods using the k-center with outliers objective, in which z outliers may be discarded. We begin with a brief description of the clustering methods we 6 Table 1: The clustering datasets (and their descriptions) used for evaluation. name description n dim. Parkinsons [28] patients with early-stage Parkinson’s disease 5, 875 22 Census1 census household information 45, 222 12 Skin1 RGB-pixel samples from face images 245, 057 3 Yahoo [11] web-search ranking dataset (features are GBRT outputs [29]) 473, 134 500 Covertype1 a forest cover dataset with cartographic features 522, 911 13 Power1 household electric power readings 2, 049, 280 7 Higgs1 particle detector measurements (the seven ‘high-level’ features) 11, 000, 000 7 compare. We then show how the distributed algorithms compare with their sequential counterparts on datasets small enough to run the sequential methods, for a variety of settings. Finally, in the large-scale setting, we compare all distributed methods for different settings of k. Methods. We implemented the sequential GREEDY and OUTLIERS and distributed GREEDY-MR [25] and OUTLIERS-MR. We also implemented two baseline methods: RANDOM|RANDOM: m machines randomly select k+z points, then a single machine randomly selects k points out of the previously selected m(k+z) points; RANDOM|OUTLIERS: m machines randomly select k+z points, then OUTLIERS (Algorithm 4) is run over the m(k+z) points previously selected; All methods were implemented in MATLABTM and conducted on an 8-core Intel Xeon 2 GHz machine. 5 10 15 20 0 0.5 1 1.5 2 2.5 3 x 10 5 k=50, z=256 m 5 6 7 8 9 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 5 k=50, m=10 log2(z) 20 40 60 80 100 0 0.5 1 1.5 2 2.5 3 x 10 5 m=10, z=256 k 5 10 15 20 15 20 25 30 35 40 45 k=50, z=256 m 5 6 7 8 9 15 20 25 30 35 40 45 k=50, m=10 log2(z) 20 40 60 80 100 15 20 25 30 35 40 45 m=10, z=256 k 5 10 15 20 0 5 10 15 20 25 30 35 40 k=50, z=256 m 5 6 7 8 9 0 5 10 15 20 25 30 35 40 k=50, m=10 log2(z) 20 40 60 80 100 0 5 10 15 20 25 30 35 40 m=10, z=256 k 5 10 15 20 0 0.4 0.8 1.2 1.6 2 k=50, z=256 m 5 6 7 8 9 0 0.4 0.8 1.2 1.6 2 k=50, m=10 log2(z) 20 40 60 80 100 0 0.4 0.8 1.2 1.6 2 m=10, z=256 k objective value Parkinson number of clusters: k number of machines: m 10k Covertype 10k Power Census 5 5 5 number of outliers: log(z) 2 Random | Random Random | Outliers Outliers Greedy Greedy-MR Outliers-MR Figure 2: The performance of sequential and distributed methods. We plot the objective value of four small datasets for varying k, z, and m. Sequential vs. Distributed. Our first set of experiments evaluate how close the proposed distributed methods are to their sequential counterparts. To this end, we vary all parameters: number of centers k, number of outliers z, and the number of machines m. We consider datasets for which computing the sequential methods is practical: Parkinsons, Census and two random subsamples (10, 000 inputs each) of Covertype and Power. We show the results in Figure 2. Each column contains the results for a single dataset and each row for a single varying parameter (k, z, or m), along with standard errors over 5 runs. When a parameter is not varied we fix k = 50, z = 256, and m = 10. As expected, the objective value for all methods generally decreases as k increases (as the distance of any point to its cluster center must shrink with more clusters). RANDOM|RANDOM and RANDOM|OUTLIERS usually perform worse than GREEDY-MR for small k (save 10k Covertype) and RANDOM|OUTLIERS 1https://archive.ics.uci.edu/ml/datasets/ 7 20 40 60 80 100 0 20 40 60 80 100 m=10, z=256 k 20 40 60 80 100 1 1.2 1.4 1.6 1.8 2 2.2 2.4 m=10, z=256 k 20 40 60 80 100 0 50 100 150 200 250 m=10, z=256 k Covertype Power objective value Skin 20 40 60 80 100 0.15 0.2 0.25 0.3 m=10, z=256 k Yahoo 20 40 60 80 100 0 5 10 15 20 m=10, z=256 k Higgs number of clusters: k Random | Random Random | Outliers Greedy-MR Outliers-MR Figure 3: The objective value of five large-scale datasets, for varying k sometimes matches it for large k. For all values of k tested, OUTLIERS-MR outperforms all other distributed methods. Furthermore, it matches or slightly outperforms (which we attribute to randomness) the sequential OUTLIERS method in all settings. As z increases the two random methods improve, beyond GREEDY-MR in some cases. Similar to the first plot, OUTLIERS-MR outperforms all other distributed methods while matching the sequential clustering method. For very small settings of m (i.e., m = 2, 6), OUTLIERS-MR and GREEDY-MR perform slightly worse than sequential OUTLIERS and GREEDY. However, for practical settings of m (i.e., m ≥10), OUTLIERS-MR matches OUTLIERS and GREEDY-MR matches GREEDY. In terms of speed, on the largest of these datasets (Census) OUTLIERS-MR run sequentially is more than 677× faster than OUTLIERS, see Table 2. This large speedup is due to the fact that we cannot store the full distance matrix for Census, thus all distances need to be computed on demand. Table 2: The speedup of the distributed algorithms, run sequentially, over their sequential counterparts on the small datasets. dataset k-center outliers 10k Covertype 3.6 6.2 10k Power 4.8 9.4 Parkinson 4.9 4.4 Census 12.4 677.7 Large-scale. Our second set of experiments focus on the performance of the distributed methods on five large-scale datasets, shown in Figure 3. We vary k between 0 and 100, and fix m = 10 and z = 256. Note that for certain datasets, clustering while taking into account outliers produces a noticeable reduction in objective value. On Yahoo, the GREEDY-MR method is even outperformed by RANDOM|OUTLIERS that considers outliers. Similar to the small dataset results OUTLIERS-MR outperforms nearly all distributed methods (save for small k on Covertype). Even on datasets where there appear to be few outliers OUTLIERS-MR has excellent performance. Finally, OUTLIERS-MR is extremely fast: clustering on Higgs took less than 15 minutes. 6 Conclusion In this work we described algorithms for the k-center and k-center with outliers problems in the distributed setting. For both problems we studied two round MapReduce algorithms which achieve an O(1)-approximation and demonstrated that they perform almost identically to their sequential counterparts on real data. Further, a number of our experiments validate that using k-center clustering on noisy data degrades the quality of the solution. We hope these techniques lead to the discovery of fast and efficient distributed algorithms for other clustering problems. In particular, what can be shown for the k-median or k-means with outliers problems are exciting open questions. Acknowledgments GM was supported by CAPES/BR; MJK and KQW were supported by the NSF grants IIA-1355406, IIS-1149882, EFRI-1137211; and BM was supported by the Google and Yahoo Research Awards. References [1] P. K. Agarwal and J. M. Phillips. An efficient algorithm for 2d euclidean 2-center with outliers. In ESA, pages 64–75, 2008. [2] C. C. Aggarwal, J. L. Wolf, and P. S Yu. Method for targeted advertising on the web based on accumulated self-learning data, clustering users and semantic node graph techniques, March 30 2004. US Patent 6,714,975. [3] N. Ailon, R. Jaiswal, and C. Monteleoni. Streaming k-means approximation. In NIPS, pages 10–18, 2009. 8 [4] A. Andoni, A. Nikolov, K. Onak, and G. Yaroslavtsev. Parallel algorithms for geometric graph problems. In STOC, pages 574–583, 2014. [5] B. Bahmani, R. Kumar, and S. Vassilvitskii. Densest subgraph in streaming and mapreduce. PVLDB, 5 (5):454–465, 2012. [6] Bahman Bahmani, Benjamin Moseley, Andrea Vattani, Ravi Kumar, and Sergei Vassilvitskii. Scalable k-means++. PVLDB, 5(7):622–633, 2012. [7] M. Balcan, S. Ehrlich, and Y. Liang. Distributed k-means and k-median clustering on general communication topologies. In NIPS, pages 1995–2003, 2013. [8] Rafael Barbosa, Alina Ene, Huy Nguyen, and Justin Ward. The power of randomization: Distributed submodular maximization on massive datasets. In ICML, pages 1236–1244, 2015. [9] A. Z. Broder, L. G. Pueyo, V. Josifovski, S. Vassilvitskii, and S. Venkatesan. Scalable k-means by ranked retrieval. In WSDM, pages 233–242, 2014. [10] M. Charikar, S. Khuller, D. M. Mount, and G. Narasimhan. Algorithms for facility location problems with outliers. In SODA, pages 642–651, 2001. [11] M. Chen, K. Q. Weinberger, O. Chapelle, D. Kedem, and Z. Xu. Classifier cascade for minimizing feature evaluation cost. In AIStats, pages 218–226, 2012. [12] F. Chierichetti, R. Kumar, and A. Tomkins. Max-cover in map-reduce. In WWW, pages 231–240, 2010. [13] J. Dean and S. Ghemawat. MapReduce: Simplified data processing on large clusters. In OSDI, pages 137–150, 2004. [14] A. Ene, S. Im, and B. Moseley. Fast clustering using MapReduce. In KDD, pages 681–689, 2011. [15] J. Feldman, S. Muthukrishnan, A. Sidiropoulos, C. Stein, and Z. Svitkina. On distributing symmetric streaming computations. In SODA, pages 710–719, 2008. [16] T. F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38(0):293 – 306, 1985. ISSN 0304-3975. [17] S. Guha, A. Meyerson, N. Mishra, R. Motwani, and L. O’Callaghan. Clustering data streams: Theory and practice. IEEE Trans. Knowl. Data Eng., 15(3):515–528, 2003. [18] Sudipto Guha, Rajeev Rastogi, and Kyuseok Shim. Techniques for clustering massive data sets. In Clustering and Information Retrieval, volume 11 of Network Theory and Applications, pages 35–82. Springer US, 2004. ISBN 978-1-4613-7949-2. [19] M. Hassani, E. M¨uller, and T. Seidl. EDISKCO: energy efficient distributed in-sensor-network k-center clustering with outliers. In SensorKDD-Workshop, pages 39–48, 2009. [20] D. S. Hochbaum and D. B. Shmoys. A best possible heuristic for the k-center problem. Mathematics of Operations Research, 10(2):180–184, 1985. [21] H. J. Karloff, S. Suri, and S. Vassilvitskii. A model of computation for MapReduce. In SODA, pages 938–948, 2010. [22] L. Kaufman and P. J. Rousseeuw. Finding Groups in Data: An Introduction to Cluster Analysis. WileyInterscience, 9th edition, March 1990. ISBN 0471878766. [23] Ravi Kumar, Benjamin Moseley, Sergei Vassilvitskii, and Andrea Vattani. Fast greedy algorithms in mapreduce and streaming. In SPAA, pages 1–10, 2013. [24] R. M. McCutchen and S. Khuller. Streaming algorithms for k-center clustering with outliers and with anonymity. In APPROX-RANDOM, pages 165–178, 2008. [25] B. Mirzasoleiman, A. Karbasi, R. Sarkar, and A. Krause. Distributed submodular maximization: Identifying representative elements in massive data. In NIPS, pages 2049–2057, 2013. [26] M. Shindler, A. Wong, and A. W. Meyerson. Fast and accurate k-means for large datasets. In NIPS, pages 2375–2383, 2011. [27] S. Suri and S. Vassilvitskii. Counting triangles and the curse of the last reducer. In WWW, pages 607–614, 2011. [28] A. Tsanas, M. A Little, P. E McSharry, and L. O Ramig. Enhanced classical dysphonia measures and sparse regression for telemonitoring of parkinson’s disease progression. In ICASSP, pages 594–597. IEEE, 2010. [29] S. Tyree, K.Q. Weinberger, K. Agrawal, and J. Paykin. Parallel boosted regression trees for web search ranking. In WWW, pages 387–396. ACM, 2011. [30] O. Zamir, O. Etzioni, O. Madani, and R. M Karp. Fast and intuitive clustering of web documents. In KDD, volume 97, pages 287–290, 1997. [31] Z. Zhao, G. Wang, A.R. Butt, M. Khan, V.S.A. Kumar, and M.V. Marathe. Sahad: Subgraph analysis in massive networks using hadoop. In IPDPS, pages 390–401, May 2012. 9 | 2015 | 226 |
5,732 | BACKSHIFT: Learning causal cyclic graphs from unknown shift interventions Dominik Rothenh¨ausler⇤ Seminar f¨ur Statistik ETH Z¨urich, Switzerland rothenhaeusler@stat.math.ethz.ch Christina Heinze⇤ Seminar f¨ur Statistik ETH Z¨urich, Switzerland heinze@stat.math.ethz.ch Jonas Peters Max Planck Institute for Intelligent Systems T¨ubingen, Germany jonas.peters@tuebingen.mpg.de Nicolai Meinshausen Seminar f¨ur Statistik ETH Z¨urich, Switzerland meinshausen@stat.math.ethz.ch Abstract We propose a simple method to learn linear causal cyclic models in the presence of latent variables. The method relies on equilibrium data of the model recorded under a specific kind of interventions (“shift interventions”). The location and strength of these interventions do not have to be known and can be estimated from the data. Our method, called BACKSHIFT, only uses second moments of the data and performs simple joint matrix diagonalization, applied to differences between covariance matrices. We give a sufficient and necessary condition for identifiability of the system, which is fulfilled almost surely under some quite general assumptions if and only if there are at least three distinct experimental settings, one of which can be pure observational data. We demonstrate the performance on some simulated data and applications in flow cytometry and financial time series. 1 Introduction Discovering causal effects is a fundamentally important yet very challenging task in various disciplines, from public health research and sociological studies, economics to many applications in the life sciences. There has been much progress on learning acyclic graphs in the context of structural equation models [1], including methods that learn from observational data alone under a faithfulness assumption [2, 3, 4, 5], exploiting non-Gaussianity of the data [6, 7] or non-linearities [8]. Feedbacks are prevalent in most applications, and we are interested in the setting of [9], where we observe the equilibrium data of a model that is characterized by a set of linear relations x = Bx + e, (1) where x 2 Rp is a random vector and B 2 Rp⇥p is the connectivity matrix with zeros on the diagonal (no self-loops). Allowing for self-loops would lead to an identifiability problem, independent of the method. See Section B in the Appendix for more details on this setting. The graph corresponding to B has p nodes and an edge from node j to node i if and only if Bi,j 6= 0. The error terms e are p-dimensional random variables with mean 0 and positive semi-definite covariance matrix ⌃e = E(eeT ). We do not assume that ⌃e is a diagonal matrix which allows the existence of latent variables. The solutions to (1) can be thought of as the deterministic equilibrium solutions (conditional on the noise term) of a dynamic model governed by first-order difference equations with matrix B in the ⇤Authors contributed equally. 1 sense of [10]. For well-defined equilibrium solutions of (1), we need that I−B is invertible. Usually we also want (1) to converge to an equilibrium when iterating as x(new) Bx(old) + e or in other words limm!1 Bm ⌘0. This condition is equivalent to the spectral radius of B being strictly smaller than one [11]. We will make an assumption on cyclic graphs that restricts the strength of the feedback. Specifically, let a cycle of length ⌘be given by (m1, . . . , m⌘+1 = m1) 2 {1, . . . , p}1+⌘ and mk 6= m` for 1 k < ` ⌘. We define the cycle-product CP(B) of a matrix B to be the maximum over cycles of all lengths 1 < ⌘p of the path-products CP(B) := max (m1,...,m⌘,m⌘+1) cycle 1<⌘p Y 1k⌘ ""Bmk+1,mk "" . (2) The cycle-product CP(B) is clearly zero for acyclic graphs. We will assume the cycle-product to be strictly smaller than one for identifiability results, see Assumption (A) below. The most interesting graphs are those for which CP(B) < 1 and for which the spectral radius of B is strictly smaller than one. Note that these two conditions are identical as long as the cycles in the graph do not intersect, i.e., there is no node that is part of two cycles (for example if there is at most one cycle in the graph). If cycles do intersect, we can have models for which either (i) CP(B) < 1 but the spectral radius is larger than one or (ii) CP(B) > 1 but the spectral radius is strictly smaller than one. Models in situation (ii) are not stable in the sense that the iterations will not converge under interventions. We can for example block all but one cycle. If this one single unblocked cycle has a cycle-product larger than 1 (and there is such a cycle in the graph if CP(B) > 1), then the solutions of the iteration are not stable1. Models in situation (i) are not stable either, even in the absence of interventions. We can still in theory obtain the now instable equilibrium solutions to (1) as (I −B)−1e and the theory below applies to these instable equilibrium solutions. However, such instable equilibrium solutions are arguably of little practical interest. In summary: all interesting feedback models that are stable under interventions satisfy both CP(B) < 1 and have a spectral radius strictly smaller than one. We will just assume CP(B) < 1 for the following results. It is impossible to learn the structure B of this model from observational data alone without making further assumptions. The LINGAM approach has been extended in [11] to cyclic models, exploiting a possible non-Gaussianity of the data. Using both experimental and interventional data, [12, 9] could show identifiability of the connectivity matrix B under a learning mechanism that relies on data under so-called “surgical” or “perfect” interventions. In their framework, a variable becomes independent of all its parents if it is being intervened on and all incoming contributions are thus effectively removed under the intervention (also called do-interventions in the classical sense of [13]). The learning mechanism makes then use of the knowledge where these “surgical” interventions occurred. [14] also allow for “changing” the incoming arrows for variables that are intervened on; but again, [14] requires the location of the interventions while we do not assume such knowledge. [15] consider a target variable and allow for arbitrary interventions on all other nodes. They neither permit hidden variables nor cycles. Here, we are interested in a setting where we have either no or just very limited knowledge about the exact location and strength of the interventions, as is often the case for data observed under different environments (see the example on financial time series further below) or for biological data [16, 17]. These interventions have been called “fat-hand” or “uncertain” interventions [18]. While [18] assume acyclicity and model the structure explicitly in a Bayesian setting, we assume that the data in environment j are equilibrium observations of the model xj = Bxj + cj + ej, (3) where the random intervention shift cj has a mean and covariance ⌃c,j. The location of these interventions (or simply the intervened variables) are those components of cj that are not zero with probability one. Given these locations, the interventions simply shift the variables by a value determined by cj; they are therefore not “surgical” but can be seen as a special case of what is called an “imperfect”, “parametric” [19] or “dependent” intervention [20] or “mechanism change” [21]. The matrix B and the error distribution of ej are assumed to be identical in all environments. In contrast to the covariance matrix for the noise term ej, we do assume that ⌃c,j is a diagonal 1The blocking of all but one cycle can be achieved by do-interventions on appropriate variables under the following condition: for every pair of cycles in the graph, the variables in one cycle cannot be a subset of the variables in the other cycle. Otherwise the blocking could be achieved by deletion of appropriate edges. 2 matrix, which is equivalent to demanding that interventions at different variables are uncorrelated. This is a key assumption necessary to identify the model using experimental data. Furthermore, we will discuss in Section 4.2 how a violation of the model assumption (3) can be detected and used to estimate the location of the interventions. In Section 2 we show how to leverage observations under different environments with different interventional distributions to learn the structure of the connectivity matrix B in model (3). The method rests on a simple joint matrix diagonalization. We will prove necessary and sufficient conditions for identifiability in Section 3. Numerical results for simulated data and applications in flow cytometry and financial data are shown in Section 4. 2 Method 2.1 Grouping of data Let J be the set of experimental conditions under which we observe equilibrium data from model (3). These different experimental conditions can arise in two ways: (a) a controlled experiment was conducted where the external input or the external imperfect interventions have been deliberately changed from one member of J to the next. An example are the flow cytometry data [22] discussed in Section 4.2. (b) The data are recorded over time. It is assumed that the external input is changing over time but not in an explicitly controlled way. The data are grouped into consecutive blocks j 2 J of observations, see Section 4.3 for an example. 2.2 Notation Assume we have nj observations in each setting j 2 J . Let Xj be the (nj ⇥p)-matrix of observations from model (3). For general random variables aj 2 Rp , the population covariance matrix in setting j 2 J is called ⌃a,j = Cov(aj), where the covariance is under the setting j 2 J . Furthermore, the covariance on all settings except setting j 2 J is defined as an average over all environments except for the j-th environment, (|J |−1)⌃c,−j := P j02J \{j} ⌃c,j0. The population Gram matrix is defined as Ga,j = E(ajajT ). Let the (p ⇥p)-dimensional ˆ⌃a,j be the empirical covariance matrix of the observations Aj 2 Rnj⇥p of variable aj in setting j 2 J . More precisely, let ˜Aj be the column-wise mean-centered version of Aj. Then ˆ⌃a,j := (nj −1)−1 ˜AT j ˜Aj. The empirical Gram matrix is denoted by ˆGa,j := n−1 j AT j Aj. 2.3 Assumptions The main assumptions have been stated already but we give a summary below. (A) The data are observations of the equilibrium observations of model (3). The matrix I −B is invertible and the solutions to (3) are thus well defined. The cycle-product (2) CP(B) is strictly smaller than one. The diagonal entries of B are zero. (B) The distribution of the noise ej (which includes the influence of latent variables) and the connectivity matrix B are identical across all settings j 2 J . In each setting j 2 J , the intervention shift cj and the noise ej are uncorrelated. (C) Interventions at different variables in the same setting are uncorrelated, that is ⌃c,j is an (unknown) diagonal matrix for all j 2 J . We will discuss a stricter version of (C) in Section D in the Appendix that allows the use of Gram matrices instead of covariance matrices. The conditions above imply that the environments are characterized by different interventions strength, as measured by the variance of the shift c in each setting. We aim to reconstruct both the connectivity matrix B from observations in different environments and also aim to reconstruct the a-priori unknown intervention strength and location in each environment. Additionally, we will show examples where we can detect violations of the model assumptions and use these to reconstruct the location of interventions. 2.4 Population method The main idea is very simple. Looking at the model (3), we can rewrite (I −B)xj = cj + ej. (4) 3 The population covariance of the transformed observations are then for all settings j 2 J given by (I −B)⌃x,j(I −B)T = ⌃c,j + ⌃e. (5) The last term ⌃e is constant across all settings j 2 J (but not necessarily diagonal as we allow hidden variables). Any change of the matrix on the left-hand side thus stems from a shift in the covariance matrix ⌃c,j of the interventions. Let us define the difference between the covariance of c and x in setting j as ∆⌃c,j := ⌃c,j −⌃c,−j, and ∆⌃x,j := ⌃x,j −⌃x,−j. (6) Assumption (B) together with (5) implies that (I −B)∆⌃x,j(I −B)T = ∆⌃c,j 8j 2 J . (7) Using assumption (C), the random intervention shifts at different variables are uncorrelated and the right-hand side in (7) is thus a diagonal matrix for all j 2 J . Let D ⇢Rp⇥p be the set of all invertible matrices. We also define a more restricted space Dcp which only includes those members of D that have entries all equal to one on the diagonal and have a cycle-product less than one, D := n D 2 Rp⇥p : D invertible o (8) Dcp := n D 2 Rp⇥p : D 2 D and diag(D) ⌘1 and CP(I −D) < 1 o . (9) Under Assumption (A), I −B 2 Dcp. Motivated by (7), we now consider the minimizer D = argminD02Dcp X j2J L(D0∆⌃x,jD0T ), where L(A) := X k6=l A2 k,l (10) is the loss L for any matrix A and defined as the sum of the squared off-diagonal elements. In Section 3, we present necessary and sufficient conditions on the interventions under which D = I −B is the unique minimizer of (10). In this case, exact joint diagonalization is possible so that L(D∆⌃x,jDT ) = 0 for all environments j 2 J . We discuss an alternative that replaces covariance with Gram matrices throughout in Section D in the Appendix. We now give a finite-sample version. 2.5 Finite-sample estimate of the connectivity matrix Algorithm 1 BACKSHIFT Input: Xj 8j 2 J 1: Compute d ∆⌃x,j 8j 2 J 2: ˜D = FFDIAG( d ∆⌃x,j) 3: ˆD = PermuteAndScale( ˜D) 4: ˆB = I −ˆD Output: ˆB In practice, we estimate B by minimizing the empirical counterpart of (10) in two steps. First, the solution of the optimization is only constrained to matrices in D. Subsequently, we enforce the constraint on the solution to be a member of Dcp. The BACKSHIFT algorithm is presented in Algorithm 1 and we describe the important steps in more detail below. Steps 1 & 2. First, we minimize the following empirical, less constrained variant of (10) ˜D := argminD02D X j2J L(D0( d ∆⌃x,j)D0T ), (11) where the population differences between covariance matrices are replaced with their empirical counterparts and the only constraint on the solution is that it is invertible, i.e. ˜D 2 D. For the optimization we use the joint approximate matrix diagonalization algorithm FFDIAG [23]. Step 3. The constraint on the cycle product and the diagonal elements of D is enforced by (a) permuting and (b) scaling the rows of ˜D. Part (b) simply scales the rows so that the diagonal elements of the resulting matrix ˆD are all equal to one. The more challenging first step (a) consists of finding a permutation such that under this permutation the scaled matrix from part (b) will have a cycle product as small as possible (as follows from Theorem 3, at most one permutation can lead to a cycle product less than one). This optimization problem seems computationally challenging at first, but we show that it can be solved by a variant of the linear assignment problem (LAP) (see e.g. [24]), as proven in Theorem 3 in the Appendix. As a last step, we check whether the cycle product of ˆD is less than one, in which case we have found the solution. Otherwise, no solution satisfying the model assumptions exists and we return a warning that the model assumptions are not met. See Appendix B for more details. 4 Computational cost. The computational complexity of BACKSHIFT is O(|J |·n·p2) as computing the covariance matrices costs O(|J |·n·p2), FFDIAG has a computational cost of O(|J |·p2) and both the linear assignment problem and computing the cycle product can be solved in O(p3) time. For instance, this complexity is achieved when using the Hungarian algorithm for the linear assignment problem (see e.g. [24]) and the cycle product can be computed with a simple dynamic programming approach. 2.6 Estimating the intervention variances One additional benefit of BACKSHIFT is that the location and strength of the interventions can be estimated from the data. The empirical, plug-in version of Eq. (7) is given by (I −ˆB) d ∆⌃x,j(I −ˆB)T = d ∆⌃c,j = b⌃c,j −b⌃c,−j 8j 2 J . (12) So the element ( d ∆⌃c,j)kk is an estimate for the difference between the variance of the intervention at variable k in environment j, namely (⌃c,j)kk, and the average in all other environments, (⌃c,−j)kk. From these differences we can compute the intervention variance for all environments up to an offset. By convention, we set the minimal intervention variance across all environments equal to zero. Alternatively, one can let observational data, if available, serve as a baseline against which the intervention variances are measured. 3 Identifiability Let for simplicity of notation, ⌘j,k := (∆⌃c,j)kk be the variance of the random intervention shifts cj at node k in environment j 2 J as per the definition of ∆⌃c,j in (6). We then have the following identifiability result (the proof is provided in Appendix A). Theorem 1. Under assumptions (A), (B) and (C), the solution to (10) is unique if and only if for all k, l 2 {1, . . . , p} there exist j, j0 2 J such that ⌘j,k⌘j0,l 6= ⌘j,l⌘j0,k . (13) If none of the intervention variances ⌘j,k vanishes, the uniqueness condition is equivalent to demanding that the ratio between the intervention variances for two variables k, l must not stay identical across all environments, that is there exist j, j0 2 J such that ⌘j,k ⌘j,l 6= ⌘j0,k ⌘j0,l , (14) which requires that the ratio of the variance of the intervention shifts at two nodes k, l is not identical across all settings. This leads to the following corollary. Corollary 2. (i) The identifiability condition (13) cannot be satisfied if |J | = 2 since then ⌘j,k = −⌘j0,k for all k and j 6= j0. We need at least three different environments for identifiability. (ii) The identifiability condition (13) is satisfied for all |J | ≥3 almost surely if the variances of the intervention cj are chosen independently (over all variables and environments j 2 J ) from a distribution that is absolutely continuous with respect to Lebesgue measure. Condition (ii) can be relaxed but shows that we can already achieve full identifiability with a very generic setting for three (or more) different environments. 4 Numerical results In this section, we present empirical results for both synthetic and real data sets. In addition to estimating the connectivity matrix B, we demonstrate various ways to estimate properties of the interventions. Besides computing the point estimate for BACKSHIFT, we use stability selection [25] to assess the stability of retrieved edges. We attach R-code with which all simulations and analyses can be reproduced2. 2An R-package called “backShift” is available from CRAN. 5 0.72 0.46 0.76 −0.73 0.67 0.54 −0.65 2.1 −0.69 0.52 0.34 1 10 2 3 4 5 6 7 8 1 9 (a) X1 X2 X3 I1 I2 I3 E1 E2 E3 W β1 β2 β3 γ1 γ2 γ3 (b) ● ●● 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 RECALL PRECISION Method ●BACKSHIFT LING Interv. strength ● ● ● 0 0.5 1 Sample size ● ● 1000 10000 Hidden vars. ●FALSE TRUE (c) Figure 1: Simulated data. (a) True network. (b) Scheme for data generation. (c) Performance metrics for the settings considered in Section 4.1. For BACKSHIFT, precision and recall values for Settings 1 and 2 coincide. Setting 1 Setting 2 Setting 3 Setting 4 Setting 5 n = 1000 n = 10000 n = 10000 n = 10000 n = 10000 no hidden vars. no hidden vars. hidden vars. no hidden vars. no hidden vars. mI = 1 mI = 1 mI = 1 mI = 0 mI = 0.5 BACKSHIFT 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 SHD = 0, |t| = 0.25 SHD = 0, |t| = 0.25 SHD = 2, |t| = 0.25 SHD = 12 SHD = 5, |t| = 0.25 LING 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 10 2 3 4 5 6 7 8 1 9 SHD = 17, |t| = 0.91 SHD = 14, |t| = 0.68 SHD = 16, |t| = 0.98 SHD = 8, |t| = 0.25 SHD = 7, |t| = 0.29 Figure 2: Point estimates of BACKSHIFT and LING for synthetic data. We threshold the point estimate of BACKSHIFT at t = ±0.25 to exclude those entries which are close to zero. We then threshold the estimate of LING so that the two estimates have the same number of edges. In Setting 4, we threshold LING at t = ±0.25 as BACKSHIFT returns the empty graph. In Setting 3, it is not possible to achieve the same number of edges as all remaining coefficients in the point estimate of LING are equal to one in absolute value. The transparency of the edges illustrates the relative magnitude of the estimated coefficients. We report the structural Hamming distance (SHD) for each graph. Precision and recall values are shown in Figure 1(c). 4.1 Synthetic data We compare the point estimate of BACKSHIFT against LING [11], a generalization of LINGAM to the cyclic case for purely observational data. We consider the cyclic graph shown in Figure 1(a) and generate data under different scenarios. The data generating mechanism is sketched in Figure 1(b). Specifically, we generate ten distinct environments with non-Gaussian noise. In each environment, the random intervention variable is generated as (cj)k = βj kIj k, where βj 1, . . . , βj p are drawn i.i.d. from Exp(mI) and Ij 1, . . . , Ij p are independent standard normal random variables. The intervention shift thus acts on all observed random variables. The parameter mI regulates the strength of the intervention. If hidden variables exist, the noise term (ej)k of variable k in environment j is equal to γkW j, where the weights γ1, . . . , γp are sampled once from a N(0, 1)-distribution and the random variable W j has a Laplace(0, 1) distribution. If no hidden variables are present, then (ej)k, k = 1, . . . , p is sampled i.i.d. Laplace(0, 1). In this set of experiments, we consider five different settings (described below) in which the sample size n, the intervention strength mI as well as the existence of hidden variables varies. We allow for hidden variables in only one out of five settings as LING assumes causal sufficiency and can thus in theory not cope with hidden variables. If no hidden variables are present, the pooled data can be interpreted as coming from a model whose error variables follow a mixture distribution. But if one of the error variables comes from the second mixture component, for example, the other 6 Raf Mek PLCg PIP2 PIP3 Erk Akt PKA PKC p38 JNK (a) Raf Mek PLCg PIP2 PIP3 Erk Akt PKA PKC p38 JNK (b) Raf Mek PLCg PIP2 PIP3 Erk Akt PKA PKC p38 JNK (c) Raf Mek PLCg PIP2 PIP3 Erk Akt PKA PKC p38 JNK (d) Figure 3: Flow cytometry data. (a) Union of the consensus network (according to [22]), the reconstruction by [22] and the best acyclic reconstruction by [26]. The edge thickness and intensity reflect in how many of these three sources that particular edge is present. (b) One of the cyclic reconstructions by [26]. The edge thickness and intensity reflect the probability of selecting that particular edge in the stability selection procedure. For more details see [26]. (c) BACKSHIFT point estimate, thresholded at ±0.35. The edge intensity reflects the relative magnitude of the coefficients and the coloring is a comparison to the union of the graphs shown in panels (a) and (b). Blue edges were also found in [26] and [22], purple edges are reversed and green edges were not previously found in (a) or (b). (d) BACKSHIFT stability selection result with parameters E(V ) = 2 and ⇡thr = 0.75. The edge thickness illustrates how often an edge was selected in the stability selection procedure. error variables come from the second mixture component, too. In this sense, the data points are not independent anymore. This poses a challenge for LING which assumes an i.i.d. sample. We also cover a case (for mI = 0) in which all assumptions of LING are satisfied (Scenario 4). Figure 2 shows the estimated connectivity matrices for five different settings and Figure 1(c) shows the obtained precision and recall values. In Setting 1, n = 1000, mI = 1 and there are no hidden variables. In Setting 2, n is increased to 10000 while the other parameters do not change. We observe that BACKSHIFT retrieves the correct adjacency matrix in both cases while LING’s estimate is not very accurate. It improves slightly when increasing the sample size. In Setting 3, we do include hidden variables which violates the causal sufficiency assumption required for LING. Indeed, the estimate is worse than in Setting 2 but somewhat better than in Setting 1. BACKSHIFT retrieves two false positives in this case. Setting 4 is not feasible for BACKSHIFT as the distribution of the variables is identical in all environments (since mI = 0). In Step 2 of the algorithm, FFDIAG does not converge and therefore the empty graph is returned. So the recall value is zero while precision is not defined. For LING all assumptions are satisfied and the estimate is more accurate than in the Settings 1–3. Lastly, Setting 5 shows that when increasing the intervention strength to 0.5, BACKSHIFT returns a few false positives. Its performance is then similar to LING which returns its most accurate estimate in this scenario. The stability selection results for BACKSHIFT are provided in Figure 5 in Appendix E. In short, these results suggest that the BACKSHIFT point estimates are close to the true graph if the interventions are sufficiently strong. Hidden variables make the estimation problem more difficult but the true graph is recovered if the strength of the intervention is increased (when increasing mI to 1.5 in Setting 3, BACKSHIFT obtains a SHD of zero). In contrast, LING is unable to cope with hidden variables but also has worse accuracy in the absence of hidden variables under these shift interventions. 4.2 Flow cytometry data The data published in [22] is an instance of a data set where the external interventions differ between the environments in J and might act on several compounds simultaneously [18]. There are nine different experimental conditions with each containing roughly 800 observations which correspond to measurements of the concentration of biochemical agents in single cells. The first setting corresponds to purely observational data. In addition to the original work by [22], the data set has been described and analyzed in [18] and [26]. We compare against the results of [26], [22] and the “well-established consensus”, according to [22], shown in Figures 3(a) and 3(b). Figure 3(c) shows the (thresholded) BACKSHIFT point estimate. Most of the retrieved edges were also found in at least one of the previous studies. Five edges are reversed in our estimate and three edges were not discovered previously. Figure 3(d) shows the corresponding stability selection result with the expected number of falsely selected variables 7 TIME LOG(PRICE) 2001 2003 2005 2007 2009 2011 6.5 7.0 7.5 8.0 8.5 9.0 DAX S&P 500 NASDAQ (a) Prices (logarithmic) TIME 2001 2003 2005 2007 2009 2011 LOG−RETURNS DAX S&P 500 NASDAQ (b) Daily log-returns TIME 2001 2003 2005 2007 2009 2011 EST. INTERVENTION VARIANCE DAX S&P 500 NASDAQ (c) BACKSHIFT TIME 2001 2003 2005 2007 2009 2011 EST. INTERVENTION VARIANCE DAX S&P 500 NASDAQ (d) LING Figure 4: Financial time series with three stock indices: NASDAQ (blue; technology index), S&P 500 (green; American equities) and DAX (red; German equities). (a) Prices of the three indices between May 2000 and end of 2011 on a logarithmic scale. (b) The scaled log-returns (daily change in log-price) of the three instruments are shown. Three periods of increased volatility are visible starting with the dot-com bust on the left to the financial crisis in 2008 and the August 2011 downturn. (c) The scaled estimated intervention variance with the estimated BACKSHIFT network. The three down-turns are clearly separated as originating in technology, American and European equities. (d) In contrast, the analogous LING estimated intervention variances have a peak in American equities intervention variance during the European debt crisis in 2011. E(V ) = 2. This estimate is sparser in comparison to the other ones as it bounds the number of false discoveries. Notably, the feedback loops between PIP2 $ PLCg and PKC $ JNK were also found in [26]. It is also noteworthy that we can check the model assumptions of shift interventions, which is important for these data as they can be thought of as changing the mechanism or activity of a biochemical agent rather than regulate the biomarker directly [26]. If the shift interventions are not appropriate, we are in general not able to diagonalize the differences in the covariance matrices. Large off-diagonal elements in the estimate of the r.h.s in (7) indicate a mechanism change that is not just explained by a shift intervention as in (1). In four of the seven interventions environments with known intervention targets the largest mechanism violation happens directly at the presumed intervention target, see Appendix C for details. It is worth noting again that the presumed intervention target had not been used in reconstructing the network and mechanism violations. 4.3 Financial time series Finally, we present an application in financial time series where the environment is clearly changing over time. We consider daily data from three stock indices NASDAQ, S&P 500 and DAX for a period between 2000-2012 and group the data into 74 overlapping blocks of 61 consecutive days each. We take log-returns, as shown in panel (b) of Figure 4 and estimate the connectivity matrix, which is fully connected in this case and perhaps of not so much interest in itself. It allows us, however, to estimate the intervention strength at each of the indices according to (12), shown in panel (c). The intervention variances separate very well the origins of the three major down-turns of the markets on the period. Technology is correctly estimated by BACKSHIFT to be at the epicenter of the dot-com crash in 2001 (NASDAQ as proxy), American equities during the financial crisis in 2008 (proxy is S&P 500) and European instruments (DAX as best proxy) during the August 2011 downturn. 5 Conclusion We have shown that cyclic causal networks can be estimated if we obtain covariance matrices of the variables under unknown shift interventions in different environments. BACKSHIFT leverages solutions to the linear assignment problem and joint matrix diagonalization and the part of the computational cost that depends on the number of variables is at worst cubic. We have shown sufficient and necessary conditions under which the network is fully identifiable, which require observations from at least three different environments. The strength and location of interventions can also be reconstructed. References [1] K.A. Bollen. Structural Equations with Latent Variables. John Wiley & Sons, New York, USA, 1989. 8 [2] P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction, and Search. MIT Press, Cambridge, USA, 2nd edition, 2000. [3] D.M. Chickering. Optimal structure identification with greedy search. Journal of Machine Learning Research, 3:507–554, 2002. [4] M.H. Maathuis, M. Kalisch, and P. B¨uhlmann. Estimating high-dimensional intervention effects from observational data. Annals of Statistics, 37:3133–3164, 2009. [5] A. Hauser and P. B¨uhlmann. Characterization and greedy learning of interventional Markov equivalence classes of directed acyclic graphs. Journal of Machine Learning Research, 13:2409–2464, 2012. [6] P.O. Hoyer, D. Janzing, J.M. Mooij, J. Peters, and B. Sch¨olkopf. Nonlinear causal discovery with additive noise models. In Advances in Neural Information Processing Systems 21 (NIPS), pages 689–696, 2009. [7] S. Shimizu, T. Inazumi, Y. Sogawa, A. Hyv¨arinen, Y. Kawahara, T. Washio, P.O. Hoyer, and K. Bollen. DirectLiNGAM: A direct method for learning a linear non-Gaussian structural equation model. Journal of Machine Learning Research, 12:1225–1248, 2011. [8] J.M. Mooij, D. Janzing, T. Heskes, and B. Sch¨olkopf. On causal discovery with cyclic additive noise models. In Advances in Neural Information Processing Systems 24 (NIPS), pages 639–647, 2011. [9] A. Hyttinen, F. Eberhardt, and P. O. Hoyer. Learning linear cyclic causal models with latent variables. Journal of Machine Learning Research, 13:3387–3439, 2012. [10] S.L. Lauritzen and T.S. Richardson. Chain graph models and their causal interpretations. Journal of the Royal Statistical Society, Series B, 64:321–348, 2002. [11] G. Lacerda, P. Spirtes, J. Ramsey, and P.O. Hoyer. Discovering cyclic causal models by independent components analysis. In Proceedings of the 24th Conference on Uncertainty in Artificial Intelligence (UAI), pages 366–374, 2008. [12] R. Scheines, F. Eberhardt, and P.O. Hoyer. Combining experiments to discover linear cyclic models with latent variables. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 185–192, 2010. [13] J. Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, New York, USA, 2nd edition, 2009. [14] F. Eberhardt, P. O. Hoyer, and R. Scheines. Combining experiments to discover linear cyclic models with latent variables. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 185–192, 2010. [15] J. Peters, P. B¨uhlmann, and N. Meinshausen. Causal inference using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society, Series B, to appear., 2015. [16] A.L. Jackson, S.R. Bartz, J. Schelter, S.V. Kobayashi, J. Burchard, M. Mao, B. Li, G. Cavet, and P.S. Linsley. Expression profiling reveals off-target gene regulation by RNAi. Nature Biotechnology, 21:635– 637, 2003. [17] M.M. Kulkarni, M. Booker, S.J. Silver, A. Friedman, P. Hong, N. Perrimon, and B. Mathey-Prevot. Evidence of off-target effects associated with long dsrnas in drosophila melanogaster cell-based assays. Nature methods, 3:833–838, 2006. [18] D. Eaton and K. Murphy. Exact Bayesian structure learning from uncertain interventions. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 107–114, 2007. [19] F. Eberhardt and R. Scheines. Interventions and causal inference. Philosophy of Science, 74:981–995, 2007. [20] K. Korb, L. Hope, A. Nicholson, and K. Axnick. Varieties of causal intervention. In Proceedings of the Pacific Rim Conference on AI, pages 322–331, 2004. [21] J. Tian and J. Pearl. Causal discovery from changes. In Proceedings of the 17th Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 512–522, 2001. [22] K. Sachs, O. Perez, D. Pe’er, D. Lauffenburger, and G. Nolan. Causal protein-signaling networks derived from multiparameter single-cell data. Science, 308:523–529, 2005. [23] A. Ziehe, P. Laskov, G. Nolte, and K.-R. M¨uller. A fast algorithm for joint diagonalization with nonorthogonal transformations and its application to blind source separation. Journal of Machine Learning Research, 5:801–818, 2004. [24] R.E. Burkard. Quadratic assignment problems. In P. M. Pardalos, D.-Z. Du, and R. L. Graham, editors, Handbook of Combinatorial Optimization, pages 2741–2814. Springer New York, 2nd edition, 2013. [25] N. Meinshausen and P. B¨uhlmann. Stability selection. Journal of the Royal Statistical Society, Series B, 72:417–473, 2010. [26] J.M. Mooij and T. Heskes. Cyclic causal discovery from continuous equilibrium data. In Proceedings of the 29th Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 431–439, 2013. 9 | 2015 | 227 |
5,733 | Lifelong Learning with Non-i.i.d. Tasks Anastasia Pentina IST Austria Klosterneuburg, Austria apentina@ist.ac.at Christoph H. Lampert IST Austria Klosterneuburg, Austria chl@ist.ac.at Abstract In this work we aim at extending the theoretical foundations of lifelong learning. Previous work analyzing this scenario is based on the assumption that learning tasks are sampled i.i.d. from a task environment or limited to strongly constrained data distributions. Instead, we study two scenarios when lifelong learning is possible, even though the observed tasks do not form an i.i.d. sample: first, when they are sampled from the same environment, but possibly with dependencies, and second, when the task environment is allowed to change over time in a consistent way. In the first case we prove a PAC-Bayesian theorem that can be seen as a direct generalization of the analogous previous result for the i.i.d. case. For the second scenario we propose to learn an inductive bias in form of a transfer procedure. We present a generalization bound and show on a toy example how it can be used to identify a beneficial transfer algorithm. 1 Introduction Despite the tremendous growth of available data over the past decade, the lack of fully annotated data, which is an essential part of success of any traditional supervised learning algorithm, demands methods that allow good generalization from limited amounts of training data. One way to approach this is provided by the lifelong learning (or learning to learn [1]) paradigm, which is based on the idea of accumulating knowledge over the course of learning multiple tasks in order to improve the performance on future tasks. In order for this scenario to make sense one has to define what kind of relations connect the observed tasks with the future ones. The first formal model of lifelong learning was proposed by Baxter in [2]. He introduced the notion of task environment – a set of all tasks that may need to be solved together with a probability distribution over them. In Baxter’s model the lifelong learning system observes tasks that are sampled i.i.d. from the task environment. This allows proving bounds in the PAC framework [3, 4] that guarantee that a hypothesis set or inductive bias that works well on the observed tasks will also work well on future tasks from the same environment. Baxter’s results were later extended using algorithmic stability [5], task similarity measures [6], and PAC-Bayesian analysis [7]. Specific cases that were studied include feature learning [8] and sparse coding [9]. All these works, however, assume that the observed tasks are independently and identically distributed, as the original work by Baxter did. This assumption allows making predictions about the future of the learning process, but it limits the applicability of the results in practice. To our knowledge, only the recent [10] has studied lifelong learning without an i.i.d. assumption. However, the considered framework is limited to binary classification with linearly separable classes and isotropic log-concave data distributions. In this work we use the PAC-Bayesian framework to study two possible relaxations of the i.i.d. assumption without restricting the class of possible data distributions. First, we study the case in which tasks can have dependencies between them, but are still sampled from a fixed task environment. An 1 illustrative example would be when task are to predict the outcome of chess games. Whenever a player plays multiple games the corresponding tasks are not be independent. In this setting we retain many concepts of [7] and learn an inductive bias in the form of a probability distribution. We prove a bound relating the expected error when relying on the learned bias for future tasks to its empirical error over the observed tasks. It has the same form as for the i.i.d. situation, except for a slowdown of convergence proportional to a parameter capturing the amount of dependence between tasks. Second, we introduce a new and more flexible lifelong learning setting, in which the learner observes a sequence of tasks from different task environments. This could be, e.g., classification tasks of increasing difficulty. In this setting one cannot expect that transferring an inductive bias from observed tasks to future tasks will be beneficial, because the task environment is not stationary. Instead, we aim at learning an effective transfer algorithm: a procedure that solves a task taking information from a previous task into account. We bound the expected performance of such algorithms when applied to future tasks based on their performance on the observed tasks. 2 Preliminaries Following Baxter’s model [2] we assume that all tasks that may need to be solved share the same input space X and output space Y. The lifelong learning system observes n tasks t1, . . . , tn in form of training sets S1, . . . , Sn, where each Si = {(xi 1, yi 1), . . . , (xi m, yi m)} is a set of m points sampled i.i.d. from the corresponding unknown data distribution Di over X ×Y. In contrast to previous works on lifelong learning [2, 5, 8] we omit the assumption that the observed tasks are independently and identically distributed. In order to theoretically analyze lifelong learning in the case of non-i.i.d. tasks we use techniques from PAC-Bayesian theory [11]. We assume that the learner uses the same hypothesis set H = {h : X →Y} and the same loss function ℓ: Y × Y →[0, 1] for solving all tasks. PAC-Bayesian theory studies the performance of randomized, Gibbs, predictors. Formally, for any probability distribution Q over the hypothesis set, the corresponding Gibbs predictor for every point x ∈X randomly samples h ∼Q and returns h(x). The expected loss of such Gibbs predictor on a task corresponding to a data distribution D is given by: er(Q) = Eh∼QE(x,y)∼Dℓ(h(x), y) (1) and its empirical counterpart based on a training set S sampled from Dm is given by: ber(Q) = Eh∼Q 1 m m X i=1 ℓ(h(xi), yi). (2) PAC-Bayesian theory allows us to obtain upper bounds on the difference between these two quantities of the following form: Theorem 1. Let P be any distribution over H, fixed before observing the sample S. Then for any δ > 0 the following holds uniformly for all distributions Q over H with probability at least 1 −δ: er(Q) ≤ber(Q) + 1 √m KL(Q||P) + 1 + 8 log 1/δ 8√m , (3) where KL denotes the Kullback-Leibler divergence. The distribution P should be chosen before observing any data and therefore is usually referred as prior distribution. In contrast, the bound holds uniformly with respect to the distributions Q. Whenever it consists only of computable quantities, it can be used to choose a data-dependent Q that minimizes the right hand side of the inequality (3) and thus provides a Gibbs predictor with expected error bounded by a hopefully low value. Suchwise Q is usually referred as a posterior distribution. Note that besides explicit bounds, such as (3), in the case of 0/1-loss one can also derive implicit bound that can be tighter in some regimes [12]. Instead of the error difference, er −ber, these bound their KL-divergence, kl(ber∥er), where kl(q∥p) denotes the KL-divergence between two Bernoulli random variables with success probabilities p and q. In this work, we prefer explicit bounds as they are more intuitive and allow for more freedom in the choice of different loss functions. They also allow us to combine several inequalities in an additive way, which we make use of in Sections 3 and 4. 2 3 Dependent tasks The first extension of Baxter’s model that we study is the case, when the observed tasks are sampled from the same task environment, but with some interdependencies. In other words, in this case the tasks are identically, but not independently, distributed. Since the task environment is assumed to be constant we can build on ideas from the situation of i.i.d. tasks in [7]. We assume that for all tasks the learner uses the same deterministic learning algorithm that produces a posterior distribution Q based on a prior distribution P and a sample set S. We also assume that there is a set of possible prior distributions and some hyper-prior distribution P over it. The goal of the learner is to find a hyper-posterior distribution Q over this set such that, when the prior is sampled according to Q, the expected loss on the next, yet unobserved task is minimized: er(Q) = EP ∼QE(t,St)Eh∼Q(P,St)E(x,y)∼Dtℓ(h(x), y). (4) The empirical counterpart of the above quantity is given by: ber(Q) = EP ∼Q 1 n n X i=1 Eh∼Qi(P,Si) 1 m m X j=1 ℓ(h(xi j), yi j). (5) In order to bound the difference between these two quantities we adopt the two-staged procedure used in [7]. First, we bound the difference between the empirical error ber(Q) and the corresponding expected multi-task risk given by: eer(Q) = EP ∼Q 1 n n X i=1 Eh∼Qi(P,Si)E(x,y)∼Diℓ(h(x), y). (6) Then we continue with bounding the difference between er(Q) and eer(Q). Since conditioned on the observed tasks the corresponding training samples are independent, we can reuse the following results from [7] in order to perform the first step of the proof. Theorem 2. With probability at least 1 −δ uniformly for all Q: eer(Q) ≤ber(Q) + 1 n√m KL(Q||P) + n X i=1 EP ∼Q KL(Qi(P, Si)||P) + n + 8 log(1/δ) 8n√m . (7) To bound the difference between er(Q) and eer(Q), however, the results from [7] cannot be used, because they rely on the assumption that the observed tasks are independent. Instead we adopt ideas from chromatic PAC-Bayesian bounds [13] that rely on the properties of a dependency graph built with respect to the dependencies within the observed tasks. Definition 1 (Dependency graph). The dependency graph Γ(t) = (V, E) of a set of random variables t = (t1, . . . , tn) is such that: • the set of vertices V equals {1, . . . , n}, • there is no edge between i and j if and only if ti and tj are independent. Definition 2 (Exact fractional cover [14]). Let Γ = (V, E) be an undirected graph with V = {1, . . . , n}. A set C = {(Cj, wj)}k j=1, where Cj ⊂V and wj ∈[0, 1] for all j, is a proper exact fractional cover if: • for every j all vertices in Cj are independent, • ∪jCj = V , • for every i ∈V Pk j=1 wjIi∈Cj = 1. The sum of the weights w(C) = Pk j=1 wj is the chromatic weight of C and k is the size of C. Then the following holds: 3 Theorem 3. For any fixed hyper-prior distribution P, any proper exact fractional cover C of the dependency graph Γ(t1, . . . , tn) of size k and any δ > 0 the following holds with probability at least 1 −δ uniformly for all hyper-posterior distributions Q: er(Q) ≤eer(Q) + r w(C) n KL(Q||P) + p w(C)(1 −8 log δ + 8 log k) 8√n . (8) Proof. By Donsker-Varadhan’s variational formula [15]: er(Q) −eer(Q) = k X j=1 wj w(C)EP ∼Q w(C) n X i∈Cj E(t,St) ert(Qt) −eri(Qi) ≤ (9) k X j=1 wj w(C) 1 λj KL(Q||P) + log EP ∼P exp λjw(C) n X i∈Cj E(t,St) ert(Qt) −eri(Qi) . Since the tasks within every Cj are independent, for every fixed prior P {E(t,St) ert(Qt) − eri(Qi)}i∈Cj are i.i.d. and take values in [b −1, b] , where b = E(t,St) ert(Qt). Therefore, by Hoeffding’s lemma [16]: E(ti,Si),i∈Cj exp λjw(C) n X i∈Cj E(t,St) ert(Qt) −eri(Qi) ≤exp λ2 jw(C)2|Cj| 8n2 . (10) Therefore, by Markov’s inequality with probability at least 1 −δj it holds that: log EP ∼P exp λjw(C) n X i∈Cj E(t,St) ert(Qt) −eri(Qi) ≤λ2 jw(C)2|Cj| 8n2 −log δj. (11) Consequently, we obtain with probability at least 1 −Pk j=1 δj: er(Q) −eer(Q) ≤ k X j=1 wj w(C) 1 λj KL(Q||P) + k X j=1 wjλjw(C)|Cj| 8n2 − k X j=1 wj w(C)λj log δj. (12) By setting λ1 = · · · = λk = p n/w(C) and δj = δ/k we obtain the statement of the theorem. By combining Theorems 2 and 3 we obtain the main result of this section: Theorem 4. For any fixed hyper-prior distribution P, any proper exact fractional cover C of the dependency graph Γ(t1, . . . , tn) of size k and any δ > 0 the following holds with probability at least 1 −δ uniformly for all hyper-posterior distributions Q: er(Q) ≤ber(Q)+1 + p w(C)mn n√m KL(Q||P) + 1 n√m n X i=1 EP ∼Q KL(Qi(P, Si)||P)+ n + 8 log(2/δ) 8n√m + p w(C)(1 + 8 log(2/δ) + 8 log k) 8√n . (13) Theorem 4 shows that even in the case of non-independent tasks a bound very similar to that in [7] can be obtained. In particular, it contains two types of complexity terms: KL(Q||P) corresponds to the level of the task environment and KL(Qi||P) corresponds specifically to the i-th task. Similarly to the i.i.d. case, when the learner has access to unlimited amount of data, but for finitely many observed tasks (m →∞, n < ∞), the complexity terms of the second type converge to 0 as 1/√m, while the first one does not, as there is still uncertainty on the task environment level. In the opposite situation, when the learner has access to infinitely many tasks, but with only finitely many samples per task (m < ∞, n →∞), the first complexity term converges to 0 as p w(C)/n, up to logarithmic terms. Thus there is a worsening comparing to the i.i.d. case proportional to p w(C), which represents the amount of dependence among the tasks. If the tasks are actually i.i.d., the dependency graph contains no edges, so we can form a cover of size 1 with chromatic weight 1. Thus we recover the result from [7] as a special case of Theorem 4. 4 For general dependence graph, fastest convergence is obtained by using a cover with minimal chromatic weight. It is known that the minimal chromatic weight, χ∗(Γ), satisfies the following inequality [14]: 1 ≤c(Γ) ≤χ∗(Γ) ≤∆(Γ) + 1, where c(Γ) is the order of the largest clique in Γ and ∆(Γ) is the maximum degree of a vertex in Γ. In some situations, even the bound obtainable from Theorem 4 by plugging in a cover with the minimal chromatic weight can be improved: Theorem 4 also holds for any subset ts, |ts| = s, of the observed tasks with the induced dependency subgraph Γs. Therefore it might provide a tighter bound if χ∗(Γs)/s is smaller than χ∗(Γ)/n. However, this is not guaranteed since the empirical error ber computed on ts might become larger, as well as the second part of the bound, which decreases with n and does not depend on the chromatic weight of the cover. Note also that such a subset needs to be chosen before observing the data, since the bound of Theorem 4 holds with probability 1−δ only for a fixed set of tasks and a fixed cover. Another important aspect of Theorem 4 as a PAC-Bayesian bound is that the right hand side of inequality (13) consists only of computable quantities. Therefore it can be seen as quality measure of a hyper-posterior Q and by minimizing it one could obtain a distribution that is adjusted to a particular task environment. The resulting minimizer can be expected to work well even on new, yet unobserved tasks, because the guarantees of Theorem 4 still hold due to the uniformity of the bound. To do so, one can use the same techniques as in [7], because Theorem 4 differs from the bound provided there only by constant factors. 4 Changing Task Environments In this section we study a situation, when the task environment is gradually changing: every next task ti+1 is sampled from a distribution Ti+1 over the tasks that can depend on the history of the process. Due to the change of task environment the previous idea of learning one prior for all tasks does not seem reasonable anymore. In contrast, we propose to learn a transfer algorithm that produces a solution for the current task based on the corresponding sample set and the sample set from the previous task. Formally, we assume that there is a set A of learning algorithms that produce a posterior distribution Qi+1 for task ti+1 based on the training samples Si and Si+1. The goal of the learner is to identify an algorithm A in this set that leads to good performance when applied to a new, yet unobserved task, while using the last observed training sample Sn1. For each task ti and each algorithm A ∈A we define the expected and empirical error of applying this algorithm as follows: eri(A) = Eh∼QiE(x,y)∼Diℓ(h(x), y), beri(A) = Eh∼Qi 1 m m X j=1 ℓ(h(xi j), yi j), (14) where Qi = A(Si, Si−1).The goal of the learner is to find A that minimizes ern+1 given the history of the observed tasks. However, if the task environment would change arbitrarily from step to step, the observed tasks would not contain any relevant information for a new task. To overcome this difficulty, we make the assumption that the expected performance of the algorithms in A does not change over time. Formally, we assume for each A ∈A there exists a value, er(A), such that for every i = 2, . . . , n + 1, with Ei = (Ti, ti, Si): E{Ei−1,Ei}[ eri(A) | E1, . . . , Ei−2 ] = er(A). (15) In words, the quality of a transfer algorithm does not depend on when during the task sequence it is applied, provided that it is always applied to the subsequent sample sets. Note that this is a natural assumption for lifelong learning: without it, the quality of transfer algorithms could change over time, so an algorithm that works well for all observed tasks might not work anymore for future tasks. The goal of the learner can be reformulated as identifying A ∈A with minimal er(A), which can be seen as the expected value of the expected risk of applying algorithm A on the next, yet unobserved task. Since er(A) is unknown, we derive an upper bound based on the observed data that holds uniformly for all algorithms A and therefore can be used to guide the learner. To do so, we again use 1Note that this setup includes the possibility of model selection, such as predictors using different feature representations or (hyper)parameter values. 5 the construction with hyper-priors and hyper-posteriors from the previous section. Formally, let P be a prior distribution over the set of possible algorithms that is fixed before any data arrives and let Q be a possibly data-dependent hyper-posterior. The quality of the hyper-posterior and its empirical counterpart are given by the following quantities: er(Q) = EA∼Q er(A), ber(Q) = EA∼Q 1 n −1 n X i=2 beri(A). (16) Similarly to the previous section, we first bound the difference between ber(Q) and multi-task expected error given by: eer(Q) = EA∼Q 1 n −1 n X i=2 eri(A). (17) Even though Theorem 2 is not directly applicable here, a more careful modification of it allows to obtain the following result (see supplementary material for a detailed proof): Theorem 5. For any fixed hyper-prior distribution P with probability at least 1 −δ the following holds uniformly for all hyper-posterior distributions Q: eer(Q) ≤ber(Q)+ 1 (n −1)√m KL(Q×Q2×· · ·×Qn||P ×P2×· · ·×Pn)+ (n −1) + 8 log(1/δ) 8(n −1)√m , where P2, . . . , Pn are some reference prior distributions that do not depend on the training sets of subsequent tasks. Possible choices include using just one prior distribution P fixed before observing any data, or using the posterior distributions obtained from the previous task, i.e. Pi = Qi−1. To complete the proof we need to bound the difference between er(Q) and eer(Q). We use techniques from [17] in combination of those from [13], resulting in the following lemma: Lemma 1. For any fixed algorithm A and any λ the following holds: EE1,...,En exp λ er(A) − 1 n −1 n X i=2 eri(A) ≤exp λ2 2(n −1) . (18) Proof. First, define Xi = (Ei−1, Ei) for i = 2, . . . , n and g : Xi 7→eri(A) and b = er(A). Then: exp λ er(A) − 1 n −1 n X i=2 eri(A) = exp λ n −1 X even i (b −g(Xi)) + X odd i (b −g(Xi)) ≤1 2 exp 2λ n −1 X even i (b −g(Xi)) + 1 2 exp 2λ n −1 X odd i (b −g(Xi)) . (19) Note, that both, the set of Xi-s corresponding to even i and the set of Xi-s corresponding to odd i, form a martingale difference sequence. Therefore by using Lemma 2 from the supplementary material (or similarly Lemma 2 in [17]) and Hoeffding’s lemma [16] we obtain: EE1,...,En exp 2λ n −1 X even i (b −g(Xi)) ≤exp 4λ2 8(n −1) (20) and the same for the odd i. Together with inequality (19) it gives the statement of the lemma. Now we can prove the following statement: Theorem 6. For any hyper-prior distribution P and any δ > 0 with probability at least 1 −δ the following inequality holds uniformly for all Q: er(Q) ≤eer(Q) + 1 √n −1 KL(Q||P) + 1 + 2 log(1/δ) 2√n −1 . (21) Proof. By applying Donsker-Varadhan’s variational formula [15] one obtains that: er(Q) −eer(Q) ≤1 λ KL(Q||P) + log EA∼P exp λ er(A) − 1 n −1 n X i=2 eri(A) . (22) 6 Figure 1: Illustration of three learning tasks sampled from a non-stationary environment. Shaded areas illustrate the data distribution, + and −indicate positive and negative training examples. Between subsequent tasks, the data distribution changes by a rotation. A transfer algorithm with access to two subsequent tasks can compensate for this by rotating the previous data into the new position, thereby obtaining more data samples to train on. For a fixed algorithm A we obtain from Lemma 1: EE1,...,En exp λ er(A) − 1 n −1 n X i=2 eri(A) ≤exp λ2 2(n −1) . (23) Since P does not depend on the process, by Markov’s inequality, with probability at least 1 −δ, we obtain EA∼P exp λ er(A) − 1 n −1 n X i=2 eri(A) ≤1 δ exp λ2 2(n −1) . (24) The statement of the theorem follows by setting λ = √n −1. By combining Theorems 5 and 6 we obtain the main result of this section: Theorem 7. For any hyper-prior distribution P and any δ > 0 with probability at least 1 −δ the following holds uniformly for all Q: er(Q) ≤ber(Q) + p (n −1)m + 1 (n −1)√m KL(Q∥P) + 1 (n −1)√m n X i=2 EA∼Q KL(Qi∥Pi) + (n −1) + 8 log(2/δ) 8(n −1)√m + 1 + 2 log(2/δ) 2√n −1 , (25) where P2, . . . , Pn are some reference prior distributions that should not depend on the data of subsequent tasks. Similarly to Theorem 4 the above bound contains two types of complexity terms: one corresponding to the level of the changes in the task environment and task-specific terms. The first complexity term converges to 0 like 1/√n −1 when the number of the observed tasks increases, indicating that more observed tasks allow for better estimation of the behavior of the transfer algorithms. The taskspecific complexity terms vanish only when the amount of observed data m per tasks grows. In addition, since the right hand side of the inequality (25) consists only of computable quantities and at the same time holds uniformly for all Q, one can obtain a posterior distribution by minimizing it over the transfer algorithms that is adjusted to particularly changing task environments. We illustrate this process by discussing a toy example (Figure 1). Suppose that X = R2, Y = {−1, 1} and that the learner uses linear classifiers, h(x) = sign⟨w, x⟩, and 0/1-loss, ℓ(y1, y2) = Jy1 ̸= y2K, for solving every task. For simplicity we assume that every task environment contains only one task or, equivalently, every Ti is a delta peak, and that the change in the environment between two steps is due to a constant rotation by θ0 = π 6 of the feature space. For the set A we use a one-parameter family of transfer algorithms, Aα for α ∈R. Given sample sets Sprev and Scur, any algorithm Aα first rotates Sprev by the angle α, and then trains a linear support vector machine on the union of both sets. Clearly, the quality of each transfer algorithm depends on the chosen angle, and an elementary calculation shows that condition (15) is fulfilled. We can therefore use the bound (25) 7 as a criterion to determine a beneficial angle2. For that we set Qi = N(wi, I2), i.e. unit variance Gaussian distributions with means wi. Similarly, we choose all reference prior distributions as unit variance Gaussian with zero mean, Pi = N(0, I2). Analogously, we set the hyper-prior P to be N(0, 10), a zero mean normal distribution with enlarged variance in order to make all reasonable rotations α lie within one standard deviation from the mean. As hyper-posteriors Q we choose N(θ, 1) and the goal of the learning is to identify the best θ. In order to obtain the objective function from equation (25) we first compute the complexity terms (and approximate all expectations with respect to Q by the values at its mean θ): KL(Q||P) = θ2 20, EA∼Q KL(Qi∥Pi) ≈∥wi∥2 2 . The empirical error of the Gibbs classifiers in the case of 0/1-loss and Gaussian distributions is given by the following expression (we again approximate the expectation by the value at θ) [20, 21]: ber(Q) ≈ 1 n −1 n X i=2 1 m m X j=1 Φ yi j⟨wi, xi j⟩ ∥xi j∥ ! , (26) where Φ(z) = 1 2 1 −erf( z √ 2) and erf(z) is the Gauss error function. The resulting objective function that we obtain for identifying a beneficial angle θ is the following: J (θ) = p (n −1)m + 1 (n −1)√m · θ2 20 + 1 n −1 n X i=2 ∥wi∥2 2√m + 1 m m X j=1 Φ yi j⟨wi, xi j⟩ ∥xi j∥ ! . (27) Numeric experiments confirm that by optimizing J (θ) with respect to θ one can obtain an advantageous angle: using n = 2, . . . , 11 tasks, each with m = 10 samples, we obtain an average test error of 14.2% for the (n + 1)th task. As can be expected, this lies in between the error for the same setting without transfer, which was 15.0%, and the error when always rotating by π 6 , which was 13.5%. 5 Conclusion In this work we present a PAC-Bayesian analysis of lifelong learning under two types of relaxations of the i.i.d. assumption on the tasks. Our results show that accumulating knowledge over the course of learning multiple tasks can be beneficial for the future even if these tasks are not i.i.d. In particular, for the situation when the observed tasks are sampled from the same task environment but with possible dependencies we prove a theorem that generalizes the existing bound for the i.i.d. case. As a second setting we further relax the i.i.d. assumption and allow the task environment to change over time. Our bound shows that it is possible to estimate the performance of applying a transfer algorithm on future tasks based on its performance on the observed ones. Furthermore, our result can be used to identify a beneficial algorithm based on the given data and we illustrate this process on a toy example. For future work, we plan to expand on this aspect. Essentially, any existing domain adaptation algorithm can be used as a transfer method in our setting. However, the success of domain adaptation techniques is often caused by asymmetry between the source and the target such algorithms usually rely on availability of extensive amounts of data from the source and only limited amounts from the target. In contrast, in lifelong learning setting all the tasks are assumed to be equipped with limited training data. Therefore we are particularly interested in identifying how far the constant quality assumption can be carried over to existing domain adaptation techniques and real-world lifelong learning situations. Acknowledgments. This work was in parts funded by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013)/ERC grant agreement no 308036. 2Note that Theorem 7 provides an upper bound for the expected error of stochastic Gibbs classifiers, and not deterministic ones that are preferable in practice. However for 0/1-loss the error of a Gibbs classifier is bounded from below by half the error of the corresponding majority vote predictor [18, 19] and therefore twice the right hand side of (25) provides a bound for deterministic classifiers. 8 References [1] Sebastian Thrun and Tom M. Mitchell. Lifelong robot learning. Technical report, Robotics and Autonomous Systems, 1993. [2] Jonathan Baxter. A model of inductive bias learning. Journal of Artificial Intelligence Research, 12:149–198, 2000. [3] Leslie G. Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [4] Vladimir N. Vapnik. Estimation of Dependencies Based on Empirical Data. Springer, 1982. [5] Andreas Maurer. Algorithmic stability and meta-learning. Journal of Machine Learning Research (JMLR), 6:967–994, 2005. [6] Gilles Blanchard, Gyemin Lee, and Clayton Scott. Generalizing from several related classification tasks to a new unlabeled sample. In Conference on Neural Information Processing Systems (NIPS), 2011. [7] Anastasia Pentina and Christoph H. Lampert. A PAC-Bayesian bound for lifelong learning. In International Conference on Machine Learing (ICML), 2014. [8] Andreas Maurer. Transfer bounds for linear feature learning. Machine Learning, 75:327–350, 2009. [9] Andreas Maurer, Massimiliano Pontil, and Bernardino Romera-Paredes. Sparse coding for multitask and transfer learning. In International Conference on Machine Learing (ICML), 2013. [10] Maria-Florina Balcan, Avrim Blum, and Santosh Vempala. Efficient representations for lifelong learning and autoencoding. In Workshop on Computational Learning Theory (COLT), 2015. [11] David A. McAllester. Some PAC-Bayesian theorems. Machine Learning, 37(3):355–363, 1999. [12] Matthias Seeger. PAC-Bayesian generalisation error bounds for gaussian process classification. Journal of Machine Learning Research (JMLR), 3:233–269, 2003. [13] Liva Ralaivola, Marie Szafranski, and Guillaume Stempfel. Chromatic PAC-Bayes bounds for non-iid data: Applications to ranking and stationary β-mixing processes. Journal of Machine Learning Research (JMLR), 2010. [14] Daniel Ullman and Edward Scheinerman. Fractional Graph Theory: A Rational Approach to the Theory of Graphs. Wiley Interscience Series in Discrete Mathematics, 1997. [15] Monroe. D. Donsker and S. R. Srinivasa Varadhan. Asymptotic evaluation of certain Markov process expectations for large time. I. Communications on Pure and Applied Mathematics, 28:1–47, 1975. [16] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58:13–30, 1963. [17] Yevgeny Seldin, Franois Laviolette, Nicol Cesa-Bianchi, John Shawe-Taylor, and Peter Auer. PAC-Bayesian inequalities for martingales. IEEE Transactions on Information Theory, 58:7086–7093, 2012. [18] David A. McAllester. Simplified PAC-Bayesian margin bounds. In Workshop on Computational Learning Theory (COLT), 2003. [19] Franc¸ois Laviolette and Mario Marchand. PAC-Bayes risk bounds for stochastic averages and majority votes of sample-compressed classifiers. Journal of Machine Learning Research (JMLR), 8:1461–1487, 2007. [20] John Langford and John Shawe-Taylor. PAC-Bayes and margins. In Conference on Neural Information Processing Systems (NIPS), 2002. [21] Pascal Germain, Alexandre Lacasse, Franc¸ois Laviolette, and Mario Marchand. PAC-Bayesian learning of linear classifiers. In International Conference on Machine Learing (ICML), 2009. 9 | 2015 | 228 |
5,734 | Regularized EM Algorithms: A Unified Framework and Statistical Guarantees Xinyang Yi Dept. of Electrical and Computer Engineering The University of Texas at Austin yixy@utexas.edu Constantine Caramanis Dept. of Electrical and Computer Engineering The University of Texas at Austin constantine@utexas.edu Abstract Latent models are a fundamental modeling tool in machine learning applications, but they present significant computational and analytical challenges. The popular EM algorithm and its variants, is a much used algorithmic tool; yet our rigorous understanding of its performance is highly incomplete. Recently, work in [1] has demonstrated that for an important class of problems, EM exhibits linear local convergence. In the high-dimensional setting, however, the M-step may not be well defined. We address precisely this setting through a unified treatment using regularization. While regularization for high-dimensional problems is by now well understood, the iterative EM algorithm requires a careful balancing of making progress towards the solution while identifying the right structure (e.g., sparsity or low-rank). In particular, regularizing the M-step using the state-of-the-art highdimensional prescriptions (e.g., `a la [19]) is not guaranteed to provide this balance. Our algorithm and analysis are linked in a way that reveals the balance between optimization and statistical errors. We specialize our general framework to sparse gaussian mixture models, high-dimensional mixed regression, and regression with missing variables, obtaining statistical guarantees for each of these examples. 1 Introduction We give general conditions for the convergence of the EM method for high-dimensional estimation. We specialize these conditions to several problems of interest, including high-dimensional sparse and low-rank mixed regression, sparse gaussian mixture models, and regression with missing covariates. As we explain below, the key problem in the high-dimensional setting is the M-step. A natural idea is to modify this step via appropriate regularization, yet choosing the appropriate sequence of regularizers is a critical problem. As we know from the theory of regularized M-estimators (e.g., [19]) the regularizer should be chosen proportional to the target estimation error. For EM, however, the target estimation error changes at each step. The main contribution of our work is technical: we show how to perform this iterative regularization. We show that the regularization sequence must be chosen so that it converges to a quantity controlled by the ultimate estimation error. In existing work, the estimation error is given by the relationship between the population and empirical M-step operators, but this too is not well defined in the highdimensional setting. Thus a key step, related both to our algorithm and its convergence analysis, is obtaining a different characterization of statistical error for the high-dimensional setting. Background and Related Work EM (e.g., [8, 12]) is a general algorithmic approach for handling latent variable models (including mixtures), popular largely because it is typically computationally highly scalable, and easy to implement. On the flip side, despite a fairly long history of studying EM in theory (e.g., [12, 17, 21]), 1 very little has been understood about general statistical guarantees until recently. Very recent work in [1] establishes a general local convergence theorem (i.e., assuming initialization lies in a local region around true parameter) and statistical guarantees for EM, which is then specialized to obtain near-optimal rates for several specific low-dimensional problems – low-dimensional in the sense of the classical statistical setting where the samples outnumber the dimension. A central challenge in extending EM (and as a corollary, the analysis in [1]) to the high-dimensional regime is the M-step. On the algorithm side, the M-step will not be stable (or even well-defined in some cases) in the high-dimensional setting. To make matters worse, any analysis that relies on showing that the finite-sample M-step is somehow “close” to the M-step performed with infinite data (the population-level M-step) simply cannot apply in the high-dimensional regime. Recent work in [20] treats high-dimensional EM using a truncated M-step. This works in some settings, but also requires specialized treatment for every different setting, precisely because of the difficulty with the M-step. In contrast to work in [20], we pursue a high-dimensional extension via regularization. The central challenge, as mentioned above, is in picking the sequence of regularization coefficients, as this must control the optimization error (related to the special structure of β∗), as well as the statistical error. Finally, we note that for finite mixture regression, St¨adler et al.[16] consider an ℓ1 regularized EM algorithm for which they develop some asymptotic analysis and oracle inequality. However, this work doesn’t establish the theoretical properties of local optima arising from regularized EM. Our work addresses this issue from a local convergence perspective by using a novel choice of regularization. 2 Classical EM and Challenges in High Dimensions The EM algorithm is an iterative algorithm designed to combat the non-convexity of max likelihood due to latent variables. For space concerns we omit the standard derivation, and only give the definitions we need in the sequel. Let Y , Z be random variables taking values in Y,Z, with joint distribution fβ(y, z) depending on model parameter β ⊆Ω⊆Rp. We observe samples of Y but not of the latent variable Z. EM seeks to maximize a lower bound on the maximum likelihood function for β. Letting κβ(z|y) denote the conditional distribution of Z given Y = y, letting yβ∗(y) denote the marginal distribution of Y , and defining the function Qn(β′|β) := 1 n n X i=1 Z Z κβ(z|yi) log fβ′(yi, z)dz, (2.1) one iteration of the EM algorithm, mapping β(t) to β(t+1), consists of the following two steps: • E-step: Compute function Qn(β|β(t)) given β(t). • M-step: β(t+1) ←Mn(β) := arg maxβ′∈ΩQn(β′|β(t)). We can define the population (infinite sample) versions of Qn and Mn in a natural manner: Q(β′|β) := Z Y yβ∗(y) Z Z κβ(z|y) log fβ′(y, z)dzdy (2.2) M(β) = arg max β′∈ΩQ(β′|β). (2.3) This paper is about the high-dimensional setting where the number of samples n may be far less than the dimensionality p of the parameter β, but where β exhibits some special structure, e.g., it may be a sparse vector or a low-rank matrix. In such a setting, the M-step of the EM algorithm may be highly problematic. In many settings, for example sparse mixed regression, the M-step may not even be well defined. More generally, when n ≪p, Mn(β) may be far from the population version, M(β), and in particular, the minimum estimation error ∥Mn(β∗) −M(β∗)∥can be much larger than the signal strength ∥β∗∥. This quantity is used in [1] as well as in follow-up work in [20], as a measure of statistical error. In the high dimensional setting, something else is needed. 3 Algorithm The basis of our algorithm is the by-now well understood concept of regularized high dimensional estimators, where the regularization is tuned to the underlying structure of β∗, thus defining a regu2 larized M-step via Mr n(β) := arg max β′∈ΩQn(β′|β) −λnR(β′), (3.1) where R(·) denotes an appropriate regularizer chosen to match the structure of β∗. The key challenge is how to choose the sequence of regularizers {λ(t) n } in the iterative process, so as to control optimization and statistical error. As detailed in Algorithm 1, our sequence of regularizers attempts to match the target estimation error at each step of the EM iteration. For an intuition of what this might look like, consider the estimation error at step t: ∥Mr n(β(t)) −β∗∥2. By the triangle inequality, we can bound this by a sum of two terms: the optimization error and the final estimation error: ∥Mr n(β(t)) −β∗∥2 ≤∥Mr n(β(t)) −Mr n(β∗)∥2 + ∥Mr n(β∗) −β∗∥2. (3.2) Since we expect (and show) linear convergence of the optimization, it is natural to update λ(t) n via a recursion of the form λ(t) n = κλ(t−1) n +∆as in (3.3), where the first term represents the optimization error, and ∆represents the final statistical error, i.e., the last term above in (3.2). A key part of our analysis shows that this error (and hence ∆) is controlled by ∥∇Qn(β∗|β)−∇Q(β∗|β)∥R∗, which in turn can be bounded uniformly for a variety of important applications of EM, including the three discussed in this paper (see Section 5). While a technical point, it is this key insight that enables the right choice of algorithm and its analysis. In the cases we consider, we obtain min-max optimal rates of convergence, demonstrating that no algorithm, let alone another variant of EM, can perform better. Algorithm 1 Regularized EM Algorithm Input Samples {yi}n i=1, regularizer R, number of iterations T, initial parameter β(0), initial regularization parameter λ(0) n , estimated statistical error ∆, contractive factor κ < 1. 1: For t = 1, 2, . . . , T do 2: Regularization parameter update: λ(t) n ←κλ(t−1) n + ∆. (3.3) 3: E-step: Compute function Qn(·|β(t−1)) according to (2.1). 4: Regularized M-step: β(t) ←Mr n(β(t−1)) := arg max β∈ΩQn(β|β(t−1)) −λ(t) n · R(β). 5: End For Output β(T ). 4 Statistical Guarantees We now turn to the theoretical analysis of regularized EM algorithm. We first set up a general analytical framework for regularized EM where the key ingredients are decomposable regularizer and several technical conditions on the population based Q(·|·) and the sample based Qn(·|·). In Section 4.3, we provide our main result (Theorem 1) that characterizes both computational and statistical performance of the proposed variant of regularized EM algorithm. 4.1 Decomposable Regularizers Decomposable regularizers (e.g., [3, 6, 14, 19]), have been shown to be useful both empirically and theoretically for high dimensional structural estimation, and they also play an important role in our analytical framework. Recall that for R : Rp →R+ a norm, and a pair of subspaces (S, S) in Rp such that S ⊆S, we have the following definition: Definition 1 (Decomposability). Regularizer R : Rp →R+ is decomposable with respect to (S, S) if R(u + v) = R(u) + R(v), for any u ∈S, v ∈S ⊥. Typically, the structure of model parameter β∗can be characterized by specifying a subspace S such that β∗∈S. The common use of a regularizer is thus to penalize the compositions of solution that 3 live outside S. We are interested in bounding the estimation error in some norm ∥· ∥. The following quantity is critical in connecting R to ∥· ∥. Definition 2 (Subspace Compatibility Constant). For any subspace S ⊆Rp, a given regularizer R and some norm ∥· ∥, the subspace compatibility constant of S with respect to R, ∥· ∥is given by Ψ(S) := sup u∈S\{0} R(u) ∥u∥. As is standard, the dual norm of R is defined as R∗(v) := supR(u)≤1 u, v . To simplify notation, we let ∥u∥R := R(u) and ∥u∥R∗:= R∗(u). 4.2 Conditions on Q(·|·) and Qn(·|·) Next, we review three technical conditions, originally proposed by [1], on the population level Q(·|·) function, and then we give two important conditions that the empirial function Qn(·|·) must satisfy, including one that characterizes the statistical error. It is well known that performance of EM algorithm is sensitive to initialization. Following the lowdimensional development in [1], our results are local, and apply to an r-neighborhood region around β∗: B(r; β∗) := u ∈Ω, ∥u −β∗∥≤r . We first require that Q(·|β∗) is self consistent as stated below. This is satisfied, in particular, when β∗maximizes the population log likelihood function, as happens in most settings of interest [12]. Condition 1 (Self Consistency). Function Q(·|β∗) is self consistent, namely β∗= arg max β∈ΩQ(β|β∗). We also require that the function Q(·|·) satisfies a certain strong concavity condition and is smooth over Ω. Condition 2 (Strong Concavity and Smoothness (γ, µ, r)). Q(·|β∗) is γ-strongly concave over Ω, i.e., Q(β2|β∗) −Q(β1|β∗) − ∇Q(β1|β∗), β2 −β1 ≤−γ 2 ∥β2 −β1∥2, ∀β1, β2 ∈Ω. (4.1) For any β ∈B(r; β∗), Q(·|β) is µ-smooth over Ω, i.e., Q(β2|β) −Q(β1|β) − ∇Q(β1|β), β2 −β1 ≥−µ 2 ∥β2 −β1∥2, ∀β1, β2 ∈Ω. (4.2) The next condition is key in guaranteeing the curvature of Q(·|β) is similar to that of Q(·|β∗) when β is close to β∗. It has also been called First Order Stability in [1]. Condition 3 (Gradient Stability (τ, r)). For any β ∈B(r; β∗), we have
∇Q(M(β)|β) −∇Q(M(β)|β∗)
≤τ∥β −β∗∥. The above condition only requires that the gradient be stable at one point M(β). This is sufficient for our analysis. In fact, for many concrete examples, one can verify a stronger version of Condition 3 that is
∇Q(β′|β) −∇Q(β′|β∗)
≤τ∥β −β∗∥, ∀β′ ∈B(r; β∗). Next we require two conditions on the empirical function Qn(·|·), which is computed from finite number of samples according to (2.1). Our first condition, parallel to Condition 2, imposes a curvature constraint on Qn(·|·). In order to guarantee that the estimation error ∥β(t) −β∗∥in step t of the EM algorithm is well controlled, we would like Qn(·|β(t−1)) to be strongly concave at β∗. However, in the setting where n ≪p, there might exist directions along which Qn(·|β(t−1)) is flat, e.g., as in mixed linear regression and missing covariate regression. In contrast with Condition 2, we only require Qn(·|·) to be strongly concave over a particular set C(S, S; R) that is defined in terms of the subspace pair (S, S) and regularizer R. This set is defined as follows: C(S, S; R) := u ∈Rp :
ΠS ⊥(u)
R ≤2 ·
ΠS(u)
R + 2 · Ψ(S) ·
u
, (4.3) where the projection operator ΠS : Rp →Rp is defined as ΠS(u) := arg minv∈S ∥v −u∥. The restricted strong concavity (RSC) condition is as follows. 4 Condition 4 (RSC (γn, S, S, r, δ)). For any fixed β ∈B(r; β∗), with probability at least 1 −δ, we have that for all β′ −β∗∈ΩT C(S, S; R), Qn(β′|β) −Qn(β∗|β) − ∇Qn(β∗|β), β′ −β∗ ≤−γn 2 ∥β′ −β∗∥2. The above condition states that Qn(·|β) is strongly concave in directions β′ −β∗that belong to C(S, S; R). It is instructive to compare Condition 4 with a related condition proposed by [14] for analyzing high dimensional M-estimators. They require the loss function to be strongly convex over the cone {u ∈Rp : ∥ΠS ⊥(u)∥R ≲∥ΠS(u)∥R}. Therefore our restrictive set (4.3) is similar to the cone but has the additional term 2Ψ(S)∥u∥. The main purpose of the term 2Ψ(S)∥u∥is to allow the regularization parameter λn to jointly control optimization and statistical error. We note that while Condition 4 is stronger than the usual RSC condition in M-estimator, in typical settings the difference is immaterial. This is because
ΠS(u)
R is within a constant factor of Ψ(S) ·
u
, and hence checking RSC over C amounts to checking it over ∥ΠS ⊥(u)∥R ≲Ψ(S)∥u∥, which is indeed what is typically also done in the M-estimator setting. Finally, we establish the condition that characterizes the achievable statistical error. Condition 5 (Statistical Error (∆n, r, δ)). For any fixed β ∈B(r; β∗), with probability at least 1 −δ, we have
∇Qn(β∗|β) −∇Q(β∗|β)
R∗≤∆n. (4.4) This quantity replaces the term ∥Mn(β)−M(β)∥which appears in [1] and [20], and which presents problems in the high dimensional regime. 4.3 Main Results In this section, we provide the theoretical guarantees for a resampled version of our regularized EM algorithm: we split the whole dataset into T pieces and use a fresh piece of data in each iteration of regularized EM. As in [1], resampling makes it possible to check that Conditions 4-5 are satisfied without requiring them to hold uniformly for all β ∈B(r; β∗) with high probability. Our empirical results indicate that it is not in fact required and is an artifact of the analysis. We refer to this resampled version as Algorithm 2. In the sequel, we let m := n/T to denote the sample complexity in each iteration. We let α := supu∈Rp\{0} ∥u∥∗/∥u∥, where ∥· ∥∗is the dual norm of ∥· ∥. For Algorithm 2, our main result is as follows. The proof is deferred to the Supplemental Material. Theorem 1. Assume the model parameter β∗∈S and regularizer R is decomposable with respect to (S, S) where S ⊆S ⊆Rp. Assume r > 0 is such that B(r; β∗) ⊆Ω. Further, assume function Q(·|·), defined in (2.2), is self consistent and satisfies Conditions 2-3 with parameters (γ, µ, r) and (τ, r). Given n samples and T iterations, let m := n/T. Assume Qm(·|·), computed from any m i.i.d. samples according to (2.1), satisfies Conditions 4-5 with parameters (γm, S, S, r, 0.5δ/T) and (∆m, r, 0.5δ/T). Let κ∗:= 5 αµτ γγm , and assume 0 < τ < γ and 0 < κ∗≤3/4. Define ∆:= rγm/[60Ψ(S)] and assume ∆m is such that ∆m ≤∆. Consider Algorithm 2 with initialization β(0) ∈B(r; β∗) and with regularization parameters given by λ(t) m = κt γm 5Ψ(S)∥β(0) −β∗∥+ 1 −κt 1 −κ ∆, t = 1, 2, . . . , T (4.5) for any ∆∈[3∆m, 3∆], κ ∈[κ∗, 3/4]. Then with probability at least 1 −δ, we have that for any t ∈[T], ∥β(t) −β∗∥≤κt∥β(0) −β∗∥+ 5 γm 1 −κt 1 −κ Ψ(S)∆. (4.6) The estimation error is bounded by a term decaying linearly with number of iterations t, which we can think of as the optimization error and a second term that characterizes the ultimate estimation error of our algorithm. With T = O(log n) and suitable choice of ∆such that ∆= O(∆n/T ), we bound the ultimate estimation error as ∥β(T ) −β∗∥≲ 1 (1 −κ)γn/T Ψ(S)∆n/T . (4.7) 5 We note that overestimating the initial error, ∥β(0)−β∗∥is not important, as it may slightly increase the overall number of iterations, but will not impact the ultimate estimation error. The constraint ∆m ≲rγm/Ψ(S) ensures that β(t) is contained in B(r; β∗) for all t ∈[T]. This constraint is quite mild in the sense that if ∆m = Ω(rγm/Ψ(S)), β(0) is a decent estimator with estimation error O(Ψ(S)∆m/γm) that already matches our expectation. 5 Examples: Applying the Theory Now we introduce three well known latent variable models. For each model, we first review the standard EM algorithm formulations, and discuss the extensions to the high dimensional setting. Then we apply Theorem 1 to obtain the statistical guarantee of the regularized EM with data splitting (Algorithm 2). The key ingredient underlying these results is to check the technical conditions in Section 4 hold for each model. We postpone these tedious details to the Supplemental Material. 5.1 Gaussian Mixture Model We consider the balanced isotropic Gaussian mixture model (GMM) with two components where the distribution of random variables (Y, Z) ∈Rp × {−1, 1} is characterized as Pr (Y = y|Z = z) = φ(y; z · β∗, σ2Ip), Pr(Z = 1) = Pr(Z = −1) = 1/2. Here we use φ(·|µ, Σ) to denote the probability density function of N(µ, Σ). In this example, Z is the latent variable that indicates the cluster id of each sample. Given n i.i.d. samples {yi}n i=1, function Qn(·|·) defined in (2.1) corresponds to QGMM n (β′|β) = −1 2n n X i=1 w(yi; β)∥yi −β′∥2 2 + (1 −w(yi; β))∥yi + β′∥2 2 , (5.1) where w(y; β) := exp (−∥y−β∥2 2 2σ2 )[exp (−∥y−β∥2 2 2σ2 ) + exp (−∥y+β∥2 2 2σ2 )]−1. We assume β∗∈ B0(s; p) := {u ∈Rp : | supp(u)| ≤s}. Naturally, we choose the regularizer R(·) to be the ℓ1 norm. We define the signal-to-noise ratio SNR := ∥β∗∥2/σ. Corollary 1 (Sparse Recovery in GMM). There exist constants ρ, C such that if SNR ≥ρ, n/T ≥ [80C(∥β∗∥∞+ σ)/∥β∗∥2]2 s log p, β(0) ∈B(∥β∗∥2/4; β∗); then with probability at least 1−T/p Algorithm 2 with parameters ∆= C(∥β∗∥∞+ σ) p T log p/n, λ(0) n/T = 0.2∥β(0) −β∗∥2/√s, any κ ∈[1/2, 3/4] and ℓ1 regularization generates β(t) that has estimation error ∥β(t) −β∗∥2 ≤κt∥β(0) −β∗∥2 + 5C(∥β∗∥∞+ σ) 1 −κ r s log p n T, for all t ∈[T]. (5.2) Note that by setting T ≍log(n/ log p), the order of final estimation error turns out to be (∥β∗∥∞+ δ) p (s log p)/n) log (n/ log p). The minimax rate for estimating s-sparse vector in a single Gaussian cluster is p s log p/n, thereby the rate is optimal on (n, p, s) up to a log factor. 5.2 Mixed Linear Regression Mixed linear regression (MLR), as considered in some recent work [5, 7, 22], is the problem of recovering two or more linear vectors from mixed linear measurements. In the case of mixed linear regression with two symmetric and balanced components, the response-covariate pair (Y, X) ∈ R × Rp is linked through Y = ⟨X, Z · β∗⟩+ W, where W is the noise term and Z is the latent variable that has Rademacher distribution over {−1, 1}. We assume X ∼N(0, Ip), W ∼N(0, σ2). In this setting, with n i.i.d. samples {yi, xi}n i=1 of pair (Y, X), function Qn(·|·) then corresponds to QMLR n (β′|β) = −1 2n n X i=1 w(yi, xi; β)(yi −⟨xi, β′⟩)2 + (1 −w(yi, xi; β))(yi + ⟨xi, β′⟩)2 , (5.3) 6 where w(y, x; β) := exp (−(y−⟨x,β⟩)2 2σ2 )[exp (−(y−⟨x,β⟩)2 2σ2 ) + exp (−(y+⟨x,β⟩)2 2σ2 )]−1. We consider two kinds of structure on β∗: Sparse Recovery. Assume β∗∈B0(s; p). Then let R be the ℓ1 norm, as in the previous section. We define SNR := ∥β∗∥2/σ. Corollary 2 (Sparse recovery in MLR). There exist constant ρ, C, C′ such that if SNR ≥ρ, n/T ≥ C′ [(∥β∗∥2 + δ)/∥β∗∥2]2 s log p, β(0) ∈B(∥β∗∥2/240, β∗); then with probability at least 1−T/p Algorithm 2 with parameters ∆= C(∥β∗∥2 + δ) p T log p/n, λ(0) n/T = ∥β(0) −β∗∥2/(15√s), any κ ∈[1/2, 3/4] and ℓ1 regularization generates β(t) that has estimation error ∥β(t) −β∗∥2 ≤κt∥β(0) −β∗∥2 + 15C(∥β∗∥2 + δ) 1 −κ r s log p n T, for all t ∈[T]. Performing T ≍ log(n/(s log p)) iterations gives us estimation rate (∥β∗∥2 + δ) p (s log p/n) log (n/(s log p)) which is near-optimal on (s, p, n). The dependence on ∥β∗∥2, which also appears in the analysis of EM in the classical (low dimensional) setting [1], arises from fundamental limits of EM. Removing such dependence for MLR is possible by convex relaxation [7]. It is interesting to study how to remove it in the high dimensional setting. Low Rank Recovery. Second we consider the setting where the model parameter is a matrix Γ∗∈ Rp1×p2 with rank(Γ∗) = θ ≪min(p1, p2). We further assume X ∈Rp1×p2 is an i.i.d. Gaussian matrix, i.e., entries of X are independent random variables with distribution N(0, 1). We apply nuclear norm regularization to serve the low rank structure, i.e, R(Γ) = Pp1,p2 i=1 |si(Γ)|, where si(Γ) is the ith singular value of Γ. Similarly, we let SNR := ∥Γ∗∥F /σ. Corollary 3 (Low rank recovery in MLR). There exist constant ρ, C, C′ such that if SNR ≥ρ, n/T ≥C′ [(∥Γ∗∥F + σ)/∥Γ∗∥F ]2 θ(p1 + p2), Γ(0) ∈B(∥Γ∗∥F /1600, Γ∗); then with probability at least 1 −T exp(−p1 −p2) Algorithm 2 with parameters ∆= C(∥Γ∗∥F + σ) p T(p1 + p2)/n, λ(0) n/T = 0.01∥Γ(0) −Γ∗∥F / √ 2θ, any κ ∈[1/2, 3/4] and nuclear norm regularization generates Γ(t) that has estimation error ∥Γ(t) −Γ∗∥F ≤κt∥Γ(0) −Γ∗∥F + 100C′(∥Γ∗∥F + σ) 1 −κ r 2θ(p1 + p2) n T, for all t ∈[T]. The standard low rank matrix recovery with a single component, including other sensing matrix designs beyond the Gaussianity, has been studied extensively (e.g., [2, 4, 13, 15]). To the best of our knowledge, the theoretical study of the mixed low rank matrix recovery has not been considered. 5.3 Missing Covariate Regression As our last example, we consider the missing covariate regression (MCR) problem. To parallel standard linear regression, {yi, xi}n i=1 are samples of (Y, X) linked through Y = ⟨X, β∗⟩+ W. However, we assume each entry of xi is missing independently with probability ϵ ∈(0, 1). Therefore, the observed covariate vector exi takes the form exi,j = xi,j with probability 1 −ϵ ∗ otherwise . We assume the model is under Gaussian design X ∼N(0, Ip), W ∼N(0, σ2). We refer the reader to our Supplementary Material for the specific Qn(·|·) function. In high dimensional case, we assume β∗∈B0(s; p). We define ρ := ∥β∗∥2/σ to be the SNR and ω := r/∥β∗∥2 to be the relative contractivity radius. In particular, let ζ := (1 + ω)ρ. Corollary 4 (Sparse Recovery in MCR). There exist constants C, C′, C0, C1 such that if (1+ω)ρ ≤ C0 < 1, ϵ < C1, n/T ≥C′ max{σ2(ωρ)−1, 1}s log p, β(0) ∈B(ω∥β∗∥2, β∗); then with probability at least 1 −T/p Algorithm 2 with parameters ∆= Cσ p T log p/n, λ(0) n/T = ∥β(0) − β∗∥2/(45√s), any κ ∈[1/2, 3/4] and ℓ1 regularization generates β(t) that has estimation error ∥β(t) −β∗∥2 ≤κt∥β(0) −β∗∥2 + 45Cσ 1 −κ r s log p n T, for all t ∈[T], 7 Unlike the previous two models, we require an upper bound on the signal to noise ratio. This unusual constraint is in fact unavoidable [10]. By optimizing T, the order of final estimation error turns out to be σ p s log p/n log(n/(s log p)). 6 Simulations We now provide some simulation results to back up our theory. Note that while Theorem 1 requires resampling, we believe in practice this is unnecessary. This is validated by our results, where we apply Algorithm 1 to the four latent variable models discussed in Section 5. Convergence Rate. We first evaluate the convergence of Algorithm 1 assuming only that the initialization is a bounded distance from β∗. For a given error ω∥β∗∥2, the initial parameter β(0) is picked randomly from the sphere centered around β∗with radius ω∥β∗∥2. We use Algorithm 1 with T = 7, κ = 0.7, λ(0) n in Theorem 1. The choice of the critical parameter ∆is given in the Supplementary Material. For every single trial, we report estimation error ∥β(t) −β∗∥2 and optimization error ∥β(t) −β(T )∥2 in every iteration. We plot the log of errors over iteration t in Figure 1. Number of iterations 0 1 2 3 4 5 6 7 Log error -6 -5 -4 -3 -2 -1 0 1 Est error Opt error (a) GMM Number of iterations 0 1 2 3 4 5 6 7 Log error -10 -8 -6 -4 -2 0 2 Est error Opt error (b) MLR(sparse) Number of iterations 0 1 2 3 4 5 6 7 Log error -4 -3 -2 -1 0 1 Est error Opt error (c) MLR(low rank) Number of iterations 0 1 2 3 4 5 6 7 Log error -3 -2 -1 0 1 2 3 Est error Opt error (d) MCR Figure 1: Convergence of regularized EM algorithm. In each panel, one curve is plotted from single independent trial. Settings: (a,b,d) (n, p, s) = (500, 800, 5); (d) (n, p, θ) = (600, 30, 3); (a-c) SNR = 5; (d) (SNR, ϵ) = (0.5, 0.2); (a-d) ω = 0.5. Statistical Rate. We now evaluate the statistical rate. We set T = 7 and compute estimation error on bβ := β(T ). In Figure 2, we plot ∥bβ −β∗∥2 over normalized sample complexity, i.e., n/(s log p) for s-sparse parameter and n/(θp) for rank θ p-by-p parameter. We refer the reader to Figure 1 for other settings. We observe that the same normalized sample complexity leads to almost identical estimation error in practice, which thus supports the corresponding statistical rate established in Section 5. n/(s log p) 5 10 15 20 25 30 ∥ˆβ −β∗∥2 0.1 0.12 0.14 0.16 0.18 0.2 0.22 p = 200 p = 400 p = 800 (a) GMM n/(s log p) 5 10 15 20 25 30 ∥ˆβ −β∗∥2 0.15 0.2 0.25 0.3 0.35 0.4 p = 200 p = 400 p = 800 (b) MLR(sparse) n/(θp) 3 4 5 6 7 8 ∥ˆΓ −Γ∗∥F 0.4 0.6 0.8 1 1.2 1.4 p = 25 p = 30 p = 35 (c) MLR(low rank) n/(s log p) 5 10 15 20 25 30 ∥ˆβ −β∗∥2 1 1.2 1.4 1.6 1.8 2 p = 200 p = 400 p = 800 (d) MCR Figure 2: Statistical rates. Each point is an average of 20 independent trials. Settings: (a,b,d) s = 5; (c) θ = 3. Acknowledgments The authors would like to acknowledge NSF grants 1056028, 1302435 and 1116955. 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. 8 References [1] Sivaraman Balakrishnan, Martin J Wainwright, and Bin Yu. Statistical guarantees for the EM algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156, 2014. [2] T Tony Cai and Anru Zhang. Rop: Matrix recovery via rank-one projections. The Annals of Statistics, 43(1):102–138, 2015. [3] Emmanuel Candes and Terence Tao. The Dantzig selector: statistical estimation when p is much larger than n. The Annals of Statistics, pages 2313–2351, 2007. [4] Emmanuel J Cand`es and Yaniv Plan. Tight oracle inequalities for low-rank matrix recovery from a minimal number of noisy random measurements. Information Theory, IEEE Transactions on, 57(4):2342– 2359, 2011. [5] Arun Tejasvi Chaganty and Percy Liang. Spectral experts for estimating mixtures of linear regressions. arXiv preprint arXiv:1306.3729, 2013. [6] Yudong Chen, Sujay Sanghavi, and Huan Xu. Improved graph clustering. Information Theory, IEEE Transactions on, 60(10):6440–6455, Oct 2014. [7] Yudong Chen, Xinyang Yi, and Constantine Caramanis. A convex formulation for mixed regression with two components: Minimax optimal rates. In Conf. on Learning Theory, 2014. [8] Arthur P Dempster, Nan M Laird, and Donald B Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the royal statistical society. Series B (methodological), pages 1–38, 1977. [9] Po-Ling Loh and Martin J Wainwright. High-dimensional regression with noisy and missing data: Provable guarantees with non-convexity. In Advances in Neural Information Processing Systems, pages 2726– 2734, 2011. [10] Po-Ling Loh and Martin J Wainwright. Corrupted and missing predictors: Minimax bounds for highdimensional linear regression. In Information Theory Proceedings (ISIT), 2012 IEEE International Symposium on, pages 2601–2605. IEEE, 2012. [11] Jinwen Ma and Lei Xu. Asymptotic convergence properties of the em algorithm with respect to the overlap in the mixture. Neurocomputing, 68:105–129, 2005. [12] Geoffrey McLachlan and Thriyambakam Krishnan. The EM algorithm and extensions, volume 382. John Wiley & Sons, 2007. [13] Sahand Negahban, Martin J Wainwright, et al. Estimation of (near) low-rank matrices with noise and high-dimensional scaling. The Annals of Statistics, 39(2):1069–1097, 2011. [14] Sahand Negahban, Bin Yu, Martin J Wainwright, and Pradeep K Ravikumar. A unified framework for high-dimensional analysis of m-estimators with decomposable regularizers. In Advances in Neural Information Processing Systems, pages 1348–1356, 2009. [15] Benjamin Recht, Maryam Fazel, and Pablo A Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [16] Nicolas St¨adler, Peter B¨uhlmann, and Sara Van De Geer. L1-penalization for mixture regression models. Test, 19(2):209–256, 2010. [17] Paul Tseng. An analysis of the em algorithm and entropy-like proximal point methods. Mathematics of Operations Research, 29(1):27–44, 2004. [18] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [19] Martin J Wainwright. Structured regularizers for high-dimensional problems: Statistical and computational issues. Annual Review of Statistics and Its Application, 1:233–253, 2014. [20] Zhaoran Wang, Quanquan Gu, Yang Ning, and Han Liu. High dimensional expectation-maximization algorithm: Statistical optimization and asymptotic normality. arXiv preprint arXiv:1412.8729, 2014. [21] C.F.Jeff Wu. On the convergence properties of the em algorithm. The Annals of statistics, pages 95–103, 1983. [22] Xinyang Yi, Constantine Caramanis, and Sujay Sanghavi. Alternating minimization for mixed linear regression. arXiv preprint arXiv:1310.3745, 2013. 9 | 2015 | 229 |
5,735 | Barrier Frank-Wolfe for Marginal Inference Rahul G. Krishnan Courant Institute New York University Simon Lacoste-Julien INRIA - Sierra Project-Team ´Ecole Normale Sup´erieure, Paris David Sontag Courant Institute New York University Abstract We introduce a globally-convergent algorithm for optimizing the tree-reweighted (TRW) variational objective over the marginal polytope. The algorithm is based on the conditional gradient method (Frank-Wolfe) and moves pseudomarginals within the marginal polytope through repeated maximum a posteriori (MAP) calls. This modular structure enables us to leverage black-box MAP solvers (both exact and approximate) for variational inference, and obtains more accurate results than tree-reweighted algorithms that optimize over the local consistency relaxation. Theoretically, we bound the sub-optimality for the proposed algorithm despite the TRW objective having unbounded gradients at the boundary of the marginal polytope. Empirically, we demonstrate the increased quality of results found by tightening the relaxation over the marginal polytope as well as the spanning tree polytope on synthetic and real-world instances. 1 Introduction Markov random fields (MRFs) are used in many areas of computer science such as vision and speech. Inference in these undirected graphical models is generally intractable. Our work focuses on performing approximate marginal inference by optimizing the Tree Re-Weighted (TRW) objective (Wainwright et al., 2005). The TRW objective is concave, is exact for tree-structured MRFs, and provides an upper bound on the log-partition function. Fast combinatorial solvers for the TRW objective exist, including Tree-Reweighted Belief Propagation (TRBP) (Wainwright et al., 2005), convergent message-passing based on geometric programming (Globerson and Jaakkola, 2007), and dual decomposition (Jancsary and Matz, 2011). These methods optimize over the set of pairwise consistency constraints, also called the local polytope. Sontag and Jaakkola (2007) showed that significantly better results could be obtained by optimizing over tighter relaxations of the marginal polytope. However, deriving a message-passing algorithm for the TRW objective over tighter relaxations of the marginal polytope is challenging. Instead, Sontag and Jaakkola (2007) use the conditional gradient method (also called Frank-Wolfe) and offthe-shelf linear programming solvers to optimize TRW over the cycle consistency relaxation. Rather than optimizing over the cycle relaxation, Belanger et al. (2013) optimize the TRW objective over the exact marginal polytope. Then, using Frank-Wolfe, the linear minimization performed in the inner loop can be shown to correspond to MAP inference. The Frank-Wolfe optimization algorithm has seen increasing use in machine learning, thanks in part to its efficient handling of complex constraint sets appearing with structured data (Jaggi, 2013; Lacoste-Julien and Jaggi, 2015). However, applying Frank-Wolfe to variational inference presents challenges that were never resolved in previous work. First, the linear minimization performed in the inner loop is computationally expensive, either requiring repeatedly solving a large linear program, as in Sontag and Jaakkola (2007), or performing MAP inference, as in Belanger et al. (2013). Second, the TRW objective involves entropy terms whose gradients go to infinity near the boundary of the feasible set, therefore existing convergence guarantees for Frank-Wolfe do not apply. Third, variational inference using TRW involves both an outer and inner loop of Frank-Wolfe, where the outer loop optimizes the edge appearance probabilities in the TRW entropy bound to tighten it. 1 Neither Sontag and Jaakkola (2007) nor Belanger et al. (2013) explore the effect of optimizing over the edge appearance probabilities. Although MAP inference is in general NP hard (Shimony, 1994), it is often possible to find exact solutions to large real-world instances within reasonable running times (Sontag et al., 2008; Allouche et al., 2010; Kappes et al., 2013). Moreover, as we show in our experiments, even approximate MAP solvers can be successfully used within our variational inference algorithm. As MAP solvers improve in their runtime and performance, their iterative use could become feasible and as a byproduct enable more efficient and accurate marginal inference. Our work provides a fast deterministic alternative to recently proposed Perturb-and-MAP algorithms (Papandreou and Yuille, 2011; Hazan and Jaakkola, 2012; Ermon et al., 2013). Contributions. This paper makes several theoretical and practical innovations. We propose a modification to the Frank-Wolfe algorithm that optimizes over adaptively chosen contractions of the domain and prove its rate of convergence for functions whose gradients can be unbounded at the boundary. Our algorithm does not require a different oracle than standard Frank-Wolfe and could be useful for other convex optimization problems where the gradient is ill-behaved at the boundary. We instantiate the algorithm for approximate marginal inference over the marginal polytope with the TRW objective. With an exact MAP oracle, we obtain the first provably convergent algorithm for the optimization of the TRW objective over the marginal polytope, which had remained an open problem to the best of our knowledge. Traditional proof techniques of convergence for first order methods fail as the gradient of the TRW objective is not Lipschitz continuous. We develop several heuristics to make the algorithm practical: a fully-corrective variant of FrankWolfe that reuses previously found integer assignments thereby reducing the need for new (approximate) MAP calls, the use of local search between MAP calls, and significant re-use of computations between subsequent steps of optimizing over the spanning tree polytope. We perform an extensive experimental evaluation on both synthetic and real-world inference tasks. 2 Background Markov Random Fields: MRFs are undirected probabilistic graphical models where the probability distribution factorizes over cliques in the graph. We consider marginal inference on pairwise MRFs with N random variables X1, X2, . . . , XN where each variable takes discrete states xi ∈VALi. Let G = (V, E) be the Markov network with an undirected edge {i, j} ∈E for every two variables Xi and Xj that are connected together. Let N(i) refer to the set of neighbors of variable Xi. We organize the edge log-potentials θij(xi, xj) for all possible values of xi ∈VALi, xj ∈VALj in the vector θij, and similarly for the node log-potential vector θi. We regroup these in the overall vector ⃗θ. We introduce a similar grouping for the marginal vector ⃗µ: for example, µi(xi) gives the coordinate of the marginal vector corresponding to the assignment xi to variable Xi. Tree Re-weighted Objective (Wainwright et al., 2005): Let Z(⃗θ) be the partition function for the MRF and M be the set of all valid marginal vectors (the marginal polytope). The maximization of the TRW objective gives the following upper bound on the log partition function: log Z(⃗θ) ≤min ρ∈T max ⃗µ∈M ⟨⃗θ, ⃗µ⟩+ H(⃗µ; ρ) | {z } TRW(⃗µ;⃗θ,ρ) , (1) where the TRW entropy is: H(⃗µ; ρ) := X i∈V (1 − X j∈N (i) ρij)H(µi) + X (ij)∈E ρijH(µij), H(µi) := − X xi µi(xi) log µi(xi). (2) T is the spanning tree polytope, the convex hull of edge indicator vectors of all possible spanning trees of the graph. Elements of ρ ∈T specify the probability of an edge being present under a specific distribution over spanning trees. M is difficult to optimize over, and most TRW algorithms optimize over a relaxation called the local consistency polytope L ⊇M: L := n ⃗µ ≥0, P xi µi(xi) = 1 ∀i ∈V, P xi µij(xi, xj) = µj(xj), P xj µij(xi, xj) = µi(xi) ∀{i, j} ∈E o . The TRW objective TRW(⃗µ; ⃗θ, ρ) is a globally concave function of ⃗µ over L, assuming that ρ is obtained from a valid distribution over spanning trees of the graph (i.e. ρ ∈T). Frank-Wolfe (FW) Algorithm: In recent years, the Frank-Wolfe (aka conditional gradient) algorithm has gained popularity in machine learning (Jaggi, 2013) for the optimization of convex 2 functions over compact domains (denoted D). The algorithm is used to solve minx∈D f(x) by iteratively finding a good descent vertex by solving the linear subproblem: s(k) = arg min s∈D ⟨∇f(x(k)), s⟩ (FW oracle), (3) and then taking a convex step towards this vertex: x(k+1) = (1 −γ)x(k) + γs(k) for a suitably chosen step-size γ ∈[0, 1]. The algorithm remains within the feasible set (is projection free), is invariant to affine transformations of the domain, and can be implemented in a memory efficient manner. Moreover, the FW gap g(x(k)) := ⟨−∇f(x(k)), s(k) −x(k)⟩provides an upper bound on the suboptimality of the iterate x(k). The primal convergence of the Frank-Wolfe algorithm is given by Thm. 1 in Jaggi (2013), restated here for convenience: for k ≥1, the iterates x(k) satisfy: (4) f(x(k)) −f(x∗) ≤2Cf k + 2, where Cf is called the “curvature constant”. Under the assumption that ∇f is L-Lipschitz continuous1 on D, we can bound it as Cf ≤L diam||.||(D)2. Marginal Inference with Frank-Wolfe: To optimize max⃗µ∈M TRW(⃗µ; ⃗θ, ρ) with Frank-Wolfe, the linear subproblem (3) becomes arg max⃗µ∈M⟨˜θ, ⃗µ⟩, where the perturbed potentials ˜θ correspond to the gradient of TRW(⃗µ; ⃗θ, ρ) with respect to ⃗µ. Elements of ˜θ are of the form θc(xc) + Kc(1 + log µc(xc)), evaluated at the pseudomarginals’ current location in M, where Kc is the coefficient of the entropy for the node/edge term in (2). The FW linear subproblem here is thus equivalent to performing MAP inference in a graphical model with potentials ˜θ (Belanger et al., 2013), as the vertices of the marginal polytope are in 1-1 correspondence with valid joint assignments to the random variables of the MRF, and the solution of a linear program is always achieved at a vertex of the polytope. The TRW objective does not have a Lipschitz continuous gradient over M, and so standard convergence proofs for Frank-Wolfe do not hold. 3 Optimizing over Contractions of the Marginal Polytope Motivation: We wish to (1) use the fewest possible MAP calls, and (2) avoid regions near the boundary where the unbounded curvature of the function slows down convergence. A viable option to address (1) is through the use of correction steps, where after a Frank-Wolfe step, one optimizes over the polytope defined by previously visited vertices of M (called the fully-corrective Frank-Wolfe (FCFW) algorithm and proven to be linearly convergence for strongly convex objectives (Lacoste-Julien and Jaggi, 2015)). This does not require additional MAP calls. However, we found (see Sec. 5) that when optimizing the TRW objective over M, performing correction steps can surprisingly hurt performance. This leaves us in a dilemma: correction steps enable decreasing the objective without additional MAP calls, but they can also slow global progress since iterates after correction sometimes lie close to the boundary of the polytope (where the FW directions become less informative). In a manner akin to barrier methods and to Garber and Hazan (2013)’s local linear oracle, our proposed solution maintains the iterates within a contraction of the polytope. This gives us most of the mileage obtained from performing the correction steps without suffering the consequences of venturing too close to the boundary of the polytope. We prove a global convergence rate for the iterates with respect to the true solution over the full polytope. We describe convergent algorithms to optimize TRW(⃗µ; ⃗θ, ρ) for ⃗µ ∈M. The approach we adopt to deal with the issue of unbounded gradients at the boundary is to perform Frank-Wolfe within a contraction of the marginal polytope given by Mδ for δ ∈[0, 1], with either a fixed δ or an adaptive δ. Definition 3.1 (Contraction polytope). Mδ := (1 −δ)M + δ u0, where u0 ∈M is the vector representing the uniform distribution. Marginal vectors that lie within Mδ are bounded away from zero as all the components of u0 are strictly positive. Denoting V(δ) as the set of vertices of Mδ, V as the set of vertices of M and f(⃗µ) := −TRW(⃗µ; ⃗θ, ρ), the key insight that enables our novel approach is that: arg min v(δ)∈V(δ) D ∇f, v(δ)E | {z } (Linear Minimization over Mδ) ≡arg min v∈V ⟨∇f, (1 −δ)v + δu0⟩ | {z } (Definition of v(δ)) ≡ (1 −δ) arg min v∈V ⟨∇f, v⟩+ δu0. | {z } (Run MAP solver and shift vertex) 1I.e. ∥∇f(x) −∇f(x′)∥∗≤L∥x −x′∥for x, x′ ∈D. Notice that the dual norm ∥·∥∗is needed here. 3 Algorithm 1: Updates to δ after a MAP call (Adaptive δ variant) 1: At iteration k. Assuming x(k), u0, δ(k−1), f are defined and s(k) has been computed 2: Compute g(x(k)) = ⟨−∇f(x(k)), s(k) −x(k)⟩ (Compute FW gap) 3: Compute gu(x(k)) = ⟨−∇f(x(k)), u0 −x(k)⟩ (Compute “uniform gap”) 4: if gu(x(k)) < 0 then 5: Let ˜δ = g(x(k)) −4gu(x(k)) (Compute new proposal for δ) 6: if ˜δ < δ(k−1) then 7: δ(k) = min ˜δ, δ(k−1) 2 (Shrink by at least a factor of two if proposal is smaller) 8: end if 9: end if (and set δ(k) = δ(k−1) if it was not updated) Therefore, to solve the FW subproblem (3) over Mδ, we can run as usual a MAP solver and simply shift the resulting vertex of M towards u0 to obtain a vertex of Mδ. Our solution to optimize over restrictions of the polytope is more broadly applicable to the optimization problem defined below, with f satisfying Prop. 3.3 (satisfied by the TRW objective) in order to get convergence rates. Problem 3.2. Solve minx∈D f(x) where D is a compact convex set and f is convex and continuously differentiable on the relative interior of D. Property 3.3. (Controlled growth of Lipschitz constant over Dδ). We define Dδ := (1 −δ)D + δu0 for a fixed u0 in the relative interior of D. We suppose that there exists a fixed p ≥0 and L such that for any δ > 0, ∇f(x) has a bounded Lipschitz constant Lδ ≤Lδ−p ∀x ∈Dδ. Fixed δ: The first algorithm fixes a value for δ a-priori and performs the optimization over Dδ. The following theorem bounds the sub-optimality of the iterates with respect to the optimum over D. Theorem 3.4 (Suboptimality bound for fixed-δ algorithm). Let f satisfy the properties in Prob. 3.2 and Prop. 3.3, and suppose further that f is finite on the boundary of D. Then the use of Frank-Wolfe for minx∈Dδ f(x) realizes a sub-optimality over D bounded as: f(x(k)) −f(x∗) ≤ 2Cδ (k + 2) + ω (δ diam(D)) , where x∗is the optimal solution in D, Cδ ≤Lδ diam||.||(Dδ)2, and ω is the modulus of continuity function of the (uniformly) continuous f (in particular, ω(δ) ↓0 as δ ↓0). The full proof is given in App. C. The first term of the bound comes from the standard Frank-Wolfe convergence analysis of the sub-optimality of x(k) relative to x∗ (δ), the optimum over Dδ, as in (4) and using Prop. 3.3. The second term arises by bounding f(x∗ (δ)) −f(x∗) ≤f(˜x) −f(x∗) with a cleverly chosen ˜x ∈Dδ (as x∗ (δ) is optimal in Dδ). We pick ˜x := (1 −δ)x∗+ δu0 and note that ∥˜x −x∗∥≤δ diam(D). As f is continuous on a compact set, it is uniformly continuous and we thus have f(˜x) −f(x∗) ≤ω(δ diam(D)) with ω its modulus of continuity function. Adaptive δ: The second variant to solve minx∈D f(x) iteratively perform FW steps over Dδ, but also decreases δ adaptively. The update schedule for δ is given in Alg. 1 and is motivated by the convergence proof. The idea is to ensure that the FW gap over Dδ is always at least half the FW gap over D, relating the progress over Dδ with the one over D. It turns out that FW-gap-Dδ = (1 −δ)FW-gap-D + δ · gu(x(k)), where the “uniform gap” gu(x(k)) quantifies the decrease of the function when contracting towards u0. When gu(x(k)) is negative and large compared to the FW gap, we need to shrink δ (see step 5 in Alg. 1) to ensure that the δ-modified direction is a sufficient descent direction. We can show that the algorithm converges to the global solution as follows: Theorem 3.5 (Global convergence for adaptive-δ variant over D). For a function f satisfying the properties in Prob. 3.2 and Prop. 3.3, the sub-optimality of the iterates obtained by running the FW updates over Dδ with δ updated according to Alg. 1 is bounded as: f(x(k)) −f(x∗) ≤O k− 1 p+1 . A full proof with a precise rate and constants is given in App. D. The sub-optimality hk := f(x(k))− f(x∗) traverses three stages with an overall rate as above. The updates to δ(k) as in Alg. 1 enable us 4 Algorithm 2: Approximate marginal inference over M (solving (1)). Here f is the negative TRW objective. 1: Function TRW-Barrier-FW(ρ(0), ϵ, δ(init), u0): 2: Inputs: Edge-appearance probabilities ρ(0), δ(init) ≤1 4 initial contraction of polytope, inner loop stopping criterion ϵ, fixed reference point u0 in the interior of M. Let δ(−1) = δ(init). 3: Let V := {u0} (visited vertices), x(0) = u0 (Initialize the algorithm at the uniform distribution) 4: for i = 0 . . . MAX RHO ITS do {FW outer loop to optimize ρ over T} 5: for k = 0 . . . MAXITS do {FCFW inner loop to optimize x over M} 6: Let ˜θ = ∇f(x(k); ⃗θ, ρ(i)) (Compute gradient) 7: Let s(k) ∈arg min v∈M ⟨˜θ, v⟩ (Run MAP solver to compute FW vertex) 8: Compute g(x(k)) = ⟨−˜θ, s(k) −x(k)⟩ (Inner loop FW duality gap) 9: if g(x(k)) ≤ϵ then 10: break FCFW inner loop (x(k) is ϵ-optimal) 11: end if 12: δ(k) = δ(k−1) (For Adaptive-δ: Run Alg. 1 to modify δ) 13: Let s(k) (δ) = (1 −δ(k))s(k) + δ(k)u0 and d(k) (δ) = s(k) (δ) −x(k) (δ-contracted quantities) 14: x(k+1) = arg min{f(x(k) + γ d(k) (δ)) : γ ∈[0, 1]} (FW step with line search) 15: Update correction polytope: V := V ∪{s(k)} 16: x(k+1) := CORRECTION(x(k+1), V, δ(k), ρ(i)) (optional: correction step) 17: x(k+1), Vsearch := LOCALSEARCH(x(k+1), s(k), δ(k), ρ(i)) (optional: fast MAP solver) 18: Update correction polytope (with vertices from LOCALSEARCH): V := V ∪{Vsearch} 19: end for 20: ρv ←minSpanTree(edgesMI(x(k))) (FW vertex of the spanning tree polytope) 21: ρ(i+1) ←ρ(i) + ( i i+2)(ρv −ρ(i)) (Fixed step-size schedule FW update for ρ kept in relint(T)) 22: x(0) ←x(k), δ(−1) ←δ(k−1) (Re-initialize for FCFW inner loop) 23: If i < MAX RHO ITS then x(0) = CORRECTION(x(0), V, δ(−1), ρ(i+1)) 24: end for 25: return x(0) and ρ(i) to (1) upper bound the duality gap over D as a function of the duality gap in Dδ and (2) lower bound the value of δ(k) as a function of hk. Applying the standard Descent Lemma with the Lipschitz constant on the gradient of the form Lδ−p (Prop. 3.3), and replacing δ(k) by its bound in hk, we get the recurrence: hk+1 ≤hk −Chp+2 k . Solving this gives us the desired bound. Application to the TRW Objective: min⃗µ∈M −TRW(⃗µ; ⃗θ, ρ) is akin to minx∈D f(x) and the (strong) convexity of −TRW(⃗µ; ⃗θ, ρ) has been previously shown (Wainwright et al., 2005; London et al., 2015). The gradient of the TRW objective is Lipschitz continuous over Mδ since all marginals are strictly positive. Its growth for Prop. 3.3 can be bounded with p = 1 as we show in App. E.1. This gives a rate of convergence of O(k−1/2) for the adaptive-δ variant, which interestingly is a typical rate for non-smooth convex optimization. The hidden constant is of the order O(∥θ∥·|V |). The modulus of continuity ω for the TRW objective is close to linear (it is almost a Lipschitz function), and its constant is instead of the order O(∥θ∥+|V |). 4 Algorithm Alg. 2 describes the pseudocode for our proposed algorithm to do marginal inference with TRW(⃗µ; ⃗θ, ρ). minSpanTree finds the minimum spanning tree of a weighted graph, and edgesMI(⃗µ) computes the mutual information of edges of G from the pseudomarginals in ⃗µ2 (to perform FW updates over ρ as in Alg. 2 in Wainwright et al. (2005)). It is worthwhile to note that our approach uses three levels of Frank-Wolfe: (1) for the (tightening) optimization of ρ over T, (2) to perform approximate marginal inference, i.e for the optimization of ⃗µ over M, and (3) to perform the correction steps (lines 16 and 23). We detail a few heuristics that aid practicality. Fast Local Search: Fast methods for MAP inference such as Iterated Conditional Modes (Besag, 1986) offer a cheap, low cost alternative to a more expensive combinatorial MAP solver. We 2The component ij has value H(µi) + H(µj) −H(µij). 5 warm start the ICM solver with the last found vertex s(k) of the marginal polytope. The subroutine LOCALSEARCH (Alg. 6 in Appendix) performs a fixed number of FW updates to the pseudomarginals using ICM as the (approximate) MAP solver. Re-optimizing over the Vertices of M (FCFW algorithm): As the iterations of FW progress, we keep track of the vertices of the marginal polytope found by Alg. 2 in the set V . We make use of these vertices in the CORRECTION subroutine (Alg. 5 in Appendix) which re-optimizes the objective function over (a contraction of) the convex hull of the elements of V (called the correction polytope). x(0) in Alg. 2 is initialized to the uniform distribution which is guaranteed to be in M (and Mδ). After updating ρ, we set x(0) to the approximate minimizer in the correction polytope. The intuition is that changing ρ by a small amount may not substantially modify the optimal x∗ (for the new ρ) and that the new optimum might be in the convex hull of the vertices found thus far. If so, CORRECTION will be able to find it without resorting to any additional MAP calls. This encourages the MAP solver to search for new, unique vertices instead of rediscovering old ones. Approximate MAP Solvers: We can swap out the exact MAP solver with an approximate MAP solver. The primal objective plus the (approximate) duality gap may no longer be an upper bound on the log-partition function (black-box MAP solvers could be considered to optimize over an inner bound to the marginal polytope). Furthermore, the gap over D may be negative if the approximate MAP solver fails to find a direction of descent. Since adaptive-δ requires that the gap be positive in Alg. 1, we take the max over the last gap obtained over the correction polytope (which is always non-negative) and the computed gap over D as a heuristic. Theoretically, one could get similar convergence rates as in Thm. 3.4 and 3.5 using an approximate MAP solver that has a multiplicative guarantee on the gap (line 8 of Alg. 2), as was done previously for FW-like algorithms (see, e.g., Thm. C.1 in Lacoste-Julien et al. (2013)). With an ϵ-additive error guarantee on the MAP solution, one can prove similar rates up to a suboptimality error of ϵ. Even if the approximate MAP solver does not provide an approximation guarantee, if it returns an upper bound on the value of the MAP assignment (as do branch-and-cut solvers for integer linear programs, or Sontag et al. (2008)), one can use this to obtain an upper bound on log Z (see App. J). 5 Experimental Results Setup: The L1 error in marginals is computed as: ζµ := 1 N PN i=1|µi(1) −µ∗ i (1)|. When using exact MAP inference, the error in log Z (denoted ζlog Z) is computed by adding the duality gap to the primal (since this guarantees us an upper bound). For approximate MAP inference, we plot the primal objective. We use a non-uniform initialization of ρ computed with the Matrix Tree Theorem (Sontag and Jaakkola, 2007; Koo et al., 2007). We perform 10 updates to ρ, optimize ⃗µ to a duality gap of 0.5 on M, and always perform correction steps. We use LOCALSEARCH only for the realworld instances. We use the implementation of TRBP and the Junction Tree Algorithm (to compute exact marginals) in libDAI (Mooij, 2010). Unless specified, we compute marginals by optimizing the TRW objective using the adaptive-δ variant of the algorithm (denoted in the figures as Mδ). MAP Solvers: For approximate MAP, we run three solvers in parallel: QPBO (Kolmogorov and Rother, 2007; Boykov and Kolmogorov, 2004), TRW-S (Kolmogorov, 2006) and ICM (Besag, 1986) using OpenGM (Andres et al., 2012) and use the result that realizes the highest energy. For exact inference, we use Gurobi Optimization (2015) or toulbar2 (Allouche et al., 2010). Test Cases: All of our test cases are on binary pairwise MRFs. (1) Synthetic 10 nodes cliques: Same setup as Sontag and Jaakkola (2007, Fig. 2), with 9 sets of 100 instances each with coupling strength drawn from U[−θ, θ] for θ ∈{0.5, 1, 2, . . . , 8}. (2) Synthetic Grids: 15 trials with 5 × 5 grids. We sample θi ∼U[−1, 1] and θij ∈[−4, 4] for nodes and edges. The potentials were (−θi, θi) for nodes and (θij, −θij; −θij, θij) for edges. (3) Restricted Boltzmann Machines (RBMs): From the Probabilistic Inference Challenge 2011.3 (4) Horses: Large (N ≈12000) MRFs representing images from the Weizmann Horse Data (Borenstein and Ullman, 2002) with potentials learned by Domke (2013). (5) Chinese Characters: An image completion task from the KAIST Hanja2 database, compiled in OpenGM by Andres et al. (2012). The potentials were learned using Decision Tree Fields (Nowozin et al., 2011). The MRF is not a grid due to skip edges that tie nodes at various offsets. The potentials are a combination of submodular and supermodular and therefore a harder task for inference algorithms. 3http://www.cs.huji.ac.il/project/PASCAL/index.php 6 0 10 20 30 40 50 60 70 80 MAP calls 0 10 20 30 40 50 Error in LogZ (ζlog Z) Mδ M0.0001 M Lδ M(no correction) (a) ζlog Z: 5 × 5 grids M vs Mδ 0 5 10 15 20 25 MAP calls 0 10 20 30 40 50 60 Error in LogZ (ζlog Z) Mδ M0.0001 M Lδ M(no correction) (b) ζlog Z: 10 node cliques M vs Mδ 0 20 40 60 80 100 120 MAP calls 0.0 0.1 0.2 0.3 0.4 0.5 Error in Marginals (ζµ) Exact MAP Mδ Lδ Approx MAP Mδ (c) ζµ: 5 × 5 grids Approx. vs. Exact MAP 0 20 40 60 80 100 MAP calls 10−1 100 101 102 103 Error in LogZ (ζlog Z) Exact MAP Mδ Lδ Approx MAP Mδ (d) ζlog Z: 40 node RBM Approx. vs. Exact MAP 0.51 2 3 4 5 6 7 8 θ 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Error in Marginals (ζµ) perturbMAP Lδ Lδ(ρopt) Mδ(ρopt) Mδ (e) ζµ: 10 node cliques Optimization over T 0.51 2 3 4 5 6 7 8 θ 10−1 100 101 102 Error in LogZ (ζlog Z) perturbMAP Lδ Lδ(ρopt) Mδ(ρopt) Mδ (f) ζlog Z: 10 node cliques Optimization over T Figure 1: Synthetic Experiments: In Fig. 1(c) & 1(d), we unravel MAP calls across updates to ρ. Fig. 1(d) corresponds to a single RBM (not an aggregate over trials) where for “Approx MAP” we plot the absolute error between the primal objective and log Z (not guaranteed to be an upper bound). On the Optimization of M versus Mδ We compare the performance of Alg. 2 on optimizing over M (with and without correction), optimizing over Mδ with fixed-δ = 0.0001 (denoted M0.0001) and optimizing over Mδ using the adaptive-δ variant. These plots are averaged across all the trials for the first iteration of optimizing over T. We show error as a function of the number of MAP calls since this is the bottleneck for large MRFs. Fig. 1(a), 1(b) depict the results of this optimization aggregated across trials. We find that all variants settle on the same average error. The adaptive δ variant converges faster on average followed by the fixed δ variant. Despite relatively quick convergence for M with no correction on the grids, we found that correction was crucial to reducing the number of MAP calls in subsequent steps of inference after updates to ρ. As highlighted earlier, correction steps on M (in blue) worsen convergence, an effect brought about by iterates wandering too close to the boundary of M. On the Applicability of Approximate MAP Solvers Synthetic Grids: Fig. 1(c) depicts the accuracy of approximate MAP solvers versus exact MAP solvers aggregated across trials for 5 × 5 grids. The results using approximate MAP inference are competitive with those of exact inference, even as the optimization is tightened over T. This is an encouraging and non-intuitive result since it indicates that one can achieve high quality marginals through the use of relatively cheaper approximate MAP oracles. RBMs: As in Salakhutdinov (2008), we observe for RBMs that the bound provided by TRW(⃗µ; ⃗θ, ρ) over Lδ is loose and does not get better when optimizing over T. As Fig. 1(d) depicts for a single RBM, optimizing over Mδ realizes significant gains in the upper bound on log Z which improves with updates to ρ. The gains are preserved with the use of the approximate MAP solvers. Note that there are also fast approximate MAP solvers specifically for RBMs (Wang et al., 2014). Horses: See Fig. 2 (right). The models are close to submodular and the local relaxation is a good approximation to the marginal polytope. Our marginals are visually similar to those obtained by TRBP and our algorithm is able to scale to large instances by using approximate MAP solvers. 7 Ground Truth Ground Truth TRBP Marginals TRBP Marginals COND−0.01 Marginals COND−0.01 Marginals COND−0.01 Marginals − Opt Rho COND−0.01 Marginals − Opt Rho Ground Truth MAP TRBP FW(1) FW(10) Ground Truth Ground Truth TRBP Marginals TRBP Marginals COND−0.01 Marginals COND−0.01 Marginals COND−0.01 Marginals − Opt Rho COND−0.01 Marginals − Opt Rho Ground Truth MAP TRBP FW(1) FW(10) Ground Truth Ground Truth TRBP Marginals TRBP Marginals COND−0.01 Marginals COND−0.01 Marginals COND−0.01 Marginals − Opt Rho COND−0.01 Marginals − Opt Rho Ground Truth MAP TRBP FW(1) FW(10) Ground Truth Ground Truth TRBP Marginals TRBP Marginals COND−0.01 Marginals COND−0.01 Marginals COND−0.01 Marginals − Opt Rho COND−0.01 Marginals − Opt Rho Ground Truth MAP TRBP FW(1) FW(10) Figure 2: Results on real world test cases. FW(i) corresponds to the final marginals at the ith iteration of optimizing ρ. The area highlighted on the Chinese Characters depicts the region of uncertainty. On the Importance of Optimizing over T Synthetic Cliques: In Fig. 1(e), 1(f), we study the effect of tightening over T against coupling strength θ. We consider the ζµ and ζlog Z obtained for the final marginals before updating ρ (step 19) and compare to the values obtained after optimizing over T (marked with ρopt). The optimization over T has little effect on TRW optimized over Lδ. For optimization over Mδ, updating ρ realizes better marginals and bound on log Z (over and above those obtained in Sontag and Jaakkola (2007)). Chinese Characters: Fig. 2 (left) displays marginals across iterations of optimizing over T. The submodular and supermodular potentials lead to frustrated models for which Lδ is very loose, which results in TRBP obtaining poor results.4 Our method produces reasonable marginals even before the first update to ρ, and these improve with tightening over T. Related Work for Marginal Inference with MAP Calls Hazan and Jaakkola (2012) estimate log Z by averaging MAP estimates obtained on randomly perturbed inflated graphs. Our implementation of the method performed well in approximating log Z but the marginals (estimated by fixing the value of each random variable and estimating log Z for the resulting graph) were less accurate than our method (Fig. 1(e), 1(f)). 6 Discussion We introduce the first provably convergent algorithm for the TRW objective over the marginal polytope, under the assumption of exact MAP oracles. We quantify the gains obtained both from marginal inference over M and from tightening over the spanning tree polytope. We give heuristics that improve the scalability of Frank-Wolfe when used for marginal inference. The runtime cost of iterative MAP calls (a reasonable rule of thumb is to assume an approximate MAP call takes roughly the same time as a run of TRBP) is worthwhile particularly in cases such as the Chinese Characters where L is loose. Specifically, our algorithm is appropriate for domains where marginal inference is hard but there exist efficient MAP solvers capable of handling non-submodular potentials. Code is available at https://github.com/clinicalml/fw-inference. Our work creates a flexible, modular framework for optimizing a broad class of variational objectives, not simply TRW, with guarantees of convergence. We hope that this will encourage more research on building better entropy approximations. The framework we adopt is more generally applicable to optimizing functions whose gradients tend to infinity at the boundary of the domain. Our method to deal with gradients that diverge at the boundary bears resemblance to barrier functions used in interior point methods insofar as they bound the solution away from the constraints. Iteratively decreasing δ in our framework can be compared to decreasing the strength of the barrier, enabling the iterates to get closer to the facets of the polytope, although its worthwhile to note that we have an adaptive method of doing so. Acknowledgements RK and DS gratefully acknowledge the support of the DARPA Probabilistic Programming for Advancing Machine Learning (PPAML) Program under AFRL prime contract no. FA8750-14-C-0005. 4We run TRBP for 1000 iterations using damping = 0.9; the algorithm converges with a max norm difference between consecutive iterates of 0.002. Tightening over T did not significantly change the results of TRBP. 8 References D. Allouche, S. de Givry, and T. Schiex. Toulbar2, an open source exact cost function network solver, 2010. B. Andres, B. T., and J. H. Kappes. OpenGM: A C++ library for discrete graphical models, June 2012. D. Belanger, D. Sheldon, and A. McCallum. Marginal inference in MRFs using Frank-Wolfe. NIPS Workshop on Greedy Optimization, Frank-Wolfe and Friends, 2013. J. Besag. On the statistical analysis of dirty pictures. J R Stat Soc Series B, 1986. E. Borenstein and S. Ullman. Class-specific, top-down segmentation. In ECCV, 2002. Y. Boykov and V. Kolmogorov. An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision. TPAMI, 2004. J. Domke. Learning graphical model parameters with approximate marginal inference. TPAMI, 2013. S. Ermon, C. P. Gomes, A. Sabharwal, and B. Selman. Taming the curse of dimensionality: Discrete integration by hashing and optimization. In ICML, 2013. D. Garber and E. Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. arXiv preprint arXiv:1301.4666, 2013. A. Globerson and T. Jaakkola. Convergent propagation algorithms via oriented trees. In UAI, 2007. I. Gurobi Optimization. Gurobi optimizer reference manual, 2015. T. Hazan and T. Jaakkola. On the partition function and random maximum a-posteriori perturbations. In ICML, 2012. M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, 2013. J. Jancsary and G. Matz. Convergent decomposition solvers for tree-reweighted free energies. In AISTATS, 2011. J. Kappes et al. A comparative study of modern inference techniques for discrete energy minimization problems. In CVPR, 2013. V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. TPAMI, 2006. V. Kolmogorov and C. Rother. Minimizing nonsubmodular functions with graph cuts-A Review. TPAMI, 2007. T. Koo, A. Globerson, X. Carreras, and M. Collins. Structured prediction models via the matrix-tree theorem. In EMNLP-CoNLL, 2007. S. Lacoste-Julien and M. Jaggi. On the global linear convergence of Frank-Wolfe optimization variants. In NIPS, 2015. S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate Frank-Wolfe optimization for structural SVMs. In ICML, 2013. B. London, B. Huang, and L. Getoor. The benefits of learning with strongly convex approximate inference. In ICML, 2015. J. M. Mooij. libDAI: A free and open source C++ library for discrete approximate inference in graphical models. JMLR, 2010. S. Nowozin, C. Rother, S. Bagon, T. Sharp, B. Yao, and P. Kohli. Decision tree fields. In ICCV, 2011. G. Papandreou and A. Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In ICCV, 2011. R. Salakhutdinov. Learning and evaluating Boltzmann machines. Technical report, 2008. S. Shimony. Finding MAPs for belief networks is NP-hard. Artificial Intelligence, 1994. D. Sontag and T. Jaakkola. New outer bounds on the marginal polytope. In NIPS, 2007. D. Sontag, T. Meltzer, A. Globerson, Y. Weiss, and T. Jaakkola. Tightening LP relaxations for MAP using message-passing. In UAI, 2008. M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. A new class of upper bounds on the log partition function. IEEE Transactions on Information Theory, 2005. S. Wang, R. Frostig, P. Liang, and C. Manning. Relaxations for inference in restricted Boltzmann machines. In ICLR Workshop, 2014. 9 | 2015 | 23 |
5,736 | Beyond Convexity: Stochastic Quasi-Convex Optimization Elad Hazan Princeton University ehazan@cs.princeton.edu Kfir Y. Levy Technion kfiryl@tx.technion.ac.il Shai Shalev-Shwartz The Hebrew University shais@cs.huji.ac.il Abstract Stochastic convex optimization is a basic and well studied primitive in machine learning. It is well known that convex and Lipschitz functions can be minimized efficiently using Stochastic Gradient Descent (SGD). The Normalized Gradient Descent (NGD) algorithm, is an adaptation of Gradient Descent, which updates according to the direction of the gradients, rather than the gradients themselves. In this paper we analyze a stochastic version of NGD and prove its convergence to a global minimum for a wider class of functions: we require the functions to be quasi-convex and locally-Lipschitz. Quasi-convexity broadens the concept of unimodality to multidimensions and allows for certain types of saddle points, which are a known hurdle for first-order optimization methods such as gradient descent. Locally-Lipschitz functions are only required to be Lipschitz in a small region around the optimum. This assumption circumvents gradient explosion, which is another known hurdle for gradient descent variants. Interestingly, unlike the vanilla SGD algorithm, the stochastic normalized gradient descent algorithm provably requires a minimal minibatch size. 1 Introduction The benefits of using the Stochastic Gradient Descent (SGD) scheme for learning could not be stressed enough. For convex and Lipschitz objectives, SGD is guaranteed to find an ϵ-optimal solution within O(1/ϵ2) iterations and requires only an unbiased estimator for the gradient, which is obtained with only one (or a few) data samples. However, when applied to non-convex problems several drawbacks are revealed. In particular, SGD is widely used for deep learning [2], one of the most interesting fields where stochastic non-convex optimization problems arise. Often, the objective in these kind of problems demonstrates two extreme phenomena [3]: on the one hand plateaus—regions with vanishing gradients; and on the other hand cliffs—exceedingly high gradients. As expected, applying SGD to such problems is often reported to yield unsatisfactory results. In this paper we analyze a stochastic version of the Normalized Gradient Descent (NGD) algorithm, which we denote by SNGD. Each iteration of SNGD is as simple and efficient as SGD, but is much more appropriate for non-convex optimization problems, overcoming some of the pitfalls that SGD may encounter. Particularly, we define a family of locally-quasi-convex and locally-Lipschitz functions, and prove that SNGD is suitable for optimizing such objectives. Local-Quasi-convexity is a generalization of unimodal functions to multidimensions, which includes quasi-convex, and convex functions as a subclass. Locally-Quasi-convex functions allow for certain types of plateaus and saddle points which are difficult for SGD and other gradient descent variants. Local-Lipschitzness is a generalization of Lipschitz functions that only assumes Lipschitzness in a small region around the minima, whereas farther away the gradients may be unbounded. Gradient explosion is, thus, another difficulty that is successfully tackled by SNGD and poses difficulties for other stochastic gradient descent variants. 1 Our contributions: • We introduce local-quasi-convexity, a property that extends quasi-convexity and captures unimodal functions which are not quasi-convex. We prove that NGD finds an ϵ-optimal minimum for such functions within O(1/ϵ2) iterations. As a special case, we show that the above rate can be attained for quasi-convex functions that are Lipschitz in an Ω(ϵ)-region around the optimum (gradients may be unbounded outside this region). For objectives that are also smooth in an Ω(√ϵ)-region around the optimum, we prove a faster rate of O(1/ϵ). • We introduce a new setup: stochastic optimization of locally-quasi-convex functions; and show that this setup captures Generalized Linear Models (GLM) regression, [14]. For this setup, we devise a stochastic version of NGD (SNGD), and show that it converges within O(1/ϵ2) iterations to an ϵ-optimal minimum. • The above positive result requires that at each iteration of SNGD, the gradient should be estimated using a minibatch of a minimal size. We provide a negative result showing that if the minibatch size is too small then the algorithm might indeed diverge. • We report experimental results supporting our theoretical guarantees and demonstrate an accelerated convergence attained by SNGD. 1.1 Related Work Quasi-convex optimization problems arise in numerous fields, spanning economics [20, 12], industrial organization [21] , and computer vision [8]. It is well known that quasi-convex optimization tasks can be solved by a series of convex feasibility problems [4]; However, generally solving such feasibility problems may be very costly [6]. There exists a rich literature concerning quasi-convex optimization in the offline case, [17, 22, 9, 18]. A pioneering paper by [15], was the first to suggest an efficient algorithm, namely Normalized Gradient Descent, and prove that this algorithm attains ϵoptimal solution within O(1/ϵ2) iterations given a differentiable quasi-convex objective. This work was later extended by [10], establishing the same rate for upper semi-continuous quasi-convex objectives. In [11] faster rates for quasi-convex optimization are attained, but they assume to know the optimal value of the objective, an assumption that generally does not hold in practice. Among the deep learning community there have been several attempts to tackle plateaus/gradientexplosion. Ideas spanning gradient-clipping [16], smart initialization [5], and more [13], have shown to improve training in practice. Yet, non of these works provides a theoretical analysis showing better convergence guarantees. To the best of our knowledge, there are no previous results on stochastic versions of NGD, neither results regarding locally-quasi-convex/locally-Lipschitz functions. 1.2 Plateaus and Cliffs - Difficulties for GD x⇤ krf(x)k = m 7! 0 krf(x)k = M 7! 1 1 2 Figure 1: A quasi-convex Locally-Lipschitz function with plateaus and cliffs. Gradient descent with fixed step sizes, including its stochastic variants, is known to perform poorly when the gradients are too small in a plateau area of the function, or alternatively when the other extreme happens: gradient explosions. These two phenomena have been reported in certain types of non-convex optimization, such as training of deep networks. Figure 1 depicts a one-dimensional family of functions for which GD behaves provably poorly. With a large step-size, GD will hit the cliffs and then oscillate between the two boundaries. Alternatively, with a small step size, the low gradients will cause GD to miss the middle valley which has constant size of 1/2. On the other hand, this exact function is quasi-convex and locally-Lipschitz, and hence the NGD algorithm provably converges to the optimum quickly. 2 2 Definitions and Notations We use ∥· ∥to denote the Euclidean norm. Bd(x, r) denotes the d dimensional Euclidean ball of radius r, centered around x, and Bd := Bd(0, 1). [N] denotes the set {1, . . . , N}. For simplicity, throughout the paper we always assume that functions are differentiable (but if not stated explicitly, we do not assume any bound on the norm of the gradients). Definition 2.1. (Local-Lipschitzness and Local-Smoothness) Let z ∈Rd, G, ϵ ≥0. A function f : K 7→R is called (G, ϵ, z)-Locally-Lipschitz if for every x, y ∈Bd(z, ϵ), we have |f(x) −f(y)| ≤G∥x −y∥. Similarly, the function is (β, ϵ, z)-locally-smooth if for every x, y ∈Bd(z, ϵ) we have, |f(y) −f(x) −⟨∇f(y), x −y⟩| ≤β 2 ∥x −y∥2 . Next we define quasi-convex functions: Definition 2.2. (Quasi-Convexity) We say that a function f : Rd 7→R is quasi-convex if ∀x, y ∈ Rd, such that f(y) ≤f(x), it follows that ⟨∇f(x), y −x⟩≤0 . We further say that f is strictly-quasi-convex, if it is quasi-convex and its gradients vanish only at the global minima, i.e., ∀y : f(y) > minx∈Rd f(x) ⇒∥∇f(y)∥> 0. Informally, the above characterization states that the (opposite) gradient of a quasi-convex function directs us in a global descent direction. Following is an equivalent (more common) definition: Definition 2.3. (Quasi-Convexity) We say that a function f : Rd 7→R is quasi-convex if any α-sublevel-set of f is convex, i.e., ∀α ∈R the set Lα(f) = {x : f(x) ≤α} is convex. The equivalence between the above definitions can be found in [4]. During this paper we denote the sublevel-set of f at x by Sf(x) = {y : f(y) ≤f(x)} . (1) 3 Local-Quasi-Convexity Quasi-convexity does not fully capture the notion of unimodality in several dimension. As an example let x = (x1, x2) ∈[−10, 10]2, and consider the function g(x) = (1 + e−x1)−1 + (1 + e−x2)−1 . (2) It is natural to consider g as unimodal since it acquires no local minima but for the unique global minima at x∗= (−10, −10). However, g is not quasi-convex: consider the points x = (log 16, −log 4), y = (−log 4, log 16), which belong to the 1.2-sub-level set, their average does not belong to the same sub-level-set since g(x/2 + y/2) = 4/3. Quasi-convex functions always enable us to explore, meaning that the gradient always directs us in a global descent direction. Intuitively, from an optimization point of view, we only need such a direction whenever we do not exploit, i.e., whenever we are not approximately optimal. In what follows we define local-quasi-convexity, a property that enables us to either explore/exploit. This property captures a wider class of unimodal function (such as g above) rather than mere quasiconvexity. Later we justify this definition by showing that it captures Generalized Linear Models (GLM) regression, see [14, 7]. Definition 3.1. (Local-Quasi-Convexity) Let x, z ∈Rd, κ, ϵ > 0. We say that f : Rd 7→R is (ϵ, κ, z)-Strictly-Locally-Quasi-Convex (SLQC) in x, if at least one of the following applies: 1. f(x) −f(z) ≤ϵ . 3 2. ∥∇f(x)∥> 0, and for every y ∈B(z, ϵ/κ) it holds that ⟨∇f(x), y −x⟩≤0 . Note that if f is G-Lispschitz and strictly-quasi-convex function, then ∀x, z ∈Rd, ∀ϵ > 0, it holds that f is (ϵ, G, z)-SLQC in x. Recalling the function g that appears in Equation (2), then it can be shown that ∀ϵ ∈(0, 1], ∀x ∈[−10, 10]2 then this function is (ϵ, 1, x∗)-SLQC in x, where x∗= (−10, −10). 3.1 Generalized Linear Models (GLM) 3.1.1 The Idealized GLM In this setup we have a collection of m samples {(xi, yi)}m i=1 ∈Bd × [0, 1], and an activation function φ : R 7→R. We are guaranteed to have w∗∈Rd such that: yi = φ⟨w∗, xi⟩, ∀i ∈[m] (we denote φ⟨w, x⟩:= φ(⟨w, x⟩)). The performance of a predictor w ∈Rd, is measured by the average square error over all samples. c errm(w) = 1 m m X i=1 (yi −φ⟨w, xi⟩)2 . (3) In [7] it is shown that the Perceptron problem with γ-margin is a private case of GLM regression. The sigmoid function φ(z) = (1 + e−z)−1 is a popular activation function in the field of deep learning. The next lemma states that in the idealized GLM problem with sigmoid activation, then the error function is SLQC (but not quasi-convex). As we will see in Section 4 this implies that Algorithm 1 finds an ϵ-optimal minima of c errm(w) within poly(1/ϵ) iterations. Lemma 3.1. Consider the idealized GLM problem with the sigmoid activation, and assume that ∥w∗∥≤W. Then the error function appearing in Equation (3) is (ϵ, eW , w∗)-SLQC in w, ∀ϵ > 0, ∀w ∈Bd(0, W) (But it is not generally quasi-convex). 3.1.2 The Noisy GLM In the noisy GLM setup (see [14, 7]), we may draw i.i.d. samples {(xi, yi)}m i=1 ∈Bd × [0, 1], from an unknown distribution D. We assume that there exists a predictor w∗∈Rd such that E(x,y)∼D[y|x] = φ⟨w∗, x⟩, where φ is an activation function. Given w ∈Rd we define its expected error as follows: E(w) = E(x,y)∼D(y −φ⟨w, x⟩)2 , and it can be shown that w∗is a global minima of E. We are interested in schemes that obtain an ϵ-optimal minima to E, within poly(1/ϵ) samples and optimization steps. Given m samples from D, their empirical error c errm(w), is defined as in Equation (3). The following lemma states that in this setup, letting m = Ω(1/ϵ2), then c errm is SLQC with high probability. This property will enable us to apply Algorithm 2, to obtain an ϵ-optimal minima to E, within poly(1/ϵ) samples from D, and poly(1/ϵ) optimization steps. Lemma 3.2. Let δ, ϵ ∈(0, 1). Consider the noisy GLM problem with the sigmoid activation, and assume that ∥w∗∥≤W. Given a fixed point w ∈B(0, W), then w.p.≥1 −δ, after m ≥ 8e2W (W +1)2 ϵ2 log(1/δ) samples, the empirical error function appearing in Equation (3) is (ϵ, eW , w∗)-SLQC in w. Note that if we had required the SLQC to hold ∀w ∈B(0, W), then we would need the number of samples to depend on the dimension, d, which we would like to avoid. Instead, we require SLQC to hold for a fixed w. This satisfies the conditions of Algorithm 2, enabling us to find an ϵ-optimal solution with a sample complexity that is independent of the dimension. 4 NGD for Locally-Quasi-Convex Optimization Here we present the NGD algorithm, and prove the convergence rate of this algorithm for SLQC objectives. Our analysis is simple, enabling us to extend the convergence rate presented in [15] beyond quasi-convex functions. We then show that quasi-convex and locally-Lipschitz objective are SLQC, implying that NGD converges even if the gradients are unbounded outside a small region 4 Algorithm 1 Normalized Gradient Descent (NGD) Input: #Iterations T, x1 ∈Rd, learning rate η for t = 1 . . . T do Update: xt+1 = xt −ηˆgt where gt = ∇f(xt), ˆgt = gt ∥gt∥ end for Return: ¯xT = arg min{x1,...,xT } f(xt) around the minima. For quasi-convex and locally-smooth objectives, we show that NGD attains a faster convergence rate. NGD is presented in Algorithm 1. NGD is similar to GD, except we normalize the gradients. It is intuitively clear that to obtain robustness to plateaus (where the gradient can be arbitrarily small) and to exploding gradients (where the gradient can be arbitrarily large), one must ignore the size of the gradient. It is more surprising that the information in the direction of the gradient suffices to guarantee convergence. Following is the main theorem of this section: Theorem 4.1. Fix ϵ > 0, let f : Rd 7→R, and x∗∈arg minx∈Rd f(x). Given that f is (ϵ, κ, x∗)SLQC in every x ∈Rd. Then running the NGD algorithm with T ≥κ2∥x1 −x∗∥2/ϵ2, and η = ϵ/κ, we have that: f(¯xT ) −f(x∗) ≤ϵ. Theorem 4.1 states that (·, ·, x∗)-SLQC functions admit poly(1/ϵ) convergence rate using NGD. The intuition behind this lies in Definition 3.1, which asserts that at a point x either the (opposite) gradient points out a global optimization direction, or we are already ϵ-optimal. Note that the requirement of (ϵ, ·, ·)-SLQC in any x is not restrictive, as we have seen in Section 3, there are interesting examples of functions that admit this property ∀ϵ ∈[0, 1], and for any x. For simplicity we have presented NGD for unconstrained problems. Using projections we can easily extend the algorithm and and its analysis for constrained optimization over convex sets. This will enable to achieve convergence of O(1/ϵ2) for the objective presented in Equation (2), and the idealized GLM problem presented in Section 3.1.1. We are now ready to prove Theorem 4.1: Proof of Theorem 4.1. First note that if the gradient of f vanishes at xt, then by the SLQC assumption we must have that f(xt)−f(x∗) ≤ϵ. Assume next that we perform T iterations and the gradient of f at xt never vanishes in these iterations. Consider the update rule of NGD (Algorithm 1), then by standard algebra we get, ∥xt+1 −x∗∥2 = ∥xt −x∗∥2 −2η⟨ˆgt, xt −x∗⟩+ η2 . Assume that ∀t ∈[T] we have f(xt) −f(x∗) > ϵ. Take y = x∗+ (ϵ/κ) ˆgt, and observe that ∥y −x∗∥≤ϵ/κ. The (ϵ, κ, x∗)-SLQC assumption implies that ⟨ˆgt, y −xt⟩≤0, and therefore ⟨ˆgt, x∗+ (ϵ/κ) ˆgt −xt⟩≤0 ⇒⟨ˆgt, xt −x∗⟩≥ϵ/κ . Setting η = ϵ/κ, the above implies, ∥xt+1 −x∗∥2 ≤∥xt −x∗∥2 −2ηϵ/κ + η2 = ∥xt −x∗∥2 −ϵ2/κ2 . Thus, after T iterations for which f(xt) −f(x∗) > ϵ we get 0 ≤∥xT +1 −x∗∥2 ≤∥x1 −x∗∥2 −Tϵ2/κ2 , Therefore, we must have T ≤κ2∥x1 −x∗∥2/ϵ2 . 4.1 Locally-Lipschitz/Smooth Quasi-Convex Optimization It can be shown that strict-quasi-convexity and (G, ϵ/G, x∗)-local-Lipschitzness of f implies that f is (ϵ, G, x∗)-SLQC ∀x ∈Rd, ∀ϵ ≥0, and x∗∈arg minx∈Rd f(x). Therefore the following is a direct corollary of Theorem 4.1: 5 Algorithm 2 Stochastic Normalized Gradient Descent (SNGD) Input: #Iterations T, x1 ∈Rd, learning rate η, minibatch size b for t = 1 . . . T do Sample: {ψi}b i=1 ∼Db, and define, ft(x) = 1 b b X i=1 ψi(x) Update: xt+1 = xt −ηˆgt where gt = ∇ft(xt), ˆgt = gt ∥gt∥ end for Return: ¯xT = arg min{x1,...,xT } ft(xt) Corollary 4.1. Fix ϵ > 0, let f : Rd 7→R, and x∗∈arg minx∈Rd f(x). Given that f is strictly quasi-convex and (G, ϵ/G, x∗)-locally-Lipschitz. Then running the NGD algorithm with T ≥G2∥x1 −x∗∥2/ϵ2, and η = ϵ/G, we have that: f(¯xT ) −f(x∗) ≤ϵ. In case f is also locally-smooth, we state an even faster rate: Theorem 4.2. Fix ϵ > 0, let f : Rd 7→R, and x∗∈arg minx∈Rd f(x). Given that f is strictly quasi-convex and (β, p 2ϵ/β, x∗)-locally-smooth. Then running the NGD algorithm with T ≥ β∥x1 −x∗∥2/2ϵ, and η = p 2ϵ/β, we have that: f(¯xT ) −f(x∗) ≤ϵ. Remark 1. The above corollary (resp. theorem) implies that f could have arbitrarily large gradients and second derivatives outside B(x∗, ϵ/G) (resp. B(x∗, p 2ϵ/β)), yet NGD is still ensured to output an ϵ-optimal point within G2∥x1 −x∗∥2/ϵ2 (resp. β∥x1 −x∗∥2/2ϵ) iterations. We are not familiar with a similar guarantee for GD even in the convex case. 5 SNGD for Stochastic SLQC Optimization Here we describe the setting of stochastic SLQC optimization. Then we describe our SNGD algorithm which is ensured to yield an ϵ-optimal solution within poly(1/ϵ) queries. We also show that the (noisy) GLM problem, described in Section 3.1.2 is an instance of stochastic SLQC optimization, allowing us to provably solve this problem within poly(1/ϵ) samples and optimization steps using SNGD. The stochastic SLQC optimization Setup: Consider the problem of minimizing a function f : Rd 7→R, and assume there exists a distribution over functions D, such that: f(x) := Eψ∼D[ψ(x)] . We assume that we may access f by randomly sampling minibatches of size b, and querying the gradients of these minibatches. Thus, upon querying a point xt ∈Rd, a random minibatch {ψi}b i=1 ∼Db is sampled, and we receive ∇ft(xt), where ft(x) = 1 b Pb i=1 ψi(x). We make the following assumption regarding the minibatch averages: Assumption 5.1. Let T, ϵ, δ > 0, x∗∈arg minx∈Rd f(x). There exists κ > 0, and a function b0 : R3 7→R, that for b ≥b0(ϵ, δ, T) then w.p.≥1−δ and ∀t ∈[T], the minibatch average ft(x) = 1 b Pb i=1 ψi(x) is (ϵ, κ, x∗)-SLQC in xt. Moreover, we assume |ft(x)| ≤M, ∀t ∈[T], x ∈Rd . Note that we assume that b0 = poly(1/ϵ, log(T/δ)). Justification of Assumption 5.1 Noisy GLM regression (see Section 3.1.2), is an interesting instance of stochastic optimization problem where Assumption 5.1 holds. Indeed according to Lemma 3.2, given ϵ, δ, T > 0, then for b ≥Ω(log(T/δ)/ϵ2) samples, the average minibatch function is (ϵ, κ, x∗)-SLQC in xt, ∀t ∈[T], w.p.≥1 −δ. 6 Local-quasi-convexity of minibatch averages is a plausible assumption when we optimize an expected sum of quasi-convex functions that share common global minima (or when the different global minima are close by). As seen from the Examples presented in Equation (2), and in Sections 3.1.1, 3.1.2, this sum is generally not quasi-convex, but is more often locally-quasi-convex. Note that in the general case when the objective is a sum of quasi-convex functions, the number of local minima of such objective may grow exponentially with the dimension d, see [1]. This might imply that a general setup where each ψ ∼D is quasi-convex may be generally hard. 5.1 Main Results SNGD is presented in Algorithm 2. SNGD is similar to SGD, except we normalize the gradients. The normalization is crucial in order to take advantage of the SLQC assumption, and in order to overcome the hurdles of plateaus and cliffs. Following is our main theorem: Theorem 5.1. Fix δ, ϵ, G, M, κ > 0. Suppose we run SNGD with T ≥κ2∥x1 −x∗∥2/ϵ2 iterations, η = ϵ/κ, and b ≥max{ M 2 log(4T/δ) 2ϵ2 , b0(ϵ, δ, T)} . Assume that for b ≥b0(ϵ, δ, T) then w.p.≥1−δ and ∀t ∈[T], the function ft defined in the algorithm is M-bounded, and is also (ϵ, κ, x∗)-SLQC in xt. Then, with probability of at least 1 −2δ, we have that f(¯xT ) −f(x∗) ≤3ϵ. We prove of Theorem 5.1 at the end of this section. Remark 2. Since strict-quasi-convexity and (G, ϵ/G, x∗)-local-Lipschitzness are equivalent to SLQC, the theorem implies that f could have arbitrarily large gradients outside B(x∗, ϵ/G), yet SNGD is still ensured to output an ϵ-optimal point within G2∥x1 −x∗∥2/ϵ2 iterations. We are not familiar with a similar guarantee for SGD even in the convex case. Remark 3. Theorem 5.1 requires the minibatch size to be Ω(1/ϵ2). In the context of learning, the number of functions, n, corresponds to the number of training examples. By standard sample complexity bounds, n should also be order of 1/ϵ2. Therefore, one may wonder, if the size of the minibatch should be order of n. This is not true, since the required training set size is 1/ϵ2 times the VC dimension of the hypothesis class. In many practical cases, the VC dimension is more significant than 1/ϵ2, and therefore n will be much larger than the required minibatch size. The reason our analysis requires a minibatch of size 1/ϵ2, without the VC dimension factor, is because we are just “validating” and not “learning”. In SGD and for the case of convex functions, even a minibatch of size 1 suffices for guaranteed convergence. In contrast, for SNGD we require a minibatch of size 1/ϵ2. The theorem below shows that the requirement for a large minibatch is not an artifact of our analysis but is truly required. Theorem 5.2. Let ϵ ∈(0, 0.1]; There exists a distribution over convex functions, such that running SNGD with minibatch size of b = 0.2 ϵ , with a high probability it never reaches an ϵ-optimal solution The gap between the upper bound of 1/ϵ2 and the lower bound of 1/ϵ remains as an open question. We now provide a sketch for the proof of Theorem 5.1: Proof of Theorem 5.1. Theorem 5.1 is a consequence of the following two lemmas. In the first we show that whenever all ft’s are SLQC, there exists some t such that ft(xt) −ft(x∗) ≤ϵ. In the second lemma, we show that for a large enough minibatch size b, then for any t ∈[T] we have f(xt) ≤ft(xt) + ϵ, and f(x∗) ≥ft(x∗) −ϵ. Combining these two lemmas we conclude that f(¯xT ) −f(x∗) ≤3ϵ. Lemma 5.1. Let ϵ, δ > 0. Suppose we run SNGD for T ≥κ2∥x1 −x∗∥2/ϵ2 iterations, b ≥ b0(ϵ, δ, T), and η = ϵ/κ. Assume that w.p.≥1 −δ all ft’s are (ϵ, κ, x∗)-SLQC in xt, whenever b ≥b0(ϵ, δ, T). Then w.p.≥1 −δ we must have some t ∈[T] for which ft(xt) −ft(x∗) ≤ϵ. Lemma 5.1 is proved similarly to Theorem 4.1. We omit the proof due to space constraints. The second Lemma relates ft(xt) −ft(x∗) ≤ϵ to a bound on f(xt) −f(x∗). Lemma 5.2. Suppose b ≥M 2 log(4T/δ) 2 ϵ−2 then w.p.≥1 −δ and for every t ∈[T]: f(xt) ≤ft(xt) + ϵ , and also, f(x∗) ≥ft(x∗) −ϵ . 7 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 0.05 0.1 0.15 0.2 0.25 0.3 Iteration Error MSGD Nesterov SNGD (a) 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 Iteration Objective MSGD Nesterov SNGD (b) 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 0.055 Iteration Objective b =1 b =10 b =100 b =500 (c) Figure 2: Comparison between optimizations schemes. Left: test error. Middle: objective value (on training set). On the Right we compare the objective of SNGD for different minibatch sizes. Lemma 5.2 is a direct consequence of Hoeffding’s bound. Using the definition of ¯xT (Alg. 2) , together with Lemma 5.2 gives: f(¯xT ) −f(x∗) ≤ft(xt) −ft(x∗) + 2ϵ, ∀t ∈[T] Combining the latter with Lemma 5.1, establishes Theorem 5.1. 6 Experiments A better understanding of how to train deep neural networks is one of the greatest challenges in current machine learning and optimization. Since learning NN (Neural Network) architectures essentially requires to solve a hard non-convex program, we have decided to focus our empirical study on this type of tasks. As a test case, we train a Neural Network with a single hidden layer of 100 units over the MNIST data set. We use a ReLU activation function, and minimize the square loss. We employ a regularization over weights with a parameter of λ = 5 · 10−4. At first we were interested in comparing the performance of SNGD to MSGD (Minibatch Stochastic Gradient Descent), and to a stochastic variant of Nesterov’s accelerated gradient method [19], which is considered to be state-of-the-art. For MSGD and Nesterov’s method we used a step size rule of the form ηt = η0(1 + γt)−3/4, with η0 = 0.01 and γ = 10−4. For SNGD we used the constant step size of 0.1. In Nesterov’s method we used a momentum of 0.95. The comparison appears in Figures 2(a),2(b). As expected, MSGD converges relatively slowly. Conversely, the performance of SNGD is comparable with Nesterov’s method. All methods employed a minibatch size of 100. Later, we were interested in examining the effect of minibatch size on the performance of SNGD. We employed SNGD with different minibatch sizes. As seen in Figure 2(c), the performance improves significantly with the increase of minibatch size. 7 Discussion We have presented the first provable gradient-based algorithm for stochastic quasi-convex optimization. This is a first attempt at generalizing the well-developed machinery of stochastic convex optimization to the challenging non-convex problems facing machine learning, and better characterizing the border between NP-hard non-convex optimization and tractable cases such as the ones studied herein. Amongst the numerous challenging questions that remain, we note that there is a gap between the upper and lower bound of the minibatch size sufficient for SNGD to provably converge. Acknowledgments The research leading to these results has received funding from the European Union’s Seventh Framework Programme (FP7/2007-2013) under grant agreement n◦336078 – ERC-SUBLRN. Shai S-Shwartz is supported by ISF n◦1673/14 and by Intel’s ICRI-CI. 8 References [1] Peter Auer, Mark Herbster, and Manfred K Warmuth. Exponentially many local minima for single neurons. Advances in neural information processing systems, pages 316–322, 1996. [2] Yoshua Bengio. Learning deep architectures for AI. Foundations and trends in Machine Learning, 2(1):1–127, 2009. [3] Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [4] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [5] Kenji Doya. Bifurcations of recurrent neural networks in gradient descent learning. IEEE Transactions on neural networks, 1:75–80, 1993. [6] Jean-Louis Goffin, Zhi-Quan Luo, and Yinyu Ye. Complexity analysis of an interior cutting plane method for convex feasibility problems. SIAM Journal on Optimization, 6(3):638–652, 1996. [7] Adam Tauman Kalai and Ravi Sastry. The isotron algorithm: High-dimensional isotonic regression. In COLT, 2009. [8] Qifa Ke and Takeo Kanade. Quasiconvex optimization for robust geometric reconstruction. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 29(10):1834–1847, 2007. [9] Rustem F Khabibullin. A method to find a point of a convex set. Issled. Prik. Mat., 4:15–22, 1977. [10] Krzysztof C Kiwiel. Convergence and efficiency of subgradient methods for quasiconvex minimization. Mathematical programming, 90(1):1–25, 2001. [11] Igor V Konnov. On convergence properties of a subgradient method. Optimization Methods and Software, 18(1):53–62, 2003. [12] Jean-Jacques Laffont and David Martimort. The theory of incentives: the principal-agent model. Princeton university press, 2009. [13] James Martens and Ilya Sutskever. Learning recurrent neural networks with hessian-free optimization. In Proceedings of the 28th International Conference on Machine Learning (ICML11), pages 1033–1040, 2011. [14] P. McCullagh and JA Nelder. Generalised linear models. London: Chapman and Hall/CRC, 1989. [15] Yu E Nesterov. Minimization methods for nonsmooth convex and quasiconvex functions. Matekon, 29:519–531, 1984. [16] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In Proceedings of The 30th International Conference on Machine Learning, pages 1310–1318, 2013. [17] Boris T Polyak. A general method of solving extremum problems. Dokl. Akademii Nauk SSSR, 174(1):33, 1967. [18] Jarosław Sikorski. Quasi subgradient algorithms for calculating surrogate constraints. In Analysis and algorithms of optimization problems, pages 203–236. Springer, 1986. [19] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 1139–1147, 2013. [20] Hal R Varian. Price discrimination and social welfare. The American Economic Review, pages 870–875, 1985. [21] Elmar Wolfstetter. Topics in microeconomics: Industrial organization, auctions, and incentives. Cambridge University Press, 1999. [22] Yaroslav Ivanovich Zabotin, AI Korablev, and Rustem F Khabibullin. The minimization of quasicomplex functionals. Izv. Vyssh. Uch. Zaved. Mat., (10):27–33, 1972. 9 | 2015 | 230 |
5,737 | Learning From Small Samples: An Analysis of Simple Decision Heuristics ¨Ozg¨ur S¸ims¸ek and Marcus Buckmann Center for Adaptive Behavior and Cognition Max Planck Institute for Human Development Lentzeallee 94, 14195 Berlin, Germany {ozgur, buckmann}@mpib-berlin.mpg.de Abstract Simple decision heuristics are models of human and animal behavior that use few pieces of information—perhaps only a single piece of information—and integrate the pieces in simple ways, for example, by considering them sequentially, one at a time, or by giving them equal weight. We focus on three families of heuristics: single-cue decision making, lexicographic decision making, and tallying. It is unknown how quickly these heuristics can be learned from experience. We show, analytically and empirically, that substantial progress in learning can be made with just a few training samples. When training samples are very few, tallying performs substantially better than the alternative methods tested. Our empirical analysis is the most extensive to date, employing 63 natural data sets on diverse subjects. 1 Introduction You may remember that, on January 15, 2009, in New York City, a commercial passenger plane struck a flock of geese within two minutes of taking off from LaGuardia Airport. The plane immediately and completely lost thrust from both engines, leaving the crew facing a number of critical decisions, one of which was whether they could safely return to LaGuardia. The answer depended on many factors, including the weight, velocity, and altitude of the aircraft, as well as wind speed and direction. None of these factors, however, are directly involved in how pilots make such decisions. As copilot Jeffrey Skiles discussed in a later interview [1], pilots instead use a single piece of visual information: whether the desired destination is staying stationary in the windshield. If the destination is rising or descending, the plane will undershoot or overshoot the destination, respectively. Using this visual cue, the flight crew concluded that LaGuardia was out of reach, deciding instead to land on the Hudson River. Skiles reported that subsequent simulation experiments consistently showed that the plane would indeed have crashed before reaching the airport. Simple decision heuristics, such as the one employed by the flight crew, can provide effective solutions to complex problems [2, 3]. Some of these heuristics use a single piece of information; others use multiple pieces of information but combine them in simple ways, for example, by considering them sequentially, one at a time, or by giving them equal weight. Our work is concerned with two questions: How effective are simple decision heuristics? And how quickly can they be learned from experience? We focus on problems of comparison, where the objective is to decide which of a given set of objects has the highest value on an unobserved criterion. These problems are of fundamental importance in intelligent behavior. Humans and animals spend much of their time choosing an object to act on, with respect to some criterion whose value is unobserved at the time. Choosing a mate, a prey to chase, an investment strategy for a retirement fund, or a publisher for a book are just a few examples. Earlier studies on this problem have shown 1 that simple heuristics are surprisingly accurate in natural environments [4, 5, 6, 7, 8, 9], especially when learning from small samples [10, 11]. We present analytical and empirical results on three families of heuristics: lexicographic decision making, tallying, and single-cue decision making. Our empirical analysis is the most extensive to date, employing 63 natural environments on diverse subjects. Our main contributions are as follows: (1) We present analytical results on the rate of learning heuristics from experience. (2) We show that very few learning instances can yield effective heuristics. (3) We empirically investigate single-cue decision making and find that its performance is remarkable. (4) We find that the most robust decision heuristic for small sample sizes is tallying. Collectively, our results have important implications for developing more successful heuristics and for studying how well simple heuristics capture human and animal decision making. 2 Background The comparison problem asks which of a given set of objects has the highest value on an unobserved criterion, given a number of attributes of the objects. We focus on pairwise comparisons, where exactly two objects are being compared. We consider a decision to be accurate if it selects the object with the higher criterion value (or either object if they are equal in criterion value). In the heuristics literature, attributes are called cues; we will follow this custom when discussing heuristics. The heuristics we consider decide by comparing the objects on one or more cues, asking which object has the higher cue value. Importantly, they do not require the difference in cue value to be quantified. For example, if we use height of a person as a cue, we need to be able to determine which of two people is taller but we do not need to know the height of either person or the magnitude of the difference. Each cue is associated with a direction of inference, also known as cue direction, which can be positive or negative, favoring the object with the higher or lower cue value, respectively. Cue directions (and other components of heuristics) can be learned in a number of ways, including social learning. In our analysis, we learn them from training examples. Single-cue decision making is perhaps the simplest decision method one can imagine. It compares the objects on a single cue, breaking ties randomly. We learn the identity of the cue and its direction from a training sample. Among the 2k possible models, where k is the number of cues, we choose the ⟨cue, direction⟩combination that has the highest accuracy in the training sample, breaking ties randomly. Lexicographic heuristics consider the cues one at a time, in a specified order, until they find a cue that discriminates between the objects, that is, one whose value differs on the two objects. The heuristic then decides based on that cue alone. An example is take-the-best [12], which orders cues with respect to decreasing validity on the training sample, where validity is the accuracy of the cue among pairwise comparisons on which the cue discriminates between the objects. Tallying is a voting model. It determines how each cue votes on its own (selecting one or the other object or abstaining from voting) and selects the object with the highest number of votes, breaking ties randomly. We set cue directions to the direction with highest validity in the training set. Paired comparison can also be formulated as a classification problem. Let yA denote the criterion value of object A, xA the vector of attribute values of object A, and ∆yAB = yA −yB the difference in criterion values of objects A and B. We can define the class f of a pair of objects as a function of the difference in their criterion values: f(∆yAB) = ( 1 if ∆yAB > 0 −1 if ∆yAB < 0 0 if ∆yAB = 0 A class value of 1 denotes that object A has the higher criterion value, −1 that object B has the higher criterion value, and 0 that the objects are equal in criterion value. The comparison problem is intrinsically symmetrical: comparing A to B should give us the same decision as comparing B to A. That is, f(∆yAB) should equal −f(∆yBA). Because the latter equals −f(−∆yAB), we have the following symmetry constraint: f(z) = −f(−z), for all z. We can expect better classification accuracy if we impose this symmetry constraint on our classifier. 2 3 Building blocks of decision heuristics We first examine two building blocks of learning heuristics from experience: assigning cue direction and determining which of two cues has the higher predictive accuracy. The former is important for all three families of heuristics whereas the latter is important for lexicographic heuristics when determining which cue should be placed first. Both components are building blocks of heuristics in a broader sense—their use is not limited to the three families of heuristics considered here. Let A and B be the objects being compared, xA and xB denote their cue values, yA and yB denote their criterion values, and sgn denote the mathematical sign function: sgn(x) is 1 if x > 0, 0 if x = 0, and −1 if x < 0. A single training instance is the tuple ⟨sgn(xA −xB), sgn(yA −yB)⟩, corresponding to a single pairwise comparison, indicating whether the cue and the criterion change from one object to the other, along with the direction of change. For example, if xA = 1, yA = 10, xB = 2, yB = 5, the training instance is ⟨−1, +1⟩. Learning cue direction. We assume, without loss of generality, that cue direction in the population is positive (we ignore the case where the cue direction in the population is neutral). Let p denote the success rate of the cue in the population, where success is the event that the cue decides correctly. We examine two probabilities, e1 and e2. The former is the probability of correctly inferring the cue direction from a set of training instances. The latter is the probability of deciding correctly on a new (unseen) instance using the direction inferred from the training instances. We define an informative instance to be one in which the objects differ both in their cue values and in their criterion values, a positive instance to be one in which the cue and the criterion change in the same direction (⟨1, 1⟩or ⟨−1, −1⟩), and a negative instance to be one in which the cue and the criterion change in the opposite direction (⟨1, −1⟩or ⟨−1, 1⟩). Let n be the number of training instances, n+ the number of positive training instances, and n− the number of negative training instances. Our estimate of cue direction is positive if n+ > n−, negative if n+ < n−, and a random choice between positive and negative if n+ = n−. Given a set of independent, informative training instances, n+ follows the binomial distribution with n trials and success probability p, allowing us to write e1 as follows: e1 = P(n+ > n−) + 1 2P(n+ = n−) = n X k=⌊n/2⌋+1 n k pk(1 −p)n−k + I(n is even)1 2 n n/2 pn/2(1 −p)n/2, where I is the indicator function. After one training instance, e1 equals p. After one more instance, e1 remains the same. This is a general property: After an odd number of training instances, an additional instance does not increase the probability of inferring the direction correctly. On a new (test) instance, the cue decides correctly with probability p if cue direction is inferred correctly and with probability 1 −p otherwise. Consequently, e2 = pe1 + (1 −p)(1 −e1). Simple algebra yields the following expected learning rates: After 2k + 1 training instances, with two additional instances, the increase in the probability of inferring cue direction correctly is (2p − 1)(p(1 −p))k+1 and the increase in the probability of deciding correctly is (2p −1)2(p(1 −p))k+1 . Figure 1 shows e1 and e2 as a function of training-set size n and success rate p. The more predictive the cue is, the smaller the sample needs to be for a desired level of accuracy in both e1 and e2. This is of course a desirable property: The more useful the cue is, the faster we learn how to use it correctly. The figure also shows that there are highly diminishing returns, from one odd training-set size to the next, as the size of the training set increases. In fact, just a few instances make great progress toward the maximum possible. The third plot in the figure reveals this property more clearly. It shows e2 divided by its maximum possible value (p) showing how quickly we reach the maximum possible accuracy for cues of various predictive ability. The minimum value depicted in this figure is 0.83, observed at n = 1. This means that even after a single training instance, our expected accuracy is at least 83% of the maximum accuracy we can reach. And this value rises quickly with each additional pair of training instances. 3 5 10 15 20 25 30 0.5 0.6 0.7 0.8 0.9 1.0 n 0.5 0.6 0.7 0.8 0.9 1.0 p (e1) Probability of correctly inferring cue direction 5 10 15 20 25 30 0.5 0.6 0.7 0.8 0.9 1.0 n 0.5 0.6 0.7 0.8 0.9 1.0 (e2) Probability of correctly deciding p 5 10 15 20 25 30 0.5 0.6 0.7 0.8 0.9 1.0 n 0.85 0.90 0.95 1.00 e2 p p Figure 1: Learning cue direction. Learning to order two cues. Assume we have two cues with success rates p and q in the population, with p > q. We expand the definition of informative instance to require that the objects differ on the second cue as well. We examine two probabilities, e3 and e4. The former is the probability of ordering the two cues correctly, which means placing the cue with higher success rate above the other one. The latter is the probability of deciding correctly with the inferred order. We chose to examine learning to order cues independently of learning cue directions. One reason is that people do not necessarily learn the cue directions from experience. In many cases, they can guess the cue direction correctly through causal reasoning, social learning, past experience in similar problems, or other means. In the analysis below, we assume that the directions are assigned correctly. Let s1 and s2 be the success rates of the two cues in the training set. If instances are informative and independent, s1 and s2 follow the binomial distribution with parameters (n, p) and (n, q), allowing us to write e3 as follows: e3 = P(s1 > s2) + 1 2P(s1 = s2) = X 0≤j<i≤n P(s1 = i)P(s2 = j) + 1 2 n X i=0 P(s1 = i)P(s2 = i) After one training instance, e3 is 0.5+0.5(p−q), which is a linear function of the difference between the two success rates. If we order cues correctly, a decision on a test instance is correct with probability p, otherwise with probability q. Thus, e4 = pe3 + q(1 −e3). Figure 2 shows e3 and e4 as a function of p and q after three training instances. In general, larger values of p, as well as larger differences between p and q, require smaller training sets for a desired level of accuracy. In other words, learning progresses faster where it is more useful. The third plot in the figure shows e4 relative to the maximum value it can take, the maximum of p and q. The minimum value depicted in this figure is 90.9%. If we examine the same figure after only a single training instance, we see that this minimum value is 86.6% (figure not shown). 0.5 0.6 0.7 0.8 0.9 1.0 0.5 0.6 0.7 0.8 0.9 1.0 0.5 0.6 0.7 0.8 0.9 1.0 After 3 training instances: Probability of correctly ordering (e3) q p 0.5 0.6 0.7 0.8 0.9 1.0 0.5 0.6 0.7 0.8 0.9 1.0 0.5 0.6 0.7 0.8 0.9 1.0 After 3 training instances: Probability of correctly deciding (e4) q p 0.5 0.6 0.7 0.8 0.9 1.0 0.5 0.6 0.7 0.8 0.9 1.0 0.92 0.94 0.96 0.98 1.00 After 3 training instances: e4 / max(p,q) q p Figure 2: Learning cue order. 4 4 Empirical analysis We next present an empirical analysis of 63 natural data sets, most from two earlier studies [4, 13]. Our primary objective is to examine the empirical learning rates of heuristics. From the analytical results of the preceding section, we expect learning to progress rapidly. A secondary objective is to examine the effectiveness of different ways cues can be ordered in a lexicographic heuristic. The data sets were gathered from a wide variety of sources, including online data repositories, textbooks, packages for R statistical software, statistics and data mining competitions, research publications, and individual scientists collecting field data. The subjects were diverse, including biology, business, computer science, ecology, economics, education, engineering, environmental science, medicine, political science, psychology, sociology, sports, and transportation. The data sets varied in size, ranging from 13 to 601 objects. Many of the smaller data sets contained the entirety of the population of objects, for example, all 29 islands in the Gal´apagos archipelago. The data sets are described in detail in the supplementary material. We present results on lexicographic heuristics, tallying, single-cue decision making, logistic regression, and decision trees trained by CART [14]. We used the CART implementation in rpart [15] with the default splitting criterion Gini, cp=0, minsplit=2, minbucket=1, and 10-fold cross-validated cost-complexity pruning. There is no explicit way to implement the symmetry constraint for decision trees; we simply augmented the training set with its mirror image with respect to the direction of comparison. For logistic regression, we used the glm function of R, setting the intercept to zero to implement the symmetry constraint. To the glm function, we input the cues in the order of decreasing correlation with the criterion so that the weakest cues were dropped first when the number of training instances was smaller than the number of cues. Ordering cues in lexicographic heuristics. We first examine the different ways lexicographic heuristics can order the cues. With k cues, there are k! possible cue orders. Combined with the possibility of using each cue with a positive or negative direction, there are 2kk! possible lexicographic models, a number that increases very rapidly with k. How should we choose one if our top criterion is accuracy but we also want to pay attention to computational cost and memory requirements? We consider three methods. The first is a greedy search, where we start by deciding on the first cue to be used (along with its direction), then the second, and so on, until we have a fully specified lexicographic model. When deciding on the first cue, we select the one that has the highest validity in the training examples. When deciding on the mth cue, m ≥2, we select the cue that has the highest validity in the examples left over after using the first m −1 cues, that is, those examples where the first m −1 cues did not discriminate between the two objects. The second method is to order cues with respect to their validity in the training examples, as take-the-best does. Evaluating cues independently of each other substantially reduces computational and memory requirements but perhaps at the expense of accuracy. The third method is to use the lexicographic model—among the 2kk! possibilities—that gives the highest accuracy in the training examples. Identifying this rule is NP-complete [16, 17], and it is unlikely to generalize well, but it will be informative to examine it. The three methods have been compared earlier [18] on a data set consisting of German cities [12], where the fitting accuracy of the best, greedy, validity, and random ordering was 0.758, 0.756, 0.742, and 0.700, respectively. Figure 3 (top panel) shows the fitting accuracy of each method in each of the 63 data sets when all possible pairwise comparisons were conducted among all objects. Because of the long simulation time required, we show an approximation of the best ordering in data sets with seven or more cues. In these data sets, we started with the two lexicographic rules generated by the greedy and the validity ordering, kept intact the cues that were placed seventh or later in the sequence, and tested all possible permutations of their first six cues, trying out both possible cue directions. The figure also shows the mean accuracy of random ordering, where cues were used in the direction of higher validity. In all data sets, greedy ordering was identical or very close in accuracy to the best ordering. In addition, validity ordering was very close to greedy ordering except in a handful of data sets. One explanation is that a continuous cue that is placed first in a lexicographic model makes all (or almost all) decisions and therefore the order of the remaining cues does not matter. We therefore also examine the binary version of each data set where numerical cues were dichotomizing around the median (Figure 3 bottom panel). There was little difference in the relative positions of greedy and optimal ordering except in one data set. There was more of a drop in the relative accuracy of 5 0.5 0.6 0.7 0.8 0.9 1.0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 11 5 4 3 5 11 3 21 7 5 8 6 3 4 4 7 3 5 6 10 15 11 5 19 3 4 4 13 8 6 3 10 6 11 9 11 3 8 7 3 15 12 5 4 6 4 5 6 15 6 6 5 4 8 8 4 7 17 6 5 8 6 12 G G Best Approximate best Greedy ordering Validity ordering Random ordering Number of cues Data sets Fitting accuracy 0.5 0.6 0.7 0.8 0.9 1.0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 11 5 4 3 5 11 3 21 7 5 8 6 3 4 4 7 3 5 6 10 15 11 5 19 3 4 4 13 8 6 3 10 6 11 9 11 3 8 7 3 15 12 5 4 6 4 5 6 15 6 6 5 4 8 8 4 7 17 6 5 8 6 12 Number of cues Dichotomized data sets Fitting accuracy Figure 3: Fitting accuracy of lexicographic models, with and without dichotomizing the cues. the validity ordering, but this method still achieved accuracy close to that of the best ordering in the majority of the data sets. We next examine predictive accuracy. Figure 4 shows accuracies when the models were trained on 50% of the objects and tested on the remaining 50%, conducting all possible pairwise comparisons within each group. Mean accuracy across data sets was 0.747 for logistic regression, 0.746 for CART, 0.743 for greedy lexicographic and take-the-best, 0.734 for single-cue, and 0.725 for tallying. Figure 5 shows learning curves, where we grew the training set one pairwise comparison at a time. Two individual objects provided a single instance for training or testing and were never used again, neither in training nor in testing. Consequently, the training instances were independent of each other but they were not always informative (as defined in Section 3). The figure shows the mean learning curve across all data sets as well as individual learning curves on 16 data sets. We present the graphs without error bars for legibility; the highest standard error of the data points displayed is 0.0014 in Figure 4 and 0.0026 in Figure 5. A few observations are noteworthy: (1) Heuristics were indeed learned rapidly. (2) In the early part of the learning curve, tallying generally had the highest accuracy. (3) The performance of single-cue was remarkable. When trained on 50% of the objects, its mean performance was better than tallying, 0.9 percentage points behind take-the-best, and 1.3 percentage points behind logistic regression. (4) Take-the-best performed better than or as well as greedy lexicographic in most data sets. A detailed comparison of the two methods is provided below. Validity versus greedy ordering in lexicographic decision making. The learning curves on individual data sets took one of four forms: (1) There was no difference in any part of the learning curve. This is the case when a continuous cue is placed first: This cue almost always discriminates between the objects, and cues further down in the sequence are seldom (if ever) used. Because greedy and validity ordering always agree on the first cue, the learning curves are identical or nearly so. Twenty-two data sets were in this first category. (2) Validity ordering was better than greedy ordering in some parts of the learning curve and never worse. This category included 35 data sets. (3) Learning curves crossed: Validity ordering generally started with higher accuracy than greedy ordering; the difference diminished with increasing training-set size, and eventually greedy ordering exceeded validity ordering in accuracy (2 data sets). (4) Greedy ordering was better than validity or6 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Accuracy Data sets * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 11 4 5 7 3 6 3 5 4 11 3 11 6 8 5 5 4 21 6 4 15 13 7 10 19 3 3 4 3 5 6 6 8 3 15 11 7 10 6 3 8 9 15 4 5 4 4 12 5 5 11 6 4 6 5 17 6 8 8 7 8 6 12 Number of cues Take-the-best Greedy lexicographic Single-cue Logistic regression CART * Tallying Figure 4: Predictive accuracy when models are trained with 50% of the objects in each data set and tested on the remaining 50%. dering in some parts of the learning curve and never worse (4 data sets). To draw these conclusions, we considered a difference to be present if the error bars (± 2 SE) did not overlap. 5 Discussion We isolated two building blocks of decision heuristics and showed analytically that they require very few training instances to learn under conditions that matter the most: when they add value to the ultimate predictive ability of the heuristic. Our empirical analysis confirmed that heuristics typically make substantial progress early in learning. Among the algorithms we considered, the most robust method for very small training sets is tallying. Earlier work [11] concluded that take-the-best (with undichotomized cues) is the most robust model for training sets with 3 to 10 objects but tallying (with undichotomized cues) was absent from this earlier study. In addition, we found that the performance of single-cue decision making is truly remarkable. This heuristic has been analyzed [19] by assuming that the cues and the criterion follow the normal distribution; we are not aware of an earlier analysis of its empirical performance on natural data sets. Our analysis of learning curves differs from earlier studies. Most earlier studies [20, 10, 21, 11, 22] examined performance as a function of number of objects in the training set, where training instances are all possible pairwise comparisons among those objects. Others increased the training set one pairwise comparison at a time but did not keep the pairwise comparisons independent of each other [23]. In contrast, we increased the training set one pairwise comparison at a time and kept all pairwise comparisons independent of each other. This makes it possible to examine the incremental value of each training instance. There is criticism of decision heuristics because of their computational requirements. For instance, it has been argued that take-the-best can be described as a simple algorithm but its successful execution relies on a large amount of precomputation [24] and that the computation of cue validity in the German city task “would require 30,627 pairwise comparisons just to establish the cue validity hierarchy for predicting city size” [25]. Our results clearly show that the actual computational needs of heuristics can be very low if independent pairwise comparisons are used for training. A similar result—that just a few samples may suffice—exists within the context of Bayesian inference [26]. Acknowledgments Thanks to Gerd Gigerenzer, Konstantinos Katsikopoulos, Malte Lichtenberg, Laura Martignon, Perke Jacobs, and the ABC Research Group for their comments on earlier drafts of this article. This work was supported by Grant SI 1732/1-1 to ¨Ozg¨ur S¸ims¸ek from the Deutsche Forschungsgemeinschaft (DFG) as part of the priority program “New Frameworks of Rationality” (SPP 1516). 7 Training set size Mean accuracy * * * ******* * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 10 20 30 40 50 55 60 65 70 75 80 85 90 95 100 63 57 34 24 21 18 18 18 17 16 15 14 14 13 11 11 0.55 0.60 0.65 0.70 0.75 0.80 Number of data sets Take-the-best Greedy lexicographic Single-cue Logistic regression CART * Tallying 0.6 0.7 0.8 0.9 1.0 0 40 80 120 Diamond *************************** *********** * Training set size Accuracy 0.6 0.7 0.8 0.9 1.0 0 50 100 150 Mileage * * ************************************ * * * 0.6 0.7 0.8 0.9 1.0 0 50 100 150 Fish * ** ** ********************************* * * * 0.6 0.7 0.8 0.9 1.0 0 5 10 15 20 Salary * * * * * * * * * * * * * * * * 0.5 0.6 0.7 0.8 0.9 0 5 10 20 30 Land * ** ******* * * * * * * * * * * 0.5 0.6 0.7 0.8 0.9 0 20 40 60 80 CPU * ************************** * * * * * * * * * 0.5 0.6 0.7 0.8 0.9 0 10 30 50 Obesity *************************** * * * 0.5 0.6 0.7 0.8 0.9 0 20 40 60 80 Hitter * * ************************* * * * * * * * * * * * 0.5 0.6 0.7 0.8 0.9 0 20 40 60 Pitcher * * ************************* * * * * * * 0.5 0.6 0.7 0.8 0.9 0 10 20 30 40 Car * ********* * * * * * * * * * * * * * * * 0.5 0.6 0.7 0.8 0.9 0 20 40 60 80 Bodyfat * ************************** * * * * * * * * * * * 0.50 0.60 0.70 0.80 0 5 10 20 30 Lake * ** ******* * * * * * * * * * * 0.50 0.60 0.70 0.80 0 10 20 30 40 Infant * * ******** * * * * * * * * * * * * * * * * * 0.50 0.60 0.70 0.80 0 20 40 60 Contraception * ** ************************ * * * * 0.50 0.60 0.70 0.80 0 5 15 25 35 City * * ******** * * * * * * * * * * * * 0.50 0.60 0.70 0.80 0 20 40 60 80 Athlete * ** ************************ * * * * * * * * * Take-the-best Greedy lexi. Single-cue Logistic reg. CART * Tallying Training set size Accuracy Figure 5: Learning curves. 8 References [1] C. Rose. Charlie Rose. Television program aired on February 10, 2009. [2] G. Gigerenzer, P. M. Todd, and the ABC Research Group. Simple heuristics that make us smart. Oxford University Press, New York, 1999. [3] G. Gigerenzer, R. Hertwig, and T. Pachur, editors. Heuristics: The foundations of adaptive behavior. Oxford University Press, New York, 2011. [4] J. Czerlinski, G. Gigerenzer, and D. G. Goldstein. How good are simple heuristics?, pages 97–118. In [2], 1999. [5] L. Martignon and K. B. Laskey. Bayesian benchmarks for fast and frugal heuristics, pages 169–188. In [2], 1999. [6] L. Martignon, K. V. Katsikopoulos, and J. K. Woike. Categorization with limited resources: A family of simple heuristics. Journal of Mathematical Psychology, 52(6):352–361, 2008. [7] S. Luan, L. Schooler, and G. Gigerenzer. From perception to preference and on to inference: An approach–avoidance analysis of thresholds. Psychological Review, 121(3):501, 2014. [8] K. V. Katsikopoulos. Psychological heuristics for making inferences: Definition, performance, and the emerging theory and practice. Decision Analysis, 8(1):10–29, 2011. [9] K. B. Laskey and L. Martignon. Comparing fast and frugal trees and Bayesian networks for risk assessment. In K. Makar, editor, Proceedings of the 9th International Conference on Teaching Statistics, Flagstaff, Arizona, 2014. [10] H. Brighton. Robust inference with simple cognitive models. In C. Lebiere and B. Wray, editors, AAAI spring symposium: Cognitive science principles meet AI-hard problems, pages 17–22. American Association for Artificial Intelligence, Menlo Park, CA, 2006. [11] K. V. Katsikopoulos, L. J. Schooler, and R. Hertwig. The robust beauty of ordinary information. Psychological Review, 117(4):1259–1266, 2010. [12] G. Gigerenzer and D. G Goldstein. Reasoning the fast and frugal way: Models of bounded rationality. Psychological Review, 103(4):650–669, 1996. [13] ¨O. S¸ims¸ek. Linear decision rule as aspiration for simple decision heuristics. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 2904–2912. Curran Associates, Inc., Red Hook, NY, 2013. [14] L. Breiman, J. Friedman, C. J. Stone, and R. A. Olshen. Classification and regression trees. CRC Press, Boca Raton, FL, 1984. [15] T. Therneau, B. Atkinson, and B. Ripley. rpart: Recursive partitioning and regression trees, 2014. R package version 4.1-5. [16] M. Schmitt and L. Martignon. On the accuracy of bounded rationality: How far from optimal is fast and frugal? In Y. Weiss, B. Sch¨olkopf, and J. C. Platt, editors, Advances in Neural Information Processing Systems 18, pages 1177–1184. MIT Press, Cambridge, MA, 2006. [17] M. Schmitt and L. Martignon. On the complexity of learning lexicographic strategies. Journal of Machine Learning Research, 7:55–83, 2006. [18] L. Martignon and U. Hoffrage. Fast, frugal, and fit: Simple heuristics for paired comparison. Theory and Decision, 52(1):29–71, 2002. [19] R. M. Hogarth and N. Karelaia. Ignoring information in binary choice with continuous variables: When is less “more”? Journal of Mathematical Psychology, 49(2):115–124, 2005. [20] N. Chater, M. Oaksford, R. Nakisa, and M. Redington. Fast, frugal, and rational: How rational norms explain behavior. Organizational Behavior and Human Decision Processes, 90(1):63–86, 2003. [21] H. Brighton and G. Gigerenzer. Bayesian brains and cognitive mechanisms: Harmony or dissonance? In N. Chater and M. Oaksford, editors, The probabilistic mind: Prospects for Bayesian cognitive science, pages 189–208. Oxford University Press, New York, 2008. [22] H. Brighton and G. Gigerenzer. Are rational actor models “rational” outside small worlds? In S. Okasha and K. Binmore, editors, Evolution and rationality: Decisions, co-operation, and strategic behaviour, pages 84–109. Cambridge University Press, Cambridge, 2012. [23] P. M. Todd and A. Dieckmann. Heuristics for ordering cue search in decision making. In L. K. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems 17, pages 1393– 1400. MIT Press, Cambridge, MA, 2005. [24] B. R. Newell. Re-visions of rationality? Trends in Cognitive Sciences, 9(1):11–15, 2005. [25] M. R. Dougherty, A. M. Franco-Watkins, and R. Thomas. Psychological plausibility of the theory of probabilistic mental models and the fast and frugal heuristics. Psychological Review, 115(1):199–213, 2008. [26] E. Vul, N. Goodman, T. L. Griffiths, and J. B. Tenenbaum. One and done? Optimal decisions from very few samples. Cognitive Science, 38(4):599–637, 2014. 9 | 2015 | 231 |
5,738 | Deep Temporal Sigmoid Belief Networks for Sequence Modeling Zhe Gan, Chunyuan Li, Ricardo Henao, David Carlson and Lawrence Carin Department of Electrical and Computer Engineering Duke University, Durham, NC 27708 {zhe.gan, chunyuan.li, r.henao, david.carlson, lcarin}@duke.edu Abstract Deep dynamic generative models are developed to learn sequential dependencies in time-series data. The multi-layered model is designed by constructing a hierarchy of temporal sigmoid belief networks (TSBNs), defined as a sequential stack of sigmoid belief networks (SBNs). Each SBN has a contextual hidden state, inherited from the previous SBNs in the sequence, and is used to regulate its hidden bias. Scalable learning and inference algorithms are derived by introducing a recognition model that yields fast sampling from the variational posterior. This recognition model is trained jointly with the generative model, by maximizing its variational lower bound on the log-likelihood. Experimental results on bouncing balls, polyphonic music, motion capture, and text streams show that the proposed approach achieves state-of-the-art predictive performance, and has the capacity to synthesize various sequences. 1 Introduction Considerable research has been devoted to developing probabilistic models for high-dimensional time-series data, such as video and music sequences, motion capture data, and text streams. Among them, Hidden Markov Models (HMMs) [1] and Linear Dynamical Systems (LDS) [2] have been widely studied, but they may be limited in the type of dynamical structures they can model. An HMM is a mixture model, which relies on a single multinomial variable to represent the history of a time-series. To represent N bits of information about the history, an HMM could require 2N distinct states. On the other hand, real-world sequential data often contain complex non-linear temporal dependencies, while a LDS can only model simple linear dynamics. Another class of time-series models, which are potentially better suited to model complex probability distributions over high-dimensional sequences, relies on the use of Recurrent Neural Networks (RNNs) [3, 4, 5, 6], and variants of a well-known undirected graphical model called the Restricted Boltzmann Machine (RBM) [7, 8, 9, 10, 11]. One such variant is the Temporal Restricted Boltzmann Machine (TRBM) [8], which consists of a sequence of RBMs, where the state of one or more previous RBMs determine the biases of the RBM in the current time step. Learning and inference in the TRBM is non-trivial. The approximate procedure used in [8] is heuristic and not derived from a principled statistical formalism. Recently, deep directed generative models [12, 13, 14, 15] are becoming popular. A directed graphical model that is closely related to the RBM is the Sigmoid Belief Network (SBN) [16]. In the work presented here, we introduce the Temporal Sigmoid Belief Network (TSBN), which can be viewed as a temporal stack of SBNs, where each SBN has a contextual hidden state that is inherited from the previous SBNs and is used to adjust its hidden-units bias. Based on this, we further develop a deep dynamic generative model by constructing a hierarchy of TSBNs. This can be considered 1 W1 W2 W3 W4 (a) Generative model U1 U2 U3 (b) Recognition model (c) Generative model Time (d) Recognition model Time Figure 1: Graphical model for the Deep Temporal Sigmoid Belief Network. (a,b) Generative and recognition model of the TSBN. (c,d) Generative and recognition model of a two-layer Deep TSBN. as a deep SBN [15] with temporal feedback loops on each layer. Both stochastic and deterministic hidden layers are considered. Compared with previous work, our model: (i) can be viewed as a generalization of an HMM with distributed hidden state representations, and with a deep architecture; (ii) can be seen as a generalization of a LDS with complex non-linear dynamics; (iii) can be considered as a probabilistic construction of the traditionally deterministic RNN; (iv) is closely related to the TRBM, but it has a fully generative process, where data are readily generated from the model using ancestral sampling; (v) can be utilized to model different kinds of data, e.g., binary, real-valued and counts. The “explaining away” effect described in [17] makes inference slow, if one uses traditional inference methods. Another important contribution we present here is to develop fast and scalable learning and inference algorithms, by introducing a recognition model [12, 13, 14], that learns an inverse mapping from observations to hidden variables, based on a loss function derived from a variational principle. By utilizing the recognition model and variance-reduction techniques from [13], we achieve fast inference both at training and testing time. 2 Model Formulation 2.1 Sigmoid Belief Networks Deep dynamic generative models are considered, based on the Sigmoid Belief Network (SBN) [16]. An SBN is a Bayesian network that models a binary visible vector v ∈{0, 1}M, in terms of binary hidden variables h ∈{0, 1}J and weights W ∈RM×J with p(vm = 1|h) = σ(w⊤ mh + cm), p(hj = 1) = σ(bj), (1) where v = [v1, . . . , vM]⊤, h = [h1, . . . , hJ]⊤, W = [w1, . . . , wM]⊤, c = [c1, . . . , cM]⊤, b = [b1, . . . , bJ]⊤, and the logistic function, σ(x) ≜1/(1 + e−x). The parameters W, b and c characterize all data, and the hidden variables, h, are specific to particular visible data, v. The SBN is closely related to the RBM [18], which is a Markov random field with the same bipartite structure as the SBN. The RBM defines a distribution over a binary vector that is proportional to the exponential of its energy, defined as −E(v, h) = v⊤c + v⊤Wh + h⊤b. The conditional distributions, p(v|h) and p(h|v), in the RBM are factorial, which makes inference fast, while parameter estimation usually relies on an approximation technique known as Contrastive Divergence (CD) [18]. The energy function of an SBN may be written as −E(v, h) = v⊤c+v⊤Wh+h⊤b−P m log(1+ exp(w⊤ mh + cm)). SBNs explicitly manifest the generative process to obtain data, in which the hidden layer provides a directed “explanation” for patterns generated in the visible layer. However, the “explaining away” effect described in [17] makes inference inefficient, the latter can be alleviated by exploiting recent advances in variational inference methods [13]. 2 2.2 Temporal Sigmoid Belief Networks The proposed Temporal Sigmoid Belief Network (TSBN) model is a sequence of SBNs arranged in such way that at any given time step, the SBN’s biases depend on the state of the SBNs in the previous time steps. Specifically, assume we have a length-T binary visible sequence, the tth time step of which is denoted vt ∈{0, 1}M. The TSBN describes the joint probability as pθ(V, H) = p(h1)p(v1|h1) · T Y t=2 p(ht|ht−1, vt−1) · p(vt|ht, vt−1), (2) where V = [v1, . . . , vT ], H = [h1, . . . , hT ], and each ht ∈{0, 1}J represents the hidden state corresponding to time step t. For t = 1, . . . , T, each conditional distribution in (2) is expressed as p(hjt = 1|ht−1, vt−1) = σ(w⊤ 1jht−1 + w⊤ 3jvt−1 + bj), (3) p(vmt = 1|ht, vt−1) = σ(w⊤ 2mht + w⊤ 4mvt−1 + cm), (4) where h0 and v0, needed for the prior model p(h1) and p(v1|h1), are defined as zero vectors, respectively, for conciseness. The model parameters, θ, are specified as W1 ∈RJ×J, W2 ∈ RM×J, W3 ∈RJ×M, W4 ∈RM×M. For i = 1, 2, 3, 4, wij is the transpose of the jth row of Wi, and c = [c1, . . . , cM]⊤and b = [b1, . . . , bJ]⊤are bias terms. The graphical model for the TSBN is shown in Figure 1(a). By setting W3 and W4 to be zero matrices, the TSBN can be viewed as a Hidden Markov Model [1] with an exponentially large state space, that has a compact parameterization of the transition and the emission probabilities. Specifically, each hidden state in the HMM is represented as a one-hot length-J vector, while in the TSBN, the hidden states can be any length-J binary vector. We note that the transition matrix is highly structured, since the number of parameters is only quadratic w.r.t. J. Compared with the TRBM [8], our TSBN is fully directed, which allows for fast sampling of “fantasy” data from the inferred model. 2.3 TSBN Variants Modeling real-valued data The model above can be readily extended to model real-valued sequence data, by substituting (4) with p(vt|ht, vt−1) = N(µt, diag(σ2 t )), where µmt = w⊤ 2mht + w⊤ 4mvt−1 + cm, log σ2 mt = (w′ 2m)⊤ht + (w′ 4m)⊤vt−1 + c′ m, (5) and µmt and σ2 mt are elements of µt and σ2 t , respectively. W′ 2 and W′ 4 are of the same size of W2 and W4, respectively. Compared with the Gaussian TRBM [9], in which σmt is fixed to 1, our formalism uses a diagonal matrix to parameterize the variance structure of vt. Modeling count data We also introduce an approach for modeling time-series data with count observations, by replacing (4) with p(vt|ht, vt−1) = QM m=1 yvmt mt , where ymt = exp(w⊤ 2mht + w⊤ 4mvt−1 + cm) PM m′=1 exp(w⊤ 2m′ht + w⊤ 4m′vt−1 + cm′) . (6) This formulation is related to the Replicated Softmax Model (RSM) described in [19], however, our approach uses a directed connection from the binary hidden variables to the visible counts, while also learning the dynamics in the count sequences. Furthermore, rather than assuming that ht and vt only depend on ht−1 and vt−1, in the experiments, we also allow for connections from the past n time steps of the hidden and visible states, to the current states, ht and vt. A sliding window is then used to go through the sequence to obtain n frames at each time. We refer to n as the order of the model. 2.4 Deep Architecture for Sequence Modeling with TSBNs Learning the sequential dependencies with the shallow model in (2)-(4) may be restrictive. Therefore, we propose two deep architectures to improve its representational power: (i) adding stochastic hidden layers; (ii) adding deterministic hidden layers. The graphical model for the deep TSBN 3 is shown in Figure 1(c). Specifically, we consider a deep TSBN with hidden layers h(ℓ) t for t = 1, . . . , T and ℓ= 1, . . . , L. Assume layer ℓcontains J(ℓ) hidden units, and denote the visible layer vt = h(0) t and let h(L+1) t = 0, for convenience. In order to obtain a proper generative model, the top hidden layer h(L) contains stochastic binary hidden variables. For the middle layers, ℓ= 1, . . . , L−1, if stochastic hidden layers are utilized, the generative process is expressed as p(h(ℓ) t ) = QJ(ℓ) j=1 p(h(ℓ) jt |h(ℓ+1) t , h(ℓ) t−1, h(ℓ−1) t−1 ), where each conditional distribution is parameterized via a logistic function, as in (4). If deterministic hidden layers are employed, we obtain h(ℓ) t = f(h(ℓ+1) t , h(ℓ) t−1, h(ℓ−1) t−1 ), where f(·) is chosen to be a rectified linear function. Although the differences between these two approaches are minor, learning and inference algorithms can be quite different, as shown in Section 3.3. 3 Scalable Learning and Inference Computation of the exact posterior over the hidden variables in (2) is intractable. Approximate Bayesian inference, such as Gibbs sampling or mean-field variational Bayes (VB) inference, can be implemented [15, 16]. However, Gibbs sampling is very inefficient, due to the fact that the conditional posterior distribution of the hidden variables does not factorize. The mean-field VB indeed provides a fully factored variational posterior, but this technique increases the gap between the bound being optimized and the true log-likelihood, potentially resulting in a poor fit to the data. To allow for tractable and scalable inference and parameter learning, without loss of the flexibility of the variational posterior, we apply the Neural Variational Inference and Learning (NVIL) algorithm described in [13]. 3.1 Variational Lower Bound Objective We are interested in training the TSBN model, pθ(V, H), described in (2), with parameters θ. Given an observation V, we introduce a fixed-form distribution, qφ(H|V), with parameters φ, that approximates the true posterior distribution, p(H|V). We then follow the variational principle to derive a lower bound on the marginal log-likelihood, expressed as1 L(V, θ, φ) = Eqφ(H|V)[log pθ(V, H) −log qφ(H|V)] . (7) We construct the approximate posterior qφ(H|V) as a recognition model. By using this, we avoid the need to compute variational parameters per data point; instead we compute a set of parameters φ used for all V. In order to achieve fast inference, the recognition model is expressed as qφ(H|V) = q(h1|v1) · T Y t=2 q(ht|ht−1, vt, vt−1) , (8) and each conditional distribution is specified as q(hjt = 1|ht−1, vt, vt−1) = σ(u⊤ 1jht−1 + u⊤ 2jvt + u⊤ 3jvt−1 + dj) , (9) where h0 and v0, for q(h1|v1), are defined as zero vectors. The recognition parameters φ are specified as U1 ∈RJ×J, U2 ∈RJ×M, U3 ∈RJ×M. For i = 1, 2, 3, uij is the transpose of the jth row of Ui, and d = [d1, . . . , dJ]⊤is the bias term. The graphical model is shown in Figure 1(b). The recognition model defined in (9) has the same form as in the approximate inference used for the TRBM [8]. Exact inference for our model consists of a forward and backward pass through the entire sequence, that requires the traversing of each possible hidden state. Our feedforward approximation allows the inference procedure to be fast and implemented in an online fashion. 3.2 Parameter Learning To optimize (7), we utilize Monte Carlo methods to approximate expectations and stochastic gradient descent (SGD) for parameter optimization. The gradients can be expressed as ∇θL(V) = Eqφ(H|V)[∇θ log pθ(V, H)], (10) ∇φL(V) = Eqφ(H|V)[(log pθ(V, H) −log qφ(H|V)) × ∇φ log qφ(H|V)]. (11) 1This lower bound is equivalent to the marginal log-likelihood if qφ(H|V) = p(H|V). 4 Specifically, in the TSBN model, if we define ˆvmt = σ(w⊤ 2mht + w⊤ 4mvt−1 + cm) and ˆhjt = σ(u⊤ 1jht−1 + u⊤ 2jvt + u⊤ 3jvt−1 + dj), the gradients for w2m and u2j can be calculated as ∂log pθ(V, H) ∂w2mj = T X t=1 (vmt −ˆvmt) · hjt, ∂log qφ(H|V) ∂u2jm = T X t=1 (hjt −ˆhjt) · vmt. (12) Other update equations, along with the learning details for the TSBN variants in Section 2.3, are provided in the Supplementary Section B. We observe that the gradients in (10) and (11) share many similarities with the wake-sleep algorithm [20]. Wake-sleep alternates between updating θ in the wake phase and updating φ in the sleep phase. The update of θ is based on the samples generated from qφ(H|V), and is identical to (10). However, in contrast to (11), the recognition parameters φ are estimated from samples generated by the model, i.e., ∇φL(V) = Epθ(V,H)[∇φ log qφ(H|V)]. This update does not optimize the same objective as in (10), hence the wake-sleep algorithm is not guaranteed to converge [13]. Inspecting (11), we see that we are using lφ(V, H) = log pθ(V, H) −log qφ(H|V) as the learning signal for the recognition parameters φ. The expectation of this learning signal is exactly the lower bound (7), which is easy to evaluate. However, this tractability makes the estimated gradients of the recognition parameters very noisy. In order to make the algorithm practical, we employ the variance reduction techniques proposed in [13], namely: (i) centering the learning signal, by subtracting the data-independent baseline and the data-dependent baseline; (ii) variance normalization, by dividing the centered learning signal by a running estimate of its standard deviation. The data-dependent baseline is implemented using a neural network. Additionally, RMSprop [21], a form of SGD where the gradients are adaptively rescaled by a running average of their recent magnitude, were found in practice to be important for fast convergence; thus utilized throughout all the experiments. The outline of the NVIL algorithm is provided in the Supplementary Section A. 3.3 Extension to deep models The recognition model corresponding to the deep TSBN is shown in Figure 1(d). Two kinds of deep architectures are discussed in Section 2.4. We illustrate the difference of their learning algorithms in two respects: (i) the calculation of the lower bound; and (ii) the calculation of the gradients. The top hidden layer is stochastic. If the middle hidden layers are also stochastic, the calculation of the lower bound is more involved, compared with the shallow model; however, the gradient evaluation remain simple as in (12). On the other hand, if deterministic middle hidden layers (i.e., recurrent neural networks) are employed, the lower bound objective will stay the same as a shallow model, since the only stochasticity in the generative process lies in the top layer; however, the gradients have to be calculated recursively through the back-propagation through time algorithm [22]. All details are provided in the Supplementary Section C. 4 Related Work The RBM has been widely used as building block to learn the sequential dependencies in time-series data, e.g., the conditional-RBM-related models [7, 23], and the temporal RBM [8]. To make exact inference possible, the recurrent temporal RBM was also proposed [9], and further extended to learn the dependency structure within observations [11]. In the work reported here, we focus on modeling sequences based on the SBN [16], which recently has been shown to have the potential to build deep generative models [13, 15, 24]. Our work serves as another extension of the SBN that can be utilized to model time-series data. Similar ideas have also been considered in [25] and [26]. However, in [25], the authors focus on grammar learning, and use a feed-forward approximation of the mean-field VB to carry out the inference; while in [26], the wake-sleep algorithm was developed. We apply the model in a different scenario, and develop a fast and scalable inference algorithm, based on the idea of training a recognition model by leveraging the stochastic gradient of the variational bound. There exist two main methods for the training of recognition models. The first one, termed Stochastic Gradient Variational Bayes (SGVB), is based on a reparameterization trick [12, 14], which can be only employed in models with continuous latent variables, e.g., the variational auto-encoder [12] 5 Top: Generated from Piano midi 50 100 150 200 250 300 20 40 60 80 Bottom: Generated from Nottingham 20 40 60 80 100 120 140 160 180 20 40 60 80 1800 1850 1900 1950 2000 0 0.5 1 Topic 29 Nicaragua v. U.S. 1800 1850 1900 1950 2000 0 0.5 1 Topic 30 World War II War of 1812 Iraq War 1800 1850 1900 1950 2000 0 0.5 1 Topic 130 The age of American revolution Figure 2: (Left) Dictionaries learned using the HMSBN for the videos of bouncing balls. (Middle) Samples generated from the HMSBN trained on the polyphonic music. Each column is a sample vector of notes. (Right) Time evolving from 1790 to 2014 for three selected topics learned from the STU dataset. Plotted values represent normalized probabilities that the topic appears in a given year. Best viewed electronically. and all the recent recurrent extensions of it [27, 28, 29]. The second one, called Neural Variational Inference and Learning (NVIL), is based on the log-derivative trick [13], which is more general and can also be applicable to models with discrete random variables. The NVIL algorithm has been previously applied to the training of SBN in [13]. Our approach serves as a new application of this algorithm for a SBN-based time-series model. 5 Experiments We present experimental results on four publicly available datasets: the bouncing balls [9], polyphonic music [10], motion capture [7] and state-of-the-Union [30]. To assess the performance of the TSBN model, we show sequences generated from the model, and report the average log-probability that the model assigns to a test sequence, and the average squared one-step-ahead prediction error per frame. Code is available at https://github.com/zhegan27/TSBN_code_NIPS2015. The TSBN model with W3 = 0 and W4 = 0 is denoted Hidden Markov SBN (HMSBN), the deep TSBN with stochastic hidden layer is denoted DTSBN-S, and the deep TSBN with deterministic hidden layer is denoted DTSBN-D. Model parameters were initialized by sampling randomly from N(0, 0.0012I), except for the bias parameters, that were initialized as 0. The TSBN model is trained using a variant of RMSprop [6], with momentum of 0.9, and a constant learning rate of 10−4. The decay over the root mean squared gradients is set to 0.95. The maximum number of iterations we use is 105. The gradient estimates were computed using a single sample from the recognition model. The only regularization we used was a weight decay of 10−4. The data-dependent baseline was implemented by using a neural network with a single hidden layer with 100 tanh units. For the prediction of vt given v1:t−1, we (i) first obtain a sample from qφ(h1:t−1|v1:t−1); (ii) calculate the conditional posterior pθ(ht|h1:t−1, v1:t−1) of the current hidden state ; (iii) make a prediction for vt using pθ(vt|h1:t, v1:t−1). On the other hand, synthesizing samples is conceptually simper. Sequences can be readily generated from the model using ancestral sampling. 5.1 Bouncing balls dataset We conducted the first experiment on synthetic videos of 3 bouncing balls, where pixels are binary valued. We followed the procedure in [9], and generated 4000 videos for training, and another 200 videos for testing. Each video is of length 100 and of resolution 30 × 30. The dictionaries learned using the HMSBN are shown in Figure 2 (Left). Compared with previous work [9, 10], our learned bases are more spatially localized. In Table 1, we compare the average squared prediction error per frame over the 200 test videos, with recurrent temporal RBM (RTRBM) and structured RTRBM (SRTRBM). As can be seen, our approach achieves better performance compared with the baselines in the literature. Furthermore, we observe that a high-order TSBN reduces the prediction error significantly, compared with an order-one TSBN. This is due to the fact 6 Table 1: Average prediction error for the bouncing balls dataset. (⋄) taken from [11]. MODEL DIM ORDER PRED. ERR. DTSBN-S 100-100 2 2.79 ± 0.39 DTSBN-D 100-100 2 2.99 ± 0.42 TSBN 100 4 3.07 ± 0.40 TSBN 100 1 9.48 ± 0.38 RTRBM⋄ 3750 1 3.88 ± 0.33 SRTRBM⋄ 3750 1 3.31 ± 0.33 Table 2: Average prediction error obtained for the motion capture dataset. (⋄) taken from [11]. MODEL WALKING RUNNING DTSBN-S 4.40 ± 0.28 2.56 ± 0.40 DTSBN-D 4.62 ± 0.01 2.84 ± 0.01 TSBN 5.12 ± 0.50 4.85 ± 1.26 HMSBN 10.77 ± 1.15 7.39 ± 0.47 SS-SRTRBM⋄ 8.13 ± 0.06 5.88 ± 0.05 G-RTRBM⋄ 14.41 ± 0.38 10.91 ± 0.27 that by using a high-order TSBN, more information about the past is conveyed. We also examine the advantage of employing deep models. Using stochastic, or deterministic hidden layer improves performances. More results, including log-likelihoods, are provided in Supplementary Section D. 5.2 Motion capture dataset In this experiment, we used the CMU motion capture dataset, that consists of measured joint angles for different motion types. We used the 33 running and walking sequences of subject 35 (23 walking sequences and 10 running sequences). We followed the preprocessing procedure of [11], after which we were left with 58 joint angles. We partitioned the 33 sequences into training and testing set: the first of which had 31 sequences, and the second had 2 sequences (one walking and another running). We averaged the prediction error over 100 trials, as reported in Table 2. The TSBN we implemented is of size 100 in each hidden layer and order 1. It can be seen that the TSBN-based models improves over the Gaussian (G-)RTRBM and the spike-slab (SS-)SRTRBM significantly. Figure 3: Motion trajectories generated from the HMSBN trained on the motion capture dataset. (Left) Walking. (Middle) Running-running-walking. (Right) Running-walking. Another popular motion capture dataset is the MIT dataset2. To further demonstrate the directed, generative nature of our model, we give our trained HMSBN model different initializations, and show generated, synthetic data and the transitions between different motion styles in Figure 3. These generated data are readily produced from the model and demonstrate realistic behavior. The smooth trajectories are walking movements, while the vibrating ones are running. Corresponding video files (AVI) are provided as mocap 1, 2 and 3 in the Supplementary Material. 5.3 Polyphonic music dataset The third experiment is based on four different polyphonic music sequences of piano [10], i.e., Piano-midi.de (Piano), Nottingham (Nott), MuseData (Muse) and JSB chorales (JSB). Each of these datasets are represented as a collection of 88-dimensional binary sequences, that span the whole range of piano from A0 to C8. The samples generated from the trained HMSBN model are shown in Figure 2 (Middle). As can be seen, different styles of polyphonic music are synthesized. The corresponding MIDI files are provided as music 1 and 2 in the Supplementary Material. Our model has the ability to learn basic harmony rules and local temporal coherence. However, long-term structure and musical melody remain elusive. The variational lower bound, along with the estimated log-likelihood in [10], are presented in Table 3. The TSBN we implemented is of size 100 and order 1. Empirically, adding layers did not improve performance on this dataset, hence no such results are reported. The results of RNN-NADE and RTRBM [10] were obtained by only 100 runs of the annealed importance sampling, which has the potential to overestimate the true log-likelihood. Our variational lower bound provides a more conservative estimate. Though, our performance is still better than that of RNN. 2Quantitative results on the MIT dataset are provided in Supplementary Section D. 7 Table 3: Test log-likelihood for the polyphonic music dataset. (⋄) taken from [10]. MODEL PIANO. NOTT. MUSE. JSB. TSBN -7.98 -3.67 -6.81 -7.48 RNN-NADE⋄ -7.05 -2.31 -5.60 -5.56 RTRBM⋄ -7.36 -2.62 -6.35 -6.35 RNN⋄ -8.37 -4.46 -8.13 -8.71 Table 4: Average prediction precision for STU. (⋄) taken from [31]. MODEL DIM MP PP HMSBN 25 0.327 ± 0.002 0.353 ± 0.070 DHMSBN-S 25-25 0.299 ± 0.001 0.378 ± 0.006 GP-DPFA ⋄ 100 0.223 ± 0.001 0.189 ± 0.003 DRFM⋄ 25 0.217 ± 0.003 0.177 ± 0.010 5.4 State of the Union dataset The State of the Union (STU) dataset contains the transcripts of T = 225 US State of the Union addresses, from 1790 to 2014. Two tasks are considered, i.e., prediction and dynamic topic modeling. Prediction The prediction task is concerned with estimating the held-out words. We employ the setup in [31]. After removing stop words and terms that occur fewer than 7 times in one document or less than 20 times overall, there are 2375 unique words. The entire data of the last year is held-out. For the documents in the previous years, we randomly partition the words of each document into 80%/20% split. The model is trained on the 80% portion, and the remaining 20% held-out words are used to test the prediction at each year. The words in both held-out sets are ranked according to the probability estimated from (6). To evaluate the prediction performance, we calculate the precision @top-Mas in [31], which is given by the fraction of the top-M words, predicted by the model, that matches the true ranking of the word counts. M = 50 is used. Two recent works are compared, GP-DPFA [31] and DRFM [30]. The results are summarized in Table 4. Our model is of order 1. The column MP denotes the mean precision over all the years that appear in the training set. The column PP denotes the predictive precision for the final year. Our model achieves significant improvements in both scenarios. Dynamic Topic Modeling The setup described in [30] is employed, and the number of topics is 200. To understand the temporal dynamic per topic, three topics are selected and the normalized probability that a topic appears at each year are shown in Figure 2 (Right). Their associated top 6 words per topic are shown in Table 5. The learned trajectory exhibits different temporal patterns across the topics. Clearly, we can identify jumps associated with some key historical events. For instance, for Topic 29, we observe a positive jump in 1986 related to military and paramilitary activities in and against Nicaragua brought by the U.S. Topic 30 is related with war, where the War of 1812, World War II and Iraq War all spike up in their corresponding years. In Topic 130, we observe consistent positive jumps from 1890 to 1920, when the American revolution was taking place. Three other interesting topics are also shown in Table 5. Topic 64 appears to be related to education, Topic 70 is about Iraq, and Topic 74 is Axis and World War II. We note that the words for these topics are explicitly related to these matters. Table 5: Top 6 most probable words associated with the STU topics. Topic #29 Topic #30 Topic #130 Topic #64 Topic #70 Topic #74 family officer government generations Iraqi Philippines budget civilized country generation Qaida islands Nicaragua warfare public recognize Iraq axis free enemy law brave Iraqis Nazis future whilst present crime AI Japanese freedom gained citizens race Saddam Germans 6 Conclusion We have presented the Deep Temporal Sigmoid Belief Networks, an extension of SBN, that models the temporal dependencies in high-dimensional sequences. To allow for scalable inference and learning, an efficient variational optimization algorithm is developed. Experimental results on several datasets show that the proposed approach obtains superior predictive performance, and synthesizes interesting sequences. In this work, we have investigated the modeling of different types of data individually. One interesting future work is to combine them into a unified framework for dynamic multi-modality learning. Furthermore, we can use high-order optimization methods to speed up inference [32]. Acknowledgements This research was supported in part by ARO, DARPA, DOE, NGA and ONR. 8 References [1] L. Rabiner and B. Juang. An introduction to hidden markov models. In ASSP Magazine, IEEE, 1986. [2] R. Kalman. Mathematical description of linear dynamical systems. In J. the Society for Industrial & Applied Mathematics, Series A: Control, 1963. [3] M. Hermans and B. Schrauwen. Training and analysing deep recurrent neural networks. In NIPS, 2013. [4] J. Martens and I. Sutskever. Learning recurrent neural networks with hessian-free optimization. In ICML, 2011. [5] R. Pascanu, T. Mikolov, and Y. Bengio. On the difficulty of training recurrent neural networks. In ICML, 2013. [6] A. Graves. Generating sequences with recurrent neural networks. In arXiv:1308.0850, 2013. [7] G. Taylor, G. Hinton, and S. Roweis. Modeling human motion using binary latent variables. In NIPS, 2006. [8] I. Sutskever and G. Hinton. Learning multilevel distributed representations for high-dimensional sequences. In AISTATS, 2007. [9] I. Sutskever, G. Hinton, and G. Taylor. The recurrent temporal restricted boltzmann machine. In NIPS, 2009. [10] N. Boulanger-Lewandowski, Y. Bengio, and P. Vincent. Modeling temporal dependencies in highdimensional sequences: Application to polyphonic music generation and transcription. In ICML, 2012. [11] R. Mittelman, B. Kuipers, S. Savarese, and H. Lee. Structured recurrent temporal restricted boltzmann machines. In ICML, 2014. [12] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [13] A. Mnih and K. Gregor. Neural variational inference and learning in belief networks. In ICML, 2014. [14] D. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. [15] Z. Gan, R. Henao, D. Carlson, and L. Carin. Learning deep sigmoid belief networks with data augmentation. In AISTATS, 2015. [16] R. Neal. Connectionist learning of belief networks. In Artificial intelligence, 1992. [17] G. Hinton, S. Osindero, and Y. Teh. A fast learning algorithm for deep belief nets. In Neural computation, 2006. [18] G. Hinton. Training products of experts by minimizing contrastive divergence. In Neural computation, 2002. [19] G. Hinton and R. Salakhutdinov. Replicated softmax: an undirected topic model. In NIPS, 2009. [20] G. Hinton, P. Dayan, B. Frey, and R. Neal. The “wake-sleep” algorithm for unsupervised neural networks. In Science, 1995. [21] T. Tieleman and G. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. In COURSERA: Neural Networks for Machine Learning, 2012. [22] P. Werbos. Backpropagation through time: what it does and how to do it. In Proc. of the IEEE, 1990. [23] G. Taylor and G. Hinton. Factored conditional restricted boltzmann machines for modeling motion style. In ICML, 2009. [24] Z. Gan, C. Chen, R. Henao, D. Carlson, and L. Carin. Scalable deep poisson factor analysis for topic modeling. In ICML, 2015. [25] J. Henderson and I. Titov. Incremental sigmoid belief networks for grammar learning. In JMLR, 2010. [26] G. Hinton, P. Dayan, A. To, and R. Neal. The helmholtz machine through time. In Proc. of the ICANN, 1995. [27] J. Bayer and C. Osendorfer. Learning stochastic recurrent networks. In arXiv:1411.7610, 2014. [28] O. Fabius, J. R. van Amersfoort, and D. P. Kingma. Variational recurrent auto-encoders. In arXiv:1412.6581, 2014. [29] J. Chung, K. Kastner, L. Dinh, K. Goel, A. Courville, and Y. Bengio. A recurrent latent variable model for sequential data. In NIPS, 2015. [30] S. Han, L. Du, E. Salazar, and L. Carin. Dynamic rank factor model for text streams. In NIPS, 2014. [31] A. Acharya, J. Ghosh, and M. Zhou. Nonparametric Bayesian factor analysis for dynamic count matrices. In AISTATS, 2015. [32] K. Fan, Z. Wang, J. Kwok, and K. Heller. Fast Second-Order Stochastic Backpropagation for Variational Inference. In NIPS, 2015. 9 | 2015 | 232 |
5,739 | Subsampled Power Iteration: a Unified Algorithm for Block Models and Planted CSP’s Vitaly Feldman IBM Research - Almaden vitaly@post.harvard.edu Will Perkins University of Birmingham w.f.perkins@bham.ac.uk Santosh Vempala Georgia Tech vempala@cc.gatech.edu Abstract We present an algorithm for recovering planted solutions in two well-known models, the stochastic block model and planted constraint satisfaction problems (CSP), via a common generalization in terms of random bipartite graphs. Our algorithm matches up to a constant factor the best-known bounds for the number of edges (or constraints) needed for perfect recovery and its running time is linear in the number of edges used. The time complexity is significantly better than both spectral and SDP-based approaches. The main contribution of the algorithm is in the case of unequal sizes in the bipartition that arises in our reduction from the planted CSP. Here our algorithm succeeds at a significantly lower density than the spectral approaches, surpassing a barrier based on the spectral norm of a random matrix. Other significant features of the algorithm and analysis include (i) the critical use of power iteration with subsampling, which might be of independent interest; its analysis requires keeping track of multiple norms of an evolving solution (ii) the algorithm can be implemented statistically, i.e., with very limited access to the input distribution (iii) the algorithm is extremely simple to implement and runs in linear time, and thus is practical even for very large instances. 1 Introduction A broad class of learning problems fits into the framework of obtaining a sequence of independent random samples from a unknown distribution, and then (approximately) recovering this distribution using as few samples as possible. We consider two natural instances of this framework: the stochastic block model in which a random graph is formed by choosing edges independently at random with probabilities that depend on whether an edge crosses a planted partition, and planted k-CSP’s (or planted k-SAT) in which width-k boolean constraints are chosen independently at random with probabilities that depend on their evaluation on a planted assignment to a set of boolean variables. We propose a natural bipartite generalization of the stochastic block model, and then show that planted k-CSP’s can be reduced to this model, thus unifying graph partitioning and planted CSP’s into one problem. We then give an algorithm for solving random instances of the model. Our algorithm is optimal up to a constant factor in terms of number of sampled edges and running time for the bipartite block model; for planted CSP’s the algorithm matches up to log factors the best possible sample complexity in several restricted computational models and the best-known bounds for any algorithm. A key feature of the algorithm is that when one side of the bipartition is much 1 larger than the other, then our algorithm succeeds at significantly lower edge densities than using Singular Value Decomposition (SVD) on the rectangular adjacency matrix. Details are in Sec. 5. The bipartite block model begins with two vertex sets, V1 and V2 (of possibly unequal size), each with a balanced partition, (A1, B1) and (A2, B2) respectively. Edges are added independently at random between V1 and V2 with probabilities that depend on which parts the endpoints are in: edges between A1 and A2 or B1 and B2 are added with probability δp, while the other edges are added with probability (2 −δ)p, where δ ∈[0, 2] and p is the overall edge density. To obtain the stochastic block model we can identify V1 and V2. To reduce planted CSP’s to this model, we first reduce the problem to an instance of noisy r-XOR-SAT, where r is the complexity parameter of the planted CSP distribution defined in [19] (see Sec. 2 for details). We then identify V1 with literals, and V2 with (r −1)-tuples of literals, and add an edge between literal l ∈V1 and tuple t ∈V2 when the r-clause consisting of their union appears in the formula. The reduction leads to a bipartition with V2 much larger than V1. Our algorithm is based on applying power iteration with a sequence of matrices subsampled from the original adjacency matrix. This is in contrast to previous algorithms that compute the eigenvectors (or singular vectors) of the full adjacency matrix. Our algorithm has several advantages. Such an algorithm, for the special case of square matrices, was previously proposed and analyzed in a different context by Korada et al. [25]. • Up to a constant factor, the algorithm matches the best-known (and in some cases the bestpossible) edge or constraint density needed for complete recovery of the planted partition or assignment. The algorithm for planted CSP’s finds the planted assignment using O(nr/2 · log n) clauses for a clause distribution of complexity r (see Sec. 2 for the formal definition), nearly matching computational lower bounds for SDP hierarchies [30] and the class of statistical algorithms [19]. • The algorithm is fast, running in time linear in the number of edges or constraints used, unlike other approaches that require computing eigenvectors or solving semi-definite programs. • The algorithm is conceptually simple and easy to implement. In fact it can be implemented in the statistical query model, with very limited access to the input graph [19]. • It is based on the idea of iteration with subsampling which may have further applications in the design and analysis of algorithms. • Most notably, the algorithm succeeds where generic spectral approaches fail. For the case of the planted CSP, when |V2| ≫|V1|, our algorithm succeeds at a polynomial factor sparser density than the approaches of McSherry [28], Coja-Oghlan [7], and Vu [33]. The algorithm succeeds despite the fact that the ‘energy’ of the planted vector with respect to the random adjacency matrix is far below the spectral norm of the matrix. In previous analyses, this was believed to indicate failure of the spectral approach. See Sec. 5. 1.1 Related work The algorithm of Mossel, Neeman and Sly [29] for the standard stochastic block model also runs in near linear time, while other known algorithmic approaches for planted partitioning that succeed near the optimal edge density [28, 7, 27] perform eigenvector or singular vector computations and thus require superlinear time, though a careful randomized implementation of low-rank approximations can reduce the running time of McSherry’s algorithm substantially [2]. For planted satisfiability, the algorithm of Flaxman for planted 3-SAT works for a subset of planted distributions (those with distribution complexity at most 2 in our definition below) using O(n) constraints, while the algorithm of Coja-Oghlan, Cooper, and Frieze [8] works for planted 3-SAT distributions that exclude unsatisfied clauses and uses O(n3/2 ln10 n) constraints. The only previous algorithm that finds the planted assignment for all distributions of planted kCSP’s is the SDP-based algorithm of Bogdanov and Qiao [5] with the folklore generalization to r-wise independent predicates (cf. [30]). Similar to our algorithm, it uses ˜O(nr/2) constraints. This algorithm effectively solves the noisy r-XOR-SAT instance and therefore can be also used to solve our general version of planted satisfiability using ˜O(nr/2) clauses (via the reduction in Sec. 4). 2 Notably for both this algorithm and ours, having a completely satisfying planted assignment plays no special role: the number of constraints required depends only on the distribution complexity.To the best of our knowledge, our algorithm is the first for the planted k-SAT problem that runs in linear time in the number of constraints used. It is important to note that in planted k-CSP’s, the planted assignment becomes recoverable with high probability after at most O(n log n) random clauses yet the best known efficient algorithms require nΩ(r/2) clauses. Problems exhibiting this type of behavior have attracted significant interest in learning theory [4, 12, 31, 15, 32, 3, 10, 16] and some of the recent hardness results are based on the conjectured computational hardness of the k-SAT refutation problem [10, 11]. Our algorithm is arguably simpler than the approach in [5] and substantially improves the running time even for small k. Another advantage of our approach is that it can be implemented using restricted access to the distribution of constraints referred to as statistical queries [24, 17]. Roughly speaking, for the planted SAT problem this access allows an algorithm to evaluate multi-valued functions of a single clause on randomly drawn clauses or to estimate expectations of such functions, without direct access to the clauses themselves. Recently, in [19], lower bounds on the number of clauses necessary for a polynomial-time statistical algorithm to solve planted k-CSPs were proved. It is therefore important to understand the power of such algorithms for solving planted k-CSPs. A statistical implementation of our algorithm gives an upper bound that nearly matches the lower bound for the problem. See [19] for the formal details of the model and statistical implementation of our algorithm. Korada, Montanari and Oh [25] analyzed the ‘Gossip PCA’ algorithm, which for the special case of an equal bipartition is the same as our subsampled power iteration. The assumptions, model, and motivation in the two papers are different and the results incomparable. In particular, while our focus and motivation are on general (nonsquare) matrices, their work considers extracting a planting of rank k greater than 1 in the square setting. Their results also assume an initial vector with non-trivial correlation with the planted vector. The nature of the guarantees is also different. 2 Model and results Bipartite stochastic block model: Definition 1. For δ ∈[0, 2] \ {1}, n1, n2 even, and P1 = (A1, B1), P2 = (A2, B2) bipartitions of vertex sets V1, V2 of size n1, n2 respectively, we define the bipartite stochastic block model B(n1, n2, P1, P2, δ, p) to be the random graph in which edges between vertices in A1 and A2 and B1 and B2 are added independently with probability δp and edges between vertices in A1 and B2 and B1 and A2 with probability (2 −δ)p. Here δ is a fixed constant while p will tend to 0 as n1, n2 →∞. Note that setting n1 = n2 = n, and identifying A1 and A2 and B1 and B2 gives the usual stochastic block model (with loops allowed); for edge probabilities a/n and b/n, we have δ = 2a/(a + b) and p = (a + b)/2n, the overall edge density. For our application to k-CSP’s, it will be crucial to allow vertex sets of very different sizes, i.e. n2 ≫n1. The algorithmic task for the bipartite block model is to recover one or both partitions (completely or partially) using as few edges and as little computational time as possible. In this work we will assume that n1 ≤n2, and we will be concerned with the algorithmic task of recovering the partition P1 completely, as this will allow us to solve the planted k-CSP problems described below. We define complete recovery of P1 as finding the exact partition with high probability over the randomness in the graph and in the algorithm. Theorem 1. Assume n1 ≤n2. There is a constant C so that the Subsampled Power Iteration algorithm described below completely recovers the partition P1 in the bipartite stochastic block model B(n1, n2, P1, P2, δ, p) with probability 1 −o(1) as n1 →∞when p ≥ C log n1 (δ−1)2√n1n2 . Its running time is O √n1n2 · log n1 (δ−1)2 . Note that for the usual stochastic block model this gives an algorithm using O(n log n) edges and O(n log n) time, which is the best possible for complete recovery since that many edges are needed for every vertex to appear in at least edge. With edge probabilities a log n/n and b log n/n, our 3 results require (a −b)2 ≥C(a + b) for some absolute constant C, matching the dependence on a and b in [6, 28] (see [1] for a discussion of the best possible threshold for complete recovery). For any n1, n2, at least √n1n2 edges are necessary for even non-trivial partial recovery, as below that threshold the graph consists only of small components (and even if a correct partition is found on each component, correlating the partitions of different components is impossible). Similarly at least Ω(√n1n2 log n1) are needed for complete recover of P1 since below that density, there are vertices in V1 joined only to vertices of degree 1 in V2. For very lopsided graphs, with n2 ≫n1 log2 n1, the running time is sublinear in the size of V2; this requires careful implementation and is essential to achieving the running time bounds for planted CSP’s described below. Planted k-CSP’s: We now describe a general model for planted satisfiability problems introduced in [19]. For an integer k, let Ck be the set of all ordered k-tuples of literals from x1, . . . , xn, x1, . . . , xn with no repetition of variables. For a k-tuple of literals C and an assignment σ, σ(C) denotes the vector of values that σ assigns to the literals in C. A planting distribution Q : {±1}k →[0, 1] is a probability distribution over {±1}k. Definition 2. Given a planting distribution Q : {±1}k →[0, 1], and an assignment σ ∈{±1}n, we define the random constraint satisfaction problem FQ,σ(n, m) by drawing m k-clauses from Ck independently according to the distribution Qσ(C) = Q(σ(C)) P C′∈Ck Q(σ(C′)) where σ(C) is the vector of values that σ assigns to the k-tuple of literals comprising C. Definition 3. The distribution complexity r(Q) of the planting distribution Q is the smallest integer r ≥1 so that there is some S ⊆[k], |S| = r, so that the discrete Fourier coefficient ˆQ(S) is non-zero. In other words, the distribution complexity of Q is r if Q is an (r −1)-wise independent distribution on {±1}k but not an r-wise independent distribution. The uniform distribution over all clauses, Q ≡2−k, has ˆQ(S) = 0 for all |S| ≥1, and so we define its complexity to be ∞. The uniform distribution does not reveal any information about σ, and so inference is impossible. For any Q that is not the uniform distribution over clauses, we have 1 ≤r(Q) ≤k. Note that the uniform distribution on k-SAT clauses with at least one satisfied literal under σ has distribution complexity r = 1. r = 1 means that there is a bias towards either true or false literals. In this case, a very simple algorithm is effective: for each variable, count the number of times it appears negated and not negated, and take the majority vote. For distributions with complexity r ≥2, the expected number of true and false literals in the random formula are equal and so this simple algorithm fails. Theorem 2. For any planting distribution Q, there exists an algorithm that for any assignment σ, given an instance of FQ,σ(n, m) completely recovers the planted assignment σ for m = O(nr/2 log n) using O(nr/2 log n) time, where r ≥2 is the distribution complexity of Q. For distribution complexity r = 1, there is an algorithm that gives non-trivial partial recovery with O(n1/2) constraints and complete recovery with O(n log n) constraints. 3 The algorithm We now present our algorithm for the bipartite stochastic block model. We define vectors u and v of dimension n1 and n2 respectively, indexed by V1 and V2, with ui = 1 for i ∈A1, ui = −1 for i ∈B1, and similarly for v. To recover the partition P1 it suffices to find either u or −u. We will find this vector by multiplying a random initial vector x0 by a sequence of centered adjacency matrices and their transposes. We form these matrices as follows: let Gp be the random bipartite graph drawn from the model B(n1, n2, P1, P2, δ, p), and T a positive integer. Then form T different bipartite graphs G1, . . . , GT on the same vertex sets V1, V2 by placing each edge from Gp uniformly and independently at random into one of the T graphs. The resulting graphs have the same marginal distribution. 4 Next we form the n1 × n2 adjacency matrices A1, . . . , AT for G1, . . . GT with rows indexed by V1 and columns by V2 with a 1 in entry (i, j) if vertex i ∈V1 is joined to vertex j ∈V2. Finally we center the matrices by defining Mi = Ai −p T J where J is the n1 × n2 all ones matrix. The basic iterative steps are the multiplications y = M T x and x = My. Algorithm: Subsampled Power Iteration. 1. Form T = 10 log n1 matrices M1, . . . , MT by uniformly and independently assigning each edge of the bipartite block model to a graph G1, . . . , GT , then forming the matrices Mi = Ai −p T J, where Ai is the adjacency matrix of Gi and J is the all ones matrix. 2. Sample x ∈{±1}n1 uniformly at random and let x0 = x √n1 . 3. For i = 1 to T/2 let yi = M T 2i−1xi−1 ∥M T 2i−1xi−1∥; xi = M2iyi ∥M2iyi∥; zi = sgn(xi). 4. For each coordinate j ∈[n1] take the majority vote of the signs of zi j for all i ∈ {T/4, . . . , T/2} and call this vector v: vj = sgn T X i=T/2 zi j . 5. Return the partition indicated by v. The analysis of the resampled power iteration algorithm proceeds in four phases, during which we track the progress of two vectors xi and yi, as measured by their inner product with u and v respectively. We define Ui := u · xi and Vi := v · yi. Here we give an overview of each phase: • Phase 1. Within log n1 iterations, |Ui| reaches log n1. We show that conditioned on the value of Ui, there is at least a 1/2 chance that |Ui+1| ≥2|Ui|; that Ui never gets too small; and that in log n1 steps, a run of log log n1 doublings pushes the magnitude of Ui above log n1. • Phase 2. After reaching log n1, |Ui| makes steady, predictable progress, doubling at each step whp until it reaches Θ(√n1), at which point we say xi has strong correlation with u. • Phase 3. Once xi is strongly correlated with u, we show that zi+1 agrees with either u or −u on a large fraction of coordinates. • Phase 4. We show that taking the majority vote of the coordinate-by-coordinate signs of zi over O(log n1) additional iterations gives complete recovery whp. Running time If n2 = Θ(n1), then a straightforward implementation of the algorithm runs in time linear in the number of edges used: each entry of xi = Myi (resp. yi = M T xi−1) can be computed as a sum over the edges in the graph associated with M. The rounding and majority vote are both linear in n1. However, if n2 ≫n1, then simply initializing the vector yi will take too much time. In this case, we have to implement the algorithm more carefully. Say we have a vector xi−1 and want to compute xi = M2iyi without storing the vector yi. Instead of computing yi = M T 2i−1xi−1, we create a set Si ⊂V2 of all vertices with degree at least 1 in the current graph G2i−1 corresponding to the matrix M2i−1. The size of Si is bounded by the number of edges in G2i−1, and checking membership can be done in constant time with a data structure of size O(|Si|) that requires expected time O(|Si|) to create [21]. Recall that M2i−1 = A2i−1 −qJ. Then we can write yi = (A2i−1 −qJ)T xi−1 = ˆy −q n1 X j=1 xi−1 j 1n2 = ˆy −qL1n2, 5 where ˆy is 0 on coordinates j /∈Si, L = Pn1 j=1 xi−1 j , and 1n2 is the all ones vector of length n2. Then to compute xi = M2iyi, we write xi = (A2i −qJ)yi = (A2i −qJ)(ˆy −qL1n2) = (A2i −qJ)ˆy −qLA2i1n2 + q2LJ1n2 = A2iˆy −qJ ˆy −qLA2i1n2 + q2Ln21n1 We bound the running time of the computation as follows: we can compute ˆy in linear time in the number of edges of G2i−1 using Si. Given ˆy, computing A2iˆy is linear in the number of edges of G2i and computing qJ ˆy is linear in the number of non-zero entries of ˆy, which is bounded by the number of edges of G2i−1. Computing L = Pn1 j=1 xi−1 j is linear in n1 and gives q2Ln21n1. Computing qLA2i1n2 is linear in the number of edges of G2i. All together this gives our linear time implementation. 4 Reduction of planted k-CSP’s to the block model Here we describe how solving the bipartite block model suffices to solve the planted k-CSP problems. Consider a planted k-SAT problem FQ,σ(n, m) with distribution complexity r. Let S ⊆[k], |S| = r, be such that ˆQ(S) = η ̸= 0. Such an S exists from the definition of the distribution complexity. We assume that we know both r and this set S, as trying all possibilities (smallest first) requires only a constant factor (2r) more time. We will restrict each k-clause in the formula to an r-clause, by taking the r literals specified by the set S. If the distribution Q is known to be symmetric with respect to the order of the k-literals in each clause, or if clauses are given as unordered sets of literals, then we can simply sample a random set of r literals (without replacement) from each clause. We will show that restricting to these r literals from each k-clause induces a distribution on r-clauses defined by Qδ : {±1}r →R+ of the form Qδ(C) = δ/2r for |C| even, Qδ(C) = (2 −δ)/2r for |C| odd, for some δ ∈[0, 2] , δ ̸= 1, where |C| is the number of TRUE literals in C under σ. This reduction allows us to focus on algorithms for the specific case of a parity-based distribution on r-clauses with distribution complexity r. Recall that for a function f : {−1, 1}k →R, its Fourier coefficients are defined for each subset S ⊂[k] as ˆf(S) = E x∼{−1,1}k[f(x)χS(x)] where χS are the Walsh basis functions of {±1}k with respect to the uniform probability measure, i.e., χS(x) = Q i∈S xi. Lemma 1. If the function Q : {±1}k →R+ defines a distribution Qσ on k-clauses with distribution complexity r and planted assignment σ, then for some S ⊆[k], |S| = r and δ ∈[0, 2]\{1}, choosing r literals with indices in S from a clause drawn randomly from Qσ yields a random r-clause from Qδ σ. Proof. From Definition 3 we have that there exists an S with |S| = r such that ˆQ(S) ̸= 0. Note that by definition, ˆQ(S) = E x∼{±1}k[Q(x)χS(x)] = 1 2k X x∈{±1}k Q(x)χS(x) = 1 2k X x:∈{±1}k:xS even Q(x) − X x:∈{±1}k:xS odd Q(x) = 1 2k (Pr[xS even] −Pr[xS odd]) where xS is x restricted to the coordinates in S, and so if we take δ = 1 + 2k ˆQ(S), the distribution induced by restricting k-clauses to the r-clauses specified by S is Qδ σ. Note that by the definition 6 of the distribution complexity, ˆQ(T) = 0 for any 1 ≤|T| < r, and so the original and induced distributions are uniform over any set of r −1 coordinates. First consider the case r = 1. Restricting each clause to S for |S| = 1, induces a noisy 1-XORSAT distribution in which a random true literal appears with probability δ and random false literal appears with probability 2 −δ. The simple majority vote algorithm described above suffices: set each variable to +1 if it appears more often positively than negated in the restricted clauses of the formula; to −1 if it appears more often negated; and choose randomly if it appears equally often. Using c p t log(1/ϵ) clauses for c = O(1/|1−δ|2) this algorithm will give an assignment that agrees with σ (or −σ) on n/2 + t√n variables with probability at least 1 −ϵ; using cn log n clauses it will recover σ exactly with probability 1 −o(1). Now assume that r ≥2. We describe how the parity distribution Qδ σ on r-constraints induces a bipartite block model. Let V1 be the set of 2n literals of the given variable set, and V2 the collection of all (r −1)-tuples of literals. We have n1 = |V1| = 2n and n2 = |V2| = 2n r−1 . We partition each set into two parts as follows: A1 ⊂V1 is the set of false literals under σ, and B1 the set of true literals. A2 ⊂V2 is the set of (r −1)-tuples with an even number of true literals under σ, and B2 the set of (r −1)-tuples with an odd number of true literals. For each r-constraint (l1, l2, . . . , lr), we add an edge in the block model between the tuples l1 ∈V1 and (l2, . . . , lr) ∈V2. A constraint drawn according to Qδ σ induces a random edge between A1 and A2 or B1 and B2 with probability δ/2 and between A1 and B2 or B1 and A2 with probability 1 −δ/2, exactly the distribution of a single edge in the bipartite block model. Recovering the partition P1 = A1 ∪B1 in this bipartite block model partitions the literals into true and false sets giving σ (up to sign). Now the model in Defn. 2 is that of m clauses selected independently with replacement according to a given distribution, while in Defn. 1, each edge is present independently with a given probability. Reducing from the first to the second can be done by Poissonization; details given in the full version [18]. The key feature of our bipartite block model algorithm is that it uses ˜O(√n1n2) edges (i.e. p = ˜O((n1n2)−1/2), corresponding to ˜O(nr/2) clauses in the planted CSP. 5 Comparison with spectral approach As noted above, many approaches to graph partitioning problems and planted satisfiability problems use eigenvectors or singular vectors. These algorithms are essentially based on the signs of the top eigenvector of the centered adjacency matrix being correlated with the planted vector. This is fairly straightforward to establish when the average degree of the random graph is large enough. However, in the stochastic block model, for example, when the average degree is a constant, vertices of large degree dominate the spectrum and the straightforward spectral approach fails (see [26] for a discussion and references). In the case of the usual block model, n1 = n2 = n, while our approach has a fast running time, it does not save on the number of edges required as compared to the standard spectral approach: both require Ω(n log n) edges. However, when n2 ≫n1, eg. n1 = Θ(n), n2 = Θ(nk−1) as in the case of the planted k-CSP’s for odd k, this is no longer the case. Consider the general-purpose partitioning algorithm of [28]. Let G be the matrix of edge probabilities: Gij is the probability that the edge between vertices i and j is present. Let Gu, Gv denote columns of G corresponding to vertices u, v. Let σ2 be an upper bound of the variance of an entry in the adjacency matrix, sm the size of the smallest part in the planted partition, q the number of parts, δ the failure probability of the algorithm, and c a universal constant. Then the condition for the success of McSherry’s partitioning algorithm is: min u,v in different parts ∥Gu −Gv∥2 > cqσ2(n/sm + log(n/δ)) In our case, we have q = 4, n = n1+n2, sm = n1/2, σ2 = Θ(p), and ∥Gu−Gv∥2 = 4(δ−1)2p2n2. When n2 ≫n1 log n, the condition requires p = Ω(1/n1), while our algorithm succeeds when p = Ω(log n1/√n1n2). In our application to planted CSP’s with odd k and n1 = 2n, n2 = 2n k−1 , this gives a polynomial factor improvement. 7 In fact, previous spectral approaches to planted CSP’s or random k-SAT refutation worked for even k using nk/2 constraints [23, 9, 14], while algorithms for odd k only worked for k = 3 and used considerably more complicated constructions and techniques [13, 22, 8]. In contrast to previous approaches, our algorithm unifies the algorithm for planted k-CSP’s for odd and even k, works for odd k > 3, and is particularly simple and fast. We now describe why previous approaches faced a spectral barrier for odd k, and how our algorithm surmounts it. The previous spectral algorithms for even k constructed a similar graph to the one in the reduction above: vertices are k/2-tuples of literals, and with edges between two tuples if their union appears as a k-clause. The distribution induced in this case is the stochastic block model. For odd k, such a reduction is not possible, and one might try a bipartite graph, with either the reduction described above, or with ⌊k/2⌋-tuples and ⌈k/2⌉-tuples (our analysis works for this reduction as well). However, with ˜O(k/2) clauses, the spectral approach of computing the largest or second largest singular vector of the adjacency matrix does not work. Consider M from the distribution M(p). Let u be the n1 dimensional vector indexed as the rows of M whose entries are 1 if the corresponding vertex is in A1 and −1 otherwise. Define the n2 dimensional vector v analogously. The next propositions summarize properties of M. Proposition 1. E(M) = (δ −1)puvT . Proposition 2. Let M1 be the rank-1 approximation of M drawn from M(p). Then ∥M1−E(M)∥≤ 2∥M −E(M)∥. The above propositions suffice to show high correlation between the top singular vector and the vector u when n2 = Θ(n1) and p = Ω(log n1/n1). This is because the norm of E(M) is p√n1n2; this is higher than O(√pn2), the norm of M −E(M) for this range of p. Therefore the top singular vector of M will be correlated with the top singular vector of E(M). The latter is a rank-1 matrix with u as its left singular vector. However, when n2 ≫n1 (eg. k odd) and p = ˜O((n1n2)−1/2), the norm of the zero-mean matrix M −E(M) is in fact much larger than the norm of E(M). Letting x(i) be the vector of length n1 with a 1 in the ith coordinate and zeroes elsewhere, we see that ∥Mx(i)∥2 ≈√pn2, and so ∥M −E(M)∥= Ω(√pn2), while ∥E(M)∥= O(p√n1n2); the former is Ω((n2/n1)1/4) while the latter is O(1)). In other words, the top singular value of M is much larger than the value obtained by the vector corresponding to the planted assignment! The picture is in fact richer: the straightforward spectral approach succeeds for p ≫n−2/3 1 n−1/3 2 , while for p ≪n−2/3 1 n−1/3 2 , the top left singular vector of the centered adjacency matrix is asymptotically uncorrelated with the planted vector [20]. In spite of this, one can exploit correlations to recover the planted vector below this threshold with our resampling algorithm, which in this case provably outperforms the spectral algorithm. Acknowledgements S. Vempala supported in part by NSF award CCF-1217793. References [1] E. Abbe, A. S. Bandeira, and G. Hall. Exact recovery in the stochastic block model. arXiv preprint arXiv:1405.3267, 2014. [2] D. Achlioptas and F. McSherry. Fast computation of low rank matrix approximations. In STOC, pages 611–618, 2001. [3] Q. Berthet and P. Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT, pages 1046–1066, 2013. [4] A. Blum. Learning boolean functions in an infinite attribute space. Machine Learning, 9:373–386, 1992. [5] A. Bogdanov and Y. Qiao. On the security of goldreich’s one-way function. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 392–405. 2009. [6] R. B. Boppana. Eigenvalues and graph bisection: An average-case analysis. In FOCS, pages 280–285, 1987. [7] A. Coja-Oghlan. Graph partitioning via adaptive spectral techniques. Combinatorics, Probability & Computing, 19(2):227, 2010. 8 [8] A. Coja-Oghlan, C. Cooper, and A. Frieze. An efficient sparse regularity concept. SIAM Journal on Discrete Mathematics, 23(4):2000–2034, 2010. [9] A. Coja-Oghlan, A. Goerdt, A. Lanka, and F. Sch¨adlich. Certifying unsatisfiability of random 2k-sat formulas using approximation techniques. In Fundamentals of Computation Theory, pages 15–26. Springer, 2003. [10] A. Daniely, N. Linial, and S. Shalev-Shwartz. More data speeds up training time in learning halfspaces over sparse vectors. In NIPS, pages 145–153, 2013. [11] A. Daniely and S. Shalev-Shwartz. Complexity theoretic limitations on learning dnf’s. CoRR, abs/1404.3378, 2014. [12] S. Decatur, O. Goldreich, and D. Ron. Computational sample complexity. SIAM Journal on Computing, 29(3):854–879, 1999. [13] U. Feige and E. Ofek. Easily refutable subformulas of large random 3cnf formulas. In Automata, languages and programming, pages 519–530. Springer, 2004. [14] U. Feige and E. Ofek. Spectral techniques applied to sparse random graphs. Random Structures & Algorithms, 27(2):251–275, 2005. [15] V. Feldman. Attribute efficient and non-adaptive learning of parities and DNF expressions. Journal of Machine Learning Research, (8):1431–1460, 2007. [16] V. Feldman. Open problem: The statistical query complexity of learning sparse halfspaces. In COLT, pages 1283–1289, 2014. [17] V. Feldman, E. Grigorescu, L. Reyzin, S. Vempala, and Y. Xiao. Statistical algorithms and a lower bound for planted clique. In STOC, pages 655–664, 2013. [18] V. Feldman, W. Perkins, and S. Vempala. Subsampled power iteration: a unified algorithm for block models and planted csp’s. CoRR, abs/1407.2774, 2014. [19] V. Feldman, W. Perkins, and S. Vempala. On the complexity of random satisfiability problems with planted solutions. In STOC, pages 77–86, 2015. [20] L. Florescu and W. Perkins. Spectral thresholds in the bipartite stochastic block model. arXiv preprint arXiv:1506.06737, 2015. [21] M. L. Fredman, J. Koml´os, and E. Szemer´edi. Storing a sparse table with 0 (1) worst case access time. Journal of the ACM (JACM), 31(3):538–544, 1984. [22] J. Friedman, A. Goerdt, and M. Krivelevich. Recognizing more unsatisfiable random k-sat instances efficiently. SIAM Journal on Computing, 35(2):408–430, 2005. [23] A. Goerdt and M. Krivelevich. Efficient recognition of random unsatisfiable k-sat instances by spectral methods. In STACS 2001, pages 294–304. Springer, 2001. [24] M. Kearns. Efficient noise-tolerant learning from statistical queries. JACM, 45(6):983–1006, 1998. [25] S. B. Korada, A. Montanari, and S. Oh. Gossip pca. In SIGMETRICS, pages 209–220, 2011. [26] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborov´a, and P. Zhang. Spectral redemption in clustering sparse networks. PNAS, 110(52):20935–20940, 2013. [27] L. Massouli´e. Community detection thresholds and the weak ramanujan property. In STOC, pages 1–10, 2014. [28] F. McSherry. Spectral partitioning of random graphs. In FOCS, pages 529–537, 2001. [29] E. Mossel, J. Neeman, and A. Sly. A proof of the block model threshold conjecture. arXiv preprint arXiv:1311.4115, 2013. [30] R. O’Donnell and D. Witmer. Goldreich’s prg: Evidence for near-optimal polynomial stretch. In Conference on Computational Complexity, 2014. [31] R. Servedio. Computational sample complexity and attribute-efficient learning. Journal of Computer and System Sciences, 60(1):161–178, 2000. [32] S. Shalev-Shwartz, O. Shamir, and E. Tromer. Using more data to speed-up training time. In AISTATS, pages 1019–1027, 2012. [33] V. Vu. A simple svd algorithm for finding hidden partitions. arXiv preprint arXiv:1404.3918, 2014. 9 | 2015 | 233 |
5,740 | Learning Stationary Time Series using Gaussian Processes with Nonparametric Kernels Felipe Tobar ftobar@dim.uchile.cl Center for Mathematical Modeling Universidad de Chile Thang D. Bui tdb40@cam.ac.uk Department of Engineering University of Cambridge Richard E. Turner ret26@cam.ac.uk Department of Engineering University of Cambridge Abstract We introduce the Gaussian Process Convolution Model (GPCM), a two-stage nonparametric generative procedure to model stationary signals as the convolution between a continuous-time white-noise process and a continuous-time linear filter drawn from Gaussian process. The GPCM is a continuous-time nonparametricwindow moving average process and, conditionally, is itself a Gaussian process with a nonparametric kernel defined in a probabilistic fashion. The generative model can be equivalently considered in the frequency domain, where the power spectral density of the signal is specified using a Gaussian process. One of the main contributions of the paper is to develop a novel variational freeenergy approach based on inter-domain inducing variables that efficiently learns the continuous-time linear filter and infers the driving white-noise process. In turn, this scheme provides closed-form probabilistic estimates of the covariance kernel and the noise-free signal both in denoising and prediction scenarios. Additionally, the variational inference procedure provides closed-form expressions for the approximate posterior of the spectral density given the observed data, leading to new Bayesian nonparametric approaches to spectrum estimation. The proposed GPCM is validated using synthetic and real-world signals. 1 Introduction Gaussian process (GP) regression models have become a standard tool in Bayesian signal estimation due to their expressiveness, robustness to overfitting and tractability [1]. GP regression begins with a prior distribution over functions that encapsulates a priori assumptions, such as smoothness, stationarity or periodicity. The prior is then updated by incorporating information from observed data points via their likelihood functions. The result is a posterior distribution over functions that can be used for prediction. Critically for this work, the posterior and therefore the resultant predictions, is sensitive to the choice of prior distribution. The form of the prior covariance function (or kernel) of the GP is arguably the central modelling choice. Employing a simple form of covariance will limit the GP’s capacity to generalise. The ubiquitous radial basis function or squared exponential kernel, for example, implies prediction is just a local smoothing operation [2, 3]. Expressive kernels are needed [4, 5], but although kernel design is widely acknowledged as pivotal, it typically proceeds via a “black art” in which a particular functional form is hand-crafted using intuitions about the application domain to build a kernel using simpler primitive kernels as building blocks (e.g. [6]). Recently, some sophisticated automated approaches to kernel design have been developed that construct kernel mixtures on the basis of incorporating different measures of similarity [7, 8], or more generally by both adding and multiplying kernels, thus mimicking the way in which a human would search for the best kernel [5]. Alternatively, a flexible parametric kernel can be used as in the case of the spectral mixture kernels, where the power spectral density (PSD) of the GP is parametrised by a mixture of Gaussians [4]. 1 We see two problems with this general approach: The first is that computational tractability limits the complexity of the kernels that can be designed in this way. Such constraints are problematic when searching over kernel combinations and to a lesser extent when fitting potentially large numbers of kernel hyperparameters. Indeed, many naturally occurring signals contain more complex structure than can comfortably be entertained using current methods, time series with complex spectra like sounds being a case in point [9, 10]. The second limitation is that hyperparameters of the kernel are typically fit by maximisation of the model marginal likelihood. For complex kernels with large numbers of hyperparameters, this can easily result in overfitting rearing its ugly head once more (see sec. 4.2). This paper attempts to remedy the existing limitations of GPs in the time series setting using the same rationale by which GPs were originally developed. That is, kernels themselves are treated nonparametrically to enable flexible forms whose complexity can grow as more structure is revealed in the data. Moreover, approximate Bayesian inference is used for estimation, thus side-stepping problems with model structure search and protecting against overfitting. These benefits are achieved by modelling time series as the output of a linear and time-invariant system defined by a convolution between a white-noise process and a continuous-time linear filter. By considering the filter to be drawn from a GP, the expected second-order statistics (and, as a consequence, the spectral density) of the output signal are defined in a nonparametric fashion. The next section presents the proposed model, its relationship to GPs and how to sample from it. In Section 3 we develop an analytic approximate inference method using state-of-the-art variational free-energy approximations for performing inference and learning. Section 4 shows simulations using both synthetic and real-world datasets. Finally, Section 5 presents a discussion of our findings. 2 Regression model: Convolving a linear filter and a white-noise process We introduce the Gaussian Process Convolution Model (GPCM) which can be viewed as constructing a distribution over functions f(t) using a two-stage generative model. In the first stage, a continuous filter function h(t) : R 7→R is drawn from a GP with covariance function Kh(t1, t2). In the second stage, the function f(t) is produced by convolving the filter with continuous time whitenoise x(t). The white-noise can be treated informally as a draw from a GP with a delta-function covariance,1 h(t) ∼GP(0, Kh(t1, t2)), x(t) ∼GP(0, σ2 xδ(t1 −t2)), f(t) = Z R h(t −τ)x(τ)dτ. (1) This family of models can be motivated from several different perspectives due to the ubiquity of continuous-time linear systems. First, the model relates to linear time-invariant (LTI) systems [12]. The process x(t) is the input to the LTI system, the function h(t) is the system’s impulse response (which is modelled as a draw from a GP) and f(t) is its output. In this setting, as an LTI system is entirely characterised by its impulse response [12], model design boils down to identifying a suitable function h(t). A second perspective views the model through the lens of differential equations, in which case h(t) can be considered to be the Green’s function of a system defined by a linear differential equation that is driven by white-noise. In this way, the prior over h(t) implicitly defines a prior over the coefficients of linear differential equations of potentially infinite order [13]. Third, the GPCM can be thought of as a continuous-time generalisation of the discrete-time moving average process in which the window is potentially infinite in extent and is produced by a GP prior [14]. A fourth perspective relates the GPCM to standard GP models. Consider the filter h(t) to be known. In this case the process f(t)|h is distributed according to a GP, since f(t) is a linear combination of Gaussian random variables. The mean function mf|h(f(t)) and covariance function Kf|h(t1, t2) of the random variable f|h, t ∈R, are then stationary and given by mf|h(f(t)) = E [f(t)|h] = R R h(t −τ)E [x(τ)] dτ = 0 and Kf|h(t1, t2) = Kf|h(t) = Z R h(s)h(s + t)ds = (h(t) ∗h(−t))(t) (2) 1Here we use informal notation common in the GP literature. A more formal treatment would use stochastic integral notation [11], which replaces the differential element x(τ)dτ = dW(τ), so that eq. (1) becomes a stochastic integral equation (w.r.t. the Brownian motion W). 2 that is, the convolution between the filter h(t) and its mirrored version with respect to t = 0 — see sec. 1 of the supplementary material for the full derivation. Since h(t) is itself is drawn from a nonparametric prior, the presented model (through the relationship above) induces a prior over nonparametric kernels. A particular case is obtained when h(t) is chosen as the basis expansion of a reproducing kernel Hilbert space [15] with parametric kernel (e.g., the squared exponential kernel), whereby Kf|h becomes such a kernel. A fifth perspective considers the model in the frequency domain rather than the time domain. Here the continuous-time linear filter shapes the spectral content of the input process x(t). As x(t) is white-noise, it has positive PSD at all frequencies, which can potentially influence f(t). More precisely, since the PSD of f|h is given by the Fourier transform of the covariance function (by the Wiener–Khinchin theorem [12]), the model places a nonparametric prior over the PSD, given by F(Kf|h(t))(ω) = R R Kf|h(t)e−jωtdt = |˜h(ω)|2, where ˜h(ω) = R R h(t)e−jωtdt is the Fourier transform of the filter. Armed with these different theoretical perspectives on the GPCM generative model, we next focus on how to design appropriate covariance functions for the filter. 2.1 Sensible and tractable priors over the filter function Real-world signals have finite power (which relates to the stability of the system) and potentially complex spectral content. How can such knowledge be built into the filter covariance function Kh(t1, t2)? To fulfil these conditions, we model the linear filter h(t) as a draw from a squared exponential GP that is multiplied by a Gaussian window (centred on zero) in order to restrict its extent. The resulting decaying squared exponential (DSE) covariance function is given by a squared exponential (SE) covariance pre- and post-multiplied by e−αt2 1 and e−αt2 2 respectively, that is, Kh(t1, t2) = KDSE(t1, t2) = σ2 he−αt2 1e−γ(t1−t2)2e−αt2 2, α, γ, σh > 0. (3) With the GP priors for x(t) and h(t), f(t) is zero-mean, stationary and has a variance E[f 2(t)] = σ2 xσ2 h p π/(2α). Consequently, by Chebyshev’s inequality, f(t) is stochastically bounded, that is, Pr(|f(t)| ≥T) ≤σ2 xσ2 h p π/(2α)T −2, T ∈R. Hence, the exponential decay of KDSE (controlled by α) plays a key role in the finiteness of the integral in eq. (1) — and, consequently, of f(t). Additionally, the DSE model for the filter h(t) provides a flexible prior distribution over linear systems, where the hyperparameters have physical meaning: σ2 h controls the power of the output f(t); 1/√γ is the characteristic timescale over which the filter varies that, in turn, determines the typical frequency content of the system; finally, 1/√α is the temporal extent of the filter which controls the length of time correlations in the output signal and, equivalently, the bandwidth characteristics in the frequency domain. Although the covariance function is flexible, its Gaussian form facilitates analytic computation that will be leveraged when (approximately) sampling from the DSE-GPCM and performing inference. In principle, it is also possible in the framework that follows to add causal structure into the covariance function so that only causal filters receive non-zero prior probability density, but we leave that extension for future work. 2.2 Sampling from the model Exact sampling from the proposed model in eq. (1) is not possible, since it requires computation of the convolution between infinite dimensional processes h(t) and x(t). It is possible to make some analytic progress by considering, instead, the GP formulation of the GPCM in eq. (2) and noting that sampling f(t)|h ∼GP(0, Kf|h) only requires knowledge of Kf|h = h(t) ∗h(−t) and therefore avoids explicit representation of the troublesome white-noise process x(t). Further progress requires approximation. The first key insight is that h(t) can be sampled at a finite number of locations h = h(t) = [h(t1), . . . , h(tNh)] using a multivariate Gaussian and then exact analytic inference can be performed to infer the entire function h(t) (via noiseless GP regression). Moreover, since the filter is drawn from the DSE kernel h(t) ∼GP(0, KDSE) it is, with high probability, temporally limited in extent and smoothly varying. Therefore, a relatively small number of samples Nh can potentially enable accurate estimates of h(t). The second key insight is that it is possible, 3 when using the DSE kernel, to analytically compute the expected value of the covariance of f(t)|h, Kf|h = E[Kf|h|h] = E[h(t) ∗h(−t)|h] as well as the uncertainty in this quantity. The more values the latent process h we consider, the lower the uncertainty in h and, as a consequence, Kf|h →Kf|h almost surely. This is an example of a Bayesian numerical integration method since the approach maintains knowledge of its own inaccuracy [16]. In more detail, the kernel approximation Kf|h(t1, t2) is given by: E[Kf|h(t1, t2)|h] = E Z R h(t1 −τ)h(t2 −τ)dτ h = Z R E [h(t1 −τ)h(t2 −τ)|h] dτ = Z R KDSE(t1 −τ, t2 −τ)dτ + Ng X r,s=1 Mr,s Z R KDSE(t1 −τ, tr)KDSE(ts, t2 −τ)dτ where Mr,s is the (r, s)th entry of the matrix (K−1hhT K−1 −K−1), K = KDSE(t, t). The kernel approximation and its Fourier transform, i.e., the PSD, can be calculated in closed form (see sec. 2 in the supplementary material). Fig. 1 illustrates the generative process of the proposed model. −10 −5 0 5 10 −1 −0.5 0 0.5 1 Time [samples] Filter h(t) ∼G P(0, Kh) Latent process h Observations h −10 0 10 0 1 2 Time [samples] Kernel Kf |h(t) = h(t) ∗h(−t) Approx. Kf |h = E[Kf |h|h] True kernel Kf |h −2 −1 0 1 2 0 1 2 3 4 F (Kf |h)(ω) Frequency [hertz] −50 0 50 −2 0 2 Signal f (t) ∼G P(0, Kf |h) Time [samples] Figure 1: Sampling from the proposed regression model. From left to right: filter, kernel, power spectral density and sample of the output f(·). 3 Inference and learning using variational methods One of the main contributions of this paper is to devise a computationally tractable method for learning the filter h(t) (known as system identification in the control community [17]) and inferring the white-noise process x(t) from a noisy dataset y ∈RN produced by their convolution and additive Gaussian noise, y(t) = f(t) + ϵ(t) = R R h(t −τ)x(τ)dτ + ϵ(t), ϵ(t) ∼N(0, σ2 ϵ ). Performing inference and learning is challenging for three reasons: First, the convolution means that each observed datapoint depends on the entire unknown filter and white-noise process, which are infinitedimensional functions. Second, the model is non-linear in the unknown functions since the filter and the white-noise multiply one another in the convolution. Third, continuous-time white-noise must be handled with care since formally it is only well-behaved inside integrals. We propose a variational approach that addresses these three problems. First, the convolution is made tractable by using variational inducing variables that summarise the infinite dimensional latent functions into finite dimensional inducing points. This is the same approach that is used for scaling GP regression [18]. Second, the product non-linearity is made tractable by using a structured meanfield approximation and leveraging the fact that the posterior is conditionally a GP when x(t) or h(t) is fixed. Third, the direct representation of white-noise process is avoided by considering a set of inducing variables instead, which are related to x(t) via an integral transformation (so-called inter-domain inducing variables [19]). We outline the approach below. In order to form the variational inter-domain approximation, we first expand the model with additional variables. We use X to denote the set of all integral transformations of x(t) with members ux(t) = R w(t, τ)x(τ)dτ (which includes the original white-noise process when w(t, τ) = δ(t−τ)) and identically define the set H with members uh(t) = R w(t, τ)h(τ)dτ. The variational lower bound of the model evidence can be applied to this augmented model2 using Jensen’s inequality L = log p(y) = log Z p(y, H, X)dHdX ≥ Z q(H, X) log p(y, H, X) q(H, X) dHdX = F (4) 2This formulation can be made technically rigorous for latent functions [20], but we do not elaborate on that here to simplify the exposition. 4 here q(H, X) is any variational distribution over the sets of processes X and H. The bound can be written as the difference between the model evidence and the KL divergence between the variational distribution over all integral transformed processes and the true posterior, F = L −KL[q(H, X)||p(X, H|y)]. The bound is therefore saturated when q(H, X) = p(X, H|y), but this is intractable. Instead, we choose a simpler parameterised form, similar in spirit to that used in the approximate sampling procedure, that allows us to side-step these difficulties. In order to construct the variational distribution, we first partition the set X into the original white-noise process, a finite set of variables called inter-domain inducing points ux that will be used to parameterise the approximation and the remaining variables X̸=x,ux, so that X = {x, ux, X̸=x,ux}. The set H is partitioned identically H = {h, uh, H̸=h,uh}. We then choose a variational distribution q(H, X) that mirrors the form of the joint distribution, p(y, H, X) = p(x, X̸=x,ux|ux)p(h, H̸=h,uh|uh)p(ux)p(uh)p(y|h, x) q(H, X) = p(x, X̸=x,ux|ux)p(h, H̸=h,uh|uh)q(ux)q(uh) = q(H)q(X). This is a structured mean-field approximation [21]. The approximating distribution over the inducing points q(ux)q(uh) is chosen to be a multivariate Gaussian (the optimal parametric form given the assumed factorisation). Intuitively, the variational approximation implicitly constructs a surrogate GP regression problem, whose posterior q(ux)q(uh) induces a predictive distribution that best captures the true posterior distribution as measured by the KL divergence. Critically, the resulting bound is now tractable as we will now show. First, note that the shared prior terms in the joint and approximation cancel leading to an elegant form, F = Z q(h, x, uh, ux) log p(y|h, x)p(uh)p(ux) q(uh)q(ux) dhdxduhdux (5) = Eq [log p(y|h, x)] −KL[q(uh)||p(uh)] −KL[q(ux)||p(ux)]. (6) The last two terms in the bound are simple to compute being KL divergences between multivariate Gaussians. The first term, the average of the log-likelihood terms with respect to the variational distribution, is more complex, Eq [log p(y|h, x)] = −N 2 log(2πσ2 ϵ ) − 1 2σ2ϵ N X i=1 Eq " y(ti) − Z R h(ti −τ)x(τ)dτ 2# . Computation of the variational bound therefore requires the first and second moments of the convolution under the variational approximation. However, these can be computed analytically for particular choices of covariance function such as the DSE, by taking the expectations inside the integral (this is analogous to variational inference for the Gaussian Process Latent Variable Model [22]). For example, the first moment of the convolution is Eq Z R h(ti −τ)x(τ)dτ = Z R Eq(h,uh) [h(ti −τ)] Eq(x,ux)[x(τ)]dτ (7) where the expectations take the form of the predictive mean in GP regression, Eq(h,uh) [h(ti −τ)] = Kh,uh(ti −τ)K−1 uh,uhµuh and Eq(x,ux)[x(τ)] = Kx,ux(τ)K−1 ux,uxµux where {Kh,uh, Kuh,uh, Kx,ux, Kux,ux} are the covariance functions and {µuh, µux} are the means of the approximate variational posterior. Crucially, the integral is tractable if the covariance functions can be convolved analytically, R R Kh,uh(ti −τ)Kx,ux(τ)dτ, which is the case for the SE and DSE covariances - see sec. 4 of the supplementary material for the derivation of the variational lower bound. The fact that it is possible to compute the first and second moments of the convolution under the approximate posterior means that it is also tractable to compute the mean of the posterior distribution over the kernel, Eq Kf|h(t1, t2) = Eq R R h(t1 −τ)h(t2 −τ)dτ and the associated error-bars. The method therefore supports full probabilistic inference and learning for nonparametric kernels, in addition to extrapolation, interpolation and denoising in a tractable manner. The next section discusses sensible choices for the integral transforms that define the inducing variables uh and ux. 3.1 Choice of the inducing variables uh and ux In order to choose the domain of the inducing variables, it is useful to consider inference for the white-noise process given a fixed window h(t). Typically, we assume that the window h(t) is 5 smoothly varying, in which case the data y(t) are only determined by the low-frequency content of the white-noise; conversely in inference, the data can only reveal the low frequencies in x(t). In fact, since a continuous time white-noise process contains power at all frequencies and infinite power in total, most of the white-noise content will be undeterminable, as it is suppressed by the filter (or filtered out). However, for the same reason, these components do not affect prediction of f(t). Since we can only learn the low-frequency content of the white-noise and this is all that is important for making predictions, we consider inter-domain inducing points formed by a Gaussian integral transform, ux = R R exp −1 2l2 (tx −τ)2 x(τ)dτ. These inducing variables represent a local estimate of the white-noise process x around the inducing location tx considering a Gaussian window, and have a squared exponential covariance by construction (these covariances are shown in sec. 3 of the supplementary material). In spectral terms, the process ux is a low-pass version of the true process x. The variational parameters l and tx affect the approximate posterior and can be optimised using the free-energy, although this was not investigated here to minimise computational overhead. For the inducing variables uh we chose not to use the flexibility of the inter-domain parameterisation and, instead, place the points in the same domain as the window. 4 Experiments The DSE-GPCM was tested using synthetic data with known statistical properties and real-world signals. The aim of these experiments was to validate the new approach to learn covariance functions and PSDs while also providing error bars for the estimates, and to compare it against alternative parametric and nonparametric approaches. 4.1 Learning known parametric kernels We considered Gaussian processes with standard, parametric covariance kernels and verified that our method is able to infer such kernels. Gaussian processes with squared exponential (GP-SE) and spectral mixture (GP-SM) kernels, both of unit variance, were used to generate two time series on the region [-44, 44] uniformly sampled at 10 Hz (i.e., 880 samples). We then constructed the observation signal by adding unit-variance white-noise. The experiment then consisted of (i) learning the underlying kernel, (ii) estimating the latent process and (iii) performing imputation by removing observations in the region [-4.4, 4.4] (10% of the observations). Fig. 2 shows the results for the GP-SE case. We chose 88 inducing points for ux, that is, 1/10 of the samples to be recovered and 30 for uh; the hyperparameters in eq. (2) were set to γ = 0.45 and α = 0.1, so as to allow for an uninformative prior on h(t). The variational objective F was optimised with respect to the hyperparameter σh and the variational parameters µh, µx (means) and the Cholesky factors of Ch, Cx (covariances) using conjugate gradients. The true SE kernel was reconstructed from the noisy data with an accuracy of 5%, while the estimation mean squared error (MSE) was within 1% of the (unit) noise variance for both the true GP-SE and the proposed model. Fig. 3 shows the results for the GP-SM time series. Along the lines of the GP-SE case, the reconstruction of the true kernel and spectrum is remarkably accurate and the estimate of the latent process has virtually the same mean square error (MSE) as the true GP-SM model. These toy results indicate that the variational inference procedure can work well, in spite of known biases [23]. 4.2 Learning the spectrum of real-world signals The ability of the DSE-GPCM to provide Bayesian estimates of the PSD of real-world signals was verified next. This was achieved through a comparison of the proposed model to (i) the spectral mixture kernel (GP-SM) [4], (ii) tracking the Fourier coefficients using a Kalman filter (KalmanFourier [24]), (iii) the Yule-Walker method and (iv) the periodogram [25]. We first analysed the Mauna Loa monthly CO2 concentration (de-trended). We considered the GPSM with 4 and 10 components, Kalman-Fourier with a partition of 500 points between zero and the Nyquist frequency, Yule-Walker with 250 lags and the raw periodogram. All methods used all the data and each PSD estimate was normalised w.r.t its maximum (shown in fig. 4). All methods identified the three main frequency peaks at [0, year−1, 2year−1 ]; however, notice that the KalmanFourier method does not provide sharp peaks and that GP-SM places Gaussians on frequencies with 6 −5 0 5 0 1 2 3 Filter h(t) −40 −20 0 20 40 −2 0 2 4 Process u x −5 0 5 0 0.5 1 Kernels (normalised). Discrepancy:5.4% −40 −30 −20 −10 0 10 20 30 40 −4 −2 0 2 4 Observations, latent process and kernel estimates Posterior mean Inducing points True SE kernel DSE-GPCM kernel Latent process Observations SE kernel estimate (MSE=0.9984) DSE-GPCM estimate (MSE=1.0116) Posterior mean Inducing points Figure 2: Joint learning of an SE kernel and data imputation using the proposed DSE-GPCM approach. Top: filter h(t) and inducing points uh (left), filtered white-noise process ux (centre) and learnt kernel (right). Bottom: Latent signal and its estimates using both the DSE-GPCM and the true model (GP-SE). Confidence intervals are shown in light blue (DSE-GPCM) and in between dashed red lines (GP-SE) and they correspond to 99.7% for the kernel and 95% otherwise. −20 −10 0 10 20 −0.5 0 0.5 1 1.5 Time Kernels (normalised). Discrepancy: 18.6%. 0 0.1 0.2 0.3 0.4 0.5 2 4 6 8 10 12 14 16 18 20 Frequency PSD (normalised). Discrepancy: 15.8%. −10 −5 0 5 10 −4 −2 0 2 4 6 8 Time Data imputation Ground truth DSE-GPCM posterior DSE-GPCM True SM kernel Ground truth Observations SM estimate (MSE=1.0149) DSE-GPCM estimate (MSE=1.0507) Figure 3: Joint learning of an SM kernel and data imputation using a nonparametric kernel. True and learnt kernel (left), true and learnt spectra (centre) and data imputation region (right). negligible power — this is a known drawback of the GP-SM approach: it is sensitive to initialisation and gets trapped in noisy frequency peaks (in this experiment, the centres of the GP-SM were initialised as multiples of one tenth of the Nyquist frequency). This example shows that the GP-SM can overfit noise in training data. Conversely, observe how the proposed DSE-GPCM approach (with Nh = 300 and Nx = 150) not only captured the first three peaks but also the spectral floor and placed meaningful error bars (90%) where the raw periodogram laid. 1/year 2/year 3/year 4/year 5/year 10 −10 10 −5 10 0 Frequency [year −1] 1/year 2/year 3/year 4/year 5/year 10 −10 10 −5 10 0 Frequency [year −1] DSE-GPCM Periodogram Spectral mix. (4 comp) Spectral mix. (10 comp) Kalman-Fourier Yule-Walker Periodogram Figure 4: Spectral estimation of the Mauna Loa CO2 concentration. DSE-GPCM with error bars (90%) is shown with the periodogram at the left and all other methods at the right for clarity. The next experiment consisted of recovering the spectrum of an audio signal from the TIMIT corpus, composed of 1750 samples (at 16kHz), only using an irregularly-sampled 20% of the available data. We compared the proposed DSE-GPCM method to GP-SM (again 4 and 10 components) and Kalman-Fourier; we used the periodogram and the Yule-Walker method as benchmarks, since these 7 methods cannot handle unevenly-sampled data (therefore, they used all the data). Besides the PSD, we also computed the learnt kernel, shown alongside the autocorrelation function in fig. 5 (left). Due to its sensitivity to initial conditions, the centres of the GP-SM were initialised every 100Hz (the harmonics of the signal are approximately every 114Hz); however, it was only with 10 components that the GP-SM was able to find the four main lobes of the PSD. Notice also how the DSE-GPCM accurately finds the main lobes, both in location and width, together with the 90% error bars. 0 10 20 30 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 Time [miliseconds] Covariance kernel DSE-GPCM Spectral Mix. (4 comp) Spectral Mix. (10 comp) Autocorrelation function 114 228 342 456 570 684 798 10 −6 10 −4 10 −2 10 0 Frequency [hertz] Power spectral density DSE-GPCM Periodogram 114 228 342 456 570 684 798 10 −6 10 −4 10 −2 10 0 Frequency [hertz] Power spectral density Spectral Mix. (4 comp) Spectral Mix. (10 comp) Kalman-Fourier Yule-Walker Periodogram Figure 5: Audio signal from TIMIT. Induced kernel of DSE-GPCM and GP-SM alongside autocorrelation function (left). PSD estimate using DSE-GPCM and raw periodogram (centre). PSD estimate using GP-SM, Kalman-Fourier, Yule-Walker and raw periodogram (right). 5 Discussion The Gaussian Process Convolution Model (GPCM) has been proposed as a generative model for stationary time series based on the convolution between a filter function and a white-noise process. Learning the model from data is achieved via a novel variational free-energy approximation, which in turn allows us to perform predictions and inference on both the covariance kernel and the spectrum in a probabilistic, analytically and computationally tractable manner. The GPCM approach was validated in the recovery of spectral density from non-uniformly sampled time series; to our knowledge, this is the first probabilistic approach that places nonparametric prior over the spectral density itself and which recovers a posterior distribution over that density directly from the time series. The encouraging results for both synthetic and real-world data shown in sec. 4 serve as a proof of concept for the nonparametric design of covariance kernels and PSDs using convolution processes. In this regard, extensions of the presented model can be identified in the following directions: First, for the proposed GPCM to have a desired performance, the number of inducing points uh and ux needs to be increased with the (i) high frequency content and (ii) range of correlations of the data; therefore, to avoid the computational overhead associated to large quantities of inducing points, the filter prior or the inter-domain transformation can be designed to have a specific harmonic structure and therefore focus on a target spectrum. Second, the algorithm can be adapted to handle longer time series, for instance, through the use of tree-structured approximations [26]. Third, the method can also be extended beyond time series to operate on higher-dimensional input spaces; this can be achieved by means of a factorisation of the latent kernel, whereby the number of inducing points for the filter only increases linearly with the dimension, rather than exponentially. Acknowledgements Part of this work was carried out when F.T. was with the University of Cambridge. F.T. thanks CONICYT-PAI grant 82140061 and Basal-CONICYT Center for Mathematical Modeling (CMM). R.T. thanks EPSRC grants EP/L000776/1 and EP/M026957/1. T.B. thanks Google. We thank Mark Rowland, Shane Gu and the anonymous reviewers for insightful feedback. 8 References [1] C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning. The MIT Press, 2006. [2] Y. Bengio, “Learning deep architectures for AI,” Foundations and trends R⃝in Machine Learning, vol. 2, no. 1, pp. 1–127, 2009. [3] D. J. C. MacKay, “Introduction to Gaussian processes,” in Neural Networks and Machine Learning (C. M. Bishop, ed.), NATO ASI Series, pp. 133–166, Kluwer Academic Press, 1998. [4] A. G. Wilson and R. P. Adams, “Gaussian process kernels for pattern discovery and extrapolation,” in Proc. of International Conference on Machine Learning, 2013. [5] D. Duvenaud, J. R. Lloyd, R. Grosse, J. B. Tenenbaum, and Z. Ghahramani, “Structure discovery in nonparametric regression through compositional kernel search,” in Proc. of International Conference on Machine Learning, pp. 1166–1174, 2013. [6] D. Duvenaud, H. Nickisch, and C. E. Rasmussen, “Additive Gaussian processes,” in Advances in Neural Information Processing Systems 24, pp. 226–234, 2011. [7] M. G¨onen and E. Alpaydin, “Multiple kernel learning algorithms,” The Journal of Machine Learning Research, vol. 12, pp. 2211–2268, 2011. [8] F. Tobar, S.-Y. Kung, and D. Mandic, “Multikernel least mean square algorithm,” IEEE Trans. on Neural Networks and Learning Systems, vol. 25, no. 2, pp. 265–277, 2014. [9] R. E. Turner, Statistical Models for Natural Sounds. PhD thesis, Gatsby Computational Neuroscience Unit, UCL, 2010. [10] R. Turner and M. Sahani, “Time-frequency analysis as probabilistic inference,” IEEE Trans. on Signal Processing, vol. 62, no. 23, pp. 6171–6183, 2014. [11] B. Oksendal, Stochastic Differential Equations. Springer, 2003. [12] A. V. Oppenheim and A. S. Willsky, Signals and Systems. Prentice-Hall, 1997. [13] C. Archambeau, D. Cornford, M. Opper, and J. Shawe-Taylor, “Gaussian process approximations of stochastic differential equations,” Journal of Machine Learning Research Workshop and Conference Proceedings, vol. 1, pp. 1–16, 2007. [14] S. F. Gull, “Developments in maximum entropy data analysis,” in Maximum Entropy and Bayesian Methods (J. Skilling, ed.), vol. 36, pp. 53–71, Springer Netherlands, 1989. [15] B. Sch¨olkopf and A. J. Smola, Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, 2001. [16] T. P. Minka, “Deriving quadrature rules from Gaussian processes,” tech. rep., Statistics Department, Carnegie Mellon University, 2000. [17] A. H. Jazwinski, Stochastic Processes and Filtering Theory. New York, Academic Press., 1970. [18] M. K. Titsias, “Variational learning of inducing variables in sparse Gaussian processes,” in Proc. of International Conference on Artificial Intelligence and Statistics, pp. 567–574, 2009. [19] A. Figueiras-Vidal and M. L´azaro-Gredilla, “Inter-domain Gaussian processes for sparse inference using inducing features,” in Advances in Neural Information Processing Systems, pp. 1087–1095, 2009. [20] A. G. d. G. Matthews, J. Hensman, R. E. Turner, and Z. Ghahramani, “On sparse variational methods and the Kullback-Leibler divergence between stochastic processes,” arXiv preprint arXiv:1504.07027, 2015. [21] D. J. C. MacKay, Information Theory, Inference, and Learning Algorithms. Cambridge University Press, 2003. [22] M. K. Titsias and N. D. Lawrence, “Bayesian Gaussian process latent variable model,” in Proc. of International Conference on Artificial Intelligence and Statistics, pp. 844–851, 2010. [23] R. E. Turner and M. Sahani, “Two problems with variational expectation maximisation for time-series models,” in Bayesian time series models (D. Barber, T. Cemgil, and S. Chiappa, eds.), ch. 5, pp. 109–130, Cambridge University Press, 2011. [24] Y. Qi, T. Minka, and R. W. Picara, “Bayesian spectrum estimation of unevenly sampled nonstationary data,” in Proc. of IEEE ICASSP, vol. 2, pp. II–1473–II–1476, 2002. [25] D. B. Percival and A. T. Walden, Spectral Analysis for Physical Applications. Cambridge University Press, 1993. Cambridge Books Online. [26] T. D. Bui and R. E. Turner, “Tree-structured Gaussian process approximations,” in Advances in Neural Information Processing Systems 27, pp. 2213–2221, 2014. 9 | 2015 | 234 |
5,741 | Improved Iteration Complexity Bounds of Cyclic Block Coordinate Descent for Convex Problems Ruoyu Sun∗, Mingyi Hong† ‡ Abstract The iteration complexity of the block-coordinate descent (BCD) type algorithm has been under extensive investigation. It was recently shown that for convex problems the classical cyclic BCGD (block coordinate gradient descent) achieves an O(1/r) complexity (r is the number of passes of all blocks). However, such bounds are at least linearly depend on K (the number of variable blocks), and are at least K times worse than those of the gradient descent (GD) and proximal gradient (PG) methods. In this paper, we close such theoretical performance gap between cyclic BCD and GD/PG. First we show that for a family of quadratic nonsmooth problems, the complexity bounds for cyclic Block Coordinate Proximal Gradient (BCPG), a popular variant of BCD, can match those of the GD/PG in terms of dependency on K (up to a log2(K) factor). Second, we establish an improved complexity bound for Coordinate Gradient Descent (CGD) for general convex problems which can match that of GD in certain scenarios. Our bounds are sharper than the known bounds as they are always at least K times worse than GD. Our analyses do not depend on the update order of block variables inside each cycle, thus our results also apply to BCD methods with random permutation (random sampling without replacement, another popular variant). 1 Introduction Consider the following convex optimization problem min f(x) = g(x1, · · · , xK) + K k=1 hk(xk), s.t. xk ∈Xk, ∀k = 1, · · · K, (1) where g : X →R is a convex smooth function; h : X →R is a convex lower semi-continuous possibly nonsmooth function; xk ∈Xk ⊆RN is a block variable. A very popular method for solving this problem is the so-called block coordinate descent (BCD) method [5], where each time a single block variable is optimized while the rest of the variables remain fixed. Using the classical cyclic block selection rule, the BCD method can be described below. Algorithm 1: The Cyclic Block Coordinate Descent (BCD) At each iteration r + 1, update the variable blocks by: x(r) k ∈min xk∈Xk g xk, w(r) −k + hk(xk), k = 1, · · · , K. (2) ∗Department of Management Science and Engineering, Stanford University, Stanford, CA. ruoyu@stanford.edu †Department of Industrial & Manufacturing Systems Engineering and Department of Electrical & Computer Engineering, Iowa State University, Ames, IA, mingyi@iastate.edu ‡The authors contribute equally to this work. 1 where we have used the following short-handed notations: w(r) k := x(r) 1 , · · · , x(r) k−1, x(r−1) k , x(r−1) k+1 , · · · , x(r−1) K , k = 1, · · · , K, w(r) −k := x(r) 1 , · · · , x(r) k−1, x(r−1) k+1 , · · · , x(r−1) K , k = 1, · · · , K, x−k := [x1, · · · , xk−1, xk+1, · · · , xK] . The convergence analysis of the BCD has been extensively studied in the literature, see [5, 14, 19, 15, 4, 7, 6, 10, 20]. For example it is known that for smooth problems (i.e. f is continuous differentiable but possibly nonconvex, h = 0), if each subproblem has a unique solution and g is non-decreasing in the interval between the current iterate and the minimizer of the subproblem (one special case is per-block strict convexity), then every limit point of {x(r)} is a stationary point [5, Proposition 2.7.1]. The authors of [6, 19] have derived relaxed conditions on the convergence of BCD. In particular, when problem (1) is convex and the level sets are compact, the convergence of the BCD is guaranteed without requiring the subproblems to have unique solutions [6]. Recently Razaviyayn et al [15] have shown that the BCD converges if each subproblem (2) is solved inexactly, by way of optimizing certain surrogate functions. Luo and Tseng in [10] have shown that when problem (1) satisfies certain additional assumptions such as having a smooth composite objective and a polyhedral feasible set, then BCD converges linearly without requiring the objective to be strongly convex. There are many recent works on showing iteration complexity for randomized BCGD (block coordinate gradient descent), see [17, 12, 8, 16, 9] and the references therein. However the results on the classical cyclic BCD is rather scant. Saha and Tewari [18] show that the cyclic BCD achieves sublinear convergence for a family of special LASSO problems. Nutini et al [13] show that when the problem is strongly convex, unconstrained and smooth, BCGD with certain Gauss-Southwell block selection rule could be faster than the randomized rule. Recently Beck and Tetruashvili show that cyclic BCGD converges sublinearly if the objective is smooth. Subsequently Hong et al in [7] show that such sublinear rate not only can be extended to problems with nonsmooth objective, but is true for a large family of BCD-type algorithm (with or without per-block exact minimization, which includes BCGD as a special case). When each block is minimized exactly and when there is no per-block strong convexity, Beck [2] proves the sublinear convergence for certain 2-block convex problem (with only one block having Lipschitzian gradient). It is worth mentioning that all the above results on cyclic BCD can be used to prove the complexity for a popular randomly permuted BCD in which the blocks are randomly sampled without replacement. To illustrate the rates developed for the cyclic BCD algorithm, let us define X∗to be the optimal solution set for problem (1), and define the constant R0 := max x∈X max x∗∈X∗ ∥x −x∗∥| f(x) ≤f(x(0)) . (3) Let us assume that hk(xk) ≡0, Xk = RN, ∀k for now, and assume that g(·) has Lipschitz continuous gradient: ∥∇g(x) −∇g(z)∥≤L∥x −z∥, ∀x, z ∈X. (4) Also assume that g(·, x−k) has Lipschitz continuous gradient with respect to each xk, i.e., ∥∇kg(xk, x−k) −∇kg(vk, x−k)∥≤Lk∥xk −vk∥, ∀x, v ∈X, ∀k. (5) Let Lmax := maxk Lk and Lmin := mink Lk. It is known that the cyclic BCPG has the following iteration complexity [4, 7] 1 Δ(r) BCD := f(x(r)) −f ∗≤CLmax(1 + KL2/L2 min)R2 0 1 r , ∀r ≥1, (6) where C > 0 is some constant independent of problem dimension. Similar bounds are provided for cyclic BCD in [7, Theorem 6.1]. In contrast, it is well known that when applying the classical 1Note that the assumptions made in [4] and [7] are slightly different, but the rates derived in both cases have similar dependency on the problem dimension K. 2 gradient descent (GD) method to problem (1) with the constant stepsize 1/L, we have the following rate estimate [11, Corollary 2.1.2] Δ(r) GD := f(x(r)) −f(x∗) ≤2∥x(0) −x∗∥2L r + 4 ≤2R2 0L r + 4 , ∀r ≥1, ∀x∗∈X∗. (7) Note that unlike (6), here the constant in front of the 1/(r + 4) term is independent of the problem dimension. In fact, the ratio of the bound given in (6) and (7) is CLmax L (1 + KL2/L2 min)r + 4 r which is at least in the order of K. For big data related problems with over millions of variables, a multiplicative constant in the order of K can be a serious issue. In a recent work by Saha and Tewari [18], the authors show that for a LASSO problem with special data matrix, the rate of cyclic BCD (with special initialization) is indeed K-independent. Unfortunately, such a result has not yet been extended to any other convex problems. An open question posed by a few authors [4, 3, 18] are: is such a K factor gap intrinsic to the cyclic BCD or merely an artifact of the existing analysis? 2 Improved Bounds of Cyclic BCPG for Nonsmooth Quadratic Problem In this section, we consider the following nonsmooth quadratic problem min f(x) := 1 2 K k=1 Akxk −b 2 + K k=1 hk(xk), s.t. xk ∈Xk, ∀k (8) where Ak ∈RM×N; b ∈RM; xk ∈RN is the kth block coordinate; hk(·) is the same as in (1). Note the blocks are assumed to have equal dimension for simplicity of presentation. Define A := [A1, · · · , Ak] ∈RM×KN. For simplicity, we have assumed that all the blocks have the same size. Problem (8) includes for example LASSO and group LASSO as special cases. We consider the following cyclic BCPG algorithm. Algorithm 2: The Cyclic Block Coordinate Proximal Gradient (BCPG) At each iteration r + 1, update the variable blocks by: x(r+1) k = arg min xk∈Xk g(w(r+1) k ) + ∇kg w(r+1) k , xk −x(r) k + Pk 2 xk −x(r) k 2 + hk(xk) (9) Here Pk is the inverse of the stepsize for xk, which satisfies Pk ≥λmax AT k Ak
= Lk, ∀k. (10) Define Pmax := maxk Pk and Pmin = mink Pk. Note that for the least square problem (smooth quadratic minimization, i.e. hk ≡0, ∀k), BCPG reduces to the widely used BCGD method. The optimality condition for the kth subproblem is given by ∇kg(w(r+1) k ) + Pk(x(r+1) k −x(r) k ), xk −x(r+1) k + hk(xk) −hk(x(r+1) k ) ≥0, ∀xk ∈Xk. (11) In what follows we show that the cyclic BCPG for problem (8) achieves a complexity bound that only dependents on log2(NK), and apart from such log factor it is at least K times better than those known in the literature. Our analysis consists of the following three main steps: 1. Estimate the descent of the objective after each BCPG iteration; 2. Estimate the cost yet to be minimized (cost-to-go) after each BCPG iteration; 3. Combine the above two estimates to obtain the final bound. First we show that the BCPG achieves the sufficient descent. 3 Lemma 2.1. We have the following estimate of the descent when using the BCPG: f(x(r)) −f(x(r+1)) ≥ K k=1 Pk 2 ∥x(r+1) k −x(r) k ∥2. (12) Proof. We have the following series of inequalities f(x(r)) −f(x(r+1)) = K k=1 f(w(r+1) k ) −f(w(r+1) k+1 ) ≥ K k=1 f(w(r+1) k )− g(w(r+1) k ) + hk(x(r+1) k ) + ∇kg(w(r+1) k ), x(r+1) k −x(r) k + Pk 2 x(r+1) k −x(r) k 2 = K k=1 hk(x(r) k ) −hk(x(r+1) k ) − ∇kg w(r+1) k , x(r+1) k −x(r) k + Pk 2 x(r+1) k −x(r) k 2 ≥ K k=1 Pk 2 ∥x(r+1) k −x(r) k ∥2. where the second inequality uses the optimality condition (11). Q.E.D. To proceed, let us introduce two matrices P and A given below, which have dimension K × K and MK × NK, respectively P := ⎡ ⎢⎢⎣ P1 0 0 · · · 0 0 0 P2 0 · · · 0 0 ... ... ... · · · ... ... 0 0 0 · · · 0 PK ⎤ ⎥⎥⎦, A := ⎡ ⎢⎢⎣ A1 0 0 · · · 0 0 0 A2 0 · · · 0 0 ... ... ... · · · ... ... 0 0 0 · · · 0 AK ⎤ ⎥⎥⎦. By utilizing the definition of Pk in (10) we have the following inequalities (the second inequality comes from [12, Lemma 1]) P ⊗IN ⪰A T A, K A T A ⪰AT A (13) where IN is the N × N identity matrix and the notation “⊗” denotes the Kronecker product. Next let us estimate the cost-to-go. Lemma 2.2. We have the following estimate of the optimality gap when using the BCPG: Δ(r+1) : = f(x(r+1)) −f(x∗) ≤R0log(2NK) L/ Pmin + Pmax (x(r+1) −x(r))( P 1/2 ⊗IN) (14) Our third step combines the previous two steps and characterizes the iteration complexity. This is the main result of this section. Theorem 2.1. The iteration complexity of using BCPG to solve (8) is given below. 1. When the stepsizes are chosen conservatively as Pk = L, ∀k, we have Δ(r+1) ≤3 max Δ0, 4 log2(2NK)L R2 0 r + 1 (15) 2. When the stepsizes are chosen as Pk = λmax(AT k Ak) = Lk, ∀k. Then we have Δ(r+1) ≤3 max Δ0, 2 log2(2NK) Lmax + L2 Lmin R2 0 r + 1 (16) In particular, if the problem is smooth and unconstrained, i.e., when h ≡0, and Xk = RN, ∀k, then we have Δ(r+1) ≤3 max L, 2 log2(2NK) Lmax + L2 Lmin R2 0 r + 1. (17) 4 We comment on the bounds derived in the above theorem. The bound for BCPG with uniform “conservative” stepsize 1/L has the same order as the GD method, except for the log2(2NK) factor (cf. (7)). In [4, Corollary 3.2], it is shown that the BCGD with the same “conservative” stepsize achieves a sublinear rate with a constant of 4L(1 + K)R2 0, which is about K/(3 log2(2NK)) times worse than our bound. Further, our bound has the same dependency on L (i.e., 12L v.s. L/2) as the one derived in [18] for BCPG with a “conservative” stepsize to solve an ℓ1 penalized quadratic problem with special data matrix, but our bound holds true for a much larger class of problems (i.e., all quadratic nonsmooth problem in the form of (8)). However, in practice such conservative stepsize is slow (compared with BCPG with Pk = Lk, for all k) hence is rarely used. The rest of the bounds derived in Theorem 2.1 is again at least K/ log2(2NK) times better than existing bounds of cyclic BCPG. For example, when the problem is smooth and unconstrained, the ratio between our bound (17) and the bound (6) is given by 6R2 0 log2(2NK)(L2/Lmin + Lmax) CLmax(1 + KL2/L2 min)R2 0 ≤6 log2(2NK)(1 + L2/(LminLmax)) C(1 + KL2/L2 min) = O(log2(2NK)/K) (18) where in the last inequality we have used the fact that Lmax/Lmin ≥1. For unconstrained smooth problems, let us compare the bound derived in the second part of Theorem 2.1 (stepsize Pk = Lk, ∀k) with that of the GD (7). If L = KLk for all k (problem badly conditioned), our bound is about K log2(2NK) times worse than that of the GD. This indicates a counter-intuitive phenomenon: by choosing conservative stepsize Pk = L, ∀k the iteration complexity of BCGD is K times better compared with choosing a more aggressive stepzise Pk = Lk, ∀k. It also indicates that the factor L/Lmin may hide an additional factor of K. 3 Iteration Complexity for General Convex Problems In this section, we consider improved iteration complexity bounds of BCD for general unconstrained smooth convex problems. We prove a general iteration complexity result, which includes a result of Beck et al. [4] as a special case. Our analysis for the general case also applies to smooth quadratic problems, but is very different from the analysis in previous sections for quadratic problems. For simplicity, we only consider the case N = 1 (scalar blocks); the generalization to the case N > 1 is left as future work. Let us assume that the smooth objective g has second order derivatives Hij(x) := ∂2g ∂xi∂xj (x). When each block is just a coordinate, we assume |Hij(x)| ≤Lij, ∀i, j. Then Li = Lii and Lij ≤√Li Lj. For unconstrained smooth convex problems with scalar block variables, the BCPG iteration reduces to the following coordinate gradient descent (CGD) iteration: x(r) = w(r) 1 d1 −→w(r) 2 d2 −→w(r) 3 −→. . . dK −→w(r) K+1 = x(r+1), (19) where dk = ∇kg(w(r) k ) and w(r) k dk −→w(r) k+1 means that w(r) k+1 is a linear combination of w(r) k and dkek (ek is the k-th block unit vector). In the following theorem, we provide an iteration complexity bound for the general convex problem. The proof framework follows the standard three-step approach that combines sufficient descent and cost-to-go estimate; nevertheless, the analysis of the sufficient descent is very different from the methods used in the previous sections. The intuition is that CGD can be viewed as an inexact gradient descent method, thus the amount of descent can be bounded in terms of the norm of the full gradient. It would be difficult to further tighten this bound if the goal is to obtain a sufficient descent based on the norm of the full gradient. Having established the sufficient descent in terms of the full gradient ∇g(x(r)), we can easily prove the iteration complexity result, following the standard analysis of GD (see, e.g. [11, Theorem 2.1.13]). Theorem 3.1. For CGD with Pk ≥Lmax, ∀k, we have g(x(r)) −g(x∗) ≤2 Pmax + min{KL2, ( k Lk)2} Pmin R2 0 r , ∀r ≥1. (20) 5 Proof. Since wr k+1 and wr k only differ by the k-th block, and ∇kg is Lipschitz continuous with Lipschitz constant Lk, we have 2 g(wr k+1) ≤g(wr k) + ⟨∇kg(wr k), wr k+1 −wr k⟩+ Lk 2 ∥wr k+1 −wr k∥2 =g(wr k) −2Pk −Lk 2P 2 k ∥∇kg(wr k)∥2 ≤g(wr k) − 1 2Pk ∥∇kg(wr k)∥2, (21) where the last inequality is due to Pk ≥Lk. The amount of decrease can be estimated as g(xr) −g(xr+1) = r k=1 [g(wr k) −g(wr k+1)] ≥ r k=1 1 2Pk ∥∇kg(wr k)∥2. (22) Since wr k = xr − 1 P1 d1, . . . , 1 Pk−1 dk−1, 0, . . . , 0 T , by the mean-value theorem, there must exist ξk such that ∇kg(xr) −∇kg(wr k) = ∇(∇kg)(ξk) · (xr −wr k) = ∂2g ∂xk∂x1 (ξk), . . . , ∂2g ∂xk∂xk−1 (ξk), 0, . . . , 0 1 P1 d1, . . . , 1 Pk−1 dk−1, 0, . . . , 0 T = 1 √P1 Hk1(ξk), . . . , 1 √Pk−1 Hk,k−1(ξk), 0, . . . , 0 1 √P1 d1, . . . , 1 √ PK dK T , (23) where Hij(x) = ∂2g ∂xi∂xj (x) is the second order derivative of g. Then ∇kg(xr) = ∇kg(xr) −∇kg(wr k) + ∇kg(wr k) = 1 √P1 Hk1(ξk), . . . , 1 √Pk−1 Hk,k−1(ξk), 0, . . . , 0 1 √P1 d1, . . . , 1 √ PK dK T + dk = 1 √P1 Hk1(ξk), . . . , 1 √Pk−1 Hk,k−1(ξk), √ Pk, 0, . . . , 0 1 √P1 d1, . . . , 1 √ PK dK T = vT k d, (24) where we have defined d := 1 √P1 d1, . . . , 1 √PK dK T , vk := 1 √P1 Hk1(ξk), . . . , 1 Pk−1 Hk,k−1(ξk), Pk, . . . , 0 . (25) Let V := ⎡ ⎣ vT 1 . . . vT K ⎤ ⎦= ⎡ ⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣ √P1 0 0 . . . 0 0 1 √P1 H21(ξ2) √P2 0 . . . 0 0 1 √P1 H31(ξ3) 1 √P2 H32(ξ3) √P3 . . . 0 0 1 √P1 H41(ξ4) 1 √P2 H42(ξ4) 1 √P3 H43(ξ4) ... 0 0 ... ... ... ... ... ... 1 √P1 HK1(ξK) 1 √P2 HK2(ξK) 1 √P3 HK3(ξK) . . . 1 √ PK−1 HK,K−1(ξK) √PK ⎤ ⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦ (26) 2 A stronger bound is g(wr k+1) ≤g(wr k) − 1 2Pk ∥∇kg(wr k)∥2, where ˆPk = P 2 k 2Pk−Lk ≤Pk, but since Pk ≤2Pk −Lk ≤2Pk, the improvement ratio of using this stronger bound is no more than a factor of 2. 6 Therefore, we have ∥∇g(xr)∥2 = k ∥∇kg(xr)∥2 (24) = k ∥vT k d∥2 = ∥V d∥2 ≤∥V ∥2∥d∥2 = ∥V ∥2 k 1 Pk ∥∇kg(wr k)∥2. Combining with (22), we get g(xr) −g(xr+1) ≥ k 1 2Pk ∥∇kg(wr k)∥2 ≥ 1 2∥V ∥2 ∥∇g(xr)∥2. (27) Let D ≜Diag(P1, . . . , PK) and let H(ξ) be defined as H(ξ) := ⎡ ⎢⎢⎢⎢⎣ 0 0 0 . . . 0 0 H21(ξ2) 0 0 . . . 0 0 H31(ξ3) H32(ξ3) 0 . . . 0 0 ... ... ... ... ... ... HK1(ξK) HK2(ξK) HK3(ξK) . . . HK,K−1(ξK) 0 ⎤ ⎥⎥⎥⎥⎦ . (28) Then V = D1/2 + H(ξ)D−1/2, which implies ∥V ∥2 = ∥D1/2 + H(ξ)D−1/2∥2 ≤2(∥D1/2∥2 + ∥H(ξ)D−1/2∥2) ≤2 Pmax + ∥H(ξ)∥2 Pmin . Plugging into (27), we obtain g(x(r)) −g(x(r+1)) ≥1 2 1 Pmax + ∥H(ξ)∥2 Pmin ∥∇g(x(r))∥2. (29) From the fact that Hkj(ξk) is a scalar bounded above by |Hkj(ξk)| ≤Lkj ≤ LkLj, thus ∥H∥2 ≤∥H∥2 F = k<j |Hkj(ξk)|2 ≤ k<j LkLj ≤( k Lk)2. (30) We provide the second bound of ∥H∥below. Let Hk denote the k-th row of H, then ∥Hk∥≤L. Therefore, we have ∥H∥2 ≤∥H∥2 F = k ∥Hk∥2 ≤ k L2 = KL2. Combining this bound and (30), we obtain that ∥H∥2 ≤min{KL2, ( k Lk)2} ≜β2. Denote ω = 1 2 1 Pmax+ β2 Pmin , then (29) becomes g(x(r)) −g(x(r+1)) ≥ω∥∇g(x(r))∥2, ∀r. (31) This relation also implies g(x(r)) ≤g(x(0)), thus by the definition of R0 in (3) we have ∥x(r) − x∗∥≤R0. By the convexity of g and the Cauchy-Schwartz inequality, we have g(x(r)) −g(x∗) ≤⟨∇g(x(r)), x(r) −x∗⟩≤∥∇g(x(r))∥R0. Combining with (31), we obtain g(x(r)) −g(x(r+1)) ≥ω R2 0 (g(x(r)) −g(x∗))2. Let Δ(r) = g(x(r)) −g(x∗), we obtain Δ(r) −Δ(r+1) ≥ω R2 0 Δ(r). Then we have 1 Δ(r+1) ≥ 1 Δ(r) + ω R2 0 Δ(r) Δ(r+1) ≥ 1 Δ(r) + ω R2 0 . 7 Summarizing the inequalities, we get 1 Δ(r+1) ≥ 1 Δ(0) + ω R2 0 (r + 1) ≥ω R2 0 (r + 1), which leads to Δ(r+1) = g(x(r+1)) −g(x∗) ≤1 ω R2 0 r + 1 = 2(Pmax + β2 Pmin ) R2 0 r + 1, where β2 = min{KL2, ( k Lk)2}. This completes the proof. Q.E.D. Let us compare this bound with the bound derived in [4, Theorem 3.1] (replacing the denominator r + 8/K by r), which is g(xr) −g(x∗) ≤4 Pmax + Pmax Pmin KL2 Pmin R2 r . (32) In our new bound, besides reducing the coefficient from 4 to 2 and removing the factor Pmax Pmin , we improve KL2 to min{KL2, ( k Lk)2}. Neither of the two bounds KL2 and ( k Lk)2 implies the other: when L = Lk, ∀k the new bound ( k Lk)2 is K times larger; when L = KLk, ∀k or L = L1 > L2 = · · · = LK = 0 the new bound is K times smaller. In fact, when L = KLk, ∀k, our new bound is K times better than the bound in [4] for either Pk = Lk or Pk = L. For example, when Pk = L, ∀k, the bound in [4] becomes O( KL r ), while our bound is O( L r ), which matches GD (listed in Table 1 below). Another advantage of the new bound ( k Lk)2 is that it does not increase if we add an artificial block xK+1 and perform CGD for function ˜g(x, xk+1) = g(x); in contrast, the existing bound KL2 will increase to (K + 1)L2, even though the algorithm does not change at all. We have demonstrated that our bound can match GD in some cases, but can possibly be K times worse than GD. An interesting question is: for general convex problems can we obtain an O( L r ) bound for cyclic BCGD, matching the bound of GD? Removing the K-factor in (32) will lead to an O( L r ) bound for conservative stepsize Pk = L no matter how large Lk and L are. We conjecture that an O( L r ) bound for cyclic BCGD cannot be achieved for general convex problems. That being said, we point out that the iteration complexity of cyclic BCGD may depend on other intrinsic parameters of the problem such as {Lk}k and, possibly, third order derivatives of g. Thus the question of finding the best iteration complexity bound of the form O(h(K) L r ), where h(K) is a function of K, may not be the right question to ask for BCD type algorithms. 4 Conclusion In this paper, we provide new analysis and improved complexity bounds for cyclic BCD-type methods. For convex quadratic problems, we show that the bounds are O( L r ), which is independent of K (except for a mild log2(2K) factor) and is about Lmax/L + L/Lmin times worse than those for GD/PG. By a simple example we show that it is not possible to obtain an iteration complexity O(L/(Kr)) for cyclic BCPG. For illustration, the main results of this paper in several simple settings are summarized in the table below. Note that different ratios of L over Lk can lead to quite different comparison. Table 1: Comparison of Various Iteration Complexity Results Lip-constant Diagonal Hessian Li = L Full Hessian Li = L K Full Hessian Li = L K 1/Stepsize Pi = L Large stepsize Pi = L K Small stepsize Pi = L GD L/r N/A L/r Random BCGD L/r L/(Kr) L/r Cyclic BCGD [4] KL/r K2L/r KL/r Cyclic CGD, Cor 3.1 KL/r KL/r L/r Cyclic BCGD (QP) log2(2K)L/r log2(2K)KL/r log2(2K)L/r 8 References [1] J. R. Angelos, C. C. Cowen, and S. K. Narayan. Triangular truncation and finding the norm of a hadamard multiplier. Linear Algebra and its Applications, 170:117 – 135, 1992. [2] A. Beck. On the convergence of alternating minimization with applications to iteratively reweighted least squares and decomposition schemes. SIAM Journal on Optimization, 25(1):185–209, 2015. [3] A. Beck, E. Pauwels, and S. Sabach. The cyclic block coordinate gradient method for convex optimization problems. 2015. Preprint, available on arXiv:1502.03716v1. [4] A. Beck and L. Tetruashvili. On the convergence of block coordinate descent type methods. SIAM Journal on Optimization, 23(4):2037–2060, 2013. [5] D. P. Bertsekas. Nonlinear Programming, 2nd ed. Athena Scientific, Belmont, MA, 1999. [6] L. Grippo and M. Sciandrone. On the convergence of the block nonlinear Gauss-Seidel method under convex constraints. Operations Research Letters, 26:127–136, 2000. [7] M. Hong, X. Wang, M. Razaviyayn, and Z.-Q. Luo. Iteration complexity analysis of block coordinate descent methods. 2013. Preprint, available online arXiv:1310.6957. [8] Z. Lu and L. Xiao. On the complexity analysis of randomized block-coordinate descent methods. 2013. accepted by Mathematical Programming. [9] Z. Lu and L. Xiao. Randomized block coordinate non-monotone gradient method for a class of nonlinear programming. 2013. Preprint. [10] Z.-Q. Luo and P. Tseng. On the convergence of the coordinate descent method for convex differentiable minimization. Journal of Optimization Theory and Application, 72(1):7–35, 1992. [11] Y. Nesterov. Introductory lectures on convex optimization: A basic course. Springer, 2004. [12] Y. Nesterov. Efficiency of coordiate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [13] J. Nutini, M. Schmidt, I. H. Laradji, M. Friedlander, and H. Koepke. Coordinate descent converges faster with the Gauss-Southwell rule than random selection. In the Proceeding of the 30th International Conference on Machine Learning (ICML), 2015. [14] M. J. D. Powell. On search directions for minimization algorithms. Mathematical Programming, 4:193–201, 1973. [15] M. Razaviyayn, M. Hong, and Z.-Q. Luo. A unified convergence analysis of block successive minimization methods for nonsmooth optimization. SIAM Journal on Optimization, 23(2):1126–1153, 2013. [16] M. Razaviyayn, M. Hong, Z.-Q. Luo, and J. S. Pang. Parallel successive convex approximation for nonsmooth nonconvex optimization. In the Proceedings of the Neural Information Processing (NIPS), 2014. [17] 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–38, 2014. [18] A. Saha and A. Tewari. On the nonasymptotic convergence of cyclic coordinate descent method. SIAM Journal on Optimization, 23(1):576–601, 2013. [19] P. Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 103(9):475–494, 2001. [20] Y. Xu and W. Yin. A block coordinate descent method for regularized multiconvex optimization with applications to nonnegative tensor factorization and completion. SIAM Journal on Imaging Sciences, 6(3):1758–1789, 2013. 9 | 2015 | 235 |
5,742 | Community Detection via Measure Space Embedding Mark Kozdoba The Technion, Haifa, Israel markk@tx.technion.ac.il Shie Mannor The Technion, Haifa, Israel shie@ee.technion.ac.il Abstract We present a new algorithm for community detection. The algorithm uses random walks to embed the graph in a space of measures, after which a modification of k-means in that space is applied. The algorithm is therefore fast and easily parallelizable. We evaluate the algorithm on standard random graph benchmarks, including some overlapping community benchmarks, and find its performance to be better or at least as good as previously known algorithms. We also prove a linear time (in number of edges) guarantee for the algorithm on a p, q-stochastic block model with where p ≥c · N −1 2 +ϵ and p −q ≥c′ q pN −1 2 +ϵ log N. 1 Introduction Community detection in graphs, also known as graph clustering, is a problem where one wishes to identify subsets of the vertices of a graph such that the connectivity inside the subset is in some way denser than the connectivity of the subset with the rest of the graph. Such subsets are referred to as communities, and it often happens in applications that if two vertices belong to the same community, they have similar application-related qualities. This in turn may allow for a higher level analysis of the graph, in terms of communities instead of individual nodes. Community detection finds applications in a diversity of fields, such as social networks analysis, communication and traffic design, in biological networks, and, generally, in most fields where meaningful graphs can arise (see, for instance, [1] for a survey). In addition to direct applications to graphs, community detection can, for instance, be also applied to general Euclidean space clustering problems, by transforming the metric to a weighted graph structure (see [2] for a survey). Community detection problems come in different flavours, depending on whether the graph in question is simple, or weighted, or/and directed. Another important distinction is whether the communities are allowed to overlap or not. In the overlapping communities case, each vertex can belong to several subsets. A difficulty with community detection is that the notion of community is not well defined. Different algorithms may employ different formal notions of a community, and can sometimes produce different results. Nevertheless, there exist several widely adopted benchmarks – synthetic models and real-life graphs – where the ground truth communities are known, and algorithms are evaluated based on the similarity of the produced output to the ground truth, and based on the amount of required computations. On the theoretical side, most of the effort is concentrated on developing algorithms with guaranteed recovery of clusters for graphs generated from variants of the Stochastic Block Model (referred to as SBM in what follows, [1]). In this paper we present a new algorithm, DER (Diffusion Entropy Reducer, for reasons to be clarified later), for non-overlapping community detection. The algorithm is an adaptation of the k-means algorithm to a space of measures which are generated by short random walks from the nodes of the graph. The adaptation is done by introducing a certain natural cost on the space of the measures. As detailed below, we evaluate the DER on several benchmarks and find its performance to be as good or better than the best alternative method. In addition, we establish some theoretical guarantees 1 on its performance. While the main purpose of the theoretical analysis in this paper is to provide some insight into why DER works, our result is also one of a few results in the literature that show reconstruction in linear time. On the empirical side, we first evaluate our algorithm on a set of random graph benchmarks known as the LFR models, [3]. In [4], 12 other algorithms were evaluated on these benchmarks, and three algorithms, described in [5], [6] and [7], were identified, that exhibited significantly better performance than the others, and similar performance among themselves. We evaluate our algorithm on random graphs with the same parameters as those used in [4] and find its performance to be as good as these three best methods. Several well known methods, including spectral clustering [8], exhaustive modularity optimization (see [4] for details), and clique percolation [9], have worse performance on the above benchmarks. Next, while our algorithm is designed for non-overlapping communities, we introduce a simple modification that enables it to detect overlapping communities in some cases. Using this modification, we compare the performance of our algorithm to the performance of 4 overlapping community algorithms on a set of benchmarks that were considered in [10]. We find that in all cases DER performs better than all 4 algorithms. None of the algorithms evaluated in [4] and [3] has theoretical guarantees. On the theoretical side, we show that DER reconstructs with high probability the partition of the p, q-stochastic block model such that, roughly, p ≥N −1 2 , where N is the number of vertices, and p −q ≥c q pN −1 2 +ϵ log N (this holds in particular when p q ≥c′ > 1) for some constant c > 0. We show that for this reconstruction only one iteration of the k-means is sufficient. In fact, three passages over the set of edges suffice. While the cost function we introduce for DER will appear at first to have purely probabilistic motivation, for the purposes of the proof we provide an alternative interpretation of this cost in terms of the graph, and the arguments show which properties of the graph are useful for the convergence of the algorithm. Finally, although this is not the emphasis of the present paper, it is worth noting here that, as will be evident later, our algorithm can be trivially parallelalized. This seems to be a particularly nice feature since most other algorithms, including spectral clustering, are not easy to parallelalize and do not seem to have parallel implementations at present. The rest of the paper is organized as follows: Section 2 overviews related work and discusses relations to our results. In Section 3 we provide the motivation for the definition of the algorithm, derive the cost function and establish some basic properties. Section 4 we present the results on the empirical evaluation of the algorithm and Section 5 describes the theoretical guarantees and the general proof scheme. Some proofs and additional material are provided in the supplementary material. 2 Literature review Community detection in graphs has been an active research topic for the last two decades and generated a huge literature. We refer to [1] for an extensive survey. Throughout the paper, let G = (V, E) be a graph, and let P = P1, . . . , Pk be a partition of V . Loosely speaking, a partition P is a good community structure on G if for each Pi ∈P, more edges stay within Pi than leave Pi. This is usually quantified via some cost function that assigns larger scalars to partitions P that are in some sense better separated. Perhaps the most well known cost function is the modularity, which was introduced in [11] and served as a basis of a large number of community detection algorithms ([1]). The popular spectral clustering methods, [8]; [2], can also be viewed as a (relaxed) optimization of a certain cost (see [2]). Yet another group of algorithms is based on fitting a generative model of a graph with communities to a given graph. References [12]; [10] are two among the many examples. Perhaps the simplest generative model for non-overlapping communities is the stochastic block model, see [13],[1] which we now define: Let P = P1, . . . , Pk be a partition of V into k subsets. p, q-SBM is a distribution over the graphs on vertex set V , such that all edges are independent and for i, j ∈V , the edge (i, j) exists with probability p if i, j belong to the same Ps, and it exists with probability q otherwise. If q << p, the components Pi will be well separated in this model. We denote the number of nodes by N = |V | throughout the paper. 2 Graphs generated from SBMs can serve as a benchmark for community detection algorithms. However, such graphs lack certain desirable properties, such as power-law degree and community size distributions. Some of these issues were fixed in the benchmark models in [3]; [14], and these models are referred to as LFR models in the literature. More details on these models are given in Section 4. We now turn to the discussion of the theoretical guarantees. Typically results in this direction provide algorithms that can reconstruct,with high probability, the ground partition of a graph drawn from a variant of a p, q-SBM model, with some, possibly large, number of components k. Recent results include the works [15] and [16]. In this paper, however, we only analytically analyse the k = 2 case, and such that, in addition, |P1| = |P2|. For this case, the best known reconstruction result was obtained already in [17] and was only improved in terms of runtime since then. Namely, Bopanna’s result states that if p ≥c1 log N N and p −q ≥c2 log N N , then with high probability the partition is reconstructible. Similar bound can be obtained, for instance, from the approaches in [15]; [16], to name a few. The methods in this group are generally based on the spectral properties of adjacency (or related) matrices. The run time of these algorithms is non-linear in the size of the graph and it is not known how these algorithms behave on graphs not generated by the probabilistic models that they assume. It is generally known that when the graphs are dense (p of order of constant), simple linear time reconstruction algorithms exist (see [18]). The first, and to the best of our knowledge, the only previous linear time algorithm for non dense graphs was proposed in [18]. This algorithm works for p ≥c3(ϵ)N −1 2 +ϵ, for any fixed ϵ > 0. The approach of [18] was further extended in [19], to handle more general cluster sizes. These approaches approaches differ significantly from the spectrum based methods, and provide equally important theoretical insight. However, their empirical behaviour was never studied, and it is likely that even for graphs generated from the SBM, extremely high values of N would be required for the algorithms to work, due to large constants in the concentration inequalities (see the concluding remarks in [19]). 3 Algorithm Let G be a finite undirected graph with a vertex set V = {1, . . . , n}. Denote by A = {aij} the symmetric adjacency matrix of G, where aij ≥0 are edge weights, and for a vertex i ∈V , set di = P j aij to be the degree of i. Let D be an n × n diagonal matrix such that Dii = di, and set T = D−1A to be the transition matrix of the random walk on G. Set also pij = Tij. Finally, denote by π, π(i) = di P j dj the stationary measure of the random walk. A number of community detection algorithms are based on the intuition that distinct communities should be relatively closed under the random walk (see [1]), and employ different notions of closedness. Our approach also takes this point of view. For a fixed L ∈N, consider the following sampling process on the graph: Choose vertex v0 randomly from π, and perform L steps of a random walk on G, starting from v0. This results in a length L + 1 sequence of vertices, x1. Repeat the process N times independently, to obtain also x1, . . . , xN. Suppose now that we would like to model the sequences xs as a multinomial mixture model with a single component. Since each coordinate xs t is distributed according to π, the single component of the mixture should be π itself, when N grows. Now suppose that we would like to model the same sequences with a mixture of two components. Because the sequences are sampled from a random walk rather then independently from each other, the components need no longer be π itself, as in any mixture where some elements appear more often together then others. The mixture as above can be found using the EM algorithm, and this in principle summarizes our approach. The only additional step, as discussed above, is to replace the sampled random walks with their true distributions, which simplifies the analysis and also leads to somewhat improved empirical performance. We now present the DER algorithm for detecting the non-overlapping communities. Its input is the number of components to detect, k, the length of the walks L, an initialization partition P = 3 Algorithm 1 DER 1: Input: Graph G, walk length L, number of components k. 2: Compute the measures wi. 3: Initialize P1, . . . , Pk to be a random partition such that |Pi| = |V |/k for all i. 4: repeat 5: (1) For all s ≤k, construct µs = µPs. 6: (2) For all s ≤k, set Ps = i ∈V | s = argmax l D(wi, µl) . 7: until the sets Ps do not change {P1, . . . , Pk} of V into disjoint subsets. P would be usually taken to be a random partition of V into equally sized subsets. For t = 0, 1, . . . and a vertex i ∈V , denote by wt i the i-th row of the matrix T t. Then wt i is the distribution of the random walk on G, started at i, after t steps. Set wi = 1 L(w1 i + . . . + wL i ), which is the distribution corresponding to the average of the empirical measures of sequences x that start at i. For two probability measures ν, µ on V , set D(ν, µ) = X i∈V ν(i) log µ(i). Although D is not a metric, will act as a distance function in our algorithm. Note that if ν was an empirical measure, then, up to a constant, D would be just the log-likelihood of observing ν from independent samples of µ. For a subset S ⊂V , set πS to be the restriction of the measure π to S, and also set dS = P i∈S di to be the full degree of S. Let µS = 1 dS X i∈S diwi (1) denote the distribution of the random walk started from πS. The complete DER algorithm is described in Algorithm 1. The algorithm is essentially a k-means algorithm in a non-Euclidean space, where the points are the measures wi, each occurring with multiplicity di. Step (1) is the “means” step, and (2) is the maximization step. Let C = L X l=1 X i∈Pl di · D(wi, µl) (2) be the associated cost. As with the usual k-means, we have the following Lemma 3.1. Either P is unchanged by steps (1) and (2) or both steps (1) and (2) strictly increase the value of C. The proof is by direct computation and is deferred to the supplementary material. Since the number of configurations P is finite, it follows that DER always terminates and provides a “local maximum” of the cost C. The cost C can be rewritten in a somewhat more informative form. To do so, we introduce some notation first. Let X be a random variable on V , distributed according to measure π. Let Y a step of a random walk started at X, so that the distribution of Y given X = i is wi. Finally, for a partition P, let Z be the indicator variable of a partition, Z = s iff X ∈Ps. With this notation, one can write C = −dV · H(Y |Z) = dV (−H(Y ) + H(Z) −H(Z|Y )) , (3) 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 (a) Karate Club (b) Political Blogs where H are the full and conditional Shannon entropies. Therefore, DER algorithm can be interpreted as seeking a partition that maximizes the information between current known state (Z), and the next step from it (Y ). This interpretation gives rise to the name of the algorithm, DER, since every iteration reduces the entropy H(Y |Z) of the random walk, or diffusion, with respect to the partition. The second equality in (3) has another interesting interpretation. Suppose, for simplicity, that k = 2, with partition P1, P2. In general, a clustering algorithm aims to minimize the cut, the number of edges between P1 and P2. However, minimizing the number of edges directly will lead to situations where P1 is a single node, connected with one edge to the rest of the graph in P2. To avoid such situation, a relative, normalized version of a cut needs to be introduced, which takes into account the sizes of P1, P2. Every clustering algorithms has a way to resolve this issue, implicitly or explicitly. For DER, this is shown in second equality of (3). H(Z) is maximized when the components are of equal sizes (with respect to π), while H(Z|Y ) is minimized when the measures µPs are as disjointly supported as possible. As any k-means algorithm, DER’s results depend somewhat on its random initialization. All kmeans-like schemes are usually restarted several times and the solution with the best cost is chosen. In all cases which we evaluated we observed empirically that the dependence of DER on the initial parameters is rather weak. After two or three restarts it usually found a partition nearly as good as after 100 restarts. For clustering problems, however, there is another simple way to aggregate the results of multiple runs into a single partition, which slightly improves the quality of the final results. We use this technique in all our experiments and we provide the details in the Supplementary Material, Section A. We conclude by mentioning two algorithms that use some of the concepts that we use. The Walktrap, [20], similarly to DER constructs the random walks (the measures wi, possibly for L > 1) as part of its computation. However, Walktrap uses wi’s in a completely different way. Both the optimization procedure and the cost function are different from ours. The Infomap , [5], [21], has a cost that is related to the notion of information. It aims to minimize to the information required to transmit a random walk on G through a channel, the source coding is constructed using the clusters, and best clusters are those that yield the best compression. This does not seem to be directly connected to the maximum likelyhood motivated approach that we use. As with Walktrap, the optimization procedure of Infomap also completely differs from ours. 4 Evaluation In this section results of the evaluation of DER algorithm are presented. In Section 4.1 we illustrate DER on two classical graphs. Sections 4.2 and 4.3 contain the evaluation on the LFR benchmarks. 4.1 Basic examples When a new clustering algorithm is introduced, it is useful to get a general feel of it with some simple examples. Figure 1a shows the classical Zachary’s Karate Club, [22]. This graph has a 5 ground partition into two subsets. The partition shown in Figure 1a is a partition obtained from a typical run of DER algorithm, with k = 2, and wide range of L’s. (L ∈[1, 10] were tested). As is the case with many other clustering algorithms, the shown partition differs from the ground partition in one element, node 8 (see [1]). Figure 1b shows the political blogs graph, [23]. The nodes are political blogs, and the graph has an (undirected) edge if one of the blogs had a link to the other. There are 1222 nodes in the graph. The ground truth partition of this graph has two components - the right wing and left wing blogs. The labeling of the ground truth was partially automatic and partially manual, and both processes could introduce some errors. The run of DER reconstructs the ground truth partition with only 57 nodes missclassifed. The NMI (see the next section, Eq. (4)) to the ground truth partition is .74. The political blogs graphs is particularly interesting since it is an example of a graph for which fitting an SBM model to reconstruct the clusters produces results very different from the ground truth. To overcome the problem with SBM fitting on this graph, a degree sensitive version of SBM, DCBM, was introduced in [24]. That algorithm produces partition with NMI .75. Another approach to DCBM can be found in [25]. 4.2 LFR benchmarks The LFR benchmark model, [14], is a widely used extension of the stochastic block model, where node degrees and community sizes have power law distribution, as often observed in real graphs. An important parameter of this model is the mixing parameter µ ∈[0, 1] that controls the fraction of the edges of a node that go outside the node’s community (or outside all of node’s communities, in the overlapping case). For small µ, there will be a small number of edges going outside the communities, leading to disjoint, easily separable graphs, and the boundaries between communities will become less pronounced as µ grows. Given a set of communities P on a graph, and the ground truth set of communities Q, there are several ways to measure how close P is to Q. One standard measure is the normalized mutual information (NMI), given by: NMI(P, Q) = 2 I(P, Q) H(P) + H(Q), (4) where H is the Shannon entropy of a partition and I is the mutual information (see [1] for details). NMI is equal 1 if and only if the partitions P and Q coincide, and it takes values between 0 and 1 otherwise. When computed with NMI, the sets inside P, Q can not overlap. To deal with overlapping communities, an extension of NMI was proposed in [26]. We refer to the original paper for the definition, as the definition is somewhat lengthy. This extension, which we denote here as ENMI, was subsequently used in the literature as a measure of closeness of two sets of communities, event in the cases of disjoint communities. Note that most papers use the notation NMI while the metric that they really use is ENMI. Figure 2a shows the results of evaluation of DER for four cases: the size of a graph was either N = 1000 or N = 5000 nodes, and the size of the communities was restricted to be either between 10 to 50 (denoted S in the figures) or between 20 to 100 (denoted B). For each combination of these parameters, µ varied between 0.1 and 0.8. For each combination of graph size, community size restrictions as above and µ value, we generated 20 graphs from that model and run DER. To provide some basic intuition about these graphs, we note that the number of communities in the 1000S graphs is strongly concentrated around 40, and in 1000B, 5000S, and 5000B graphs it is around 25, 200 and 100 respectively. Each point in Figure 2a is a the average ENMI on the 20 corresponding graphs, with standard deviation as the error bar. These experiments correspond precisely to the ones performed in [4] (see Supplementary Material, Section Cfor more details). In all runs on DER we have set L = 5 and set k to be the true number of communities for each graph, as was done in [4] for the methods that required it. Therefore our Figure 2a can be compared directly with Figure 2 in [4]. From this comparison we see that DER and the two of the best algorithms identified in [4], Infomap [5] and RN [6], reconstruct the partition perfectly for µ ≤0.5, for µ = 0.6 DER’s reconstruction scores are between Infomap’s and RN’s, with values for all of the algorithms above 0.95, and for 6 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 µ 0.0 0.2 0.4 0.6 0.8 1.0 ENMI n1000S n1000B n5000S n5000B (a) DER, LFR benchmarks 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 µ 0.0 0.2 0.4 0.6 0.8 1.0 ENMI n1000S n1000B n5000S n5000B (b) Spectral Alg., LFR benchmarks µ = 0.7 DER has the best performance in two of the four cases. For µ = 0.8 all algorithms have score 0. We have also performed the same experiments with the standard version of spectral clustering, [8], because this version was not evaluated in [4]. The results are shown in Fig. 2b. Although the performance is generally good, the scores are mostly lower than those of DER, Infomap and RN. 4.3 Overlapping LFR benchmarks We now describe how DER can be applied to overlapping community detection. Observe that DER internally operates on measures µPs rather then subsets of the vertex set. Recall that µPs(i) is the probability that a random walk started from Ps will hit node i. We can therefore consider each i to be a member of those communities from which the probability to hit it is “high enough”. To define this formally, we first note that for any partition P, the following decomposition holds: π = k X s=1 π(Ps)µPs. (5) This follows from the invariance of π under the random walk. Now, given the out put of DER - the sets Ps and measures µPs set mi(s) = µPs(i)π(Ps) Pk t=1 µPt(i)π(Pt) = µPs(i)π(Ps) π(i) , (6) where we used (5) in the second equality. Then mi(s) is the probability that the walks started at Ps, given that it finished in i. For each i ∈V , set si = argmaxl mi(l) to be the most likely community given i. Then define the overlapping communities C1, . . . , Ck via Ct = i ∈V | mi(t) ≥1 2 · mi(si) . (7) The paper [10] introduces a new algorithm for overlapping communities detection and contains also an evaluation of that algorithm as well as of several other algorithms on a set of overlapping LFR benchmarks. The overlapping communities LFR model was defined in [3]. In Table 1 we present the ENMI results of DER runs on the N = 10000 graphs with same parameters as in [10], and also show the values obtained on these benchmarks in [10] (Figure S4 in [10]), for four other algorithms. The DER algorithm was run with L = 2, and k was set to the true number of communities. Each number is an average over ENMIs on 10 instances of graphs with a given set of parameters (as in [10]). The standard deviation around this average for DER was less then 0.02 in all cases. Variances for other algorithms are provided in [10]. For µ ≥0.6 all algorithms yield ENMI of less then 0.3. As we see in Table 1, DER performs better than all other algorithms in all the cases. We believe this indicates that DER together with equation (7) is a good choice for overlapping community detection in situations where community overlap between each two communities is sparse, as is the case in the LFR models considered above. Further discussion is provided in the Supplementary Material, Section D. 7 Table 1: Evaluation for Overlapping LFR. All values except DER are from [10] Alg. µ = 0 µ = 0.2 µ = 0.4 DER 0.94 0.9 0.83 SVI ([10]) 0.89 0.73 0.6 POI ([27]) 0.86 0.68 0.55 INF ([21]) 0.42 0.38 0.4 COP ([28]) 0.65 0.43 0.0 We conclude this section by noting that while in the non-overlapping case the models generated with µ = 0 result in trivial community detection problems, because in these cases communities are simply the connected components of the graph, this is no longer true in the overlapping case. As a point of reference, the well known Clique Percolation method was also evaluated in [10], in the µ = 0 case. The average ENMI for this algorithm was 0.2 (Table S3 in [10]). 5 Analytic bounds In this section we restrict our attention to the case L = 1 of the DER algorithm. Recall that the p, q-SBM model was defined in Section 2. We shall consider the model with k = 2 and such that |P1| = |P2|. We assume that the initial partition for the DER, denoted C1, C2 in what follows, is chosen as in step 3 of DER (Algorithm 1) - a random partition of V into two equal sized subsets. In this setting we have the following: Theorem 5.1. For every ϵ > 0 there exists C > 0 and c > 0 such that if p ≥C · N −1 2 +ϵ (8) and p −q ≥c q pN −1 2 +ϵ log N (9) then DER recovers the partition P1, P2 after one iteration, with probability φ(N) such that φ(N) → 1 when N →∞. Note that the probability in the conclusion of the theorem refers to a joint probability of a draw from the SBM and of an independent draw from the random initialization. The proof of the theorem has essentially three steps. First, we observe that the random initialization C1, C2 is necessarily somewhat biased, in the sense that C1 and C2 never divide P1 exactly into two halves. Specifically, ||C1 ∩P1| −|C2 ∩P1|| ≥N −1 2 −ϵ with high probability. Assume that C1 has the bigger half, |C1 ∩P1| > |C2 ∩P1|. In the second step, by an appropriate linearization argument we show that for a node i ∈P1, deciding whether D(wi, µC1) > D(wi, µC2) or vice versa amounts to counting paths of length two between i and |C1 ∩P1|. In the third step we estimate the number of these length two paths in the model. The fact that |C1 ∩P1| > |C2 ∩P1| + N −1 2 −ϵ will imply more paths to C1 ∩P1 from i ∈P1 and we will conclude that D(wi, µC1) > D(wi, µC2) for all i ∈P1 and D(wi, µC2) > D(wi, µC1) for all i ∈P2. The full proof is provided in the supplementary material. References [1] Santo Fortunato. Community detection in graphs. Physics Reports, 486(35):75 – 174, 2010. [2] Ulrike Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, 2007. [3] Andrea Lancichinetti and Santo Fortunato. Benchmarks for testing community detection algorithms on directed and weighted graphs with overlapping communities. Phys. Rev. E, 80(1):016118, 2009. [4] Santo Fortunato and Andrea Lancichinetti. Community detection algorithms: A comparative analysis. In Fourth International ICST Conference, 2009. 8 [5] M. Rosvall and C. T. Bergstrom. Maps of random walks on complex networks reveal community structure. Proc. Natl. Acad. Sci. USA, page 1118, 2008. [6] Peter Ronhovde and Zohar Nussinov. Multiresolution community detection for megascale networks by information-based replica correlations. Phys. Rev. E, 80, 2009. [7] Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre. Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10), 2008. [8] Andrew Y. Ng, Michael I. Jordan, and Yair Weiss. On spectral clustering: Analysis and an algorithm. In Advances in Neural Information Processing Systems 14, 2001. [9] Gergely Palla, Imre Der´enyi, Ill´es Farkas, and Tam´as Vicsek. Uncovering the overlapping community structure of complex networks in nature and society. Nature, 435, 2005. [10] Prem K Gopalan and David M Blei. Efficient discovery of overlapping communities in massive networks. Proceedings of the National Academy of Sciences, 110(36):14534–14539, 2013. [11] M. Girvan and M. E. J. Newman. Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 99(12):7821–7826, 2002. [12] MEJ Newman and EA Leicht. Mixture models and exploratory analysis in networks. Proceedings of the National Academy of Sciences, 104(23):9564, 2007. [13] Paul W. Holland, Kathryn B. Laskey, and Samuel Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109–137, 1983. [14] Andrea Lancichinetti, Santo Fortunato, and Filippo Radicchi. Benchmark graphs for testing community detection algorithms. Phys. Rev. E, 78(4), 2008. [15] Animashree Anandkumar, Rong Ge, Daniel Hsu, and Sham Kakade. A tensor spectral approach to learning mixed membership community models. In COLT, volume 30 of JMLR Proceedings, 2013. [16] Yudong Chen, S. Sanghavi, and Huan Xu. Improved graph clustering. Information Theory, IEEE Transactions on, 60(10):6440–6455, Oct 2014. [17] Ravi B. Boppana. Eigenvalues and graph bisection: An average-case analysis. In Foundations of Computer Science, 1987., 28th Annual Symposium on, pages 280–285, Oct 1987. [18] Anne Condon and Richard M. Karp. Algorithms for graph partitioning on the planted partition model. Random Struct. Algorithms, 18(2):116–140, 2001. [19] Ron Shamir and Dekel Tsur. Improved algorithms for the random cluster graph model. Random Struct. Algorithms, 31(4):418–449, 2007. [20] Pascal Pons and Matthieu Latapy. Computing communities in large networks using random walks. J. of Graph Alg. and App., 10:284–293, 2004. [21] Alcides Viamontes Esquivel and Martin Rosvall. Compression of flow can reveal overlappingmodule organization in networks. Phys. Rev. X, 1:021025, Dec 2011. [22] W. W. Zachary. An information flow model for conflict and fission in small groups. Journal of Anthropological Research, 33:452–473, 1977. [23] Lada A. Adamic and Natalie Glance. The political blogosphere and the 2004 U.S. election: Divided they blog. LinkKDD ’05, 2005. [24] Brian Karrer and M. E. J. Newman. Stochastic blockmodels and community structure in networks. Phys. Rev. E, 83, 2011. [25] Arash A. Amini, Aiyou Chen, Peter J. Bickel, and Elizaveta Levina. Pseudo-likelihood methods for community detection in large sparse networks. 41, 2013. [26] Andrea Lancichinetti, Santo Fortunato, and Jnos Kertsz. Detecting the overlapping and hierarchical community structure in complex networks. New Journal of Physics, 11(3):033015, 2009. [27] Brian Ball, Brian Karrer, and M. E. J. Newman. Efficient and principled method for detecting communities in networks. Phys. Rev. E, 84:036103, Sep 2011. [28] Steve Gregory. Finding overlapping communities in networks by label propagation. New Journal of Physics, 12(10):103018, 2010. 9 | 2015 | 236 |
5,743 | Color Constancy by Learning to Predict Chromaticity from Luminance Ayan Chakrabarti Toyota Technological Institute at Chicago 6045 S. Kenwood Ave., Chicago, IL 60637 ayanc@ttic.edu Abstract Color constancy is the recovery of true surface color from observed color, and requires estimating the chromaticity of scene illumination to correct for the bias it induces. In this paper, we show that the per-pixel color statistics of natural scenes—without any spatial or semantic context—can by themselves be a powerful cue for color constancy. Specifically, we describe an illuminant estimation method that is built around a “classifier” for identifying the true chromaticity of a pixel given its luminance (absolute brightness across color channels). During inference, each pixel’s observed color restricts its true chromaticity to those values that can be explained by one of a candidate set of illuminants, and applying the classifier over these values yields a distribution over the corresponding illuminants. A global estimate for the scene illuminant is computed through a simple aggregation of these distributions across all pixels. We begin by simply defining the luminance-to-chromaticity classifier by computing empirical histograms over discretized chromaticity and luminance values from a training set of natural images. These histograms reflect a preference for hues corresponding to smooth reflectance functions, and for achromatic colors in brighter pixels. Despite its simplicity, the resulting estimation algorithm outperforms current state-of-the-art color constancy methods. Next, we propose a method to learn the luminanceto-chromaticity classifier “end-to-end”. Using stochastic gradient descent, we set chromaticity-luminance likelihoods to minimize errors in the final scene illuminant estimates on a training set. This leads to further improvements in accuracy, most significantly in the tail of the error distribution. 1 Introduction The spectral distribution of light reflected off a surface is a function of an intrinsic material property of the surface—its reflectance—and also of the spectral distribution of the light illuminating the surface. Consequently, the observed color of the same surface under different illuminants in different images will be different. To be able to reliably use color computationally for identifying materials and objects, researchers are interested in deriving an encoding of color from an observed image that is invariant to changing illumination. This task is known as color constancy, and requires resolving the ambiguity between illuminant and surface colors in an observed image. Since both of these quantities are unknown, much of color constancy research is focused on identifying models and statistical properties of natural scenes that are informative for color constancy. While pschophysical experiments have demonstrated that the human visual system is remarkably successful at achieving color constancy [1], it remains a challenging task computationally. Early color constancy algorithms were based on relatively simple models for pixel colors. For example, the gray world method [2] simply assumed that the average true intensities of different color channels across all pixels in an image would be equal, while the white-patch retinex method [3] 1 assumed that the true color of the brightest pixels in an image is white. Most modern color constancy methods, however, are based on more complex reasoning with higher-order image features. Many methods [4, 5, 6] use models for image derivatives instead of individual pixels. Others are based on recognizing and matching image segments to those in a training set to recover true color [7]. A recent method proposes the use of a multi-layer convolutional neural network (CNN) to regress from image patches to illuminant color. There are also many “combination-based” color constancy algorithms, that combine illuminant estimates from a number of simpler “unitary” algorithms [8, 9, 10, 11], sometimes using image features to give higher weight to the outputs of some subset of methods. In this paper, we demonstrate that by appropriately modeling and reasoning with the statistics of individual pixel colors, one can computationally recover illuminant color with high accuracy. We consider individual pixels in isolation, where the color constancy task reduces to discriminating between the possible choices of true color for the pixel that are feasible given the observed color and a candidate set of illuminants. Central to our method is a function that gives us the relative likelihoods of these true colors, and therefore a distribution over the corresponding candidate illuminants. Our global estimate for the scene illuminant is then computed by simply aggregating these distributions across all pixels in the image. We formulate the likelihood function as one that measures the conditional likelihood of true pixel chromaticity given observed luminance, in part to be agnostic to the scalar (i.e., color channelindependent) ambiguity in observed color intensities. Moreover, rather than committing to a parametric form, we quantize the space of possible chromaticity and luminance values, and define the function over this discrete domain. We begin by setting the conditional likelihoods purely empirically, based simply on the histograms of true color values over all pixels in all images across a training set. Even with this purely empirical approach, our estimation algorithm yields estimates with higher accuracy than current state-of-the-art methods. Then, we investigate learning the perpixel belief function by optimizing an objective based on the accuracy of the final global illuminant estimate. We carry out this optimization using stochastic gradient descent, and using a sub-sampling approach (similar to “dropout” [12]) to improve generalization beyond the training set. This further improves estimation accuracy, without adding to the computational cost of inference. 2 Preliminaries Assuming Lambertian reflection, the spectral distribution of light reflected by a material is a product of the distribution of the incident light and the material’s reflectance function. The color intensity vector v(n) ∈R3 recorded by a tri-chromatic sensor at each pixel n is then given by v(n) = Z κ(n, λ)ℓ(n, λ) s(n) Π(λ) dλ, (1) where κ(n, λ) is the reflectance at n, ℓ(n, λ) is the spectral distribution of the incident illumination, s(n) is a geometry-dependent shading factor, and Π(λ) ∈R3 denotes the spectral sensitivities of the color sensors. Color constancy is typically framed as the task of computing from v(n) the corresponding color intensities x(n) ∈R3 that would have been observed under some canonical illuminant ℓref (typically chosen to be ℓref(λ) = 1). We will refer to x(n) as the “true color” at n. Since (1) involves a projection of the full incident light spectrum on to the three filters Π(λ), it is not generally possible to recover x(n) from v(n) even with knowledge of the illuminant ℓ(n, λ). However, a commonly adopted approximation (shown to be reasonable under certain assumptions [13]) is to relate the true and observed colors x(n) and v(n) by a simple per-channel adaptation: v(n) = m(n) ◦x(n), (2) where ◦refers to the element-wise Hadamard product, and m(n) ∈R3 depends on the illuminant ℓ(n, λ) (for ℓref, m = [1, 1, 1]T ). With some abuse of terminology, we will refer to m(n) as the illuminant in the remainder of the paper. Moreover, we will focus on the single-illuminant case in this paper, and assume m(n) = m, ∀n in an image. Our goal during inference will be to estimate this global illuminant m from the observed image v(n). The true color image x(n) can then simply be recovered as m−1 ◦v(n), where m−1 ∈R3 denotes the element-wise inverse of m. Note that color constancy algorithms seek to resolve the ambiguity between m and x(n) in (2) only up to a channel-independent scalar factor. This is because scalar ambiguities show up in m between 2 ℓand ℓref due to light attenuation, between x(n) and κ(n) due to the shading factor s(n), and in the observed image v(n) itself due to varying exposure settings. Therefore, the performance metric typically used is the angular error cos−1 mT ¯ m ∥m∥2∥¯ m∥2 between the true and estimated illuminant vectors m and ¯m. Database For training and evaluation, we use the database of 568 natural indoor and outdoor images captured under various illuminants by Gehler et al. [14]. We use the version from Shi and Funt [15] that contains linear images (without gamma correction) generated from the RAW camera data. The database contains images captured with two different cameras (86 images with a Canon 1D, and 482 with a Canon 5D). Each image contains a color checker chart placed in the image, with its position manually labeled. The colors of the gray squares in the chart are taken to be the value of the true illuminant m for each image, which can then be used to correct the image to get true colors at each pixel (of course, only up to scale). The chart is masked out during evaluation. We use k-fold cross-validation over this dataset in our experiments. Each fold contains images from both cameras corresponding to one of k roughly-equal partitions of each camera’s image set (ordered by file name/order of capture). Estimates for images in each fold are based on training only with data from the remaining folds. We report results with three- and ten-fold cross-validation. These correspond to average training set sizes of 379 and 511 images respectively. 3 Color Constancy with Pixel-wise Chromaticity Statistics A color vector x ∈R3 can be characterized in terms of (1) its luminance ∥x∥1, or absolute brightness across color channels; and (2) its chromaticity, which is a measure of the relative ratios between intensities in different channels. While there are different ways of encoding chromaticity, we will do so in terms of the unit vector ˆx = x/∥x∥2 in the direction of x. Note that since intensities can not be negative, ˆx is restricted to lie on the non-negative eighth of the unit sphere S2 +. Remember from Sec. 2 that our goal is to resolve the ambiguity between the true colors x(n) and the illuminant m only up to scale. In other words, we need only estimate the illuminant chromaticity ˆm and true chromaticities ˆx(n) from the observed image v(n), which we can relate from (2) as ˆx(n) = x(n) ∥x(n)∥2 = ˆm−1 ◦v(n) ∥ˆm−1 ◦v(n)∥2 ∆= g(v(n), ˆm). (3) A key property of natural illuminant chromaticities is that they are known to take a fairly restricted set of values, close to a one-dimensional locus predicted by Planck’s radiation law [16]. To be able to exploit this, we denote M = { ˆmi}M i=1 as the set of possible values for illuminant chromaticity ˆm, and construct it from a training set. Specifically, we quantize1 the chromaticity vectors { ˆmt}T t=1 of the illuminants in the training set, and let M be the set of unique chromaticity values. Additionally, we define a “prior” bi = log(ni/T) over this candidate set, based on the number ni of training illuminants that were quantized to ˆmi. Given the observed color v(n) at a single pixel n, the ambiguity in ˆm across the illuminant set M translates to a corresponding ambiguity in the true chromaticity ˆx(n) over the set {g(v(n), ˆmi)}i. Figure 1(a) illustrates this ambiguity for a few different observed colors v. We note that while there is significant angular deviation within the set of possible true chromaticity values for any observed color, values in each set lie close to a one dimensional locus in chromaticity space. This suggests that the illuminants in our training set are indeed a good fit to Planck’s law2. The goal of our work is to investigate the extent to which we can resolve the above ambiguity in true chromaticity on a per-pixel basis, without having to reason about the pixel’s spatial neighborhood or semantic context. Our approach is based on computing a likelihood distribution over the possible values of ˆx(n), given the observed luminance ∥v(n)∥1. But as mentioned in Sec. 2, there is considerable ambiguity in the scale of observed color intensities. We address this partially by applying a simple per-image global normalization to the observed luminance to define 1Quantization is over uniformly sized bins in S2 +. See supplementary material for details. 2In fact, the chromaticities appear to lie on two curves, that are slightly separated from each other. This separation is likely due to differences in the sensor responses of the two cameras in the Gehler-Shi dataset. 3 (b) from Empirical Statistics (c) from End-to-end Learning y ∈ [0,0.2) y ∈ [0.2,0.4) y ∈ [0.8,1.0) y ∈ [1.4,1.6) y ∈ [1.8,2.0) y ∈ [2.8,3.0) y ∈ [3.4,3.6) y ∈ [3.8,∞) y ∈ [0,0.2) y ∈ [0.2,0.4) y ∈ [0.8,1.0) y ∈ [1.4,1.6) y ∈ [1.8,2.0) y ∈ [2.8,3.0) y ∈ [3.4,3.6) y ∈ [3.8,∞) (a) Ambiguity with Observed Color Red Blue Green Green + Blue Blue + Red Red + Green -15.1 -3.3 Legend True Chromaticity Set of possible true chromaticities for a specific observed color v. Figure 1: Color Constancy with Per-pixel Chromaticity-luminance distributions of natural scenes. (a) Ambiguity in true chromaticity given observed color: each set of points corresponds to the possible true chromaticity values (location in S2 +, see legend) consistent with the pixel’s observed chromaticity (color of the points) and different candidate illuminants ˆmi. (b) Distributions over different values for true chromaticity of a pixel conditioned on its observed luminance, computed as empirical histograms over the training set. Values y are normalized per-image by the median luminance value over all pixels. (c) Corresponding distributions learned with end-to-end training to maximize accuracy of overall illuminant estimation. y(n) = ∥v(n)∥1/median{∥v(n′)∥1}n′. This very roughly compensates for variations across images due to exposure settings, illuminant brightness, etc. However, note that since the normalization is global, it does not compensate for variations due to shading. The central component of our inference method is a function L[ˆx, y] that encodes the belief that a pixel with normalized observed luminance y has true chromaticity ˆx. This function is defined over a discrete domain by quantizing both chromaticity and luminance values: we clip luminance values y to four (i.e., four times the median luminance of the image) and quantize them into twenty equal sized bins; and for chromaticity ˆx, we use a much finger quantization with 214 equal-sized bins in S2 + (see supplementary material for details). In this section, we adopt a purely empirical approach 4 and define L[ˆx, y] as L[ˆx, y] = log (Nˆx,y/ P ˆx′ Nˆx′,y) , where Nˆx,y is the number of pixels across all pixels in a set of images in a training set that have true chromaticity ˆx and observed luminance y. We visualize these empirical versions of L[ˆx, y] for a subset of the luminance quantization levels in Fig. 1(b). We find that in general, desaturated chromaticities with similar intensity values in all color channels are most common. This is consistent with findings of statistical analysis of natural spectra [17], which shows the “DC” component (flat across wavelength) to be the one with most variance. We also note that the concentration of the likelihood mass in these chromaticities increasing for higher values of luminance y. This phenomenon is also predicted by traditional intuitions in color science: materials are brightest when they reflect most of the incident light, which typically occurs when they have a flat reflectance function with all values of κ(λ) close to one. Indeed, this is what forms the basis of the white-patch retinex method [3]. Amongst saturated colors, we find that hues which combine green with either red or blue occur more frequently than primary colors, with pure green and combinations of red and blue being the least common. This is consistent with findings that reflectance functions are usually smooth (PCA on pixel spectra in [17] revealed a Fourier-like basis). Both saturated green and red-blue combinations would require the reflectance to have either a sharp peak or crest, respectively, in the middle of the visible spectrum. We now describe a method that exploits the belief function L[ˆx, y] for illuminant estimation. Given the observed color v(n) at a pixel n, we can obtain a distribution {L[g(v(n), ˆmi), y(n)]}i over the set of possible true chromaticity values {g(v(n), ˆmi)}i, which can also be interpreted as a distribution over the corresponding illuminants ˆmi. We then simply aggregate these distributions across all pixels n in the image, and define the global probability of ˆmi being the scene illuminant m as pi = exp(li)/ (P i′ exp(li′)), where li = α N X n L[g(v(n), ˆmi), y(n)] + βbi, (4) N is the total number of pixels in the image, and α and β are scalar parameters. The final illuminant chromaticity estimate ¯m is then computed as ¯m = arg min m′,∥m′∥2=1 E [cos−1(mT m′)] ≈ arg max m′,∥m′∥2=1 E[mT m′] = P i pimi ∥P i pimi∥2 . (5) Note that (4) also incorporates the prior bi over illuminants. We set the parameters α and β using a grid search, to values that minimize mean illuminant estimation error over the training set. The primary computational cost of inference is in computing the values of {li}. We pre-compute values of g(ˆx, ˆm) using (3) over the discrete domain of quantized chromaticity values for ˆx and the candidate illuminant set M for ˆm. Therefore, computing each li essentially only requires the addition of N numbers from a look-up table. We need to do this for all M = |M| illuminants, where summations for different illuminants can be carried out in parallel. Our implementation takes roughly 0.3 seconds for a 9 mega-pixel image, on a modern Intel 3.3GHz CPU with 6 cores, and is available at http://www.ttic.edu/chakrabarti/chromcc/. This empirical version of our approach bears some similarity to the Bayesian method of [14] that is based on priors for illuminants, and for the likelihood of different true reflectance values being present in a scene. However, the key difference is our modeling of true chromaticity conditioned on luminance that explicitly makes estimation agnostic to the absolute scale of intensity values. We also reason with all pixels, rather than the set of unique colors in the image. Experimental Results. Table 1 compares the performance of illuminant estimation with our method (see rows labeled “Empirical”) to the current state-of-the-art, using different quantiles of angular error across the Gehler-Shi database [14, 15]. Results for other methods are from the survey by Li et al. [18]. (See the supplementary material for comparisons to some other recent methods). We show results with both three- and ten-fold cross-validation. We find that our errors with threefold cross-validation have lower mean, median, and tri-mean values than those of the best performing state-of-the-art method from [8], which combines illuminant estimates from twelve different “unitary” color-constancy method (many of which are also listed in Table 1) using support-vector regression. The improvement in error is larger with respect to the other combination methods [8, 9, 10, 11], as well as those based the statistics of image derivatives [4, 5, 6]. Moreover, since our method has more parameters than most previous algorithms (L[ˆx, y] has 214 × 20 ≈300k entries), it is likely 5 Table 1: Quantiles of Angular Error for Different Methods on the Gehler-Shi Database [14, 15] Method Mean Median Tri-mean 25%-ile 75%-ile 90%-ile Bayesian [14] 6.74◦ 5.14◦ 5.54◦ 2.42◦ 9.47◦ 14.71◦ Gamut Mapping [20] 6.00◦ 3.98◦ 4.52◦ 1.71◦ 8.42◦ 14.74◦ Deriv. Gamut Mapping [4] 5.96◦ 3.83◦ 4.32◦ 1.68◦ 7.95◦ 14.72◦ Gray World [2] 4.77◦ 3.63◦ 3.92◦ 1.81◦ 6.63◦ 10.59◦ Gray Edge(1,1,6) [5] 4.19◦ 3.28◦ 3.54◦ 1.87◦ 5.72◦ 8.60◦ SV-Regression [21] 4.14◦ 3.23◦ 3.35◦ 1.68◦ 5.27◦ 8.87◦ Spatio-Spectral [6] 3.99◦ 3.24◦ 3.45◦ 2.38◦ 4.97◦ 7.50◦ Scene Geom. Comb. [9] 4.56◦ 3.15◦ 3.46◦ 1.41◦ 6.12◦ 10.39◦ Nearest-30% Comb. [10] 4.26◦ 2.95◦ 3.19◦ 1.49◦ 5.39◦ 9.67◦ Classifier-based Comb. [11] 3.83◦ 2.75◦ 2.93◦ 1.34◦ 4.89◦ 8.19◦ Neural Comb. (ELM) [8] 3.43◦ 2.37◦ 2.62◦ 1.21◦ 4.53◦ 6.97◦ SVR-based Comb. [8] 2.98◦ 1.97◦ 2.35◦ 1.13◦ 4.33◦ 6.37◦ Proposed (3-Fold) Empirical 2.89◦ 1.89◦ 2.15◦ 1.15◦ 3.68◦ 6.24◦ End-to-end Trained 2.56◦ 1.67◦ 1.89◦ 0.91◦ 3.30◦ 5.56◦ (10-Fold) Empirical 2.55◦ 1.58◦ 1.83◦ 0.85◦ 3.30◦ 5.74◦ End-to-end Trained 2.20◦ 1.37◦ 1.53◦ 0.69◦ 2.68◦ 4.89◦ to benefit from more training data. We find this to indeed be the case, and observe a considerable decrease in error quantiles when we switch to ten-fold cross-validation. Figure. 2 shows estimation results with our method for a few sample images. For each image, we show the input image (indicating the ground truth color chart being masked out) and the output image with colors corrected by the global illuminant estimate. To visualize the quality of contributions from individual pixels, we also show a map of angular errors for illuminant estimates from individual pixels. These estimates are based on values of li computed by restricting the summation in (4) to individual pixels. We find that even these pixel-wise estimates are fairly accurate for a lot of pixels, even when it’s true color is saturated (see cart in first row). Also, to evaluate the weight of these per-pixel distributions to the global li, we show a map of their variance on a per-pixel basis. As expected from Fig. 1(b), we note higher variances in relatively brighter pixels. The image in the last row represents one of the poorest estimates across the entire dataset (higher than 90%−ile). Note that much of the image is in shadow, and contain only a few distinct (and likely atypical) materials. 4 Learning L[ˆx, y] End-to-end While the empirical approach in the previous section would be optimal if pixel chromaticities in a typical image were infact i.i.d., that is clearly not the case. Therefore, in this section we propose an alternate approach method to setting the beliefs in L[ˆx, y], that optimizes for the accuracy of the final global illuminant estimate. However, unlike previous color constancy methods that explicitly model statistical co-dependencies between pixels—for example, by modeling spatial derivatives [4, 5, 6], or learning functions on whole-image histograms [21]—we retain the overall parametric “form” by which we compute the illuminant in (4). Therefore, even though L[ˆx, y] itself is learned through knowledge of co-occurence of chromaticities in natural images, estimation of the illuminant during inference is still achieved through a simple aggregation of per-pixel distributions. Specifically, we set the entries of L[ˆx, y] to minimize a cost function C over a set of training images: C(L) = T X t=1 Ct(L), Ct = X i cos−1( ˆmT i ˆmt) pt i, (6) 6 Global Estimate Per-Pixel Estimate Error Belief Variance Empirical Input+Mask Error = 0.56◦ End-to-end Ground Truth Error = 0.24◦ Empirical Input+Mask Error = 4.32◦ End-to-end Ground Truth Error = 3.15◦ Empirical Input+Mask Error = 16.22◦ End-to-end Ground Truth Error = 10.31◦ Figure 2: Estimation Results on Sample Images. Along with output images corrected with the global illuminant estimate from our methods, we also visualize illuminant information extracted at a local level. We show a map of the angular error of pixel-wise illuminant estimates (i.e., computed with li based on distributions from only a single pixel). We also show a map of the variance Var({li}i) of these beliefs, to gauge the weight of their contributions to the global illuminant estimate. where ˆmt is the true illuminant chromaticity of the tth training image, and pt i is computed from the observed colors vt(n) using (4). We augment the training data available to us by “re-lighting” each image with different illuminants from the training set. We use the original image set and six re-lit copies for training, and use a seventh copy for validation. We use stochastic gradient descent to minimize (6). We initialize L to empirical values as described in the previous section (for convenience, we multiply the empirical values by α, and then set α = 1 for computing li), and then consider individual images from the training set at each iteration. We make multiple passes through the training set, and at each iteration, we randomly sub-sample the pixels from each training image. Specifically, we only retain 1/128 of the total pixels in the image by randomly sub-sampling 16 × 16 patches at a time. This approach, which can be interpreted as being similar to “dropout” [12], prevents over-fitting and improves generalization. 7 Derivatives of the cost function Ct with respect to the current values of beliefs L[ˆx, y] are given by ∂Ct ∂L[ˆx, y] = 1 N X i X n δ g(vt(n), ˆmi) = ˆx δ yt(n) = y ! × ∂Ct ∂lt i , (7) where ∂Ct ∂lt i = pt i cos−1( ˆmT i ˆmt) −Ct . (8) We use momentum to update the values of L[ˆx, y] at each iteration based on these derivative as L[ˆx, y] = L[ˆx, y] −L∇[ˆx, y], L∇[ˆx, y] = r ∂Ct ∂L[ˆx, y] + µL∇ ∗[ˆx, y], (9) where L∇ ∗[ˆx, y] is the previous update value, r is the learning rate, and µ is the momentum factor. In our experiments, we set µ = 0.9, run stochastic gradient descent for 20 epochs with r = 100, and another 10 epochs with r = 10. We retain the values of L from each epoch, and our final output is the version that yields the lowest mean illuminant estimation error on the validation set. We show the belief values learned in this manner in Fig. 1(c). Notice that although they retain the overall biases towards desaturated colors and combined green-red and green-blue hues, they are less “smooth” than their empirical counterparts in Fig. 1(b)—in many instances, there are sharp changes in the values L[ˆx, y] for small changes in chromaticity. While harder to interpret, we hypothesize that these variations result from shifting beliefs of specific (ˆx, y) pairs to their neighbors, when they correspond to incorrect choices within the ambiguous set of specific observed colors. Experimental Results. We also report errors when using these end-to-end trained versions of the belief function L in Table 1, and find that they lead to an appreciable reduction in error in comparison to their empirical counterparts. Indeed, the errors with end-to-end training using three-fold crossvalidation begin to approach those of the empirical version with ten-fold cross-validation, which has access to much more training data. Also note that the most significant improvements (for both three- and ten-fold cross-validation) are in “outlier” performance, i.e., in the 75 and 90%-ile error values. Color constancy methods perform worst on images that are dominated by a small number of materials with ambiguous chromaticity, and our results indicate that end-to-end training increases the reliability of our estimation method in these cases. We also include results for the end-to-end case for the example images in Figure. 2. For all three images, there is an improvement in the global estimation error. More interestingly, we see that the per-pixel error and variance maps now have more high-frequency variation, since L now reacts more sharply to slight chromaticity changes from pixel to pixel. Moreover, we see that a larger fraction of pixels generate fairly accurate estimates by themselves (blue shirt in row 2). There is also a higher disparity in belief variance, including within regions that visually look homogeneous in the input, indicating that the global estimate is now more heavily influenced by a smaller fraction of pixels. 5 Conclusion and Future Work In this paper, we introduced a new color constancy method that is based on a conditional likelihood function for the true chromaticity of a pixel, given its luminance. We proposed two approaches to learning this function. The first was based purely on empirical pixel statistics, while the second was based on maximizing accuracy of the final illuminant estimate. Both versions were found to outperform state-of-the-art color constancy methods, including those that employed more complex features and semantic reasoning. While we assumed a single global illuminant in this paper, the underlying per-pixel reasoning can likely be extended to the multiple-illuminant case, especially since, as we saw in Fig. 2, our method was often able to extract reasonable illuminant estimates from individual pixels. Another useful direction for future research is to investigate the benefits of using likelihood functions that are conditioned on lightness—estimated using an intrinsic image decomposition method—instead of normalized luminance. This would factor out the spatially-varying scalar ambiguity caused by shading, which could lead to more informative distributions. Acknowledgments We thank the authors of [18] for providing estimation results of other methods for comparison. The author was supported by a gift from Adobe. 8 References [1] D.H. Brainard and A Radonjic. Color constancy. In The new visual neurosciences, 2014. [2] G. Buchsbaum. A spatial processor model for object colour perception. J. Franklin Inst, 1980. [3] E.H. Land. The retinex theory of color vision. Scientific American, 1971. [4] A. Gijsenij, T. Gevers, and J. van de Weijer. Generalized gamut mapping using image derivative structures for color constancy. IJCV, 2010. [5] J. van de Weijer, T. Gevers, and A. Gijsenij. Edge-Based Color Constancy. IEEE Trans. Image Proc., 2007. [6] A. Chakrabarti, K. Hirakawa, and T. Zickler. Color Constancy with Spatio-spectral Statistics. PAMI, 2012. [7] H. R. V. Joze and M. S. Drew. Exemplar-based color constancy and multiple illumination. PAMI, 2014. [8] B. Li, W. Xiong, and D. Xu. A supervised combination strategy for illumination chromaticity estimation. ACM Trans. Appl. Percept., 2010. [9] R. Lu, A. Gijsenij, T. Gevers, V. Nedovic, and D. Xu. Color constancy using 3D scene geometry. In ICCV, 2009. [10] S. Bianco, F. Gasparini, and R. Schettini. Consensus-based framework for illuminant chromaticity estimation. J. Electron. Imag., 2008. [11] S. Bianco, G. Ciocca, C. Cusano, and R. Schettini. Automatic color constancy algorithm selection and combination. Pattern recognition, 2010. [12] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014. [13] H. Chong, S. Gortler, and T. Zickler. The von Kries hypothesis and a basis for color constancy. In Proc. ICCV, 2007. [14] P.V. Gehler, C. Rother, A. Blake, T. Minka, and T. Sharp. Bayesian Color Constancy Revisited. In CVPR, 2008. [15] L. Shi and B. Funt. Re-processed version of the gehler color constancy dataset of 568 images. Accessed from http://www.cs.sfu.ca/~colour/data/. [16] D.B. Judd, D.L. MacAdam, G. Wyszecki, H.W. Budde, H.R. Condit, S.T. Henderson, and J.L. Simonds. Spectral distribution of typical daylight as a function of correlated color temperature. JOSA, 1964. [17] A. Chakrabarti and T. Zickler. Statistics of Real-World Hyperspectral Images. In Proc. CVPR, 2011. [18] B. Li, W. Xiong, W. Hu, and B. Funt. Evaluating combinational illumination estimation methods on real-world images. IEEE Trans. Imag. Proc., 2014. Data at http://www.escience.cn/people/ BingLi/Data_TIP14.html. [19] S. Bianco, C. Cusano, and R. Schettini. Color constancy using cnns. arXiv:1504.04548[cs.CV], 2015. [20] D. Forsyth. A novel algorithm for color constancy. IJCV, 1990. [21] W. Xiong and B. Funt. Estimating illumination chromaticity via support vector regression. J. Imag. Sci. Technol., 2006. [22] A. Gijsenij, T. Gevers, and J. van de Weijer. Computational color constancy: Survey and experiments. IEEE Trans. Image Proc., 2011. Data at http://www.colorconstancy.com/. 9 | 2015 | 237 |
5,744 | Sample Complexity Bounds for Iterative Stochastic Policy Optimization Marin Kobilarov Department of Mechanical Engineering Johns Hopkins University Baltimore, MD 21218 marin@jhu.edu Abstract This paper is concerned with robustness analysis of decision making under uncertainty. We consider a class of iterative stochastic policy optimization problems and analyze the resulting expected performance for each newly updated policy at each iteration. In particular, we employ concentration-of-measure inequalities to compute future expected cost and probability of constraint violation using empirical runs. A novel inequality bound is derived that accounts for the possibly unbounded change-of-measure likelihood ratio resulting from iterative policy adaptation. The bound serves as a high-confidence certificate for providing future performance or safety guarantees. The approach is illustrated with a simple robot control scenario and initial steps towards applications to challenging aerial vehicle navigation problems are presented. 1 Introduction We consider a general class of stochastic optimization problems formulated as ξ∗= arg min ξ Eτ∼p(·|ξ)[J(τ)], (1) where ξ defines a vector of decision variables, τ represents the system response defined through the density p(τ|ξ), and J(τ) defines a positive cost function which can be non-smooth and nonconvex. It is assumed that p(τ|ξ) is either known or can be sampled from, e.g. in a black-box manner. The objective is to obtain high-confidence sample complexity bounds on the expected cost for a given decision strategy by observing past realizations of possibly different strategies. Such bounds are useful for two reasons: 1) for providing robustness guarantees for future executions, and 2) for designing new algorithms that directly minimize the bound and therefore are expected to have built-in robustness. Our primary motivation arises from applications in robotics, for instance when a robot executes control policies to achieve a given task such as navigating to a desired state while perceiving the environment and avoiding obstacles. Such problems are traditionally considered in the framework of reinforcement learning and addressed using policy search algorithms, e.g. [1, 2] (see also [3] for a comprehensive overview with a focus on robotic applications [4]). When an uncertain system model is available the problem is equivalent to robust model-predictive control (MPC) [5]. Our specific focus is on providing formal guarantees on future executions of control algorithms in terms of maximum expected cost (quantifying performance) and maximum probability of constraint violation (quantifying safety). Such bounds determine the reliability of control in the presence of process, measurement and parameter uncertainties, and contextual changes in the task. In this work we make no assumptions about nature of the system structure, such as linearity, convexity, or Gaussianity. In addition, the proposed approach applies either to a physical system without an available 1 model, to an analytical stochastic model, or to a white-box model (e.g. from a high-fidelity opensource physics engine). In this context, PAC bounds have been rarely considered but could prove essential for system certification, by providing high-confidence guarantees for future performance and safety, for instance “with 99% chance the robot will reach the goal within 5 minutes”, or “with 99% chance the robot will not collide with obstacles”. Approach. To cope with such general conditions, we study robustness through a statistical learning viewpoint [6, 7, 8] using finite-time sample complexity bounds on performance based on empirical runs. This is accomplished using concentration-of-measure inequalities [9] which provide only probabilistic bounds , i.e. they certify the algorithm execution in terms of statements such as: “in future executions, with 99% chance the expected cost will be less than X and the probability of collision will be less than Y”. While such bounds are generally applicable to any stochastic decision making process, our focus and initial evaluation is on stochastic control problems. Randomized methods in control analysis. Our approach is also inspired by existing work on randomized algorithms in control theory originally motivated by robust linear control design [10]. For example, early work focused on probabilistic root-locus design [11] and later applied to constraint satisfaction [12] and general cost functions [13]. High-confidence bounds for decidability of linear stability were refined in [14]. These are closely related to the concepts of randomized stability robustness analysis (RSRA) and randomized performance robustness analysis (RPRA) [13]. Finite-time probabilistic bounds for system identification problems have also been obtained through a statistical learning viewpoint [15]. 2 Iterative Stochastic Policy Optimization Instead of directly searching for the optimal ξ to solve (1) a common strategy in direct policy search and global optimization [16, 17, 18, 19, 20, 21] is to iteratively construct a surrogate stochastic model π(ξ|ν) with hyper-parameters ν ∈V, such as a Gaussian Mixture Model (GMM), where V is a vector space. The model induces a joint density p(τ, ξ|ν) = p(τ|ξ)π(ξ|ν) encoding natural stochasticity p(τ|ξ) and artificial control-exploration stochasticity π(ξ|ν). The problem is then to find ν to minimize the expected cost J (v) ≜E τ,ξ∼p(·|ν) [J(τ)], iteratively until convergence, which in many cases also corresponds to π(·|ν) shrinking close to a delta function around the optimal ξ∗(or to multiple peaks when multiple disparate optima exist as long as π is multi-modal). The typical flow of the iterative policy optimization algorithms considered in this work is: Iterative Stochastic Policy Optimization (ISPO) 0. Start with initial hyper-parameters ν0 (i.e. a prior), set i = 0 1. Sample M trajectories (ξj, τj) ∼p(·|νi) for j = 1, . . . , M 2. Compute new policy νi+1 using observed costs J(τj) 3. Compute bound on expected cost and Stop if below threshold, else set i=i+1 and Goto 1 The purpose of computing probably-approximate bounds is two-fold: a) to analyze the performance of such standard policy search algorithms; b) to design new algorithms by not directly minimizing an estimate of the expected cost, but by minimizing an upper confidence bound on the expected cost instead. The computed policy will thus have “built-in” robustness in the sense that, with highprobability, the resulting cost will not exceed an a-priori known value. The present paper develops bounds applicable to both (a) and (b), but only explores their application to (a), i.e. to the analysis of existing iterative policy search methods. Cost functions. We consider two classes of cost functions J. The first class encodes system performance and is defined as a bounded real-valued function such that 0 ≤J(τ) ≤b for any τ. The second are binary-valued indicator functions representing constraint violation. Assume that the variable τ must satisfy the condition g(τ) ≤0. The cost is then defined as J(τ) = I{g(τ)>0} and its expectation can be regarded as the probability of constraint violation, i.e. P(g(τ) > 0) = Eτ∼p(·|ξ)I{g(τ)>0}. In this work, we will be obtain bounds for both classes of cost functions. 2 3 A Specific Application: Discrete-time Stochastic Control We next illustrate the general stochastic optimization setting using a classical discrete-time nonlinear optimal control problem. Specific instances of such control problems will later be used for numerical evaluation. Consider a discrete-time dynamical model with state xk ∈X, where X is an n-dimensional manifold, and control inputs uk ∈Rm at time tk ∈[0, T] where k = 0, . . . , N denotes the time stage. Assume that the system dynamics are given by xk+1 = fk(xk, uk, wk), subject to gk(xk, uk) ≤0, gN(xN) ≤0, where fk and gk correspond either to the physical plant, to an analytical model, or to a “white-box” high-fidelity physics-engine update step. The terms wk denotes process noise. Equivalently, such a formulation induces the process model density p(xk+1|xk, uk). In addition, consider the cost J(x0:N, u0:N−1) ≜ N−1 X k=0 Lk(xk, uk) + LN(xN), where x0:N ≜{x0, . . . , xN} denotes the complete trajectory and Lk are given nonlinear functions. Our goal is to design feedback control policies to optimize the expected value of J. For simplicity, we will assume perfect measurements although this does not impose a limitation on the approach. Assume that any decision variables in the problem (such as feedforward or feedback gains, obstacle avoidance terms, mode switching variables) are encoded using a finite-dimensional vector ξ ∈Rnξ and define the control law uk = Φk(xk)ξ using basis functions Φk(x) ∈Rm×nξ for all k = 0, . . . , N −1. This representation captures both static feedback control laws as well as time-varying optimal control laws of the form uk = u∗ k + KLQR k (xk −x∗ k) where u∗ k = B(tk)ξ is an optimized feedforward control (parametrized using basis functions B(t) ∈Rm×z such as B-splines), KLQR k is the optimal feedback gain matrix of the LQR problem based on the linearized dynamics and second-order cost expansion around the optimized nominal reference trajectory x∗, i.e. such that x∗ k+1 = fk(x∗ k, u∗ k, 0). The complete trajectory of the system is denoted by the random variable τ = (x0:N, u0:N−1) and has density p(τ|ξ) = p(x0)ΠN−1 k=0 p(xk+1|xk, uk)δ(uk −Φk(xk)ξ), where δ(·) is the Dirac delta. The trajectory constraint takes the form {g(τ) ≤0} ≜VN−1 k=0 {gk(xk, uk) ≤0} ∧{gN(xN) ≤0}. A simple example. As an example, consider a point-mass robot modeled as a double-integrator system with state x = (p, v) where p ∈Rd denotes position and v ∈Rd denotes velocity with d = 2 for planar workspaces and d = 3 for 3-D workspaces. The dynamics is given, for ∆t = T/N, by pk+1 = pk + ∆tvk + 1 2∆t2(uk + wk), vk+1 = vk + ∆t(uk + wk), where uk are the applied controls and wk is zero-mean white noise. Imagine that the constraint gk(x, u) ≤0 defines circular obstacles O ⊂Rd and control norm bounds defined as ro −∥p −po∥≤0, ∥u∥≤umax, where ro is the radius of an obstacle at position po ∈Rd. The cost J could be arbitrary but a typical choice is L(x, u) = 1 2∥u∥2 R + q(x) where R > 0 is a given matrix and q(x) is a nonlinear function defining a task. The final cost could force the system towards a goal state xf ∈Rn (or a region Xf ⊂Rn) and could be defined according to LN(x) = 1 2∥x −xf∥2 Qf for some given matrix Qf ≥0. For such simple systems one can choose a smooth feedback control law uk = Φk(x)ξ with static positive gains ξ = (kp, kd, ko) ∈R3 and basis function Φ(x) = [ pf −p vf −v ϕ(x, O) ] , where ϕ(x, O) is an obstacle-avoidance force, e.g. defined as the gradient of a potential field or as a gyroscopic “steering” force ϕ(x, O) = s(x, O) × v that effectively rotates the velocity vector [22] . Alternatively, one could employ a time-varying optimal control law as described in §3. 3 4 PAC Bounds for Iterative Policy Adaptation We next compute probabilistic bounds on the expected cost J (ν) resulting from the execution of a new stochastic policy with hyper-parameters ν using observed samples from previous policies ν0, ν1, . . . . The bound is agnostic to how the policy is updated (i.e. Step 2 in the ISPO algorithm). 4.1 A concentration-of-measure inequality for policy adaptation The stochastic optimization setting naturally allows the use of a prior belief ξ ∼π(·|ν0) on what good control laws could be, for some known ν0 ∈V. After observing M executions based on such prior, we wish to find a new improved policy π(·|ν) which optimizes the cost J (ν) ≜Eτ,ξ∼p(·|ν)[J(τ)] = Eτ,ξ∼p(·|ν0) J(τ) π(ξ|ν) π(ξ|ν0) , (2) which can be approximated using samples ξj ∼π(ξ|ν0) and τj ∼p(τ|ξj) by the empirical cost 1 M M X j=1 J(τj) π(ξj|ν) π(ξj|ν0) . (3) The goal is to compute the parameters ν using the sampled decision variables ξj and the corresponding observed costs J(τj). Obtaining practical bounds for J (ν) becomes challenging since the change-of-measure likelihood ratio π(ξ|ν) π(ξ|ν0) can be unbounded (or have very large values) [23] and a standard bound, e.g. such as Hoeffding’s or Bernstein’s becomes impractical or impossible to apply. To cope with this we will employ a recently proposed robust estimation [24] technique stipulating that instead of estimating the expectation m = E[X] of a random variable X ∈[0, ∞) using its empirical mean bm = 1 M PM j=1 Xj, a more robust estimate can be obtained by truncating its higher moments, i.e. using bmα ≜ 1 αM PM j=1 ψ(αXj) for some α > 0 where ψ(x) = log(1 + x + 1 2x2). (4) What makes this possible is the key assumption that the (possibly unbounded) random variable must have bounded second moment. We employ this idea to deal with the unboundedness of the policy adaptation ratio by showing that in fact its second moment can be bounded and corresponds to an information distance between the current and previous stochastic policies. To obtain sharp bounds though it is useful to employ samples over multiple iterations of the ISPO algorithm, i.e. from policies ν0, ν1, . . . , νL−1 computed in previous iterations. To simplify notation let z = (τ, ξ) and define ℓi(z, ν) ≜J(τ) π(ξ|ν) π(ξ|νi). The cost (2) of executing ν can now be equivalently expressed as J (ν) ≡1 L L−1 X i=0 Ez∼p(·|νi)ℓi(z, ν) using the computed policies in previous iterations i = 0, . . . , L −1. We next state the main result: Proposition 1. With probability 1 −δ the expected cost of executing a stochastic policy with parameters ξ ∼π(·|ν) is bounded according to: J (ν) ≤inf α>0 ( b Jα(ν) + α 2L L−1 X i=0 b2 i eD2(π(·|ν)||π(·|νi)) + 1 αLM log 1 δ ) , (5) where b Jα(ν) denotes a robust estimator defined by b Jα(ν) ≜ 1 αLM L−1 X i=0 M X j=1 ψ (αℓ(zij, ν)) , computed after L iterations, with M samples zi1, . . . , ziM ∼p(·|νi) obtained at iterations i = 0, . . . , L −1, where Dβ(p||q) denotes the Renyii divergence between p and q defined by Dβ(p||q) = 1 β −1 log Z pβ(x) qβ−1(x)dx. The constants bi are such that 0 ≤J(τ) ≤bi at each iteration i = 0, . . . , L −1. 4 Proof. The bound is obtained by relating the mean to its robust estimate according to P LM(J (ν) −b Jα(ν)) ≥t = P eαLM(J (ν)−b Jα(ν)) ≥eαt , ≤E h eαLM(J (ν)−b Jα(ν))i e−αt, (6) = e−αt+αLMJ (ν)E h e PL−1 i=0 PM j=1 −ψ(αℓi(zij,ν))i = e−αt+αLMJ E L−1 Y i=0 M Y j=1 e−ψ(αℓi(zij,ν)) = e−αt+αLMJ L−1 Y i=0 M Y j=1 E z∼p(·|νi) 1 −αℓi(z, ν) + α2 2 ℓi(z, ν)2 (7) = e−αt+αLMJ (ν) L−1 Y i=0 M Y j=1 1 −αJ (ν) + α2 2 E z∼p(·|νi)[ℓi(z, ν)2] ≤e−αt+αLMJ (ν) L−1 Y i=0 M Y j=1 e−αJ (ν)+ α2 2 Ez∼p(·|νi)[ℓi(z,ν)2] (8) ≤e−αt+M α2 2 PL−1 i=0 Ez∼p(·|νi)[ℓi(z,ν)2], using Markov’s inequality to obtain (6), the identities ψ(x) ≥−log(1 −x + 1 2x2) in (7) and 1 + x ≤ex in (8). Here, we adapted the moment-truncation technique proposed by Catoni [24] for general unbounded losses to our policy adaptation setting in order to handle the possibly unbounded likelihood ratio. These results are then combined with E [ℓi(z, ν)2] ≤b2 i Eπ(·|νi) π(ξ|ν)2 π(ξ|νi)2 = b2 i eD2(π||πi), where the relationship between the likelihood ratio variance and the Renyii divergence was established in [23]. Note that the Renyii divergence can be regarded as a distance between two distribution and can be computed in closed bounded form for various distributions such as the exponential families; it is also closely related to the Kullback-Liebler (KL) divergence, i.e. D1(p||q) = KL(p||q). 4.2 Illustration using simple robot navigation We next illustrate the application of these bounds using the simple scenario introduced in §3. The stochasticity is modeled using a Gaussian density on the initial state p(x0), on the disturbances wk and on the goal state xf. Iterative policy optimization is performed using a stochastic model π(ξ|ν) encoding a multivariate Gaussian, i.e. π(ξ|ν) = N(ξ|µ, Σ) which is updated through reward-weighted-regression (RWR) [3], i.e. in Step 2 of the ISPO algorithm we take M samples, observe their costs, and update the parameters according to µ = M X j=1 ¯w(τj)ξj, Σ = M X j=1 ¯w(τj)(ξj −µ)(ξj −µ)T , (9) using the tilting weights w(τ) = e−βJ(τ) for some adaptively chosen β > 0 and where ¯w(τj) ≜ w(τj)/ PM ℓ=1 w(τℓ) are the normalized weights. At each iteration i one can compute a bound on the expected cost using the previously computed ν0, . . . , νi−1. We have computed such bounds using (5) for both the expected cost and probability of 5 -15 -10 -5 0 5 -15 -10 -5 0 5 -15 -10 -5 0 5 -15 -10 -5 0 5 -15 -10 -5 0 5 -15 -10 -5 0 5 obstacles goal sampled start states obstacles iteration #1 iteration #4 iteration #9 iteration #28 iterations 0 5 10 15 20 25 30 0 1 2 3 4 5 6 7 8 Expected Cost empirical bJ robust bJα PAC bound J+ iterations 0 5 10 15 20 25 30 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Probability of Collision empirical P robust Pα PAC bound P + a) b) c) Figure 1: Robot navigation scenario based on iterative policy improvement and resulting predicted performance: a) evolution of the density p(ξ|ν) over the decision variables (in this case the control gains); b) cost function J and its computed upper bound J + for future executions; c) analogous bounds on probability-ofcollision P; snapshots of sampled trajectories (top). Note that the initial policy results in ≈30% collisions. Surprisingly, the standard empirical and robust estimates are nearly identical. collision, denoted respectively by J + and P + using M = 200 samples (Figure 1) at each iteration. We used a window of maximum L = 10 previous iterations to compute the bounds, i.e. to compute νi+1 all samples from densities νi−L+1, νi−L+2, . . . , νi were used. Remarkably, using our robust statistics approach the resulting bound eventually becomes close to the standard empirical estimate b J . The collision probability bound P + decreses to less than 10% which could be further improved by employing more samples and more iterations. The significance of these bounds is that one can stop the optimization (regarded as training) at any time and be able to predict expected performance in future executions using the newly updated policy before actually executing the policy, i.e. using the samples from the previous iteration. Finally, the Renyii divergence term used in these computations takes the simple form Dβ (N(·|µ0, Σ0)∥N(·|µ1, Σ1)) = β 2 ∥µ1 −µ0∥2 Σ−1 β + 1 2(1 −β) log |Σβ| |Σ0|1−β|Σ1|β , where Σβ = (1 −β)Σ0 + βΣ1. 4.3 Policy Optimization Methods We do not impose any restrictions on the specific method used for optimizing the policy π(ξ|ν). When complex constraints are present such computation will involve a global motion planning step combined with local feedback control laws (we show such an example in §5). The approach can be used to either analyze such policies computed using any method of choice or to derive new algorithms based on minimizing the right-hand side of the bound. The method also applies to modelfree learning. For instance, related to recent methods in robotics one could use reward-weightedregression (RWR) or policy learning by weighted samples with returns (PoWeR) [3], stochastic optimization methods such as [25, 26], or using the related cross-entropy optimization [16, 27]. 6 5 Application to Aerial Vehicle Navigation Consider an aerial vehicle such as a quadrotor navigating at high speed through a cluttered environment. We are interested in minimizing a cost metric related to the total time taken and control effort required to reach a desired goal state, while maintaining low probability of collision. We employ an experimentally identified model of an AscTec quadrotor (Figure 2) with 12-dimensional state space X = SE(3) × R6 with state x = (p, R, ˙p, ω) where p ∈R3 is the position, R ∈SO(3) is the rotation matrix, and ω ∈R3 is the body-fixed angular velocity. The vehicle is controlled with inputs u = (F, M) ∈R4 including the lift force F ≥0 and torque moments M ∈R3. The dynamics is m¨p = Re3F + mg + δ(p, ˙p), (10) ˙R = Rbω, (11) J ˙ω = Jω × ω + M, (12) where m is the mass, J–the inertia tensor, e3 = (0, 0, 1) and the matrix bω is such that bωη = ω × η for any η ∈R3. The system is subject to initial localization errors and also to random disturbances, e.g. due to wind gusts and wall effects, defined as stochastic forces δ(p, ˙p) ∈R3. Each component in δ is zero-mean and has standard deviation of 3 Newtons, for a vehicle with mass m ≈1 kg. The objective is to navigate through a given urban environment at high speed to a desired goal state. We employ a two-stage approach consisting of an A*-based global planner which produces a sequence of local sub-goals that the vehicle must pass through. A standard nonlinear feedback backstepping controller based on a “slow” position control loop and a “fast” attitude control is employed [28, 29] for local control. In addition, and obstacle avoidance controller is added to avoid collisions since the vehicle is not expected to exactly follow the A* path. At each iteration M = 200 samples are taken with 1 −δ = 0.95 confidence level. A window of L = 5 past iterations were used for the bounds. The control density π(ξ|ν) is a single Gaussian as specified in §4.2. The most sensitive gains in the controller are the position proporitional and derivative terms, and the obstacle gains, denoted by kp, kd, and ko, which we examine in the following scenarios: a) fixed goal, wind gusts disturbances, virtual environment: the system is first tested in a cluttered simulated environment (Figure 2). The simulated vehicle travels at an average velocity of 20 m/s (see video in Supplement) and initially experiences more than 50% collisions. After a few iterations the total cost stabilizes and the probability of collision reduces to around 15%. The bound is close to the empirical estimate which indicates that it can be tight if more samples are taken. The collision probability bound is still too high to be practical but our goal was only to illustrate the bound behavior. It is also likely that our chosen control strategy is in fact not suitable for high-speed traversal of such tight environments. b) sparser campus-like environment, randomly sampled goals: a more general evaluation was performed by adding the goal location to the stochastic problem parameters so that the bound will apply to any future desired goal in that environment (Figure 3). The algorithm converges to similar values as before, but this time the collision probability is smaller due to more expansive environment. In both cases, the bounds could be reduced further by employing more than M = 200 samples or by reusing more samples from previous runs according to Proposition 1. 6 Conclusion This paper considered stochastic decision problems and focused on a probably-approximate bounds on robustness of the computed decision variables. We showed how to derive bounds for fixed policies in order to predict future performance and/or constraint violation. These results could then be employed for obtaining generalization PAC bounds, e.g. through a PAC-Bayesian approach which could be consistent with the proposed notion of policy priors and policy adaptation. Future work will develop concrete algorithms by directly optimizing such PAC bounds, which are expected to have built-in robustness properties. References [1] Richard S. Sutton, David A. McAllester, Satinder P. Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In NIPS, pages 1057–1063, 1999. [2] Csaba Szepesvari. Algorithms for Reinforcement Learning. Morgan and Claypool Publishers, 2010. [3] M. P. Deisenroth, G. Neumann, and J. Peters. A survey on policy search for robotics. pages 388–403, 2013. 7 iteration #1 iteration #5 iteration #17 A* waypoint path simulated quadrotor motion AscTec Pelican iterations 0 5 10 15 20 25 0 50 100 150 200 250 300 350 Expected Cost empirical bJ robust bJα PAC bound J+ iterations 0 5 10 15 20 25 0 0.2 0.4 0.6 0.8 1 Probability of Collision empirical P robust Pα PAC bound P + a) b) c) Figure 2: Aerial vehicle navigation using a simulated nonlinear quadrotor model (top). Iterative stochastic policy optimization iterations (a,b,c) analogous to those given in Figure 1. Note that the initial policy results in over 50% collisions which is reduced to less than 10% after a few policy iterations. iteration #1 iteration #4 iteration #10 campus map Start random Goals iterations 0 5 10 15 0 50 100 150 200 250 300 350 400 Expected Cost empirical bJ robust bJα PAC bound J+ iterations 0 5 10 15 0 0.2 0.4 0.6 0.8 1 Probability of Collision empirical P robust Pα PAC bound P + a) b) c) Figure 3: Analogous plot to Figure 2 but for a typical campus environment using uniformly at random sampled goal states along the northern boundary. The vehicle must fly below 100 feet and is not allowed to fly above buildings. This is a larger less constrained environment resulting in less collisions. 8 [4] S. Schaal and C. Atkeson. Learning control in robotics. Robotics Automation Magazine, IEEE, 17(2):20 –29, june 2010. [5] Alberto Bemporad and Manfred Morari. Robust model predictive control: A survey. In A. Garulli and A. Tesi, editors, Robustness in identification and control, volume 245 of Lecture Notes in Control and Information Sciences, pages 207–226. Springer London, 1999. [6] Vladimir N. Vapnik. The nature of statistical learning theory. Springer-Verlag New York, Inc., New York, NY, USA, 1995. [7] David A. McAllester. Pac-bayesian stochastic model selection. Mach. Learn., 51:5–21, April 2003. [8] J Langford. Tutorial on practical prediction theory for classification. Journal of Machine Learning Research, 6(1):273–306, 2005. [9] Stphane Boucheron, Gbor Lugosi, Pascal Massart, and Michel Ledoux. Concentration inequalities : a nonasymptotic theory of independence. Oxford university press, Oxford, 2013. [10] M. Vidyasagar. Randomized algorithms for robust controller synthesis using statistical learning theory. Automatica, 37(10):1515–1528, October 2001. [11] Laura Ryan Ray and Robert F. Stengel. A monte carlo approach to the analysis of control system robustness. Automatica, 29(1):229–236, January 1993. [12] Qian Wang and RobertF. Stengel. Probabilistic control of nonlinear uncertain systems. In Giuseppe Calafiore and Fabrizio Dabbene, editors, Probabilistic and Randomized Methods for Design under Uncertainty, pages 381–414. Springer London, 2006. [13] R. Tempo, G. Calafiore, and F. Dabbene. Randomized algorithms for analysis and control of uncertain systems. Springer, 2004. [14] V. Koltchinskii, C.T. Abdallah, M. Ariola, and P. Dorato. Statistical learning control of uncertain systems: theory and algorithms. Applied Mathematics and Computation, 120(13):31 – 43, 2001. ¡ce:title¿The Bellman Continuum¡/ce:title¿. [15] M. Vidyasagar and Rajeeva L. Karandikar. A learning theory approach to system identification and stochastic adaptive control. Journal of Process Control, 18(34):421 – 430, 2008. Festschrift honouring Professor Dale Seborg. [16] Reuven Y. Rubinstein and Dirk P. Kroese. The cross-entropy method: a unified approach to combinatorial optimization. Springer, 2004. [17] Anatoly Zhigljavsky and Antanasz Zilinskas. Stochastic Global Optimization. Spri, 2008. [18] Philipp Hennig and Christian J. Schuler. Entropy search for information-efficient global optimization. J. Mach. Learn. Res., 98888:1809–1837, June 2012. [19] Christian Igel, Nikolaus Hansen, and Stefan Roth. Covariance matrix adaptation for multi-objective optimization. Evol. Comput., 15(1):1–28, March 2007. [20] Pedro Larraaga and Jose A. Lozano, editors. Estimation of distribution algorithms: A new tool for evolutionary computation. Kluwer Academic Publishers, 2002. [21] Martin Pelikan, David E. Goldberg, and Fernando G. Lobo. A survey of optimization by building and using probabilistic models. Comput. Optim. Appl., 21:5–20, January 2002. [22] Howie Choset, Kevin M. Lynch, Seth Hutchinson, George A Kantor, Wolfram Burgard, Lydia E. Kavraki, and Sebastian Thrun. Principles of Robot Motion: Theory, Algorithms, and Implementations. MIT Press, June 2005. [23] Corinna Cortes, Yishay Mansour, and Mehryar Mohri. Learning Bounds for Importance Weighting. In Advances in Neural Information Processing Systems 23, 2010. [24] Olivier Catoni. Challenging the empirical mean and empirical variance: A deviation study. Ann. Inst. H. Poincar Probab. Statist., 48(4):1148–1185, 11 2012. [25] E. Theodorou, J. Buchli, and S. Schaal. A generalized path integral control approach to reinforcement learning. Journal of Machine Learning Research, (11):3137–3181, 2010. [26] Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Neural Information Processing Systems (NIPS), 2014. [27] M. Kobilarov. Cross-entropy motion planning. International Journal of Robotics Research, 31(7):855– 871, 2012. [28] Robert Mahony and Tarek Hamel. Robust trajectory tracking for a scale model autonomous helicopter. International Journal of Robust and Nonlinear Control, 14(12):1035–1059, 2004. [29] Marin Kobilarov. Trajectory tracking of a class of underactuated systems with external disturbances. In American Control Conference, pages 1044–1049, 2013. 9 | 2015 | 238 |
5,745 | Copeland Dueling Bandits Masrour Zoghi Informatics Institute University of Amsterdam, Netherlands m.zoghi@uva.nl Zohar Karnin Yahoo Labs New York, NY zkarnin@yahoo-inc.com Shimon Whiteson Department of Computer Science University of Oxford, UK shimon.whiteson@cs.ox.ac.uk Maarten de Rijke Informatics Institute University of Amsterdam derijke@uva.nl Abstract A version of the dueling bandit problem is addressed in which a Condorcet winner may not exist. Two algorithms are proposed that instead seek to minimize regret with respect to the Copeland winner, which, unlike the Condorcet winner, is guaranteed to exist. The first, Copeland Confidence Bound (CCB), is designed for small numbers of arms, while the second, Scalable Copeland Bandits (SCB), works better for large-scale problems. We provide theoretical results bounding the regret accumulated by CCB and SCB, both substantially improving existing results. Such existing results either offer bounds of the form O(K log T) but require restrictive assumptions, or offer bounds of the form O(K2 log T) without requiring such assumptions. Our results offer the best of both worlds: O(K log T) bounds without restrictive assumptions. 1 Introduction The dueling bandit problem [1] arises naturally in domains where feedback is more reliable when given as a pairwise preference (e.g., when it is provided by a human) and specifying real-valued feedback instead would be arbitrary or inefficient. Examples include ranker evaluation [2, 3, 4] in information retrieval, ad placement and recommender systems. As with other preference learning problems [5], feedback consists of a pairwise preference between a selected pair of arms, instead of scalar reward for a single selected arm, as in the K-armed bandit problem. Most existing algorithms for the dueling bandit problem require the existence of a Condorcet winner, which is an arm that beats every other arm with probability greater than 0.5. If such algorithms are applied when no Condorcet winner exists, no decision may be reached even after many comparisons. This is a key weakness limiting their practical applicability. For example, in industrial ranker evaluation [6], when many rankers must be compared, each comparison corresponds to a costly live experiment and thus the potential for failure if no Condorcet winner exists is unacceptable [7]. This risk is not merely theoretical. On the contrary, recent experiments on K-armed dueling bandit problems based on information retrieval datasets show that dueling bandit problems without Condorcet winners arise regularly in practice [8, Figure 1]. In addition, we show in Appendix C.1 in the supplementary material that there are realistic situations in ranker evaluation in information retrieval in which the probability that the Condorcet assumption holds, decreases rapidly as the number of arms grows. Since the K-armed dueling bandit methods mentioned above do not provide regret bounds in the absence of a Condorcet winner, applying them remains risky in practice. Indeed, we demonstrate empirically the danger of applying such algorithms to dueling bandit problems that do not have a Condorcet winner (cf. Appendix A in the supplementary material). The non-existence of the Condorcet winner has been investigated extensively in social choice theory, where numerous definitions have been proposed, without a clear contender for the most suitable resolution [9]. In the dueling bandit context, a few methods have been proposed to address this issue, e.g., SAVAGE [10], PBR [11] and RankEl [12], which use some of the notions proposed by 1 social choice theorists, such as the Copeland score or the Borda score to measure the quality of each arm, hence determining what constitutes the best arm (or more generally the top-k arms). In this paper, we focus on finding Copeland winners, which are arms that beat the greatest number of other arms, because it is a natural, conceptually simple extension of the Condorcet winner. Unfortunately, the methods mentioned above come with bounds of the form O(K2 log T). In this paper, we propose two new K-armed dueling bandit algorithms for the Copeland setting with significantly improved bounds. The first algorithm, called Copeland Confidence Bound (CCB), is inspired by the recently proposed Relative Upper Confidence Bound method [13], but modified and extended to address the unique challenges that arise when no Condorcet winner exists. We prove anytime high-probability and expected regret bounds for CCB of the form O(K2 + K log T). Furthermore, the denominator of this result has much better dependence on the “gaps” arising from the dueling bandit problem than most existing results (cf. Sections 3 and 5.1 for the details). However, a remaining weakness of CCB is the additive O(K2) term in its regret bounds. In applications with large K, this term can dominate for any experiment of reasonable duration. For example, at Bing, 200 experiments are run concurrently on any given day [14], in which case the duration of the experiment needs to be longer than the age of the universe in nanoseconds before K log T becomes significant in comparison to K2. Our second algorithm, called Scalable Copeland Bandits (SCB), addresses this weakness by eliminating the O(K2) term, achieving an expected regret bound of the form O(K log K log T). The price of SCB’s tighter regret bounds is that, when two suboptimal arms are close to evenly matched, it may waste comparisons trying to determine which one wins in expectation. By contrast, CCB can identify that this determination is unnecessary, yielding better performance unless there are very many arms. CCB and SCB are thus complementary algorithms for finding Copeland winners. Our main contributions are as follows: 1. We propose two algorithms that address the dueling bandit problem in the absence of a Condorcet winner, one designed for problems with small numbers of arms and the other scaling well with the number of arms. 2. We provide regret bounds that bridge the gap between two groups of results: those of the form O(K log T) that make the Condorcet assumption, and those of the form O(K2 log T) that do not make the Condorcet assumption. Our bounds are similar to those of the former but are as broadly applicable as the latter. Furthermore, the result for CCB has substantially better dependence on the gaps than the second group of results. 3. We include an empirical evaluation of CCB and SCB using a real-life problem arising from information retrieval (IR). The experimental results mirror the theoretical ones. 2 Problem Setting Let K ≥2. The K-armed dueling bandit problem [1] is a modification of the K-armed bandit problem [15]. The latter considers K arms {a1, . . . , aK} and at each time-step, an arm ai can be pulled, generating a reward drawn from an unknown stationary distribution with expected value µi. The K-armed dueling bandit problem is a variation in which, instead of pulling a single arm, we choose a pair (ai, aj) and receive one of them as the better choice, with the probability of ai being picked equal to an unknown constant pij and that of aj being picked equal to pji = 1 −pij. A problem instance is fully specified by a preference matrix P = [pij], whose ij entry is equal to pij. Most previous work assumes the existence of a Condorcet winner [10]: an arm, which without loss of generality we label a1, such that p1i > 1 2 for all i > 1. In such work, regret is defined relative to the Condorcet winner. However, Condorcet winners do not always exist [8, 13]. In this paper, we consider a formulation of the problem that does not assume the existence of a Condorcet winner. Instead, we consider the Copeland dueling bandit problem, which defines regret with respect to a Copeland winner, which is an arm with maximal Copeland score. The Copeland score of ai, denoted Cpld(ai), is the number of arms aj for which pij > 0.5. The normalized Copeland score, denoted cpld(ai), is simply Cpld(ai) K−1 . Without loss of generality, we assume that a1, . . . , aC are the Copeland winners, where C is the number of Copeland winners. We define regret as follows: Definition 1. The regret incurred by comparing ai and aj is 2cpld(a1) −cpld(ai) −cpld(aj). 2 Remark 2. Since our results (see §5) establish bounds on the number of queries to non-Copeland winners, they can also be applied to other notions of regret. 3 Related Work Numerous methods have been proposed for the K-armed dueling bandit problem, including Interleaved Filter [1], Beat the Mean [3], Relative Confidence Sampling [8], Relative Upper Confidence Bound (RUCB) [13], Doubler and MultiSBM [16], and mergeRUCB [17], all of which require the existence of a Condorcet winner, and often come with bounds of the form O(K log T). However, as observed in [13] and Appendix C.1, real-world problems do not always have Condorcet winners. There is another group of algorithms that do not assume the existence of a Condorcet winner, but have bounds of the form O(K2 log T) in the Copeland setting: Sensitivity Analysis of VAriables for Generic Exploration (SAVAGE) [10], Preference-Based Racing (PBR) [11] and Rank Elicitation (RankEl) [12]. All three of these algorithms are designed to solve more general or more difficult problems, and they solve the Copeland dueling bandit problem as a special case. This work bridges the gap between these two groups by providing algorithms that are as broadly applicable as the second group but have regret bounds comparable to those of the first group. Furthermore, in the case of the results for CCB, rather than depending on the smallest gap between arms ai and aj, ∆min:=mini>j |pij −0.5|, as in the case of many results in the Copeland setting,1 our regret bounds depend on a larger quantity that results in a substantially lower upper-bound, cf. §5.1. In addition to the above, bounds have been proven for other notions of winners, including Borda [10, 11, 12], Random Walk [11, 18], and very recently von Neumann [19]. The dichotomy discussed also persists in the case of these results, which either rely on restrictive assumptions to obtain a linear dependence on K or are more broadly applicable, at the expense of a quadratic dependence on K. A natural question for future work is whether the improvements achieved in this paper in the case of the Copeland winner can be obtained in the case of these other notions as well. We refer the interested reader to Appendix C.2 for a numerical comparison of these notions of winners in practice. More generally, there is a proliferation of notions of winners that the field of Social Choice Theory has put forth and even though each definition has its merits, it is difficult to argue for any single definition to be superior to all others. A related setting is that of partial monitoring games [20]. While a dueling bandit problem can be modeled as a partial monitoring problem, doing so yields weaker results. In [21], the authors present problem-dependent bounds from which a regret bound of the form O(K2 log T) can be deduced for the dueling bandit problem, whereas our work achieves a linear dependence in K. 4 Method We now present two algorithms that find Copeland winners. 4.1 Copeland Confidence Bound (CCB) CCB (see Algorithm 1) is based on the principle of optimism followed by pessimism: it maintains optimistic and pessimistic estimates of the preference matrix, i.e., matrices U and L (Line 6). It uses U to choose an optimistic Copeland winner ac (Lines 7–9 and 11–12), i.e., an arm that has some chance of being a Copeland winner. Then, it uses L to choose an opponent ad (Line 13), i.e., an arm deemed likely to discredit the hypothesis that ac is indeed a Copeland winner. More precisely, an optimistic estimate of the Copeland score of each arm ai is calculated using U (Line 7), and ac is selected from the set of top scorers, with preference given to those in a shortlist, Bt (Line 11). These are arms that have, roughly speaking, been optimistic winners throughout history. To maintain Bt, as soon as CCB discovers that the optimistic Copeland score of an arm is lower than the pessimistic Copeland score of another arm, it purges the former from Bt (Line 9B). The mechanism for choosing the opponent ad is as follows. The matrices U and L define a confidence interval around pij for each i and j. In relation to ac, there are three types of arms: (1) arms aj s.t. the confidence region of pcj is strictly above 0.5, (2) arms aj s.t. the confidence region of pcj is strictly below 0.5, and (3) arms aj s.t. the confidence region of pcj contains 0.5. Note that an arm of type (1) or (2) at time t0 may become an arm of type (3) at time t > t0 even without queries to the corresponding pair as the size of the confidence intervals increases as time goes on. 1Cf. [10, Equation 9 in §4.1.1] and [11, Theorem 1]. 3 Algorithm 1 Copeland Confidence Bound Input: A Copeland dueling bandit problem and an exploration parameter ↵> 1 2. 1: W = [wij] 0K⇥K // 2D array of wins: wij is the number of times ai beat aj 2: B1 = {a1, . . . , aK} // potential best arms 3: Bi 1 = ? for each i = 1, . . . , K // potential to beat ai 4: LC = K // estimated max losses of a Copeland winner 5: for t = 1, 2, . . . do 6: U:=[uij]= W W+WT + q ↵ln t W+WT and L:=[lij]= W W+WT − q ↵ln t W+WT , with uii =lii = 1 2, 8i 7: Cpld(ai) = # " k | uik ≥1 2, k 6= i and Cpld(ai) = # " k | lik ≥1 2, k 6= i 8: Ct = {ai | Cpld(ai) = maxj Cpld(aj)} 9: Set Bt Bt−1 and Bi t Bi t−1 and update as follows: A. Reset disproven hypotheses: If for any i and aj 2 Bi t we have lij > 0.5, reset Bt, LC and Bk t for all k (i.e., set them to their original values as in Lines 2–4 above). B. Remove non-Copeland winners: For each ai 2 Bt, if Cpld(ai) < Cpld(aj) holds for any j, set Bt Bt \ {ai}, and if |Bi t| 6= LC + 1, then set Bi t {ak|uik < 0.5}. However, if Bt = ?, reset Bt, LC and Bk t for all k. C. Add Copeland winners: For any ai 2 Ct with Cpld(ai) = Cpld(ai), set Bt Bt [ {ai}, Bi t ? and LC K −1 −Cpld(ai). For each j 6= i, if we have |Bj t | < LC + 1, set Bj t ?, and if |Bj t |>LC+1, randomly choose LC+1 elements of Bj t and remove the rest. 10: With probability 1/4, sample (c, d) uniformly from the set {(i, j) | aj 2 Bi t and 0.5 2 [lij, uij]} (if it is non-empty) and skip to Line 14. 11: If Bt \ Ct 6= ?, then with probability 2/3, set Ct Bt \ Ct. 12: Sample ac from Ct uniformly at random. 13: With probability 1/2, choose the set Bi to be either Bi t or {a1, . . . , aK} and then set d arg max{j2Bi | ljc0.5} ujc. If there is a tie, d is not allowed to be equal to c. 14: Compare arms ac and ad and increment wcd or wdc depending on which arm wins. 15: end for CCB always chooses ad from arms of type (3) because comparing ac and a type (3) arm is most informative about the Copeland score of ac. Among arms of type (3), CCB favors those that have confidently beaten arm ac in the past (Line 13), i.e., arms that in some round t0 < t were of type (2). Such arms are maintained in a shortlist of “formidable” opponents (Bi t) that are likely to confirm that ai is not a Copeland winner; these arms are favored when selecting ad (Lines 10 and 13). The sets Bi t are what speed up the elimination of non-Copeland winners, enabling regret bounds that scale asymptotically with K rather than K2. Specifically, for a non-Copeland winner ai, the set Bi t will eventually contain LC +1 strong opponents for ai (Line 4.1C), where LC is the number of losses of each Copeland winner. Since LC is typically small (cf. Appendix C.3), asymptotically this leads to a bound of only O(log T) on the number of time-steps when ai is chosen as an optimistic Copeland winner, instead of a bound of O(K log T), which a more naive algorithm would produce. 4.2 Scalable Copeland Bandits (SCB) SCB is designed to handle dueling bandit problems with large numbers of arms. It is based on an arm-identification algorithm, described in Algorithm 2, designed for a PAC setting, i.e., it finds an ✏-Copeland winner with probability 1 −δ, although we are primarily interested in the case with ✏= 0. Algorithm 2 relies on a reduction to a K-armed bandit problem where we have direct access Algorithm 2 Approximate Copeland Bandit Solver Input: A Copeland dueling bandit problem with preference matrix P = [pij], failure probability δ > 0, and approximation parameter ✏> 0. Also, define [K] := {1, . . . , K}. 1: Define a random variable reward(i) for i 2 [K] as the following procedure: pick a uniformly random j 6= i from [K]; query the pair (ai, aj) sufficiently many times in order to determine w.p. at least 1 −δ/K2 whether pij > 1/2; return 1 if pij > 0.5 and 0 otherwise. 2: Invoke Algorithm 4, where in each of its calls to reward(i), the feedback is determined by the above stochastic process. Return: The same output returned by Algorithm 4. 4 to a noisy version of the Copeland score; the process of estimating the score of arm ai consists of comparing ai to a random arm aj until it becomes clear which arm beats the other. The sample complexity bound, which yields the regret bound, is achieved by combining a bound for K-armed bandits and a bound on the number of arms that can have a high Copeland score. Algorithm 2 calls a K-armed bandit algorithm as a subroutine. To this end, we use the KL-based arm-elimination algorithm, a slight modification of Algorithm 2 in [22]: it implements an elimination tournament with confidence regions based on the KL-divergence between probability distributions. The interested reader can find the pseudo-code in Algorithm 4 contained in Appendix J. Combining this with the squaring trick, a modification of the doubling trick that reduces the number of partitions from log T to log log T, the SCB algorithm, described in Algorithm 3, repeatedly calls Algorithm 2 but force-terminates if an increasing threshold is reached. If it terminates early, then the identified arm is played against itself until the threshold is reached. Algorithm 3 Scalable Copeland Bandits Input: A Copeland dueling bandit problem with preference matrix P = [pij] 1: for all r = 1, 2, . . . do 2: Set T = 22r and run Algorithm 2 with failure probability log(T)/T in order to find an exact Copeland winner (✏= 0); force-terminate if it requires more than T queries. 3: Let T0 be the number of queries used by invoking Algorithm 2, and let ai be the arm produced by it; query the pair (ai, ai) T −T0 times. 4: end for 5 Theoretical Results In this section, we present regret bounds for both CCB and SCB. Assuming that the number of Copeland winners and the number of losses of each Copeland winner are bounded,2 CCB’s regret bound takes the form O(K2 + K log T), while SCB’s is of the form O(K log K log T). Note that these bounds are not directly comparable. When there are relatively few arms, CCB is expected to perform better. By contrast, when there are many arms SCB is expected to be superior. Appendix A in the supplementary material provides empirical evidence to support these expectations. Throughout this section we impose the following condition on the preference matrix: A There are no ties, i.e., for all pairs (ai, aj) with i 6= j, we have pij 6= 0.5. This assumption is not very restrictive in practice. For example, in the ranker evaluation setting from information retrieval, each arm corresponds to a ranker, a complex and highly engineered system, so it is unlikely that two rankers are indistinguishable. Furthermore, some of the results we present in this section actually hold under even weaker assumptions. However, for the sake of clarity, we defer a discussion of these nuanced differences to Appendix F in the supplementary material. 5.1 Copeland Confidence Bound (CCB) In this section, we provide a rough outline of our argument for the bound on the regret accumulated by Algorithm 1. For a more detailed argument, the interested reader is referred to Appendix E. Consider a K-armed Copeland bandit problem with arms a1, . . . , aK and preference matrix P = [pij], such that arms a1, . . . , aC are the Copeland winners, with C being the number of Copeland winners. Moreover, we define LC to be the number of arms to which a Copeland winner loses in expectation. Using this notation, our expected regret bound for CCB takes the form: O ⇣ K2+(C+LC)K ln T ∆2 ⌘ (1) Here, ∆is a notion of gap defined in Appendix E, which is an improvement upon the smallest gap between any pair of arms. This result is proven in two steps. First, we bound the number of comparisons involving nonCopeland winners, yielding a result of the form O(K2 ln T). Second, Theorem 3 closes the gap 2See Appendix C.3 in the supplementary material for experimental evidence that this is the case in practice. 5 between this bound and the one in (1) by showing that, beyond a certain time horizon, CCB selects non-Copeland winning arms as the optimistic Copeland winner very infrequently. Theorem 3. Given a Copeland bandit problem satisfying Assumption A and any δ > 0 and ↵> 0.5, there exist constants A(1) δ and A(2) δ such that, with probability 1−δ, the regret accumulated by CCB is bounded by the following: A(1) δ + A(2) δ p ln T + 2K(C + LC + 1) ∆2 ln T. Using the high probability regret bound given in Theorem 3, we can deduce the expected regret result claimed in (1) for ↵> 1, as a corollary by integrating δ over the interval [0, 1]. 5.2 Scalable Copeland Bandits We now turn to our regret result for SCB, which lowers the K2 dependence in the additive constant of CCB’s regret result to K log K. We begin by defining the relevant quantities: Definition 4. Given a K-armed Copeland bandit problem and an arm ai, we define the following: 1. Recall that cpld(ai) := Cpld(ai)/(K −1) is called the normalized Copeland score. 2. ai is an ✏-Copeland-winner if 1 −cpld(ai) (1 −cpld(a1)) (1 + ✏). 3. ∆i := max{cpld(a1) −cpld(ai), 1/(K −1)} and Hi := P j6=i 1 ∆2 ij , with H1 := maxi Hi. 4. ∆✏ i = max {∆i, ✏(1 −cpld(a1))}. We now state our main scalability result: Theorem 5. Given a Copeland bandit problem satisfying Assumption A, the expected regret of SCB (Algorithm 3) is bounded by O ⇣ 1 K PK i=1 Hi(1−cpld(ai)) ∆2 i ⌘ log(T), which in turn can be bounded by O ⇣ K(LC+log K) log T ∆2 min ⌘ , where LC and ∆min are as in Definition 10. Recall that SCB is based on Algorithm 2, an arm-identification algorithm that identifies a Copeland winner with high probability. As a result, Theorem 5 is an immediate corollary of Lemma 6, obtained by using the well known squaring trick. As mentioned in Section 4.2, the squaring trick is a minor variation on the doubling trick that reduces the number of partitions from log T to log log T. Lemma 6 is a result for finding an ✏-approximate Copeland winner (see Definition 4.2). Note that, for the regret setting, we are only interested in the special case with ✏= 0, i.e., the problem of identifying the best arm. Lemma 6. With probability 1 −δ, Algorithm 2 finds an ✏-approximate Copeland winner by time O 1 K K X i=1 Hi(1 −cpld(ai)) (∆✏ i)2 ! log(1/δ) O * H1 * log(K) + min " ✏−2, LC ++ log(1/δ). assuming3 δ = (KH1)⌦(1). In particular when there is a Condorcet winner (cpld(a1) = 1, LC = 0) or more generally cpld(a1) = 1−O(1/K), LC = O(1), an exact solution is found with probability at least 1−δ by using an expected number of queries of at most O (H1(LC + log K)) log(1/δ). In the remainder of this section, we sketch the main ideas underlying the proof of Lemma 6, detailed in Appendix I in the supplementary material. We first treat the simpler deterministic setting in which a single query suffices to determine which of a pair of arms beats the other. While a solution can easily be obtained using K(K −1)/2 many queries, we aim for one with query complexity linear in K. The main ingredients of the proof are as follows: 1. cpld(ai) is the mean of a Bernoulli random variable defined as such: sample uniformly at random an index j from the set {1, . . . , K} \ {i} and return 1 if ai beats aj and 0 otherwise. 2. Applying a KL-divergence based arm-elimination algorithm (Algorithm 4) to the K-armed bandit arising from the above observation, we obtain a bound by dividing the arms into two groups: those with Copeland scores close to that of the Copeland winners, and the rest. For the former, we use the result from Lemma 7 to bound the number of such arms; for the latter, the resulting regret is dealt with using Lemma 8, which exploits the possible distribution of Copeland scores. 3The exact expression requires replacing log(1/δ) with log(KH1/δ). 6 104 105 106 107 108 time 0 200000 400000 600000 800000 1000000 1200000 cumulative regret MSLR Informational CM with 5 Rankers RUCB RankEl PBR SCB SAVAGE CCB Figure 1: Small-scale regret results for a 5-armed Copeland dueling bandit problem arising from ranker evaluation. Let us state the two key lemmas here: Lemma 7. Let D ⇢{a1, . . . , aK} be the set of arms for which cpld(ai) ≥1 −d/(K −1), that is arms that are beaten by at most d arms. Then |D| 2d + 1. Proof. Consider a fully connected directed graph, whose node set is D and the arc (ai, aj) is in the graph if arm ai beats arm aj. By the definition of cpld, the in-degree of any node i is upper bounded by d. Therefore, the total number of arcs in the graph is at most |D|d. Now, the full connectivity of the graph implies that the total number of arcs in the graph is exactly |D|(|D| −1)/2. Thus, |D|(|D| −1)/2 |D|d and the claim follows. Lemma 8. The sum P {i|cpld(ai)<1} 1 1−cpld(ai) is in O(K log K). Proof. Follows from Lemma 7 via a careful partitioning of arms. Details are in Appendix I. Given the structure of Algorithm 2, the stochastic case is similar to the deterministic case for the following reason: while the latter requires a single comparison between arms ai and aj to determine which arm beats the other, in the stochastic case, we need roughly log(K log(∆−1 ij )/δ) ∆2 ij comparisons between the two arms to correctly answer the same question with probability at least 1 −δ/K2. 6 Experiments To evaluate our methods CCB and SCB, we apply them to a Copeland dueling bandit problem arising from ranker evaluation in the field of information retrieval (IR) [23]. We follow the experimental approach in [3, 13] and use a preference matrix to simulate comparisons between each pair of arms (ai, aj) by drawing samples from Bernoulli random variables with mean pij. We compare our proposed algorithms against the state of the art K-armed dueling bandit algorithms, RUCB [13], Copeland SAVAGE, PBR and RankEl. We include RUCB in order to verify our claim that K-armed dueling bandit algorithms that assume the existence of a Condorcet winner have linear regret if applied to a Copeland dueling bandit problem without a Condorcet winner. More specifically, we consider a 5-armed dueling bandit problem obtained from comparing five rankers, none of whom beat the other four, i.e. there is no Condorcet winner. Due to lack of space, the details of the experimental setup have been included in Appendix B4. Figure 1 shows the regret accumulated by CCB, SCB, the Copeland variants of SAVAGE, PBR, RankEl and RUCB on this problem. The horizontal time axis uses a log scale, while the vertical axis, which measures cumulative regret, uses a linear scale. CCB outperforms all other algorithms in this 5-armed experiment. Note that three of the baseline algorithms under consideration here (i.e., SAVAGE, PBR and RankEl) require the horizon of the experiment as an input, either directly or through a failure probability δ, 4Sample code and the preference matrices used in the experiments can be found at http://bit.ly/nips15data. 7 which we set to 1/T (with T being the horizon), in order to obtain a finite-horizon regret algorithm, as prescribed in [3, 10]. Therefore, we ran independent experiments with varying horizons and recorded the accumulated regret: the markers on the curves corresponding to these algorithms represent these numbers. Consequently, the regret curves are not monotonically increasing. For instance, SAVAGE’s cumulative regret at time 2 ⇥107 is lower than at time 107 because the runs that produced the former number were not continuations of those that resulted in the latter, but rather completely independent. Furthermore, RUCB’s cumulative regret grows linearly, which is why the plot does not contain the entire curve. Appendix A contains further experimental results, including those of our scalability experiment. 7 Conclusion In many applications that involve learning from human behavior, feedback is more reliable when provided in the form of pairwise preferences. In the dueling bandit problem, the goal is to use such pairwise feedback to find the most desirable choice from a set of options. Most existing work in this area assumes the existence of a Condorcet winner, i.e., an arm that beats all other arms with probability greater than 0.5. Even though these results have the advantage that the bounds they provide scale linearly in the number of arms, their main drawback is that in practice the Condorcet assumption is too restrictive. By contrast, other results that do not impose the Condorcet assumption achieve bounds that scale quadratically in the number of arms. In this paper, we set out to solve a natural generalization of the problem, where instead of assuming the existence of a Condorcet winner, we seek to find a Copeland winner, which is guaranteed to exist. We proposed two algorithms to address this problem: one for small numbers of arms, called CCB, and a more scalable one, called SCB, that works better for problems with large numbers of arms. We provided theoretical results bounding the regret accumulated by each algorithm: these results improve substantially over existing results in the literature, by filling the gap that exists in the current results, namely the discrepancy between results that make the Condorcet assumption and are of the form O(K log T) and the more general results that are of the form O(K2 log T). Moreover, we have included in the supplementary material empirical results on both a dueling bandit problem arising from a real-life application domain and a large-scale synthetic problem used to test the scalability of SCB. The results of these experiments show that CCB beats all existing Copeland dueling bandit algorithms, while SCB outperforms CCB on the large-scale problem. One open question raised by our work is how to devise an algorithm that has the benefits of both CCB and SCB, i.e., the scalability of the latter together with the former’s better dependence on the gaps. At this point, it is not clear to us how this could be achieved. Another interesting direction for future work is an extension of both CCB and SCB to problems with a continuous set of arms. Given the prevalence of cyclical preference relationships in practice, we hypothesize that the nonexistence of a Condorcet winner is an even greater issue when dealing with an infinite number of arms. Given that both our algorithms utilize confidence bounds to make their choices, we anticipate that continuous-armed UCB-style algorithms like those proposed in [24, 25, 26, 27, 28, 29, 30] can be combined with our ideas to produce a solution to the continuous-armed Copeland bandit problem that does not rely on the convexity assumptions made by algorithms such as the one proposed in [31]. Finally, it is also interesting to expand our results to handle scores other than the Copeland score, such as an ✏-insensitive variant of the Copeland score (as in [12]), or completely different notions of winners, such as the Borda, Random Walk or von Neumann winners (see, e.g., [32, 19]). Acknowledgments We would like to thank Nir Ailon and Ulle Endriss for helpful discussions. This research was supported by Amsterdam Data Science, the Dutch national program COMMIT, Elsevier, the European Community’s Seventh Framework Programme (FP7/2007-2013) under grant agreement nr 312827 (VOX-Pol), the ESF Research Network Program ELIAS, the Royal Dutch Academy of Sciences (KNAW) under the Elite Network Shifts project, the Microsoft Research Ph.D. program, the Netherlands eScience Center under project number 027.012.105, the Netherlands Institute for Sound and Vision, the Netherlands Organisation for Scientific Research (NWO) under project nrs 727.011.005, 612.001.116, HOR-11-10, 640.006.013, 612.066.930, CI-14-25, SH-322-15, the Yahoo! Faculty Research and Engagement Program, and Yandex. All content represents the opinion of the authors, which is not necessarily shared or endorsed by their respective employers and/or sponsors. 8 References [1] Y. Yue, J. Broder, R. Kleinberg, and T. Joachims. The K-armed dueling bandits problem. Journal of Computer and System Sciences, 78(5), 2012. [2] T. Joachims. Optimizing search engines using clickthrough data. In KDD, 2002. [3] Y. Yue and T. Joachims. Beat the mean bandit. In ICML, 2011. [4] K. Hofmann, S. Whiteson, and M. de Rijke. Balancing exploration and exploitation in listwise and pairwise online learning to rank for information retrieval. Information Retrieval, 16, 2013. [5] J. F¨urnkranz and E. H¨ullermeier, editors. Preference Learning. Springer-Verlag, 2010. [6] A. Schuth, F. Sietsma, S. Whiteson, D. Lefortier, and M. de Rijke. Multileaved comparisons for fast online evaluation. In CIKM, 2014. [7] L. Li, J. Kim, and I. Zitouni. Toward predicting the outcome of an A/B experiment for search relevance. In WSDM, 2015. [8] M. Zoghi, S. Whiteson, M. de Rijke, and R. Munos. Relative confidence sampling for efficient on-line ranker evaluation. In WSDM, 2014. [9] M. Schulze. A new monotonic, clone-independent, reversal symmetric, and Condorcetconsistent single-winner election method. Social Choice and Welfare, 36(2):267–303, 2011. [10] T. Urvoy, F. Clerot, R. F´eraud, and S. Naamane. Generic exploration and k-armed voting bandits. In ICML, 2013. [11] R. Busa-Fekete, B. Sz¨or´enyi, P. Weng, W. Cheng, and E. H¨ullermeier. Top-k selection based on adaptive sampling of noisy preferences. In ICML, 2013. [12] R. Busa-Fekete, B. Sz¨or´enyi, and E. H¨ullermeier. PAC rank elicitation through adaptive sampling of stochastic pairwise preferences. In AAAI, 2014. [13] M. Zoghi, S. Whiteson, R. Munos, and M. de Rijke. Relative upper confidence bound for the K-armed dueling bandits problem. In ICML, 2014. [14] R. Kohavi, A. Deng, B. Frasca, T. Walker, Y. Xu, and N. Pohlmann. Online controlled experiments at large scale. In KDD, 2013. [15] W. R. Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, pages 285–294, 1933. [16] N. Ailon, Z. Karnin, and T. Joachims. Reducing dueling bandits to cardinal bandits. In ICML, 2014. [17] M. Zoghi, S. Whiteson, and M. de Rijke. MergeRUCB: A method for large-scale online ranker evaluation. In WSDM, 2015. [18] S. Negahban, S. Oh, and D. Shah. Iterative ranking from pair-wise comparisons. In NIPS, 2012. [19] M. Dud´ık, K. Hofmann, R. E. Schapire, A. Slivkins, and M. Zoghi. Contextual dueling bandits. In COLT, 2015. [20] A. Piccolboni and C. Schindelhauer. Discrete prediction games with arbitrary feedback and loss. In COLT, 2001. [21] G. Bart´ok, N. Zolghadr, and C. Szepesv´ari. An adaptive algorithm for finite stochastic partial monitoring. In ICML, 2012. [22] O. Capp´e, A. Garivier, O. Maillard, R. Munos, G. Stoltz, et al. Kullback–leibler upper confidence bounds for optimal sequential allocation. The Annals of Statistics, 41(3), 2013. [23] C. Manning, P. Raghavan, and H. Sch¨utze. Introduction to Information Retrieval. Cambridge University Press, 2008. [24] R. Kleinberg, A. Slivkins, and E. Upfa. Multi-armed bandits in metric space. In STOC, 2008. [25] S. Bubeck, R. Munos, G. Stoltz, and C. Szepesvari. X-armed bandits. JMLR, 12, 2011. [26] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In ICML, 2010. [27] R. Munos. Optimistic optimization of a deterministic function without the knowledge of its smoothness. In NIPS, 2011. [28] A. D. Bull. Convergence rates of efficient global optimization algorithms. JMLR, 12, 2011. [29] N. de Freitas, A. Smola, and M. Zoghi. Exponential regret bounds for Gaussian process bandits with deterministic observations. In ICML, 2012. [30] M. Valko, A. Carpentier, and R. Munos. Stochastic simultaneous optimistic optimization. In ICML, 2013. [31] Y. Yue and T. Joachims. Interactively optimizing information retrieval systems as a dueling bandits problem. In ICML, 2009. [32] A. Altman and M. Tennenholtz. Axiomatic foundations for ranking systems. JAIR, 2008. 9 | 2015 | 239 |
5,746 | Combinatorial Bandits Revisited Richard Combes∗ M. Sadegh Talebi† Alexandre Proutiere† Marc Lelarge‡ ∗Centrale-Supelec, L2S, Gif-sur-Yvette, FRANCE † Department of Automatic Control, KTH, Stockholm, SWEDEN ‡ INRIA & ENS, Paris, FRANCE richard.combes@supelec.fr,{mstms,alepro}@kth.se,marc.lelarge@ens.fr Abstract This paper investigates stochastic and adversarial combinatorial multi-armed bandit problems. In the stochastic setting under semi-bandit feedback, we derive a problem-specific regret lower bound, and discuss its scaling with the dimension of the decision space. We propose ESCB, an algorithm that efficiently exploits the structure of the problem and provide a finite-time analysis of its regret. ESCB has better performance guarantees than existing algorithms, and significantly outperforms these algorithms in practice. In the adversarial setting under bandit feedback, we propose COMBEXP, an algorithm with the same regret scaling as state-of-the-art algorithms, but with lower computational complexity for some combinatorial problems. 1 Introduction Multi-Armed Bandit (MAB) problems [1] constitute the most fundamental sequential decision problems with an exploration vs. exploitation trade-off. In such problems, the decision maker selects an arm in each round, and observes a realization of the corresponding unknown reward distribution. Each decision is based on past decisions and observed rewards. The objective is to maximize the expected cumulative reward over some time horizon by balancing exploitation (arms with higher observed rewards should be selected often) and exploration (all arms should be explored to learn their average rewards). Equivalently, the performance of a decision rule or algorithm can be measured through its expected regret, defined as the gap between the expected reward achieved by the algorithm and that achieved by an oracle algorithm always selecting the best arm. MAB problems have found applications in many fields, including sequential clinical trials, communication systems, economics, see e.g. [2, 3]. In this paper, we investigate generic combinatorial MAB problems with linear rewards, as introduced in [4]. In each round n ≥1, a decision maker selects an arm M from a finite set M ⊂{0, 1}d and receives a reward M ⊤X(n) = Pd i=1 MiXi(n). The reward vector X(n) ∈Rd + is unknown. We focus here on the case where all arms consist of the same number m of basic actions in the sense that ∥M∥1 = m, ∀M ∈M. After selecting an arm M in round n, the decision maker receives some feedback. We consider both (i) semi-bandit feedback under which after round n, for all i ∈{1, . . . , d}, the component Xi(n) of the reward vector is revealed if and only if Mi = 1; (ii) bandit feedback under which only the reward M ⊤X(n) is revealed. Based on the feedback received up to round n −1, the decision maker selects an arm for the next round n, and her objective is to maximize her cumulative reward over a given time horizon consisting of T rounds. The challenge in these problems resides in the very large number of arms, i.e., in its combinatorial structure: the size of M could well grow as dm. Fortunately, one may hope to exploit the problem structure to speed up the exploration of sub-optimal arms. We consider two instances of combinatorial bandit problems, depending on how the sequence of reward vectors is generated. We first analyze the case of stochastic rewards, where for all 1 Algorithm LLR CUCB CUCB ESCB [9] [10] [11] (Theorem 5) Regret O m3d∆max ∆2 min log(T) O m2d ∆min log(T) O md ∆min log(T) O √md ∆min log(T) Table 1: Regret upper bounds for stochastic combinatorial optimization under semi-bandit feedback. i ∈{1, . . . , d}, (Xi(n))n≥1 are i.i.d. with Bernoulli distribution of unknown mean. The reward sequences are also independent across i. We then address the problem in the adversarial setting where the sequence of vectors X(n) is arbitrary and selected by an adversary at the beginning of the experiment. In the stochastic setting, we provide sequential arm selection algorithms whose performance exceeds that of existing algorithms, whereas in the adversarial setting, we devise simple algorithms whose regret have the same scaling as that of state-of-the-art algorithms, but with lower computational complexity. 2 Contribution and Related Work 2.1 Stochastic combinatorial bandits under semi-bandit feedback Contribution. (a) We derive an asymptotic (as the time horizon T grows large) regret lower bound satisfied by any algorithm (Theorem 1). This lower bound is problem-specific and tight: there exists an algorithm that attains the bound on all problem instances, although the algorithm might be computationally expensive. To our knowledge, such lower bounds have not been proposed in the case of stochastic combinatorial bandits. The dependency in m and d of the lower bound is unfortunately not explicit. We further provide a simplified lower bound (Theorem 2) and derive its scaling in (m, d) in specific examples. (b) We propose ESCB (Efficient Sampling for Combinatorial Bandits), an algorithm whose regret scales at most as O(√md∆−1 min log(T)) (Theorem 5), where ∆min denotes the expected reward difference between the best and the second-best arm. ESCB assigns an index to each arm. The index of given arm can be interpreted as performing likelihood tests with vanishing risk on its average reward. Our indexes are the natural extension of KL-UCB and UCB1 indexes defined for unstructured bandits [5, 21]. Numerical experiments for some specific combinatorial problems are presented in the supplementary material, and show that ESCB significantly outperforms existing algorithms. Related work. Previous contributions on stochastic combinatorial bandits focused on specific combinatorial structures, e.g. m-sets [6], matroids [7], or permutations [8]. Generic combinatorial problems were investigated in [9, 10, 11, 12]. The proposed algorithms, LLR and CUCB are variants of the UCB algorithm, and their performance guarantees are presented in Table 1. Our algorithms improve over LLR and CUCB by a multiplicative factor of √m. 2.2 Adversarial combinatorial problems under bandit feedback Contribution. We present algorithm COMBEXP, whose regret is O q m3T(d + m1/2λ−1) log µ−1 min , where µmin = mini∈[d] 1 m|M| P M∈M Mi and λ is the smallest nonzero eigenvalue of the matrix E[MM ⊤] when M is uniformly distributed over M (Theorem 6). For most problems of interest m(dλ)−1 = O(1) [4] and µ−1 min = O(poly(d/m)), so that COMBEXP has O( p m3dT log(d/m)) regret. A known regret lower bound is Ω(m √ dT) [13], so the regret gap between COMBEXP and this lower bound scales at most as m1/2 up to a logarithmic factor. Related work. Adversarial combinatorial bandits have been extensively investigated recently, see [13] and references therein. Some papers consider specific instances of these problems, e.g., shortest-path routing [14], m-sets [15], and permutations [16]. For generic combinatorial problems, known regret lower bounds scale as Ω √ mdT and Ω m √ dT (if d ≥2m) in the case of semibandit and bandit feedback, respectively [13]. In the case of semi-bandit feedback, [13] proposes 2 Algorithm Regret Lower Bound [13] Ω m √ dT , if d ≥2m COMBAND [4] O r m3dT log d m 1 + 2m dλ EXP2 WITH JOHN’S EXPLORATION [18] O q m3dT log d m COMBEXP (Theorem 6) O r m3dT 1 + m1/2 dλ log µ−1 min Table 2: Regret of various algorithms for adversarial combinatorial bandits with bandit feedback. Note that for most combinatorial classes of interests, m(dλ)−1 = O(1) and µ−1 min = O(poly(d/m)). OSMD, an algorithm whose regret upper bound matches the lower bound. [17] presents an algorithm with O(m p dL⋆ T log(d/m)) regret where L⋆ T is the total reward of the best arm after T rounds. For problems with bandit feedback, [4] proposes COMBAND and derives a regret upper bound which depends on the structure of arm set M. For most problems of interest, the regret under COMBAND is upper-bounded by O( p m3dT log(d/m)). [18] addresses generic linear optimization with bandit feedback and the proposed algorithm, referred to as EXP2 WITH JOHN’S EXPLORATION, has a regret scaling at most as O( p m3dT log(d/m)) in the case of combinatorial structure. As we show next, for many combinatorial structures of interest (e.g. m-sets, matchings, spanning trees), COMBEXP yields the same regret as COMBAND and EXP2 WITH JOHN’S EXPLORATION, with lower computational complexity for a large class of problems. Table 2 summarises known regret bounds. Example 1: m-sets. M is the set of all d-dimensional binary vectors with m non-zero coordinates. We have µmin = m d and λ = m(d−m) d(d−1) (refer to the supplementary material for details). Hence when m = o(d), the regret upper bound of COMBEXP becomes O( p m3dT log(d/m)), which is the same as that of COMBAND and EXP2 WITH JOHN’S EXPLORATION. Example 2: matchings. The set of arms M is the set of perfect matchings in Km,m. d = m2 and |M| = m!. We have µmin = 1 m, and λ = 1 m−1. Hence the regret upper bound of COMBEXP is O( p m5T log(m)), the same as for COMBAND and EXP2 WITH JOHN’S EXPLORATION. Example 3: spanning trees. M is the set of spanning trees in the complete graph KN. In this case, d = N 2 , m = N −1, and by Cayley’s formula M has N N−2 arms. log µ−1 min ≤2N for N ≥2 and m dλ < 7 when N ≥6, The regret upper bound of COMBAND and EXP2 WITH JOHN’S EXPLORATION becomes O( p N 5T log(N)). As for COMBEXP, we get the same regret upper bound O( p N 5T log(N)). 3 Models and Objectives We consider MAB problems where each arm M is a subset of m basic actions taken from [d] = {1, . . . , d}. For i ∈[d], Xi(n) denotes the reward of basic action i in round n. In the stochastic setting, for each i, the sequence of rewards (Xi(n))n≥1 is i.i.d. with Bernoulli distribution with mean θi. Rewards are assumed to be independent across actions. We denote by θ = (θ1, . . . , θd)⊤∈ Θ = [0, 1]d the vector of unknown expected rewards of the various basic actions. In the adversarial setting, the reward vector X(n) = (X1(n), . . . , Xd(n))⊤∈[0, 1]d is arbitrary, and the sequence (X(n), n ≥1) is decided (but unknown) at the beginning of the experiment. The set of arms M is an arbitrary subset of {0, 1}d, such that each of its elements M has m basic actions. Arm M is identified with a binary column vector (M1, . . . , Md)⊤, and we have ∥M∥1 = m, ∀M ∈M. At the beginning of each round n, a policy π, selects an arm M π(n) ∈M based on the arms chosen in previous rounds and their observed rewards. The reward of arm M π(n) selected in round n is P i∈[d] M π i (n)Xi(n) = M π(n)⊤X(n). 3 We consider both semi-bandit and bandit feedbacks. Under semi-bandit feedback and policy π, at the end of round n, the outcome of basic actions Xi(n) for all i ∈M π(n) are revealed to the decision maker, whereas under bandit feedback, M π(n)⊤X(n) only can be observed. Let Π be the set of all feasible policies. The objective is to identify a policy in Π maximizing the cumulative expected reward over a finite time horizon T. The expectation is here taken with respect to possible randomness in the rewards (in the stochastic setting) and the possible randomization in the policy. Equivalently, we aim at designing a policy that minimizes regret, where the regret of policy π ∈Π is defined by: Rπ(T) = max M∈M E " T X n=1 M ⊤X(n) # −E " T X n=1 M π(n)⊤X(n) # . Finally, for the stochastic setting, we denote by µM(θ) = M ⊤θ the expected reward of arm M, and let M ⋆(θ) ∈M, or M ⋆for short, be any arm with maximum expected reward: M ⋆(θ) ∈ arg maxM∈M µM(θ). In what follows, to simplify the presentation, we assume that the optimal M ⋆is unique. We further define: µ⋆(θ) = M ⋆⊤θ, ∆min = minM̸=M ⋆∆M where ∆M = µ⋆(θ) −µM(θ), and ∆max = maxM(µ⋆(θ) −µM(θ)). 4 Stochastic Combinatorial Bandits under Semi-bandit Feedback 4.1 Regret Lower Bound Given θ, define the set of parameters that cannot be distinguished from θ when selecting action M ⋆(θ), and for which arm M ⋆(θ) is suboptimal: B(θ) = {λ ∈Θ : M ⋆ i (θ)(θi −λi) = 0, ∀i, µ⋆(λ) > µ⋆(θ)}. We define X = (R+)|M| and kl(u, v) the Kullback-Leibler divergence between Bernoulli distributions of respective means u and v, i.e., kl(u, v) = u log(u/v) + (1 −u) log((1 −u)/(1 −v)). Finally, for (θ, λ) ∈Θ2, we define the vector kl(θ, λ) = (kl(θi, λi))i∈[d]. We derive a regret lower bound valid for any uniformly good algorithm. An algorithm π is uniformly good iff Rπ(T) = o(T α) for all α > 0 and all parameters θ ∈Θ. The proof of this result relies on a general result on controlled Markov chains [19]. Theorem 1 For all θ ∈Θ, for any uniformly good policy π ∈Π, lim infT →∞ Rπ(T ) log(T ) ≥c(θ), where c(θ) is the optimal value of the optimization problem: inf x∈X X M∈M xM(M ⋆(θ) −M)⊤θ s.t. X M∈M xMM ⊤ kl(θ, λ) ≥1 , ∀λ ∈B(θ). (1) Observe first that optimization problem (1) is a semi-infinite linear program which can be solved for any fixed θ, but its optimal value is difficult to compute explicitly. Determining how c(θ) scales as a function of the problem dimensions d and m is not obvious. Also note that (1) has the following interpretation: assume that (1) has a unique solution x⋆. Then any uniformly good algorithm must select action M at least x⋆ M log(T) times over the T first rounds. From [19], we know that there exists an algorithm which is asymptotically optimal, so that its regret matches the lower bound of Theorem 1. However this algorithm suffers from two problems: it is computationally infeasible for large problems since it involves solving (1) T times, furthermore the algorithm has no finite time performance guarantees, and numerical experiments suggest that its finite time performance on typical problems is rather poor. Further remark that if M is the set of singletons (classical bandit), Theorem 1 reduces to the Lai-Robbins bound [20] and if M is the set of m-sets (bandit with multiple plays), Theorem 1 reduces to the lower bound derived in [6]. Finally, Theorem 1 can be generalized in a straightforward manner for when rewards belong to a one-parameter exponential family of distributions (e.g., Gaussian, Exponential, Gamma etc.) by replacing kl by the appropriate divergence measure. 4 A Simplified Lower Bound We now study how the regret c(θ) scales as a function of the problem dimensions d and m. To this aim, we present a simplified regret lower bound. Given θ, we say that a set H ⊂M \ M ⋆has property P(θ) iff, for all (M, M ′) ∈H2, M ̸= M ′ we have MiM ′ i(1 − M ⋆ i (θ)) = 0 for all i. We may now state Theorem 2. Theorem 2 Let H be a maximal (inclusion-wise) subset of M with property P(θ). Define β(θ) = minM̸=M ⋆ ∆M |M\M ⋆|. Then: c(θ) ≥ X M∈H β(θ) maxi∈M\M ⋆kl θi, 1 |M\M ⋆| P j∈M ⋆\M θj . Corollary 1 Let θ ∈[a, 1]d for some constant a > 0 and M be such that each arm M ∈M, M ̸= M ⋆has at most k suboptimal basic actions. Then c(θ) = Ω(|H|/k). Theorem 2 provides an explicit regret lower bound. Corollary 1 states that c(θ) scales at least with the size of H. For most combinatorial sets, |H| is proportional to d −m (see supplementary material for some examples), which implies that in these cases, one cannot obtain a regret smaller than O((d −m)∆−1 min log(T)). This result is intuitive since d −m is the number of parameters not observed when selecting the optimal arm. The algorithms proposed below have a regret of O(d√m∆−1 min log(T)), which is acceptable since typically, √m is much smaller than d. 4.2 Algorithms Next we present ESCB, an algorithm for stochastic combinatorial bandits that relies on arm indexes as in UCB1 [21] and KL-UCB [5]. We derive finite-time regret upper bounds for ESCB that hold even if we assume that ∥M∥1 ≤m, ∀M ∈M, instead of ∥M∥1 = m, so that arms may have different numbers of basic actions. 4.2.1 Indexes ESCB relies on arm indexes. In general, an index of arm M in round n, say bM(n), should be defined so that bM(n) ≥M ⊤θ with high probability. Then as for UCB1 and KL-UCB, applying the principle of optimism in face of uncertainty, a natural way to devise algorithms based on indexes is to select in each round the arm with the highest index. Under a given algorithm, at time n, we define ti(n) = Pn s=1 Mi(s) the number of times basic action i has been sampled. The empirical mean reward of action i is then defined as ˆθi(n) = (1/ti(n)) Pn s=1 Xi(s)Mi(s) if ti(n) > 0 and ˆθi(n) = 0 otherwise. We define the corresponding vectors t(n) = (ti(n))i∈[d] and ˆθ(n) = (ˆθi(n))i∈[d]. The indexes we propose are functions of the round n and of ˆθ(n). Our first index for arm M, referred to as bM(n, ˆθ(n)) or bM(n) for short, is an extension of KL-UCB index. Let f(n) = log(n) + 4m log(log(n)). bM(n, ˆθ(n)) is the optimal value of the following optimization problem: max q∈Θ M ⊤q s.t. (Mt(n))⊤kl(ˆθ(n), q) ≤f(n), (2) where we use the convention that for v, u ∈Rd, vu = (viui)i∈[d]. As we show later, bM(n) may be computed efficiently using a line search procedure similar to that used to determine KL-UCB index. Our second index cM(n, ˆθ(n)) or cM(n) for short is a generalization of the UCB1 and UCB-tuned indexes: cM(n) = M ⊤ˆθ(n) + v u u tf(n) 2 d X i=1 Mi ti(n) ! Note that, in the classical bandit problems with independent arms, i.e., when m = 1, bM(n) reduces to the KL-UCB index (which yields an asymptotically optimal algorithm) and cM(n) reduces to the UCB-tuned index. The next theorem provides generic properties of our indexes. An important consequence of these properties is that the expected number of times where bM ⋆(n, ˆθ(n)) or cM ⋆(n, ˆθ(n)) underestimate µ⋆(θ) is finite, as stated in the corollary below. 5 Theorem 3 (i) For all n ≥1, M ∈M and τ ∈[0, 1]d, we have bM(n, τ) ≤cM(n, τ). (ii) There exists Cm > 0 depending on m only such that, for all M ∈M and n ≥2: P[bM(n, ˆθ(n)) ≤M ⊤θ] ≤Cmn−1(log(n))−2. Corollary 2 P n≥1 P[bM ⋆(n, ˆθ(n)) ≤µ⋆] ≤1 + Cm P n≥2 n−1(log(n))−2 < ∞. Statement (i) in the above theorem is obtained combining Pinsker and Cauchy-Schwarz inequalities. The proof of statement (ii) is based on a concentration inequality on sums of empirical KL divergences proven in [22]. It enables to control the fluctuations of multivariate empirical distributions for exponential families. It should also be observed that indexes bM(n) and cM(n) can be extended in a straightforward manner to the case of continuous linear bandit problems, where the set of arms is the unit sphere and one wants to maximize the dot product between the arm and an unknown vector. bM(n) can also be extended to the case where reward distributions are not Bernoulli but lie in an exponential family (e.g. Gaussian, Exponential, Gamma, etc.), replacing kl by a suitably chosen divergence measure. A close look at cM(n) reveals that the indexes proposed in [10], [11], and [9] are too conservative to be optimal in our setting: there the “confidence bonus” Pd i=1 Mi ti(n) was replaced by (at least) m Pd i=1 Mi ti(n). Note that [10], [11] assume that the various basic actions are arbitrarily correlated, while we assume independence among basic actions. When independence does not hold, [11] provides a problem instance where the regret is at least Ω( md ∆min log(T)). This does not contradict our regret upper bound (scaling as O( d√m ∆min log(T))), since we have added the independence assumption. 4.2.2 Index computation While the index cM(n) is explicit, bM(n) is defined as the solution to an optimization problem. We show that it may be computed by a simple line search. For λ ≥0, w ∈[0, 1] and v ∈N, define: g(λ, w, v) = 1 −λv + p (1 −λv)2 + 4wvλ /2. Fix n, M, ˆθ(n) and t(n). Define I = {i : Mi = 1, ˆθi(n) ̸= 1}, and for λ > 0, define: F(λ) = X i∈I ti(n)kl(ˆθi(n), g(λ, ˆθi(n), ti(n))). Theorem 4 If I = ∅, bM(n) = ||M||1. Otherwise: (i) λ 7→F(λ) is strictly increasing, and F(R+) = R+. (ii) Define λ⋆as the unique solution to F(λ) = f(n). Then bM(n) = ||M||1 −|I|+ P i∈I g(λ⋆, ˆθi(n), ti(n)). Theorem 4 shows that bM(n) can be computed using a line search procedure such as bisection, as this computation amounts to solving the nonlinear equation F(λ) = f(n), where F is strictly increasing. The proof of Theorem 4 follows from KKT conditions and the convexity of the KL divergence. 4.2.3 The ESCB Algorithm The pseudo-code of ESCB is presented in Algorithm 1. We consider two variants of the algorithm based on the choice of the index ξM(n): ESCB-1 when ξM(n) = bM(n) and ESCB-2 if ξM(n) = cM(n). In practice, ESCB-1 outperforms ESCB-2. Introducing ESCB-2 is however instrumental in the regret analysis of ESCB-1 (in view of Theorem 3 (i)). The following theorem provides a finite time analysis of our ESCB algorithms. The proof of this theorem borrows some ideas from the proof of [11, Theorem 3]. Theorem 5 The regret under algorithms π ∈{ESCB-1, ESCB-2} satisfies for all T ≥1: Rπ(T) ≤16d√m∆−1 minf(T) + 4dm3∆−2 min + C′ m, where C′ m ≥0 does not depend on θ, d and T. As a consequence Rπ(T) = O(d√m∆−1 min log(T)) when T →∞. 6 Algorithm 1 ESCB for n ≥1 do Select arm M(n) ∈arg maxM∈M ξM(n). Observe the rewards, and update ti(n) and ˆθi(n), ∀i ∈M(n). end for Algorithm 2 COMBEXP Initialization: Set q0 = µ0, γ = q m log µ−1 min q m log µ−1 min+√ C(Cm2d+m)T and η = γC, with C = λ m3/2 . for n ≥1 do Mixing: Let q′ n−1 = (1 −γ)qn−1 + γµ0. Decomposition: Select a distribution pn−1 over M such that P M pn−1(M)M = mq′ n−1. Sampling: Select a random arm M(n) with distribution pn−1 and incur a reward Yn = P i Xi(n)Mi(n). Estimation: Let Σn−1 = E MM ⊤ , where M has law pn−1. Set ˜ X(n) = YnΣ+ n−1M(n), where Σ+ n−1 is the pseudo-inverse of Σn−1. Update: Set ˜qn(i) ∝qn−1(i) exp(η ˜ Xi(n)), ∀i ∈[d]. Projection: Set qn to be the projection of ˜qn onto the set P using the KL divergence. end for ESCB with time horizon T has a complexity of O(|M|T) as neither bM nor cM can be written as M ⊤y for some vector y ∈Rd. Assuming that the offline (static) combinatorial problem is solvable in O(V (M)) time, the complexity of the CUCB algorithm in [10] and [11] after T rounds is O(V (M)T). Thus, if the offline problem is efficiently implementable, i.e., V (M) = O(poly(d/m)), CUCB is efficient, whereas ESCB is not since |M| may have exponentially many elements. In §2.5 of the supplement, we provide an extension of ESCB called EPOCH-ESCB, that attains almost the same regret as ESCB while enjoying much better computational complexity. 5 Adversarial Combinatorial Bandits under Bandit Feedback We now consider adversarial combinatorial bandits with bandit feedback. We start with the following observation: max M∈M M ⊤X = max µ∈Co(M) µ⊤X, with Co(M) the convex hull of M. We embed M in the d-dimensional simplex by dividing its elements by m. Let P be this scaled version of Co(M). Inspired by OSMD [13, 18], we propose the COMBEXP algorithm, where the KL divergence is the Bregman divergence used to project onto P. Projection using the KL divergence is addressed in [23]. We denote the KL divergence between distributions q and p in P by KL(p, q) = P i∈[d] p(i) log p(i) q(i). The projection of distribution q onto a closed convex set Ξ of distributions is p⋆= arg minp∈Ξ KL(p, q). Let λ be the smallest nonzero eigenvalue of E[MM ⊤], where M is uniformly distributed over M. We define the exploration-inducing distribution µ0 ∈P: µ0 i = 1 m|M| P M∈M Mi, ∀i ∈[d], and let µmin = mini mµ0 i . µ0 is the distribution over basic actions [d] induced by the uniform distribution over M. The pseudo-code for COMBEXP is shown in Algorithm 2. The KL projection in COMBEXP ensures that mqn−1 ∈Co(M). There exists λ, a distribution over M such that mqn−1 = P M λ(M)M. This guarantees that the system of linear equations in the decomposition step is consistent. We propose to perform the projection step (the KL projection of ˜q onto P) using interior-point methods [24]. We provide a simpler method in §3.4 of the supplement. The decomposition step can be efficiently implemented using the algorithm of [25]. The following theorem provides a regret upper bound for COMBEXP. Theorem 6 For all T ≥1: RCOMBEXP(T) ≤2 r m3T d + m1/2 λ log µ−1 min + m5/2 λ log µ−1 min. 7 For most classes of M, we have µ−1 min = O(poly(d/m)) and m(dλ)−1 = O(1) [4]. For these classes, COMBEXP has a regret of O( p m3dT log(d/m)), which is a factor p m log(d/m) off the lower bound (see Table 2). It might not be possible to compute the projection step exactly, and this step can be solved up to accuracy ϵn in round n. Namely we find qn such that KL(qn, ˜qn) −minp∈Ξ KL(p, ˜qn) ≤ϵn. Proposition 1 shows that for ϵn = O(n−2 log−3(n)), the approximate projection gives the same regret as when the projection is computed exactly. Theorem 7 gives the computational complexity of COMBEXP with approximate projection. When Co(M) is described by polynomially (in d) many linear equalities/inequalities, COMBEXP is efficiently implementable and its running time scales (almost) linearly in T. Proposition 1 and Theorem 7 easily extend to other OSMD-type algorithms and thus might be of independent interest. Proposition 1 If the projection step of COMBEXP is solved up to accuracy ϵn = O(n−2 log−3(n)), we have: RCOMBEXP(T) ≤2 s 2m3T d + m1/2 λ log µ−1 min + 2m5/2 λ log µ−1 min. Theorem 7 Assume that Co(M) is defined by c linear equalities and s linear inequalities. If the projection step is solved up to accuracy ϵn = O(n−2 log−3(n)), then COMBEXP has time complexity. The time complexity of COMBEXP can be reduced by exploiting the structure of M (See [24, page 545]). In particular, if inequality constraints describing Co(M) are box constraints, the time complexity of COMBEXP is O(T[c2√s(c + d) log(T) + d4]). The computational complexity of COMBEXP is determined by the structure of Co(M) and COMBEXP has O(T log(T)) time complexity due to the efficiency of interior-point methods. In contrast, the computational complexity of COMBAND depends on the complexity of sampling from M. COMBAND may have a time complexity that is super-linear in T (see [16, page 217]). For instance, consider the matching problem described in Section 2. We have c = 2m equality constraints and s = m2 box constraints, so that the time complexity of COMBEXP is: O(m5T log(T)). It is noted that using [26, Algorithm 1], the cost of decomposition in this case is O(m4). On the other hand, COMBBAND has a time complexity of O(m10F(T)), with F a super-linear function, as it requires to approximate a permanent, requiring O(m10) operations per round. Thus, COMBEXP has much lower complexity than COMBAND and achieves the same regret. 6 Conclusion We have investigated stochastic and adversarial combinatorial bandits. For stochastic combinatorial bandits with semi-bandit feedback, we have provided a tight, problem-dependent regret lower bound that, in most cases, scales at least as O((d −m)∆−1 min log(T)). We proposed ESCB, an algorithm with O(d√m∆−1 min log(T)) regret. We plan to reduce the gap between this regret guarantee and the regret lower bound, as well as investigate the performance of EPOCH-ESCB. For adversarial combinatorial bandits with bandit feedback, we proposed the COMBEXP algorithm. There is a gap between the regret of COMBEXP and the known regret lower bound in this setting, and we plan to reduce it as much as possible. Acknowledgments A. Proutiere’s research is supported by the ERC FSA grant, and the SSF ICT-Psi project. 8 References [1] Herbert Robbins. Some aspects of the sequential design of experiments. In Herbert Robbins Selected Papers, pages 169–177. Springer, 1985. [2] S´ebastien Bubeck and Nicol`o Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–222, 2012. [3] Nicol`o Cesa-Bianchi and G´abor Lugosi. Prediction, learning, and games, volume 1. Cambridge University Press Cambridge, 2006. [4] Nicol`o Cesa-Bianchi and G´abor Lugosi. Combinatorial bandits. Journal of Computer and System Sciences, 78(5):1404–1422, 2012. [5] Aur´elien Garivier and Olivier Capp´e. The KL-UCB algorithm for bounded stochastic bandits and beyond. In Proc. of COLT, 2011. [6] Venkatachalam Anantharam, Pravin Varaiya, and Jean Walrand. Asymptotically efficient allocation rules for the multiarmed bandit problem with multiple plays-part i: iid rewards. Automatic Control, IEEE Transactions on, 32(11):968–976, 1987. [7] Branislav Kveton, Zheng Wen, Azin Ashkan, Hoda Eydgahi, and Brian Eriksson. Matroid bandits: Fast combinatorial optimization with learning. In Proc. of UAI, 2014. [8] Yi Gai, Bhaskar Krishnamachari, and Rahul Jain. Learning multiuser channel allocations in cognitive radio networks: A combinatorial multi-armed bandit formulation. In Proc. of IEEE DySpan, 2010. [9] Yi Gai, Bhaskar Krishnamachari, and Rahul Jain. Combinatorial network optimization with unknown variables: Multi-armed bandits with linear rewards and individual observations. IEEE/ACM Trans. on Networking, 20(5):1466–1478, 2012. [10] Wei Chen, Yajun Wang, and Yang Yuan. Combinatorial multi-armed bandit: General framework and applications. In Proc. of ICML, 2013. [11] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Tight regret bounds for stochastic combinatorial semi-bandits. In Proc. of AISTATS, 2015. [12] Zheng Wen, Azin Ashkan, Hoda Eydgahi, and Branislav Kveton. Efficient learning in large-scale combinatorial semi-bandits. In Proc. of ICML, 2015. [13] Jean-Yves Audibert, S´ebastien Bubeck, and G´abor Lugosi. Regret in online combinatorial optimization. Mathematics of Operations Research, 39(1):31–45, 2013. [14] Andr´as Gy¨orgy, Tam´as Linder, G´abor Lugosi, and Gy¨orgy Ottucs´ak. The on-line shortest path problem under partial monitoring. Journal of Machine Learning Research, 8(10), 2007. [15] Satyen Kale, Lev Reyzin, and Robert Schapire. Non-stochastic bandit slate problems. Advances in Neural Information Processing Systems, pages 1054–1062, 2010. [16] Nir Ailon, Kohei Hatano, and Eiji Takimoto. Bandit online optimization over the permutahedron. In Algorithmic Learning Theory, pages 215–229. Springer, 2014. [17] Gergely Neu. First-order regret bounds for combinatorial semi-bandits. In Proc. of COLT, 2015. [18] S´ebastien Bubeck, Nicol`o Cesa-Bianchi, and Sham M. Kakade. Towards minimax policies for online linear optimization with bandit feedback. Proc. of COLT, 2012. [19] Todd L. Graves and Tze Leung Lai. Asymptotically efficient adaptive choice of control laws in controlled markov chains. SIAM J. Control and Optimization, 35(3):715–743, 1997. [20] Tze Leung Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [21] 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. [22] Stefan Magureanu, Richard Combes, and Alexandre Proutiere. Lipschitz bandits: Regret lower bounds and optimal algorithms. Proc. of COLT, 2014. [23] I. Csisz´ar and P.C. Shields. Information theory and statistics: A tutorial. Now Publishers Inc, 2004. [24] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [25] H. D. Sherali. A constructive proof of the representation theorem for polyhedral sets based on fundamental definitions. American Journal of Mathematical and Management Sciences, 7(3-4):253–270, 1987. [26] David P. Helmbold and Manfred K. Warmuth. Learning permutations with exponential weights. Journal of Machine Learning Research, 10:1705–1736, 2009. 9 | 2015 | 24 |
5,747 | Taming the Wild: A Unified Analysis of HOGWILD!-Style Algorithms Christopher De Sa, Ce Zhang, Kunle Olukotun, and Christopher R´e cdesa@stanford.edu, czhang@cs.wisc.edu, kunle@stanford.edu, chrismre@stanford.edu Departments of Electrical Engineering and Computer Science Stanford University, Stanford, CA 94309 Abstract Stochastic gradient descent (SGD) is a ubiquitous algorithm for a variety of machine learning problems. Researchers and industry have developed several techniques to optimize SGD’s runtime performance, including asynchronous execution and reduced precision. Our main result is a martingale-based analysis that enables us to capture the rich noise models that may arise from such techniques. Specifically, we use our new analysis in three ways: (1) we derive convergence rates for the convex case (HOGWILD!) with relaxed assumptions on the sparsity of the problem; (2) we analyze asynchronous SGD algorithms for non-convex matrix problems including matrix completion; and (3) we design and analyze an asynchronous SGD algorithm, called BUCKWILD!, that uses lower-precision arithmetic. We show experimentally that our algorithms run efficiently for a variety of problems on modern hardware. 1 Introduction Many problems in machine learning can be written as a stochastic optimization problem minimize E[ ˜f(x)] over x ∈Rn, where ˜f is a random objective function. One popular method to solve this is with stochastic gradient descent (SGD), an iterative method which, at each timestep t, chooses a random objective sample ˜ft and updates xt+1 = xt −α∇˜ft(xt), (1) where α is the step size. For most problems, this update step is easy to compute, and perhaps because of this SGD is a ubiquitous algorithm with a wide range of applications in machine learning [1], including neural network backpropagation [2, 3, 13], recommendation systems [8, 19], and optimization [20]. For non-convex problems, SGD is popular—in particular, it is widely used in deep learning—but its success is poorly understood theoretically. Given SGD’s success in industry, practitioners have developed methods to speed up its computation. One popular method to speed up SGD and related algorithms is using asynchronous execution. In an asynchronous algorithm, such as HOGWILD! [17], multiple threads run an update rule such as Equation 1 in parallel without locks. HOGWILD! and other lock-free algorithms have been applied to a variety of uses, including PageRank approximations (FrogWild! [16]), deep learning (Dogwild! [18]) and recommender systems [24]. Many asynchronous versions of other stochastic algorithms have been individually analyzed, such as stochastic coordinate descent (SGD) [14, 15] and accelerated parallel proximal coordinate descent (APPROX) [6], producing rate results that are similar to those of HOGWILD! Recently, Gupta et al. [9] gave an empirical analysis of the effects of a low-precision variant of SGD on neural network training. Other variants of stochastic algorithms 1 have been proposed [5, 11, 12, 21, 22, 23]; only a fraction of these algorithms have been analyzed in the asynchronous case. Unfortunately, a new variant of SGD (or a related algorithm) may violate the assumptions of existing analysis, and hence there are gaps in our understanding of these techniques. One approach to filling this gap is to analyze each purpose-built extension from scratch: an entirely new model for each type of asynchrony, each type of precision, etc. In a practical sense, this may be unavoidable, but ideally there would be a single technique that could analyze many models. In this vein, we prove a martingale-based result that enables us to treat many different extensions as different forms of noise within a unified model. We demonstrate our technique with three results: 1. For the convex case, HOGWILD! requires strict sparsity assumptions. Using our techniques, we are able to relax these assumptions and still derive convergence rates. Moreover, under HOGWILD!’s stricter assumptions, we recover the previous convergence rates. 2. We derive convergence results for an asynchronous SGD algorithm for a non-convex matrix completion problem. We derive the first rates for asynchronous SGD following the recent (synchronous) non-convex SGD work of De Sa et al. [4]. 3. We derive convergence rates in the presence of quantization errors such as those introduced by fixed-point arithmetic. We validate our results experimentally, and show that BUCKWILD! can achieve speedups of up to 2.3× over HOGWILD!-based algorithms for logistic regression. One can combine these different methods both theoretically and empirically. We begin with our main result, which describes our martingale-based approach and our model. 2 Main Result Analyzing asynchronous algorithms is challenging because, unlike in the sequential case where there is a single copy of the iterate x, in the asynchronous case each core has a separate copy of x in its own cache. Writes from one core may take some time to be propagated to another core’s copy of x, which results in race conditions where stale data is used to compute the gradient updates. This difficulty is compounded in the non-convex case, where a series of unlucky random events—bad initialization, inauspicious steps, and race conditions—can cause the algorithm to get stuck near a saddle point or in a local minimum. Broadly, we analyze algorithms that repeatedly update x by running an update step xt+1 = xt −˜Gt(xt), (2) for some i.i.d. update function ˜Gt. For example, for SGD, we would have G(x) = α∇˜ft(x). The goal of the algorithm must be to produce an iterate in some success region S—for example, a ball centered at the optimum x∗. For any T, after running the algorithm for T timesteps, we say that the algorithm has succeeded if xt ∈S for some t ≤T; otherwise, we say that the algorithm has failed, and we denote this failure event as FT . Our main result is a technique that allows us to bound the convergence rates of asynchronous SGD and related algorithms, even for some non-convex problems. We use martingale methods, which have produced elegant convergence rate results for both convex and some non-convex [4] algorithms. Martingales enable us to model multiple forms of error—for example, from stochastic sampling, random initialization, and asynchronous delays—within a single statistical model. Compared to standard techniques, they also allow us to analyze algorithms that sometimes get stuck, which is useful for non-convex problems. Our core contribution is that a martingale-based proof for the convergence of a sequential stochastic algorithm can be easily modified to give a convergence rate for an asynchronous version. A supermartingale [7] is a stochastic process Wt such that E[Wt+1|Wt] ≤Wt. That is, the expected value is non-increasing over time. A martingale-based proof of convergence for the sequential version of this algorithm must construct a supermartingale Wt(xt, xt−1, . . . , x0) that is a function of both the time and the current and past iterates; this function informally represents how unhappy we are with the current state of the algorithm. Typically, it will have the following properties. Definition 1. For a stochastic algorithm as described above, a non-negative process Wt : Rn×t →R is a rate supermartingale with horizon B if the following conditions are true. First, it must be a 2 supermartingale; that is, for any sequence xt, . . . , x0 and any t ≤B, E[Wt+1(xt −˜Gt(xt), xt, . . . , x0)] ≤Wt(xt, xt−1, . . . , x0). (3) Second, for all times T ≤B and for any sequence xT , . . . , x0, if the algorithm has not succeeded by time T (that is, xt /∈S for all t < T), it must hold that WT (xT , xT −1, . . . , x0) ≥T. (4) This represents the fact that we are unhappy with running for many iterations without success. Using this, we can easily bound the convergence rate of the sequential version of the algorithm. Statement 1. Assume that we run a sequential stochastic algorithm, for which W is a rate supermartingale. For any T ≤B, the probability that the algorithm has not succeeded by time T is P (FT ) ≤E[W0(x0)] T . Proof. In what follows, we let Wt denote the actual value taken on by the function in a process defined by (2). That is, Wt = Wt(xt, xt−1, . . . , x0). By applying (3) recursively, for any T, E[WT ] ≤E[W0] = E[W0(x0)]. By the law of total expectation applied to the failure event FT , E[W0(x0)] ≥E[WT ] = P (FT ) E[WT |FT ] + P (¬FT ) E[WT |¬FT ]. Applying (4), i.e. E[WT |FT ] ≥T, and recalling that W is nonnegative results in E[W0(x0)] ≥P (FT ) T; rearranging terms produces the result in Statement 1. This technique is very general; in subsequent sections we show that rate supermartingales can be constructed for SGD on all convex problems and for some algorithms for non-convex problems. 2.1 Modeling Asynchronicity The behavior of an asynchronous SGD algorithm depends both on the problem it is trying to solve and on the hardware it is running on. For ease of analysis, we assume that the hardware has the following characteristics. These are basically the same assumptions used to prove the original HOGWILD! result [17]. • There are multiple threads running iterations of (2), each with their own cache. At any point in time, these caches may hold different values for the variable x, and they communicate via some cache coherency protocol. • There exists a central store S (typically RAM) at which all writes are serialized. This provides a consistent value for the state of the system at any point in real time. • If a thread performs a read R of a previously written value X, and then writes another value Y (dependent on R), then the write that produced X will be committed to S before the write that produced Y . • Each write from an iteration of (2) is to only a single entry of x and is done using an atomic read-add-write instruction. That is, there are no write-after-write races (handling these is possible, but complicates the analysis). Notice that, if we let xt denote the value of the vector x in the central store S after t writes have occurred, then since the writes are atomic, the value of xt+1 is solely dependent on the single thread that produces the write that is serialized next in S. If we let ˜Gt denote the update function sample that is used by that thread for that write, and vt denote the cached value of x used by that write, then xt+1 = xt −˜Gt(˜vt) (5) 3 Our hardware model further constrains the value of ˜vt: all the read elements of ˜vt must have been written to S at some time before t. Therefore, for some nonnegative variable ˜τi,t, eT i ˜vt = eT i xt−˜τi,t, (6) where ei is the ith standard basis vector. We can think of ˜τi,t as the delay in the ith coordinate caused by the parallel updates. We can conceive of this system as a stochastic process with two sources of randomness: the noisy update function samples ˜Gt and the delays ˜τi,t. We assume that the ˜Gt are independent and identically distributed—this is reasonable because they are sampled independently by the updating threads. It would be unreasonable, though, to assume the same for the ˜τi,t, since delays may very well be correlated in the system. Instead, we assume that the delays are bounded from above by some random variable ˜τ. Specifically, if Ft, the filtration, denotes all random events that occurred before timestep t, then for any i, t, and k, P (˜τi,t ≥k|Ft) ≤P (˜τ ≥k) . (7) We let τ = E[˜τ], and call τ the worst-case expected delay. 2.2 Convergence Rates for Asynchronous SGD Now that we are equipped with a stochastic model for the asynchronous SGD algorithm, we show how we can use a rate supermartingale to give a convergence rate for asynchronous algorithms. To do this, we need some continuity and boundedness assumptions; we collect these into a definition, and then state the theorem. Definition 2. An algorithm with rate supermartingale W is (H, R, ξ)-bounded if the following conditions hold. First, W must be Lipschitz continuous in the current iterate with parameter H; that is, for any t, u, v, and sequence xt, . . . , x0, ∥Wt(u, xt−1, . . . , x0) −Wt(v, xt−1, . . . , x0)∥≤H∥u −v∥. (8) Second, ˜G must be Lipschitz continuous in expectation with parameter R; that is, for any u, and v, E[∥˜G(u) −˜G(v)∥] ≤R∥u −v∥1. (9) Third, the expected magnitude of the update must be bounded by ξ. That is, for any x, E[∥˜G(x)∥] ≤ξ. (10) Theorem 1. Assume that we run an asynchronous stochastic algorithm with the above hardware model, for which W is a (H, R, ξ)-bounded rate supermartingale with horizon B. Further assume that HRξτ < 1. For any T ≤B, the probability that the algorithm has not succeeded by time T is P (FT ) ≤E[W(0, x0)] (1 −HRξτ)T . Note that this rate depends only on the worst-case expected delay τ and not on any other properties of the hardware model. Compared to the result of Statement 1, the probability of failure has only increased by a factor of 1 −HRξτ. In most practical cases, HRξτ ≪1, so this increase in probability is negligible. Since the proof of this theorem is simple, but uses non-standard techniques, we outline it here. First, notice that the process Wt, which was a supermartingale in the sequential case, is not in the asynchronous case because of the delayed updates. Our strategy is to use W to produce a new process Vt that is a supermartingale in this case. For any t and x·, if xu /∈S for all u < t, we define Vt(xt, . . . , x0) = Wt(xt, . . . , x0) −HRξτt + HR ∞ X k=1 ∥xt−k+1 −xt−k∥ ∞ X m=k P (˜τ ≥m) . Compared with W, there are two additional terms here. The first term is negative, and cancels out some of the unhappiness from (4) that we ascribed to running for many iterations. We can interpret this as us accepting that we may need to run for more iterations than in the sequential case. The second term measures the distance between recent iterates; we would be unhappy if this becomes large because then the noise from the delayed updates would also be large. On the other hand, if xu ∈S for some u < t, then we define Vt(xt, . . . , xu, . . . , x0) = Vu(xu, . . . , x0). 4 We call Vt a stopped process because its value doesn’t change after success occurs. It is straightforward to show that Vt is a supermartingale for the asynchronous algorithm. Once we know this, the same logic used in the proof of Statement 1 can be used to prove Theorem 1. Theorem 1 gives us a straightforward way of bounding the convergence time of any asynchronous stochastic algorithm. First, we find a rate supermartingale for the problem; this is typically no harder than proving sequential convergence. Second, we find parameters such that the problem is (H, R, ξ)-bounded, typically ; this is easily done for well-behaved problems by using differentiation to bound the Lipschitz constants. Third, we apply Theorem 1 to get a rate for asynchronous SGD. Using this method, analyzing an asynchronous algorithm is really no more difficult than analyzing its sequential analog. 3 Applications Now that we have proved our main result, we turn our attention to applications. We show, for a couple of algorithms, how to construct a rate supermartingale. We demonstrate that doing this allows us to recover known rates for HOGWILD! algorithms as well as analyze cases where no known rates exist. 3.1 Convex Case, High Precision Arithmetic First, we consider the simple case of using asynchronous SGD to minimize a convex function f(x) using unbiased gradient samples ∇˜f(x). That is, we run the update rule xt+1 = xt −α∇˜ft(x). (11) We make the standard assumption that f is strongly convex with parameter c; that is, for all x and y (x −y)T (∇f(x) −∇f(y)) ≥c∥x −y∥2. (12) We also assume continuous differentiability of ∇˜f with 1-norm Lipschitz constant L, E[∥∇˜f(x) −∇˜f(y)∥] ≤L∥x −y∥1. (13) We require that the second moment of the gradient sample is also bounded for some M > 0 by E[∥∇˜f(x)∥2] ≤M 2. (14) For some ϵ > 0, we let the success region be S = {x|∥x −x∗∥2≤ϵ}. Under these conditions, we can construct a rate supermartingale for this algorithm. Lemma 1. There exists a Wt where, if the algorithm hasn’t succeeded by timestep t, Wt(xt, . . . , x0) = ϵ 2αcϵ −α2M 2 log e ∥xt −x∗∥2 ϵ−1 + t, such that Wt is a rate submartingale for the above algorithm with horizon B = ∞. Furthermore, it is (H, R, ξ)-bounded with parameters: H = 2√ϵ(2αcϵ −α2M 2)−1, R = αL, and ξ = αM. Using this and Theorem 1 gives us a direct bound on the failure rate of convex HOGWILD! SGD. Corollary 1. Assume that we run an asynchronous version of the above SGD algorithm, where for some constant ϑ ∈(0, 1) we choose step size α = cϵϑ M 2 + 2LMτ√ϵ. Then for any T, the probability that the algorithm has not succeeded by time T is P (FT ) ≤M 2 + 2LMτ√ϵ c2ϵϑT log e ∥x0 −x∗∥2 ϵ−1 . This result is more general than the result in Niu et al. [17]. The main differences are: that we make no assumptions about the sparsity structure of the gradient samples; and that our rate depends only on the second moment of ˜G and the expected value of ˜τ, as opposed to requiring absolute bounds on their magnitude. Under their stricter assumptions, the result of Corollary 1 recovers their rate. 5 3.2 Convex Case, Low Precision Arithmetic One of the ways BUCKWILD! achieves high performance is by using low-precision fixed-point arithmetic. This introduces additional noise to the system in the form of round-off error. We consider this error to be part of the BUCKWILD! hardware model. We assume that the round-off error can be modeled by an unbiased rounding function operating on the update samples. That is, for some chosen precision factor κ, there is a random quantization function ˜Q such that, for any x ∈R, it holds that E[ ˜Q(x)] = x, and the round-off error is bounded by | ˜Q(x) −x|< ακM. Using this function, we can write a low-precision asynchronous update rule for convex SGD as xt+1 = xt −˜Qt α∇˜ft(˜vt) , (15) where ˜Qt operates only on the single nonzero entry of ∇˜ft(˜vt). In the same way as we did in the high-precision case, we can use these properties to construct a rate supermartingale for the lowprecision version of the convex SGD algorithm, and then use Theorem 1 to bound the failure rate of convex BUCKWILD! Corollary 2. Assume that we run asynchronous low-precision convex SGD, and for some ϑ ∈(0, 1), we choose step size α = cϵϑ M 2(1 + κ2) + LMτ(2 + κ2)√ϵ, then for any T, the probability that the algorithm has not succeeded by time T is P (FT ) ≤M 2(1 + κ2) + LMτ(2 + κ2)√ϵ c2ϵϑT log e ∥x0 −x∗∥2 ϵ−1 . Typically, we choose a precision such that κ ≪1; in this case, the increased error compared to the result of Corollary 1 will be negligible and we will converge in a number of samples that is very similar to the high-precision, sequential case. Since each BUCKWILD! update runs in less time than an equivalent HOGWILD! update, this result means that an execution of BUCKWILD! will produce same-quality output in less wall-clock time compared with HOGWILD! 3.3 Non-Convex Case, High Precision Arithmetic Many machine learning problems are non-convex, but are still solved in practice with SGD. In this section, we show that our technique can be adapted to analyze non-convex problems. Unfortunately, there are no general convergence results that provide rates for SGD on non-convex problems, so it would be unreasonable to expect a general proof of convergence for non-convex HOGWILD! Instead, we focus on a particular problem, low-rank least-squares matrix completion, minimize E[∥˜A −xxT ∥2 F ] subject to x ∈Rn, (16) for which there exists a sequential SGD algorithm with a martingale-based rate that has already been proven. This problem arises in general data analysis, subspace tracking, principle component analysis, recommendation systems, and other applications [4]. In what follows, we let A = E[ ˜A]. We assume that A is symmetric, and has unit eigenvectors u1, u2, . . . , un with corresponding eigenvalues λ1 > λ2 ≥· · · ≥λn. We let ∆, the eigengap, denote ∆= λ1 −λ2. De Sa et al. [4] provide a martingale-based rate of convergence for a particular SGD algorithm, Alecton, running on this problem. For simplicity, we focus on only the rank-1 version of the problem, and we assume that, at each timestep, a single entry of A is used as a sample. Under these conditions, Alecton uses the update rule xt+1 = (I + ηn2e˜iteT ˜itAe˜jteT ˜jt)xt, (17) where ˜it and ˜jt are randomly-chosen indices in [1, n]. It initializes x0 uniformly on the sphere of some radius centered at the origin. We can equivalently think of this as a stochastic power iteration algorithm. For any ϵ > 0, we define the success set S to be S = {x|(uT 1 x)2 ≥(1 −ϵ) ∥x∥2}. (18) That is, we are only concerned with the direction of x, not its magnitude; this algorithm only recovers the dominant eigenvector of A, not its eigenvalue. In order to show convergence for this entrywise sampling scheme, De Sa et al. [4] require that the matrix A satisfy a coherence bound [10]. 6 Table 1: Training loss of SGD as a function of arithmetic precision for logistic regression. Dataset Rows Columns Size 32-bit float 16-bit int 8-bit int Reuters 8K 18K 1.2GB 0.5700 0.5700 0.5709 Forest 581K 54 0.2GB 0.6463 0.6463 0.6447 RCV1 781K 47K 0.9GB 0.1888 0.1888 0.1879 Music 515K 91 0.7GB 0.8785 0.8785 0.8781 Definition 3. A matrix A ∈Rn×n is incoherent with parameter µ if for every standard basis vector ej, and for all unit eigenvectors ui of the matrix, (eT j ui)2 ≤µ2n−1. They also require that the step size be set, for some constants 0 < γ ≤1 and 0 < ϑ < (1 + ϵ)−1 as η = ∆ϵγϑ 2nµ4 ∥A∥2 F . For ease of analysis, we add the additional assumptions that our algorithm runs in some bounded space. That is, for some constant C, at all times t, 1 ≤∥xt∥and ∥xt∥1 ≤C. As in the convex case, by following the martingale-based approach of De Sa et al. [4], we are able to generate a rate supermartinagle for this algorithm—to save space, we only state its initial value and not the full expression. Lemma 2. For the problem above, choose any horizon B such that ηγϵ∆B ≤1. Then there exists a function Wt such that Wt is a rate supermartingale for the above non-convex SGD algorithm with parameters H = 8nη−1γ−1∆−1ϵ−1 2 , R = ηµ ∥A∥F , and ξ = ηµ ∥A∥F C, and E [W0(x0)] ≤2η−1∆−1 log(enγ−1ϵ−1) + B p 2πγ. Note that the analysis parameter γ allows us to trade off between B, which determines how long we can run the algorithm, and the initial value of the supermartingale E [W0(x0)]. We can now produce a corollary about the convergence rate by applying Theorem 1 and setting B and T appropriately. Corollary 3. Assume that we run HOGWILD! Alecton under these conditions for T timesteps, as defined below. Then the probability of failure, P (FT ), will be bounded as below. T = 4nµ4 ∥A∥2 F ∆2ϵγϑ√2πγ log en γϵ , P (FT ) ≤ √8πγµ2 µ2 −4Cϑτ√ϵ. The fact that we are able to use our technique to analyze a non-convex algorithm illustrates its generality. Note that it is possible to combine our results to analyze asynchronous low-precision non-convex SGD, but the resulting formulas are complex, so we do not include them here. 4 Experiments We validate our theoretical results for both asynchronous non-convex matrix completion and BUCKWILD!, a HOGWILD! implementation with lower-precision arithmetic. Like HOGWILD!, a BUCKWILD! algorithm has multiple threads running an update rule (2) in parallel without locking. Compared with HOGWILD!, which uses 32-bit floating point numbers to represent input data, BUCKWILD! uses limited-precision arithmetic by rounding the input data to 8-bit or 16-bit integers. This not only decreases the memory usage, but also allows us to take advantage of single-instructionmultiple-data (SIMD) instructions for integers on modern CPUs. We verified our main claims by running HOGWILD! and BUCKWILD! algorithms on the discussed applications. Table 1 shows how the training loss of SGD for logistic regression, a convex problem, varies as the precision is changed. We ran SGD with step size α = 0.0001; however, results are similar across a range of step sizes. We analyzed all four datasets reported in DimmWitted [25] that favored HOGWILD!: Reuters and RCV1, which are text classification datasets; Forest, which arises from remote sensing; and Music, which is a music classification dataset. We implemented all GLM models reported in DimmWitted, including SVM, Linear Regression, and Logistic Regression, and 7 0 1 2 3 4 5 6 1 4 12 24 1 2 speedup over 32-bit sequential speedup over 32-bit best HOGWILD! threads Performance of BUCKWILD! for Logistic Regression 32-bit float 16-bit int 8-bit int (a) Speedup of BUCKWILD! for dense RCV1 dataset. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 (uT 1 x)2 ∥x∥−2 iterations (billions) Hogwild vs. Sequential Alecton for n = 106 sequential 12-thread hogwild (b) Convergence trajectories for sequential versus HOGWILD! Alecton. Figure 1: Experiments compare the training loss, performance, and convergence of HOGWILD! and BUCKWILD! algorithms with sequential and/or high-precision versions. report Logistic Regression because other models have similar performance. The results illustrate that there is almost no increase in training loss as the precision is decreased for these problems. We also investigated 4-bit and 1-bit computation: the former was slower than 8-bit due to a lack of 4-bit SIMD instructions, and the latter discarded too much information to produce good quality results. Figure 1(a) displays the speedup of BUCKWILD! running on the dense-version of the RCV1 dataset compared to both full-precision sequential SGD (left axis) and best-case HOGWILD! (right axis). Experiments ran on a machine with two Xeon X650 CPUs, each with six hyperthreaded cores, and 24GB of RAM. This plot illustrates that incorporating low-precision arithmetic into our algorithm allows us to achieve significant speedups over both sequential and HOGWILD! SGD. (Note that we don’t get full linear speedup because we are bound by the available memory bandwidth; beyond this limit, adding additional threads provides no benefits while increasing conflicts and thrashing the L1 and L2 caches.) This result, combined with the data in Table 1, suggest that by doing lowprecision asynchronous updates, we can get speedups of up to 2.3× on these sorts of datasets without a significant increase in error. Figure 1(b) compares the convergence trajectories of HOGWILD! and sequential versions of the nonconvex Alecton matrix completion algorithm on a synthetic data matrix A ∈Rn×n with ten random eigenvalues λi > 0. Each plotted series represents a different run of Alecton; the trajectories differ somewhat because of the randomness of the algorithm. The plot shows that the sequential and asynchronous versions behave qualitatively similarly, and converge to the same noise floor. For this dataset, sequential Alecton took 6.86 seconds to run while 12-thread HOGWILD! Alecton took 1.39 seconds, a 4.9× speedup. 5 Conclusion This paper presented a unified theoretical framework for producing results about the convergence rates of asynchronous and low-precision random algorithms such as stochastic gradient descent. We showed how a martingale-based rate of convergence for a sequential, full-precision algorithm can be easily leveraged to give a rate for an asynchronous, low-precision version. We also introduced BUCKWILD!, a strategy for SGD that is able to take advantage of modern hardware resources for both task and data parallelism, and showed that it achieves near linear parallel speedup over sequential algorithms. Acknowledgments The BUCKWILD! name arose out of conversations with Benjamin Recht. Thanks also to Madeleine Udell for helpful conversations. The authors acknowledge the support of: DARPA FA8750-12-2-0335; NSF IIS1247701; NSF CCF-1111943; DOE 108845; NSF CCF-1337375; DARPA FA8750-13-2-0039; NSF IIS1353606; ONR N000141210041 and N000141310129; NIH U54EB020405; Oracle; NVIDIA; Huawei; SAP Labs; Sloan Research Fellowship; Moore Foundation; American Family Insurance; Google; and Toshiba. 8 References [1] L´eon Bottou. Large-scale machine learning with stochastic gradient descent. In COMPSTAT’2010, pages 177–186. Springer, 2010. [2] L´eon Bottou. Stochastic gradient descent tricks. In Neural Networks: Tricks of the Trade, pages 421–436. Springer, 2012. [3] L´eon Bottou and Olivier Bousquet. The tradeoffs of large scale learning. In J.C. Platt, D. Koller, Y. Singer, and S. Roweis, editors, NIPS, volume 20, pages 161–168. NIPS Foundation, 2008. [4] Christopher De Sa, Kunle Olukotun, and Christopher R´e. Global convergence of stochastic gradient descent for some nonconvex matrix problems. ICML, 2015. [5] John C Duchi, Peter L Bartlett, and Martin J Wainwright. Randomized smoothing for stochastic optimization. SIAM Journal on Optimization, 22(2):674–701, 2012. [6] Olivier Fercoq and Peter Richt´arik. Accelerated, parallel and proximal coordinate descent. arXiv preprint arXiv:1312.5799, 2013. [7] Thomas R Fleming and David P Harrington. Counting processes and survival analysis. volume 169, pages 56–57. John Wiley & Sons, 1991. [8] Pankaj Gupta, Ashish Goel, Jimmy Lin, Aneesh Sharma, Dong Wang, and Reza Zadeh. WTF: The who to follow service at twitter. WWW ’13, pages 505–514, 2013. [9] Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. ICML, 2015. [10] Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank matrix completion using alternating minimization. In STOC, pages 665–674. ACM, 2013. [11] Bj¨orn Johansson, Maben Rabi, and Mikael Johansson. A randomized incremental subgradient method for distributed optimization in networked systems. SIAM Journal on Optimization, 20(3):1157–1170, 2009. [12] Jakub Konecn`y, Zheng Qu, and Peter Richt´arik. S2cd: Semi-stochastic coordinate descent. In NIPS Optimization in Machine Learning workshop, 2014. [13] Yann Le Cun, L´eon Bottou, Genevieve B. Orr, and Klaus-Robert M¨uller. Efficient backprop. In Neural Networks, Tricks of the Trade. 1998. [14] Ji Liu and Stephen J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIOPT, 25(1):351–376, 2015. [15] Ji Liu, Stephen J Wright, Christopher R´e, Victor Bittorf, and Srikrishna Sridhar. An asynchronous parallel stochastic coordinate descent algorithm. JMLR, 16:285–322, 2015. [16] Ioannis Mitliagkas, Michael Borokhovich, Alexandros G. Dimakis, and Constantine Caramanis. Frogwild!: Fast pagerank approximations on graph engines. PVLDB, 2015. [17] Feng Niu, Benjamin Recht, Christopher Re, and Stephen Wright. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In NIPS, pages 693–701, 2011. [18] Cyprien Noel and Simon Osindero. Dogwild!–Distributed Hogwild for CPU & GPU. 2014. [19] Shameem Ahamed Puthiya Parambath. Matrix factorization methods for recommender systems. 2013. [20] Alexander Rakhlin, Ohad Shamir, and Karthik Sridharan. Making gradient descent optimal for strongly convex stochastic optimization. ICML, 2012. [21] Peter Richt´arik and Martin Tak´aˇc. Parallel coordinate descent methods for big data optimization. Mathematical Programming, pages 1–52, 2012. [22] Qing Tao, Kang Kong, Dejun Chu, and Gaowei Wu. Stochastic coordinate descent methods for regularized smooth and nonsmooth losses. In Machine Learning and Knowledge Discovery in Databases, pages 537–552. Springer, 2012. [23] Rachael Tappenden, Martin Tak´aˇc, and Peter Richt´arik. On the complexity of parallel coordinate descent. arXiv preprint arXiv:1503.03033, 2015. [24] Hsiang-Fu Yu, Cho-Jui Hsieh, Si Si, and Inderjit S Dhillon. Scalable coordinate descent approaches to parallel matrix factorization for recommender systems. In ICDM, pages 765–774, 2012. [25] Ce Zhang and Christopher Re. Dimmwitted: A study of main-memory statistical analytics. PVLDB, 2014. 9 | 2015 | 240 |
5,748 | High-dimensional neural spike train analysis with generalized count linear dynamical systems Yuanjun Gao Department of Statistics Columbia University New York, NY 10027 yg2312@columbia.edu Lars Buesing Department of Statistics Columbia University New York, NY 10027 lars@stat.columbia.edu Krishna V. Shenoy Department of Electrical Engineering Stanford University Stanford, CA 94305 shenoy@stanford.edu John P. Cunningham Department of Statistics Columbia University New York, NY 10027 jpc2181@columbia.edu Abstract Latent factor models have been widely used to analyze simultaneous recordings of spike trains from large, heterogeneous neural populations. These models assume the signal of interest in the population is a low-dimensional latent intensity that evolves over time, which is observed in high dimension via noisy point-process observations. These techniques have been well used to capture neural correlations across a population and to provide a smooth, denoised, and concise representation of high-dimensional spiking data. One limitation of many current models is that the observation model is assumed to be Poisson, which lacks the flexibility to capture under- and over-dispersion that is common in recorded neural data, thereby introducing bias into estimates of covariance. Here we develop the generalized count linear dynamical system, which relaxes the Poisson assumption by using a more general exponential family for count data. In addition to containing Poisson, Bernoulli, negative binomial, and other common count distributions as special cases, we show that this model can be tractably learned by extending recent advances in variational inference techniques. We apply our model to data from primate motor cortex and demonstrate performance improvements over state-of-the-art methods, both in capturing the variance structure of the data and in held-out prediction. 1 Introduction Many studies and theories in neuroscience posit that high-dimensional populations of neural spike trains are a noisy observation of some underlying, low-dimensional, and time-varying signal of interest. As such, over the last decade researchers have developed and used a number of methods for jointly analyzing populations of simultaneously recorded spike trains, and these techniques have become a critical part of the neural data analysis toolkit [1]. In the supervised setting, generalized linear models (GLM) have used stimuli and spiking history as covariates driving the spiking of the neural population [2, 3, 4, 5]. In the unsupervised setting, latent variable models have been used to extract low-dimensional hidden structure that captures the variability of the recorded data, both temporally and across the population of neurons [6, 7, 8, 9, 10, 11]. 1 In both these settings, however, a limitation is that spike trains are typically assumed to be conditionally Poisson, given the shared signal [8, 10, 11]. The Poisson assumption, while offering algorithmic conveniences in many cases, implies the property of equal dispersion: the conditional mean and variance are equal. This well-known property is particularly troublesome in the analysis of neural spike trains, which are commonly observed to be either over- or under-dispersed [12] (variance greater than or less than the mean). No doubly stochastic process with a Poisson observation can capture under-dispersion, and while such a model can capture over-dispersion, it must do so at the cost of erroneously attributing variance to the latent signal, rather than the observation process. To allow for deviation from the Poisson assumption, some previous work has instead modeled the data as Gaussian [7] or using more general renewal process models [13, 14, 15]; the former of which does not match the count nature of the data and has been found inferior [8], and the latter of which requires costly inference that has not been extended to the population setting. More general distributions like the negative binomial have been proposed [16, 17, 18], but again these families do not generalize to cases of under-dispersion. Furthermore, these more general distributions have not yet been applied to the important setting of latent variable models. Here we employ a count-valued exponential family distribution that addresses these needs and includes much previous work as special cases. We call this distribution the generalized count (GC) distribution [19], and we offer here four main contributions: (i) we introduce the GC distribution and derive a variety of commonly used distributions that are special cases, using the GLM as a motivating example (§2); (ii) we combine this observation likelihood with a latent linear dynamical systems prior to form a GC linear dynamical system (GCLDS; §3); (iii) we develop a variational learning algorithm by extending the current state-of-the-art methods [20] to the GCLDS setting (§3.1); and (iv) we show in data from the primate motor cortex that the GCLDS model provides superior predictive performance and in particular captures data covariance better than Poisson models (§4). 2 Generalized count distributions We define the generalized count distribution as the family of count-valued probability distributions: pGC(k; θ, g(·)) = exp(θk + g(k)) k!M(θ, g(·)) , k ∈N (1) where θ ∈R and the function g : N →R parameterizes the distribution, and M(θ, g(·)) = P∞ k=0 exp(θk+g(k)) k! is the normalizing constant. The primary virtue of the GC family is that it recovers all common count-valued distributions as special cases and naturally parameterizes many common supervised and unsupervised models (as will be shown); for example, the function g(k) = 0 implies a Poisson distribution with rate parameter λ = exp{θ}. Generalizations of the Poisson distribution have been of interest since at least [21], and the paper [19] introduced the GC family and proved two additional properties: first, that the expectation of any GC distribution is monotonically increasing in θ, for a fixed g(k); and second – and perhaps most relevant to this study – concave (convex) functions g(·) imply under-dispersed (over-dispersed) GC distributions. Furthermore, often desired features like zero truncation or zero inflation can also be naturally incorporated by modifying the g(0) value [22, 23]. Thus, with θ controlling the (log) rate of the distribution and g(·) controlling the “shape” of the distribution, the GC family provides a rich model class for capturing the spiking statistics of neural data. Other discrete distribution families do exist, such as the Conway-Maxwell-Poisson distribution [24] and ordered logistic/probit regression [25], but the GC family offers a rich exponential family, which makes computation somewhat easier and allows the g(·) functions to be interpreted. Figure 1 demonstrates the relevance of modeling dispersion in neural data analysis. The left panel shows a scatterplot where each point is an individual neuron in a recorded population of neurons from primate motor cortex (experimental details will be described in §4). Plotted are the mean and variance of spiking activity of each neuron; activity is considered in 20ms bins. For reference, the equi-dispersion line implied by a homogeneous Poisson process is plotted in red, and note further that all doubly stochastic Poisson models would have an implied dispersion above this Poisson line. These data clearly demonstrate meaningful under-dispersion, underscoring the need for the present advance. The right panel demonstrates the appropriateness of the GC model class, showing that a convex/linear/concave function g(k) will produce the expected over/equal/under-dispersion. Given 2 the left panel, we expect under-dispersed GC distributions to be most relevant, but indeed many neural datasets also demonstrate over and equi-dispersion [12], highlighting the need for a flexible observation family. 0 0.5 1 1.5 2 0 0.5 1 1.5 2 neuron 1 neuron 2 Mean firing rate per time bin (20ms) Variance 0 0.5 1 1.5 2 2.5 0 0.5 1 1.5 2 2.5 3 Expectation Variance Convex g Linear g Concave g Figure 1: Left panel: mean firing rate and variance of neurons in primate motor cortex during the peri-movement period of a reaching experiment (see §4). The data exhibit under-dispersion, especially for high firing-rate neurons. The two marked neurons will be analyzed in detail in Figure 2. Right panel: the expectation and variance of the GC distribution with different choices of the function g To illustrate the generality of the GC family and to lay the foundation for our unsupervised learning approach, we consider briefly the case of supervised learning of neural spike train data, where generalized linear models (GLM) have been used extensively [4, 26, 17]. We define GCGLM as that which models a single neuron with count data yi ∈N, and associated covariates xi ∈Rp(i = 1, ..., n) as yi ∼GC(θ(xi), g(·)), where θ(xi) = xiβ. (2) Here GC(θ, g(·)) denotes a random variable distributed according to (1), β ∈Rp are the regression coefficients. This GCGLM model is highly general. Table 1 shows that many of the commonly used count-data models are special cases of GCGLM, by restricting the g(·) function to have certain parametric form. In addition to this convenient generality, one benefit of our parametrization of the GC model is that the curvature of g(·) directly measures the extent to which the data deviate from the Poisson assumption, allowing us to meaningfully interrogate the form of g(·). Note that (2) has no intercept term because it can be absorbed in the g(·) function as a linear term αk (see Table 1). Unlike previous GC work [19], our parameterization implies that maximum likelihood parameter estimation (MLE) is a tractable convex program, which can be seen by considering: (ˆβ, ˆg(·)) = arg max (β,g(·)) n X i=1 log p(yi) = arg max (β,g(·)) n X i=1 [(xiβ)yi + g(yi) −log M(xiβ, g(·))] . (3) First note that, although we have to optimize over a function g(·) that is defined on all non-negative integers, we can exploit the empirical support of the distribution to produce a finite optimization problem. Namely, for any k∗that is not achieved by any data point yi (i.e., the count #{i|yi = k∗} = 0), the MLE for g(k∗) must be −∞, and thus we only need to optimize g(k) for k that have empirical support in the data. Thus g(k) is a finite dimensional vector. To avoid the potential overfitting caused by truncation of gi(·) beyond the empirical support of the data, we can enforce a large (finite) support and impose a quadratic penalty on the second difference of g(.), to encourage linearity in g(·) (which corresponds to a Poisson distribution). Second, note that we can fix g(0) = 0 without loss of generality, which ensures model identifiability. With these constraints, the remaining g(k) values can be fit as free parameters or as convex-constrained (a set of linear inequalities on g(k); similarly for concave case). Finally, problem convexity is ensured as all terms are either linear or linear within the log-sum-exp function M(·), leading to fast optimization algorithms [27]. 3 Generalized count linear dynamical system model With the GC distribution in hand, we now turn to the unsupervised setting, namely coupling the GC observation model with a latent, low-dimensional dynamical system. Our model is a generalization 3 Table 1: Special cases of GCGLM. For all models, the GCGLM parametrization for θ is only associated with the slope θ(x) = βx, and the intercept α is absorbed into the g(·) function. In all cases we have g(k) = −∞outside the stated support of the distribution. Whenever unspecified, the support of the distribution and the domain of the g(·) function are non-negative integers N. Model Name Typical Parameterization GCGLM Parametrization Logistic regression (e.g. [25]) P(y = k) = exp (k(α + xβ)) 1 + exp(α + xβ) g(k) = αk; k = 0, 1 Poisson regression (e.g., [4, 26] ) P(y = k) =λk k! exp(−λ); λ = exp(α + xβ) g(k) = αk Adjacent category regression (e.g., [25] ) P(y = k + 1) P(y = k) = exp(αk + xβ) g(k) = k X i=1 (αi−1 + log i); k =0, 1, ..., K Negative binomial regression (e.g., [17, 18]) P(y = k) =(k + r −1)! k!(r −1)! (1 −p)rpk p = exp(α + xβ) g(k) =αk + log (k + r −1)! COM-Poisson regression (e.g., [24]) P(y = k) = λk (k!)ν / +∞ X j=1 λj (j!)ν λ = exp(α + xβ) g(k) = αk + (1 −ν) log k! of linear dynamical systems with Poisson likelihoods (PLDS), which have been extensively used for analysis of populations of neural spike trains [8, 11, 28, 29]. Denoting yrti as the observed spike-count of neuron i ∈{1, ..., N} at time t ∈{1, ..., T} on experimental trial r ∈{1, ..., R}, the PLDS assumes that the spike activity of neurons is a noisy Poisson observation of an underlying low-dimensional latent state xrt ∈Rp,(where p ≪N), such that: yrti|xrt ∼Poisson exp c⊤ i xrt + di . (4) Here C = [c1 ... cN]⊤∈RN×p is the factor loading matrix mapping the latent state xrt to a log rate, with time and trial invariant baseline log rate d ∈RN. Thus the vector Cxrt + d denotes the vector of log rates for trial r and time t. Critically, the latent state xrt can be interpreted as the underlying signal of interest that acts as the “common input signal” to all neurons, which is modeled a priori as a linear Gaussian dynamical system (to capture temporal correlations): xr1 ∼N(µ1, Q1) xr(t+1)|xrt ∼N(Axrt + bt, Q), (5) where µ1 ∈Rp and Q1 ∈Rp×p parameterize the initial state. The transition matrix A ∈Rp×p and innovations covariance Q ∈Rp×p parameterize the dynamical state update. The optional term bt ∈Rp allows the model to capture a time-varying firing rate that is fixed across experimental trials. The PLDS has been widely used and has been shown to outperform other models in terms of predictive performance, including in particular the simpler Gaussian linear dynamical system [8]. The PLDS model is naturally extended to what we term the generalized count linear dynamical system (GCLDS) by modifying equation (4) using a GC likelihood: yrti|xrt ∼GC c⊤ i xrt, gi(·) . (6) Where gi(·) is the g(·) function in (1) that models the dispersion for neuron i. Similar to the GLM, for identifiability, the baseline rate parameter d is dropped in (6) and we can fix g(0) = 0. As with the GCGLM, one can recover preexisting models, such as an LDS with a Bernoulli observation, as special cases of GCLDS (see Table 1). 3.1 Inference and learning in GCLDS As is common in LDS models, we use expectation-maximization to learn parameters Θ = {A, {bt}t, Q, Q1, µ1, {gi(·)}i, C} . Because the required expectations do not admit a closed form 4 as in previous similar work [8, 30], we required an additional approximation step, which we implemented via a variational lower bound. Here we briefly outline this algorithm and our novel contributions, and we refer the reader to the full details in the supplementary materials. First, each E-step requires calculating p(xr|yr, Θ) for each trial r ∈{1, ..., R} (the conditional distribution of the latent trajectories xr = {xrt}1≤t≤T , given observations yr = {yrti}1≤t≤T,1≤i≤N and parameter Θ). For ease of notation below we drop the trial index r. These posterior distributions are intractable, and in the usual way we make a normal approximation p(x|y, Θ) ≈q(x) = N(m, V ). We identify the optimal (m, V ) by maximizing a variational Bayesian lower bound (the so-called evidence lower bound or “ELBO”) over the variational parameters m, V as: L(m, V ) =Eq(x) log p(x|Θ) q(x) + Eq(x)[log p(y|x, Θ)] (7) =1 2 log |V | −tr[Σ−1V ] −(m −µ)T Σ−1(m −µ) + X t,i Eq(xt)[log p(yti|xt)] + const, which is the usual form to be maximized in a variational Bayesian EM (VBEM) algorithm [11]. Here µ ∈RpT and Σ ∈RpT ×pT are the expectation and variance of x given by the LDS prior in (5). The first term of (7) is the negative Kullback-Leibler divergence between the variational distribution and prior distribution, encouraging the variational distribution to be close to the prior. The second term involving the GC likelihood encourages the variational distribution to explain the observations well. The integrations in the second term are intractable (this is in contrast to the PLDS case, where all integrals can be calculated analytically [11]). Below we use the ideas of [20] to derive a tractable, further lower bound. Here the term Eq(xt)[log p(yti|xt)] can be reduced to: Eq(xt)[log p(yti|xt)] =Eq(ηti) [log pGC(y|ηti, gi(·))] =Eq(ηti) " ytiηti + gi(yti) −log yti! −log K X k=0 1 k! exp(kηti + gi(k)) # , (8) where ηti = cT i xt. Denoting νtik = kηti + gi(k) −log(k!) = kcT i xt + gi(k) −log k!, (8) is reduced to Eq(ν)[νtiyti −log(P 0≤k≤K exp(νtik))]. Since νtik is a linear transformation of xt, under the variational distribution νtik is also normally distributed νtik ∼N(htik, ρtik). We have htik = kcT i mt+gi(k)−log k!, ρtik = k2cT i Vtci, where (mt, Vt) are the expectation and covariance matrix of xt under variational distribution. Now we can derive a lower bound for the expectation by Jensen’s inequality: Eq(νti) " νtiyti −log X k exp(νtik) # ≥htiyti −log K X k=1 exp(htik + ρtik/2) =: fti(hti, ρti). (9) Combining (7) and (9), we get a tractable variational lower bound: L(m, V ) ≥L∗(m, V ) = Eq(x) log p(x|Θ) q(x) + X t,i fti(hti, ρti). (10) For computational convenience, we complete the E-step by maximizing the new evidence lower bound L∗via its dual [20]. Full details are derived in the supplementary materials. The M-step then requires maximization of L∗over Θ. Similar to the PLDS case, the set of parameters involving the latent Gaussian dynamics (A, {bt}t, Q, Q1, µ1) can be optimized analytically [8]. Then, the parameters involving the GC likelihood (C, {gi}i) can be optimized efficiently via convex optimization techniques [27] (full details in supplementary material). In practice we initialize our VBEM algorithm with a Laplace-EM algorithm, and we initialize each E-step in VBEM with a Laplace approximation, which empirically gives substantial runtime advantages, and always produces a sensible optimum. With the above steps, we have a fully specified learning and inference algorithm, which we now use to analyze real neural data. Code can be found at https://bitbucket.org/mackelab/pop_spike_dyn. 5 4 Experimental results We analyze recordings of populations of neurons in the primate motor cortex during a reaching experiment (G20040123), details of which have been described previously [7, 8]. In brief, a rhesus macaque monkey executed 56 cued reaches from a central target to 14 peripheral targets. Before the subject was cued to move (the go cue), it was given a preparatory period to plan the upcoming reach. Each trial was thus separated into two temporal epochs, each of which has been suggested to have their own meaningful dynamical structure [9, 31]. We separately analyze these two periods: the preparatory period (1200ms period preceding the go cue), and the reaching period (50ms before to 370ms after the movement onset). We analyzed data across all 14 reach targets, and results were highly similar; in the following for simplicity we show results for a single reaching target (one 56 trial dataset). Spike trains were simultaneously recorded from 96 electrodes (using a Blackrock multi-electrode array). We bin neural activity at 20ms. To include only units with robust activity, we remove all units with mean rates less than 1 spike per second on average, resulting in 81 units for the preparatory period, and 85 units for the reaching period. As we have already shown in Figure 1, the reaching period data are strongly under-dispersed, even absent conditioning on the latent dynamics (implying further under-dispersion in the observation noise). Data during the preparatory period are particularly interesting due to its clear cross-correlation structure. To fully assess the GCLDS model, we analyze four LDS models – (i) GCLDS-full: a separate function gi(·) is fitted for each neuron i ∈{1, ..., N}; (ii) GCLDS-simple: a single function g(·) is shared across all neurons (up to a linear term modulating the baseline firing rate); (iii) GCLDS-linear: a truncated linear function gi(·) is fitted, which corresponds to truncated-Poisson observations; and (iv) PLDS: the Poisson case is recovered when gi(·) is a linear function on all nonnegative integers. In all cases we use the learning and inference of §3.1. We initialize the PLDS using nuclear norm minimization [10], and initialize the GCLDS models with the fitted PLDS. For all models we vary the latent dimension p from 2 to 8. To demonstrate the generality of the GCLDS and verify our algorithmic implementation, we first considered extensive simulated data with different GCLDS parameters (not shown). In all cases GCLDS model outperformed PLDS in terms of negative log-likelihood (NLL) on test data, with high statistical significance. We also compared the algorithms on PLDS data and found very similar performance between GCLDS and PLDS, implying that GCLDS does not significantly overfit, despite the additional free parameters and computation due to the g(·) functions. Analysis of the reaching period. Figure 2 compares the fits of the two neural units highlighted in Figure 1. These two neurons are particularly high-firing (during the reaching period), and thus should be most indicative of the differences between the PLDS and GCLDS models. The left column of Figure 2 shows the fitted g(·) functions the for four LDS models being compared. It is apparent in both the GCLDS-full and GCLDS-simple cases that the fitted g function is concave (though it was not constrained to be so), agreeing with the under-dispersion observed in Figure 1. The middle column of Figure 2 shows that all four cases produce models that fit the mean activity of these two neurons very well. The black trace shows the empirical mean of the observed data, and all four lines (highly overlapping and thus not entirely visible) follow that empirical mean closely. This result is confirmatory that the GCLDS matches the mean and the current state-of-the-art PLDS. More importantly, we have noted the key feature of the GCLDS is matching the dispersion of the data, and thus we expect it should outperform the PLDS in fitting variance. The right column of Figure 2 shows this to be the case: the PLDS significantly overestimates the variance of the data. The GCLDS-full model tracks the empirical variance quite closely in both neurons. The GCLDSlinear result shows that only adding truncation does not materially improve the estimate of variance and dispersion: the dotted blue trace is quite far from the true data in black, and indeed it is quite close to the Poisson case. The GCLDS-simple still outperforms the PLDS case, but it does not model the dispersion as effectively as the GPLDS-full case where each neuron has its own dispersion parameter (as Figure 1 suggests). The natural next question is whether this outperformance is simply in these two illustrative neurons, or if it is a population effect. Figure 3 shows that indeed the population is much better modeled by the GCLDS model than by competing alternatives. The left and middle panels of Figure 3 show leave-one-neuron-out prediction error of the LDS models. For each reaching target we use 4-fold cross-validation and the results are averaged across all 14 reaching 6 0 5 −4 −2 0 k (spikes per bin) g(k) neuron 1 0 100 200 300 1 1.5 2 2.5 3 Time after movement onset (ms) Mean 0 100 200 300 0.5 1 1.5 2 2.5 Time after movement onset (ms) Variance 0 5 −4 −2 0 k (spikes per bin) g(k) neuron 2 0 100 200 300 0 0.5 1 1.5 Time after movement onset (ms) Mean observed data PLDS GCLDS−full GCLDS−simple GCLDS−linear 0 100 200 300 0 0.5 1 1.5 Time after movement onset (ms) Variance Figure 2: Examples of fitting result for selected high-firing neurons. Each row corresponds to one neuron as marked in left panel of Figure 1 – left column: fitted g(·) using GCLDS and PLDS; middle and right column: fitted mean and variance of PLDS and GCLDS. See text for details. 2 4 6 8 10.5 11 11.5 12 Latent dimension % MSE reduction PLDS GCLDS−full GCLDS−simple GCLDS−linear 2 4 6 8 5 6 7 8 9 Latent dimension % NLL reduction 0 1 2 0 0.5 1 1.5 2 Observed variance Fitted variance PLDS GCLDS−full Figure 3: Goodness-of-fit for monkey data during the reaching period – left panel: percentage reduction of mean-squared-error (MSE) compared to the baseline (homogeneous Poisson process); middle panel: percentage reduction of predictive negative log likelihood (NLL) compared to the baseline; right panel: fitted variance of PLDS and GCLDS for all neurons compared to the observed data. Each point gives the observed and fitted variance of a single neuron, averaged across time. targets. Critically, these predictions are made for all neurons in the population. To give informative performance metrics, we defined baseline performance as a straightforward, homogeneous Poisson process for each neuron, and compare the LDS models with the baseline using percentage reduction of mean-squared-error and negative log likelihood (thus higher error reduction numbers imply better performance). The mean-squared-error (MSE; left panel) shows that the GCLDS offers a minor improvement (reduction in MSE) beyond what is achieved by the PLDS. Though these standard error bars suggest an insignificant result, a paired t-test is indeed significant (p < 10−8). Nonetheless this minor result agrees with the middle column of Figure 2, since predictive MSE is essentially a measurement of the mean. In the middle panel of Figure 3, we see that the GCLDS-full significantly outperforms alternatives in predictive log likelihood across the population (p < 10−10, paired t-test). Again this largely agrees with the implication of Figure 2, as negative log likelihood measures both the accuracy of mean and variance. The right panel of Figure 3 shows that the GCLDS fits the variance of the data exceptionally well across the population, unlike the PLDS. Analysis of the preparatory period. To augment the data analysis, we also considered the preparatory period of neural activity. When we repeated the analyses of Figure 3 on this dataset, the same results occurred: the GCLDS model produced concave (or close to concave) g functions 7 and outperformed the PLDS model both in predictive MSE (minority) and negative log likelihood (significantly). For brevity we do not show this analysis here. Instead, we here compare the temporal cross-covariance, which is also a common analysis of interest in neural data analysis [8, 16, 32] and, as noted, is particularly salient in preparatory activity. Figure 4 shows that GCLDS model fits both the temporal cross-covariance (left panel) and variance (right panel) considerably better than PLDS, which overestimates both quantities. −200 −100 0 100 200 0 2 4 6 8 10 x 10 −3 Time lag (ms) Covariance recorded data GCLDS−full PLDS 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 1 Observed variance Fitted variance PLDS GCLDS−full Figure 4: Goodness-of-fit for monkey data during the preparatory period – Left panel: Temporal cross-covariance averaged over all 81 units during the preparatory period, compared to the fitted cross-covariance by PLDS and GCLDS-full. Right panel: fitted variance of PLDS and GCLDS-full for all neurons compared to the observed data (averaged across time). 5 Discussion In this paper we showed that the GC family better captures the conditional variability of neural spiking data, and further improves inference of key features of interest in the data. We note that it is straightforward to incorporate external stimuli and spike history in the model as covariates, as has been done previously in the Poisson case [8]. Beyond the GCGLM and GCLDS, the GC family is also extensible to other models that have been used in this setting, such as exponential family PCA [10] and subspace clustering [11]. The cost of this performance, compared to the PLDS, is an extra parameterization (the gi(·) functions) and the corresponding algorithmic complexity. While we showed that there seems to be no empirical sacrifice to doing so, it is likely that data with few examples and reasonably Poisson dispersion may cause GCLDS to overfit. Acknowledgments JPC received funding from a Sloan Research Fellowship, the Simons Foundation (SCGB#325171 and SCGB#325233), the Grossman Center at Columbia University, and the Gatsby Charitable Trust. Thanks to Byron Yu, Gopal Santhanam and Stephen Ryu for providing the cortical data. References [1] J. P. Cunningham and B. M Yu, “Dimensionality reduction for large-scale neural recordings,” Nature neuroscience, vol. 17, no. 71, pp. 1500–1509, 2014. [2] L. Paninski, “Maximum likelihood estimation of cascade point-process neural encoding models,” Network: Computation in Neural Systems, vol. 15, no. 4, pp. 243–262, 2004. [3] W. Truccolo, U. T. Eden, M. R. Fellows, J. P. Donoghue, and E. N. Brown, “A point process framework for relating neural spiking activity to spiking history, neural ensemble, and extrinsic covariate effects,” Journal of neurophysiology, vol. 93, no. 2, pp. 1074–1089, 2005. [4] J. W. Pillow, J. Shlens, L. Paninski, A. Sher, A. M. Litke, E. Chichilnisky, and E. P. Simoncelli, “Spatiotemporal correlations and visual signalling in a complete neuronal population,” Nature, vol. 454, no. 7207, pp. 995–999, 2008. [5] M. Vidne, Y. Ahmadian, J. Shlens, J. W. Pillow, J. Kulkarni, A. M. Litke, E. Chichilnisky, E. Simoncelli, and L. Paninski, “Modeling the impact of common noise inputs on the network activity of retinal ganglion cells,” Journal of computational neuroscience, vol. 33, no. 1, pp. 97–121, 2012. 8 [6] J. E. Kulkarni and L. Paninski, “Common-input models for multiple neural spike-train data,” Network: Computation in Neural Systems, vol. 18, no. 4, pp. 375–407, 2007. [7] B. M Yu, J. P. Cunningham, G. Santhanam, S. I. Ryu, K. V. Shenoy, and M. Sahani, “Gaussian-process factor analysis for low-dimensional single-trial analysis of neural population activity,” in NIPS, pp. 1881– 1888, 2009. [8] J. H. Macke, L. Buesing, J. P. Cunningham, B. M Yu, K. V. Shenoy, and M. Sahani, “Empirical models of spiking in neural populations,” in NIPS, pp. 1350–1358, 2011. [9] B. Petreska, B. M Yu, J. P. Cunningham, G. Santhanam, S. I. Ryu, K. V. Shenoy, and M. Sahani, “Dynamical segmentation of single trials from population neural data,” in NIPS, pp. 756–764, 2011. [10] D. Pfau, E. A. Pnevmatikakis, and L. Paninski, “Robust learning of low-dimensional dynamics from large neural ensembles,” in NIPS, pp. 2391–2399, 2013. [11] L. Buesing, T. A. Machado, J. P. Cunningham, and L. Paninski, “Clustered factor analysis of multineuronal spike data,” in NIPS, pp. 3500–3508, 2014. [12] M. M. Churchland, B. M Yu, J. P. Cunningham, L. P. Sugrue, M. R. Cohen, G. S. Corrado, W. T. Newsome, A. M. Clark, P. Hosseini, B. B. Scott, et al., “Stimulus onset quenches neural variability: a widespread cortical phenomenon,” Nature neuroscience, vol. 13, no. 3, pp. 369–378, 2010. [13] J. P. Cunningham, B. M Yu, K. V. Shenoy, and S. Maneesh, “Inferring neural firing rates from spike trains using gaussian processes,” in NIPS, pp. 329–336, 2007. [14] R. P. Adams, I. Murray, and D. J. MacKay, “Tractable nonparametric bayesian inference in poisson processes with gaussian process intensities,” in ICML, pp. 9–16, ACM, 2009. [15] S. Koyama, “On the spike train variability characterized by variance-to-mean power relationship,” Neural computation, 2015. [16] R. L. Goris, J. A. Movshon, and E. P. Simoncelli, “Partitioning neuronal variability,” Nature neuroscience, vol. 17, no. 6, pp. 858–865, 2014. [17] J. Scott and J. W. Pillow, “Fully bayesian inference for neural models with negative-binomial spiking,” in NIPS, pp. 1898–1906, 2012. [18] S. W. Linderman, R. Adams, and J. Pillow, “Inferring structured connectivity from spike trains under negative-binomial generalized linear models,” COSYNE, 2015. [19] J. del Castillo and M. P´erez-Casany, “Overdispersed and underdispersed poisson generalizations,” Journal of Statistical Planning and Inference, vol. 134, no. 2, pp. 486–500, 2005. [20] M. Emtiyaz Khan, A. Aravkin, M. Friedlander, and M. Seeger, “Fast dual variational inference for nonconjugate latent gaussian models,” in ICML, pp. 951–959, 2013. [21] C. R. Rao, “On discrete distributions arising out of methods of ascertainment,” Sankhy¯a: The Indian Journal of Statistics, Series A, pp. 311–324, 1965. [22] D. Lambert, “Zero-inflated poisson regression, with an application to defects in manufacturing,” Technometrics, vol. 34, no. 1, pp. 1–14, 1992. [23] J. Singh, “A characterization of positive poisson distribution and its statistical application,” SIAM Journal on Applied Mathematics, vol. 34, no. 3, pp. 545–548, 1978. [24] K. F. Sellers and G. Shmueli, “A flexible regression model for count data,” The Annals of Applied Statistics, pp. 943–961, 2010. [25] C. V. Ananth and D. G. Kleinbaum, “Regression models for ordinal responses: a review of methods and applications.,” International journal of epidemiology, vol. 26, no. 6, pp. 1323–1333, 1997. [26] L. Paninski, J. Pillow, and J. Lewi, “Statistical models for neural encoding, decoding, and optimal stimulus design,” Progress in brain research, vol. 165, pp. 493–507, 2007. [27] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge university press, 2009. [28] L. Buesing, J. H. Macke, and M. Sahani, “Learning stable, regularised latent models of neural population dynamics,” Network: Computation in Neural Systems, vol. 23, no. 1-2, pp. 24–47, 2012. [29] L. Buesing, J. H. Macke, and M. Sahani, “Estimating state and parameters in state-space models of spike trains,” in Advanced State Space Methods for Neural and Clinical Data, Cambridge Univ Press., 2015. [30] V. Lawhern, W. Wu, N. Hatsopoulos, and L. Paninski, “Population decoding of motor cortical activity using a generalized linear model with hidden states,” Journal of neuroscience methods, vol. 189, no. 2, pp. 267–280, 2010. [31] M. M. Churchland, J. P. Cunningham, M. T. Kaufman, J. D. Foster, P. Nuyujukian, S. I. Ryu, and K. V. Shenoy, “Neural population dynamics during reaching,” Nature, vol. 487, no. 7405, pp. 51–56, 2012. [32] M. R. Cohen and A. Kohn, “Measuring and interpreting neuronal correlations,” Nature neuroscience, vol. 14, no. 7, pp. 811–819, 2011. 9 | 2015 | 241 |
5,749 | Neural Adaptive Sequential Monte Carlo Shixiang Gu†‡ Zoubin Ghahramani† Richard E. Turner† † University of Cambridge, Department of Engineering, Cambridge UK ‡ MPI for Intelligent Systems, T¨ubingen, Germany sg717@cam.ac.uk, zoubin@eng.cam.ac.uk, ret26@cam.ac.uk Abstract Sequential Monte Carlo (SMC), or particle filtering, is a popular class of methods for sampling from an intractable target distribution using a sequence of simpler intermediate distributions. Like other importance sampling-based methods, performance is critically dependent on the proposal distribution: a bad proposal can lead to arbitrarily inaccurate estimates of the target distribution. This paper presents a new method for automatically adapting the proposal using an approximation of the Kullback-Leibler divergence between the true posterior and the proposal distribution. The method is very flexible, applicable to any parameterized proposal distribution and it supports online and batch variants. We use the new framework to adapt powerful proposal distributions with rich parameterizations based upon neural networks leading to Neural Adaptive Sequential Monte Carlo (NASMC). Experiments indicate that NASMC significantly improves inference in a non-linear state space model outperforming adaptive proposal methods including the Extended Kalman and Unscented Particle Filters. Experiments also indicate that improved inference translates into improved parameter learning when NASMC is used as a subroutine of Particle Marginal Metropolis Hastings. Finally we show that NASMC is able to train a latent variable recurrent neural network (LV-RNN) achieving results that compete with the state-of-the-art for polymorphic music modelling. NASMC can be seen as bridging the gap between adaptive SMC methods and the recent work in scalable, black-box variational inference. 1 Introduction Sequential Monte Carlo (SMC) is a class of algorithms that draw samples from a target distribution of interest by sampling from a series of simpler intermediate distributions. More specifically, the sequence constructs a proposal for importance sampling (IS) [1, 2]. SMC is particularly well-suited for performing inference in non-linear dynamical models with hidden variables, since filtering naturally decomposes into a sequence, and in many such cases it is the state-of-the-art inference method [2, 3]. Generally speaking, inference methods can be used as modules in parameter learning systems. SMC has been used in such a way for both approximate maximum-likelihood parameter learning [4] and in Bayesian approaches such as the recently developed Particle MCMC methods [3]. Critically, in common with any importance sampling method, the performance of SMC is strongly dependent on the choice of the proposal distribution. If the proposal is not well-matched to the target distribution, then the method can produce samples that have low effective sample size and this leads to Monte Carlo estimates that have pathologically high variance [1]. The SMC community has developed approaches to mitigate these limitations such as resampling to improve particle diversity when the effective sample size is low [1] and applying MCMC transition kernels to improve particle diversity [5, 2, 3]. A complementary line of research leverages distributional approximate inference methods, such as the extended Kalman Filter and Unscented Kalman Filter, to construct better proposals, leading to the Extended Kalman Particle Filter (EKPF) and Unscented Particle Fil1 ter (UPF) [5]. In general, however, the construction of good proposal distributions is still an open question that severely limits the applicability of SMC methods. This paper proposes a new gradient-based black-box adaptive SMC method that automatically tunes flexible proposal distributions. The quality of a proposal distribution can be assessed using the (intractable) Kullback-Leibler (KL) divergence between the target distribution and the parametrized proposal distribution. We approximate the derivatives of this objective using samples derived from SMC. The framework is very general and tractably handles complex parametric proposal distributions. For example, here we use neural networks to carry out the parameterization thereby leveraging the large literature and efficient computational tools developed by this community. We demonstrate that the method can efficiently learn good proposal distributions that significantly outperform existing adaptive proposal methods including the EKPF and UPF on standard benchmark models used in the particle filter community. We show that improved performance of the SMC algorithm translates into improved mixing of the Particle Marginal Metropolis-Hasting (PMMH) [3]. Finally, we show that the method allows higher-dimensional and more complicated models to be accurately handled using SMC, such as those parametrized using neural networks (NN), that are challenging for traditional particle filtering methods . The focus of this work is on improving SMC, but many of the ideas are inspired by the burgeoning literature on approximate inference for unsupervised neural network models. These connections are explored in section 6. 2 Sequential Monte Carlo We begin by briefly reviewing two fundamental SMC algorithms, sequential importance sampling (SIS) and sequential importance resampling (SIR). Consider a probabilistic model comprising (possibly multi-dimensional) hidden and observed states z1:T and x1:T respectively, whose joint distribution factorizes as p(z1:T , x1:T ) = p(z1)p(x1|z1) QT t=2 p(zt|z1:t−1)p(xt|z1:t, x1:t−1). This general form subsumes common state-space models, such as Hidden Markov Models (HMMs), as well as non-Markovian models for the hidden state, such as Gaussian processes. The goal of the sequential importance sampler is to approximate the posterior distribution over the hidden state sequence, p(z1:T |x1:T ) ≈PN n=1 ˜w(n) t δ(z1:T −z(n) 1:T ), through a weighted set of N sampled trajectories drawn from a simpler proposal distribution {z(n) 1:T }n=1:N ∼q(z1:T |x1:T ). Any form of proposal distribution can be used in principle, but a particularly convenient one takes the same factorisation as the true posterior q(z1:T |x1:T ) = q(z1|x1) QT t=2 q(zt|z1:t−1, x1:t), with filtering dependence on x. A short derivation (see supplementary material) then shows that the normalized importance weights are defined by a recursion: w(z(n) 1:T ) = p(z(n) 1:T , x1:T ) q(z(n) 1:T |x1:T ) , ˜w(z(n) 1:T ) = w(z(n) 1:T ) P n w(z(n) 1:T ) ∝˜w(z(n) 1:T −1)p(z(n) T |z(n) 1:T −1)p(xT |z(n) 1:T , x1:T −1) q(z(n) T |z(n) 1:T −1, x1:T ) SIS is elegant as the samples and weights can be computed in sequential fashion using a single forward pass. However, na¨ıve implementation suffers from a severe pathology: the distribution of importance weights often become highly skewed as t increases, with many samples attaining very low weight. To alleviate the problem, the Sequential Importance Resampling (SIR) algorithm [1] adds an additional step that resamples z(n) t at time t from a multinomial distribution given by ˜w(z(n) 1:t ) and gives the new particles equal weight.1 This replaces degenerated particles that have low weight with samples that have more substantial importance weights without violating the validity of the method. SIR requires knowledge of the full trajectory of previous samples at each stage to draw the samples and compute the importance weights. For this reason, when carrying out resampling, each new particle needs to update its ancestry information. Letting a(n) τ,t represent the ancestral index of particle n at time t for state zτ, where 1 ≤τ ≤t, and collecting these into the set A(n) t = {a(n) 1,t , ..., a(n) t,t }, where a(i) τ−1,t = a (a(i) τ,t) τ−1,τ−1, the resampled trajectory can be denoted z(n) 1:t = {z A(n) t−1 1:t−1, z(n) t } where zA(i) t 1:t = {z a(i) 1,t 1 , ..., z a(i) t,t t }. Finally, to lighten notation, we use the shorthand 1More advanced implementations resample only when the effective sample size falls below a threshold [2]. 2 w(n) t = w(z(n) 1:t ) for the weights. Note that, when employing resampling, these do not depend on the previous weights w(n) t−1 since resampling has given the previous particles uniform weight. The implementation of SMC is given by Algorithm 1 in the supplementary material. 2.1 The Critical Role of Proposal Distributions in Sequential Monte Carlo The choice of the proposal distribution in SMC is critical. Even when employing the resampling step, a poor proposal distribution will produce trajectories that, when traced backwards, quickly collapse onto a single ancestor. Clearly this represents a poor approximation to the true posterior p(z1:T |x1:T ). These effects can be mitigated by increasing the number of particles and/or applying more complex additional MCMC moves [5, 2], but these strategies increase the computational cost. The conclusion is that the proposal should be chosen with care. The optimal choice for an unconstrained proposal that has access to all of the observed data at all times is the intractable posterior distribution qφ(z1:T |x1:T ) = pθ(z1:T |x1:T ). Given the restrictions imposed by the factorization, this becomes q(zt|z1:t−1, x1:t) = p(zt|z1:t−1, x1:t), which is still typically intractable. The bootstrap filter instead uses the prior q(zt|z1:t−1, x1:t) = p(zt|z1:t−1, x1:t−1) which is often tractable, but fails to incorporate information from the current observation xt. A halfway-house employs distributional approximate inference techniques to approximate p(zt|z1:t−1, x1:t). Examples include the EKPF and UPF [5]. However, these methods suffer from three main problems. First, the extended and unscented Kalman Filter from which these methods are derived are known to be inaccurate and poorly behaved for many problems outside of the SMC setting [6]. Second, these approximations must be applied on a sample by sample basis, leading to significant additional computational overhead. Third, neither approximation is tuned using an SMC-relevant criterion. In the next section we introduce a new method for adapting the proposal that addresses these limitations. 3 Adapting Proposals by Descending the Inclusive KL Divergence In this work the quality of the proposal distribution will be optimized using the inclusive KL-divergence between the true posterior distribution and the proposal, KL[pθ(z1:T |x1:T )||qφ(z1:T |x1:T )]. (Parameters are made explicit since we will shortly be interested in both adapting the proposal φ and learning the model θ.) This objective is chosen for four main reasons. First, this is a direct measure of the quality of the proposal, unlike those typically used such as effective sample size. Second, if the true posterior lies in the class of distributions attainable by the proposal family then the objective has a global optimum at this point. Third, if the true posterior does not lie within this class, then this KL divergence tends to find proposal distributions that have higher entropy than the original which is advantageous for importance sampling (the exclusive KL is unsuitable for this reason [7]). Fourth, the derivative of the objective can be approximated efficiently using a sample based approximation that will now be described. The gradient of the negative KL divergence with respect to the parameters of the proposal distribution takes a simple form, −∂ ∂φKL[pθ(z1:T |x1:T )||qφ(z1:T |x1:T )] = Z pθ(z1:T |x1:T ) ∂ ∂φ log qφ(z1:T |x1:T )dz1:T . The expectation over the posterior can be approximated using samples from SMC. One option would use the weighted sample trajectories at the final time-step of SMC, but although asymptotically unbiased such an estimator would have high variance due to the collapse of the trajectories. An alternative, that reduces variance at the cost of introducing some bias, uses the intermediate ancestral trees i.e. a filtering approximation (see the supplementary material for details), −∂ ∂φKL[pθ(z1:T |x1:T )||qφ(z1:T |x1:T )] ≈ X t X n ˜w(n) t ∂ ∂φ log qφ(z(n) t |x1:t, z A(n) t−1 1:t−1). (1) The simplicity of the proposed approach brings with it several advantages and opportunities. Online and batch variants. Since the derivatives distribute over time, it is trivial to apply this update in an online way e.g. updating the proposal distribution every time-step. Alternatively, when learning parameters in a batch setting, it might be more appropriate to update the proposal parameters after making a full forward pass of SMC. Conveniently, when performing approximate 3 maximum-likelihood learning the gradient update for the model parameters θ can be efficiently approximated using the same sample particles from SMC (see supplementary material and Algorithm 1). A similar derivation for maximum likelihood learning is also discussed in [4]. ∂ ∂θ log[pθ(x1:T )] ≈ X t X n ˜w(n) t ∂ ∂θ log pθ(xt, z(n) t |x1:t−1, z A(n) t−1 1:t−1). (2) Algorithm 1 Stochastic Gradient Adaptive SMC (batch inference and learning variants) Require: proposal: qφ, model: pθ, observations: X = {x1:Tj}j=1:M, number of particles: N repeat {x(j) 1:Tj}j=1:m ←NextMiniBatch(X) {z(i,j) 1:t , ˜w(i,j) t }i=1:N,j=1:m,t=1:Tj ←SMC(θ, φ, N, {x(j) 1:Tj}j=1:m) △φ = P j PTj t=1 P i ˜w(i,j) t ∂ ∂φ log qφ(z(i,j) t |x(j) 1:t, z A(i,j) t−1 1:t−1 ) △θ = P j PTj t=1 P i ˜w(i,j) t ∂ ∂θ log pθ(x(j) t , z(i,j) t |x(j) 1:t−1, z A(i,j) t−1 1:t−1 ) (optional) φ ←Optimize(φ, △φ) θ ←Optimize(θ, △θ) (optional) until convergence Efficiency of the adaptive proposal. In contrast to the EPF and UPF, the new method employs an analytic function for propagation and does not require costly particle-specific distributional approximation as an inner-loop. Similarly, although the method bears similarity to the assumed-density filter (ADF) [8] which minimizes a (local) inclusive KL, the new method has the advantage of minimizing a global cost and does not require particle-specific moment matching. Training complex proposal models. The adaptation method described above can be applied to any parametric proposal distribution. Special cases have been previously treated by [9]. We propose a related, but arguably more straightforward and general approach to proposal adaptation. In the next section, we describe a rich family of proposal distributions, that go beyond previous work, based upon neural networks. This approach enables adaptive SMC methods to make use of the rich literature and optimization tools available from supervised learning. Flexibility of training. One option is to train the proposal distribution using samples from SMC derived from the observed data. However, this is not the only approach. For example, the proposal could be trained using data sampled from the generative model instead, which might mitigate overfitting effects for small datasets. Similarly, the trained proposal does not need to be the one used to generate the samples in the first place. The bootstrap filter or more complex variants can be used. 4 Flexible and Trainable Proposal Distributions Using Neural Networks The proposed adaption method can be applied to any parametric proposal distribution. Here we briefly describe how to utilize this flexibility to employ powerful neural network-based parameterizations that have recently shown excellent performance in supervised sequence learning tasks [10, 11]. Generally speaking, applications of these techniques to unsupervised sequence modeling settings is an active research area that is still in its infancy [12] and this work opens a new avenue in this wider research effort. In a nutshell, the goal is to parameterize qφ(zt|z1:t−1, x1:t) – the proposal’s stochastic mapping from all previous hidden states z1:t−1 and all observations (up to and including the current observation) x1:t, to the current hidden state, zt – in a flexible, computationally efficient and trainable way. Here we use a class of functions called Long Short-Term Memory (LSTM) that define a deterministic mapping from an input sequence to an output sequence using parameter-efficient recurrent dynamics, and alleviate the common vanishing gradient problem in recurrent neural networks [13, 10, 11]. The distributions qφ(zt|ht) can be a mixture of Gaussians (a mixture density network (MDN) [14]) in which the mixing proportions, means and covariances are parameterised through another neural network (see the supplementary for details on LSTM, MDN, and neural network architectures). 4 5 Experiments The goal of the experiments is three fold. First, to evaluate the performance of the adaptive method for inference on standard benchmarks used by the SMC community with known ground truth. Second, to evaluate the performance when SMC is used as an inner loop of a learning algorithm. Again we use an example with known ground truth. Third, to apply SMC learning to complex models that would normally be challenging for SMC comparing to the state-of-the-art in approximate inference. One way of assessing the success of the proposed method would be to evaluate KL[p(z1:T |x1:T )||q(z1:T |x1:T )]. However, this quantity is hard to accurately compute. Instead we use a number of other metrics. For the experiments where ground truth states z1:T are known we can evaluate the root mean square error (RMSE) between the approximate posterior mean of the latent variables (¯zt) and the true value RMSE(z1:T , ¯z1:T ) = ( 1 T P t(zt −¯zt)2)1/2. More generally, the estimate of the log-marginal likelihood (LML = log p(x1:T ) = P t log p(xt|x1:t−1) = P t log( 1 N P n w(n) t )) and its variance is also indicative of performance. Finally, we also employ a common metric called the effective sample size (ESS) to measure the effectiveness of our SMC method. ESS of particles at time t is given by ESSt = (P n( ˜w(n) t )2)−1. If q(z1:T |x1:T ) = p(z1:T |x1:T ), expected ESS is maximized and equals the number of particles (equivalently, the normalized importance weights are uniform). Note that ESS alone is not a sufficient metric, since it does not measure the absolute quality of samples, but rather the relative quality. 5.1 Inference in a Benchmark Nonlinear State-Space Model In order to evaluate the effectiveness of our adaptive SMC method, we tested our method on a standard nonlinear state-space model often used to benchmark SMC algorithms [2, 3]. The model is given by Eq. 3, where θ = (σv, σw). The posterior distribution pθ(z1:T |x1:T ) is highly multi-modal due to uncertainty about the signs of the latent states. p(zt|zt−1) = N(zt; f(zt−1, t), σ2 v), p(z1) = N(z1; 0, 5), p(xt|zt) = N(xt; g(zt−1), σ2 w), f(zt−1, t) = zt−1/2 + 25zt−1/(1 + z2 t−1) + 8 cos(1.2t), g(zt) = z2 t /20 (3) The experiments investigated how the new proposal adaptation method performed in comparison to standard methods including the bootstrap filter, EKPF, and UKPF. In particular, we were interested in the following questions: Do rich multi-modal proposals improve inference? For this we compared a Gaussian proposal with a diagonal Gaussian to a mixture density network with three components (MD-). Does a recurrent parameterization of the proposal help? For this we compared a non-recurrent neural network with 100 hidden units (-NN-) to a recurrent neural network with 50 LSTM units (RNN-). Can injecting information about the prior dynamics into the proposal improve performance (similar in spirit to [15] for variational methods)? To assess this, we parameterized proposals for vt (process noise) instead of zt (-f-), and let the proposal have access to the prior dynamics f(zt−1, t) . For all experiments, the parameters in the non-linear state-space model were fixed to (σv, σw) = ( √ 10, 1). Adaptation of the proposal was performed on 1000 samples from the generative process at each iteration. Results are summarized in Fig. 1 and Table 1 (see supplementary material for additional results). Average run times for the algorithms over a sequence of length 1000 were: 0.782s bootstrap, 12.1s EKPF, 41.4s UPF, 1.70s NN-NASMC, and 2.67s RNN-NASMC, where EKPF and UPF implementations are provided by [5]. Although these numbers should only be taken as a guide as the implementations had differing levels of acceleration. The new adaptive proposal methods significantly outperform the bootstrap, EKPF, and UPF methods, in terms of ESS, RMSE and the variance in the LML estimates. The multi-modal proposal outperforms a simple Gaussian proposal (compare RNN-MD-f to RNN-f) indicating multi-modal proposals can improve performance. Moreover, the RNN outperforms the non-recurrent NN (compare RNN to NN). Although the proposal models can effectively learn the transition function, injecting information about the prior dynamics into the proposal does help (compare RNN-f to RNN). Interestingly, there is no clear cut winner between the EKPF and UPF, although the UPF does return LML estimates that have lower variance [5]. All methods converged to similar LMLs that were close to the values computed using large numbers of particles indicating the implementations are correct. 5 EKPF NN-MD prior RNN-f RNN-MD-f RNN-MD RNN UPF −4000 −3800 −3600 −3400 −3200 −3000 −2800 −2600 log marginal likelihood 0 200 400 600 800 1000 iteration 10 20 30 40 50 60 70 80 effective sample size (/100) EKPF NN-MD prior RNN-f RNN-MD-f RNN-MD RNN UPF Figure 1: Left: Box plots for LML estimates from iteration 200 to 1000. Right: Average ESS over the first 1000 iterations. ESS (iter) LML RMSE mean std mean std mean std prior 36.66 0.25 -2957 148 3.266 0.578 EKPF 60.15 0.83 -2829 407 3.578 0.694 UPF 50.58 0.63 -2696 79 2.956 0.629 RNN 69.64 0.60 -2774 34 3.505 0.977 RNN-f 73.88 0.71 -2633 36 2.568 0.430 RNN-MD 69.25 1.04 -2636 40 2.612 0.472 RNN-MD-f 76.71 0.68 -2622 32 2.509 0.409 NN-MD 69.39 1.08 -2634 36 2.731 0.608 Table 1: Left, Middle: Average ESS and log marginal likelihood estimates over the last 400 iterations. Right: The RMSE over 100 new sequences with no further adaptation. 5.2 Inference in the Cart and Pole System As a second and more physically meaningful system we considered a cart-pole system that consists of an inverted pendulum that rests on a movable base [16]. The system was driven by a white noise input. An ODE solver was used to simulate the system from its equations of motion. We considered the problem of inferring the true position of the cart and orientation of the pendulum (along with their derivatives and the input noise) from noisy measurements of the location of the tip of the pole. The results are presented in Fig. 2. The system is significantly more intricate than the model in Sec. 5.1, and does not directly admit the usage of EKPF or UPF. Our RNN-MD proposal model successfully learns good proposals without any direct access to the prior dynamics. 0 500 1000 1500 2000 2500 3000 iteration 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 ESS ESS RNN-MD prior-µ prior-(µ + 1σ) prior-(µ −1σ) 0 2 4 6 8 10 time (s) −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 2.0 x(m) x 0 2 4 6 8 10 time (s) −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 △θ (rad) △θ prior RNN-MD ground-truth Figure 2: Left: Normalized ESS over iterations. Middle, Right: Posterior mean vs. ground-truth for x, the horizontal location of the cart, and △θ, the change in relative angle of the pole. RNN-MD learns to have higher ESS than the prior and more accurately estimates the latent states. 6 0 100 200 300 400 500 iteration 0 1 2 3 4 5 6 σw (N=100) 0 200 400 600 800 1000 iteration 0 1 2 3 4 5 6 σw (N=10) prior RNN-MD-f-pre RNN-MD-f RNN-MD-pre RNN-MD Figure 3: PMMH samples of σw values for N = {100, 10} particles. For small numbers of particles (right) PMMH is very slow to burn in and mix when proposing from the prior distribution due to the large variance in the marginal likelihood estimates it returns. 5.3 Bayesian learning in a Nonlinear SSM SMC is often employed as an inner loop of a more complex algorithm. One prominent example is Particle Markov Chain Monte Carlo [3], a class of methods that sample from the joint posterior over model parameters θ and latent state trajectories, p(θ, z1:T |x1:T ). Here we consider the Particle Marginal Metropolis-Hasting sampler (PMMH). In this context SMC is used to construct a proposal distribution for a Metropolis-Hasting (MH) accept/reject step. The proposal is formed by sampling a proposed set of parameters e.g. by perturbing the current parameters using a Gaussian random walk, then SMC is used to sample a proposed set of latent state variables, resulting in a joint proposal q(θ∗, z∗ 1:T |θ, z1:T ) = q(θ∗|θ)pθ∗(z∗ 1:T |x1:T ). The MH step uses the SMC marginal likelihood estimates to determine acceptance. Full details are given in the supplementary material. In this experiment, we evaluate our method in a PMMH sampler on the same model from Section 5.1 following [3].2 A random walk proposal is used to sample θ = (σv, σw), q(θ∗|θ) = N(θ∗|θ, diag([0.15, 0.08])). The prior over θ is set as IG(0.01, 0.01). θ is initialized as (10, 10), and the PMMH is run for 500 iterations. Two of the adaptive models considered section 5.1 are used for comparison (RNN-MD and RNNMD-f) , where “-pre-” models are pre-trained for 500 iterations using samples from the initial θ = (10, 10). The results are shown in Fig. 3 and were typical for a range of parameter settings. Given a sufficient number of particles (N = 100), there is almost no difference between the prior proposal and our method. However, when the number of particles gets smaller (N = 10), NASMC enables significantly faster burn-in to the posterior, particularly on the measurement noise σw and, for similar reasons, NASMC mixes more quickly. The limitation with the NASMC-PMMH is that the model needs to continuously adapt as the global parameter is sampled, but note this is still not as costly as adapting on a particle-by-particle basis as is the case for the EKPF and UPF. 5.4 Polyphonic Music Generation Finally, the new method is used to train a latent variable recurrent neural network (LV-RNN) for modelling four polymorphic music datasets of varying complexity [17]. These datasets are often used to benchmark RNN models because of their high dimensionality and the complex temporal dependencies involved at different time scales [17, 18, 19]. Each dataset contains at least 7 hours of polyphonic music with an average polyphony (number of simultaneous notes) of 3.9 out of 88. LVRNN contains a recurrent neural network with LSTM layers that is driven by i.i.d. stochastic latent variables (zt) at each time-point and stochastic outputs (xt) that are fed back into the dynamics (full details in the supplementary material). Both the LSTM layers in the generative and proposal models are set as 1000 units and Adam [20] is used as the optimizer. The bootstrap filter is compared to the new adaptive method (NASMC). 10 particles are used in the training. The hyperparameters are tuned using the validation set [17]. A diagonal Gaussian output is used in the proposal model, with an additional hidden layer of size 200. The log likelihood on the test set, a standard metric for comparison in generative models [18, 21, 19], is approximated using SMC with 500 particles. 2Only the prior proposal is compared, since Sec. 5.1 shows the advantage of our method over EKPF/UPF. 7 The results are reported in Table 2.3 The adaptive method significantly outperforms the bootstrap filter on three of the four datasets. On the piano dataset the bootstrap method performs marginally better. In general, the NLLs for the new methods are comparable to the state-of-the-art although detailed comparison is difficult as the methods with stochastic latent states require approximate marginalization using importance sampling or SMC. Dataset LV-RNN LV-RNN STORN FD-RNN sRNN RNN-NADE (NASMC) (Bootstrap) (SGVB) Piano-midi-de 7.61 7.50 7.13 7.39 7.58 7.03 Nottingham 2.72 3.33 2.85 3.09 3.43 2.31 MuseData 6.89 7.21 6.16 6.75 6.99 5.60 JSBChorales 3.99 4.26 6.91 8.01 8.58 5.19 Table 2: Estimated negative log likelihood on test data. “FD-RNN” and “STORN” are from [19], and “sRNN” and “RNN-NADE” are results from [18]. 6 Comparison of Variational Inference to the NASMC approach There are several similarities between NASMC and Variational Free-energy methods that employ recognition models. Variational Free-energy methods refine an approximation qφ(z|x) to the posterior distribution pθ(z|x) by optimising the exclusive (or variational) KL-divergence KL[qφ(z|x)||pθ(z|x)]. It is common to approximate this integral using samples from the approximate posterior [21, 22, 23]. This general approach is similar in spirit to the way that the proposal is adapted in NASMC, except that the inclusive KL-divergence is employed KL[pθ(z|x)||qφ(z|x)] and this entails that sample based approximation requires simulation from the true posterior. Critically, NASMC uses the approximate posterior as a proposal distribution to construct a more accurate posterior approximation. The SMC algorithm therefore can be seen as correcting for the deficiencies in the proposal approximation. We believe that this can lead to significant advantages over variational free-energy methods, especially in the time-series setting where variational methods are known to have severe biases [24]. Moreover, using the inclusive KL avoids having to compute the entropy of the approximating distribution which can prove problematic when using complex approximating distributions (e.g. mixtures and heavy tailed distributions) in the variational framework. There is a close connection between NASMC and the wake-sleep algorithm [25] . The wake-sleep algorithm also employs the inclusive KL divergence to refine a posterior approximation and recent generalizations have shown how to incorporate this idea into importance sampling [26]. In this context, the NASMC algorithm extends this work to SMC. 7 Conclusion This paper developed a powerful method for adapting proposal distributions within general SMC algorithms. The method parameterises a proposal distribution using a recurrent neural network to model long-range contextual information, allows flexible distributional forms including mixture density networks, and enables efficient training by stochastic gradient descent. The method was found to outperform existing adaptive proposal mechanisms including the EKPF and UPF on a standard SMC benchmark, it improves burn in and mixing of the PMMH sampler, and allows effective training of latent variable recurrent neural networks using SMC. We hope that the connection between SMC and neural network technologies will inspire further research into adaptive SMC methods. In particular, application of the methods developed in this paper to adaptive particle smoothing, high-dimensional latent models and adaptive PMCMC for probabilistic programming are particular exciting avenues. Acknowledgments SG is generously supported by Cambridge-T¨ubingen Fellowship, the ALTA Institute, and Jesus College, Cambridge. RET thanks the EPSRC (grants EP/G050821/1 and EP/L000776/1). We thank Theano developers for their toolkit, the authors of [5] for releasing the source code, and Roger Frigola, Sumeet Singh, Fredrik Lindsten, and Thomas Sch¨on for helpful suggestions on experiments. 3Results for RNN-NADE are separately provided for reference, since this is a different model class. 8 References [1] N. J. Gordon, D. J. Salmond, and A. F. Smith, “Novel approach to nonlinear/non-gaussian bayesian state estimation,” in IEE Proceedings F (Radar and Signal Processing), vol. 140, pp. 107–113, IET, 1993. [2] A. Doucet, N. De Freitas, and N. Gordon, Sequential monte carlo methods in practice. Springer-Verlag, 2001. [3] C. Andrieu, A. Doucet, and R. Holenstein, “Particle markov chain monte carlo methods,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol. 72, no. 3, pp. 269–342, 2010. [4] G. Poyiadjis, A. Doucet, and S. S. Singh, “Particle approximations of the score and observed information matrix in state space models with application to parameter estimation,” Biometrika, vol. 98, no. 1, pp. 65– 80, 2011. [5] R. Van Der Merwe, A. Doucet, N. De Freitas, and E. Wan, “The unscented particle filter,” in Advances in Neural Information Processing Systems, pp. 584–590, 2000. [6] R. Frigola, Y. Chen, and C. Rasmussen, “Variational gaussian process state-space models,” in Advances in Neural Information Processing Systems, pp. 3680–3688, 2014. [7] D. J. MacKay, Information theory, inference, and learning algorithms, vol. 7. Cambridge university press Cambridge, 2003. [8] T. P. Minka, “Expectation propagation for approximate bayesian inference,” in Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pp. 362–369, Morgan Kaufmann Publishers Inc., 2001. [9] J. Cornebise, Adaptive Sequential Monte Carlo Methods. PhD thesis, Ph. D. thesis, University Pierre and Marie Curie–Paris 6, 2009. [10] A. Graves, Supervised sequence labelling with recurrent neural networks, vol. 385. Springer, 2012. [11] I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to sequence learning with neural networks,” in Advances in Neural Information Processing Systems, pp. 3104–3112, 2014. [12] A. Graves, “Generating sequences with recurrent neural networks,” CoRR, vol. abs/1308.0850, 2013. [13] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997. [14] C. M. Bishop, “Mixture density networks,” 1994. [15] K. Gregor, I. Danihelka, A. Graves, D. J. Rezende, and D. Wierstra, “DRAW: A recurrent neural network for image generation,” in Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 1462–1471, 2015. [16] A. McHutchon, Nonlinear modelling and control using Gaussian processes. PhD thesis, University of Cambridge UK, Department of Engineering, 2014. [17] N. Boulanger-Lewandowski, Y. Bengio, and P. Vincent, “Modeling temporal dependencies in highdimensional sequences: Application to polyphonic music generation and transcription,” in International Conference on Machine Learning (ICML), 2012. [18] Y. Bengio, N. Boulanger-Lewandowski, and R. Pascanu, “Advances in optimizing recurrent networks,” in Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pp. 8624– 8628, IEEE, 2013. [19] J. Bayer and C. Osendorfer, “Learning stochastic recurrent networks,” arXiv preprint arXiv:1411.7610, 2014. [20] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” The International Conference on Learning Representations (ICLR), 2015. [21] D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” The International Conference on Learning Representations (ICLR), 2014. [22] D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” International Conference on Machine Learning (ICML), 2014. [23] A. Mnih and K. Gregor, “Neural variational inference and learning in belief networks,” International Conference on Machine Learning (ICML), 2014. [24] R. E. Turner and M. Sahani, “Two problems with variational expectation maximisation for time-series models,” in Bayesian Time series models (D. Barber, T. Cemgil, and S. Chiappa, eds.), ch. 5, pp. 109– 130, Cambridge University Press, 2011. [25] G. E. Hinton, P. Dayan, B. J. Frey, and R. M. Neal, “The” wake-sleep” algorithm for unsupervised neural networks,” Science, vol. 268, no. 5214, pp. 1158–1161, 1995. [26] J. Bornschein and Y. Bengio, “Reweighted wake-sleep,” The International Conference on Learning Representations (ICLR), 2015. 9 | 2015 | 242 |
5,750 | Supervised Learning for Dynamical System Learning Ahmed Hefny ∗ Carnegie Mellon University Pittsburgh, PA 15213 ahefny@cs.cmu.edu Carlton Downey † Carnegie Mellon University Pittsburgh, PA 15213 cmdowney@cs.cmu.edu Geoffrey J. Gordon ‡ Carnegie Mellon University Pittsburgh, PA 15213 ggordon@cs.cmu.edu Abstract Recently there has been substantial interest in spectral methods for learning dynamical systems. These methods are popular since they often offer a good tradeoff between computational and statistical efficiency. Unfortunately, they can be difficult to use and extend in practice: e.g., they can make it difficult to incorporate prior information such as sparsity or structure. To address this problem, we present a new view of dynamical system learning: we show how to learn dynamical systems by solving a sequence of ordinary supervised learning problems, thereby allowing users to incorporate prior knowledge via standard techniques such as L1 regularization. Many existing spectral methods are special cases of this new framework, using linear regression as the supervised learner. We demonstrate the effectiveness of our framework by showing examples where nonlinear regression or lasso let us learn better state representations than plain linear regression does; the correctness of these instances follows directly from our general analysis. 1 Introduction Likelihood-based approaches to learning dynamical systems, such as EM [1] and MCMC [2], can be slow and suffer from local optima. This difficulty has resulted in the development of so-called “spectral algorithms” [3], which rely on factorization of a matrix of observable moments; these algorithms are often fast, simple, and globally optimal. Despite these advantages, spectral algorithms fall short in one important aspect compared to EM and MCMC: the latter two methods are meta-algorithms or frameworks that offer a clear template for developing new instances incorporating various forms of prior knowledge. For spectral algorithms, by contrast, there is no clear template to go from a set of probabilistic assumptions to an algorithm. In fact, researchers often relax model assumptions to make the algorithm design process easier, potentially discarding valuable information in the process. To address this problem, we propose a new framework for dynamical system learning, using the idea of instrumental-variable regression [4, 5] to transform dynamical system learning to a sequence of ordinary supervised learning problems. This transformation allows us to apply the rich literature on supervised learning to incorporate many types of prior knowledge. Our new methods subsume a variety of existing spectral algorithms as special cases. The remainder of this paper is organized as follows: first we formulate the new learning framework (Sec. 2). We then provide theoretical guarantees for the proposed methods (Sec. 4). Finally, we give ∗This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. †Supported by a grant from the PNC Center for Financial Services Innovation ‡Supported by NIH grant R01 MH 064537 and ONR contract N000141512365. 1 Figure 1: A latent-state dynamical system. Observation ot is determined by latent state st and noise ϵt. 𝑜𝑡−1 𝑜𝑡 𝑜𝑡+𝑘−1 𝑜𝑡+𝑘 history ℎ𝑡 future 𝜓𝑡/𝑞𝑡 shifted future 𝜓𝑡+1 extended future 𝜉𝑡/𝑝𝑡 S1A regression 𝐸[𝑞𝑡|ℎ𝑡] S1B regression 𝐸[𝑝𝑡|ℎ𝑡] S2 regression Condition on 𝑜𝑡 (filter) 𝑞𝑡+1 Marginalize 𝑜𝑡 (predict) 𝑞𝑡+1|𝑡−1 Figure 2: Learning and applying a dynamical system with instrumental regression. The predictions from S1 provide training data to S2. At test time, we filter or predict using the weights from S2. two examples of how our techniques let us rapidly design new and useful dynamical system learning methods by encoding modeling assumptions (Sec. 5). 2 A framework for spectral algorithms A dynamical system is a stochastic process (i.e., a distribution over sequences of observations) such that, at any time, the distribution of future observations is fully determined by a vector st called the latent state. The process is specified by three distributions: the initial state distribution P(s1), the state transition distribution P(st+1 | st), and the observation distribution P(ot | st). For later use, we write the observation ot as a function of the state st and random noise ϵt, as shown in Figure 1. Given a dynamical system, one of the fundamental tasks is to perform inference, where we predict future observations given a history of observations. Typically this is accomplished by maintaining a distribution or belief over states bt|t−1 = P(st | o1:t−1) where o1:t−1 denotes the first t −1 observations. bt|t−1 represents both our knowledge and our uncertainty about the true state of the system. Two core inference tasks are filtering and prediction.1 In filtering, given the current belief bt = bt|t−1 and a new observation ot, we calculate an updated belief bt+1 = bt+1|t that incorporates ot. In prediction, we project our belief into the future: given a belief bt|t−1 we estimate bt+k|t−1 = P(st+k | o1:t−1) for some k > 0 (without incorporating any intervening observations). The typical approach for learning a dynamical system is to explicitly learn the initial, transition, and observation distributions by maximum likelihood. Spectral algorithms offer an alternate approach to learning: they instead use the method of moments to set up a system of equations that can be solved in closed form to recover estimates of the desired parameters. In this process, they typically factorize a matrix or tensor of observed moments—hence the name “spectral.” Spectral algorithms often (but not always [6]) avoid explicitly estimating the latent state or the initial, transition, or observation distributions; instead they recover observable operators that can be used to perform filtering and prediction directly. To do so, they use an observable representation: instead of maintaining a belief bt over states st, they maintain the expected value of a sufficient statistic of future observations. Such a representation is often called a (transformed) predictive state [7]. In more detail, we define qt = qt|t−1 = E[ψt | o1:t−1], where ψt = ψ(ot:t+k−1) is a vector of future features. The features are chosen such that qt determines the distribution of future observations 1There are other forms of inference in addition to filtering and prediction, such as smoothing and likelihood evaluation, but they are outside the scope of this paper. 2 P(ot:t+k−1 | o1:t−1).2 Filtering then becomes the process of mapping a predictive state qt to qt+1 conditioned on ot, while prediction maps a predictive state qt = qt|t−1 to qt+k|t−1 = E[ψt+k | o1:t−1] without intervening observations. A typical way to derive a spectral method is to select a set of moments involving ψt, work out the expected values of these moments in terms of the observable operators, then invert this relationship to get an equation for the observable operators in terms of the moments. We can then plug in an empirical estimate of the moments to compute estimates of the observable operators. While effective, this approach can be statistically inefficient (the goal of being able to solve for the observable operators is in conflict with the goal of maximizing statistical efficiency) and can make it difficult to incorporate prior information (each new source of information leads to new moments and a different and possibly harder set of equations to solve). To address these problems, we show that we can instead learn the observable operators by solving three supervised learning problems. The main idea is that, just as we can represent a belief about a latent state st as the conditional expectation of a vector of observable statistics, we can also represent any other distributions needed for prediction and filtering via their own vectors of observable statistics. Given such a representation, we can learn to filter and predict by learning how to map these vectors to one another. In particular, the key intermediate quantity for filtering is the “extended and marginalized” belief P(ot, st+1 | o1:t−1)—or equivalently P(ot:t+k | o1:t−1). We represent this distribution via a vector ξt = ξ(ot:t+k) of features of the extended future. The features are chosen such that the extended state pt = E[ξt | o1:t−1] determines P(ot:t+k | o1:t−1). Given P(ot:t+k | o1:t−1), filtering and prediction reduce respectively to conditioning on and marginalizing over ot. In many models (including Hidden Markov Models (HMMs) and Kalman filters), the extended state pt is linearly related to the predictive state qt—a property we exploit for our framework. That is, pt = Wqt (1) for some linear operator W. For example, in a discrete system ψt can be an indicator vector representing the joint assignment of the next k observations, and ξt can be an indicator vector for the next k + 1 observations. The matrix W is then the conditional probability table P(ot:t+k | ot:t+k−1). Our goal, therefore, is to learn this mapping W. Na¨ıvely, we might try to use linear regression for this purpose, substituting samples of ψt and ξt in place of qt and pt since we cannot observe qt or pt directly. Unfortunately, due to the overlap between observation windows, the noise terms on ψt and ξt are correlated. So, na¨ıve linear regression will give a biased estimate of W. To counteract this bias, we employ instrumental regression [4, 5]. Instrumental regression uses instrumental variables that are correlated with the input qt but not with the noise ϵt:t+k. This property provides a criterion to denoise the inputs and outputs of the original regression problem: we remove that part of the input/output that is not correlated with the instrumental variables. In our case, since past observations o1:t−1 do not overlap with future or extended future windows, they are not correlated with the noise ϵt:t+k+1, as can be seen in Figure 1. Therefore, we can use history features ht = h(o1:t−1) as instrumental variables. In more detail, by taking the expectation of (1) given ht, we obtain an instrument-based moment condition: for all t, E[pt | ht] = E[Wqt | ht] E[E[ξt | o1:t−1] | ht] = WE[E[ψt | o1:t−1] | ht] E[ξt | ht] = WE[ψt | ht] (2) Assuming that there are enough independent dimensions in ht that are correlated with qt, we maintain the rank of the moment condition when moving from (1) to (2), and we can recover W by least squares regression if we can compute E[ψt | ht] and E[ξt | ht] for sufficiently many examples t. Fortunately, conditional expectations such as E[ψt | ht] are exactly what supervised learning algorithms are designed to compute. So, we arrive at our learning framework: we first use supervised 2For convenience we assume that the system is k-observable: that is, the distribution of all future observations is determined by the distribution of the next k observations. (Note: not by the next k observations themselves.) At the cost of additional notation, this restriction could easily be lifted. 3 Model/Algorithm future features ψt extended future features ξt ffilter Spectral Algorithm for HMM [3] U ⊤eot where eot is an indicator vector and U spans the range of qt (typically the top m left singular vectors of the joint probability table P (ot+1, ot)) U ⊤eot+1 ⊗eot Estimate a state normalizer from S1A output states. SSID for Kalman filters (time dependent gain) xt and xt ⊗xt, where xt = U ⊤ot:t+k−1 for a matrix U that spans the range of qt (typically the top m left singular vectors of the covariance matrix Cov(ot:t+k−1, ot−k:t−1)) yt and yt ⊗yt, where yt is formed by stacking U ⊤ot+1:t+k and ot. pt specifies a Gaussian distribution where conditioning on ot is straightforward. SSID for stable Kalman filters (constant gain) U ⊤ot:t+k−1 (U obtained as above) ot and U ⊤ot+1:t+k Estimate steady-state covariance by solving Riccati equation [8]. pt together with the steady-state covariance specify a Gaussian distribution where conditioning on ot is straightforward. Uncontrolled HSEPSR [9] Evaluation functional ks(ot:t+k−1, .) for a characteristic kernel ks ko(ot, .) ⊗ko(ot, .) and ψt+1 ⊗ko(ot, .) Kernel Bayes rule [10]. Table 1: Examples of existing spectral algorithms reformulated as two-stage instrument regression with linear S1 regression. Here ot1:t2 is a vector formed by stacking observations ot1 through ot2 and ⊗denotes the outer product. Details and derivations can be found in the supplementary material. learning to estimate E[ψt | ht] and E[ξt | ht], effectively denoising the training examples, and then use these estimates to compute W by finding the least squares solution to (2). In summary, learning and inference of a dynamical system through instrumental regression can be described as follows: • Model Specification: Pick features of history ht = h(o1:t−1), future ψt = ψ(ot:t+k−1) and extended future ξt = ξ(ot:t+k). ψt must be a sufficient statistic for P(ot:t+k−1 | o1:t−1). ξt must satisfy – E[ψt+1 | o1:t−1] = fpredict(E[ξt | o1:t−1]) for a known function fpredict. – E[ψt+1 | o1:t] = ffilter(E[ξt | o1:t−1], ot) for a known function ffilter. • S1A (Stage 1A) Regression: Learn a (possibly non-linear) regression model to estimate ¯ψt = E[ψt | ht]. The training data for this model are (ht, ψt) across time steps t.3 • S1B Regression: Learn a (possibly non-linear) regression model to estimate ¯ξt = E[ξt | ht]. The training data for this model are (ht, ξt) across time steps t. • S2 Regression: Use the feature expectations estimated in S1A and S1B to train a model to predict ¯ξt = W ¯ψt, where W is a linear operator. The training data for this model are estimates of ( ¯ψt, ¯ξt) obtained from S1A and S1B across time steps t. • Initial State Estimation: Estimate an initial state q1 = E[ψ1] by averaging ψ1 across several example realizations of our time series.4 • Inference: Starting from the initial state q1, we can maintain the predictive state qt = E[ψt | o1:t−1] through filtering: given qt we compute pt = E[ξt | o1:t−1] = Wqt. Then, given the observation ot, we can compute qt+1 = ffilter(pt, ot). Or, in the absence of ot, we can predict the next state qt+1|t−1 = fpredict(pt). Finally, by definition, the predictive state qt is sufficient to compute P(ot:t+k−1 | o1:t−1).5 The process of learning and inference is depicted in Figure 2. Modeling assumptions are reflected in the choice of the statistics ψ, ξ and h as well as the regression models in stages S1A and S1B. Table 1 demonstrates that we can recover existing spectral algorithms for dynamical system learning using linear S1 regression. In addition to providing a unifying view of some successful learning algorithms, the new framework also paves the way for extending these algorithms in a theoretically justified manner, as we demonstrate in the experiments below. 3Our bounds assume that the training time steps t are sufficiently spaced for the underlying process to mix, but in practice, the error will only get smaller if we consider all time steps t. 4Assuming ergodicity, we can set the initial state to be the empirical average vector of future features in a single long sequence, 1 T PT t=1 ψt. 5It might seem reasonable to learn qt+1 = fcombined(qt, ot) directly, thereby avoiding the need to separately estimate pt and condition on ot. Unfortunately, fcombined is nonlinear for common models such as HMMs. 4 3 Related Work This work extends predictive state learning algorithms for dynamical systems, which include spectral algorithms for Kalman filters [11], Hidden Markov Models [3, 12], Predictive State Representations (PSRs) [13, 14] and Weighted Automata [15]. It also extends kernel variants such as [9], which builds on [16]. All of the above work effectively uses linear regression or linear ridge regression (although not always in an obvious way). One common aspect of predictive state learning algorithms is that they exploit the covariance structure between future and past observation sequences to obtain an unbiased observable state representation. Boots and Gordon [17] note the connection between this covariance and (linear) instrumental regression in the context of the HSE-HMM. We use this connection to build a general framework for dynamical system learning where the state space can be identified using arbitrary (possibly nonlinear) supervised learning methods. This generalization lets us incorporate prior knowledge to learn compact or regularized models; our experiments demonstrate that this flexibility lets us take better advantage of limited data. Reducing the problem of learning dynamical systems with latent state to supervised learning bears similarity to Langford et al.’s sufficient posterior representation (SPR) [18], which encodes the state by the sufficient statistics of the conditional distribution of the next observation and represents system dynamics by three vector-valued functions that are estimated using supervised learning approaches. While SPR allows all of these functions to be non-linear, it involves a rather complicated training procedure involving multiple iterations of model refinement and model averaging, whereas our framework only requires solving three regression problems in sequence. In addition, the theoretical analysis of [18] only establishes the consistency of SPR learning assuming that all regression steps are solved perfectly. Our work, on the other hand, establishes convergence rates based on the performance of S1 regression. 4 Theoretical Analysis In this section we present error bounds for two-stage instrumental regression. These bounds hold regardless of the particular S1 regression method used, assuming that the S1 predictions converge to the true conditional expectations. The bounds imply that our overall method is consistent. Let (xt, yt, zt) ∈(X, Y, Z) be i.i.d. triplets of input, output, and instrumental variables. (Lack of independence will result in slower convergence in proportion to the mixing time of our process.) Let ¯xt and ¯yt denote E[xt | zt] and E[yt | zt]. And, let ˆxt and ˆyt denote ˆE[xt | zt] and ˆE[yt | zt] as estimated by the S1A and S1B regression steps. Here ¯xt, ˆxt ∈X and ¯yt, ˆyt ∈Y. We want to analyze the convergence of the output of S2 regression—that is, of the weights W given by ridge regression between S1A outputs and S1B outputs: ˆWλ = T X t=1 ˆyt ⊗ˆxt ! T X t=1 ˆxt ⊗ˆxt + λIX !−1 (3) Here ⊗denotes tensor (outer) product, and λ > 0 is a regularization parameter that ensures the invertibility of the estimated covariance. Before we state our main theorem we need to quantify the quality of S1 regression in a way that is independent of the S1 functional form. To do so, we place a bound on the S1 error, and assume that this bound converges to zero: given the definition below, for each fixed δ, limN→∞ηδ,N = 0. Definition 1 (S1 Regression Bound). For any δ > 0 and N ∈N+, the S1 regression bound ηδ,N > 0 is a number such that, with probability at least (1 −δ/2), for all 1 ≤t ≤N: ∥ˆxt −¯xt∥X < ηδ,N ∥ˆyt −¯yt∥Y < ηδ,N In many applications, X, Y and Z will be finite dimensional real vector spaces: Rdx, Rdy and Rdz. However, for generality we state our results in terms of arbitrary reproducing kernel Hilbert spaces. In this case S2 uses kernel ridge regression, leading to methods such as HSE-PSRs. For 5 this purpose, let Σ¯x¯x and Σ¯y¯y denote the (uncentered) covariance operators of ¯x and ¯y respectively: Σ¯x¯x = E[¯x ⊗¯x], Σ¯y¯y = E[¯y ⊗¯y]. And, let R(Σ¯x¯x) denote the closure of the range of Σ¯x¯x. With the above assumptions, Theorem 2 gives a generic error bound on S2 regression in terms of S1 regression. If X and Y are finite dimensional and Σ¯x¯x has full rank, then using ordinary least squares (i.e., setting λ = 0) will give the same bound, but with λ in the first two terms replaced by the minimum eigenvalue of Σ¯x¯x, and the last term dropped. Theorem 2. Assume that ∥¯x∥X , ∥¯x∥Y < c < ∞almost surely. Assume W is a Hilbert-Schmidt operator, and let ˆWλ be as defined in (3). Then, with probability at least 1 −δ, for each xtest ∈ R(Σ¯x¯x) s.t. ∥xtest∥X ≤1, the error ∥ˆWλxtest −Wxtest∥Y is bounded by O ηδ,N 1 λ + r 1 + q log(1/δ) N λ 3 2 | {z } error in S1 regression + O log(1/δ) √ N 1 λ + 1 λ 3 2 | {z } error from finite samples + O √ λ | {z } error from regularization We defer the proof to the supplementary material. The supplementary material also provides explicit finite-sample bounds (including expressions for the constants hidden by O-notation), as well as concrete examples of S1 regression bounds ηδ,N for practical regression models. Theorem 2 assumes that xtest is in R(Σ¯x¯x). For dynamical systems, all valid states satisfy this property. However, with finite data, estimation errors may cause the estimated state ˆqt (i.e., xtest) to have a non-zero component in R⊥(Σ¯x¯x). Lemma 3 bounds the effect of such errors: it states that, in a stable system, this component gets smaller as S1 regression performs better. The main limitation of Lemma 3 is the assumption that ffilter is L-Lipchitz, which essentially means that the model’s estimated probability for ot is bounded below. There is no way to guarantee this property in practice; so, Lemma 3 provides suggestive evidence rather than a guarantee that our learned dynamical system will predict well. Lemma 3. For observations o1:T , let ˆqt be the estimated state given o1:t−1. Let ˜qt be the projection of ˆqt onto R(Σ¯x¯x). Assume ffilter is L-Lipchitz on pt when evaluated at ot, and ffilter(pt, ot) ∈ R(Σ¯x¯x) for any pt ∈R(Σ¯y¯y). Given the assumptions of theorem 2 and assuming that ∥ˆqt∥X ≤R for all 1 ≤t ≤T, the following holds for all 1 ≤t ≤T with probability at least 1 −δ/2. ∥ϵt∥X = ∥ˆqt −˜qt∥X = O ηδ,N √ λ Since ˆWλ is bounded, the prediction error due to ϵt diminishes at the same rate as ∥ϵt∥X . 5 Experiments and Results We now demonstrate examples of tweaking the S1 regression to gain advantage. In the first experiment we show that nonlinear regression can be used to reduce the number of parameters needed in S1, thereby improving statistical performance for learning an HMM. In the second experiment we show that we can encode prior knowledge as regularization. 5.1 Learning A Knowledge Tracing Model In this experiment we attempt to model and predict the performance of students learning from an interactive computer-based tutor. We use the Bayesian knowledge tracing (BKT) model [19], which is essentially a 2-state HMM: the state st represents whether a student has learned a knowledge component (KC), and the observation ot represents the success/failure of solving the tth question in a sequence of questions that cover this KC. Figure 3 summarizes the model. The events denoted by guessing, slipping, learning and forgetting typically have relatively low probabilities. 5.1.1 Data Description We evaluate the model using the “Geometry Area (1996-97)” data available from DataShop [20]. This data was generated by students learning introductory geometry, and contains attempts by 59 6 Correct Answer Skill Known Skill Known Skill Unknown Skill Unknown Incorrect Answer Figure 3: Transitions and observations in BKT. Each node represents a possible value of the state or observation. Solid arrows represent transitions while dashed arrows represent observations. students in 12 knowledge components. As is typical for BKT, we consider a student’s attempt at a question to be correct iff the student entered the correct answer on the first try, without requesting any hints from the help system. Each training sequence consists of a sequence of first attempts for a student/KC pair. We discard sequences of length less than 5, resulting in a total of 325 sequences. 5.1.2 Models and Evaluation Under the (reasonable) assumption that the two states have distinct observation probabilities, this model is 1-observable. Hence we define the predictive state to be the expected next observation, which results in the following statistics: ψt = ot and ξt = ot ⊗k ot+1, where ot is represented by a 2 dimensional indicator vector and ⊗k denotes the Kronecker product. Given these statistics, the extended state pt = E[ξt | o1:t−1] is a joint probability table of ot:t+1. We compare three models that differ by history features and S1 regression method: Spec-HMM: This baseline uses ht = ot−1 and linear S1 regression, making it equivalent to the spectral HMM method of [3], as detailed in the supplementary material. Feat-HMM: This baseline represents ht by an indicator vector of the joint assignment of the previous b observations (we set b to 4) and uses linear S1 regression. This is essentially a feature-based spectral HMM [12]. It thus incorporates more history information compared to Spec-HMM at the expense of increasing the number of S1 parameters by O(2b). LR-HMM: This model represents ht by a binary vector of length b encoding the previous b observations and uses logistic regression as the S1 model. Thus, it uses the same history information as Feat-HMM but reduces the number of parameters to O(b) at the expense of inductive bias. We evaluated the above models using 1000 random splits of the 325 sequences into 200 training and 125 testing. For each testing observation ot we compute the absolute error between actual and expected value (i.e. |δot=1 −ˆP(ot = 1 | o1:t−1)|). We report the mean absolute error for each split. The results are displayed in Figure 4.6 We see that, while incorporating more history information increases accuracy (Feat-HMM vs. Spec-HMM), being able to incorporate the same information using a more compact model gives an additional gain in accuracy (LR-HMM vs. Feat-HMM). We also compared the LR-HMM method to an HMM trained using expectation maximization (EM). We found that the LR-HMM model is much faster to train than EM while being on par with it in terms of prediction error.7 5.2 Modeling Independent Subsystems Using Lasso Regression Spectral algorithms for Kalman filters typically use the left singular vectors of the covariance between history and future features as a basis for the state space. However, this basis hides any sparsity that might be present in our original basis. In this experiment, we show that we can instead use lasso (without dimensionality reduction) as our S1 regression algorithm to discover sparsity. This is useful, for example, when the system consists of multiple independent subsystems, each of which affects a subset of the observation coordinates. 6The differences have similar sign but smaller magnitude if we use RMSE instead of MAE. 7We used MATLAB’s built-in logistic regression and EM functions. 7 Spec-HMM 0.26 0.3 0.34 Feat-HMM 0.26 0.28 0.3 0.32 0.34 Spec-HMM 0.26 0.3 0.34 LR-HMM 0.26 0.28 0.3 0.32 0.34 Feat-HMM 0.26 0.3 0.34 LR-HMM 0.26 0.28 0.3 0.32 0.34 EM 0.26 0.3 0.34 LR-HMM 0.26 0.28 0.3 0.32 0.34 Model Spec-HMM Feat-HMM LR-HMM EM Training time (relative to Spec-HMM) 1 1.02 2.219 14.323 Figure 4: Experimental results: each graph compares the performance of two models (measured by mean absolute error) on 1000 train/test splits. The black line is x = y. Points below this line indicate that model y is better than model x. The table shows training time. Figure 5: Left singular vectors of (left) true linear predictor from ot−1 to ot (i.e. OTO+), (middle) covariance matrix between ot and ot−1 and (right) S1 Sparse regression weights. Each column corresponds to a singular vector (only absolute values are depicted). Singular vectors are ordered by their mean coordinate, interpreting absolute values as a probability distribution over coordinates. To test this idea we generate a sequence of 30-dimensional observations from a Kalman filter. Observation dimensions 1 through 10 and 11 through 20 are generated from two independent subsystems of state dimension 5. Dimensions 21-30 are generated from white noise. Each subsystem’s transition and observation matrices have random Gaussian coordinates, with the transition matrix scaled to have a maximum eigenvalue of 0.95. States and observations are perturbed by Gaussian noise with covariance of 0.01I and 1.0I respectively. We estimate the state space basis using 1000 examples (assuming 1-observability) and compare the singular vectors of the past to future regression matrix to those obtained from the Lasso regression matrix. The result is shown in figure 5. Clearly, using Lasso as stage 1 regression results in a basis that better matches the structure of the underlying system. 6 Conclusion In this work we developed a general framework for dynamical system learning using supervised learning methods. The framework relies on two key principles: first, we extend the idea of predictive state to include extended state as well, allowing us to represent all of inference in terms of predictions of observable features. Second, we use past features as instruments in an instrumental regression, denoising state estimates that then serve as training examples to estimate system dynamics. We have shown that this framework encompasses and provides a unified view of some previous successful dynamical system learning algorithms. We have also demostrated that it can be used to extend existing algorithms to incorporate nonlinearity and regularizers, resulting in better state estimates. As future work, we would like to apply this framework to leverage additional techniques such as manifold embedding and transfer learning in stage 1 regression. We would also like to extend the framework to controlled processes. References [1] Leonard E. Baum, Ted Petrie, George Soules, and Norman Weiss. A maximization technique occurring in the statistical analysis of probabilistic functions of markov chains. The Annals of 8 Mathematical Statistics, 41(1):pp. 164–171, 1970. [2] W. R. Gilks, S. Richardson, and D. J. Spiegelhalter. Markov Chain Monte Carlo in Practice. Chapman and Hall, London, 1996 (ISBN: 0-412-05551-1). This book thoroughly summarizes the uses of MCMC in Bayesian analysis. It is a core book for Bayesian studies. [3] Daniel Hsu, Sham M. Kakade, and Tong Zhang. A spectral algorithm for learning hidden markov models. In COLT, 2009. [4] Judea Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, New York, NY, USA, 2000. [5] J.H. Stock and M.W. Watson. Introduction to Econometrics. Addison-Wesley series in economics. Addison-Wesley, 2011. [6] Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. The Journal of Machine Learning Research, 15(1):2773–2832, 2014. [7] Matthew Rosencrantz and Geoff Gordon. Learning low dimensional predictive representations. In ICML ’04: Twenty-first international conference on Machine learning, pages 695– 702, 2004. [8] P. van Overschee and L.R. de Moor. Subspace identification for linear systems: theory, implementation, applications. Kluwer Academic Publishers, 1996. [9] Byron Boots, Arthur Gretton, and Geoffrey J. Gordon. Hilbert Space Embeddings of Predictive State Representations. In Proc. 29th Intl. Conf. on Uncertainty in Artificial Intelligence (UAI), 2013. [10] Kenji Fukumizu, Le Song, and Arthur Gretton. Kernel bayes’ rule: Bayesian inference with positive definite kernels. Journal of Machine Learning Research, 14(1):3753–3783, 2013. [11] Byron Boots. Spectral Approaches to Learning Predictive Representations. PhD thesis, Carnegie Mellon University, December 2012. [12] Sajid Siddiqi, Byron Boots, and Geoffrey J. Gordon. Reduced-rank hidden Markov models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics (AISTATS-2010), 2010. [13] Byron Boots, Sajid Siddiqi, and Geoffrey Gordon. Closing the learning planning loop with predictive state representations. In I. J. Robotic Research, volume 30, pages 954–956, 2011. [14] Byron Boots and Geoffrey Gordon. An online spectral learning algorithm for partially observable nonlinear dynamical systems. In Proceedings of the 25th National Conference on Artificial Intelligence (AAAI-2011), 2011. [15] Methods of moments for learning stochastic languages: Unified presentation and empirical comparison. In Proceedings of the 31st International Conference on Machine Learning (ICML14), pages 1386–1394, 2014. [16] L. Song, B. Boots, S. M. Siddiqi, G. J. Gordon, and A. J. Smola. Hilbert space embeddings of hidden Markov models. In Proc. 27th Intl. Conf. on Machine Learning (ICML), 2010. [17] Byron Boots and Geoffrey Gordon. Two-manifold problems with applications to nonlinear system identification. In Proc. 29th Intl. Conf. on Machine Learning (ICML), 2012. [18] John Langford, Ruslan Salakhutdinov, and Tong Zhang. Learning nonlinear dynamic models. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML 2009, Montreal, Quebec, Canada, June 14-18, 2009, pages 593–600, 2009. [19] Albert T. Corbett and John R. Anderson. Knowledge tracing: Modelling the acquisition of procedural knowledge. User Model. User-Adapt. Interact., 4(4):253–278, 1995. [20] Kenneth R. Koedinger, R. S. J. Baker, K. Cunningham, A. Skogsholm, B. Leber, and John Stamper. A data repository for the EDM community: The PSLC DataShop. Handbook of Educational Data Mining, pages 43–55, 2010. [21] Le Song, Jonathan Huang, Alexander J. Smola, and Kenji Fukumizu. Hilbert space embeddings of conditional distributions with applications to dynamical systems. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML 2009, Montreal, Quebec, Canada, June 14-18, 2009, pages 961–968, 2009. 9 | 2015 | 243 |
5,751 | A Complete Recipe for Stochastic Gradient MCMC Yi-An Ma, Tianqi Chen, and Emily B. Fox University of Washington {yianma@u,tqchen@cs,ebfox@stat}.washington.edu Abstract Many recent Markov chain Monte Carlo (MCMC) samplers leverage continuous dynamics to define a transition kernel that efficiently explores a target distribution. In tandem, a focus has been on devising scalable variants that subsample the data and use stochastic gradients in place of full-data gradients in the dynamic simulations. However, such stochastic gradient MCMC samplers have lagged behind their full-data counterparts in terms of the complexity of dynamics considered since proving convergence in the presence of the stochastic gradient noise is nontrivial. Even with simple dynamics, significant physical intuition is often required to modify the dynamical system to account for the stochastic gradient noise. In this paper, we provide a general recipe for constructing MCMC samplers—including stochastic gradient versions—based on continuous Markov processes specified via two matrices. We constructively prove that the framework is complete. That is, any continuous Markov process that provides samples from the target distribution can be written in our framework. We show how previous continuous-dynamic samplers can be trivially “reinvented” in our framework, avoiding the complicated sampler-specific proofs. We likewise use our recipe to straightforwardly propose a new state-adaptive sampler: stochastic gradient Riemann Hamiltonian Monte Carlo (SGRHMC). Our experiments on simulated data and a streaming Wikipedia analysis demonstrate that the proposed SGRHMC sampler inherits the benefits of Riemann HMC, with the scalability of stochastic gradient methods. 1 Introduction Markov chain Monte Carlo (MCMC) has become a defacto tool for Bayesian posterior inference. However, these methods notoriously mix slowly in complex, high-dimensional models and scale poorly to large datasets. The past decades have seen a rise in MCMC methods that provide more efficient exploration of the posterior, such as Hamiltonian Monte Carlo (HMC) [8, 12] and its Reimann manifold variant [10]. This class of samplers is based on defining a potential energy function in terms of the target posterior distribution and then devising various continuous dynamics to explore the energy landscape, enabling proposals of distant states. The gain in efficiency of exploration often comes at the cost of a significant computational burden in large datasets. Recently, stochastic gradient variants of such continuous-dynamic samplers have proven quite useful in scaling the methods to large datasets [17, 1, 6, 2, 7]. At each iteration, these samplers use data subsamples—or minibatches—rather than the full dataset. Stochastic gradient Langevin dynamics (SGLD) [17] innovated in this area by connecting stochastic optimization with a first-order Langevin dynamic MCMC technique, showing that adding the “right amount” of noise to stochastic gradient ascent iterates leads to samples from the target posterior as the step size is annealed. Stochastic gradient Hamiltonian Monte Carlo (SGHMC) [6] builds on this idea, but importantly incorporates the efficient exploration provided by the HMC momentum term. A key insight in that paper was that the na¨ıve stochastic gradient variant of HMC actually leads to an incorrect stationary distribution (also see [4]); instead a modification to the dynamics underlying HMC is needed to account for 1 the stochastic gradient noise. Variants of both SGLD and SGHMC with further modifications to improve efficiency have also recently been proposed [1, 13, 7]. In the plethora of past MCMC methods that explicitly leverage continuous dynamics—including HMC, Riemann manifold HMC, and the stochastic gradient methods—the focus has been on showing that the intricate dynamics leave the target posterior distribution invariant. Innovating in this arena requires constructing novel dynamics and simultaneously ensuring that the target distribution is the stationary distribution. This can be quite challenging, and often requires significant physical and geometrical intuition [6, 13, 7]. A natural question, then, is whether there exists a general recipe for devising such continuous-dynamic MCMC methods that naturally lead to invariance of the target distribution. In this paper, we answer this question to the affirmative. Furthermore, and quite importantly, our proposed recipe is complete. That is, any continuous Markov process (with no jumps) with the desired invariant distribution can be cast within our framework, including HMC, Riemann manifold HMC, SGLD, SGHMC, their recent variants, and any future developments in this area. That is, our method provides a unifying framework of past algorithms, as well as a practical tool for devising new samplers and testing the correctness of proposed samplers. The recipe involves defining a (stochastic) system parameterized by two matrices: a positive semidefinite diffusion matrix, D(z), and a skew-symmetric curl matrix, Q(z), where z = (θ, r) with θ our model parameters of interest and r a set of auxiliary variables. The dynamics are then written explicitly in terms of the target stationary distribution and these two matrices. By varying the choices of D(z) and Q(z), we explore the space of MCMC methods that maintain the correct invariant distribution. We constructively prove the completeness of this framework by converting a general continuous Markov process into the proposed dynamic structure. For any given D(z), Q(z), and target distribution, we provide practical algorithms for implementing either full-data or minibatch-based variants of the sampler. In Sec. 3.1, we cast many previous continuous-dynamic samplers in our framework, finding their D(z) and Q(z). We then show how these existing D(z) and Q(z) building blocks can be used to devise new samplers; we leave the question of exploring the space of D(z) and Q(z) well-suited to the structure of the target distribution as an interesting direction for future research. In Sec. 3.2 we demonstrate our ability to construct new and relevant samplers by proposing stochastic gradient Riemann Hamiltonian Monte Carlo, the existence of which was previously only speculated. We demonstrate the utility of this sampler on synthetic data and in a streaming Wikipedia analysis using latent Dirichlet allocation [5]. 2 A Complete Stochastic Gradient MCMC Framework We start with the standard MCMC goal of drawing samples from a target distribution, which we take to be the posterior p(θ|S) of model parameters θ ∈Rd given an observed dataset S. Throughout, we assume i.i.d. data x ∼p(x|θ). We write p(θ|S) ∝exp(−U(θ)), with potential function U(θ) = −P x∈S log p(x|θ) −log p(θ). Algorithms like HMC [12, 10] further augment the space of interest with auxiliary variables r and sample from p(z|S) ∝exp(−H(z)), with Hamiltonian H(z) = H(θ, r) = U(θ) + g(θ, r), such that Z exp(−g(θ, r))dr = constant. (1) Marginalizing the auxiliary variables gives us the desired distribution on θ. In this paper, we generically consider z as the samples we seek to draw; z could represent θ itself, or an augmented state space in which case we simply discard the auxiliary variables to perform the desired marginalization. As in HMC, the idea is to translate the task of sampling from the posterior distribution to simulating from a continuous dynamical system which is used to define a Markov transition kernel. That is, over any interval h, the differential equation defines a mapping from the state at time t to the state at time t + h. One can then discuss the evolution of the distribution p(z, t) under the dynamics, as characterized by the Fokker-Planck equation for stochastic dynamics [14] or the Liouville equation for deterministic dynamics [20]. This evolution can be used to analyze the invariant distribution of the dynamics, ps(z). When considering deterministic dynamics, as in HMC, a jump process must be added to ensure ergodicity. If the resulting stationary distribution is equal to the target posterior, then simulating from the process can be equated with drawing samples from the posterior. If the stationary distribution is not the target distribution, a Metropolis-Hastings (MH) correction can often be applied. Unfortunately, such correction steps require a costly computation on the entire 2 dataset. Even if one can compute the MH correction, if the dynamics do not nearly lead to the correct stationary distribution, then the rejection rate can be high even for short simulation periods h. Furthermore, for many stochastic gradient MCMC samplers, computing the probability of the reverse path is infeasible, obviating the use of MH. As such, a focus in the literature is on defining dynamics with the right target distribution, especially in large-data scenarios where MH corrections are computationally burdensome or infeasible. 2.1 Devising SDEs with a Specified Target Stationary Distribution Generically, all continuous Markov processes that one might consider for sampling can be written as a stochastic differential equation (SDE) of the form: dz = f(z)dt + p 2D(z)dW(t), (2) where f(z) denotes the deterministic drift and often relates to the gradient of H(z), W(t) is a ddimensional Wiener process, and D(z) is a positive semidefinite diffusion matrix. Clearly, however, not all choices of f(z) and D(z) yield the stationary distribution ps(z) ∝exp(−H(z)). When D(z) = 0, as in HMC, the dynamics of Eq. (2) become deterministic. Our exposition focuses on SDEs, but our analysis applies to deterministic dynamics as well. In this case, our framework— using the Liouville equation in place of Fokker-Planck—ensures that the deterministic dynamics leave the target distribution invariant. For ergodicity, a jump process must be added, which is not considered in our recipe, but tends to be straightforward (e.g., momentum resampling in HMC). To devise a recipe for constructing SDEs with the correct stationary distribution, we propose writing f(z) directly in terms of the target distribution: f(z) = − D(z) + Q(z) ∇H(z) + Γ(z), Γi(z) = d X j=1 ∂ ∂zj Dij(z) + Qij(z) . (3) Here, Q(z) is a skew-symmetric curl matrix representing the deterministic traversing effects seen in HMC procedures. In contrast, the diffusion matrix D(z) determines the strength of the Wienerprocess-driven diffusion. Matrices D(z) and Q(z) can be adjusted to attain faster convergence to the posterior distribution. A more detailed discussion on the interpretation of D(z) and Q(z) and the influence of specific choices of these matrices is provided in the Supplement. Importantly, as we show in Theorem 1, sampling the stochastic dynamics of Eq. (2) (according to Itˆo integral) with f(z) as in Eq. (3) leads to the desired posterior distribution as the stationary distribution: ps(z) ∝exp(−H(z)). That is, for any choice of positive semidefinite D(z) and skewsymmetric Q(z) parameterizing f(z), we know that simulating from Eq. (2) will provide samples from p(θ | S) (discarding any sampled auxiliary variables r) assuming the process is ergodic. Theorem 1. ps(z) ∝exp(−H(z)) is a stationary distribution of the dynamics of Eq. (2) if f(z) is restricted to the form of Eq. (3), with D(z) positive semidefinite and Q(z) skew-symmetric. If D(z) is positive definite, or if ergodicity can be shown, then the stationary distribution is unique. Proof. The equivalence of ps(z) and the target p(z | S) ∝exp(−H(z)) can be shown using the Fokker-Planck description of the probability density evolution under the dynamics of Eq. (2) : ∂tp(z, t) = − X i ∂ ∂zi fi(z)p(z, t) + X i,j ∂2 ∂zi∂zj Dij(z)p(z, t) . (4) Eq. (4) can be further transformed into a more compact form [19, 16]: ∂tp(z, t) =∇T · [D(z) + Q(z)] [p(z, t)∇H(z) + ∇p(z, t)] . (5) We can verify that p(z | S) is invariant under Eq. (5) by calculating e−H(z)∇H(z) + ∇e−H(z) = 0. If the process is ergodic, this invariant distribution is unique. The equivalence of the compact form was originally proved in [16]; we include a detailed proof in the Supplement for completeness. 3 All Continuous Markov Processes f(z) defined by D(z), Q(z) Processes with ps(z) = p(z|S) Figure 1: The red space represents the set of all continuous Markov processes. A point in the black space represents a continuous Markov process defined by Eqs. (2)-(3) based on a specific choice of D(z), Q(z). By Theorem 1, each such point has stationary distribution ps(z) = p(z | S). The blue space represents all continuous Markov processes with ps(z) = p(z | S). Theorem 2 states that these blue and black spaces are equivalent (there is no gap, and any point in the blue space has a corresponding D(z), Q(z) in our framework). 2.2 Completeness of the Framework An important question is what portion of samplers defined by continuous Markov processes with the target invariant distribution can we define by iterating over all possible D(z) and Q(z)? In Theorem 2, we show that for any continuous Markov process with the desired stationary distribution, ps(z), there exists an SDE as in Eq. (2) with f(z) defined as in Eq. (3). We know from the ChapmanKolmogorov equation [9] that any continuous Markov process with stationary distribution ps(z) can be written as in Eq. (2), which gives us the diffusion matrix D(z). Theorem 2 then constructively defines the curl matrix Q(z). This result implies that our recipe is complete. That is, we cover all possible continuous Markov process samplers in our framework. See Fig. 1. Theorem 2. For the SDE of Eq. (2), suppose its stationary probability density function ps(z) uniquely exists, and that fi(z)ps(z) −Pd j=1 ∂ ∂θj Dij(z)ps(z) is integrable with respect to the Lebesgue measure, then there exists a skew-symmetric Q(z) such that Eq. (3) holds. The integrability condition is usually satisfied when the probability density function uniquely exists. A constructive proof for the existence of Q(z) is provided in the Supplement. 2.3 A Practical Algorithm In practice, simulation relies on an ϵ-discretization of the SDE, leading to a full-data update rule zt+1 ←zt −ϵt D(zt) + Q(zt) ∇H(zt) + Γ(zt) + N(0, 2ϵtD(zt)). (6) Calculating the gradient of H(z) involves evaluating the gradient of U(θ). For a stochastic gradient method, the assumption is that U(θ) is too computationally intensive to compute as it relies on a sum over all data points (see Sec. 2). Instead, such stochastic gradient algorithms examine independently sampled data subsets eS ⊂S and the corresponding potential for these data: eU(θ) = −|S| | eS| X x∈e S log p(x|θ) −log p(θ); eS ⊂S. (7) The specific form of Eq. (7) implies that eU(θ) is an unbiased estimator of U(θ). As such, a gradient computed based on eU(θ)—called a stochastic gradient [15]—is a noisy, but unbiased estimator of the full-data gradient. The key question in many of the existing stochastic gradient MCMC algorithms is whether the noise injected by the stochastic gradient adversely affects the stationary distribution of the modified dynamics (using ∇eU(θ) in place of ∇U(θ)). One way to analyze the impact of the stochastic gradient is to make use of the central limit theorem and assume ∇eU(θ) = ∇U(θ) + N(0, V(θ)), (8) resulting in a noisy Hamiltonian gradient ∇eH(z) = ∇H(z) + [N(0, V(θ)), 0]T . Simply plugging in ∇eH(z) in place of ∇H(z) in Eq. (6) results in dynamics with an additional noise term (D(zt) + Q(zt) [N(0, V(θ)), 0]T . To counteract this, assume we have an estimate ˆBt of the variance of this additional noise satisfying 2D(zt) −ϵt ˆBt ⪰0 (i.e., positive semidefinite). With small ϵ, this is always true since the stochastic gradient noise scales down faster than the added noise. Then, we can attempt to account for the stochastic gradient noise by simulating zt+1 ←zt −ϵt h D(zt) + Q(zt) ∇eH(zt) + Γ(zt) i + N(0, ϵt(2D(zt) −ϵt ˆBt)). (9) This provides our stochastic gradient—or minibatch— variant of the sampler. In Eq. (9), the noise introduced by the stochastic gradient is multiplied by ϵt (and the compensation by ϵ2 t), implying that 4 the discrepancy between these dynamics and those of Eq. (6) approaches zero as ϵt goes to zero. As such, in this infinitesimal step size limit, since Eq. (6) yields the correct invariant distribution, so does Eq. (9). This avoids the need for a costly or potentially intractable MH correction. However, having to decrease ϵt to zero comes at the cost of increasingly small updates. We can also use a finite, small step size in practice, resulting in a biased (but faster) sampler. A similar bias-speed tradeoff was used in [11, 3] to construct MH samplers, in addition to being used in SGLD and SGHMC. 3 Applying the Theory to Construct Samplers 3.1 Casting Previous MCMC Algorithms within the Proposed Framework We explicitly state how some recently developed MCMC methods fall within the proposed framework based on specific choices of D(z), Q(z) and H(z) in Eq. (2) and (3). For the stochastic gradient methods, we show how our framework can be used to “reinvent” the samplers by guiding their construction and avoiding potential mistakes or inefficiencies caused by na¨ıve implementations. Hamiltonian Monte Carlo (HMC) The key ingredient in HMC [8, 12] is Hamiltonian dynamics, which simulate the physical motion of an object with position θ, momentum r, and mass M on an frictionless surface as follows (typically, a leapfrog simulation is used instead): θt+1 ←θt + ϵtM−1rt rt+1 ←rt −ϵt∇U(θt). (10) Eq. (10) is a special case of the proposed framework with z = (θ, r), H(θ, r) = U(θ)+ 1 2rT M −1r, Q(θ, r) = 0 −I I 0 and D(θ, r) = 0. Stochastic Gradient Hamiltonian Monte Carlo (SGHMC) As discussed in [6], simply replacing ∇U(θ) by the stochastic gradient ∇eU(θ) in Eq. (10) results in the following updates: Naive : θt+1 ←θt + ϵtM−1rt rt+1 ←rt −ϵt∇eU(θt) ≈rt −ϵt∇U(θt) + N(0, ϵ2 tV(θt)), (11) where the ≈arises from the approximation of Eq. (8). Careful study shows that Eq. (11) cannot be rewritten into our proposed framework, which hints that such a na¨ıve stochastic gradient version of HMC is not correct. Interestingly, the authors of [6] proved that this na¨ıve version indeed does not have the correct stationary distribution. In our framework, we see that the noise term N(0, 2ϵtD(z)) is paired with a D(z)∇H(z) term, hinting that such a term should be added to Eq. (11). Here, D(θ, r) = 0 0 0 ϵV(θ) , which means we need to add D(z)∇H(z) = ϵV(θ)∇rH(θ, r) = ϵV(θ)M−1r. Interestingly, this is the correction strategy proposed in [6], but through a physical interpretation of the dynamics. In particular, the term ϵV(θ)M−1r (or, generically, CM−1r where C ⪰ϵV(θ)) has an interpretation as friction and leads to second order Langevin dynamics: θt+1 ←θt + ϵtM−1rt rt+1 ←rt −ϵt∇eU(θt) −ϵtCM−1rt + N(0, ϵt(2C −ϵt ˆBt)). (12) Here, ˆBt is an estimate of V(θt). This method now fits into our framework with H(θ, r) and Q(θ, r) as in HMC, but with D(θ, r) = 0 0 0 C . This example shows how our theory can be used to identify invalid samplers and provide guidance on how to effortlessly correct the mistakes; this is crucial when physical intuition is not available. Once the proposed sampler is cast in our framework with a specific D(z) and Q(z), there is no need for sampler-specific proofs, such as those of [6]. Stochastic Gradient Langevin Dynamics (SGLD) SGLD [17] proposes to use the following first order (no momentum) Langevin dynamics to generate samples θt+1 ←θt −ϵtD∇eU(θt) + N(0, 2ϵtD). (13) This algorithm corresponds to taking z = θ with H(θ) = U(θ), D(θ) = D, Q(θ) = 0, and ˆBt = 0. As motivated by Eq. (9) of our framework, the variance of the stochastic gradient can be subtracted from the sampler injected noise to make the finite stepsize simulation more accurate. This variant of SGLD leads to the stochastic gradient Fisher scoring algorithm [1]. 5 Stochastic Gradient Riemannian Langevin Dynamics (SGRLD) SGLD can be generalized to use an adaptive diffusion matrix D(θ). Specifically, it is interesting to take D(θ) = G−1(θ), where G(θ) is the Fisher information metric. The sampler dynamics are given by θt+1 ←θt −ϵt[G(θt)−1∇eU(θt) + Γ(θt)] + N(0, 2ϵtG(θt)−1). (14) Taking D(θ) = G(θ)−1, Q(θ) = 0, and ˆBt = 0, this SGRLD [13] method falls into our framework with correction term Γi(θ) = P j ∂Dij(θ) ∂θj . It is interesting to note that in earlier literature [10], Γi(θ) was taken to be 2 |G(θ)|−1/2 P j ∂ ∂θj G−1 ij (θ)|G(θ)|1/2 . More recently, it was found that this correction term corresponds to the distribution function with respect to a non-Lebesgue measure [18]; for the Lebesgue measure, the revised Γi(θ) was as determined by our framework [18]. Again, we have an example of our theory providing guidance in devising correct samplers. Stochastic Gradient Nos´e-Hoover Thermostat (SGNHT) Finally, the SGNHT [7] method incorporates ideas from thermodynamics to further increase adaptivity by augmenting the SGHMC system with an additional scalar auxiliary variable, ξ. The algorithm uses the following dynamics: θt+1 ←θt + ϵtrt rt+1 ←rt −ϵt∇eU(θt) −ϵtξtrt + N(0, ϵt(2A −ϵt ˆBt)) ξt+1 ←ξt + ϵt 1 drT t rt −1 . (15) We can take z = (θ, r, ξ), H(θ, r, ξ) = U(θ)+ 1 2rT r + 1 2d(ξ −A)2, D(θ, r, ξ) = 0 0 0 0 A · I 0 0 0 0 , and Q(θ, r, ξ) = 0 −I 0 I 0 r/d 0 −rT /d 0 to place these dynamics within our framework. Summary In our framework, SGLD and SGRLD take Q(z) = 0 and instead stress the design of the diffusion matrix D(z), with SGLD using a constant D(z) and SGRLD an adaptive, θ-dependent diffusion matrix to better account for the geometry of the space being explored. On the other hand, HMC takes D(z) = 0 and focuses on the curl matrix Q(z). SGHMC combines SGLD with HMC through non-zero D(θ) and Q(θ) matrices. SGNHT then extends SGHMC by taking Q(z) to be state dependent. The relationships between these methods are depicted in the Supplement, which likewise contains a discussion of the tradeoffs between these two matrices. In short, D(z) can guide escaping from local modes while Q(z) can enable rapid traversing of low-probability regions, especially when state adaptation is incorporated. We readily see that most of the product space D(z) × Q(z), defining the space of all possible samplers, has yet to be filled. 3.2 Stochastic Gradient Riemann Hamiltonian Monte Carlo In Sec. 3.1, we have shown how our framework unifies existing samplers. In this section, we now use our framework to guide the development of a new sampler. While SGHMC [6] inherits the momentum term of HMC, making it easier to traverse the space of parameters, the underlying geometry of the target distribution is still not utilized. Such information can usually be represented by the Fisher information metric [10], denoted as G(θ), which can be used to precondition the dynamics. For our proposed system, we consider H(θ, r) = U(θ) + 1 2rT r, as in HMC/SGHMC methods, and modify the D(θ, r) and Q(θ, r) of SGHMC to account for the geometry as follows: D(θ, r) = 0 0 0 G(θ)−1 ; Q(θ, r) = 0 −G(θ)−1/2 G(θ)−1/2 0 . We refer to this algorithm as stochastic gradient Riemann Hamiltonian Monte Carlo (SGRHMC). Our theory holds for any positive definite G(θ), yielding a generalized SGRHMC (gSGRHMC) algorithm, which can be helpful when the Fisher information metric is hard to compute. A na¨ıve implementation of a state-dependent SGHMC algorithm might simply (i) precondition the HMC update, (ii) replace ∇U(θ) by ∇eU(θ), and (iii) add a state-dependent friction term on the order of the diffusion matrix to counterbalance the noise as in SGHMC, resulting in: Naive : θt+1 ← θt + ϵtG(θt)−1/2rt rt+1 ← rt −ϵtG(θt)−1/2∇θ eU(θt) −ϵtG(θt)−1rt + N(0, ϵt(2G(θt)−1 −ϵt ˆBt)). (16) 6 Algorithm 1: Generalized Stochastic Gradient Riemann Hamiltonian Monte Carlo initialize (θ0, r0) for t = 0, 1, 2 · · · do optionally, periodically resample momentum r as r(t) ∼N(0, I) θt+1 ←θt + ϵtG(θt)−1/2rt, Σt ←ϵt(2G(θt)−1 −ϵt ˆBt) rt+1 ←rt −ϵtG(θt)−1/2∇θ eU(θt) + ϵt∇θ(G(θt)−1/2) −ϵtG(θt)−1rt + N 0, Σt end 1 2 SGLD 1 2 SGHMC 1 2 Naive gSGRHMC 1 2 gSGRHMC 0.000 0.005 0.010 0.015 0.020 K-L Divergence 0 2 4 6 8 10 0 0.5 1 1.5 2 2.5 log3(Steps/100)+1 K−L Divergence SGLD SGHMC gSGRHMC Figure 2: Left: For two simulated 1D distributions defined by U(θ) = θ2/2 (one peak) and U(θ) = θ4 −2θ2 (two peaks), we compare the KL divergence of methods: SGLD, SGHMC, the na¨ıve SGRHMC of Eq. (16), and the gSGRHMC of Eq. (17) relative to the true distribution in each scenario (left and right bars labeled by 1 and 2). Right: For a correlated 2D distribution with U(θ1, θ2) = θ4 1/10 + (4 · (θ2 + 1.2) −θ2 1)2/2, we see that our gSGRHMC most rapidly explores the space relative to SGHMC and SGLD. Contour plots of the distribution along with paths of the first 10 sampled points are shown for each method. However, as we show in Sec. 4.1, samples from these dynamics do not converge to the desired distribution. Indeed, this system cannot be written within our framework. Instead, we can simply follow our framework and, as indicated by Eq. (9), consider the following update rule: ( θt+1 ←θt + ϵtG(θt)−1/2rt rt+1 ←rt −ϵt[G(θ)−1/2∇θ eU(θt) + ∇θ G(θt)−1/2 −G(θt)−1rt] + N(0, ϵt(2G(θt)−1 −ϵt ˆBt)), (17) which includes a correction term ∇θ G(θ)−1/2 , with i-th component P j ∂ ∂θj G(θ)−1/2 ij. The practical implementation of gSGRHMC is outlined in Algorithm 1. 4 Experiments In Sec. 4.1, we show that gSGRHMC can excel at rapidly exploring distributions with complex landscapes. We then apply SGRHMC to sampling in a latent Dirichlet allocation (LDA) model on a large Wikipedia dataset in Sec. 4.2. The Supplement contains details on the specific samplers considered and the parameter settings used in these experiments. 4.1 Synthetic Experiments In this section we aim to empirically (i) validate the correctness of our recipe and (ii) assess the effectiveness of gSGRHMC. In Fig. 2(left), we consider two univariate distributions (shown in the Supplement) and compare SGLD, SGHMC, the na¨ıve state-adaptive SGHMC of Eq. (16), and our proposed gSGRHMC of Eq. (17). See the Supplement for the form of G(θ). As expected, the na¨ıve implementation does not converge to the target distribution. In contrast, the gSGRHMC algorithm obtained via our recipe indeed has the correct invariant distribution and efficiently explores the distributions. In the second experiment, we sample a bivariate distribution with strong correlation. The results are shown in Fig. 2(right). The comparison between SGLD, SGHMC, and our gSGRHMC method shows that both a state-dependent preconditioner and Hamiltonian dynamics help to make the sampler more efficient than either element on its own. 7 Original LDA Expanded Mean Parameter θ βkw = θkw βkw = θkw P w θkw Prior p(θ) p(θk) = Dir(α) p(θkw) = Γ(α, 1) Method Average Runtime per 100 Docs SGLD 0.778s SGHMC 0.815s SGRLD 0.730s SGRHMC 0.806s 0 2000 4000 6000 8000 10000 1000 1500 2000 2500 3000 3500 Number of Documents Perplexity SGLD SGHMC SGRLD SGRHMC Figure 3: Upper Left: Expanded mean parameterization of the LDA model. Lower Left: Average runtime per 100 Wikipedia entries for all methods. Right: Perplexity versus number of Wikipedia entries processed. 4.2 Online Latent Dirichlet Allocation We also applied SGRHMC (with G(θ) = diag(θ)−1, the Fisher information metric) to an online latent Dirichlet allocation (LDA) [5] analysis of topics present in Wikipedia entries. In LDA, each topic is associated with a distribution over words, with βkw the probability of word w under topic k. Each document is comprised of a mixture of topics, with π(d) k the probability of topic k in document d. Documents are generated by first selecting a topic z(d) j ∼π(d) for the jth word and then drawing the specific word from the topic as x(d) j ∼βz(d) j . Typically, π(d) and βk are given Dirichlet priors. The goal of our analysis here is inference of the corpus-wide topic distributions βk. Since the Wikipedia dataset is large and continually growing with new articles, it is not practical to carry out this task over the whole dataset. Instead, we scrape the corpus from Wikipedia in a streaming manner and sample parameters based on minibatches of data. Following the approach in [13], we first analytically marginalize the document distributions π(d) and, to resolve the boundary issue posed by the Dirichlet posterior of βk defined on the probability simplex, use an expanded mean parameterization shown in Figure 3(upper left). Under this parameterization, we then compute ∇log p(θ|x) and, in our implementation, use boundary reflection to ensure the positivity of parameters θkw. The necessary expectation over word-specific topic indicators z(d) j is approximated using Gibbs sampling separately on each document, as in [13]. The Supplement contains further details. For all the methods, we report results of three random runs. When sampling distributions with mass concentrated over small regions, as in this application, it is important to incorporate geometric information via a Riemannian sampler [13]. The results in Fig. 3(right) indeed demonstrate the importance of Riemannian variants of the stochastic gradient samplers. However, there also appears to be some benefits gained from the incorporation of the HMC term for both the Riemmannian and nonReimannian samplers. The average runtime for the different methods are similar (see Fig. 3(lower left)) since the main computational bottleneck is the gradient evaluation. Overall, this application serves as an important example of where our newly proposed sampler can have impact. 5 Conclusion We presented a general recipe for devising MCMC samplers based on continuous Markov processes. Our framework constructs an SDE specified by two matrices, a positive semidefinite D(z) and a skew-symmetric Q(z). We prove that for any D(z) and Q(z), we can devise a continuous Markov process with a specified stationary distribution. We also prove that for any continuous Markov process with the target stationary distribution, there exists a D(z) and Q(z) that cast the process in our framework. Our recipe is particularly useful in the more challenging case of devising stochastic gradient MCMC samplers. We demonstrate the utility of our recipe in “reinventing” previous stochastic gradient MCMC samplers, and in proposing our SGRHMC method. The efficiency and scalability of the SGRHMC method was shown on simulated data and a streaming Wikipedia analysis. Acknowledgments This work was supported in part by ONR Grant N00014-10-1-0746, NSF CAREER Award IIS-1350133, and the TerraSwarm Research Center sponsored by MARCO and DARPA. We also thank Mr. Lei Wu for helping with the proof of Theorem 2 and Professors Ping Ao and Hong Qian for many discussions. 8 References [1] S. Ahn, A. Korattikara, and M. Welling. Bayesian posterior sampling via stochastic gradient Fisher scoring. In Proceedings of the 29th International Conference on Machine Learning (ICML’12), 2012. [2] S. Ahn, B. Shahbaba, and M. Welling. Distributed stochastic gradient MCMC. In Proceeding of 31st International Conference on Machine Learning (ICML’14), 2014. [3] R. Bardenet, A. Doucet, and C. Holmes. Towards scaling up Markov chain Monte Carlo: An adaptive subsampling approach. In Proceedings of the 30th International Conference on Machine Learning (ICML’14), 2014. [4] M. Betancourt. The fundamental incompatibility of scalable Hamiltonian Monte Carlo and naive data subsampling. In Proceedings of the 31th International Conference on Machine Learning (ICML’15), 2015. [5] D.M. Blei, A.Y. Ng, and M.I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, March 2003. [6] T. Chen, E.B. Fox, and C. Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In Proceeding of 31st International Conference on Machine Learning (ICML’14), 2014. [7] N. Ding, Y. Fang, R. Babbush, C. Chen, R.D. Skeel, and H. Neven. Bayesian sampling using stochastic gradient thermostats. In Advances in Neural Information Processing Systems 27 (NIPS’14). 2014. [8] S. Duane, A.D. Kennedy, B.J. Pendleton, and D. Roweth. Hybrid Monte Carlo. Physics Letters B, 195(2):216 – 222, 1987. [9] W. Feller. Introduction to Probability Theory and its Applications. John Wiley & Sons, 1950. [10] M. Girolami and B. Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society Series B, 73(2):123–214, 03 2011. [11] A. Korattikara, Y. Chen, and M. Welling. Austerity in MCMC land: Cutting the MetropolisHastings budget. In Proceedings of the 30th International Conference on Machine Learning (ICML’14), 2014. [12] R.M. Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 54:113–162, 2010. [13] S. Patterson and Y.W. Teh. Stochastic gradient Riemannian Langevin dynamics on the probability simplex. In Advances in Neural Information Processing Systems 26 (NIPS’13). 2013. [14] H. Risken and T. Frank. The Fokker-Planck Equation: Methods of Solutions and Applications. Springer, 1996. [15] H. Robbins and S. Monro. A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407, 09 1951. [16] J. Shi, T. Chen, R. Yuan, B. Yuan, and P. Ao. Relation of a new interpretation of stochastic differential equations to Itˆo process. Journal of Statistical Physics, 148(3):579–590, 2012. [17] M. Welling and Y.W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML’11), pages 681–688, June 2011. [18] T. Xifara, C. Sherlock, S. Livingstone, S. Byrne, and M. Girolami. Langevin diffusions and the Metropolis-adjusted Langevin algorithm. Statistics & Probability Letters, 91:14–19, 2014. [19] L. Yin and P. Ao. Existence and construction of dynamical potential in nonequilibrium processes without detailed balance. Journal of Physics A: Mathematical and General, 39(27):8593, 2006. [20] R. Zwanzig. Nonequilibrium Statistical Mechanics. Oxford University Press, 2001. 9 | 2015 | 244 |
5,752 | Segregated Graphs and Marginals of Chain Graph Models Ilya Shpitser Department of Computer Science Johns Hopkins University ilyas@cs.jhu.edu Abstract Bayesian networks are a popular representation of asymmetric (for example causal) relationships between random variables. Markov random fields (MRFs) are a complementary model of symmetric relationships used in computer vision, spatial modeling, and social and gene expression networks. A chain graph model under the Lauritzen-Wermuth-Frydenberg interpretation (hereafter a chain graph model) generalizes both Bayesian networks and MRFs, and can represent asymmetric and symmetric relationships together. As in other graphical models, the set of marginals from distributions in a chain graph model induced by the presence of hidden variables forms a complex model. One recent approach to the study of marginal graphical models is to consider a well-behaved supermodel. Such a supermodel of marginals of Bayesian networks, defined only by conditional independences, and termed the ordinary Markov model, was studied at length in [6]. In this paper, we show that special mixed graphs which we call segregated graphs can be associated, via a Markov property, with supermodels of marginals of chain graphs defined only by conditional independences. Special features of segregated graphs imply the existence of a very natural factorization for these supermodels, and imply many existing results on the chain graph model, and the ordinary Markov model carry over. Our results suggest that segregated graphs define an analogue of the ordinary Markov model for marginals of chain graph models. We illustrate the utility of segregated graphs for analyzing outcome interference in causal inference via simulated datasets. 1 Introduction Graphical models are a flexible and widely used tool for modeling and inference in high dimensional settings. Directed acyclic graph (DAG) models, also known as Bayesian networks [11, 8], are often used to model relationships with an inherent asymmetry, perhaps induced by a temporal order on variables, or cause-effect relationships. Models represented by undirected graphs (UGs), such as Markov random fields (MRFs), are used to model symmetric relationships, for instance proximity in social graphs, expression co-occurrence in gene networks, coinciding magnetization of neighboring atoms, or similar colors of neighboring pixels in an image. Some graphical models can represent both symmetric and asymmetric relationships together. One such model is the chain graph model under the Lauritzen-Wermuth-Frydenberg interpretation, which we will shorten to “the chain graph model.” We will not consider the chain graph model under the Andersen-Madigan-Perlman (AMP) interpretation, or other chain graph models [22, 1] discussed in [4] in this paper. Just as the DAG models and MRFs, the chain graph model has a set of equivalent (under some assumptions) definitions via a set of Markov properties, and a factorization. 1 Modeling and inference in multivariate settings is complicated by the presence of hidden, yet relevant variables. Their presence motivates the study of marginal graphical models. Marginal DAG models are complicated objects, inducing not only conditional independence constraints, but also more general equality constraints such as the “Verma constraint” [21], and inequality constraints such as the instrumental variable inequality [3], and the Bell inequality in quantum mechanics [2]. One approach to studying marginal DAG models has therefore been to consider tractable supermodels defined by some easily characterized set of constraints, and represented by a mixed graph. One such supermodel, defined only by conditional independence constraints induced by the underlying hidden variable DAG on the observed margin, is the ordinary Markov model, studied in depth in [6]. Another supermodel, defined by generalized independence constraints including the Verma constraint [21] as a special case, is the nested Markov model [16]. There is a rich literature on Markov properties of mixed graphs, and corresponding independence models. See for instance [15, 14, 7]. In this paper, we adapt a similar approach to the study of marginal chain graph models. Specifically, we consider a supermodel defined only by conditional independences on observed variables of a hidden variable chain graph, and ignore generalized equality constraints and inequalities. We show that we can associate this supermodel with special mixed graphs which we call segregated graphs via a global Markov property. Special features of segregated graphs imply the existence of a convenient factorization, which we show is equivalent to the Markov property for positive distributions. This equivalence, along with properties of the factorization, implies many existing results on the chain graph model, and the ordinary Markov model carry over. The paper is organized as follows. Section 2 describes a motivating example from causal inference for the use of hidden variable chain graphs, with details deferred until section 6. In section 3, we introduce the necessary background on graphs and probability theory, define segregated graphs (SGs) and an associated global Markov property, and show that the global Markov properties for DAG models, chain graph models, and the ordinary Markov model induced by hidden variable DAGs are special cases. In section 4, we define the model of conditional independence induced by hidden variable chain graphs, and show it can always be represented by a SG via an appropriate global Markov property. In section 5, we define segregated factorization and show that under positivity, the global Markov property in section 4 and segregated factorization are equivalent. In section 6, we introduce causal inference and interference analysis as an application domain for hidden variable chain graph models, and thus for SGs, and discuss a simulation study that illustrates our results and shows how parameters of the model represented by a SG can directly encode parameters representing outcome interference in the underlying hidden variable chain graph. Section 7 contains our conclusions. We will provide outlines of arguments for our claims below, but will generally defer detailed proofs to the supplementary material. 2 Motivating Example: Interference in Causal Inference Consider a dataset obtained from a placebo-controlled vaccination trial, described in [20], consisting of mother/child pairs where the children were vaccinated against pertussis. We suspect that though mothers were not vaccinated directly, the fact that children were vaccinated, and each mother will generally only contract pertussis from her child, the child’s vaccine may have a protective effect on the mother. At the same time, if only the mothers but not children were vaccinated, we would expect the same protective effect to operate in reverse. This is an example of interference, an effect of treatment on experimental units other than those to which the treatment was administered. The relationship between the outcomes of mother and child due to interference in this case has some features of a causal relationship, but is symmetric. We model this study by a chain graph shown in Fig. 1 (a), see section 6 for a justification of this model. Here B1 is the vaccine (or placebo) given to children, and Y1 is the children’s outcomes. B2 is the treatment given to mothers (in our case no treatment), and Y2 is the mothers’ outcomes. Directed edges represent the direct causal effect of treatment on unit, and the undirected edge represents the interference relationship among the mother/child outcome pair. In this model (B1 ⊥⊥B2) (mother and child treatment are assigned independently), and (Y1 ⊥⊥B2 | B1, Y1), (Y2 ⊥⊥B1 | B2, Y1) (mother’s outcome is independent of child’s treatment, if we know child’s outcome, and mother’s treatment, and vice versa). Since treatments in this study were randomly assigned, there are no unobserved confounders. 2 B1 B2 Y1 Y2 (a) A W B1 U Y1 Y2 (b) A W B1 Y1 Y2 (c) A W B1 Y1 Y2 (d) Figure 1: (a) A chain graph representing the mother/child vaccination example in [20]. (b) A more complex vaccination example with a followup booster shot. (c) A naive generalization of the latent projection idea applied to (b), where ↔and −edges meet. (d) A segregated graph preserving conditional independences in (b) not involving U. Consider, however, a more complex example, where both mother and child are given the initial vaccine A, but possibly based on results W of a followup visit, children are given a booster B1, and we consider the child’s (Y1) and the mother’s (Y2) outcomes, where the same kind of interference relationship is operating. We model the child’s unobserved health status, which influences both W and Y1, by a (possibly very high dimensional) hidden variable U. The result is a hidden variable chain graph in Fig. 1 (b). Since U is unobserved and possibly very complex, modeling it directly may lead to model misspecification. An alternative, explored for instance in [13, 6, 16], is to consider a model defined by conditional independences induced by the hidden variable model in Fig. 1 (b) on observed variables A, B1, W, Y1, Y2. A simple approach that directly generalizes what had been done in DAG models is to encode conditional independences via a path separation criterion on a mixed graph constructed from a hidden variable chain graph via a latent projection operation [21]. The difficulty with this approach is that simple generalizations of latent projections to the chain graph case may yield graphs where ↔and −edges met, as happens in Fig. 1 (c). This is an undesirable feature of a graphical representation, since existing factorization and parameterization results for chain graphs or ordinary Markov models, which decompose the joint distribution into pieces corresponding to sets connected by −or ↔ edges, do not generalize. In the remainder of the paper, we show that for any hidden variable chain graph it is always possible to construct a (not necessarily unique) mixed graph called a segregated graph (SG) where ↔and −edges do not meet, and which preserves all conditional independences on the observed variables. One SG for our example is shown in Fig. 1 (d). Conditional independences implied by this graph are B1 ⊥⊥A1 | W and Y2 ⊥⊥W, B1 | A1, Y1. Properties of SGs imply existing results on chain graphs and the ordinary Markov model carry over with little change. For example, we may directly apply the parameterization in [6], and the fitting algorithm in [5] to the model corresponding to Fig. 1 (d) if the state spaces are discrete, as we illustrate in section 6.1. The construction we give for SGs may replace undirected edges by directed edges in a way that may break the symmetry of the underlying interference relationship. Thus, directed edges in a SG do not have a straightforward causal interpretation. 3 Background and Preliminaries We will consider mixed graphs with three types of edges, undirected (−), directed (↔), and directed (→), where a pair of vertices is connected either by a single edge, or a pair of edges one of which is directed and one bidirected. We will denote an edge as an ordered pair of vertices with a subscript indicating the type of edge, for example (AB)→. We will suppress the subscript if edge orientation is not important. An alternating sequence of nodes and edges of the form A1, (A1A2), A2, (A2A3), A3, . . . Ai−1, (Ai−1Ai), Ai where we allow Ai = Aj if i ̸= j±1 is called a walk (in some references also a route). We will denote walks by lowercase Greek letters. A walk with non-repeating edges is called a trail. A trial with non-repeating vertices is called a path. A directed cycle is a trail of the form A1, (A1A2)→, A2, . . . , Ai, (AiA1)→, A1. A partially directed cycle is a trail with −, →edges, and at least one →edge where there exists a way to orient −edges to create a directed cycle. We will sometimes write a path from A to B where intermediate vertices are not important, but edge orientation is as, for example, A →◦−. . . −◦−B. 3 A mixed graph with no −and ↔edges, and no directed cycles is called a directed acyclic graph (DAG). A mixed graph with no −edges, and no directed cycles is called an acyclic directed mixed graph (ADMG). A mixed graph with no ↔edges, and no partially directed cycles is called a chain graph (CG). A segregated graph (SG) is a mixed graph with no partially directed cycles where no path of the form Ai(AiAj)−Aj(AjAk)↔Ak exists. DAGs are special cases of ADMGs and CGs which are special cases of SGs. We consider sets of distributions over a set V defined by independence constraints linked to above types of graphs via (global) Markov properties. We will refer to V as either vertices in a graph or random variables in a distribution, it will be clear from context what we mean. A Markov model of a graph G defined via a global Markov property has the general form P(G) ≡ n p(V) (∀A ˙∪B ˙∪C ⊆V), (A ⊥⊥B | C)G ⇒(A ⊥⊥B | C)p(V) o , where the consequent means “A is independent of B conditional on C in p(V),” and the antecedent means “A is separated from B given C according to a certain walk separation property in G.” Since DAGs, ADMGs, and CGs are special cases of SGs, we will define the appropriate path separation property for SGs, which will recover known separation properties in DAGs, ADMGs and CGs as special cases. A walk α contained in another walk β is called a subwalk of β. A maximal subwalk in β where all edges are undirected is called a section of β. A section may consist of a single node and no edges. We say a section α of a walk β is a collider section if edges in β immediately preceding and following α contain arrowheads into α. Otherwise, α is a non-collider section. A walk β from A to B is said to be s-separated by a set C in a SG G if there exists a collider section α that does not contain an element of C, or a non-collider section that does (such a section is called blocked). A is said to be s-separated from B given C in a SG G if every walk from a vertex in A to a vertex in B is s-separated by C, and is s-connected given C otherwise. Lemma 3.1 The Markov properties defined by superactive routes (walks) [17] in CGs, mseparation [14] in ADMGs, and d-separation [11] in DAGs are special cases of the Markov property defined by s-separation in SGs. 4 A Segregated Graph Representation of CG Independence Models For a SG G, and W ⊂V, define the model P(G)W to be the set of distributions where all conditional independences in P W p(V) implied by G hold. That is P(G)W ≡ n p(V \ W) (∀A ˙∪B ˙∪C ⊆V \ W), (A ⊥⊥B | C)G ⇒(A ⊥⊥B | C)p(V) o . P(G1)W1 may equal P(G2)W2 even if G1, W1 and G2, W2 are distinct. If W is empty, P(G)W simply reduces to the Markov model defined by s-separation on the entire graph. We are going to show that there is always a SG that represents the conditional independences that define P(G)W, using a special type of vertex we call sensitive. A vertex V in an SG G is sensitive if for any other vertex W, if W →◦−. . . −◦−V exists in G, then W →V exists in G. We first show that if V is sensitive, we can orient all undirected edges away from V and this results in a new SG that gives the same set of conditional independence via s-separation. This is Lemma 4.1. Next, we show that for any V with a child Z with adjacent undirected edges, if Z is not sensitive, we can make it sensitive by adding appropriate edges, and this results in a new SG that preserves all conditional independences that do not involve V . This is Lemma 4.3. Given above, for any vertex V in a SG G, we can construct a new SG that preserves all conditional independences in G that do not involve V , and where no children of V have adjacent undirected edges. This is Lemma 4.4. We then “project out V ” to get another SG that preserves all conditional independences not involving V in G. This is Theorem 4.1. We are then done, Corollary 4.1 states that there is always a (not necessarily unique) SG for the conditional independence structure of a marginal of a CG. Lemma 4.1 For V sensitive in a SG G, let G⟨V ⟩be the graph be obtained from G by replacing all − edges adjacent to V by →edges pointing away from V . Then G⟨V ⟩is an SG, and P(G) = P(G⟨V ⟩). 4 The intuition here is that directed edges differ from undirected edges due to collider bias induced by the former. That is, dependence between parents of a block is created by conditioning on variables in the block. But a sensitive vertex in a block is already dependent on all the parents in the block, so orienting undirected edges away from such a vertex and making it a block parent does not change the set of advertised independences. Lemma 4.2 Let G be an SG, and G′ a graph obtained from adding an edge W →V for two nonadjacent vertices W, V where W →◦−. . . −◦−V exists in G. Then G′ is an SG. Lemma 4.3 For any V in an SG G, let GV be obtained from G by adding W →Z, whenever W →◦−. . . −◦−Z ←V exists in G. Then GV is an SG, and P(G)V = P(GV )V . This lemma establishes that two graphs, one an edge supergraph of the other, agree on the conditional independences not involving V . Certainly the subgraph advertises at least as many constraints as the supergraph. To see the converse, note that definition of s-separation, coupled with our inability to condition on V can always be used to create dependence between W and Z, the vertices joined by an edge in the supergraph explicitly. This dependence can be created regardless of the conditioning set, either via the path W →◦−. . .−◦−Z, or via the walk path W →◦−. . .−◦−Z ←V →Z. It can thus be shown that adding these edges does not remove any independences. Lemma 4.4 Let V be a vertex in a SG G with at least two vertices. Then there exists an SG GV where V →◦−◦does not exist, and P(G)V = P(GV )V . Proof: This follows by an inductive application of Lemmas 4.1, 4.2, and 4.3. □ Note that Lemma 4.4 does not guarantee that the graph GV is unique. In fact, depending on the order in which we apply the induction, we may obtain different SGs with the required property. Theorem 4.1 If G is an SG with at least 2 vertices V, and V ∈V, there exists an SG GV with vertices V \ {V } such that P(G)V = P(GV )V . This theorem exploits previous results to construct a graph which agrees with G on all independences not involving V and which does not contain children of V that are a part of the block with size greater than two. Given a graph with this structure, we can adapt the latent projection construction to yield a SG that preserves all independences. Corollary 4.1 Let G be an SG with vertices V. Then for any W ⊂V, there exists an SG G∗with vertices V \ W such that P(G)W = P(G∗). 5 Segregated Factorization We now show that, for positive distributions, the Markov property we defined and a certain factorization for SGs give the same model. A set of vertices that form a connected component in a graph obtained from G by dropping all edges except ↔, and where no vertex is adjacent to a −edge in G is called a district in G. A non-trivial block is a set of vertices forming a connected component of size two or more in a graph obtained from G by dropping all edges except −. We denote the set of districts, and non-trivial blocks in G by D(G), and B∗(G), respectively. It is trivial to show that in a SG G with vertices V, D(G), and B∗(G) partition V. For a vertex set S in G, define pas G(S) ≡{W ̸∈S | (WV )→is in G, V ∈S}, and pa∗ G(S) ≡ pas G(S) ∪S. For A ⊆V in G, let GA be the subgraph of G containing only vertices in A and edges between them. The anterior of a set S, denoted by antG(S) is the set of vertices V with a partially directed path into a node in S. A set A ⊆V is called anterial in G if whenever V ∈A, antG(V ) ⊆A. We denote the set of non-empty anterial subsets of V in G by A(G). Let Da(G) ≡ S A∈A(G) D(GA). A clique in an UG G is a maximal connected component. The set of cliques in an UG G will be denoted by C(G). A vertex ordering ≺is topological for a SG G if whenever V ≺W, W ̸∈antG(V ). For a vertex V in G, and a topological ≺, define preG,≺(V ) ≡{W ̸= V | W ≺V }. 5 C A Y (a) C A1 A2 Y1 Y2 (b) C A1 A2 Y 1 1 Y 1 2 Y 2 1 Y 2 2 . . . (c) A1 A2 Y 1 1 Y 1 2 Y 2 1 Y 2 2 . . . (d) Figure 2: (a) A simple causal DAG model. (b),(c) Causal DAG models for interference. (d) A causal DAG representing a Markov chain with an equilibrium distribution in the chain graph model in Fig. 1 (a). Given a SG G, define the augmented graph Ga to be an undirected graph with the same vertex set as G where A, B share an undirected edge in Ga if A, B are connected by a walk consisting exclusively of collider sections in G (note that this trivially includes all A, B that share an edge). We say p(V) satisfies the augmented global Markov property with respect to a SG G if for any A ∈A(G), p(A) satisfies the UG global Markov property with respect to (GA)a. We denote a model, that is a set of p(V) satisfying this property with respect to G, as Pa(G). By analogy with the ordinary Markov model and the chain graph model, we say that p(V) obeys the segregated factorization with respect to a SG G if there exists a set of kernels [8] fS(S | pas G(S)) S ∈Da(G) ∪B∗(G) such that for every A ∈ A(G), p(A) = Q S∈D(GA)∪B∗(GA) fS(S | pas G(S)), and for every S ∈ B∗(G), fS(S | pas G(S)) = Q C∈C((Gpa∗ G (S))a) φC(C), where φC(C) is a mapping from values of C to non-negative reals. Lemma 5.1 If p(V) factorizes with respect to G then fS(S | pas G(S)) = p(S | pas G(S)) for every S ∈B∗(G), and fS(S | pas G(S)) = Q V ∈S p(V | preG,≺(V ) ∩antG(S)) for every S ∈Da(G) and any topological ordering ≺on G. Theorem 5.1 If p(V) factorizes with respect to a SG G, then p(V) ∈Pa(G). Lemma 5.2 If there exists a walk α in G between A ∈A, B ∈B with all non-collider sections not intersecting C, and all collider sections in antG(A ∪B ∪C), then there exist A∗∈A, B∗∈B such that A∗and B∗are s-connected given C in G. Theorem 5.2 P(G) = Pa(G). Theorem 5.3 For a SG G, if p(V) ∈P(G) and is positive, then p(V) factorizes with respect to G. Corollary 5.1 For any SG G, if p(V) is positive, then p(V) ∈P(G) if and only if p(V) factorizes with respect to G. 6 Causal Inference and Interference Analysis In this section we briefly describe interference analysis in causal inference, as a motivation for the use of SGs. Causal inference is concerned with using observational data to infer cause effect relationships as encoded by interventions (setting variable valus from “outside the model.”). Causal DAGs are often used as a tool, where directed arrows represent causal relationships, not just statistical relevance. See [12] for an extensive discussion of causal inference. Much of recent work on interference in causal inference, see for instance [10, 19], has generalized causal DAG models to settings where an intervention given to a subjects affects other subjects. A classic example is herd immunity in epidemiology – vaccinating a subset of subjects can render all subjects, even those who were not vaccinated, immune. Interference is typically encoded by having vertices in a causal diagram represent not response variability in a population, but responses of individual units, or appropriately defined groups of units, where interference only occurs between groups, not within a 6 0.000 0.025 0.050 0.075 10 20 30 (a) G G G G G G G G G G G G G G G G G G G G G G G G G G 0.2 0.3 0.4 0.5 −0.2 0.0 0.2 (b) G G G G G G G G G G G G G G G G G G G G G G G G G G 0.30 0.35 0.40 0.45 0.50 −0.2 0.0 0.2 (c) Figure 3: (a) χ2 density with 14 degrees of freedom (red) and a histogram of observed deviances of ordinary Markov models of Fig. 1 (d) fitted with data sampled from a randomly sampled model of Fig. 1 (b). (b) Y axis: values of parameters p(Y5 = 0 | Y4 = 0, A = 0) (red), and p(Y5 = 0 | Y4 = 1, A = 0) (green) in the fitted nested Markov model of Fig. 1 (d). X axis: value of the interaction parameter λ45 (and 3 · λ145) in the underlying chain graph model for Fig. 1. (c) Same plot with p(Y5 = 0 | Y4 = 0, A = 1) (yellow), and p(Y5 = 0 | Y4 = 1, A = 1) (blue). group. For example, the DAG in Fig. 2 (b) represents a generalization of the model in Fig. 2 (a) to a setting with unit pairs where assigning a vaccine to one unit may also influence another unit, as was the case in the example in Section 2. Furthermore, we may consider more involved examples of interference if we record responses over time, as is shown in Fig. 2 (c). Extensive discussions on this type of modeling approach can be found in [18, 10]. We consider an alternative approach to encoding interference between responses using chain graph models. We give two justifications for the use of chain graphs. First, we may assume that interference arises as a dependence between responses Y1 and Y2 in equilibrium of a Markov chain where transition probabilities represent the causal influence of Y1 on Y2, and vice versa, at multiple points in time before equilibrium is reached. Under certain assumptions [9], it can be shown that such an equilibrium distribution obeys the Markov property of a chain graph. For example the DAG shown in Fig. 2 encodes transition probabilities p(Y t+1 1 , Y t+1 1 | Y t 1 , Y t 2 , a1, a2) = p(Y t+1 2 | Y t+1 1 , a1, a2)p(Y t+1 1 | Y t 2 , a1, a2), for particular values a1, a2. For suitably chosen conditional distributions, these transition probabilities lead to an equilibrium distribution that lies in the model corresponding to the chain graph in Fig. 1 (a) [9]. Second, we may consider certain independence assumptions in our problem as reasonable, and sometimes such assumptions lead naturally to a chain graph model. For example, we may study the effect of a marketing intervention in a social network, and consider it reasonable that we can predict the response of any person only knowing the treatment for that person and responses of all friends of this person in a social network (in other words, the treatments on everyone else are irrelevant given this information). These assumptions result in a response model that is a chain graph with directed arrows from treatment to every person’s response, and undirected edges between friends only. 6.1 An Example of Interference Analysis Using Segregated Graph Models Given ubiquity of unobserved confounding variables in causal inference, and our our choice of chain graphs for modeling interference, we use models represented by SGs to avoid having to deal with a hidden variable chain graph model directly, due to the possibility of misspecifying the likely high dimensional hidden variables involved. We briefly describe a simulation we performed to illustrate how SGs may be used for interference analysis. As a running example, we used a model shown in Fig. 1 (b), with A, W, B1, Y1, Y2 binary, and U 15-valued. We first considered the following family of parameterizations. In all members of this family, A was assigned via a fair coin, p(W | A, U) was a logistic model with no interactions, B1 was randomly assigned via a fair coin given no complications (W = 1), otherwise B1 was heavily weighted (0.8 probability) towards treatment assignment. The distribution p(Y1, Y2 | U, B1, A) was 7 obtained from a joint distribution p(Y1, Y2, U, B1, A) in a log-linear model of an undirected graph G of the form: 1 Z exp P C(−1)∥xC∥1λC , where C ranges over all cliques in G, ∥.∥1 is the L1-norm, λC are interactions parameters, and Z is a normalizing constant. In our case G was an undirected graph over A, B1, U, Y1, Y2 where edges from Y2 to B1 and U were missing, and all other edges were present. Parameters λC were generated from N(0, 0.3). It is not difficult to show that all elements in our family lie in the chain graph model in Fig. 1 (b). Since all observed variables in our example are binary, the saturated model has 25 −1 = 31 parameters, and the model corresponding to Fig. 1 (d) is missing 14 of them. 2 are missing because p(B1 | W, A) does not depend on A, and 12 are missing because p(Y2 | Y1, B1, W, A) does not depend on W, B1. If our results on SGs are correct, we would expect the ordinary Markov model [6] of a graph in Fig. 1 (b) to be a good fit for the data generated from our hidden variable chain graph family, where we omit the values of U. In particular, we would expect the observed deviances of our models fitted to data generated from our family to closely follow a χ2 distribution with 14 degrees of freedom. We generated 1000 members of our family described above, used each member to generate 5000 samples, and fitted the ordinary Markov model using an approach described in [5]. The resulting deviances, plotting against the appropriate χ2 distribution, are shown in Fig. 3 (a), which looks as we expect. We did not vary the parameters for A, W, B1. This is because models for Fig. 1 (b) and Fig. 1 (d) will induce the same marginal model for p(A, B1, W) by construction. In addition, we wanted to illustrate that we can encode interaction parameters directly via parameters in a SG. To this end, we generated a set of distributions p(Y1, Y2 | A, U, B1) via the binary log-linear model as described above, where all λC parameters were fixed, except we constrained λ{Y1,Y2} to equal 3 · λ{A,Y1,Y5}, and varied λ{Y1,Y2} from −0.3 to 0.3. These parameters represent two-way interaction of Y1 and Y2, and three-way interaction of A, Y1 and Y2, and thus directly encode the strength of the interference relationship between responses. Since the SG in Fig. 1 (d) “breaks the symmetry” by replacing the undirected edge between Y1 and Y2 by a directed edge, the strength of interaction is represented by the degree of dependence of Y2 and Y1 conditional on A. As can be seen in Fig. 3 (b),(c) we obtain independence precisely when λ{Y4,Y5} and λ{A,Y4,Y5} in the underlying hidden variable chain graph model is 0, as expected. Our simulations did not require the modification of the fitting procedure in [5], since Fig. 1 (d) is an ADMG. In general, a SG will have undirected blocks. However, the special property of SGs allows for a trivial modification of the fitting procedure. Since the likelihood decomposes into pieces corresponding to districts and blocks of the SG, we can simply fit each district piece using the approach in [5], and each block piece using any of the existing fitting procedures for discrete chain graph models. 7 Discussion and Conclusions In this paper we considered a graphical representation of the ordinary Markov chain graph model, the set of distributions defined by conditional independences implied by a marginal of a chain graph model. We show that this model can be represented by segregated graphs via a global Markov property which generalizes Markov properties in chain graphs, DAGs, and mixed graphs representing marginals of DAG models. Segregated graphs have the property that bidirected and undirected edges are never adjacent. Under positivity, this global Markov property is equivalent to segregated factorization which decomposes the joint distribution into pieces that correspond either to sections of the graph containing bidirected edges, or sections of the graph containing undirected edges, but never both together. The convenient form of this factorization implies many existing results on chain graph and ordinary Markov models, in particular parameterizations and fitting algorithms, carry over. We illustrated the utility of segregated graphs for interference analysis in causal inference via simulated datasets. Acknowledgements The author would like to thank Thomas Richardson for suggesting mixed graphs where −and ↔ edges do not meet as interesting objects to think about, and Elizabeth Ogburn and Eric Tchetgen Tchetgen for clarifying discussions of interference. This work was supported in part by an NIH grant R01 AI104459-01A1. 8 References [1] S. A. Andersson, D. Madigan, and M. D. Perlman. A characterization of Markov equivalence classes for acyclic digraphs. Annals of Statistics, 25:505–541, 1997. [2] J. Bell. On the Einstein Podolsky Rosen paradox. Physics, 1(3):195–200, 1964. [3] Z. Cai, M. Kuroki, J. Pearl, and J. Tian. Bounds on direct effects in the presence of confounded intermediate variables. Biometrics, 64:695 – 701, 2008. [4] M. Drton. Discrete chain graph models. Bernoulli, 15(3):736–753, 2009. [5] R. J. Evans and T. S. Richardson. Maximum likelihood fitting of acyclic directed mixed graphs to binary data. In Proceedings of the Twenty Sixth Conference on Uncertainty in Artificial Intelligence, volume 26, 2010. [6] R. J. Evans and T. S. Richardson. Markovian acyclic directed mixed graphs for discrete data. Annals of Statistics, pages 1–30, 2014. [7] J. T. A. Koster. Marginalizing and conditioning in graphical models. Bernoulli, 8(6):817–840, 2002. [8] S. L. Lauritzen. Graphical Models. Oxford, U.K.: Clarendon, 1996. [9] S. L. Lauritzen and T. S. Richardson. Chain graph models and their causal interpretations (with discussion). Journal of the Royal Statistical Society: Series B, 64:321–361, 2002. [10] E. L. Ogburn and T. J. VanderWeele. Causal diagrams for interference. Statistical Science, 29(4):559–578, 2014. [11] J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan and Kaufmann, San Mateo, 1988. [12] J. Pearl. Causality: Models, Reasoning, and Inference. Cambridge University Press, 2 edition, 2009. [13] T. Richardson and P. Spirtes. Ancestral graph Markov models. Annals of Statistics, 30:962–1030, 2002. [14] T. S. Richardson. Markov properties for acyclic directed mixed graphs. Scandinavial Journal of Statistics, 30(1):145–157, 2003. [15] K. Sadeghi and S. Lauritzen. Markov properties for mixed graphs. Bernoulli, 20(2):676–696, 2014. [16] I. Shpitser, R. J. Evans, T. S. Richardson, and J. M. Robins. Introduction to nested Markov models. Behaviormetrika, 41(1):3–39, 2014. [17] M. Studeny. Bayesian networks from the point of view of chain graphs. In Proceedings of the Fourteenth Conference on Uncertainty in Artificial Intelligence (UAI-98), pages 496–503. Morgan Kaufmann, San Francisco, CA, 1998. [18] M. J. van der Laan. Causal inference for networks. Working paper, 2012. [19] M. J. van der Laan. Causal inference for a population of causally connected units. Journal of Causal Inference, 2(1):13–74, 2014. [20] T. J. VanderWeele, E. J. T. Tchetgen, and M. E. Halloran. Components of the indirect effect in vaccine trials: identification of contagion and infectiousness effects. Epidemiology, 23(5):751–761, 2012. [21] T. S. Verma and J. Pearl. Equivalence and synthesis of causal models. Technical Report R-150, Department of Computer Science, University of California, Los Angeles, 1990. [22] N. Wermuth. Probability distributions with summary graph structure. Bernoulli, 17(3):845–879, 2011. 9 | 2015 | 245 |
5,753 | Rethinking LDA: Moment Matching for Discrete ICA Anastasia Podosinnikova Francis Bach Simon Lacoste-Julien INRIA - ´Ecole normale sup´erieure Paris Abstract We consider moment matching techniques for estimation in latent Dirichlet allocation (LDA). By drawing explicit links between LDA and discrete versions of independent component analysis (ICA), we first derive a new set of cumulantbased tensors, with an improved sample complexity. Moreover, we reuse standard ICA techniques such as joint diagonalization of tensors to improve over existing methods based on the tensor power method. In an extensive set of experiments on both synthetic and real datasets, we show that our new combination of tensors and orthogonal joint diagonalization techniques outperforms existing moment matching methods. 1 Introduction Topic models have emerged as flexible and important tools for the modelisation of text corpora. While early work has focused on graphical-model approximate inference techniques such as variational inference [1] or Gibbs sampling [2], tensor-based moment matching techniques have recently emerged as strong competitors due to their computational speed and theoretical guarantees [3, 4]. In this paper, we draw explicit links with the independent component analysis (ICA) literature (e.g., [5] and references therein) by showing a strong relationship between latent Dirichlet allocation (LDA) [1] and ICA [6, 7, 8]. We can then reuse standard ICA techniques and results, and derive new tensors with better sample complexity and new algorithms based on joint diagonalization. 2 Is LDA discrete PCA or discrete ICA? Notation. Following the text modeling terminology, we define a corpus X = {x1, . . . , xN} as a collection of N documents. Each document is a collection {wn1, . . . , wnLn} of Ln tokens. It is convenient to represent the ℓ-th token of the n-th document as a 1-of-M encoding with an indicator vector wnℓ∈{0, 1}M with only one non-zero, where M is the vocabulary size, and each document as the count vector xn := P ℓwnℓ∈RM. In such representation, the length Ln of the n-th document is Ln = P m xnm. We will always use index k ∈{1, . . . , K} to refer to topics, index n ∈{1, . . . , N} to refer to documents, index m ∈{1, . . . , M} to refer to words from the vocabulary, and index ℓ∈{1, . . . , Ln} to refer to tokens of the n-th document. The plate diagrams of the models from this section are presented in Appendix A. Latent Dirichlet allocation [1] is a generative probabilistic model for discrete data such as text corpora. In accordance to this model, the n-th document is modeled as an admixture over the vocabulary of M words with K latent topics. Specifically, the latent variable θn, which is sampled from the Dirichlet distribution, represents the topic mixture proportion over K topics for the n-th document. Given θn, the topic choice znℓ|θn for the ℓ-th token is sampled from the multinomial distribution with the probability vector θn. The token wnℓ|znℓ, θn is then sampled from the multinomial distribution with the probability vector dznℓ, or dk if k is the index of the non-zero element in znℓ. This vector dk is the k-th topic, that is a vector of probabilities over the words from the vocabulary subject to the simplex constraint, i.e., dk ∈∆M, where ∆M := {d ∈RM : d ⪰0, P m dm = 1}. This generative process of a document (the index n is omitted for simplicity) can be summarized as 1 θ ∼Dirichlet(c), zℓ|θ ∼Multinomial(1, θ), wℓ|zℓ, θ ∼Multinomial(1, dzℓ). (1) One can think of the latent variables zℓas auxiliary variables which were introduced for convenience of inference, but can in fact be marginalized out [9], which leads to the following model θ ∼Dirichlet(c), x|θ ∼Multinomial(L, Dθ), LDA model (2) where D ∈RM×K is the topic matrix with the k-th column equal to the k-th topic dk, and c ∈RK ++ is the vector of parameters for the Dirichlet distribution. While a document is represented as a set of tokens wℓin the formulation (1), the formulation (2) instead compactly represents a document as the count vector x. Although the two representations are equivalent, we focus on the second one in this paper and therefore refer to it as the LDA model. Importantly, the LDA model does not model the length of documents. Indeed, although the original paper [1] proposes to model the document length as L|λ ∼Poisson(λ), this is never used in practice and, in particular, the parameter λ is not learned. Therefore, in the way that the LDA model is typically used, it does not provide a complete generative process of a document as there is no rule to sample L|λ. In this paper, this fact is important, as we need to model the document length in order to make the link with discrete ICA. Discrete PCA. The LDA model (2) can be seen as a discretization of principal component analysis (PCA) via replacement of the normal likelihood with the multinomial one and adjusting the prior [9] in the following probabilistic PCA model [10, 11]: θ ∼Normal(0, IK) and x|θ ∼ Normal(Dθ, σ2IM), where D ∈RM×K is a transformation matrix and σ is a parameter. Discrete ICA (DICA). Interestingly, a small extension of the LDA model allows its interpretation as a discrete independent component analysis model. The extension naturally arises when the document length for the LDA model is modeled as a random variable from the gamma-Poisson mixture (which is equivalent to a negative binomial random variable), i.e., L|λ ∼Poisson(λ) and λ ∼Gamma(c0, b), where c0 := P k ck is the shape parameter and b > 0 is the rate parameter. The LDA model (2) with such document length is equivalent (see Appendix B.1) to αk ∼Gamma(ck, b), xm|α ∼Poisson([Dα]m), GP model (3) where all α1, α2, . . . , αK are mutually independent, the parameters ck coincide with the ones of the LDA model in (2), and the free parameter b can be seen (see Appendix B.2) as a scaling parameter for the document length when c0 is already prescribed. This model was introduced by Canny [12] and later named as a discrete ICA model [13]. It is more natural, however, to name model (3) as the gamma-Poisson (GP) model and the model α1, . . . , αK ∼mutually independent, xm|α ∼Poisson([Dα]m) DICA model (4) as the discrete ICA (DICA) model. The only difference between (4) and the standard ICA model [6, 7, 8] (without additive noise) is the presence of the Poisson noise which enforces discrete, instead of continuous, values of xm. Note also that (a) the discrete ICA model is a semi-parametric model that can adapt to any distribution on the topic intensities αk and that (b) the GP model (3) is a particular case of both the LDA model (2) and the DICA model (4). Thanks to this close connection between LDA and ICA, we can reuse standard ICA techniques to derive new efficient algorithms for topic modeling. 3 Moment matching for topic modeling The method of moments estimates latent parameters of a probabilistic model by matching theoretical expressions of its moments with their sample estimates. Recently [3, 4], the method of moments was applied to different latent variable models including LDA, resulting in computationally fast 2 learning algorithms with theoretical guarantees. For LDA, they (a) construct LDA moments with a particular diagonal structure and (b) develop algorithms for estimating the parameters of the model by exploiting this diagonal structure. In this paper, we introduce novel GP/DICA cumulants with a similar to the LDA moments structure. This structure allows to reapply the algorithms of [3, 4] for the estimation of the model parameters, with the same theoretical guarantees. We also consider another algorithm applicable to both the LDA moments and the GP/DICA cumulants. 3.1 Cumulants of the GP and DICA models In this section, we derive and analyze the novel cumulants of the DICA model. As the GP model is a particular case of the DICA model, all results of this section extend to the GP model. The first three cumulant tensors for the random vector x can be defined as follows cum(x) := E(x), (5) cum(x, x) := cov(x, x) = E (x −E(x))(x −E(x))⊤ , (6) cum(x, x, x) := E [(x −E(x)) ⊗(x −E(x)) ⊗(x −E(x))] , (7) where ⊗denotes the tensor product (see some properties of cumulants in Appendix C.1). The essential property of the cumulants (which does not hold for moments) that we use in this paper is that the cumulant tensor for a random vector with independent components is diagonal. Let y = Dα; then for the Poisson random variable xm|ym ∼Poisson(ym), the expectation is E(xm|ym) = ym. Hence, by the law of total expectation and the linearity of expectation, the expectation in (5) has the following form E(x) = E(E(x|y)) = E(y) = DE(α). (8) Further, the variance of the Poisson random variable xm is var(xm|ym) = ym and, as x1, x2, . . . , xM are conditionally independent given y, then their covariance matrix is diagonal, i.e., cov(x, x|y) = diag(y). Therefore, by the law of total covariance, the covariance in (6) has the form cov(x, x) = E [cov(x, x|y)] + cov [E(x|y), E(x|y)] = diag [E(y)] + cov(y, y) = diag [E(x)] + Dcov(α, α)D⊤, (9) where the last equality follows by the multilinearity property of cumulants (see Appendix C.1). Moving the first term from the RHS of (9) to the LHS, we define S := cov(x, x) −diag [E(x)] . DICA S-cum. (10) From (9) and by the independence of α1, . . . , αK (see Appendix C.3), S has the following diagonal structure S = X k var(αk)dkd⊤ k = Ddiag [var(α)] D⊤. (11) By analogy with the second order case, using the law of total cumulance, the multilinearity property of cumulants, and the independence of α1, . . . , αK, we derive in Appendix C.2 expression (24), similar to (9), for the third cumulant (7). Moving the terms in this expression, we define a tensor T with the following element [T]m1m2m3 := cum(xm1, xm2, xm3) + 2δ(m1, m2, m3)E(xm1) DICA T-cum. (12) −δ(m2, m3)cov(xm1, xm2) −δ(m1, m3)cov(xm1, xm2) −δ(m1, m2)cov(xm1, xm3), where δ is the Kronecker delta. By analogy with (11) (Appendix C.3), the diagonal structure of tensor T: T = X k cum(αk, αk, αk)dk ⊗dk ⊗dk. (13) In Appendix E.1, we recall (in our notation) the matrix S (39) and the tensor T (40) for the LDA model [3], which are analogues of the matrix S (10) and the tensor T (12) for the GP/DICA models. Slightly abusing terminology, we refer to the matrix S (39) and the tensor T (40) as the LDA moments and to the matrix S (10) and the tensor T (12) as the GP/DICA cumulants. The diagonal structure (41) & (42) of the LDA moments is similar to the diagonal structure (11) & (13) of the GP/DICA cumulants, though arising through a slightly different argument, as discussed at the end of 3 Appendix E.1. Importantly, due to this similarity, the algorithmic frameworks for both the GP/DICA cumulants and the LDA moments coincide. The following sample complexity results apply to the sample estimates of the GP cumulants:1 Proposition 3.1. Under the GP model, the expected error for the sample estimator bS (29) for the GP cumulant S (10) is: E h ∥bS −S∥F i ≤ r E h ∥bS −S∥2 F i ≤O 1 √ N max ∆¯L2, ¯c0 ¯L , (14) where ∆:= max k ∥dk∥2 2, ¯c0 := min(1, c0) and ¯L := E(L). A high probability bound could be derived using concentration inequalities for Poisson random variables [14]; but the expectation already gives the right order of magnitude for the error (for example via Markov’s inequality). The expression (29) for an unbiased finite sample estimate bS of S and the expression (30) for an unbiased finite sample estimate bT of T are defined2 in Appendix C.4. A sketch of a proof for Proposition 3.1 can be found in Appendix D. By following a similar analysis as in [15], we can rephrase the topic recovery error in term of the error on the GP cumulant. Importantly, the whitening transformation (introduced in Section 4) redivides the error on S (14) by ¯L2, which is the scale of S (see Appendix D.5 for details). This means that the contribution from ˆS to the recovery error will scale as O(1/ √ N max{∆, ¯c0/¯L}), where both ∆and ¯c0/¯L are smaller than 1 and can be very small. We do not present the exact expression for the expected squared error for the estimator of T, but due to a similar structure in the derivation, we expect the analogous bound of E[∥bT −T∥F ] ≤1/ √ N max{∆3/2 ¯L3, ¯c3/2 0 ¯L3/2}. Current sample complexity results of the LDA moments [3] can be summarized as O(1/ √ N). However, the proof (which can be found in the supplementary material [15]) analyzes only the case when finite sample estimates of the LDA moments are constructed from one triple per document, i.e., w1 ⊗w2 ⊗w3 only, and not from the U-statistics that average multiple (dependent) triples per document as in the practical expressions (43) and (44). Moreover, one has to be careful when comparing upper bounds. Nevertheless, comparing the bound (14) with the current theoretical results for the LDA moments, we see that the GP/DICA cumulants sample complexity contains the ℓ2norm of the columns of the topic matrix D in the numerator, as opposed to the O(1) coefficient for the LDA moments. This norm can be significantly smaller than 1 for vectors in the simplex (e.g., ∆= O(1/∥dk∥0) for sparse topics). This suggests that the GP/DICA cumulants may have better finite sample convergence properties than the LDA moments and our experimental results in Section 5.2 are indeed consistent with this statement. The GP/DICA cumulants have a somewhat more intuitive derivation than the LDA moments as they are expressed via the count vectors x (which are the sufficient statistics for the model) and not the tokens wℓ’s. Note also that the construction of the LDA moments depend on the unknown parameter c0. Given that we are in an unsupervised setting and that moreover the evaluation of LDA is a difficult task [16], setting this parameter is non-trivial. In Appendix G.4, we observe experimentally that the LDA moments are somewhat sensitive to the choice of c0. 4 Diagonalization algorithms How is the diagonal structure (11) of S and (13) of T going to be helpful for the estimation of the model parameters? This question has already been thoroughly investigated in the signal processing (see, e.g., [17, 18, 19, 20, 21, 5] and references therein) and machine learning (see [3, 4] and references therein) literature. We review the approach in this section. Due to similar diagonal structure, the algorithms of this section apply to both the LDA moments and the GP/DICA cumulants. For simplicity, let us rewrite expressions (11) and (13) for S and T as follows S = X k skdkd⊤ k , T = X k tkdk ⊗dk ⊗dk, (15) 1Note that the expected squared error for the DICA cumulants is similar, but the expressions are less compact and, in general, depend on the prior on αk. 2For completeness, we also present the finite sample estimates bS (43) and bT (44) of S (39) and T (40) for the LDA moments (which are consistent with the ones suggested in [4]) in Appendix F.4. 4 where sk := var(αk) and tk := cum(αk, αk, αk). Introducing the rescaled topics edk := √skdk, we can also rewrite S = eD eD⊤. Following the same assumption from [3] that the topic vectors are linearly independent ( eD is full rank), we can compute a whitening matrix W ∈RK×M of S, i.e., a matrix such that WSW ⊤= IK where IK is the K-by-K identity matrix (see Appendix F.1 for more details). As a result, the vectors zk := W edk form an orthonormal set of vectors. Further, let us define a projection T (v) ∈RK×K of a tensor T ∈RK×K×K onto a vector u ∈RK: T (u)k1k2 := X k3 Tk1k2k3uk3. (16) Applying the multilinear transformation (see, e.g., [4] for the definition) with W ⊤to the tensor T from (15) and projecting the resulting tensor T := T(W ⊤, W ⊤, W ⊤) onto some vector u ∈RK, we obtain T (u) = X k etk⟨zk, u⟩zkz⊤ k , (17) where etk := tk/s3/2 k is due to the rescaling of topics and ⟨·, ·⟩stands for the inner product. As the vectors zk are orthonormal, the pairs zk and λk := etk⟨zk, u⟩are eigenpairs of the matrix T (u), which are uniquely defined if the eigenvalues λk are all different. If they are unique, we can recover the GP/DICA (as well as LDA) model parameters via edk = W †zk and etk = λk/⟨zk, u⟩. This procedure was referred to as the spectral algorithm for LDA [3] and the fourth-order3 blind identification algorithm for ICA [17, 18]. Indeed, one can expect that the finite sample estimates bS (29) and bT (30) possess approximately the diagonal structure (11) and (13) and, therefore, the reasoning from above can be applied, assuming that the effect of the sampling error is controlled. This spectral algorithm, however, is known to be quite unstable in practice (see, e.g., [22]). To overcome this problem, other algorithms were proposed. For ICA, the most notable ones are probably the FastICA algorithm [20] and the JADE algorithm [21]. The FastICA algorithm, with appropriate choice of a contrast function, estimates iteratively the topics, making use of the orthonormal structure (17), and performs the deflation procedure at every step. The recently introduced tensor power method (TPM) for the LDA model [4] is close to the FastICA algorithm. Alternatively, the JADE algorithm modifies the spectral algorithm by performing multiple projections for (17) and then jointly diagonalizing the resulting matrices with an orthogonal matrix. The spectral algorithm is a special case of this orthogonal joint diagonalization algorithm when only one projection is chosen. Importantly, a fast implementation [23] of the orthogonal joint diagonalization algorithm from [24] was proposed, which is based on closed-form iterative Jacobi updates (see, e.g., [25] for the later). In practice, the orthogonal joint diagonalization (JD) algorithm is more robust than FastICA (see, e.g., [26, p. 30]) or the spectral algorithm. Moreover, although the application of the JD algorithm for the learning of topic models was mentioned in the literature [4, 27], it was never implemented in practice. In this paper, we apply the JD algorithm for the diagonalization of the GP/DICA cumulants as well as the LDA moments, which is described in Algorithm 1. Note that the choice of a projection vector vp ∈RM obtained as vp = c W ⊤up for some vector up ∈RK is important and corresponds to the multilinear transformation of bT with c W ⊤along the third mode. Importantly, in Algorithm 1, the joint diagonalization routine is performed over (P +1) matrices of size K×K, where the number of topics K is usually not too big. This makes the algorithm computationally fast (see Appendix G.1). The same is true for the spectral algorithm, but not for TPM. In Section 5.1, we compare experimentally the performance of the spectral, JD, and TPM algorithms for the estimation of the parameters of the GP/DICA as well as LDA models. We are not aware of any experimental comparison of these algorithms in the LDA context. While already working on this manuscript, the JD algorithm was also independently analyzed by [27] in the context of tensor factorization for general latent variable models. However, [27] focused mostly on the comparison of approaches for tensor factorization and their stability properties, with brief experiments using a latent variable model related but not equivalent to LDA for community detection. In contrast, we provide a detailed experimental comparison in the context of LDA in this paper, as well as propose a novel cumulant-based estimator. Due to the space restriction the estimation of the topic matrix D and the (gamma/Dirichlet) parameter c are moved to Appendix F.6. 3See Appendix C.5 for a discussion on the orders. 5 Algorithm 1 Joint diagonalization (JD) algorithm for GP/DICA cumulants (or LDA moments) 1: Input: X ∈RM×N, K, P (number of random projections); (and c0 for LDA moments) 2: Compute sample estimate bS ∈RM×M ((29) for GP/DICA / (43) for LDA in Appendix F) 3: Estimate whitening matrix c W ∈RK×M of bS (see Appendix F.1) option (a): Choose vectors {u1, u2, . . . , uP } ⊆RK uniformly at random from the unit ℓ2sphere and set vp = c W ⊤up ∈RM for all p = 1, . . . , P (P = 1 yields the spectral algorithm) option (b): Choose vectors {u1, u2, . . . , uP } ⊆RK as the canonical basis e1, e2, . . . , eK of RK and set vp = c W ⊤up ∈RM for all p = 1, . . . , K 4: For ∀p, compute Bp = c W bT(vp)c W ⊤∈RK×K ((52) for GP/DICA / (54) for LDA; Appendix F) 5: Perform orthogonal joint diagonalization of matrices {c W bSc W ⊤= IK, Bp, p = 1, . . . , P} (see [24] and [23]) to find an orthogonal matrix V ∈RK×K and vectors {a1, a2, . . . , aP } ⊂RK such that V c W bSc W ⊤V ⊤= IK, and V BpV ⊤≈diag(ap), p = 1, . . . , P 6: Estimate joint diagonalization matrix A = V c W and values ap, p = 1, . . . , P 7: Output: Estimate of D and c as described in Appendix F.6 5 Experiments In this section, (a) we compare experimentally the GP/DICA cumulants with the LDA moments and (b) the spectral algorithm [3], the tensor power method [4] (TPM), the joint diagonalization (JD) algorithm from Algorithm 1, and variational inference for LDA [1]. Real data: the associated press (AP) dataset, from D. Blei’s web page,4 with N = 2, 243 documents and M = 10, 473 vocabulary words and the average document length bL = 194; the NIPS papers dataset5 [28] of 2, 483 NIPS papers and 14, 036 words, and bL = 1, 321; the KOS dataset,6 from the UCI Repository, with 3, 430 documents and 6, 906 words, and bL = 136. Semi-synthetic data are constructed by analogy with [29]: (1) the LDA parameters D and c are learned from the real datasets with variational inference and (2) toy data are sampled from a model of interest with the given parameters D and c. This provides the ground truth parameters D and c. For each setting, data are sampled 5 times and the results are averaged. We plot error bars that are the minimum and maximum values. For the AP data, K ∈{10, 50} topics are learned and, for the NIPS data, K ∈{10, 90} topics are learned. For larger K, the obtained topic matrix is illconditioned, which violates the identifiability condition for topic recovery using moment matching techniques [3]. All the documents with less than 3 tokens are resampled. Sampling techniques. All the sampling models have the parameter c which is set to c = c0¯c/ ∥¯c∥1, where ¯c is the learned c from the real dataset with variational LDA, and c0 is a parameter that we can vary. The GP data are sampled from the gamma-Poisson model (3) with b = c0/bL so that the expected document length is bL (see Appendix B.2). The LDA-fix(L) data are sampled from the LDA model (2) with the document length being fixed to a given L. The LDA-fix2(γ,L1,L2) data are sampled as follows: (1 −γ)-portion of the documents are sampled from the LDA-fix(L1) model with a given document length L1 and γ-portion of the documents are sampled from the LDA-fix(L2) model with a given document length L2. Evaluation. Evaluation of topic recovery for semi-synthetic data is performed with the ℓ1error between the recovered bD and true D topic matrices with the best permutation of columns: errℓ1( bD, D) := minπ∈PERM 1 2K P k ∥bdπk −dk∥1 ∈[0, 1]. The minimization is over the possible permutations π ∈PERM of the columns of bD and can be efficiently obtained with the Hungarian algorithm for bipartite matching. For the evaluation of topic recovery in the real data case, we use an approximation of the log-likelihood for held out documents as the metric [16]. See Appendix G.6 for more details. 4http://www.cs.columbia.edu/˜blei/lda-c 5http://ai.stanford.edu/˜gal/data 6https://archive.ics.uci.edu/ml/datasets/Bag+of+Words 6 Number of docs in 1000s 1 10 20 30 40 50 ℓ1-error 0 0.2 0.4 0.6 0.8 1 JD JD(k) JD(f) Spec TPM Number of docs in 1000s 1 10 20 30 40 50 ℓ1-error 0 0.2 0.4 0.6 0.8 1 Figure 1: Comparison of the diagonalization algorithms. The topic matrix D and Dirichlet parameter c are learned for K = 50 from AP; c is scaled to sum up to 0.5 and b is set to fit the expected document length bL = 200. The semi-synthetic dataset is sampled from GP; number of documents N varies from 1, 000 to 50, 000. Left: GP/DICA moments. Right: LDA moments. Note: a smaller value of the ℓ1-error is better. We use our Matlab implementation of the GP/DICA cumulants, the LDA moments, and the diagonalization algorithms. The datasets and the code for reproducing our experiments are available online.7 In Appendix G.1, we discuss implementation and complexity of the algorithms. We explain how we initialize the parameter c0 for the LDA moments in Appendix G.3. 5.1 Comparison of the diagonalization algorithms In Figure 1, we compare the diagonalization algorithms on the semi-synthetic AP dataset for K = 50 using the GP sampling. We compare the tensor power method (TPM) [4], the spectral algorithm (Spec), the orthogonal joint diagonalization algorithm (JD) described in Algorithm 1 with different options to choose the random projections: JD(k) takes P = K vectors up sampled uniformly from the unit ℓ2-sphere in RK and selects vp = W ⊤up (option (a) in Algorithm 1); JD selects the full basis e1, . . . , eK in RK and sets vp = W ⊤ep (as JADE [21]) (option (b) in Algorithm 1); JD(f) chooses the full canonical basis of RM as the projection vectors (computationally expensive). Both the GP/DICA cumulants and LDA moments are well-specified in this setup. However, the LDA moments have a slower finite sample convergence and, hence, a larger estimation error for the same value N. As expected, the spectral algorithm is always slightly inferior to the joint diagonalization algorithms. With the GP/DICA cumulants, where the estimation error is low, all algorithms demonstrate good performance, which also fulfills our expectations. However, although TPM shows almost perfect performance in the case of the GP/DICA cumulants (left), it significantly deteriorates for the LDA moments (right), which can be explained by the larger estimation error of the LDA moments and lack of robustness of TPM. The running times are discussed in Appendix G.2. Overall, the orthogonal joint diagonalization algorithm with initialization of random projections as W ⊤ multiplied with the canonical basis in RK (JD) is both computationally efficient and fast. 5.2 Comparison of the GP/DICA cumulants and the LDA moments In Figure 2, when sampling from the GP model (top, left), both the GP/DICA cumulants and LDA moments are well specified, which implies that the approximation error (i.e., the error for the infinite number of documents) is low for both. The GP/DICA cumulants achieve low values of the estimation error already for N = 10, 000 documents independently of the number of topics, while the convergence is slower for the LDA moments. When sampling from the LDA-fix(200) model (top, right), the GP/DICA cumulants are mis-specified and their approximation error is high, although the estimation error is low due to the faster finite sample convergence. One reason of poor performance of the GP/DICA cumulants, in this case, is the absence of variance in document length. Indeed, if documents with two different lengths are mixed by sampling from the LDA-fix2(0.5,20,200) model (bottom, left), the GP/DICA cumulants performance improves. Moreover, the experiment with a changing fraction γ of documents (bottom, right) shows that a non-zero variance on the length improves the performance of the GP/DICA cumulants. As in practice real corpora usually have a non-zero variance for the document length, this bad scenario for the GP/DICA cumulants is not likely to happen. 7 https://github.com/anastasia-podosinnikova/dica 7 Number of docs in 1000s 1 10 20 30 40 50 ℓ1-error 0 0.2 0.4 0.6 0.8 1 Number of docs in 1000s 1 10 20 30 40 50 ℓ1-error 0 0.2 0.4 0.6 0.8 1 JD-GP(10) JD-LDA(10) JD-GP(90) JD-LDA(90) Number of docs in 1000s 1 10 20 30 40 50 ℓ1-error 0 0.2 0.4 0.6 0.8 1 Fraction of doc lengths γ 0 0.2 0.4 0.6 0.8 1 ℓ1-error 0 0.2 0.4 0.6 0.8 1 Figure 2: Comparison of the GP/DICA cumulants and LDA moments. Two topic matrices and parameters c1 and c2 are learned from the NIPS dataset for K = 10 and 90; c1 and c2 are scaled to sum up to c0 = 1. Four corpora of different sizes N from 1, 000 to 50, 000: top, left: b is set to fit the expected document length bL = 1300; sampling from the GP model; top, right: sampling from the LDA-fix(200) model; bottom, left: sampling from the LDA-fix2(0.5,20,200) model. Bottom, right: the number of documents here is fixed to N = 20, 000; sampling from the LDA-fix2(γ,20,200) model varying the values of the fraction γ from 0 to 1 with the step 0.1. Note: a smaller value of the ℓ1-error is better. Topics K 10 50 100 150 Log-likelihood (in bits) -13.5 -13 -12.5 -12 -11.5 JD-GP JD-LDA Spec-GP Spec-LDA VI VI-JD Topics K 10 50 100 150 Log-likelihood (in bits) -12.5 -12 -11.5 -11 -10.5 Figure 3: Experiments with real data. Left: the AP dataset. Right: the KOS dataset. Note: a higher value of the log-likelihood is better. 5.3 Real data experiments In Figure 3, JD-GP, Spec-GP, JD-LDA, and Spec-LDA are compared with variational inference (VI) and with variational inference initialized with the output of JD-GP (VI-JD). We measure held out log-likelihood per token (see Appendix G.7 for details on the experimental setup). The orthogonal joint diagonalization algorithm with the GP/DICA cumulants (JD-GP) demonstrates promising performance. In particular, the GP/DICA cumulants significantly outperform the LDA moments. Moreover, although variational inference performs better than the JD-GP algorithm, restarting variational inference with the output of the JD-GP algorithm systematically leads to better results. Similar behavior has already been observed (see, e.g., [30]). 6 Conclusion In this paper, we have proposed a new set of tensors for a discrete ICA model related to LDA, where word counts are directly modeled. These moments make fewer assumptions regarding distributions, and are theoretically and empirically more robust than previously proposed tensors for LDA, both on synthetic and real data. Following the ICA literature, we showed that our joint diagonalization procedure is also more robust. Once the topic matrix has been estimated in a semi-parametric way where topic intensities are left unspecified, it would be interesting to learn the unknown distributions of the independent topic intensities. Acknowledgments. This work was partially supported by the MSR-Inria Joint Center. The authors would like to thank Christophe Dupuy for helpful discussions. 8 References [1] D.M. Blei, A.Y. Ng, and M.I. Jordan. Latent Dirichlet allocation. J. Mach. Learn. Res., 3:903–1022, 2003. [2] T. Griffiths. Gibbs sampling in the generative model of latent Dirichlet allocation. Technical report, Stanford University, 2002. [3] A. Anandkumar, D.P. Foster, D. Hsu, S.M. Kakade, and Y.-K. Liu. A spectral algorithm for latent Dirichlet allocation. In NIPS, 2012. [4] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. J. Mach. Learn. Res., 15:2773–2832, 2014. [5] P. Comon and C. Jutten. Handbook of Blind Source Separation: Independent Component Analysis and Applications. Academic Press, 2010. [6] C. Jutten. Calcul neuromim´etique et traitement du signal: analyse en composantes ind´ependantes. PhD thesis, INP-USM Grenoble, 1987. [7] C. Jutten and J. H´erault. Blind separation of sources, part I: an adaptive algorithm based on neuromimetric architecture. Signal Process., 24:1–10, 1991. [8] P. Comon. Independent component analysis, a new concept? Signal Process., 36:287–314, 1994. [9] W.L. Buntine. Variational extensions to EM and multinomial PCA. In ECML, 2002. [10] M.E. Tipping and C.M. Bishop. Probabilistic principal component analysis. J. R. Stat. Soc., 61:611–622, 1999. [11] S. Roweis. EM algorithms for PCA and SPCA. In NIPS, 1998. [12] J. Canny. GaP: a factor model for discrete data. In SIGIR, 2004. [13] W.L. Buntine and A. Jakulin. Applying discrete PCA in data analysis. In UAI, 2004. [14] S. Boucheron, G. Lugosi, and P. Massart. Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press, 2013. [15] A. Anandkumar, D.P. Foster, D. Hsu, S.M. Kakade, and Y.-K. Liu. A spectral algorithm for latent Dirichlet allocation. CoRR, abs:1204.6703, 2013. [16] H.M. Wallach, I. Murray, R. Salakhutdinov, and D. Mimno. Evaluation methods for topic models. In ICML, 2009. [17] J.-F. Cardoso. Source separation using higher order moments. In ICASSP, 1989. [18] J.-F. Cardoso. Eigen-structure of the fourth-order cumulant tensor with application to the blind source separation problem. In ICASSP, 1990. [19] J.-F. Cardoso and P. Comon. Independent component analysis, a survey of some algebraic methods. In ISCAS, 1996. [20] A. Hyv¨arinen. Fast and robust fixed-point algorithms for independent component analysis. IEEE Trans. Neural Netw., 10(3):626–634, 1999. [21] J.-F. Cardoso and A. Souloumiac. Blind beamforming for non Gaussian signals. In IEE Proceedings-F, 1993. [22] J.-F. Cardoso. High-order contrasts for independent component analysis. Neural Comput., 11:157–192, 1999. [23] J.-F. Cardoso and A. Souloumiac. Jacobi angles for simultaneous diagonalization. SIAM J. Mat. Anal. Appl., 17(1):161–164, 1996. [24] A. Bunse-Gerstner, R. Byers, and V. Mehrmann. Numerical methods for simultaneous diagonalization. SIAM J. Matrix Anal. Appl., 14(4):927–949, 1993. [25] J. Nocedal and S.J. Wright. Numerical Optimization. Springer, 2nd edition, 2006. [26] F.R. Bach and M.I. Jordan. Kernel independent component analysis. J. Mach. Learn. Res., 3:1–48, 2002. [27] V. Kuleshov, A.T. Chaganty, and P. Liang. Tensor factorization via matrix factorization. In AISTATS, 2015. [28] A. Globerson, G. Chechik, F. Pereira, and N. Tishby. Euclidean embedding of co-occurrence data. J. Mach. Learn. Res., 8:2265–2295, 2007. [29] S. Arora, R. Ge, Y. Halpern, D. Mimno, A. Moitra, D. Sontag, Y. Wu, and M. Zhu. A practical algorithm for topic modeling with provable guarantees. In ICML, 2013. [30] S. Cohen and M. Collins. A provably correct learning algorithm for latent-variable PCFGs. In ACL, 2014. 9 | 2015 | 246 |
5,754 | Max-Margin Deep Generative Models Chongxuan Li†, Jun Zhu†, Tianlin Shi‡, Bo Zhang† †Dept. of Comp. Sci. & Tech., State Key Lab of Intell. Tech. & Sys., TNList Lab, Center for Bio-Inspired Computing Research, Tsinghua University, Beijing, 100084, China ‡Dept. of Comp. Sci., Stanford University, Stanford, CA 94305, USA {licx14@mails., dcszj@, dcszb@}tsinghua.edu.cn; stl501@gmail.com Abstract Deep generative models (DGMs) are effective on learning multilayered representations of complex data and performing inference of input data by exploring the generative ability. However, little work has been done on examining or empowering the discriminative ability of DGMs on making accurate predictions. This paper presents max-margin deep generative models (mmDGMs), which explore the strongly discriminative principle of max-margin learning to improve the discriminative power of DGMs, while retaining the generative capability. We develop an efficient doubly stochastic subgradient algorithm for the piecewise linear objective. Empirical results on MNIST and SVHN datasets demonstrate that (1) maxmargin learning can significantly improve the prediction performance of DGMs and meanwhile retain the generative ability; and (2) mmDGMs are competitive to the state-of-the-art fully discriminative networks by employing deep convolutional neural networks (CNNs) as both recognition and generative models. 1 Introduction Max-margin learning has been effective on learning discriminative models, with many examples such as univariate-output support vector machines (SVMs) [5] and multivariate-output max-margin Markov networks (or structured SVMs) [30, 1, 31]. However, the ever-increasing size of complex data makes it hard to construct such a fully discriminative model, which has only single layer of adjustable weights, due to the facts that: (1) the manually constructed features may not well capture the underlying high-order statistics; and (2) a fully discriminative approach cannot reconstruct the input data when noise or missing values are present. To address the first challenge, previous work has considered incorporating latent variables into a max-margin model, including partially observed maximum entropy discrimination Markov networks [37], structured latent SVMs [32] and max-margin min-entropy models [20]. All this work has primarily focused on a shallow structure of latent variables. To improve the flexibility, learning SVMs with a deep latent structure has been presented in [29]. However, these methods do not address the second challenge, which requires a generative model to describe the inputs. The recent work on learning max-margin generative models includes max-margin Harmoniums [4], maxmargin topic models [34, 35], and nonparametric Bayesian latent SVMs [36] which can infer the dimension of latent features from data. However, these methods only consider the shallow structure of latent variables, which may not be flexible enough to describe complex data. Much work has been done on learning generative models with a deep structure of nonlinear hidden variables, including deep belief networks [25, 16, 23], autoregressive models [13, 9], and stochastic variations of neural networks [3]. For such models, inference is a challenging problem, but fortunately there exists much recent progress on stochastic variational inference algorithms [12, 24]. However, the primary focus of deep generative models (DGMs) has been on unsupervised learning, 1 with the goals of learning latent representations and generating input samples. Though the latent representations can be used with a downstream classifier to make predictions, it is often beneficial to learn a joint model that considers both input and response variables. One recent attempt is the conditional generative models [11], which treat labels as conditions of a DGM to describe input data. This conditional DGM is learned in a semi-supervised setting, which is not exclusive to ours. In this paper, we revisit the max-margin principle and present a max-margin deep generative model (mmDGM), which learns multi-layer representations that are good for both classification and input inference. Our mmDGM conjoins the flexibility of DGMs on describing input data and the strong discriminative ability of max-margin learning on making accurate predictions. We formulate mmDGM as solving a variational inference problem of a DGM regularized by a set of max-margin posterior constraints, which bias the model to learn representations that are good for prediction. We define the max-margin posterior constraints as a linear functional of the target variational distribution of the latent presentations. Then, we develop a doubly stochastic subgradient descent algorithm, which generalizes the Pagesos algorithm [28] to consider nontrivial latent variables. For the variational distribution, we build a recognition model to capture the nonlinearity, similar as in [12, 24]. We consider two types of networks used as our recognition and generative models: multiple layer perceptrons (MLPs) as in [12, 24] and convolutional neural networks (CNNs) [14]. Though CNNs have shown promising results in various domains, especially for image classification, little work has been done to take advantage of CNN to generate images. The recent work [6] presents a type of CNN to map manual features including class labels to RBG chair images by applying unpooling, convolution and rectification sequentially; but it is a deterministic mapping and there is no random generation. Generative Adversarial Nets [7] employs a single such layer together with MLPs in a minimax two-player game framework with primary goal of generating images. We propose to stack this structure to form a highly non-trivial deep generative network to generate images from latent variables learned automatically by a recognition model using standard CNN. We present the detailed network structures in experiments part. Empirical results on MNIST [14] and SVHN [22] datasets demonstrate that mmDGM can significantly improve the prediction performance, which is competitive to the state-of-the-art methods [33, 17, 8, 15], while retaining the capability of generating input samples and completing their missing values. 2 Basics of Deep Generative Models We start from a general setting, where we have N i.i.d. data X = {xn}N n=1. A deep generative model (DGM) assumes that each xn ∈RD is generated from a vector of latent variables zn ∈RK, which itself follows some distribution. The joint probability of a DGM is as follows: p(X, Z|α, β) = N Y n=1 p(zn|α)p(xn|zn, β), (1) where p(zn|α) is the prior of the latent variables and p(xn|zn, β) is the likelihood model for generating observations. For notation simplicity, we define θ = (α, β). Depending on the structure of z, various DGMs have been developed, such as the deep belief networks [25, 16], deep sigmoid networks [21], deep latent Gaussian models [24], and deep autoregressive models [9]. In this paper, we focus on the directed DGMs, which can be easily sampled from via an ancestral sampler. However, in most cases learning DGMs is challenging due to the intractability of posterior inference. The state-of-the-art methods resort to stochastic variational methods under the maximum likelihood estimation (MLE) framework, ˆθ = argmaxθ log p(X|θ). Specifically, let q(Z) be the variational distribution that approximates the true posterior p(Z|X, θ). A variational upper bound of the per sample negative log-likelihood (NLL) −log p(xn|α, β) is: L(θ, q(zn); xn) ≜KL(q(zn)||p(zn|α)) −Eq(zn)[log p(xn|zn, β)], (2) where KL(q||p) is the Kullback-Leibler (KL) divergence between distributions q and p. Then, L(θ, q(Z); X)≜P nL(θ, q(zn); xn) upper bounds the full negative log-likelihood −log p(X|θ). It is important to notice that if we do not make restricting assumption on the variational distribution q, the lower bound is tight by simply setting q(Z) = p(Z|X, θ). That is, the MLE is equivalent to solving the variational problem: minθ,q(Z) L(θ, q(Z); X). However, since the true posterior is intractable except a handful of special cases, we must resort to approximation methods. One common 2 assumption is that the variational distribution is of some parametric form, qφ(Z), and then we optimize the variational bound w.r.t the variational parameters φ. For DGMs, another challenge arises that the variational bound is often intractable to compute analytically. To address this challenge, the early work further bounds the intractable parts with tractable ones by introducing more variational parameters [26]. However, this technique increases the gap between the bound being optimized and the log-likelihood, potentially resulting in poorer estimates. Much recent progress [12, 24, 21] has been made on hybrid Monte Carlo and variational methods, which approximates the intractable expectations and their gradients over the parameters (θ, φ) via some unbiased Monte Carlo estimates. Furthermore, to handle large-scale datasets, stochastic optimization of the variational objective can be used with a suitable learning rate annealing scheme. It is important to notice that variance reduction is a key part of these methods in order to have fast and stable convergence. Most work on directed DGMs has been focusing on the generative capability on inferring the observations, such as filling in missing values [12, 24, 21], while little work has been done on investigating the predictive power, except the semi-supervised DGMs [11] which builds a DGM conditioned on the class labels and learns the parameters via MLE. Below, we present max-margin deep generative models, which explore the discriminative max-margin principle to improve the predictive ability of the latent representations, while retaining the generative capability. 3 Max-margin Deep Generative Models We consider supervised learning, where the training data is a pair (x, y) with input features x ∈RD and the ground truth label y. Without loss of generality, we consider the multi-class classification, where y ∈C = {1, . . . , M}. A max-margin deep generative model (mmDGM) consists of two components: (1) a deep generative model to describe input features; and (2) a max-margin classifier to consider supervision. For the generative model, we can in theory adopt any DGM that defines a joint distribution over (X, Z) as in Eq. (1). For the max-margin classifier, instead of fitting the input features into a conventional SVM, we define the linear classifier on the latent representations, whose learning will be regularized by the supervision signal as we shall see. Specifically, if the latent representation z is given, we define the latent discriminant function F(y, z, η; x) = η⊤f(y, z), where f(y, z) is an MK-dimensional vector that concatenates M subvectors, with the yth being z and all others being zero, and η is the corresponding weight vector. We consider the case that η is a random vector, following some prior distribution p0(η). Then our goal is to infer the posterior distribution p(η, Z|X, Y), which is typically approximated by a variational distribution q(η, Z) for computational tractability. Notice that this posterior is different from the one in the vanilla DGM. We expect that the supervision information will bias the learned representations to be more powerful on predicting the labels at testing. To account for the uncertainty of (η, Z), we take the expectation and define the discriminant function F(y; x) = Eq η⊤f(y, z) , and the final prediction rule that maps inputs to outputs is: ˆy = argmax y∈C F(y; x). (3) Note that different from the conditional DGM [11], which puts the class labels upstream, the above classifier is a downstream model, in the sense that the supervision signal is determined by conditioning on the latent representations. 3.1 The Learning Problem We want to jointly learn the parameters θ and infer the posterior distribution q(η, Z). Based on the equivalent variational formulation of MLE, we define the joint learning problem as solving: min θ,q(η,Z),ξ L(θ, q(η, Z); X) + C N X n=1 ξn (4) ∀n, y ∈C, s.t. : Eq[η⊤∆fn(y)] ≥∆ln(y) −ξn ξn ≥0, where ∆fn(y) = f(yn, zn) −f(y, zn) is the difference of the feature vectors; ∆ln(y) is the loss function that measures the cost to predict y if the true label is yn; and C is a nonnegative regularization parameter balancing the two components. In the objective, the variational bound is defined 3 as L(θ, q(η, Z); X) = KL(q(η, Z)||p0(η, Z|α)) −Eq [log p(X|Z, β)], and the margin constraints are from the classifier (3). If we ignore the constraints (e.g., setting C at 0), the solution of q(η, Z) will be exactly the Bayesian posterior, and the problem is equivalent to do MLE for θ. By absorbing the slack variables, we can rewrite the problem in an unconstrained form: min θ,q(η,Z) L(θ, q(η, Z); X) + CR(q(η, Z; X)), (5) where the hinge loss is: R(q(η, Z); X) = PN n=1 maxy∈C(∆ln(y) −Eq[η⊤∆fn(y)]). Due to the convexity of max function, it is easy to verify that the hinge loss is an upper bound of the training error of classifier (3), that is, R(q(η, Z); X) ≥P n ∆ln(ˆyn). Furthermore, the hinge loss is a convex functional over the variational distribution because of the linearity of the expectation operator. These properties render the hinge loss as a good surrogate to optimize over. Previous work has explored this idea to learn discriminative topic models [34], but with a restriction on the shallow structure of hidden variables. Our work presents a significant extension to learn deep generative models, which pose new challenges on the learning and inference. 3.2 The Doubly Stochastic Subgradient Algorithm The variational formulation of problem (5) naturally suggests that we can develop a variational algorithm to address the intractability of the true posterior. We now present a new algorithm to solve problem (5). Our method is a doubly stochastic generalization of the Pegasos (i.e., Primal Estimated sub-GrAdient SOlver for SVM) algorithm [28] for the classic SVMs with fully observed input features, with the new extension of dealing with a highly nontrivial structure of latent variables. First, we make the structured mean-field (SMF) assumption that q(η, Z) = q(η)qφ(Z). Under the assumption, we have the discriminant function as Eq[η⊤∆fn(y)] = Eq(η)[η⊤]Eqφ(z(n))[∆fn(y)]. Moreover, we can solve for the optimal solution of q(η) in some analytical form. In fact, by the calculus of variations, we can show that given the other parts the solution is q(η) ∝ p0(η) exp η⊤P n,y ωy nEqφ[∆fn(y)] , where ω are the Lagrange multipliers (See [34] for details). If the prior is normal, p0(η) = N(0, σ2I), we have the normal posterior: q(η) = N(λ, σ2I), where λ = σ2 P n,y ωy nEqφ[∆fn(y)]. Therefore, even though we did not make a parametric form assumption of q(η), the above results show that the optimal posterior distribution of η is Gaussian. Since we only use the expectation in the optimization problem and in prediction, we can directly solve for the mean parameter λ instead of q(η). Further, in this case we can verify that KL(q(η)||p0(η)) = ||λ||2 2σ2 and then the equivalent objective function in terms of λ can be written as: min θ,φ,λ L(θ, φ; X) + ||λ||2 2σ2 + CR(λ, φ; X), (6) where R(λ, φ; X) = PN n=1 ℓ(λ, φ; xn) is the total hinge loss, and the per-sample hinge-loss is ℓ(λ, φ; xn) = maxy∈C(∆ln(y) −λ⊤Eqφ[∆fn(y)]). Below, we present a doubly stochastic subgradient descent algorithm to solve this problem. The first stochasticity arises from a stochastic estimate of the objective by random mini-batches. Specifically, the batch learning needs to scan the full dataset to compute subgradients, which is often too expensive to deal with large-scale datasets. One effective technique is to do stochastic subgradient descent [28], where at each iteration we randomly draw a mini-batch of the training data and then do the variational updates over the small mini-batch. Formally, given a mini batch of size m, we get an unbiased estimate of the objective: ˜Lm := N m m X n=1 L(θ, φ; xn) + ||λ||2 2σ2 + NC m m X n=1 ℓ(λ, φ; xn). The second stochasticity arises from a stochastic estimate of the per-sample variational bound and its subgradient, whose intractability calls for another Monte Carlo estimator. Formally, let zl n ∼qφ(z|xn, yn) be a set of samples from the variational distribution, where we explicitly put the conditions. Then, an estimate of the per-sample variational bound and the per-sample hinge-loss is ˜L(θ, φ; xn)= 1 L X l log p(xn, zl n|β)−log qφ(zl n); ˜ℓ(λ, φ; xn)=max y ∆ln(y)−1 L X l λ⊤∆fn(y, zl n) , 4 where ∆fn(y, zl n) = f(yn, zl n) −f(y, zl n). Note that ˜L is an unbiased estimate of L, while ˜ℓis a biased estimate of ℓ. Nevertheless, we can still show that ˜ℓis an upper bound estimate of ℓunder expectation. Furthermore, this biasedness does not affect our estimate of the gradient. In fact, by using the equality ∇φqφ(z) = qφ(z)∇φ log qφ(z), we can construct an unbiased Monte Carlo estimate of ∇φ(L(θ, φ; xn) + ℓ(λ, φ; xn)) as: gφ = 1 L L X l=1 log p(zl n, xn) −log qφ(zl n) + Cλ⊤∆fn(˜yn, zl n) ∇φ log qφ(zl n), (7) where the last term roots from the hinge loss with the loss-augmented prediction ˜yn = argmaxy(∆ln(y) + 1 L P l λ⊤f(y, zl n)). For θ and λ, the estimates of the gradient ∇θL(θ, φ; xn) and the subgradient ∇λℓ(λ, φ; xn) are easier, which are: gθ = 1 L X l ∇θ log p(xn, zl n|θ), gλ = 1 L X l f(˜yn, zl n) −f(yn, zl n) . Notice that the sampling and the gradient ∇φ log qφ(zl n) only depend on the variational distribution, not the underlying model. Algorithm 1 Doubly Stochastic Subgradient Algorithm Initialize θ, λ, and φ repeat draw a random mini-batch of m data points draw random samples from noise distribution p(ϵ) compute subgradient g = ∇θ,λ,φ ˜L(θ, λ, φ; Xm, ϵ) update parameters (θ, λ, φ) using subgradient g. until Converge return θ, λ, and φ The above estimates consider the general case where the variational bound is intractable. In some cases, we can compute the KL-divergence term analytically, e.g., when the prior and the variational distribution are both Gaussian. In such cases, we only need to estimate the rest intractable part by sampling, which often reduces the variance [12]. Similarly, we could use the expectation of the features directly, if it can be computed analytically, in the computation of subgradients (e.g., gθ and gλ) instead of sampling, which again can lead to variance reduction. With the above estimates of subgradients, we can use stochastic optimization methods such as SGD [28] and AdaM [10] to update the parameters, as outlined in Alg. 1. Overall, our algorithm is a doubly stochastic generalization of Pegasos to deal with the highly nontrivial latent variables. Now, the remaining question is how to define an appropriate variational distribution qφ(z) to obtain a robust estimate of the subgradients as well as the objective. Two types of methods have been developed for unsupervised DGMs, namely, variance reduction [21] and auto-encoding variational Bayes (AVB) [12]. Though both methods can be used for our models, we focus on the AVB approach. For continuous variables Z, under certain mild conditions we can reparameterize the variational distribution qφ(z) using some simple variables ϵ. Specifically, we can draw samples ϵ from some simple distribution p(ϵ) and do the transformation z = gφ(ϵ, x, y) to get the sample of the distribution q(z|x, y). We refer the readers to [12] for more details. In our experiments, we consider the special Gaussian case, where we assume that the variational distribution is a multivariate Gaussian with a diagonal covariance matrix: qφ(z|x, y) = N(µ(x, y; φ), σ2(x, y; φ)), (8) whose mean and variance are functions of the input data. This defines our recognition model. Then, the reparameterization trick is as follows: we first draw standard normal variables ϵl ∼N(0, I) and then do the transformation zl n = µ(xn, yn; φ) + σ(xn, yn; φ) ⊙ϵl to get a sample. For simplicity, we assume that both the mean and variance are function of x only. However, it is worth to emphasize that although the recognition model is unsupervised, the parameters φ are learned in a supervised manner because the subgradient (7) depends on the hinge loss. Further details of the experimental settings are presented in Sec. 4.1. 4 Experiments We now present experimental results on the widely adopted MNIST [14] and SVHN [22] datasets. Though mmDGMs are applicable to any DGMs that define a joint distribution of X and Z, we 5 concentrate on the Variational Auto-encoder (VA) [12], which is unsupervised. We denote our mmDGM with VA by MMVA. In our experiments, we consider two types of recognition models: multiple layer perceptrons (MLPs) and convolutional neural networks (CNNs). We implement all experiments based on Theano [2]. 1 4.1 Architectures and Settings In the MLP case, we follow the settings in [11] to compare both generative and discriminative capacity of VA and MMVA. In the CNN case, we use standard convolutional nets [14] with convolution and max-pooling operation as the recognition model to obtain more competitive classification results. For the generative model, we use unconvnets [6] with a “symmetric” structure as the recognition model, to reconstruct the input images approximately. More specifically, the top-down generative model has the same structure as the bottom-up recognition model but replacing max-pooling with unpooling operation [6] and applies unpooling, convolution and rectification in order. The total number of parameters in the convolutional network is comparable with previous work [8, 17, 15]. For simplicity, we do not involve mlpconv layers [17, 15] and contrast normalization layers in our recognition model, but they are not exclusive to our model. We illustrate details of the network architectures in appendix A. In both settings, the mean and variance of the latent z are transformed from the last layer of the recognition model through a linear operation. It should be noticed that we could use not only the expectation of z but also the activation of any layer in the recognition model as features. The only theoretical difference is from where we add a hinge loss regularization to the gradient and backpropagate it to previous layers. In all of the experiments, the mean of z has the same nonlinearity but typically much lower dimension than the activation of the last layer in the recognition model, and hence often leads to a worse performance. In the MLP case, we concatenate the activations of 2 layers as the features used in the supervised tasks. In the CNN case, we use the activations of the last layer as the features. We use AdaM [10] to optimize parameters in all of the models. Although it is an adaptive gradient-based optimization method, we decay the global learning rate by factor three periodically after sufficient number of epochs to ensure a stable convergence. We denote our mmDGM with MLPs by MMVA. To perform classification using VA, we first learn the feature representations by VA, and then build a linear SVM classifier on these features using the Pegasos stochastic subgradient algorithm [28]. This baseline will be denoted by VA+Pegasos. The corresponding models with CNNs are denoted by CMMVA and CVA+Pegasos respectively. 4.2 Results on the MNIST dataset We present both the prediction performance and the results on generating samples of MMVA and VA+Pegasos with both kinds of recognition models on the MNIST [14] dataset, which consists of images of 10 different classes (0 to 9) of size 28×28 with 50,000 training samples, 10,000 validating samples and 10,000 testing samples. 4.2.1 Predictive Performance Table 1: Error rates (%) on MNIST dataset. MODEL ERROR RATE VA+Pegasos 1.04 VA+Class-conditionVA 0.96 MMVA 0.90 CVA+Pegasos 1.35 CMMVA 0.45 Stochastic Pooling [33] 0.47 Network in Network [17] 0.47 Maxout Network [8] 0.45 DSN [15] 0.39 In the MLP case, we only use 50,000 training data, and the parameters for classification are optimized according to the validation set. We choose C = 15 for MMVA and initialize it with an unsupervised pre-training procedure in classification. First three rows in Table 1 compare VA+Pegasos, VA+Class-condtionVA and MMVA, where VA+Class-condtionVA refers to the best fully supervised model in [11]. Our model outperforms the baseline significantly. We further use the t-SNE algorithm [19] to embed the features learned by VA and MMVA on 2D plane, which again demonstrates the stronger discriminative ability of MMVA (See Appendix B for details). In the CNN case, we use 60,000 training data. Table 2 shows the effect of C on classification error rate and variational lower bound. Typically, as C gets lager, CMMVA learns more discriminative features and leads to a worse estimation of data likelihood. However, if C is too small, the supervision is not enough to lead to predictive features. Nevertheless, C = 103 is quite a good trade-off 1The source code is available at https://github.com/zhenxuan00/mmdgm. 6 (a) VA (b) MMVA (c) CVA (d) CMMVA Figure 1: (a-b): randomly generated images by VA and MMVA, 3000 epochs; (c-d): randomly generated images by CVA and CMMVA, 600 epochs. between the classification performance and generative performance and this is the default setting of CMMVA on MNIST throughout this paper. In this setting, the classification performance of our CMMVA model is comparable to the recent state-of-the-art fully discriminative networks (without data augmentation), shown in the last four rows of Table 1. 4.2.2 Generative Performance Table 2: Effects of C on MNIST dataset with a CNN recognition model. C ERROR RATE (%) LOWER BOUND 0 1.35 -93.17 1 1.86 -95.86 10 0.88 -95.90 102 0.54 -96.35 103 0.45 -99.62 104 0.43 -112.12 We further investigate the generative capability of MMVA on generating samples. Fig. 1 illustrates the images randomly sampled from VA and MMVA models where we output the expectation of the gray value at each pixel to get a smooth visualization. We do not pre-train our model in all settings when generating data to prove that MMVA (CMMVA) remains the generative capability of DGMs. 4.3 Results on the SVHN (Street View House Numbers) dataset SVHN [22] is a large dataset consisting of color images of size 32 × 32. The task is to recognize center digits in natural scene images, which is significantly harder than classification of hand-written digits. We follow the work [27, 8] to split the dataset into 598,388 training data, 6000 validating data and 26, 032 testing data and preprocess the data by Local Contrast Normalization (LCN). We only consider the CNN recognition model here. The network structure is similar to that in MNIST. We set C = 104 for our CMMVA model on SVHN by default. Table 3: Error rates (%) on SVHN dataset. MODEL ERROR RATE CVA+Pegasos 25.3 CMMVA 3.09 CNN [27] 4.9 Stochastic Pooling [33] 2.80 Maxout Network [8] 2.47 Network in Network [17] 2.35 DSN [15] 1.92 Table 3 shows the predictive performance. In this more challenging problem, we observe a larger improvement by CMMVA as compared to CVA+Pegasos, suggesting that DGMs benefit a lot from max-margin learning on image classification. We also compare CMMVA with state-of-the-art results. To the best of our knowledge, there is no competitive generative models to classify digits on SVHN dataset with full labels. We further compare the generative capability of CMMVA and CVA to examine the benefits from jointly training of DGMs and max-margin classifiers. Though CVA gives a tighter lower bound of data likelihood and reconstructs data more elaborately, it fails to learn the pattern of digits in a complex scenario and could not generate meaningful images. Visualization of random samples from CVA and CMMVA is shown in Fig. 2. In this scenario, the hinge loss regularization on recognition model is useful for generating main objects to be classified in images. 4.4 Missing Data Imputation and Classification Finally, we test all models on the task of missing data imputation. For MNIST, we consider two types of missing values [18]: (1) Rand-Drop: each pixel is missing randomly with a pre-fixed probability; and (2) Rect: a rectangle located at the center of the image is missing. Given the perturbed images, we uniformly initialize the missing values between 0 and 1, and then iteratively do the following steps: (1) using the recognition model to sample the hidden variables; (2) predicting the missing values to generate images; and (3) using the refined images as the input of the next round. For SVHN, we do the same procedure as in MNIST but initialize the missing values with Guassian 7 (a) Training data (b) CVA (c) CMMVA (C = 103) (d) CMMVA (C = 104) Figure 2: (a): training data after LCN preprocessing; (b): random samples from CVA; (c-d): random samples from CMMVA when C = 103 and C = 104 respectively. random variables as the input distribution changes. Visualization results on MNIST and SVHN are presented in Appendix C and Appendix D respectively. Table 4: MSE on MNIST data with missing values in the testing procedure. NOISE TYPE VA MMVA CVA CMMVA RAND-DROP (0.2) 0.0109 0.0110 0.0111 0.0147 RAND-DROP (0.4) 0.0127 0.0127 0.0127 0.0161 RAND-DROP (0.6) 0.0168 0.0165 0.0175 0.0203 RAND-DROP (0.8) 0.0379 0.0358 0.0453 0.0449 RECT (6 × 6) 0.0637 0.0645 0.0585 0.0597 RECT (8 × 8) 0.0850 0.0841 0.0754 0.0724 RECT (10 × 10) 0.1100 0.1079 0.0978 0.0884 RECT (12 × 12) 0.1450 0.1342 0.1299 0.1090 Intuitively, generative models with CNNs could be more powerful on learning patterns and high-level structures, while generative models with MLPs lean more to reconstruct the pixels in detail. This conforms to the MSE results shown in Table 4: CVA and CMMVA outperform VA and MMVA with a missing rectangle, while VA and MMVA outperform CVA and CMMVA with random missing values. Compared with the baseline, mmDGMs also make more accurate completion when large patches are missing. All of the models infer missing values for 100 iterations. We also compare the classification performance of CVA, CNN and CMMVA with Rect missing values in testing procedure in Appendix E. CMMVA outperforms both CVA and CNN. Overall, mmDGMs have comparable capability of inferring missing values and prefer to learn highlevel patterns instead of local details. 5 Conclusions We propose max-margin deep generative models (mmDGMs), which conjoin the predictive power of max-margin principle and the generative ability of deep generative models. We develop a doubly stochastic subgradient algorithm to learn all parameters jointly and consider two types of recognition models with MLPs and CNNs respectively. In both cases, we present extensive results to demonstrate that mmDGMs can significantly improve the prediction performance of deep generative models, while retaining the strong generative ability on generating input samples as well as completing missing values. In fact, by employing CNNs in both recognition and generative models, we achieve low error rates on MNIST and SVHN datasets, which are competitive to the state-of-the-art fully discriminative networks. Acknowledgments The work was supported by the National Basic Research Program (973 Program) of China (Nos. 2013CB329403, 2012CB316301), National NSF of China (Nos. 61322308, 61332007), Tsinghua TNList Lab Big Data Initiative, and Tsinghua Initiative Scientific Research Program (Nos. 20121088071, 20141080934). References [1] Y. Altun, I. Tsochantaridis, and T. Hofmann. Hidden Markov support vector machines. In ICML, 2003. [2] F. Bastien, P. Lamblin, R. Pascanu, J. Bergstra, I. Goodfellow, A. Bergeron, N. Bouchard, D. WardeFarley, and Y. Bengio. Theano: new features and speed improvements. In Deep Learning and Unsupervised Feature Learning NIPS Workshop, 2012. [3] Y. Bengio, E. Laufer, G. Alain, and J. Yosinski. Deep generative stochastic networks trainable by backprop. In ICML, 2014. [4] N. Chen, J. Zhu, F. Sun, and E. P. Xing. Large-margin predictive latent subspace learning for multi-view data analysis. IEEE Trans. on PAMI, 34(12):2365–2378, 2012. 8 [5] C. Cortes and V. Vapnik. Support-vector networks. Journal of Machine Learning, 20(3):273–297, 1995. [6] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. arXiv:1411.5928, 2014. [7] I. J. Goodfellow, J. P. Abadie, M. Mirza, B. Xu, D. W. Farley, S.ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, 2014. [8] I. J. Goodfellow, D.Warde-Farley, M. Mirza, A. C. Courville, and Y. Bengio. Maxout networks. In ICML, 2013. [9] K. Gregor, I. Danihelka, A. Mnih, C. Blundell, and D. Wierstra. Deep autoregressive networks. In ICML, 2014. [10] D. P. Kingma and J. L. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [11] D. P. Kingma, D. J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. In NIPS, 2014. [12] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [13] H. Larochelle and I. Murray. The neural autoregressive distribution estimator. In AISTATS, 2011. [14] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998. [15] C. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply-supervised nets. In AISTATS, 2015. [16] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In ICML, 2009. [17] M. Lin, Q. Chen, and S. Yan. Network in network. In ICLR, 2014. [18] R. J. Little and D. B. Rubin. Statistical analysis with missing data. JMLR, 539, 1987. [19] L. V. Matten and G. Hinton. Visualizing data using t-SNE. JMLR, 9:2579–2605, 2008. [20] K. Miller, M. P. Kumar, B. Packer, D. Goodman, and D. Koller. Max-margin min-entropy models. In AISTATS, 2012. [21] A. Mnih and K. Gregor. Neural variational inference and learning in belief networks. In ICML, 2014. [22] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [23] M. Ranzato, J. Susskind, V. Mnih, and G. E. Hinton. On deep generative models with applications to recognition. In CVPR, 2011. [24] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. [25] R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In AISTATS, 2009. [26] L. Saul, T. Jaakkola, and M. Jordan. Mean field theory for sigmoid belief networks. Journal of AI Research, 4:61–76, 1996. [27] P. Sermanet, S. Chintala, and Y. Lecun. Convolutional neural networks applied to house numbers digit classification. In ICPR, 2012. [28] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter. Pegasos: Primal estimated sub-gradient solver for SVM. Mathematical Programming, Series B, 2011. [29] Y. Tang. Deep learning using linear support vector machines. In Challenges on Representation Learning Workshop, ICML, 2013. [30] B. Taskar, C. Guestrin, and D. Koller. Max-margin Markov networks. In NIPS, 2003. [31] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Support vector machine learning for interdependent and structured output spaces. In ICML, 2004. [32] C. J. Yu and T. Joachims. Learning structural SVMs with latent variables. In ICML, 2009. [33] M. D. Zeiler and R. Fergus. Stochastic pooling for regularization of deep convolutional neural networks. In ICLR, 2013. [34] J. Zhu, A. Ahmed, and E. P. Xing. MedLDA: Maximum margin supervised topic models. JMLR, 13:2237– 2278, 2012. [35] J. Zhu, N. Chen, H. Perkins, and B. Zhang. Gibbs max-margin topic models with data augmentation. JMLR, 15:1073–1110, 2014. [36] J. Zhu, N. Chen, and E. P. Xing. Bayesian inference with posterior regularization and applications to infinite latent SVMs. JMLR, 15:1799–1847, 2014. [37] J. Zhu, E.P. Xing, and B. Zhang. Partially observed maximum entropy discrimination Markov networks. In NIPS, 2008. 9 | 2015 | 247 |
5,755 | Convolutional Neural Networks with Intra-layer Recurrent Connections for Scene Labeling Ming Liang Xiaolin Hu Bo Zhang Tsinghua National Laboratory for Information Science and Technology (TNList) Department of Computer Science and Technology Center for Brain-Inspired Computing Research (CBICR) Tsinghua University, Beijing 100084, China liangm07@mails.tsinghua.edu.cn, {xlhu,dcszb}@tsinghua.edu.cn Abstract Scene labeling is a challenging computer vision task. It requires the use of both local discriminative features and global context information. We adopt a deep recurrent convolutional neural network (RCNN) for this task, which is originally proposed for object recognition. Different from traditional convolutional neural networks (CNN), this model has intra-layer recurrent connections in the convolutional layers. Therefore each convolutional layer becomes a two-dimensional recurrent neural network. The units receive constant feed-forward inputs from the previous layer and recurrent inputs from their neighborhoods. While recurrent iterations proceed, the region of context captured by each unit expands. In this way, feature extraction and context modulation are seamlessly integrated, which is different from typical methods that entail separate modules for the two steps. To further utilize the context, a multi-scale RCNN is proposed. Over two benchmark datasets, Standford Background and Sift Flow, the model outperforms many state-of-the-art models in accuracy and efficiency. 1 Introduction Scene labeling (or scene parsing) is an important step towards high-level image interpretation. It aims at fully parsing the input image by labeling the semantic category of each pixel. Compared with image classification, scene labeling is more challenging as it simultaneously solves both segmentation and recognition. The typical approach for scene labeling consists of two steps. First, extract local handcrafted features [6, 15, 26, 23, 27]. Second, integrate context information using probabilistic graphical models [6, 5, 18] or other techniques [24, 21]. In recent years, motivated by the success of deep neural networks in learning visual representations, CNN [12] is incorporated into this framework for feature extraction. However, since CNN does not have an explicit mechanism to modulate its features with context, to achieve better results, other methods such as conditional random field (CRF) [5] and recursive parsing tree [21] are still needed to integrate the context information. It would be interesting to have a neural network capable of performing scene labeling in an end-to-end manner. A natural way to incorporate context modulation in neural networks is to introduce recurrent connections. This has been extensively studied in sequence learning tasks such as online handwriting recognition [8], speech recognition [9] and machine translation [25]. The sequential data has strong correlations along the time axis. Recurrent neural networks (RNN) are suitable for these tasks because the long-range context information can be captured by a fixed number of recurrent weights. Treating scene labeling as a two-dimensional variant of sequence learning, RNN can also be applied, but the studies are relatively scarce. Recently, a recurrent CNN (RCNN) in which the output of the top layer of a CNN is integrated with the input in the bottom is successfully applied to scene labeling 1 𝐟𝑛 concatenate Valid convolutions Extract patch and resize classify “boat” Softmax Same convolutions Downsample {𝐟𝑛} Upsample Concatenate Classify Upsample Image-wise test Patch-wise training 𝐲𝒏 Cross entropy loss 𝐥𝒏 label Figure 1: Training and testing processes of multi-scale RCNN for scene labeling. Solid lines denote feed-forward connections and dotted lines denote recurrent connections. [19]. Without the aid of extra preprocessing or post-processing techniques, it achieves competitive results. This type of recurrent connections captures both local and global information for labeling a pixel, but it achieves this goal indirectly as it does not model the relationship between pixels (or the corresponding units in the hidden layers of CNN) in the 2D space explicitly. To achieve the goal directly, recurrent connections are required to be between units within layers. This type of RCNN has been proposed in [14], but there it is used for object recognition. It is unknown if it is useful for scene labeling, a more challenging task. This motivates the present work. A prominent structural property of RCNN is that feed-forward and recurrent connections co-exist in multiple layers. This property enables the seamless integration of feature extraction and context modulation in multiple levels of representation. In other words, an RCNN can be seen as a deep RNN which is able to encode the multi-level context dependency. Therefore we expect RCNN to be competent for scene labeling. Multi-scale is another technique for capturing both local and global information for scene labeling [5]. Therefore we adopt a multi-scale RCNN [14]. An RCNN is used for each scale. See Figure 1 for its overall architecture. The networks in different scales have exactly the same structure and weights. The outputs of all networks are concatenated and input to a softmax layer. The model operates in an end-to-end fashion, and does not need any preprocessing or post-processing techniques. 2 Related Work Many models, either non-parametric [15, 27, 3, 23, 26] or parametric [6, 13, 18], have been proposed for scene labeling. A comprehensive review is beyond the scope of this paper. Below we briefly review the neural network models for scene labeling. In [5], a multi-scale CNN is used to extract local features for scene labeling. The weights are shared among the CNNs for all scales to keep the number of parameters small. However, the multi-scale scheme alone has no explicit mechanism to ensure the consistency of neighboring pixels’ labels. Some post-processing techniques, such as superpixels and CRF, are shown to significantly improve the performance of multi-scale CNN. In [1], CNN features are combined with a fully connected CRF for more accurate segmentations. In both models [5, 1] CNN and CRF are trained in separated stages. In [29] CRF is reformulated and implemented as an RNN, which can be jointly trained with CNN by back-propagation (BP) algorithm. In [24], a recursive neural network is used to learn a mapping from visual features to the semantic space, which is then used to determine the labels of pixels. In [21], a recursive context propagation 2 network (rCPN) is proposed to better make use of the global context information. The rCPN is fed a superpixel representation of CNN features. Through a parsing tree, the rCPN recursively aggregates context information from all superpixels and then disseminates it to each superpixel. Although recursive neural network is related to RNN as they both use weight sharing between different layers, they have significant structural difference. The former has a single path from the input layer to the output layer while the latter has multiple paths [14]. As will be shown in Section 4, this difference has great influence on the performance in scene labeling. To the best of our knowledge, the first end-to-end neural network model for scene labeling refers to the deep CNN proposed in [7]. The model is trained by a supervised greedy learning strategy. In [19], another end-to-end model is proposed. Top-down recurrent connections are incorporated into a CNN to capture context information. In the first recurrent iteration, the CNN receives a raw patch and outputs a predicted label map (downsampled due to pooling). In other iterations, the CNN receives both a downsampled patch and the label map predicted in the previous iteration and then outputs a new predicted label map. Compared with the models in [5, 21], this approach is simple and elegant but its performance is not the best on some benchmark datasets. It is noted that both models in [14] and [19] are called RCNN. For convenience, in what follows, if not specified, RCNN refers to the model in [14]. 3 Model 3.1 RCNN The key module of the RCNN is the RCL. A generic RNN with feed-forward input u(t), internal state x(t) and parameters θ can be described by: x(t) = F(u(t), x(t −1), θ) (1) where F is the function describing the dynamic behavior of RNN. The RCL introduces recurrent connections into a convolutional layer (see Figure 2A for an illustration). It can be regarded as a special two-dimensional RNN, whose feed-forward and recurrent computations both take the form of convolution. xijk(t) = σ (wf k)⊤u(i,j)(t) + (wr k)⊤x(i,j)(t −1) + bk (2) where u(i,j) and x(i,j) are vectorized square patches centered at (i, j) of the feature maps of the previous layer and the current layer, wf k and wr k are the weights of feed-forward and recurrent connections for the kth feature map, and bk is the kth element of the bias. σ used in this paper is composed of two functions σ(zijk) = h(g(zijk)), where g is the widely used rectified linear function g(zijk) = max (zijk, 0), and h is the local response normalization (LRN) [11]: h(g(zijk)) = g(zijk) 1 + α L min(K,k+L/2) X k′=max(0,k−L/2) (g(zijk′))2 β (3) where K is the number of feature maps, α and β are constants controlling the amplitude of normalization. The LRN forces the units in the same location to compete for high activities, which mimics the lateral inhibition in the cortex. In our experiments, LRN is found to consistently improve the accuracy, though slightly. Following [11], α and β are set to 0.001 and 0.75, respectively. L is set to K/8 + 1. During the training or testing phase, an RCL is unfolded for T time steps into a multi-layer subnetwork. T is a predetermined hyper-parameter. See Figure 2B for an example with T = 3. The receptive field (RF) of each unit expands with larger T, so that more context information is captured. The depth of the subnetwork also increases with larger T. In the meantime, the number of parameters is kept constant due to weight sharing. Let u0 denote the static input (e.g., an image). The input to the RCL, denoted by u(t), can take this constant u0 for all t. But here we adopt a more general form: u(t) = γu0 (4) 3 Unfold a RCL An RCL unit (red) Multiplicatively unfold two RCLs pooling pooling RCNN 32 64 128 Additively unfold two RCLs A B C D E Figure 2: Illustration of the RCL and RCNN used in this paper. Sold arrows denote feed-forward connections and dotted arrows denote recurrent connections. where γ ∈[0, 1] is a discount factor, which determines the tradeoff between the feed-forward component and the recurrent component. When γ = 0, the feed-forward component is totally discarded after the first iteration. In this case the network behaves like the so-called recursive convolutional network [4], in which several convolutional layers have tied weights. There is only one path from input to output. When γ > 0, the network is a typical RNN. There are multiple paths from input to output (see Figure 2B). RCNN is composed of a stack of RCLs. Between neighboring RCLs there are only feed-forward connections. Max pooling layers are optionally interleaved between RCLs. The total number of recurrent iterations is set to T for all N RCLs. There are two approaches to unfold an RCNN. First, unfold the RCLs one by one, and each RCL is unfolded for T time steps before feeding to the next RCL (see Figure 2C). This unfolding approach multiplicatively increases the depth of the network. The largest depth of the network is proportional to NT. In the second approach, at each time step the states of all RCLs are updated successively (see Figure 2D). The unfolded network has a two-dimensional structure whose x axis is the time step and y axis is the level of layer. This unfolding approach additively increases the depth of the network. The largest depth of the network is proportional to N + T. We adopt the first unfolding approach due to the following advantages. First, it leads to larger effective RF and depth, which are important for the performance of the model. Second, the second approach is more computationally intensive since the feed-forward inputs need to be updated at each time step. However, in the first approach the feed-forward input of each RCL needs to be computed for only once. 3.2 Multi-scale RCNN In natural scenes objects appear in various sizes. To capture this variability, the model should be scale invariant. In [5], a multi-scale CNN is proposed to extract features for scene labeling, in which several CNNs with shared weights are used to process images of different scales. This approach is adopted to construct the multi-scale RCNN (see Figure 1). The original image corresponds to the finest scale. Images of coarser scales are obtained simply by max pooling the original image. The outputs of all RCNNs are concatenated to form the final representation. For pixel p, its probability falling into the cth semantic category is given by a softmax layer: yp c = exp w⊤ c f p P c′ exp w⊤ c′f p (c = 1, 2, ..., C) (5) where f p denotes the concatenated feature vector of pixel p, and wc denotes the weight for the cth category. The loss function is the cross entropy between the predicted probability yp c and the true hard label ˆyp c: L = − X p X c ˆyp c log yp c (6) where ˆyp c = 1 if pixel p is labeld as c and ˆyp c = 0 otherwise. The model is trained by backpropagation through time (BPTT) [28], that is, unfolding all the RCNNs to feed-forward networks and apply the BP algorithm. 4 3.3 Patch-wise Training and Image-wise Testing Most neural network models for scene labeling [5, 19, 21] are trained by the patch-wise approach. The training samples are randomly cropped image patches whose labels correspond to the categories of their center pixels. Valid convolutions are used in both feed-forward and recurrent computation. The patch is set to a proper size so that the last feature map has exactly the size of 1 × 1. In image-wise training, an image is input to the model and the output has exactly the same size as the image. The loss is the average of all pixels’ loss. We have conducted experiments with both training methods, and found that image-wise training seriously suffered from over-fitting. A possible reason is that the pixels in an image have too strong correlations. So patch-wise training is used in all our experiments. In [16], it is suggested that image-wise and patch-wise training are equally effective and the former is faster to converge. But their model is obtained by finetuning the VGG [22] model pretrained on ImageNet [2]. This conclusion may not hold for models trained from scratch. In the testing phase, the patch-wise approach is time consuming because the patches corresponding to all pixels need to be processed. We therefore use image-wise testing. There are two image-wise testing approaches to obtain dense label maps. The first is the Shift-and-stitch approach [20, 19]. When the predicted label map is downsampled by a factor of s, the original image will be shifted and processed for s2 times. At each time, the image is shifted by (x, y) pixels to the right and down. Both x and y take their value from {0, 1, 2, . . . , s −1}, and the shifted image is padded in their left and top borders with zero. The outputs for all shifted images are interleaved so that each pixel has a corresponding prediction. Shift-and-stitch approach needs to process the image for s2 times although it produces the exact prediction as the patch-wise testing. The second approach inputs the entire image to the network and obtains downsampled label map, then simply upsample the map to the same resolution as the input image, using bilinear or other interpolation methods (see Figure 1, bottom). This approach may suffer from the loss of accuracy, but is very efficient. The deconvolutional layer proposed in [16] is adopted for upsampling, which is the backpropagation counterpart of the convolutional layer. The deconvolutional weights are set to simulates the bilinear interpolation. Both of the image-wise testing methods are used in our experiments. 4 Experiments 4.1 Experimental Settings Experiments are performed over two benchmark datasets for scene labeling, Sift Flow [15] and Stanford Background [6]. The Sift Flow dataset contains 2688 color images, all of which have the size of 256×256 pixels. Among them 2488 images are training data, and the remaining 200 images are testing data. There are 33 semantic categories, and the class frequency is highly unbalanced. The Stanford background dataset contains 715 color images, most of them have the size of 320 × 240 pixels. Following [6] 5-fold cross validation is used over this dataset. In each fold there are 572 training images and 143 testing images. The pixels have 8 semantic categories and the class frequency is more balanced than the Sift Flow dataset. In most of our experiments, RCNN has three parameterized layers (Figure 2E). The first parameterized layer is a convolutional layer followed by a 2 × 2 non-overlapping max pooling layer. This is to reduce the size of feature maps and thus save the computing cost and memory. The other two parameterized layers are RCLs. Another 2 × 2 max pooling layer is placed between the two RCLs. The numbers of feature maps in these layers are 32, 64 and 128. The filter size in the first convolutional layer is 7 × 7, and the feed-forward and recurrent filters in RCLs are all 3 × 3. Three scales of images are used and neighboring scales differed by a factor of 2 in each side of the image. The models are implemented using Caffe [10]. They are trained using stochastic gradient descent algorithm. For the Sift Flow dataset, the hyper-parameters are determined on a separate validation set. The same set of hyper-parameters is then used for the Stanford Background dataset. Dropout and weight decay are used to prevent over-fitting. Two dropout layers are used, one after the second pooling layer and the other before the concatenation of different scales. The dropout ratio is 0.5 and weight decay coefficient is 0.0001. The base learning rate is 0.001, which is reduced to 0.0001 when the training error enters a plateau. Overall, about ten millions patches have been input to the model during training. 5 Data augmentation is used in many models [5, 21] for scene labeling to prevent over-fitting. It is a technique to distort the training data with a set of transformations, so that additional data is generated to improve the generalization ability of the models. This technique is only used in Section 4.3 for the sake of fairness in comparison with other models. Augmentation includes horizontal reflection and resizing. 4.2 Model Analysis We empirically analyze the performance of RCNN models for scene labeling on the Sift Flow dataset. The results are shown in Table 1. Two metrics, the per-pixel accuracy (PA) and the average per-class accuracy (CA) are used. PA is the ratio of correctly classified pixels to the total pixels in testing images. CA is the average of all category-wise accuracies. The following results are obtained using the shift-and-stitch testing and without any data augmentation. Note that all models have a multi-scale architecture. Model Patch size No. Param. PA (%) CA (%) RCNN, γ = 1, T = 3 232 0.28M 80.3 31.9 RCNN, γ = 1, T = 4 256 0.28M 81.6 33.2 RCNN, γ = 1, T = 5 256 0.28M 82.3 34.3 RCNN-large, γ = 1, T = 3 256 0.65M 83.4 38.9 RCNN, γ = 0, T = 3 232 0.28M 80.5 34.2 RCNN, γ = 0, T = 4 256 0.28M 79.9 31.4 RCNN, γ = 0, T = 5 256 0.28M 80.4 31.7 RCNN-large, γ = 0, T = 3 256 0.65M 78.1 29.4 RCNN, γ = 0.25, T = 5 256 0.28M 82.4 35.4 RCNN, γ = 0.5, T = 5 256 0.28M 81.8 34.7 RCNN, γ = 0.75, T = 5 256 0.28M 82.8 35.8 RCNN, no share, γ = 1, T = 5 256 0.28M 81.3 33.3 CNN1 88 0.33M 74.9 24.1 CNN2 136 0.28M 78.5 28.8 Table 1: Model analysis over the Sift Flow dataset. We limit the maximum size of input patch to 256, which is the size of the image in the Sift Flow dataset. This is achieved by replacing the first few valid convolutions by same convolutions. First, the influence of γ in (4) is investigated. The patch sizes of images for different models are set such that the size of the last feature map is 1 × 1. We mainly investigate two specific values γ = 1 and γ = 0 with different iteration number T. Several other values of γ are tested with T=5. See Table 1 for details. For RCNN with γ = 1, the performance monotonously increase with more time steps. This is not the case for RCNN with γ = 0, with which the network tends to be over-fitting with more iterations. To further investigate this issue, a larger model denoted as RCNN-large is tested. It has four RCLs, and has more parameters and larger depth. With γ = 1 it achieves a better performance than RCNN. However, the RCNN-large with γ = 0 obtains worse performance than RCNN. When γ is set to other values, 0.25, 0.5 or 0.75, the performance seems better than γ = 1 but the difference is small. Second, the influence of weight sharing in recurrent connections is investigated. Another RCNN with γ = 1 and T = 5 is tested. Its recurrent weights in different iterations are not shared anymore, which leads to more parameters than shared ones. But this setting leads to worse accuracy both for PA and CA. A possible reason is that more parameters make the model more prone to over-fitting. Third, two feed-forward CNNs are constructed for comparison. CNN1 is constructed by removing all recurrent connections from RCNN, and then increasing the numbers of feature maps in each layer from 32, 64 and 128 to 60, 120 and 240, respectively. CNN2 is constructed by removing the recurrent connections and adding two extra convolutional layers. CNN2 had five convolutional layers and the corresponding numbers of feature maps are 32, 64, 64, 128 and 128, respectively. With these settings, the two models have approximately the same number of parameters as RCNN, which is for the sake of fair comparison. The two CNNs are outperformed by the RCNNs by a significant margin. Compared with the RCNN, the topmost units in these two CNNs cover much smaller regions (see the patch size column in Table 1). Note that all convolutionas in these models are performed in “valid” mode. This mode decreases the size of feature maps and as a consequence 6 Figure 3: Examples of scene labeling results from the Stanford Background dataset. “mntn” denotes mountains, and “object” denotes foreground objects. (together with max pooling) increases the RF size of the top units. Since the CNNs have fewer convolutional layers than the time-unfolded RCNNs, their RF sizes of the top units are smaller. Model No. Param. PA (%) CA (%) Time (s) Liu et al.[15] NA 76.7 NA 31 (CPU) Tighe and Lazebnik [27] NA 77.0 30.1 8.4 (CPU) Eigen and Fergus [3] NA 77.1 32.5 16.6 (CPU) Singh and Kosecka [23] NA 79.2 33.8 20 (CPU) Tighe and Lazebnik [26] NA 78.6 39.2 ≥8.4 (CPU) Multi-scale CNN + cover [5] 0.43 M 78.5 29.6 NA Multi-scale CNN + cover (balanced) [5] 0.43 M 72.3 50.8 NA Top-down RCNN [19] 0.09 M 77.7 29.8 NA Multi-scale CNN + rCPN [21] 0.80 M 79.6 33.6 0.37 (GPU) Multi-scale CNN + rCPN (balanced) [21] 0.80 M 75.5 48.0 0.37 (GPU) RCNN 0.28 M 83.5 35.8 0.03 (GPU) RCNN (balanced) 0.28 M 79.3 57.1 0.03 (GPU) RCNN-small 0.07 M 81.7 32.6 0.02 (GPU) RCNN-large 0.65 M 84.3 41.0 0.04 (GPU) FCNN [16] (∗finetuned from VGG model [22]) 134 M 85.1 51.7 ∼0.33 (GPU) Table 2: Comparison with the state-of-the-art models over the Sift Flow dataset. 4.3 Comparison with the State-of-the-art Models Next, we compare the results of RCNN and the state-of-the-art models. The RCNN with γ = 1 and T = 5 is used for comparison. The results are obtained using the upsampling testing approach for efficiency. Data augmentation is employed in training because it is used by many other models [5, 21]. The images are only preprocessed by removing the average RGB values computed over training images. Model No. Param. PA (%) CA (%) Time (s) Gould et al. [6] NA 76.4 NA 30 to 60 (CPU) Tighe and Lazebnik [27] NA 77.5 NA 12 (CPU) Socher et al. [24] NA 78.1 NA NA Eigen and Fergus [3] NA 75.3 66.5 16.6 (CPU) Singh and Kosecka [23] NA 74.1 62.2 20 (CPU) Lempitsky et al. [13] NA 81.9 72.4 ≥60 (CPU) Multiscale CNN + CRF [5] 0.43M 81.4 76.0 60.5 (CPU) Top-down RCNN [19] 0.09M 80.2 69.9 10.6 (CPU) Single-scale CNN + rCPN [21] 0.80M 81.9 73.6 0.5 (GPU) Multiscale CNN + rCPN [21] 0.80M 81.0 78.8 0.37 (GPU) Zoom-out [17] 0.23 M 82.1 77.3 NA RCNN 0.28M 83.1 74.8 0.03 (GPU) Table 3: Comparison with the state-of-the-art models over the Stanford Background dataset. The results over the Sift Flow dataset are shown in Table 2. Besides the PA and CA, the time for processing an image is also presented. For neural network models, the number of parameters are 7 shown. When extra training data from other datasets is not used, the RCNN outperforms all other models in terms of the PA metric by a significant margin. The RCNN has fewer parameters than most of the other neural network models except the top-down RCNN [19]. A small RCNN (RCNN-small) is then constructed by reducing the numbers of feature maps in RCNN to 16, 32 and 64, respectively, so that its total number of parameters is 0.07 million. The PA and CA of the small RCNN are 81.7% and 32.6%, respectively, significantly higher than those of the top-down RCNN. Note that better result over this dataset has been achieved by the fully convolutional network (FCN) [16]. However, FCN is finetuned from the VGG [22] net trained over the 1.2 million images of ImageNet, and has approximately 134 million parameters. Being trained over 2488 images, RCNN is only outperformed by 1.6 percent on PA. This gap can be further reduced by using larger RCNN models. For example, the RCNN-large in Table 1 achieves PA of 84.3% with data augmentation. The class distribution in the Sift Flow dataset is highly unbalanced, which is harmful to the CA performance. In [5], frequency balance is used so that patches in different classes appear in the same frequency. This operation greatly enhance the CA value. For better comparison, we also test an RCNN with weighted sampling (balanced) so that the rarer classes apprear more frequently. In this case, the RCNN achieves a much higher CA than other methods including FCN, while still keeping a good PA. The results over the Stanford Background dataset are shown in Table 3. The set of hyper-parameters used for the Sift Flow dataset is adopted without further tuning. Frequency balance is not used. The RCNN again achieves the best PA score, although CA is not the best. Some typical results of RCNN are shown in Figure 3. On a GTX Titan black GPU, it takes about 0.03 second for the RCNN and 0.02 second for the RCNN-small to process an image. Compared with other models, the efficiency of RCNN is mainly attributed to its end-to-end property. For example, the rCPN model takes much time in obtaining the superpixels. 5 Conclusion A multi-scale recurrent convolutional neural network is used for scene labeling. The model is able to perform local feature extraction and context integration simultaneously in each parameterized layer, therefore particularly fits this application because both local and global information are critical for determining the label of a pixel in an image. This is an end-to-end approach and can be simply trained by the BPTT algorithm. Experimental results over two benchmark datasets demonstrate the effectiveness and efficiency of the model. Acknowledgements We are grateful to the anonymous reviewers for their valuable comments. This work was supported in part by the National Basic Research Program (973 Program) of China under Grant 2012CB316301 and Grant 2013CB329403, in part by the National Natural Science Foundation of China under Grant 61273023, Grant 91420201, and Grant 61332007, in part by the Natural Science Foundation of Beijing under Grant 4132046. References [1] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [2] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. [3] D. Eigen and R. Fergus. Nonparametric image parsing using adaptive neighbor sets. In CVPR, pages 2799–2806, 2012. [4] D. Eigen, J. Rolfe, R. Fergus, and Y. LeCun. Understanding deep architectures using a recursive convolutional network. In ICLR, 2014. 8 [5] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Learning hierarchical features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 35(8):1915–1929, 2013. [6] S. Gould, R. Fulton, and D. Koller. Decomposing a scene into geometric and semantically consistent regions. In ICCV, pages 1–8, 2009. [7] D. Grangier, L. Bottou, and R. Collobert. Deep convolutional networks for scene parsing. In ICML Deep Learning Workshop, volume 3, 2009. [8] A. Graves, M. Liwicki, S. Fern´andez, R. Bertolami, H. Bunke, and J. Schmidhuber. A novel connectionist system for unconstrained handwriting recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 31(5):855–868, 2009. [9] A. Graves, A.-r. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In ICASSP, pages 6645–6649, 2013. [10] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the ACM International Conference on Multimedia, pages 675–678, 2014. [11] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [12] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541–551, 1989. [13] V. Lempitsky, A. Vedaldi, and A. Zisserman. A pylon model for semantic segmentation. In NIPS, pages 1485–1493, 2011. [14] M. Liang and X. Hu. Recurrent convolutional neural network for object recognition. In CVPR, pages 3367–3375, 2015. [15] C. Liu, J. Yuen, and A. Torralba. Nonparametric scene parsing via label transfer. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 33(12):2368–2382, 2011. [16] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [17] M. Mostajabi, P. Yadollahpour, and G. Shakhnarovich. Feedforward semantic segmentation with zoomout features. In CVPR, 2015. [18] R. Mottaghi, X. Chen, X. Liu, N.-G. Cho, S.-W. Lee, S. Fidler, R. Urtasun, and A. Yuille. The role of context for object detection and semantic segmentation in the wild. In CVPR, pages 891–898, 2014. [19] P. H. Pinheiro and R. Collobert. Recurrent convolutional neural networks for scene parsing. In ICML, 2014. [20] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. In ICLR, 2014. [21] A. Sharma, O. Tuzel, and M.-Y. Liu. Recursive context propagation network for semantic scene labeling. In NIPS, pages 2447–2455. 2014. [22] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [23] G. Singh and J. Kosecka. Nonparametric scene parsing with adaptive feature relevance and semantic context. In CVPR, pages 3151–3157, 2013. [24] R. Socher, C. C. Lin, C. Manning, and A. Y. Ng. Parsing natural scenes and natural language with recursive neural networks. In ICML, pages 129–136, 2011. [25] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In NIPS, pages 3104–3112, 2014. [26] J. Tighe and S. Lazebnik. Finding things: Image parsing with regions and per-exemplar detectors. In CVPR, pages 3001–3008, 2013. [27] J. Tighe and S. Lazebnik. Superparsing: Scalable nonparametric image parsing with superpixels. International Journal of Computer Vision (IJCV), 101(2):329–349, 2013. [28] P. J. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. [29] S. Zheng, S. Jayasumana, B. Romera-Paredes, V. Vineet, Z. Su, D. Du, C. Huang, and P. Torr. Conditional random fields as recurrent neural networks. In ICCV, 2015. 9 | 2015 | 248 |
5,756 | Individual Planning in Infinite-Horizon Multiagent Settings: Inference, Structure and Scalability Xia Qu Epic Systems Verona, WI 53593 quxiapisces@gmail.com Prashant Doshi THINC Lab, Dept. of Computer Science University of Georgia, Athens, GA 30622 pdoshi@cs.uga.edu Abstract This paper provides the first formalization of self-interested planning in multiagent settings using expectation-maximization (EM). Our formalization in the context of infinite-horizon and finitely-nested interactive POMDPs (I-POMDP) is distinct from EM formulations for POMDPs and cooperative multiagent planning frameworks. We exploit the graphical model structure specific to I-POMDPs, and present a new approach based on block-coordinate descent for further speed up. Forward filtering-backward sampling – a combination of exact filtering with sampling – is explored to exploit problem structure. 1 Introduction Generalization of bounded policy iteration (BPI) to finitely-nested interactive partially observable Markov decision processes (I-POMDP) [1] is currently the leading method for infinite-horizon selfinterested multiagent planning and obtaining finite-state controllers as solutions. However, interactive BPI is acutely prone to converge to local optima, which severely limits the quality of its solutions despite the limited ability to escape from these local optima. Attias [2] posed planning using MDP as a likelihood maximization problem where the “data” is the initial state and the final goal state or the maximum total reward. Toussaint et al. [3] extended this to infer finite-state automata for infinite-horizon POMDPs. Experiments reveal good quality controllers of small sizes although run time is a concern. Given BPI’s limitations and the compelling potential of this approach in bringing advances in inferencing to bear on planning, we generalize it to infinite-horizon and finitely-nested I-POMDPs. Our generalization allows its use toward planning for an individual agent in noncooperation where we may not assume common knowledge of initial beliefs or common rewards, due to which others’ beliefs, capabilities and preferences are modeled. Analogously to POMDPs, we formulate a mixture of finite-horizon DBNs. However, the DBNs differ by including models of other agents in a special model node. Our approach, labeled as I-EM, improves on the straightforward extension of Toussaint et al.’s EM to I-POMDPs by utilizing various types of structure. Instead of ascribing as many level 0 finite-state controllers as candidate models and improving each using its own EM, we use the underlying graphical structure of the model node and its update to formulate a single EM that directly provides the marginal of others’ actions across all models. This rests on a new insight, which considerably simplifies and speeds EM at level 1. We present a general approach based on block-coordinate descent [4, 5] for speeding up the nonasymptotic rate of convergence of the iterative EM. The problem is decomposed into optimization subproblems in which the objective function is optimized with respect to a small subset (block) of variables, while holding other variables fixed. We discuss the unique challenges and present the first effective application of this iterative scheme to multiagent planning. Finally, sampling offers a way to exploit the embedded problem structure such as information in distributions. The exact forward-backward E-step is replaced with forward filtering-backward sampling 1 (FFBS) that generates trajectories weighted with rewards, which are used to update the parameters of the controller. While sampling has been integrated in EM previously [6], FFBS specifically mitigates error accumulation over long horizons due to the exact forward step. 2 Overview of Interactive POMDPs A finitely-nested I-POMDP [7] for an agent i with strategy level, l, interacting with agent j is: I-POMDPi,l = ISi,l, A, Ti, Ωi, Oi, Ri, OCi • ISi,l denotes the set of interactive states defined as, ISi,l = S × Mj,l−1, where Mj,l−1 = {Θj,l−1 ∪SMj}, for l ≥1, and ISi,0 = S, where S is the set of physical states. Θj,l−1 is the set of computable, intentional models ascribed to agent j: θj,l−1 = bj,l−1, ˆθj. Here bj,l−1 is agent j’s level l −1 belief, bj,l−1 ∈(ISj,l−1) where Δ(·) is the space of distributions, and ˆθj = A, Tj, Ωj, Oj, Rj, OCj, is j’s frame. At level l=0, bj,0 ∈(S) and a intentional model reduces to a POMDP. SMj is the set of subintentional models of j, an example is a finite state automaton. • A = Ai × Aj is the set of joint actions of all agents. • Other parameters – transition function, Ti, observations, Ωi, observation function, Oi, and preference function, Ri – have their usual semantics analogously to POMDPs but involve joint actions. • Optimality criterion, OCi, here is the discounted infinite horizon sum. An agent’s belief over its interactive states is a sufficient statistic fully summarizing the agent’s observation history. Given the associated belief update, solution to an I-POMDP is a policy. Using the Bellman equation, each belief state in an I-POMDP has a value which is the maximum payoff the agent can expect starting from that belief and over the future. 3 Planning in I-POMDP as Inference We may represent the policy of agent i for the infinite horizon case as a stochastic finite state controller (FSC), defined as: πi = Ni, Ti, Li, Vi where Ni is the set of nodes in the controller. Ti : Ni × Ai × Ωi × Ni →[0, 1] represents the node transition function; Li : Ni × Ai →[0, 1] denotes agent i’s action distribution at each node; and an initial distribution over the nodes is denoted by, Vi : Ni →[0, 1]. For convenience, we group Vi, Ti and Li in ˆfi. Define a controller at level l for agent i as, πi,l = Ni,l, ˆfi,l , where Ni,l is the set of nodes in the controller and ˆfi,l groups remaining parameters of the controller as mentioned before. Analogously to POMDPs [3], we formulate planning in multiagent settings formalized by I-POMDPs as a likelihood maximization problem: π∗ i,l = arg max Πi,l (1 −γ) ∞ T =0 γT Pr(rT i = 1|T; πi,l) (1) where Πi,l are all level-l FSCs of agent i, rT i is a binary random variable whose value is 0 or 1 emitted after T time steps with probability proportional to the reward, Ri(s, ai, aj). r0 i a0 i n0 i,l s0 M 0 j,0 a0 j M 0 k,0 a0 k n0 i,l n1 i,l s0 s1 s2 o1 i o2 i oT i rT i a0 i a2 i a1 i n2 i,l aT i nT i,l sT a2 j a1 j aT j a0 j a0 k a1 k a2 k a0 k M 0 j,0 M 1 k,0 M 1 j,0 M 2 k,0 M 2 j,0 M T k,0 M T j,0 M 0 k,0 s0 s1 sT rT j aT j a0 j o1 j m0 j,0 m1 j,0 a1 j oT j mT j,0 Figure 1: (a) Mixture of DBNs with 1 to T time slices for I-POMDPi,1 with i’s level-1 policy represented as a standard FSC whose “node state” is denoted by ni,l. The DBNs differ from those for POMDPs by containing special model nodes (hexagons) whose values are candidate models of other agents. (b) Hexagonal model nodes and edges in bold for one other agent j in (a) decompose into this level-0 DBN. Values of the node mt j,0 are the candidate models. CPT of chance node at j denoted by φj,0(mt j,0, at j) is inferred using likelihood maximization. 2 The planning problem is modeled as a mixture of DBNs of increasing time from T=0 onwards (Fig. 1). The transition and observation functions of I-POMDPi,l parameterize the chance nodes s and oi, respectively, along with Pr(rT i |aT i , aT j , sT ) ∝ Ri(sT ,aT i ,aT j )−Rmin Rmax−Rmin . Here, Rmax and Rmin are the maximum and minimum reward values in Ri. The networks include nodes, ni,l, of agent i’s level-l FSC. Therefore, functions in ˆfi,l parameterize the network as well, which are to be inferred. Additionally, the network includes the hexagonal model nodes – one for each other agent – that contain the candidate level 0 models of the agent. Each model node provides the expected distribution over another agent’s actions. Without loss of generality, no edges exist between model nodes in the same time step. Correlations between agents could be included as state variables in the models. Agent j’s model nodes and the edges (in bold) between them, and between the model and chance action nodes represent a DBN of length T as shown in Fig. 1(b). Values of the chance node, m0 j,0, are the candidate models of agent j. Agent i’s initial belief over the state and models of j becomes the parameters of s0 and m0 j,0. The likelihood maximization at level 0 seeks to obtain the distribution, Pr(aj|m0 j,0), for each candidate model in node, m0 j,0, using EM on the DBN. Proposition 1 (Correctness). The likelihood maximization problem as defined in Eq. 1 with the mixture models as given in Fig. 1 is equivalent to the problem of solving the original I-POMDPi,l with discounted infinite horizon whose solution assumes the form of a finite state controller. All proofs are given in the supplement. Given the unique mixture models above, the challenge is to generalize the EM-based iterative maximization for POMDPs to the framework of I-POMDPs. 3.1 Single EM for Level 0 Models The straightforward approach is to infer a likely FSC for each level 0 model. However, this approach does not scale to many models. Proposition 2 below shows that the dynamic Pr(at j|st) is sufficient predictive information about other agent from its candidate models at time t, to obtain the most likely policy of agent i. This is markedly different from using behavioral equivalence [8] that clusters models with identical solutions. The latter continues to require the full solution of each model. Proposition 2 (Sufficiency). Distributions Pr(at j|st) across actions at j ∈Aj for each state st is sufficient predictive information about other agent j to obtain the most likely policy of i. In the context of Proposition 2, we seek to infer Pr(at j|mt j,0) for each (updated) model of j at all time steps, which is denoted as φj,0. Other terms in the computation of Pr(at j|st) are known parameters of the level 0 DBN. The likelihood maximization for the level 0 DBN is: φ∗ j,0 = arg max φj,0 (1 −γ) ∞ T =0 mj,0∈MT j,0 γT Pr(rT j = 1|T, mj,0; φj,0) As the trajectory consisting of states, models, actions and observations of the other agent is hidden at planning time, we may solve the above likelihood maximization using EM. E-step Let z0:T j = {st, mt j,0, at j, ot j}T 0 where the observation at t = 0 is null, be the hidden trajectory. The log likelihood is obtained as an expectation of these hidden trajectories: Q(φ j,0|φj,0) = ∞ T =0 z0:T j Pr(rT j = 1, z0:T j , T; φj,0) log Pr(rT j = 1, z0:T j , T; φ j,0) (2) The “data” in the level 0 DBN consists of the initial belief over the state and models, b0 i,1, and the observed reward at T. Analogously to EM for POMDPs, this motivates forward filtering-backward smoothing on a network with joint state (st,mt j,0) for computing the log likelihood. The transition function for the forward and backward steps is: Pr(st, mt j,0|st−1, mt−1 j,0 ) = at−1 j ,ot j φj,0(mt−1 j,0 , at−1 j ) Tmj(st−1, at−1 j , st) Pr(mt j,0|mt−1 j,0 , at−1 j , ot j) × Omj(st, at−1 j , ot j) (3) where mj in the subscripts is j’s model at t −1. Here, Pr(mt j,0|at−1 j , ot j, mt−1 j,0 ) is the Kroneckerdelta function that is 1 when j’s belief in mt−1 j,0 updated using at−1 j and ot j equals the belief in mt j,0; otherwise 0. 3 Forward filtering gives the probability of the next state as follows: αt(st, mt j,0) = st−1,mt−1 j,0 Pr(st, mt j,0|st−1, mt−1 j,0 ) αt−1(st−1, mt−1 j,0 ) where α0(s0, m0 j,0) is the initial belief of agent i. The smoothing by which we obtain the joint probability of the state and model at t −1 from the distribution at t is: βh(st−1, mt−1 j,0 ) = st,mt j,0 Pr(st, mt j,0|st−1, mt−1 j,0 ) βh−1(st, mt j,0) where h denotes the horizon to T and β0(sT , mT j,0) = EaT j |mT j,0[Pr(rT j = 1|sT , mT j,0)]. Messages αt and βh give the probability of a state at some time slice in the DBN. As we consider a mixture of BNs, we seek probabilities for all states in the mixture model. Subsequently, we may compute the forward and backward messages at all states for the entire mixture model in one sweep. α(s, mj,0) = ∞ t=0 Pr(T = t) αt(s, mj,0) β(s, mj,0) = ∞ h=0 Pr(T = h) βh(s, mj,0) (4) Model growth As the other agent performs its actions and makes observations, the space of j’s models grows exponentially: starting from a finite set of |M 0 j,0| models, we obtain O(|M 0 j,0|(|Aj||Ωj|)t) models at time t. This greatly increases the number of trajectories in Z0:T j . We limit the growth in the model space by sampling models at the next time step from the distribution, αt(st, mt j,0), as we perform each step of forward filtering. It limits the growth by exploiting the structure present in φj,0 and Oj, which guide how the models grow. M-step We obtain the updated φ j,0 from the full log likelihood in Eq. 2 by separating the terms: Q(φ j,0|φj,0) = terms independent of φ j,0 + ∞ T =0 z0:T j Pr(rT i = 1, z0:T j , T; φ j,0) T t=0 φ j,0(at j|mt j,0) and maximizing it w.r.t. φ j,0: φ j,0(at j, mt j,0) ∝φj,0(at j, mt j) st Rmj(st, at j) α(st, mt j,0) + st,st+1,mt+1 j,0 ,ot+1 j γ 1 −γ β(st+1, mt+1 j,0 ) × α(st, mt j,0) Tmj(st, at j, st+1) Pr(mt+1 j,0 |mt j,0, at j, ot+1 j ) Omj(st+1, at j, ot+1 j ) 3.2 Improved EM for Level l I-POMDP At strategy levels l ≥1, Eq. 1 defines the likelihood maximization problem, which is iteratively solved using EM. We show the E- and M-steps next beginning with l = 1. E-step In a multiagent setting, the hidden variables additionally include what the other agent may observe and how it acts over time. However, a key insight is that Prop. 2 allows us to limit attention to the marginal distribution over other agents’ actions given the state. Thus, let z0:T i = {st, ot i, nt i,l, at i, at j, . . . , at k}T 0 , where the observation at t = 0 is null, and other agents are labeled j to k; this group is denoted −i. The full log likelihood involves an expectation over hidden variables: Q(π i,l|πi,l) = ∞ T =0 z0:T i Pr(rT i = 1, z0:T i , T; πi,l) log Pr(rT i = 1, z0:T i , T; π i,l) (5) Due to the subjective perspective in I-POMDPs, Q computes the likelihood of agent i’s FSC only (and not of joint FSCs as in team planning [9]). In the T-step DBN of Fig. 1, observed evidence includes the reward, rT i , at the end and the initial belief. We seek the likely distributions, Vi, Ti, and Li, across time slices. We may again realize the full joint in the expectation using a forward-backward algorithm on a hidden Markov model whose state is (st, nt i,l). The transition function of this model is, Pr(st, nt i,l|st−1, nt−1 i,l ) = at−1 i ,at−1 −i ,ot i Li(nt−1 i,l , at−1 i ) −i Pr(at−1 −i |st−1) Ti(nt−1 i,l , at−1 i , ot i, nt i,l) × Ti(st−1, at−1 i , at−1 −i , st) Oi(st, at−1 i , at−1 −i , ot i) (6) In addition to parameters of I-POMDPi,l, which are given, parameters of agent i’s controller and those relating to other agents’ predicted actions, φ−i,0, are present in Eq. 6. Notice that in consequence of Proposition 2, Eq. 6 precludes j’s observation and node transition functions. 4 The forward message, αt = Pr(st, nt i,l), represents the probability of being at some state of the DBN at time t: αt(st, nt i,l) = st−1,nt−1 i,l Pr(st, nt i,l|st−1, nt−1 i,l ) αt−1(st−1, nt−1 i,l ) (7) where, α0(s0, n0 i,l) = Vi(n0 i,l)b0 i,l(s0). The backward message gives the probability of observing the reward in the final T th time step given a state of the Markov model, βt(st, nt i,l) = Pr(rT i = 1|st, nt i,l): βh(st, nt i,l) = st+1,nt+1 i,l Pr(st+1, nt+1 i,l |st, nt i,l) βh−1(st+1, nt+1 i,l ) (8) where, β0(sT , nT i,l) = aT i ,aT −i Pr(rT i = 1|sT , aT i , aT −i) Li(nT i,l, aT i ) −i Pr(aT −i|sT ), and 1 ≤ h ≤T is the horizon. Here, Pr(rT i = 1|sT , aT i , aT −i) ∝Ri(sT , aT i , aT −i). A side effect of Pr(at −i|st) being dependent on t is that we can no longer conveniently define α and β for use in M-step at level 1. Instead, the computations are folded in the M-step. M-step We update the parameters, Li, Ti and Vi, of πi,l to obtain π i,l based on the expectation in the E-step. Specifically, take log of the likelihood Pr(rT = 1, z0:T i , T; πi,l) with πi,l substituted with π i,l and focus on terms involving the parameters of π i,l: log Pr(rT = 1, z0:T i , T; π i,l) =terms independent of π i,l + T t=0 log L i(nt i,l, at i)+ T −1 t=0 log T i (nt i,l, at i, ot+1 i , nt+1 i,l ) + log V i(ni,l) In order to update, Li, we partially differentiate the Q-function of Eq. 5 with respect to L i. To facilitate differentiation, we focus on the terms involving Li, as shown below. Q(π i,l|πi,l) = terms indep. of L i + ∞ T =0 Pr(T) T t=0 z0:T i Pr(rT i = 1, z0:t i |T; πi,l) log L i(nt i,l, at i) L i on maximizing the above equation is: L i(nt i,l, at i) ∝Li(nt i,l, at i) ∞ T =0 −i sT ,aT −i γT 1 −γ Pr(rT i = 1|sT , aT i , aT −i) Pr(aT −i|sT ) αT (sT , nT i,l) Node transition probabilities Ti and node distribution Vi for π i,l, is updated analogously to Li. Because a FSC is inferred at level 1, at strategy levels l = 2 and greater, lower-level candidate models are FSCs. EM at these higher levels proceeds by replacing the state of the DBN, (st, nt i,l) with (st, nt i,l, nt j,l−1, . . . , nt k,l−1). 3.3 Block-Coordinate Descent for Non-Asymptotic Speed Up Block-coordinate descent (BCD) [4, 5, 10] is an iterative scheme to gain faster non-asymptotic rate of convergence in the context of large-scale N-dimensional optimization problems. In this scheme, within each iteration, a set of variables referred to as coordinates are chosen and the objective function, Q, is optimized with respect to one of the coordinate blocks while the other coordinates are held fixed. BCD may speed up the non-asymptotic rate of convergence of EM for both I-POMDPs and POMDPs. The specific challenge here is to determine which of the many variables should be grouped into blocks and how. We empirically show in Section 5 that grouping the number of time slices, t, and horizon, h, in Eqs. 7 and 8, respectively, at each level, into coordinate blocks of equal size is beneficial. In other words, we decompose the mixture model into blocks containing equal numbers of BNs. Alternately, grouping controller nodes is ineffective because distribution Vi cannot be optimized for subsets of nodes. Formally, let Ψt 1 be a subset of {T = 1, T = 2, . . . , T = Tmax}. Then, the set of blocks is, Bt = {Ψt 1, Ψt 2, Ψt 3, . . .}. In practice, because both t and h are finite (say, Tmax), the cardinality of Bt is bounded by some C ≥1. Analogously, we define the set of blocks of h, denoted by Bh. In the M-step now, we compute αt for the time steps in a single coordinate block Ψt c only, while using the values of αt from the previous iteration for the complementary coordinate blocks, ˜Ψt c. Analogously, we compute βh for the horizons in Ψh c only, while using β values from the previous iteration for the remaining horizons. We cyclically choose a block, Ψt c, at iterations c + qC where q ∈{0, 1, 2, . . .}. 5 3.4 Forward Filtering - Backward Sampling An approach for exploiting embedded structure in the transition and observation functions is to replace the exact forward-backward message computations with exact forward filtering and backward sampling (FFBS) [11] to obtain a sampled reverse trajectory consisting of sT , nT i,l, aT i , nT −1 i,l , aT −1 i , oT i , nT i,l, and so on from T to 0. Here, Pr(rT i = 1|sT , aT i , aT −i) is the likelihood weight of this trajectory sample. Parameters of the updated FSC, π i,l, are obtained by summing and normalizing the weights. Each trajectory is obtained by first sampling ˆT ∼Pr(T), which becomes the length of i’s DBN for this sample. Forward message, αt(st, nt i,l), t = 0 . . . ˆT is computed exactly (Eq. 7) followed by the backward message, βh(st, nt i,l), h = 0 . . . ˆT and t = ˆT −h. Computing βh differs from Eq. 8 by utilizing the forward message: βh(st, nt i,l|st+1, nt+1 i,l ) = at i,at −i,ot+1 i αt(st, nt i,l) Li(nt i,l, at i) −i Pr(at −i|st) Ti(st, at i, at −i, st+1) Ti(nt i,l, at i, ot+1 i , nt+1 i,l ) Oi(st+1, at i, at −i, ot+1 i ) (9) where β0(sT , nT i,l, rT i ) = at i,at −i αT (sT , nT i,l) −i Pr(aT −i|sT ) L(nT i,l, aT i ) Pr(rT i |sT , aT i , aT −i). Subsequently, we may easily sample sT , nT i,l, rT i followed by sampling sT −1 i , nT −1 i,l from Eq. 9. We sample aT −1 i , oT i ∼Pr(at i, ot+1 i |st, nt i,l, st+1, nt+1 i,l ), where: Pr(at i, ot+1 i |st, nt i,l, st+1, nt+1 i,l ) ∝ −i Pr(at −i|st) Li(nt i,l, at i) Ti(nt i,l, at i, ot+1 i , nt+1 i,l ) Ti(st, at i, at −i, st+1) Oi(st+1, at i, at −j, ot+1 i ) 4 Computational Complexity Our EM at level 1 is significantly quicker compared to ascribing FSCs to other agents. In the latter, nodes of others’ controllers must be included alongside s and ni,l. Proposition 3 (E-step speed up). Each E-step at level 1 using the forward-backward pass as shown previously results in a net speed up of O((|M||N−i,0|)2K|Ω−i|K) over the formulation that ascribes |M| FSCs each to K other agents with each having |N−i,0| nodes. Analogously, updating the parameters Li and Ti in the M-step exhibits a speedup of O((|M||N−i,0|)2K|Ω−i|K), while Vi leads to O((|M||N−i,0|)K). This improvement is exponential in the number of other agents. On the other hand, the E-step at level 0 exhibits complexity that is typically greater compared to the total complexity of the E-steps for |M| FSCs. Proposition 4 (E-step ratio at level 0). E-steps when |M| FSCs are inferred for K agents exhibit a ratio of complexity, O( |N−i,0|2 |M| ), compared to the E-step for obtaining φ−i,0. The ratio in Prop. 4 is < 1 when smaller-sized controllers are sought and there are several models. 5 Experiments Five variants of EM are evaluated as appropriate: the exact EM inference-based planning (labeled as I-EM); replacing the exact M-step with its greedy variant analogously to the greedy maximization in EM for POMDPs [12] (I-EM-Greedy); iterating EM based on coordinate blocks (I-EM-BCD) and coupled with a greedy M-step (I-EM-BCD-Greedy); and lastly, using forward filtering-backward sampling (I-EM-FFBS). We use 4 problem domains: the noncooperative multiagent tiger problem [13] (|S|= 2, |Ai|= |Aj|= 3, |Oi|= |Oj|= 6 for level l ≥1, |Oj|= 3 at level 0, and γ = 0.9) with a total of 5 agents and 50 models for each other agent. A larger noncooperative 2-agent money laundering (ML) problem [14] forms the second domain. It exhibits 99 physical states for the subject agent (blue team), 9 actions for blue and 4 for the red team, 11 observations for subject and 4 for the other, with about 100 models 6 5-agent Tiger -300 -250 -200 -150 -100 -50 0 10 100 1000 Level 1 Value time(s) in log scale I-EM I-EM-Greedy I-EM-BCD I-EM-FFBS (I-a) EM methods 2-agent ML -140 -130 -120 -110 -100 -90 100 1000 10000 time(s) in log scale I-EM I-EM-Greedy I-EM-BCD-Greedy I-EM-FFBS (I-b) EM methods 3-agent UAV 0 50 100 150 200 250 300 350 400 0 10000 20000 30000 40000 50000 60000 70000 time(s) I-EM-Greedy I-EM-BCD-Greedy I-EM-FFBS (I-c) EM methods -300 -250 -200 -150 -100 -50 0 10 100 1000 10000 Level 1 Value time(s) in log scale I-EM-BCD I-BPI (II-a) I-EM-BCD, I-BPI -140 -130 -120 -110 -100 -90 100 1000 time(s) in log scale I-EM-BCD-Greedy I-BPI (II-b) I-EM-BCD-Greedy, I-BPI 0 50 100 150 200 250 300 350 400 0 10000 20000 30000 40000 time(s) I-EM-BCD-Greedy I-BPI (II-c) I-EM-BCD-Greedy, I-BPI 5-agent policing 500 600 700 800 900 1000 1100 0 5000 10000 15000 20000 time(s) I-EM I-EM-Greedy I-EM-BCD I-EM-BCD-Greedy 600 700 800 900 1000 1100 1200 0 5000 10000 15000 20000 time(s) I-EM-BCD I-BPI (I-d) EM methods (II-d) I-EM-BCD, I-BPI Figure 2: FSCs improve with time for I-POMDPi,1 in the (I-a) 5-agent tiger, (I-b) 2-agent money laundering, (I-c) 3-agent UAV, and (I-d) 5-agent policing contexts. Observe that BCD causes substantially larger improvements in the initial iterations until we are close to convergence. I-EM-BCD or its greedy variant converges significantly quicker than I-BPI to similar-valued FSCs for all four problem domains as shown in (II-a, b, c and d), respectively. All experiments were run on Linux with Intel Xeon 2.6GHz CPUs and 32GB RAM. for red team. We also evaluate a 3-agent UAV reconnaissance problem involving a UAV tasked with intercepting two fugitives in a 3x3 grid before they both reach the safe house [8]. It has 162 states for the UAV, 5 actions, 4 observations for each agent, and 200,400 models for the two fugitives. Finally, the recent policing protest problem is used in which police must maintain order in 3 designated protest sites populated by 4 groups of protesters who may be peaceful or disruptive [15]. It exhibits 27 states, 9 policing and 4 protesting actions, 8 observations, and 600 models per protesting group. The latter two domains are historically the largest test problems for self-interested planning. Comparative performance of all methods In Fig. 2-I(a-d), we compare the variants on all problems. Each method starts with a random seed, and the converged value is significantly better than a random FSC for all methods and problems. Increasing the sizes of FSCs gives better values in general but also increases time; using FSCs of sizes 5, 3, 9 and 5, for the 4 domains respectively demonstrated a good balance. We explored various coordinate block configurations eventually settling on 3 equal-sized blocks for both the tiger and ML, 5 blocks for UAV and 2 for policing protest. I-EM and the Greedy and BCD variants clearly exhibit an anytime property on the tiger, UAV and policing problems. The noncooperative ML shows delayed increases because we show the value of agent i’s controller and initial improvements in the other agent’s controller may maintain or decrease the value of i’s controller. This is not surprising due to competition in the problem. Nevertheless, after a small delay the values improve steadily which is desirable. I-EM-BCD consistently improves on I-EM and is often the fastest: the corresponding value improves by large steps initially (fast non-asymptotic rate of convergence). In the context of ML and UAV, I-EM-BCD-Greedy shows substantive improvements leading to controllers with much improved values compared to other approaches. Despite a low sample size of about 1,000 for the problems, I-EM-FFBS obtains FSCs whose values improve in general for tiger and ML, though slowly and not always to the level of others. This is because the EM gets caught in a worse local optima due 7 to sampling approximation – this strongly impacts the UAV problem; more samples did not escape these optima. However, forward filtering only (as used in Wu et al. [6]) required a much larger sample size to reach these levels. FFBS did not improve the controller in the fourth domain. Characterization of local optima While an exact solution for the smaller tiger problem with 5 agents (or the larger problems) could not be obtained for comparison, I-EM climbs to the optimal value of 8.51 for the downscaled 2-agent version (not shown in Fig. 2). In comparison, BPI does not get past the local optima of -10 using an identical-sized controller – corresponding controller predominantly contains listening actions – relying on adding nodes to eventually reach optimum. While we are unaware of any general technique to escape local convergence in EM, I-EM can reach the global optimum given an appropriate seed. This may not be a coincidence: the I-POMDP value function space exhibits a single fixed point – the global optimum – which in the context of Proposition 1 makes the likelihood function, Q(π i,l|πi,l), unimodal (if πi,l is appropriately sized as we do not have a principled way of adding nodes). If Q(π i,l|πi,l) is continuously differentiable for the domain on hand, Corollary 1 in Wu [16] indicates that πi,l will converge to the unique maximizer. Improvement on I-BPI We compare the quickest of the I-EM variants with previous best algorithm, I-BPI (Figs. 2-II(a-d)), allowing the latter to escape local optima as well by adding nodes. Observe that FSCs improved using I-EM-BCD converge to values similar to those of I-BPI almost two orders of magnitude faster. Beginning with 5 nodes, I-BPI adds 4 more nodes to obtain the same level of value as EM for the tiger problem. For money laundering, I-EM-BCD-Greedy converges to controllers whose value is at least 1.5 times better than I-BPI’s given the same amount of allocated time and less nodes. I-BPI failed to improve the seed controller and could not escape for the UAV and policing protest problems. To summarize, this makes I-EM variants with emphasis on BCD the fastest iterative approaches for infinite-horizon I-POMDPs currently. 6 Concluding Remarks The EM formulation of Section 3 builds on the EM for POMDP and differs drastically from the Eand M-steps for the cooperative DEC-POMDP [9]. The differences reflect how I-POMDPs build on POMDPs and differ from DEC-POMDPs. These begin with the structure of the DBNs where the DBN for I-POMDPi,1 in Fig. 1 adds to the DBN for POMDP hexagonal model nodes that contain candidate models; chance nodes for action; and model update edges for each other agent at each time step. This differs from the DBN for DEC-POMDP, which adds controller nodes for all agents and a joint observation chance node. The I-POMDP DBN contains controller nodes for the subject agent only, and each model node collapses into an efficient distribution on running EM at level 0. In domains where the joint reward function may be decomposed into factors encompassing subsets of agents, ND-POMDPs allow the value function to be factorized as well. Kumar et al. [17] exploit this structure by simply decomposing the whole DBN mixture into a mixture for each factor and iterating over the factors. Interestingly, the M-step may be performed individually for each agent and this approach scales beyond two agents. We exploit both graphical and problem structures to speed up and scale in a way that is contextual to I-POMDPs. BCD also decomposes the DBN mixture into equal blocks of horizons. While it has been applied in other areas [18, 19], these applications do not transfer to planning. Additionally, problem structure is considered by using FFBS that exploits information in the transition and observation distributions of the subject agent. FFBS could be viewed as a tenuous example of Monte Carlo EM, which is a broad category and also includes the forward sampling utilized by Wu et al. [6] for DEC-POMDPs. However, fundamental differences exist between the two: forward sampling may be run in simulation and does not require the transition and observation functions. Indeed, Wu et al. utilize it in a model free setting. FFBS is model based utilizing exact forward messages in the backward sampling phase. This reduces the accumulation of sampling errors over many time steps in extended DBNs, which otherwise afflicts forward sampling. The advance in this paper for self-interested multiagent planning has wider relevance to areas such as game play and ad hoc teams where agents model other agents. Developments in online EM for hidden Markov models [20] provide an interesting avenue to utilize inference for online planning. Acknowledgments This research is supported in part by a NSF CAREER grant, IIS-0845036, and a grant from ONR, N000141310870. We thank Akshat Kumar for feedback that led to improvements in the paper. 8 References [1] Ekhlas Sonu and Prashant Doshi. Scalable solutions of interactive POMDPs using generalized and bounded policy iteration. Journal of Autonomous Agents and Multi-Agent Systems, pages DOI: 10.1007/s10458–014–9261–5, in press, 2014. [2] Hagai Attias. Planning by probabilistic inference. In Ninth International Workshop on AI and Statistics (AISTATS), 2003. [3] Marc Toussaint and Amos J. Storkey. Probabilistic inference for solving discrete and continuous state markov decision processes. In International Conference on Machine Learning (ICML), pages 945–952, 2006. [4] Jeffrey A. Fessler and Alfred O. Hero. Space-alternating generalized expectationmaximization algorithm. IEEE Transactions on Signal Processing, 42:2664–2677, 1994. [5] P. Tseng. Convergence of block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 109:475–494, 2001. [6] Feng Wu, Shlomo Zilberstein, and Nicholas R. Jennings. Monte-carlo expectation maximization for decentralized POMDPs. In Twenty-Third International Joint Conference on Artificial Intelligence (IJCAI), pages 397–403, 2013. [7] Piotr J. Gmytrasiewicz and Prashant Doshi. A framework for sequential planning in multiagent settings. Journal of Artificial Intelligence Research, 24:49–79, 2005. [8] Yifeng Zeng and Prashant Doshi. Exploiting model equivalences for solving interactive dynamic influence diagrams. Journal of Artificial Intelligence Research, 43:211–255, 2012. [9] Akshat Kumar and Shlomo Zilberstein. Anytime planning for decentralized pomdps using expectation maximization. In Conference on Uncertainty in AI (UAI), pages 294–301, 2010. [10] Ankan Saha and Ambuj Tewari. On the nonasymptotic convergence of cyclic coordinate descent methods. SIAM Journal on Optimization, 23(1):576–601, 2013. [11] C. K. Carter and R. Kohn. Markov chainmonte carlo in conditionally gaussian state space models. Biometrika, 83:589–601, 1996. [12] Marc Toussaint, Laurent Charlin, and Pascal Poupart. Hierarchical POMDP controller optimization by likelihood maximization. In Twenty-Fourth Conference on Uncertainty in Artificial Intelligence (UAI), pages 562–570, 2008. [13] Prashant Doshi and Piotr J. Gmytrasiewicz. Monte Carlo sampling methods for approximating interactive POMDPs. Journal of Artificial Intelligence Research, 34:297–337, 2009. [14] Brenda Ng, Carol Meyers, KofiBoakye, and John Nitao. Towards applying interactive POMDPs to real-world adversary modeling. In Innovative Applications in Artificial Intelligence (IAAI), pages 1814–1820, 2010. [15] Ekhlas Sonu, Yingke Chen, and Prashant Doshi. Individual planning in agent populations: Anonymity and frame-action hypergraphs. In International Conference on Automated Planning and Scheduling (ICAPS), pages 202–211, 2015. [16] C. F. Jeff Wu. On the convergence properties of the em algorithm. Annals of Statistics, 11(1):95–103, 1983. [17] Akshat Kumar, Shlomo Zilberstein, and Marc Toussaint. Scalable multiagent planning using probabilistic inference. In International Joint Conference on Artificial Intelligence (IJCAI), pages 2140–2146, 2011. [18] S. Arimoto. An algorithm for computing the capacity of arbitrary discrete memoryless channels. IEEE Transactions on Information Theory, 18(1):14–20, 1972. [19] Jeffrey A. Fessler and Donghwan Kim. Axial block coordinate descent (ABCD) algorithm for X-ray CT image reconstruction. In International Meeting on Fully Three-dimensional Image Reconstruction in Radiology and Nuclear Medicine, volume 11, pages 262–265, 2011. [20] Olivier Cappe and Eric Moulines. Online expectation-maximization algorithm for latent data models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 71(3):593–613, 2009. 9 | 2015 | 249 |
5,757 | Efficient and Parsimonious Agnostic Active Learning Tzu-Kuo Huang Microsoft Research, NYC tkhuang@microsoft.com Alekh Agarwal Microsoft Research, NYC alekha@microsoft.com Daniel Hsu Columbia University djhsu@cs.columbia.edu John Langford Microsoft Research, NYC jcl@microsoft.com Robert E. Schapire Microsoft Research, NYC schapire@microsoft.com Abstract We develop a new active learning algorithm for the streaming setting satisfying three important properties: 1) It provably works for any classifier representation and classification problem including those with severe noise. 2) It is efficiently implementable with an ERM oracle. 3) It is more aggressive than all previous approaches satisfying 1 and 2. To do this, we create an algorithm based on a newly defined optimization problem and analyze it. We also conduct the first experimental analysis of all efficient agnostic active learning algorithms, evaluating their strengths and weaknesses in different settings. 1 Introduction Given a label budget, what is the best way to learn a classifier? Active learning approaches to this question are known to yield exponential improvements over supervised learning under strong assumptions [7]. Under much weaker assumptions, streaming-based agnostic active learning [2, 4, 5, 9, 18] is particularly appealing since it is known to work for any classifier representation and any label distribution with an i.i.d. data source.1 Here, a learning algorithm decides for each unlabeled example in sequence whether or not to request a label, never revisiting this decision. Restated then: What is the best possible active learning algorithm which works for any classifier representation, any label distribution, and is computationally tractable? Computational tractability is a critical concern, because most known algorithms for this setting [e.g., 2, 16, 18] require explicit enumeration of classifiers, implying exponentially-worse computational complexity compared to typical supervised learning algorithms. Active learning algorithms based on empirical risk minimization (ERM) oracles [4, 5, 13] can overcome this intractability by using passive classification algorithms as the oracle to achieve a computationally acceptable solution. Achieving generality, robustness, and acceptable computation has a cost. For the above methods [4, 5, 13], a label is requested on nearly every unlabeled example where two empirically good classifiers disagree. This results in a poor label complexity, well short of information-theoretic limits [6] even for general robust solutions [18]. Until now. In Section 3, we design a new algorithm called ACTIVE COVER (AC) for constructing query probability functions that minimize the probability of querying inside the disagreement region—the set of points where good classifiers disagree—and never query otherwise. This requires a new algorithm that maintains a parsimonious cover of the set of empirically good classifiers. The cover is a result of solving an optimization problem (in Section 4) specifying the properties of a desirable 1See the monograph of Hanneke [11] for an overview of the existing literature, including alternative settings where additional assumptions are placed on the data source (e.g., separability) [8, 3, 1]. 1 query probability function. The cover size provides a practical knob between computation and label complexity, as demonstrated by the complexity analysis we present in Section 4. Also in Section 3, we prove that AC effectively maintains a set of good classifiers, achieves good generalization error, and has a label complexity bound tighter than previous approaches. The label complexity bound depends on the disagreement coefficient [10], which does not completely capture the advantage of the algorithm. In the end of Section 3 we provide an example of a hard active learning problem where AC is substantially superior to previous tractable approaches. Together, these results show that AC is better and sometimes substantially better in theory. Do agnostic active learning algorithms work in practice? No previous works have addressed this question empirically. Doing so is important because analysis cannot reveal the degree to which existing classification algorithms effectively provide an ERM oracle. We conduct an extensive study in Section 5 by simulating the interaction of the active learning algorithm with a streaming supervised dataset. Results on a wide array of datasets show that agnostic active learning typically outperforms passive learning, and the magnitude of improvement depends on how carefully the active learning hyper-parameters are chosen. More details (theory, proofs and empirical evaluation) are in the long version of this paper [14]. 2 Preliminaries Let P be a distribution over X × {±1}, and let H ⊆{±1}X be a set of binary classifiers, which we assume is finite for simplicity.2 Let EX[·] denote expectation with respect to X ∼PX , the marginal of P over X. The expected error of a classifier h ∈H is err(h) := Pr(X,Y )∼P(h(X) ̸= Y ), and the error minimizer is denoted by h∗:= arg minh∈H err(h). The (importance weighted) empirical error of h ∈H on a multiset S of importance weighted and labeled examples drawn from X × {±1} × R+ is err(h, S) := P (x,y,w)∈S w · 1(h(x) ̸= y)/|S|. The disagreement region for a subset of classifiers A ⊆H is DIS(A) := {x ∈X | ∃h, h′ ∈A such that h(x) ̸= h′(x)}. The regret of a classifier h ∈H relative to another h′ ∈H is reg(h, h′) := err(h) −err(h′), and the analogous empirical regret on S is reg(h, h′, S) := err(h, S) −err(h′, S). When the second classifier h′ in (empirical) regret is omitted, it is taken to be the (empirical) error minimizer in H. A streaming-based active learner receives i.i.d. labeled examples (X1, Y1), (X2, Y2), . . . from P one at a time; each label Yi is hidden unless the learner decides on the spot to query it. The goal is to produce a classifier h ∈H with low error err(h), while querying as few labels as possible. In the IWAL framework [4], a decision whether or not to query a label is made randomly: the learner picks a probability p ∈[0, 1], and queries the label with that probability. Whenever p > 0, an unbiased error estimate can be produced using inverse probability weighting [12]. Specifically, for any classifier h, an unbiased estimator E of err(h) based on (X, Y ) ∼P and p is as follows: if Y is queried, then E = 1(h(X) ̸= Y )/p; else, E = 0. It is easy to check that E(E) = err(h). Thus, when the label is queried, we produce the importance weighted labeled example (X, Y, 1/p).3 3 Algorithm and Statistical Guarantees Our new algorithm, shown as Algorithm 1, breaks the example stream into epochs. The algorithm admits any epoch schedule so long as the epoch lengths satisfy τm−1 ≤2τm. For technical reasons, we always query the first 3 labels to kick-start the algorithm. At the start of epoch m, AC computes a query probability function Pm : X →[0, 1] which will be used for sampling the data points to query during the epoch. This is done by maintaining a few objects of interest during each epoch in Step 4: (1) the best classifier hm+1 on the sample ˜Zm collected so far, where ˜Zm has a mix of queried and predicted labels; (2) a radius ∆m, which is based on the level of concentration we want various empirical quantities to satisfy; and (3) the set Am+1 consisting of all the classifiers with empirical regret at most ∆m on ˜Zm. Within the epoch, Pm determines the probability of querying an example in the disagreement region for this set Am of “good” classifiers; examples outside this 2The assumption that H is finite can be relaxed to VC-classes using standard arguments. 3If the label is not queried, we produce an ignored example of weight zero; its only purpose is to maintain the correct count of querying opportunities. This ensures that 1/|S| is the correct normalization in err(h, S). 2 Algorithm 1 ACTIVE COVER (AC) input: Constants c1, c2, c3, confidence δ, error radius γ, parameters α, β, ξ for (OP), epoch schedule 0 = τ0 < 3 = τ1 < τ2 < τ3 < . . . < τM satisfying τm+1 ≤2τm for m ≥1. initialize: epoch m = 0, ˜Z0 := ∅, ∆0 := c1√ϵ1 + c2ϵ1 log 3, where ϵm := 32 log(|H|τm/δ)/τm. 1: Query the labels {Yi}3 i=1 of the first three unlabeled examples {Xi}3 i=1, and set A1 := H, P1 ≡Pmin,i = 1, and S = {(Xj, Yj, 1)}3 j=1. 2: for i = 4, . . . , n, do 3: if i = τm + 1 then 4: Set ˜Zm = ˜Zm−1 ∪S, and S = ∅. Let hm+1 := arg min h∈H err(h, ˜Zm), ∆m := c1 q ϵmerr(hm+1, ˜Zm) + c2ϵm log τm, and Am+1 := {h ∈H | err(h, ˜Zm) −err(hm+1, ˜Zm) ≤γ∆m}. 5: Compute the solution Pm+1(·) to the problem (OP) and increment m := m + 1. 6: end if 7: if next unlabeled point Xi ∈Dm := DIS(Am), then 8: Toss coin with bias Pm(Xi); add example (Xi, Yi, 1/Pm(Xi)) to S if outcome is heads, otherwise add (Xi, 1, 0) to S (see Footnote 3). 9: else 10: Add example with predicted label (Xi, hm(Xi), 1) to S. 11: end if 12: end for 13: Return hM+1 := arg minh∈H err(h, ˜ZM). region are not queried but given labels predicted by hm (so error estimates are not unbiased). AC computes Pm by solving the optimization problem (OP), which is further discussed below. The objective function of (OP) encourages small query probabilities in order to minimize the label complexity. The constraints (1) in (OP) bound the variance in our importance-weighted regret estimates for every h ∈H. This is key to ensuring good generalization as we will later use Bernsteinstyle bounds which rely on our random variables having a small variance. More specifically, the LHS of the constraints measures the variance in our empirical regret estimates for h, measured only on the examples in the disagreement region Dm. This is because the importance weights in the form of 1/Pm(X) are only applied to these examples; outside this region we use the predicted labels with an importance weight of 1. The RHS of the constraint consists of three terms. The first term ensures the feasibility of the problem, as P(X) ≡1/(2α2) for X ∈Dm will always satisfy the constraints. The second empirical regret term makes the constraints easy to satisfy for bad hypotheses—this is crucial to rule out large label complexities in case there are bad hypotheses that disagree very often with hm. A benefit of this is easily seen when −hm ∈H, which might have a terrible regret, but would force a near-constant query probability on the disagreement region if β = 0. Finally, the third term will be on the same order as the second one for hypotheses in Am, and is only included to capture the allowed level of slack in our constraints which will be exploited for the efficient implementation in Section 4. In addition to controlled variance, good concentration also requires the random variables of interest to be appropriately bounded. This is ensured through the constraints (2), which impose a minimum query probability on the disagreement region. Outside the disagreement region, we use the predicted label with an importance weight of 1, so that our estimates will always be bounded (albeit biased) in this region. Note that this optimization problem is written with respect to the marginal distribution of the data points PX, meaning that we might have infinitely many of the latter constraints. In Section 4, we describe how to solve this optimization problem efficiently, and using access to only unlabeled examples drawn from PX. Algorithm 1 requires several input parameters, which must satisfy: α ≥1, ξ ≤ 1 8nϵM log n, β2 ≤ 1 γnϵM log n, γ ≥216, c1 ≥2α √ 6, c2 ≥216c2 1, c3 ≥1. The first three parameters, α, β and ξ control the tightness of the variance constraints (1). The next three parameters γ, c1 and c2 control the threshold that defines the set of empirically good classifiers; c3 is used in the minimum probability (4) and can be simply set to 1. 3 Optimization Problem (OP) to compute Pm min P EX 1 1 −P(X) s.t. ∀h ∈H EX 1(h(x) ̸= hm(x) ∧x ∈Dm) P(X) ≤bm(h), (1) ∀x ∈X 0 ≤P(x) ≤1, and ∀x ∈Dm P(x) ≥Pmin,m (2) where Im h (X) = 1(h(x) ̸= hm(x) ∧x ∈Dm), bm(h) = 2α2EX[Im h (X)] + 2β2γreg(h, hm, ˜Zm−1)τm−1∆m−1 + ξτm−1∆2 m−1, (3) Pmin,m = min c3 q τm−1err(hm, ˜ Zm−1) nϵM + log τm−1 , 1 2 . (4) Epoch Schedules: The algorithm takes an arbitrary epoch schedule subject to τm < τm+1 ≤2τm. Two natural extremes are unit-length epochs, τm = m, and doubling epochs, τm+1 = 2τm. The main difference lies in the number of times (OP) is solved, which is a substantial computational consideration. Unless otherwise stated, we assume the doubling epoch schedule where the query probability and ERM classifier are recomputed only O(log n) times. Generalization and Label Complexity. We present guarantees on the generalization error and label complexity of Algorithm 1 assuming a solver for (OP), which we provide in the next section. Our first theorem provides a bound on generalization error. Define errm(h) := 1 τm m X j=1 (τj −τj−1)E(X,Y )∼P[1(h(X) ̸= Y ∧X ∈DIS(Aj))], ∆∗ 0 := ∆0 and ∆∗ m := c1 p ϵmerrm(h∗) + c2ϵm log τm for m ≥1. Essentially ∆∗ m is a population counterpart of the quantity ∆m used in Algorithm 1, and crucially relies on errm(h∗), the true error of h∗restricted to the disagreement region at epoch m. This quantity captures the inherent noisiness of the problem, and modulates the transition between O(1/√n) to O(1/n) type error bounds as we see next. Theorem 1. Pick any 0 < δ < 1/e such that |H|/δ > √ 192. Then recalling that h∗= arg minh∈H err(h), we have for all epochs m = 1, 2, . . . , M, with probability at least 1 −δ reg(h, h∗) ≤16γ∆∗ m for all h ∈Am+1, and (5) reg(h∗, hm+1, ˜Zm) ≤216∆m. (6) The proof is in Section 7.2.2 of [14]. Since we use γ ≥216, the bound (6) implies that h∗∈Am for all epochs m. This also maintains that all the predicted labels used by our algorithm are identical to those of h∗, since no disagreement amongst classifiers in Am was observed on those examples. This observation will be critical to our proofs, where we will exploit the fact that using labels predicted by h∗instead of observed labels on certain examples only introduces a bias in favor of h∗, thereby ensuring that we never mistakenly drop the optimal classifier from Am. The bound (5) shows that every classifier in Am+1 has a small regret to h∗. Since the ERM classifier hm+1 is always in Am+1, this yields our main generalization error bound on the classifier hτm+1 output by Algorithm 1. Additionally, it also clarifies the definition of the sets Am as the set of good classifiers: these are classifiers which indeed have small population regret relative to h∗. In a realizable setting where h∗ has zero error, ∆∗ m = ˜O(1/τm) leading to a ˜O(1/n) regret after n unlabeled examples are presented to the algorithm. On the other extreme, if errm(h∗) is a constant, then the regret is O(1/√n). There are also interesting regimes in between, where err(h∗) might be a constant, but errm(h∗) measured 4 over the disagreement region decreases rapidly. More specifically, we show in Appendix E of [14] that the expected regret of the classifier returned by Algorithm 1 achieves the optimal rate [6] under the Tsybakov [17] noise condition. Next, we provide a label complexity guarantee in terms of the disagreement coefficient [11]: θ = θ(h∗) := supr>0 PX {x | ∃h ∈H s.t. h∗(x) ̸= h(x), PX {x′ | h(x′) ̸= h∗(x′)} ≤r}/r. Theorem 2. With probability at least 1 −δ, the number of label queries made by Algorithm 1 after n examples over M epochs is 4θ errM(h∗)n + θ · ˜O( p nerrM(h∗) log(|H|/δ) + log(|H|/δ)). The theorem is proved in Appendix D of [14]. The first term of the label complexity bound is linear in the number of unlabeled examples, but can be quite small if θ is small, or if errM(h∗) ≈ 0—it is indeed 0 in the realizable setting. The second term grows at most as ˜O(√n), but also becomes a constant for realizable problems. Consequently, we attain a logarithmic label complexity in the realizable setting. In noisy settings, our label complexity improves upon that of predecessors such as [5, 13]. Beygelzimer et al. [5] obtain a label complexity of θ√n, exponentially worse for realizable problems. A related algorithm, Oracular CAL [13], has label complexity scaling with p nerr(h∗) but a worse dependence on θ. In all comparisons the use of errM(h∗) provides a qualitatively superior analysis to all previous results depending on err(h∗) since this captures the fact that noisy labels outside the disagreement region do not affect the label complexity. Finally, as in our regret analysis, we show in Appendix E of [14] that the label complexity of Algorithm 1 achieves the information-theoretically lower bound [6] under Tsybakov’s low-noise condition [17]. Section 4.2.2 of [14] gives an example where the label complexity of Algorithm 1 is significantly smaller than both IWAL and Oracular CAL by virtue of rarely querying in the disagreement region. The example considers a distribution and a classifier space with the following structure: (i) for most examples a single good classifier predicts differently from the remaining classifiers; (ii) on a few examples, half the classifiers predict one way and half the other. In the first case, little advantage is gained from a label because it provides evidence against only a single classifier. ACTIVE COVER queries over the disagreement region with a probability close to Pmin in case (i) and probability 1 in case (ii), while others query with probability Ω(1) everywhere implying O(√n) times more queries. 4 Efficient implementation The computation of hm is an ERM operation, which can be performed efficiently whenever an efficient passive learner is available. However, several other hurdles remain. Testing for x ∈DIS(Am) in the algorithm, as well as finding a solution to (OP) are considerably more challenging. The epoch schedule helps, but (OP) is still solved O(log n) times, necessitating an extremely efficient solver. Starting with the first issue, we follow Dasgupta et al. [9] who cleverly observed that x ∈Dm := DIS(Am) can be efficiently determined using a single call to an ERM oracle. Specifically, to apply their method, we use the oracle to find4 h′ = arg min{err(h, ˜Zm−1) | h ∈H, h(x) ̸= hm(x)}. It can then be argued that x ∈Dm = DIS(Am) if and only if the easily-measured regret of h′ (that is, reg(h′, hm, ˜Zm−1)) is at most γ∆m−1. Solving (OP) efficiently is a much bigger challenge because it is enormous: There is one variable P(x) for every point x ∈X, one constraint (1) for each classifier h and bound constraints (2) on P(x) for every x. This leads to infinitely many variables and constraints, with an ERM oracle being the only computational primitive available. We eliminate the bound constraints using barrier functions. Notice that the objective EX[1/(1 − P(x))] is already a barrier at P(x) = 1. To enforce the lower bound (2), we modify the objective to EX 1 1 −P(X) + µ2EX 1(X ∈Dm) P(X) , (7) where µ is a parameter chosen momentarily to ensure P(x) ≥Pmin,m for all x ∈Dm. Thus, the modified goal is to minimize (7) over non-negative P subject only to (1). We solve the problem in the dual where we have a large but finite number of optimization variables, and efficiently maximize the dual using coordinate ascent with access to an ERM oracle over H. Let λh ≥0 denote the 4 See Appendix F of [15] for how to deal with one constraint with an unconstrained oracle. 5 Algorithm 2 Coordinate ascent algorithm to solve (OP) input Accuracy parameter ε > 0. initialize λ ←0. 1: loop 2: Rescale: λ ←s · λ where s = arg maxs∈[0,1] D(s · λ). 3: Find ¯h = arg max h∈H EX Im h (X) Pλ(X) −bm(h). 4: if EX h Im ¯h (X) Pλ(X) i −bm(¯h) ≤ε then 5: return λ 6: else 7: Update λ¯h as λ¯h ←λ¯h + 2EX[Im ¯h (X)/Pλ(X)] −bm(¯h) EX[Im ¯h (X)/qλ(X)3] . 8: end if 9: end loop Lagrange multiplier for the constraint (1) for classifier h. Then for any λ, we can minimize the Lagrangian over each primal variable P(X) yielding the solution Pλ(x) = 1(x ∈Dm)qλ(x) 1 + qλ(x) , where qλ(x) = s µ2 + X h∈H λhIm h (x) (8) and Im h (x) = 1(h(x) ̸= hm(x) ∧x ∈Dm). Clearly, µ/(1 + µ) ≤Pλ(x) ≤1 for all x ∈Dm, so all the bound constraints (2) in (OP) are satisfied if we choose µ = 2Pmin,m. Plugging the solution Pλ into the Lagrangian, we obtain the dual problem of maximizing the dual objective D(λ) = EX 1(X ∈Dm)(1 + qλ(X))2 − X h∈H λhbm(h) + C0 (9) over λ ≥0. The constant C0 is equal to 1−Pr(Dm) where Pr(Dm) = Pr(X ∈Dm). An algorithm to approximately solve this problem is presented in Algorithm 2. The algorithm takes a parameter ε > 0 specifying the degree to which all of the constraints (1) are to be approximated. Since D is concave, the rescaling step can be solved using a straightforward numerical line search. The main implementation challenge is in finding the most violated constraint (Step 3). Fortunately, this step can be reduced to a single call to an ERM oracle. To see this, note that the constraint violation on classifier h can be written as EX Im h (X) P(X) −bm(h) = EX 1(X ∈Dm) 1 P(X) −2α2 1(h(X) ̸= hm(X)) −2β2γτm−1∆m−1(err(h, ˜Zm−1) −err(hm, ˜Zm−1)) −ξτm−1∆2 m−1. The second term of the right-hand expression is simply the scaled risk (classification error) of h with respect to the actual labels. The first term is the risk of h in predicting samples which have been labeled according to hm with importance weights of 1/P(x)−2α2 if x ∈Dm and 0 otherwise; note that these weights may be positive or negative. The last two terms do not depend on h. Thus, given access to PX (or samples approximating it, discussed shortly), the most violated constraint can be found by solving an ERM problem defined on the labeled samples in ˜Zm−1 and samples drawn from PX labeled by hm, with appropriate importance weights detailed in Appendix F.1 of [14]. When all primal constraints are approximately satisfied, the algorithm stops. We have the following guarantee on the convergence of the algorithm. Theorem 3. When run on the m-th epoch, Algorithm 2 halts in at most Pr(Dm)/(8P 3 min,mε2) iterations and outputs a solution ˆλ ≥0 such that Pˆλ satisfies the simple bound constraints in (2) exactly, the variance constraints in (1) up to an additive factor of ε, and EX 1 1 −Pˆλ(X) ≤EX 1 1 −P ∗(X) + 4Pmin,mPr(Dm), (10) where P ∗is the solution to (OP). Furthermore, ∥ˆλ∥1 ≤Pr(Dm)/ε. If ε is set to ξ2τm−1∆2 m−1, an amount of constraint violation tolerable in our analysis, the number of iterations (hence the number of ERM oracle calls) in Theorem 3 is at most O(τ 2 m−1). The proof is in Appendix F.2 of [14]. 6 Table 1: Summary of performance metrics OAC IWAL0 IWAL1 ORA-OAC ORAIWAL0 ORAIWAL1 PASSIVE AUC-GAIN∗ 0.151 0.150 0.142 0.125 0.115 0.121 0.095 AUC-GAIN 0.065 0.085 0.081 0.078 0.073 0.075 0.072 Solving (OP) with expectation over samples: So far we considered solving (OP) defined on the unlabeled data distribution PX , which is unavailable in practice. A natural substitute for PX is an i.i.d. sample drawn from it. In Appendix F.3 of [14] we show that solving a properly-defined sample variant of (OP) leads to a solution to the original (OP) with similar guarantees as in Theorem 3. 5 Experiments with Agnostic Active Learning While AC is efficient in the number of ERM oracle calls, it needs to store all past examples, resulting in large space complexity. As Theorem 3 suggests, the query probability function (8) may need as many as O(τ 2 i ) classifiers, further increasing storage demand. Aiming at scalable implementation, we consider an online approximation of AC, given in Section 6.1 of [14]. The main differences from AC are: (1) instead of a batch ERM oracle, it invokes an online oracle; and (2) instead of repeatedly solving (OP) from scratch, it maintains a fixed-size set of classifiers (and hence non-zero dual variables), called the cover, for representing the query probability, and updates the cover with every new example in a manner similar to the coordinate ascent algorithm for solving (OP). We conduct an empirical comparison of the following efficient agnostic active learning algorithms: OAC: Online approximation of ACTIVE COVER (Algorithm 3 in Section 6.1 of [14]). IWAL0 and IWAL1: The algorithm of [5] and a variant that uses a tighter threshold. ORA-OAC, ORA-IWAL0, and ORA-IWAL1: Oracular-CAL [13] versions of OAC, IWAL0 and IWAL1. PASSIVE: Passive learning on a labeled sub-sample drawn uniformly at random. Details about these algorithms are in Section 6.2 of [14]. The high-level differences among these algorithms are best explained in the context of the disagreement region: OAC does importanceweighted querying of labels with an optimized query probability in the disagreement region, while using predicted labels outside; IWAL0 and IWAL1 maintain a non-zero minimum query probability everywhere; ORA-OAC, ORA-IWAL0 and ORA-IWAL1 query labels in their respective disagreement regions with probability 1, using predicted labels otherwise. We implemented these algorithms in Vowpal Wabbit (http://hunch.net/˜vw/), a fast learning system based on online convex optimization, using logistic regression as the ERM oracle. We performed experiments on 22 binary classification datasets with varying sizes (103 to 106) and diverse feature characteristics. Details about the datasets are in Appendix G.1 of [14]. Our goal is to evaluate the test error improvement per label query achieved by different algorithms. To simulate the streaming setting, we randomly permuted the datasets, ran the active learning algorithms through the first 80% of data, and evaluated the learned classifiers on the remaining 20%. We repeated this process 9 times to reduce variance due to random permutation. For each active learning algorithm, we obtain the test error rates of classifiers trained at doubling numbers of label queries starting from 10 to 10240. Formally, let errora,p(d, j, q) denote the test error of the classifier returned by algorithm a using hyper-parameter setting p on the j-th permutation of dataset d immediately after hitting the q-th label budget, 10·2(q−1), 1 ≤q ≤11. Let querya,p(d, j, q) be the actual number of label queries made, which can be smaller than 10 · 2(q−1) when algorithm a reaches the end of the training data before hitting that label budget. To evaluate an algorithm, we consider the area under its curve of test error against log number of label queries: AUCa,p(d, j) = 1 2 10 X q=1 errora,p(d, j, q + 1) + errora,p(d, j, q) · log2 querya,p(d, j, q + 1) querya,p(d, j, q) . A good active learning algorithm has a small value of AUC, which indicates that the test error decreases quickly as the number of label queries increases. We use a logarithmic scale for the number of label queries to focus on the performance with few label queries where active learning is the most relevant. More details about hyper-parameters are in Appendix G.2 of [14]. 7 number of label queries 10 1 10 2 10 3 10 4 relative improvement in test error -0.2 -0.1 0 0.1 0.2 OAC IWAL0 IWAL1 ORA-OAC ORA-IWAL0 ORA-IWAL1 PASSIVE baseline (a) Best hyper-parameter per dataset number of label queries 10 1 10 2 10 3 10 4 relative improvement in test error -0.2 -0.1 0 0.1 0.2 OAC IWAL0 IWAL1 ORA-OAC ORA-IWAL0 ORA-IWAL1 PASSIVE baseline (b) Best fixed hyper-parameter Figure 1: Average relative improvement in test error v.s. number of label queries We measure the performance of each algorithm a by the following two aggregated metrics: AUC-GAIN∗(a) := mean d max p median 1≤j≤9 AUCbase(d, j) −AUCa,p(d, j) AUCbase(d, j) , AUC-GAIN(a) := max p mean d median 1≤j≤9 AUCbase(d, j) −AUCa,p(d, j) AUCbase(d, j) , where AUCbase denotes the AUC of PASSIVE using a default hyper-parameter setting, i.e., a learning rate of 0.4 (see Appendix G.2 of [14]). The first metric shows the maximal gain each algorithm achieves with the best hyper-parameter setting for each dataset, while the second shows the gain by using the single hyper-parameter setting that performs the best on average across datasets. Results and Discussions. Table 1 gives a summary of the performances of different algorithms. When using hyper-parameters optimized on a per-dataset basis (top row in Table 1), OAC achieves the largest improvement over the PASSIVE baseline, with IWAL0 achieving almost the same improvement and IWAL1 improving slightly less. Oracular-CAL variants perform worse, but still do better than PASSIVE with the best learning rate for each dataset, which leads to an average of 9.5% improvement in AUC over the default learning rate. When using the best fixed hyper-parameter setting across all datasets (bottom row in Table 1), all active learning algorithms achieve less improvement compared with PASSIVE (7% improvement with the best fixed learning rate). In particular, OAC gets only 6.5% improvement. This suggests that careful tuning of hyper-parameters is critical for OAC and an important direction for future work. Figure 1(a) describes the behaviors of different algorithms in more detail. For each algorithm a we identify the best fixed hyper-parameter setting p∗:= arg max p mean d median 1≤j≤9 AUCbase(d, j) −AUCa,p(d, j) AUCbase(d, j) , (11) and plot the relative test error improvement by a using p∗averaged across all datasets at the 11 label budgets: 10 · 2(q−1), mean d median 1≤j≤9 errorbase(d, j, q) −errora,p∗(d, j, q) errorbase(d, j, q) 11 q=1 . (12) All algorithms, including PASSIVE, perform similarly during the first few hundred label queries. IWAL0 performs the best at label budgets larger than 80, while IWAL1 does almost as well. ORAOAC is the next best, followed by ORA-IWAL1 and ORA-IWAL0. OAC performs worse than PASSIVE except at label budgets between 320 and 1280. In Figure 1(b),we plot results obtained by each algorithm a using the best hyper-parameter setting for each dataset d: p∗ d := arg max p median 1≤j≤9 AUCbase(d, j) −AUCa,p(d, j) AUCbase(d, j) . (13) As expected, all algorithms perform better, but OAC benefits the most from using the best hyperparameter setting per dataset. Appendix G.3 of [14] gives more detailed results, including test error rates obtained by all algorithms at different label query budgets for individual datasets. In sum, when using the best fixed hyper-parameter setting, IWAL0 outperforms other algorithms. When using the best hyper-parameter setting tuned for each dataset, OAC and IWAL0 perform equally well and better than other algorithms. 8 References [1] Maria-Florina Balcan and Phil Long. Active and passive learning of linear separators under log-concave distributions. In Conference on Learning Theory, pages 288–316, 2013. [2] Maria-Florina Balcan, Alina Beygelzimer, and John Langford. Agnostic active learning. In Proceedings of the 23rd international conference on Machine learning, pages 65–72. ACM, 2006. [3] Maria-Florina Balcan, Andrei Broder, and Tong Zhang. Margin based active learning. In Proceedings of the 20th annual conference on Learning theory, pages 35–50. Springer-Verlag, 2007. [4] A. Beygelzimer, S. Dasgupta, and J. Langford. Importance weighted active learning. In ICML, 2009. [5] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [6] R.M. Castro and R.D. Nowak. Minimax bounds for active learning. Information Theory, IEEE Transactions on, 54(5):2339 –2353, 2008. [7] D. Cohn, L. Atlas, and R. Ladner. Improving generalization with active learning. Machine Learning, 15:201–221, 1994. [8] S. Dasgupta. Coarse sample complexity bounds for active learning. In Advances in Neural Information Processing Systems 18, 2005. [9] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. In NIPS, 2007. [10] S. Hanneke. Theoretical Foundations of Active Learning. PhD thesis, Carnegie Mellon University, 2009. [11] Steve Hanneke. Theory of disagreement-based active learning. Foundations and Trends in Machine Learning, 7(2-3):131–309, 2014. [12] D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. J. Amer. Statist. Assoc., 47:663–685, 1952. ISSN 0162-1459. [13] Daniel J. Hsu. Algorithms for Active Learning. PhD thesis, University of California at San Diego, 2010. [14] Tzu-Kuo Huang, Alekh Agarwal, Daniel J Hsu, John Langford, and Robert E Schapire. Efficient and parsimonious agnostic active learning. arXiv preprint arXiv:1506.08669, 2015. [15] Nikos Karampatziakis and John Langford. Online importance weight aware updates. In UAI 2011, Proceedings of the Twenty-Seventh Conference on Uncertainty in Artificial Intelligence, Barcelona, Spain, July 14-17, 2011, pages 392–399, 2011. [16] Vladimir Koltchinskii. Rademacher complexities and bounding the excess risk in active learning. J. Mach. Learn. Res., 11:2457–2485, December 2010. [17] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Ann. Statist., 32: 135–166, 2004. [18] Chicheng Zhang and Kamalika Chaudhuri. Beyond disagreement-based agnostic active learning. In Advances in Neural Information Processing Systems, pages 442–450, 2014. 9 | 2015 | 25 |
5,758 | Expectation Particle Belief Propagation Thibaut Lienart, Yee Whye Teh, Arnaud Doucet Department of Statistics University of Oxford Oxford, UK {lienart,teh,doucet}@stats.ox.ac.uk Abstract We propose an original particle-based implementation of the Loopy Belief Propagation (LPB) algorithm for pairwise Markov Random Fields (MRF) on a continuous state space. The algorithm constructs adaptively efficient proposal distributions approximating the local beliefs at each note of the MRF. This is achieved by considering proposal distributions in the exponential family whose parameters are updated iterately in an Expectation Propagation (EP) framework. The proposed particle scheme provides consistent estimation of the LBP marginals as the number of particles increases. We demonstrate that it provides more accurate results than the Particle Belief Propagation (PBP) algorithm of [1] at a fraction of the computational cost and is additionally more robust empirically. The computational complexity of our algorithm at each iteration is quadratic in the number of particles. We also propose an accelerated implementation with sub-quadratic computational complexity which still provides consistent estimates of the loopy BP marginal distributions and performs almost as well as the original procedure. 1 Introduction Undirected Graphical Models (also known as Markov Random Fields) provide a flexible framework to represent networks of random variables and have been used in a large variety of applications in machine learning, statistics, signal processing and related fields [2]. For many applications such as tracking [3, 4], sensor networks [5, 6] or computer vision [7, 8, 9] it can be beneficial to define MRF on continuous state-spaces. Given a pairwise MRF, we are here interested in computing the marginal distributions at the nodes of the graph. A popular approach to do this is to consider the Loopy Belief Propagation (LBP) algorithm [10, 11, 2]. LBP relies on the transmission of messages between nodes. However when dealing with continuous random variables, computing these messages exactly is generally intractable. In practice, one must select a way to tractably represent these messages and a way to update these representations following the LBP algorithm. The Nonparametric Belief Propagation (NBP) algorithm [12] represents the messages with mixtures of Gaussians while the Particle Belief Propagation (PBP) algorithm [1] uses an importance sampling approach. NBP relies on restrictive integrability conditions and does not offer consistent estimators of the LBP messages. PBP offers a way to circumvent these two issues but the implementation suggested proposes sampling from the estimated beliefs which need not be integrable. Moreover, even when they are integrable, sampling from the estimated beliefs is very expensive computationally. Practically the authors of [1] only sample approximately from those using short MCMC runs, leading to biased estimators. In our method, we consider a sequence of proposal distributions at each node from which one can sample particles at a given iteration of the LBP algorithm. The messages are then computed using importance sampling. The novelty of the approach is to propose a principled and automated way of designing a sequence of proposals in a tractable exponential family using the Expectation Prop1 agation (EP) framework [13]. The resulting algorithm, which we call Expectation Particle Belief Propagation (EPBP), does not suffer from restrictive integrability conditions and sampling is done exactly which implies that we obtain consistent estimators of the LBP messages. The method is empirically shown to yield better approximations to the LBP beliefs than the implementation suggested in [1], at a much reduced computational cost, and than EP. 2 Background 2.1 Notations We consider a pairwise MRF, i.e. a distribution over a set of p random variables indexed by a set V = {1, . . . , p}, which factorizes according to an undirected graph G = (V, E) with p(xV ) ∝ Y u∈V ψu(xu) Y (u,v)∈E ψuv(xu, xv). (1) The random variables are assumed to take values on a continuous, possibly unbounded, space X. The positive functions ψu : X 7→R+ and ψuv : X × X 7→R+ are respectively known as the node and edge potentials. The aim is to approximate the marginals pu(xu) for all u ∈V . A popular approach is the LBP algorithm discussed earlier. This algorithm is a fixed point iteration scheme yielding approximations called the beliefs at each node [10, 2]. When the underlying graph is a tree, the resulting beliefs can be shown to be proportional to the exact marginals. This is not the case in the presence of loops in the graph. However, even in these cases, LBP has been shown to provide good approximations in a wide range of situations [14, 11]. The LBP fixed-point iteration can be written as follows at iteration t: mt uv(xv) = Z ψuv(xu, xv)ψu(xu) Y w∈Γu\v mt−1 wu (xu)dxu Bt u(xu) = ψu(xu) Y w∈Γu mt wu(xu) , (2) where Γu denotes the neighborhood of u i.e., the set of nodes {w | (w, u) ∈E}, muv is known as the message from node u to node v and Bu is the belief at node u. 2.2 Related work The crux of any generic implementation of LBP for continuous state spaces is to select a way to represent the messages and design an appropriate method to compute/approximate the message update. In Nonparametric BP (NBP) [12], the messages are represented by mixtures of Gaussians. In theory, computing the product of such messages can be done analytically but in practice this is impractical due to the exponential growth in the number of terms to consider. To circumvent this issue, the authors suggest an importance sampling approach targeting the beliefs and fitting mixtures of Gaussians to the resulting weighted particles. The computation of the update (2) is then always done over a constant number of terms. A restriction of “vanilla” Nonparametric BP is that the messages must be finitely integrable for the message representation to make sense. This is the case if the following two conditions hold: sup xv Z ψuv(xu, xv)dxu < ∞, and Z ψu(xu)dxu < ∞. (3) These conditions do however not hold in a number of important cases as acknowledged in [3]. For instance, the potential ψu(xu) is usually proportional to a likelihood of the form p(yu|xu) which need not be integrable in xu. Similarly, in imaging applications for example, the edge potential can encode similarity between pixels which also need not verify the integrability condition as in [15]. Further, NBP does not offer consistent estimators of the LBP messages. Particle BP (PBP) [1] offers a way to overcome the shortcomings of NBP: the authors also consider importance sampling to tackle the update of the messages but without fitting a mixture of Gaussians. 2 For a chosen proposal distribution qu on node u and a draw of N particles {x(i) u }N i=1 ∼qu(xu), the messages are represented as mixtures: bmPBP uv (xv) := N X i=1 ω(i) uvψuv(x(i) u , xv), with ω(i) uv := 1 N ψu(x(i) u ) qu(x(i) u ) Y w∈Γu\v bmPBP wu (x(i) u ). (4) This algorithm has the advantage that it does not require the conditions (3) to hold. The authors suggest two possible choices of sampling distributions: sampling from the local potential ψu, or sampling from the current belief estimate. The first case is only valid if ψu is integrable w.r.t. xu which, as we have mentioned earlier, might not be the case in general and the second case implies sampling from a distribution of the form bBPBP u (xu) ∝ψu(xu) Y w∈Γu bmPBP wu (xu) (5) which is a product of mixtures. As in NBP, na¨ıve sampling of the proposal has complexity O(N |Γu|) and is thus in general too expensive to consider. Alternatively, as the authors suggest, one can run a short MCMC simulation targeting it which reduces the complexity to order O(|Γu|N 2) since the cost of each iteration, which requires evaluating bBPBP u point-wise, is of order O(|Γu|N), and we need O(N) iterations of the MCMC simulation. The issue with this approach is that it is still computationally expensive, and it is unclear how many iterations are necessary to get N good samples. 2.3 Our contribution In this paper, we consider the general context where the edge and node-potentials might be nonnormalizable and non-Gaussian. Our proposed method is based on PBP, as PBP is theoretically better suited than NBP since, as discussed earlier, it does not require the conditions (3) to hold, and, provided that one samples from the proposals exactly, it yields consistent estimators of the LBP messages while NBP does not. Further, the development of our method also formally shows that considering proposals close to the beliefs, as suggested by [1], is a good idea. Our core observation is that since sampling from a proposal of the form (5) using MCMC simulation is very expensive, we should consider using a more tractable proposal distribution instead. However it is important that the proposal distribution is constructed adaptively, taking into account evidence collected through the message passing itself, and we propose to achieve this by using proposal distributions lying in a tractable exponential family, and adapted using the Expectation Propagation (EP) framework [13]. 3 Expectation Particle Belief Propagation Our aim is to address the issue of selecting the proposals in the PBP algorithm. We suggest using exponential family distributions as the proposals on a node for computational efficiency reasons, with parameters chosen adaptively based on current estimates of beliefs and EP. Each step of our algorithm involves both a projection onto the exponential family as in EP, as well as a particle approximation of the LBP message, hence we will refer to our method as Expectation Particle Belief Propagation or EPBP for short. For each pair of adjacent nodes u and v, we will use muv(xv) to denote the exact (but unavailable) LBP message from u to v, bmuv(xv) to denote the particle approximation of muv, and ηuv an exponential family projection of bmuv. In addition, let η◦u denote an exponential family projection of the node potential ψu. We will consider approximations consisting of N particles. In the following, we will derive the form of our particle approximated message bmuv(xv), along with the choice of the proposal distribution qu(xu) used to construct bmuv. Our starting point is the edge-wise belief over xu and xv, given the incoming particle approximated messages, bBuv(xu, xv) ∝ψuv(xu, xv)ψu(xu)ψv(xv) Y w∈Γu\v bmwu(xu) Y ν∈Γv\u bmνv(xv). (6) The exact LBP message muv(xv) can be derived by computing the marginal distribution bBuv(xv), and constructing muv(xv) such that bBuv(xv) ∝muv(xv)c Mvu(xv), (7) 3 where c Mvu(xv) = ψv(xv) Q ν∈Γv\u bmνv(xv) is the (particle approximated) pre-message from v to u. It is easy to see that the resulting message is as expected, muv(xv) ∝ Z ψuv(xu, xv)ψu(xu) Y w∈Γu\v bmwu(xu)dxu. (8) Since the above exact LBP belief and message are intractable in our scenario of interest, the idea is to use an importance sampler targeting bBuv(xu, xv) instead. Consider a proposal distribution of the form qu(xu)qv(xv). Since xu and xv are independent under the proposal, we can draw N independent samples, say {x(i) u }N i=1 and {x(j) v }N j=1, from qu and qv respectively. We can then approximate the belief using a N × N cross product of the particles, bBuv(xu, xv) ≈ 1 N 2 N X i,j=1 bBuv(x(i) u , x(j) v ) qu(x(i) u )qv(x(j) v ) δ(x(i) u ,x(j) v )(xu, xv) (9) ∝1 N 2 N X i,j=1 ψuv(x(i) u , x(j) v )ψu(x(i) u )c Mvu(x(j) v ) Q w∈Γu\v bmwu(x(i) u ) qu(x(i) u )qv(x(j) v ) δ(x(i) u ,x(j) v )(xu, xv) Marginalizing onto xv, we have the following particle approximation to bBuv(xv), bBuv(xv) ≈1 N N X j=1 bmuv(x(j) v )c Mvu(x(j) v ) qv(x(j) v ) δx(j) v (xv) (10) where the particle approximated message bmuv(xv) from u to v has the form of the message representation in the PBP algorithm (4). To determine sensible proposal distributions, we can find qu and qv that are close to the target bBuv. Using the KL divergence KL( bBuv∥quqv) as the measure of closeness, the optimal qu required for the u to v message is the node belief, bBuv(xu) ∝ψu(xu) Y w∈Γu bmwu(xu) (11) thus supporting the claim in [1] that a good proposal to use is the current estimate of the node belief. As pointed out in Section 2, it is computationally inefficient to use the particle approximated node belief as the proposal distribution. An idea is to use a tractable exponential family distribution for qu instead, say qu(xu) ∝η◦u(xu) Y w∈Γu ηwu(xu) (12) where η◦u and ηwu are exponential family approximations of ψu and bmwu respectively. In Section 4 we use a Gaussian family, but we are not limited to this. Using the framework of expectation propogation (EP) [13], we can iteratively find good exponential family approximations as follows. For each w ∈Γu, to update the ηwu, we form the cavity distribution q\w u ∝qu/ηwu and the corresponding tilted distribution bmwuq\w u . The updated η+ wu is the exponential family factor minimising the KL divergence, η+ wu = arg min η∈exp.fam. KL h bmwu(xu)q\w u (xu)
η(xu)q\w u (xu) i . (13) Geometrically, the update projects the tilted distribution onto the exponential family manifold. The optimal solution requires computing the moments of the tilted distribution through numerical quadrature, and selecting ηwu so that ηwuq\w u matches the moments of the tilted distribution. In our scenario the moment computation can be performed crudely on a small number of evaluation points since it only concerns the updating of the importance sampling proposal. If an optimal η in the exponential family does not exist, e.g. in the Gaussian case that the optimal η has a negative variance, we simply revert ηwu to its previous value [13]. An analogous update is used for η◦u. In the above derivation, the expectation propagation steps for each incoming message into u and for the node potential are performed first, to fit the proposal to the current estimated belief at u, before 4 it is used to draw N particles, which can then be used to form the particle approximated messages from u to each of its neighbours. Alternatively, once each particle approximated message bmuv(xv) is formed, we can update its exponential family projection ηuv(xv) immediately. This alternative scheme is described in Algorithm 1. Algorithm 1 Node update 1: sample {x(i) u } ∼qu( · ) 2: compute bBu(x(i) u ) = ψu(x(i) u ) Q w∈Γu bmwu(x(i) u ) 3: for v ∈Γu do 4: compute c Muv(x(i) u ) := bBu(x(i) u )/ bmvu(x(i) u ) 5: compute the normalized weights w(i) uv ∝c Muv(x(i) u )/qu(x(i) u ) 6: update the estimator of the outgoing message bmuv(xv) = PN i=1 w(i) uvψuv(x(i) u , xv) 7: compute the cavity distribution q\◦ v ∝qv/η◦v, get η+ ◦v in the exponential family such that η+ ◦vq\◦ v approximates ψvq\◦ v , update qv ∝η+ ◦v and let η◦v ←η+ ◦v 8: compute the cavity distribution q\u v ∝qv/ηuv, get η+ uv in the exponential family such that η+ uvq\u v approximates bmuvq\u v , update qv ∝η+ uv and let ηuv ←η+ uv 9: end for 3.1 Computational complexity and sub-quadratic implementation Each EP projection step costs O(N) computations since the message bmwu is a mixture of N components (see (4)). Drawing N particles from the exponential family proposal qu costs O(N). The step with highest computational complexity is in evaluating the particle weights in (4). Indeed, evaluating the mixture representation of a message on a single point is O(N), and we need to compute this for each of N particles. Similarly, evaluating the estimator of the belief on N sampling points at node u requires O(|Γu|N 2). This can be reduced since the algorithm still provides consistent estimators if we consider the evaluation of unbiased estimators of the messages instead. Since the messages have the form bmuv(xv) = PN i=1 wi uvψi uv(xv), we can follow a method presented in [16] where one draws M indices {i⋆ ℓ}M ℓ=1 from a multinomial with weights {wi uv}N i=1 and evaluates the corresponding M components ψi⋆ ℓ uv. This reduces the cost of the evaluation of the beliefs to O(|Γu|MN) which leads to an overall sub-quadratic complexity if M is o(N). We show in the next section how it compares to the quadratic implementation when M = O(log N). 4 Experiments We investigate the performance of our method on MRFs for two simple graphs. This allows us to compare the performance of EPBP to the performance of PBP in depth. We also illustrate the behavior of the sub-quadratic version of EPBP. Finally we show that EPBP provides good results in a simple denoising application. 4.1 Comparison with PBP We start by comparing EPBP to PBP as implemented by Ihler et al. on a 3 × 3 grid (figure 1) with random variables taking values on R. The node and edge potentials are selected such that the marginals are multimodal, non-Gaussian and skewed with ψu(xu) = α1N(xu −yu; −2, 1) + α2G(xu −yu; 2, 1.3) ψuv(xu, xv) = L(xu −xv; 0, 2) , (14) where yu denotes the observation at node u, N(x; µ, σ) ∝exp(−x2/2σ2) (density of a Normal distribution), G(x; µ, β) ∝exp(−(x−µ)/β+exp(−(x−µ)/β)) (density of a Gumbel distribution) and L(x; µ, β) ∝exp(−|x −µ|/β) (density of a Laplace distribution). The parameters α1 and α2 are respectively set to 0.6 and 0.4. We compare the two methods after 20 LBP iterations.1 1The scheduling used alternates between the classical orderings: top-down-left-right, left-right-top-down, down-up-right-left and right-left-down-up. One “LBP iteration” implies that all nodes have been updated once. 5 1 2 3 4 5 6 7 8 9 5 8 7 6 4 1 3 2 Figure 1: Illustration of the grid (left) and tree (right) graphs used in the experiments. PBP as presented in [1] is implemented using the same parameters than those in an implementation code provided by the authors: the proposal on each node is the last estimated belief and sampled with a 20-step MCMC chain, the MH proposal is a normal distribution. For EPBP, the approximation of the messages are Gaussians. The ground truth is approximated by running LBP on a deterministic equally spaced mesh with 200 points. All simulations were run with Julia on a Mac with 2.5 GHz Intel Core i5 processor, our code is available online.2 Figure 2 compares the performances of both methods. The error is computed as the mean L1 error over all nodes between the estimated beliefs and the ground truth evaluated over the same deterministic mesh. One can observe that not only does PBP perform worse than EPBP but also that the error plateaus with increasing number of samples. This is because the secondampling within PBP is done approximately and hence the consistency of the estimators is lost. The speed-up offered by EPBP is very substantial (figure 4 left). Hence, although it would be possible to use more MCMC (Metropolis-Hastings) iterations within PBP to improve its performance, it would make the method prohibitively expensive to use. Note that for EPBP, one observes the usual 1/ √ N convergence of particle methods. Figure 3 compares the estimator of the beliefs obtained by the two methods for three arbitrarily picked nodes (node 1, 5 and 9 as illustrated on figure 1). The figure also illustrates the last proposals constructed with our approach and one notices that their supports match closely the support of the true beliefs. Figure 4 left illustrates how the estimated beliefs converge as compared to the true beliefs with increasing number of iterations. One can observe that PBP converges more slowly and that the results display more variability which might be due to the MCMC runs being too short. We repeated the experiments on a tree with 8 nodes (figure 1 right) where we know that, at convergence, the beliefs computed using BP are proportional to the true marginals. The node and edge potentials are again picked such that the marginals are multimodal with ψu(xu) = α1N(xu −yu; −2, 1) + α2N(xu −yu; 1, 0.5) ψuv(xu, xv) = L(xu −xv; 0, 1) , (15) with α1 = 0.3 and α2 = 0.7. On this example, we also show how “pure EP” with normal distributions performs. We also try using the distributions obtained with EP as proposals for PBP (referred to as “PBP after EP” in figures). Both methods underperform compared to EPBP as illustrated visually in Figure 5. In particular one can observe in Figure 3 that “PBP after EP” converges slower than EPBP with increasing number of samples. 4.2 Sub-quadratic implementation and denoising application As outlined in Section 3.1, in the implementation of EPBP one can use an unbiased estimator of the edge weights based on a draw of M components from a multinomial. The complexity of the resulting algorithm is O(MN). We apply this method to the 3 × 3 grid example in the case where M is picked to be roughly of order log(N): i.e., for N = {10, 20, 50, 100, 200, 500}, we pick M = {5, 6, 8, 10, 11, 13}. The results are illustrated in Figure 6 where one can see that the N log N implementation compares very well to the original quadratic implementation at a much reduced cost. We apply this sub-quadratic method on a simple probabilistic model for an image denoising problem. The aim of this example is to show that the method can be applied to larger graphs and still provide good results. The model underlined is chosen to showcase the flexibility and applicability of our method in particular when the edge-potential is non-integrable. It is not claimed to be an optimal approach to image denoising.3 The node and edge potentials are defined as follows: ψu(xu) = N(xu −yu; 0, 0.1) ψuv(xu, xv) = Lλ(xu −xv; 0, 0.03) , (16) 2https://github.com/tlienart/EPBP. 3In this case in particular, an optimization-based method such as [17] is likely to yield better results. 6 where Lλ(x; µ, β) = L(x; µ, β) if |x| ≤λ and L(λ; µ, β) otherwise. In this example we set λ = 0.2. The value assigned to each pixel of the reconstruction is the estimated mean obtained over the corresponding node (figure 7). The image has size 50 × 50 and the simulation was run with N = 30 particles per nodes, M = 5 and 10 BP iterations taking under 2 minutes to complete. We compare it with the result obtained with EP on the same model. Number of samples per node 101 102 103 Mean L1 error 10-2 10-1 100 PBP EPBP Number of samples per node 101 102 103 Mean L1 error 10-2 10-1 100 EPBP PBP after EP Figure 2: (left) Comparison of the mean L1 error for PBP and EPBP for the 3 × 3 grid example. (right) Comparison of the mean L1 error for “PBP after EP” and EPBP for the tree example. In both cases, EPBP is more accurate for the same number of samples. -5 0 5 10 15 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 -5 0 5 10 15 0 0.1 0.2 0.3 0.4 0.5 0.6 -5 0 5 10 15 0 0.05 0.1 0.15 0.2 0.25 0.3 True belief Estimated belief (EPBP) Estimated belief (PBP) Proposal (EPBP) Figure 3: Comparison of the beliefs on node 1, 5 and 9 as obtained by evaluating LBP on a deterministic mesh (true belief), with PBP and with EPBP for the 3 × 3 grid example. The proposal used by EPBP at the last step is also illustrated. The results are obtained with N = 100 samples on each node and 20 BP iterations. One can observe visually that EPBP outperforms PBP. Number of BP iterations 0 5 10 15 20 Mean L1 error 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 EPBP PBP Number of samples per node 101 102 103 Wall-clock time [s] 10-1 100 101 102 103 104 PBP EPBP Figure 4: (left) Comparison of the convergence in L1 error with increasing number of BP iterations for the 3 × 3 grid example when using N = 30 particles. (right) Comparison of the wall-clock time needed to perform PBP and EPBP on the 3 × 3 grid example. 5 Discussion We have presented an original way to design adaptively efficient and easy-to-sample-from proposals for a particle implementation of Loopy Belief Propagation. Our proposal is inspired by the Expectation Propagation framework. We have demonstrated empirically that the resulting algorithm is significantly faster and more accurate than an implementation of PBP using the estimated beliefs as proposals and sampling from them using MCMC as proposed in [1]. It is also more accurate than EP due to the nonparametric nature of the messages and offers consistent estimators of the LBP messages. A sub-quadratic version of the method was also outlined and shown to perform almost as well as the original method on 7 mildly multi-modal models, it was also applied successfully in a simple image denoising example illustrating that the method can be applied on graphical models with several hundred nodes. We believe that our method could be applied successfully to a wide range of applications such as smoothing for Hidden Markov Models [18], tracking or computer vision [19, 20]. In future work, we will look at considering other divergences than the KL and the “Power EP” framework [21], we will also look at encapsulating the present algorithm within a sequential Monte Carlo framework and the recent work of Naesseth et al. [22]. -2 0 2 4 6 0 0.2 0.4 0.6 0.8 1 1.2 -2 0 2 4 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 -2 0 2 4 6 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 True belief Est. bel. (EPBP) Est. bel. (PBP) Est. bel. (EP) Est. bel. (PBP after EP) Figure 5: Comparison of the beliefs on node 1, 3 and 8 as obtained by evaluating LBP on a deterministic mesh, using EPBP, PBP, EP and PBP using the results of EP as proposals. This is for the tree example with N = 100 samples on each node and 20 LBP iterations. Again, one can observe visually that EPBP outperforms the other methods. Number of samples 101 102 103 Mean L1 error 10-2 10-1 100 NlogN implementation Quadratic implementation Number of samples per node 101 102 103 Wall-clock time [s] 10-1 100 101 102 NlogN implementation Quadratic implementation Figure 6: Comparison of the mean L1 error for PBP and EPBP on a 3 × 3 grid (left). For the same number of samples, EPBP is more accurate. It is also faster by about two orders of magnitude (right). The simulations were run several times for the same observations to illustrate the variability of the results. Figure 7: From left to right: comparison of the original (first), noisy (second) and recovered image using the sub-quadratic implementation of EPBP (third) and with EP (fourth). Acknowledgments We thank Alexander Ihler and Drew Frank for sharing their implementation of Particle Belief Propagation. TL gratefully acknowledges funding from EPSRC (grant 1379622) and the Scatcherd European scholarship scheme. YWT’s research leading to these results has received funding from EPSRC (grant EP/K009362/1) and ERC under the EU’s FP7 Programme (grant agreement no. 617411). AD’s research was supported by the EPSRC (grant EP/K000276/1, EP/K009850/1) and by AFOSR/AOARD (grant AOARD-144042). 8 References [1] Alexander T. Ihler and David A. McAllester. Particle belief propagation. In Proc. 12th AISTATS, pages 256–263, 2009. [2] Martin J. Wainwright and Michael I. Jordan. Graphical models, exponential families, and variational inference. Found. and Tr. in Mach. Learn., 1(1–2):1–305, 2008. [3] Erik B. Sudderth, Alexander T. Ihler, Michael Isard, William T. Freeman, and Alan S. Willsky. Nonparametric belief propagation. Commun. ACM, 53(10):95–102, 2010. [4] Jeremy Schiff, Erik B. Sudderth, and Ken Goldberg. Nonparametric belief propagation for distributed tracking of robot networks with noisy inter-distance measurements. In IROS ’09, pages 1369–1376, 2009. [5] Alexander T. Ihler, John W. Fisher, Randolph L. Moses, and Alan S. Willsky. Nonparametric belief propagation for self-localization of sensor networks. In IEEE Sel. Ar. Comm., volume 23, pages 809–819, 2005. [6] Christopher Crick and Avi Pfeffer. Loopy belief propagation as a basis for communication in sensor networks. In Proc. 19th UAI, pages 159–166, 2003. [7] Jian Sun, Nan-Ning Zheng, and Heung-Yeung Shum. Stereo matching using belief propagation. In IEEE Trans. Patt. An. Mach. Int., volume 25, pages 787–800, 2003. [8] Andrea Klaus, Mario Sormann, and Konrad Karner. Segment-based stereo matching using belief propagation and a self-adapting dissimilarity measure. In Proc. 18th ICPR, volume 3, pages 15–18, 2006. [9] Nima Noorshams and Martin J. Wainwright. Belief propagation for continuous state spaces: Stochastic message-passing with quantitative guarantees. JMLR, 14:2799–2835, 2013. [10] Judea Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufman, 1988. [11] Jonathan S. Yedidia, William T. Freeman, and Yair Weiss. Constructing free energy approximations and generalized belief propagation algorithms. MERL Technical Report, 2002. [12] Erik B. Sudderth, Alexander T. Ihler, William T. Freeman, and Alan S. Willsky. Nonparametric belief propagation. In Procs. IEEE Comp. Vis. Patt. Rec., volume 1, pages 605–612, 2003. [13] Thomas P. Minka. Expectation propagation for approximate Bayesian inference. In Proc. 17th UAI, pages 362–369, 2001. [14] Kevin P. Murphy, Yair Weiss, and Michael I. Jordan. Loopy belief propagation for approximate inference: an empirical study. In Proc. 15th UAI, pages 467–475, 1999. [15] Mila Nikolova. Thresholding implied by truncated quadratic regularization. IEEE Trans. Sig. Proc., 48(12):3437–3450, 2000. [16] Mark Briers, Arnaud Doucet, and Sumeetpal S. Singh. Sequential auxiliary particle belief propagation. In Proc. 8th ICIF, volume 1, pages 705–711, 2005. [17] Leonid I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D, 60(1):259–268, 1992. [18] M. Briers, A. Doucet, and S. Maskell. Smoothing algorithms for state-space models. Ann. Inst. Stat. Math., 62(1):61–89, 2010. [19] Erik B. Sudderth, Michael I. Mandel, William T. Freeman, and Alan S. Willsky. Visual hand tracking using nonparametric belief propagation. In Procs. IEEE Comp. Vis. Patt. Rec., 2004. [20] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient graph-based image segmentation. Int. Journ. Comp. Vis., 59(2), 2004. [21] Thomas P. Minka. Power EP. Technical Report MSR-TR-2004-149, 2004. [22] Christian A. Naesseth, Fredrik Lindsten, and Thomas B. Sch¨on. Sequential monte carlo for graphical models. In Proc. 27th NIPS, pages 1862–1870, 2014. 9 | 2015 | 250 |
5,759 | Secure Multi-party 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 We study the problem of interactive function computation by multiple parties, each possessing a bit, in a differential privacy setting (i.e., there remains an uncertainty in any party’s bit even when given the transcript of interactions and all the other parties’ bits). Each party wants to compute a function, which could differ from party to party, and there could be a central observer interested in computing a separate function. Performance at each party is measured via the accuracy of the function to be computed. We allow for an arbitrary cost metric to measure the distortion between the true and the computed function values. Our main result is the optimality of a simple non-interactive protocol: each party randomizes its bit (sufficiently) and shares the privatized version with the other parties. This optimality result is very general: it holds for all types of functions, heterogeneous privacy conditions on the parties, all types of cost metrics, and both average and worst-case (over the inputs) measures of accuracy. 1 Introduction Multi-party computation (MPC) is a generic framework where multiple parties share their information in an interactive fashion towards the goal of computing some functions, potentially different at each of the parties. In many situations of common interest, the key challenge is in computing the functions as privately as possible, i.e., without revealing much about one’s information to the other (potentially colluding) parties. For instance, an interactive voting system aims to compute the majority of (say, binary) opinions of each of the parties, with each party being averse to declaring their opinion publicly. Another example involves banks sharing financial risk exposures – the banks need to agree on quantities such as the overnight lending rate which depends on each bank’s exposure, which is a quantity the banks are naturally loath to truthfully disclose [1]. A central learning theory question involves characterizing the fundamental limits of interactive information exchange such that a strong (and suitably defined) adversary only learns as little as possible while still ensuring that the desired functions can be computed as accurately as possible. One way to formulate the privacy requirement is to ensure that each party learns nothing more about the others’ information than can be learned from the output of the function computed. This topic is studied under the rubric of secure function evaluation (SFE); the SFE formulation has been extensively studied with the goal of characterizing which functions can be securely evaluated [39, 3, 21, 11]. One drawback of SFE is that depending on what auxiliary information the adversary might have, disclosing the exact function output might reveal each party’s data. For example, consider computing the average of the data owned by all the parties. Even if we use SFE, a party’s data can be recovered if all the other parties collaborate. To ensure protection of the private data under such a strong adversary, we want to impose a stronger privacy guarantee of differential privacy. Recent breaches of sensitive information about individuals due to linkage attacks prove 1 the vulnerability of existing ad-hoc privatization schemes, such as anonymization of the records. In linkage attacks, an adversary matches up anonymized records containing sensitive information with public records in a different dataset. Such attacks have revealed the medical record of a former governor of Massachusetts [37], the purchase history of Amazon users[7], genomic information [25], and movie viewing history of Netflix users [33]. An alternative formulation is differential privacy, a relatively recent formulation that has received considerable attention as a formal mathematical notion of privacy that provides protection against such strong adversaries (a recent survey is available at [16]). The basic idea is to introduce enough randomness in the communication so that an adversary possessing arbitrary side information and access to the entire transcript of the communication will still have some residual uncertainty in identifying any of the bits of the parties. This privacy requirement is strong enough that non-trivial functions will be computed only with some error. Thus, there is a great need for understanding the fundamental tradeoff between privacy and accuracy, and for designing privatization mechanisms and communication protocols that achieve the optimal tradeoffs. The formulation and study of an optimal framework addressing this tradeoff is the focus of this paper. We study the following problem of multi-party computation under differential privacy: each party possesses a single bit of information and the information bits are statistically independent. Each party is interested in computing a function, which could differ from party to party, and there could be a central observer (observing the entire transcript of the interactive communication protocol) interested in computing a separate function. Performance at each party and the central observer is measured via the accuracy of the function to be computed. We allow an arbitrary cost metric to measure the distortion between the true and the computed function values. Each party imposes a differential privacy constraint on its information bit (the privacy level could be different from party to party) – i.e., there remains an uncertainty in any specific party’s bit even to an adversary that has access to the transcript of interactions and all the other parties’ bits. The interactive communication is achieved via a broadcast channel that all parties and the central observer can hear (this modeling is without loss of generality – since the differential privacy constraint protects against an adversary that can listen to the entire transcript, the communication between any two parties might as well be revealed to all the others). It is useful to distinguish between two types of communication protocols: interactive and non-interactive. We say a communication protocol is non-interactive if a message broadcasted by one party does not depend on the messages broadcasted by other parties. In contrast, interactive protocols allow the messages at any stage of the communication to depend on all the previous messages. Our main result is the exact optimality of a simple non-interactive protocol in terms of maximizing accuracy for any given privacy level, when each party possesses one bit: each party randomizes (sufficiently) and publishes its own bit. In other words: non-interactive randomized response is exactly optimal. Each party and the central observer then separately compute their respective decision functions to maximize the appropriate notion of their accuracy measure. This optimality result is very general: it holds for all types of functions, heterogeneous privacy conditions on the parties, all types of cost metrics, and both average and worst-case (over the inputs) measures of accuracy. Finally, the optimality result is simultaneous, in terms of maximizing accuracy at each of the parties and the central observer. Each party only needs to know its own desired level of privacy, its own function to be computed, and its measure of accuracy. Optimal data release and optimal decision making is naturally separated. The key technical result is a geometric understanding of the space of conditional probabilities of a given transcript: the interactive nature of the communication constrains the space to be a rank-1 tensor (a special case of Equation (6) in [35] and perhaps implicitly used in [30]; the two-party analog of this result is in [29]), while differential privacy imposes linear constraints on the singular vectors of this tensor. We characterize the convex hull of such manifolds of rank-1 tensors and show that their corner-points exactly correspond to the transcripts that arise from a non-interactive randomized response protocol. This universal (for all functionalities) characterization is then used to argue that both average-case and worst-case accuracies are maximized by non-interactive randomized responses. 2 Technically, we prove that non-interactive randomized response is the optimal solution of the rankconstrained and non-linear optimization of (11). The rank constraints on higher order tensors arises from the necessary condition of (possibly interactive) multi-party protocols, known as protocol compatibility (see Section 2 for details). To solve this non-standard optimization, we transform (11) into a novel linear program of (17) and (20). The price we pay is the increased dimension, the resulting LP is now infinite dimensional. The idea is that we introduce a new variable for each possible rank-one tensor, and optimize over all of them. Formulating utility maximization under differential privacy as linear programs has been previously studied in [32, 20, 6, 23], under the standard client-server model where there is a single data publisher and a single data analyst. These approaches exploit the fact that both the differential privacy constraints and the utilities are linear in the matrix representing a privatization mechanism. A similar technique of transforming a non-linear optimization problem into an infinite dimensional LP has been successfully applied in [26], where optimal privatization mechanisms under local differential privacy has been studied. We generalize these techniques to rank-constrained optimizations. Further, perhaps surprisingly, we prove that this infinite dimensional linear program has a simple optimal solution, which we call randomized response. Upon receiving the randomized responses, each party can compute the best approximation of its respective function. The main technical innovation is in proving that (a) the optimal solution of this LP corresponds to corner points of a convex hull of a particular manifold defined by a rank-one tensor (see Lemma 6.2 in the supplementary material for details); and (b) the respective manifold has a simple structure such that the corner points correspond to particular protocols that we call randomized responses. When the accuracy is measured via average accuracy, both the objective and the constraints are linear and it is natural to expect the optimal solution to be at the corner points (see Equation (17)). A surprising aspect of our main result is that the optimal solution is still at the corner points even though the worst-case accuracy is a concave function over the protocol P (see Equation (19)). This work focuses on the scenario where each party possesses a single bit of information. With multiple bits of information at each of the parties, the existence of a differentially private protocol with a fixed accuracy for any non-trivial functionality implies the existence of a protocol with the same level of privacy and same level of accuracy for a specific functionality that only depends on one bit of each of the parties (as in [22]). Thus, if we can obtain lower bounds on accuracy for functionalities involving only a single bit at each of the parties, we obtain lower bounds on accuracy for all non-trivial general functionalities. However, non-interactive communication is unlikely to be exactly optimal in this general case where each party possesses multiple bits of information, and we provide a further discussion in Section 4. We move a detailed discussion of related work (Section 5) to the supplementary material, focusing on the problem formulation next. 2 Problem formulation Consider the setting where we have k parties, each with its own private binary data xi ∈{0, 1} generated independently. The independence assumption here is necessary because without it each party can learn something about others, which violates differential privacy, even without revealing any information. We discuss possible extensions to correlated sources in Section 4. Differential privacy implicitly imposes independence in a multi-party setting. The goal of the private multi-party computation is for each party i ∈[k] to compute an arbitrary function fi : {0, 1}k →Y of interest by interactively broadcasting messages, while preserving the privacy of each party. There might be a central observer who listens to all the messages being broadcasted, and wants to compute another arbitrary function f0 : {0, 1} →Y. The k parties are honest in the sense that once they agree on what protocol to follow, every party follows the rules. At the same time, they can be curious, and each party needs to ensure other parties cannot learn his bit with sufficient confidence. The privacy constraints here are similar to the local differential privacy setting studied in [13] in the sense that there are multiple privacy barriers, each one separating each individual party and the rest of the world. However, the main difference is that we consider multi-party computation, where there are multiple functions to be computed, and each node might possess a different function to be computed. Let x = [x1, . . . , xk] ∈ {0, 1}k denote the vector of k bits, and x−i = [x1, . . . , xi−1, xi+1, . . . , xk] ∈{0, 1}k−1 is the vector of bits except for the i-th bit. The parties 3 agree on an interactive protocol to achieve the goal of multi-party computation. A ‘transcript’ is the output of the protocol, and is a random instance of all broadcasted messages until all the communication terminates. The probability that a transcript τ is broadcasted (via a series of interactive communications) when the data is x is denoted by Px,τ = P(τ | x) for x ∈{0, 1}k and for τ ∈T . Then, a protocol can be represented as a matrix denoting the probability distribution over a set of transcripts T conditioned on x: P = [Px,τ] ∈[0, 1]2k×|T |. In the end, each party makes a decision on what the value of function fi is, based on its own bit xi and the transcript τ that was broadcasted. A decision rule is a mapping from a transcript τ ∈T and private bit xi ∈{0, 1} to a decision y ∈Y represented by a function ˆfi(τ, xi). We allow randomized decision rules, in which case ˆfi(τ, xi) can be a random variable. For the central observer, a decision rule is a function of just the transcript, denoted by a function ˆf0(τ). We consider two notions of accuracy: the average accuracy and the worst-case accuracy. For the i-th party, consider an accuracy measure wi : Y × Y →R (or equivalently a negative cost function) such that wi(fi(x), ˆfi(τ, xi)) measures the accuracy when the function to be computed is fi(x) and the approximation is ˆfi(τ, xi). Then the average accuracy for this i-th party is defined as ACCave(P, wi, fi, ˆfi) ≡ 1 2k X x∈{0,1}k E ˆ fi,Px,τ [wi(fi(x), ˆfi(τ, xi))] , (1) where the expectation is taken over the random transcript τ distribution as P and also any randomness in the decision function ˆfi. We want to emphasize that the input is deterministic, i.e. we impose no distribution on the input data, and the expectation is not over the data sets x. Compared to assuming a distribution over the data, this is a weaker assumption on the data, and hence makes our main result stronger. For example, if the accuracy measure is an indicator such that wi(y, y′) = I(y=y′), then ACCave measures the average probability of getting the correct function output. For a given protocol P, it takes (2k |T |) operations to compute the optimal decision rule: f ∗ i,ave(τ, xi) = arg max y∈Y X x−i∈{0,1}k−1 Px,τ wi(fi(x), y) , (2) for each i ∈[k]. The computational cost of (2k |T |) for computing the optimal decision rule is unavoidable in general, since that is the inherent complexity of the problem: describing the distribution of the transcript requires the same cost. We will show that the optimal protocol requires a set of transcripts of size |T | = 2k, and the computational complexity of the decision rule for general a function is 22k. However, for a fixed protocol, this decision rule needs to be computed only once before any message is transmitted. Further, it is also possible to find a closed form solution for the decision rule when f has a simple structure. One example is the XOR function studied in detail in Section 3, where the optimal decision rule is as simple as evaluating the XOR of all the received bits, which requires O(k) operations. When there are multiple maximizers y, we can choose arbitrarily, and it follows that there is no gain in randomizing the decision rule for average accuracy. Similarly, the worst-case accuracy is defined as ACCwc(P, wi, fi, ˆfi) ≡ min x∈{0,1}k E ˆ fi,Px,τ [wi(fi(x), ˆfi(τ, xi))] . (3) For worst-case accuracy, given a protocol P, the optimal decision rule of the i-th party with a bit xi can be computed by solving the following convex program: Q(xi) = arg max Q ∈R|T |×|Y| min x−i∈{0,1}k−1 X τ∈T X y∈Y Px,τ wi(fi(x), y)Qτ,y (4) subject to X y∈Y Qτ,y = 1 , ∀τ ∈T and Q ≥0 The optimal (random) decision rule f ∗ i,wc(τ, xi) is to output y given transcript τ according to P(y|τ, xi) = Q(xi) τ,y . This can be formulated as a linear program with (|T | |Y|) variables and (2k + |T |) constraints. Again, it is possible to find a closed form solution for the decision rule when f has a simple structure: for the XOR function, the optimal decision rule is again evaluating 4 the XOR of all the received bits requiring O(k) operations. For a central observer, the accuracy measures are defined similarly, and the optimal decision rule is now f ∗ 0,ave(τ) = arg max y∈Y X x∈{0,1}k Px,τ w0(f0(x), y) , (5) and for worst-case accuracy the optimal (random) decision rule f ∗ 0,wc(τ) is to output y given transcript τ according to P(y|τ) = Q(0) τ,y. Subject to P y∈Y Qτ,y = 1 , ∀τ ∈T and Q ≥0, Q(0) = arg max Q ∈R|T |×|Y| min x∈{0,1}k X τ∈T X y∈Y Px,τ w0(f0(x), y)Qτ,y (6) where w0 : Y × Y →R is the measure of accuracy for the central observer. Privacy is measured by differential privacy [14, 15]. Since we allow heterogeneous privacy constraints, we use εi to denote the desired privacy level of the i-th party. We say a protocol P is εi-differentially private for the i-th party if for i ∈[k], and all xi, x′ i ∈{0, 1}, x−i ∈{0, 1}k−1, and τ ∈T , P(τ|xi, x−i) ≤ eεi P(τ|x′ i, x−i) . (7) This condition ensures no adversary can infer the private data xi with high enough confidence, no matter what auxiliary information he might have and independent of his computational power. To lighten notations, we let λi = eεi and say a protocol is λi-differentially private for the i-th party. If the protocol is λi-differentially private for all i ∈[k], then we say that the protocol is {λi}differentially private for all parties. A necessary condition on the multi-party protocols P, when the bits are generated independent of each other, is protocol compatibility [22]: conditioned on the transcript of the protocol, the input bits stay independent of each other. In our setting, input bits are deterministic, hence independent. Mathematically, a protocol P is protocol compatible if each column P (τ) is a rank-one tensor, when reshaped into a k-th order tensor P (τ) ∈[0, 1]2×2×...×2, where P (τ) x1,...,xk = Px,τ . (8) Precisely, there exist vectors u(1) . . . , u(k) such that P (τ) = u(1) ⊗· · · ⊗u(k), where ⊗denotes the standard outer-product, i.e. P (τ) i1,...,ik = u(1) i1 ×· · ·×u(k) ik . This is crucial in deriving the main results, and it is a well-known fact in the secure multi-party computation literature. This follows from the fact that when the bits are generated independently, all the bits are still independent conditioned on the transcript, i.e. P(x|τ) = Q i P(xi|τ), which follows implicitly from [30] and directly from Equation (6) of [35]. Notice that using the rank-one tensor representation of each column of the protocol P (τ), we have P(τ|xi = 0, x−i)/P(τ|xi = 1, x−i) = u(i) 1 /u(i) 2 . It follows that P is λi-differentially private if and only if λ−1 i u(i) 2 ≤u(i) 1 ≤λiu(i) 2 . Randomized response. Consider the following simple protocol known as the randomized response, which is a term first coined by [38] and commonly used in many private communications including the multi-party setting [31]. We will show in Section 3 that this is the optimal protocol for simultaneously maximizing the accuracy of all the parties. Each party broadcasts a randomized version of its bit denoted by ˜xi such that ˜xi = xi with probability λi 1+λi , ¯xi with probability 1 1+λi , (9) where ¯xi is the logical complement of xi. Each transcript can be represented by the output of the protocol, which in this case is ˜x = [˜x1, . . . , ˜xk] ∈T , where T = {0, 1}k is now the set of all broadcasted bits. Accuracy maximization. Consider the problem of maximizing the average accuracy for a centralized observer with function f. Up to the scaling of 1/2k in (1), the accuracy can be written as X x∈{0,1}k EP [w(f(x), ˆf0(τ))] = X x X y∈Y w(f0(x), y) | {z } ≜W (y) x X τ∈T Px,τ P( ˆf0(τ) = y) | {z } ≜Qτ,y , (10) 5 where ˆf0(τ) denotes the randomized decision up on receiving the transcript τ. In the following we define W (y) x ≜w(f0(x), y) to represent the accuracy measure and Qτ,y ≜P( ˆf(τ) = y) to represent the decision rule. Focusing on this single central observer for the purpose of illustration, we want to design protocols Px,τ and decision rules Qτ,y that maximize the above accuracy. Further, this protocol has to be compatible with interactive communication, satisfying the rank one condition discussed above, and satisfy the differential privacy condition in (7). Hence, we can formulate the accuracy maximization can be formulated as follows. Given W (y) x ’s in terms of the function f0(·) to be computed, an accuracy measure w0(·, ·), and required privacy level λi’s, we solve maximize P ∈R2k×|T |,Q∈R|T |×|Y| X x,∈{0,1}k,y∈Y W (y) x X τ∈T Px,τQτ,y, subject to P and Q are row-stochastic matrices, rank(P (τ)) = 1 , ∀τ ∈T , P(xi,x−i),τ ≤λiP(x′ i,x−i),τ , ∀i ∈[k], x1, x′ 1, ∈{0, 1}, x−i ∈{0, 1}k−1, (11) where P (τ) is defined as a k-th order tensor defined from the τ-th column of matrix P as defined in Equation (8). Notice that the rank constraint is only a necessary condition for a protocol to be compatible with interactive communication schemes, i.e. a valid interactive communication protocol implies the rank-one condition but not all rank-one protocols are valid interactive communication schemes. Therefore, the above is a relaxation with larger feasible set of protocols, but it turns out that the optimal solution of the above optimization problem is the randomized response, which is a valid (non-interactive) communication protocol. Hence, there is no loss in solving the above relaxation. The main challenge in solving this optimization is that it is a rank-constrained tensor optimization which is notoriously difficult. Since the rank constraint is over a k-th order tensor (k-dimensional array) with possibly k > 2, common approaches of convex relaxation from [36] for matrices (which are 2nd order tensors) does not apply. Further, we want to simultaneously apply similar optimizations to all the parties with different functions to be computed. We introduce a novel transformation of the above rank-constrained optimization into a linear program in (17) and (20). The price we pay is in the increased dimensionality: the LP has an infinite dimensional decision variable. However, combined with the geometric understanding of the the manifold of rank-1 tensors, we can identify the exact optimal solution. We show in the next section that given desired level of privacy {λi}i∈[k], there is a single universal protocol that simultaneously maximizes the accuracy for (a) all parties; (b) any functions of interest; (c) any accuracy measures; and (d) both worst-case and average case accuracy. Together with optimal decision rules performed at each of the receiving ends, this gives the exact optimal multi-party computation scheme. 3 Main Result We show, perhaps surprisingly, that the simple randomized response presented in (9) is the optimal protocol in a very general sense. For any desired privacy level λi, and arbitrary function fi, for any accuracy measure wi, and any notion of accuracy (either average or worst case), we show that the randomized response is universally optimal. The proof of the following theorem can be found in the supplementary material. Theorem 3.1 Let the optimal decision rule be defined as in (2) for the average accuracy and (4) for the worst-case accuracy. Then, for any λi ≥1, any function fi : {0, 1}k →Y, and any accuracy measure wi : Y×Y →R for i ∈[k], the randomized response for given λi with the optimal decision function achieves the maximum accuracy for the i-th party among all {λi}-differentially private interactive protocols and all decision rules. For the central observer, the randomized response with the optimal decision rule defined in (5) and (6) achieves the maximum accuracy among all {λi}differentially private interactive protocols and all decision rules for any arbitrary function f0 and any measure of accuracy w0. This is a strong universal optimality result. Every party and the central observer can simultaneously achieve the optimal accuracy using a universal randomized response. Each party only needs to know 6 its own desired level of privacy, its own function to be computed, and its measure of accuracy. Optimal data release and optimal decision making are naturally separated. However, it is not immediate at all that a non-interactive scheme such as the randomized response would achieve the maximum accuracy. The fact that interaction does not help is counter-intuitive, and might as well be true only for the binary data scenario we consider in this paper. The key technical innovation is the convex geometry in the proof, which does not generalize to larger alphabet case. Once we know interaction does not help, we can make an educated guess that the randomized response should dominate over other non-interactive schemes. This intuition follows from the dominance of randomized response in the single-party setting, that was proved using a powerful operational interpretation of differential privacy first introduced in [34]. This intuition can in fact be made rigorous, as we show in Section 7 (of our supplemental material) with a simple two-party example. However, we want to emphasize that our main result for multi-party computation does not follow from any existing analysis of randomized responses, in particular those seemingly similar analyses in [26]. The challenge is in proving that interaction does not help, which requires the technological innovations presented in this paper. Multi-party XOR computation. For a given function and a given accuracy measure, analyzing the performance of the optimal protocol provides the exact nature of the privacy-accuracy tradeoff. Consider a scenario where a central observer wants to compute the XOR of all the k-bits, each of which is λ-differentially private. In this special case, we can apply our main theorem to analyze the accuracy exactly in a combinatorial form, and we provide a proof in Section A.1. Corollary 3.1 Consider k-party computation for f0(x) = x1 ⊕· · ·⊕xk, and the accuracy measure is one if correct and zero if not, i.e. w0(0, 0) = w0(1, 1) = 1 and w0(0, 1) = w0(1, 0) = 0. For any {λ}-differentially private protocol P and any decision rule ˆf, the average and worst-case accuracies are bounded by ACCave(P, w0, f0, ˆf0) ≤ P⌊k/2⌋ i=0 k 2i λk−2i (1 + λ)k , ACCwc(P, w0, f0 ˆf0) ≤ P⌊k/2⌋ i=0 k 2i λk−2i (1 + λ)k , and the equality is achieved by the randomized response and optimal decision rules in (5) and (6). The optimal decision for both accuracies is simply to output the XOR of the received privatized bits. This is a strict generalization of a similar result in [22], where XOR computation was studied but only for a two-party setting. In the high privacy regime, where ε ≃0 (equivalently λ = eε ≃1), this implies that ACCave = 0.5 + 2−(k+1)εk + O(εk+1) . The leading term is due to the fact that we are considering an accuracy measure of a Boolean function. The second term of 2−(k+1)εk captures the effect that, we are essentially observing the XOR through k consecutive binary symmetric channels with flipping probability λ/(1+λ). Hence, the accuracy gets exponentially worse in k. On the other hand, if those k-parties are allowed to collaborate, then they can compute the XOR in advance and only transmit the privatized version of the XOR, achieving accuracy of λ/(1+λ) = 0.5+(1/4)ε2+ O(ε3). This is always better than not collaborating, which is the bound in Corollary 3.1. 4 Discussion In this section, we discuss a few topics, each of which is interesting but non-trivial to solve in any obvious way. Our main result is general and sharp, but we want to ask how to push it further. Generalization to multiple bits. When each party owns multiple bits, it is possible that interactive protocols improve over the randomized response protocol. This is discussed with examples in Section 8 (in the supplementary material). Approximate differential privacy. A common generalization of differential privacy, known as the approximate differential privacy, is to allow a small slack of δ ≥0 in the privacy condition[14, 15]. In the multi-party context, a protocol P is (εi, δi)-differentially private for the i-th party if for all i ∈[k], and all xi, x′ i ∈{0, 1}, x−i ∈{0, 1}k−1, and for all subset T ⊆T , P(τ ∈T|xi, x−i) ≤ eεiP(τ ∈T|x′ i, x−i) + δi . (12) 7 It is natural to ask if the linear programming (LP) approach presented in this paper can be extended to identify the optimal multi-party protocol under {(εi, δi)}-differential privacy. The LP formulations of (17) and (20) heavily rely on the fact that any differentially private protocol P can be decomposed as the combination of the matrix S and the θ(y)’s. Since the differential privacy constraints are invariant under scaling of P (y) τ , one can represent the scale-free pattern of the distribution with Sτ and the scaling with θ(y) τ . This is no longer true for {(εi, δi)}-differential privacy, and the analysis technique does not generalize. Correlated sources. When the data xi’s are correlated (e.g. each party observe a noisy version of the state of the world), knowing xi reveals some information on other parties’ bits. In general, revealing correlated data requires careful coordination between multiple parties. The analysis techniques developed in this paper do not generalize to correlated data, since the crucial rank-one tensor structure of S(y) τ is no longer present. Extensions to general utility functions. A surprising aspect of the main result is that even though the worst-case accuracy is a concave function over the protocol P, the maximum is achieved at an extremal point of the manifold of rank-1 tensors. This suggests that there is a deeper geometric structure of the problem, leading to possible universal optimality of the randomized response for a broader class of utility functions. It is an interesting task to understand the geometric structure of the problem, and to ask what class of utility functions lead to optimality of the randomized response. Acknowledgement This research is supported in part by NSF CISE award CCF-1422278, NSF SaTC award CNS1527754, NSF CMMI award MES-1450848 and NSF ENG award ECCS-1232257. References [1] Emmanuel Abbe, Amir Khandani, and W Andrew. Lo. 2011.privacy-preserving methods for sharing financial risk exposures.. The American Economic Review, 102:65–70. [2] Amos Beimel, Kobbi Nissim, and Eran Omri. Distributed private data analysis: Simultaneously solving how and what. In Advances in Cryptology–CRYPTO 2008, pages 451–468. Springer, 2008. [3] Michael Ben-Or, ShafiGoldwasser, and Avi Wigderson. Completeness theorems for non-cryptographic fault-tolerant distributed computation. In Proceedings of the twentieth annual ACM symposium on Theory of computing, pages 1–10. ACM, 1988. [4] D. Blackwell. Equivalent comparisons of experiments. The annals of mathematical statistics, 24(2):265– 272, 1953. [5] A. Blum, C. Dwork, F. McSherry, and K. Nissim. Practical privacy: the sulq framework. In Proceedings of the twenty-fourth symposium on Principles of database systems, pages 128–138. ACM, 2005. [6] H. Brenner and K. Nissim. Impossibility of differentially private universally optimal mechanisms. In Foundations of Computer Science, 2010 51st Annual IEEE Symposium on, pages 71–80. IEEE, 2010. [7] J. A. Calandrino, A. Kilzer, A. Narayanan, E. W. Felten, and V. Shmatikov. ” you might also like:” privacy risks of collaborative filtering. In Security and Privacy (SP), 2011 IEEE Symposium on, pages 231–246. IEEE, 2011. [8] K. Chaudhuri, A. Sarwate, and K. Sinha. Near-optimal differentially private principal components. In Advances in Neural Information Processing Systems, pages 989–997, 2012. [9] K. Chaudhuri, A. D. Sarwate, and K. Sinha. A near-optimal algorithm for differentially-private principal components. Journal of Machine Learning Research, 14:2905–2943, 2013. [10] Kamalika Chaudhuri, Claire Monteleoni, and Anand D Sarwate. Differentially private empirical risk minimization. The Journal of Machine Learning Research, 12:1069–1109, 2011. [11] David Chaum, Claude Cr´epeau, and Ivan Damgard. Multiparty unconditionally secure protocols. In Proceedings of the twentieth annual ACM symposium on Theory of computing, pages 11–19. ACM, 1988. [12] T. M. Cover and J. A. Thomas. Elements of information theory. John Wiley & Sons, 2012. [13] J. C. Duchi, M. I. Jordan, and M. J. Wainwright. Local privacy and statistical minimax rates. In Foundations of Computer Science (FOCS), 2013 IEEE 54th Annual Symposium on, pages 429–438. IEEE, 2013. 8 [14] C. Dwork. Differential privacy. In Automata, languages and programming, pages 1–12. Springer, 2006. [15] 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. [16] Cynthia Dwork. Differential privacy: A survey of results. In Theory and Applications of Models of Computation, pages 1–19. Springer, 2008. [17] Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Advances in Cryptology-EUROCRYPT 2006, pages 486–503. Springer, 2006. [18] Quan Geng and Pramod Viswanath. The optimal mechanism in differential privacy. arXiv preprint arXiv:1212.1186, 2012. [19] Quan Geng and Pramod Viswanath. The optimal mechanism in differential privacy: Multidimensional setting. arXiv preprint arXiv:1312.0655, 2013. [20] A. Ghosh, T. Roughgarden, and M. Sundararajan. Universally utility-maximizing privacy mechanisms. SIAM Journal on Computing, 41(6):1673–1693, 2012. [21] O. Goldreich, S. Micali, and A. Wigderson. How to play any mental game. In Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, STOC ’87, pages 218–229, New York, NY, USA, 1987. ACM. [22] V. Goyal, I. Mironov, O. Pandey, and A. Sahai. Accuracy-privacy tradeoffs for two-party differentially private protocols. In Advances in Cryptology–CRYPTO 2013, pages 298–315. Springer, 2013. [23] Mangesh Gupte and Mukund Sundararajan. Universally optimal privacy mechanisms for minimax agents. In Proceedings of the twenty-ninth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pages 135–146. ACM, 2010. [24] M. Hardt and A. Roth. Beating randomized response on incoherent matrices. In Proceedings of the forty-fourth annual ACM symposium on Theory of computing, pages 1255–1268. ACM, 2012. [25] N. Homer, S. Szelinger, M. Redman, D. Duggan, W. Tembe, J. Muehling, J. V. Pearson, D. A. Stephan, S. F. Nelson, and D. W. Craig. Resolving individuals contributing trace amounts of dna to highly complex mixtures using high-density snp genotyping microarrays. PLoS genetics, 4(8):e1000167, 2008. [26] P. Kairouz, S. Oh, and P. Viswanath. Extremal mechanisms for local differential privacy. In Advances in neural information processing systems, 2014. [27] M. Kapralov and K. Talwar. On differentially private low rank approximation. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1395–1414. SIAM, 2013. [28] Shiva Prasad Kasiviswanathan, Homin K Lee, Kobbi Nissim, Sofya Raskhodnikova, and Adam Smith. What can we learn privately? SIAM Journal on Computing, 40(3):793–826, 2011. [29] Joe Kilian. More general completeness theorems for secure two-party computation. In Proceedings of the thirty-second annual ACM symposium on Theory of computing, pages 316–324. ACM, 2000. [30] R. K¨unzler, J. M¨uller-Quade, and D. Raub. Secure computability of functions in the it setting with dishonest majority and applications to long-term security. In Theory of Cryptography, pages 238–255. Springer, 2009. [31] Andrew McGregor, Ilya Mironov, Toniann Pitassi, Omer Reingold, Kunal Talwar, and Salil Vadhan. The limits of two-party differential privacy. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, pages 81–90. IEEE, 2010. [32] F. McSherry and K. Talwar. Mechanism design via differential privacy. In Foundations of Computer Science, 2007. FOCS’07. 48th Annual IEEE Symposium on, pages 94–103. IEEE, 2007. [33] A. Narayanan and V. Shmatikov. Robust de-anonymization of large sparse datasets. In Security and Privacy, 2008. SP 2008. IEEE Symposium on, pages 111–125. IEEE, 2008. [34] Sewoong Oh and Pramod Viswanath. The composition theorem for differential privacy. arXiv preprint arXiv:1311.0776, 2013. [35] Manoj M Prabhakaran and Vinod M Prabhakaran. On secure multiparty sampling for more than two parties. In Information Theory Workshop (ITW), 2012 IEEE, pages 99–103. IEEE, 2012. [36] Benjamin Recht, Maryam Fazel, and Pablo A Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [37] L. Sweeney. Simple demographics often identify people uniquely. Health, 671:1–34, 2000. [38] S. L. Warner. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63–69, 1965. [39] Andrew C Yao. Protocols for secure computations. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pages 160–164. IEEE, 1982. 9 | 2015 | 251 |
5,760 | Embed to Control: A Locally Linear Latent Dynamics Model for Control from Raw Images Manuel Watter∗ Jost Tobias Springenberg∗ Joschka Boedecker University of Freiburg, Germany {watterm,springj,jboedeck}@cs.uni-freiburg.de Martin Riedmiller Google DeepMind London, UK riedmiller@google.com Abstract We introduce Embed to Control (E2C), a method for model learning and control of non-linear dynamical systems from raw pixel images. E2C consists of a deep generative model, belonging to the family of variational autoencoders, that learns to generate image trajectories from a latent space in which the dynamics is constrained to be locally linear. Our model is derived directly from an optimal control formulation in latent space, supports long-term prediction of image sequences and exhibits strong performance on a variety of complex control problems. 1 Introduction Control of non-linear dynamical systems with continuous state and action spaces is one of the key problems in robotics and, in a broader context, in reinforcement learning for autonomous agents. A prominent class of algorithms that aim to solve this problem are model-based locally optimal (stochastic) control algorithms such as iLQG control [1, 2], which approximate the general nonlinear control problem via local linearization. When combined with receding horizon control [3], and machine learning methods for learning approximate system models, such algorithms are powerful tools for solving complicated control problems [3, 4, 5]; however, they either rely on a known system model or require the design of relatively low-dimensional state representations. For real autonomous agents to succeed, we ultimately need algorithms that are capable of controlling complex dynamical systems from raw sensory input (e.g. images) only. In this paper we tackle this difficult problem. If stochastic optimal control (SOC) methods were applied directly to control from raw image data, they would face two major obstacles. First, sensory data is usually high-dimensional – i.e. images with thousands of pixels – rendering a naive SOC solution computationally infeasible. Second, the image content is typically a highly non-linear function of the system dynamics underlying the observations; thus model identification and control of this dynamics are non-trivial. While both problems could, in principle, be addressed by designing more advanced SOC algorithms we approach the “optimal control from raw images” problem differently: turning the problem of locally optimal control in high-dimensional non-linear systems into one of identifying a low-dimensional latent state space, in which locally optimal control can be performed robustly and easily. To learn such a latent space we propose a new deep generative model belonging to the class of variational autoencoders [6, 7] that is derived from an iLQG formulation in latent space. The resulting Embed to Control (E2C) system is a probabilistic generative model that holds a belief over viable trajectories in sensory space, allows for accurate long-term planning in latent space, and is trained fully unsupervised. We demonstrate the success of our approach on four challenging tasks for control from raw images and compare it to a range of methods for unsupervised representation learning. As an aside, we also validate that deep up-convolutional networks [8, 9] are powerful generative models for large images. ∗Authors contributed equally. 1 2 The Embed to Control (E2C) model We briefly review the problem of SOC for dynamical systems, introduce approximate locally optimal control in latent space, and finish with the derivation of our model. 2.1 Problem Formulation We consider the control of unknown dynamical systems of the form st+1 = f(st, ut) + ξ, ξ ∼N(0, Σξ), (1) where t denotes the time steps, st ∈Rns the system state, ut ∈Rnu the applied control and ξ the system noise. The function f(st, ut) is an arbitrary, smooth, system dynamics. We equivalently refer to Equation (1) using the notation P(st+1|st, ut), which we assume to be a multivariate normal distribution N(f(st, ut), Σξ). We further assume that we are only given access to visual depictions xt ∈Rnx of state st. This restriction requires solving a joint state identification and control problem. For simplicity we will in the following assume that xt is a fully observed depiction of st, but relax this assumption later. Our goal then is to infer a low-dimensional latent state space model in which optimal control can be performed. That is, we seek to learn a function m, mapping from high-dimensional images xt to low-dimensional vectors zt ∈Rnz with nz ≪nx, such that the control problem can be solved using zt instead of xt: zt = m(xt) + ω, ω ∼N(0, Σω), (2) where ω accounts for system noise; or equivalently zt ∼N(m(xt), Σω). Assuming for the moment that such a function can be learned (or approximated), we will first define SOC in a latent space and introduce our model thereafter. 2.2 Stochastic locally optimal control in latent spaces Let zt ∈Rnz be the inferred latent state from image xt of state st and f lat(zt, ut) the transition dynamics in latent space, i.e., zt+1 = f lat(zt, ut). Thus f lat models the changes that occur in zt when control ut is applied to the underlying system as a latent space analogue to f(st, ut). Assuming f lat is known, optimal controls for a trajectory of length T in the dynamical system can be derived by minimizing the function J(z1:T , u1:T ) which gives the expected future costs when following (z1:T , u1:T ): J(z1:T , u1:T ) = Ez " cT (zT , uT ) + T −1 X t0 c(zt, ut) # , (3) where c(zt, ut) are instantaneous costs, cT (zT , uT ) denotes terminal costs and z1:T = {z1, . . . , zT } and u1:T = {u1, . . . , uT } are state and action sequences respectively. If zt contains sufficient information about st, i.e., st can be inferred from zt alone, and f lat is differentiable, the cost-minimizing controls can be computed from J(z1:T , u1:T ) via SOC algorithms [10]. These optimal control algorithms approximate the global non-linear dynamics with locally linear dynamics at each time step t. Locally optimal actions can then be found in closed form. Formally, given a reference trajectory ¯z1:T – the current estimate for the optimal trajectory – together with corresponding controls ¯u1:T the system is linearized as zt+1 = A(¯zt)zt + B(¯zt)ut+1 + o(¯zt) + ω, ω ∼N(0, Σω), (4) where A(¯zt) = δf lat(¯zt,¯ut) δ¯zt , B(¯zt) = δf lat(¯zt,¯ut) δ¯ut are local Jacobians, and o(¯zt) is an offset. To enable efficient computation of the local controls we assume the costs to be a quadratic function of the latent representation c(zt, ut) = (zt −zgoal)T Rz(zt −zgoal) + uT t Ruut, (5) where Rz ∈Rnz×nz and Ru ∈Rnu×nu are cost weighting matrices and zgoal is the inferred representation of the goal state. We also assume cT (zT , uT ) = c(zT , uT ) throughout this paper. In combination with Equation (4) this gives us a local linear-quadratic-Gaussian formulation at each time step t which can be solved by SOC algorithms such as iterative linear-quadratic regulation (iLQR) [11] or approximate inference control (AICO) [12]. The result of this trajectory optimization step is a locally optimal trajectory with corresponding control sequence (z∗ 1:T , u∗ 1:T ) ≈ arg minz1:T u1:T J(z1:T , u1:T ). 2 encode decode transition xt henc φ hdec θ pt µt Σt zt htrans ψ Bt At ot ut ˆzt+1 ≈zt+1 ˆ Qψ Qφ KL henc φ µt+1 Σt+1 hdec θ pt xt+1 Figure 1: The information flow in the E2C model. From left to right, we encode and decode an image xt with the networks henc φ and hdec θ , where we use the latent code zt for the transition step. The htrans ψ network computes the local matrices At, Bt, ot with which we can predict ˆzt+1 from zt and ut. Similarity to the encoding zt+1 is enforced by a KL divergence on their distributions and reconstruction is again performed by hdec θ . 2.3 A locally linear latent state space model for dynamical systems Starting from the SOC formulation, we now turn to the problem of learning an appropriate lowdimensional latent representation zt ∼P(Zt|m(xt), Σω) of xt. The representation zt has to fulfill three properties: (i) it must capture sufficient information about xt (enough to enable reconstruction); (ii) it must allow for accurate prediction of the next latent state zt+1 and thus, implicitly, of the next observation xt+1; (iii) the prediction f lat of the next latent state must be locally linearizable for all valid control magnitudes ut. Given some representation zt, properties (ii) and (iii) in particular require us to capture possibly highly non-linear changes of the latent representation due to transformations of the observed scene induced by control commands. Crucially, these are particularly hard to model and subsequently linearize. We circumvent this problem by taking a more direct approach: instead of learning a latent space z and transition model f lat which are then linearized and combined with SOC algorithms, we directly impose desired transformation properties on the representation zt during learning. We will select these properties such that prediction in the latent space as well as locally linear inference of the next observation according to Equation (4) are easy. The transformation properties that we desire from a latent representation can be formalized directly from the iLQG formulation given in Section 2.2 . Formally, following Equation (2), let the latent representation be Gaussian P(Z|X) = N(m(xt), Σω). To infer zt from xt we first require a method for sampling latent states. Ideally, we would generate samples directly from the unknown true posterior P(Z|X), which we, however, have no access to. Following the variational Bayes approach (see Jordan et al. [13] for an overview) we resort to sampling zt from an approximate posterior distribution Qφ(Z|X) with parameters φ. Inference model for Qφ. In our work this is always a diagonal Gaussian distribution Qφ(Z|X) = N(µt, diag(σ2 t)), whose mean µt ∈Rnz and covariance Σt = diag(σ2 t) ∈Rnz×nz are computed by an encoding neural network with outputs µt = Wµhenc φ (xt) + bµ, (6) log σt = Wσhenc φ (xt) + bσ, (7) where henc φ ∈Rne is the activation of the last hidden layer and where φ is given by the set of all learnable parameters of the encoding network, including the weight matrices Wµ, Wσ and biases bµ, bσ. Parameterizing the mean and variance of a Gaussian distribution based on a neural network gives us a natural and very expressive model for our latent space. It additionally comes with the benefit that we can use the reparameterization trick [6, 7] to backpropagate gradients of a loss function based on samples through the latent distribution. Generative model for Pθ. Using the approximate posterior distribution Qφ we generate observed samples (images) ˜xt and ˜xt+1 from latent samples zt and zt+1 by enforcing a locally linear relationship in latent space according to Equation (4), yielding the following generative model zt ∼Qφ(Z | X) = N(µt, Σt), ˆzt+1 ∼ˆQψ( ˆZ | Z, u) = N(Atµt + Btut + ot, Ct), ˜xt, ˜xt+1 ∼Pθ(X | Z) = Bernoulli(pt), (8) where ˆQψ is the next latent state posterior distribution, which exactly follows the linear form required for stochastic optimal control. With ωt ∼N(0, Ht) as an estimate of the system noise, 3 C can be decomposed as Ct = AtΣtAT t + Ht. Note that while the transition dynamics in our generative model operates on the inferred latent space, it takes untransformed controls into account. That is, we aim to learn a latent space such that the transition dynamics in z linearizes the non-linear observed dynamics in x and is locally linear in the applied controls u. Reconstruction of an image from zt is performed by passing the sample through multiple hidden layers of a decoding neural network which computes the mean pt of the generative Bernoulli distribution1 Pθ(X|Z) as pt = Wphdec θ (zt) + bp, (9) where hdec θ (zt) ∈Rnd is the response of the last hidden layer in the decoding network. The set of parameters for the decoding network, including weight matrix Wp and bias bp, then make up the learned generative parameters θ. Transition model for ˆQψ. What remains is to specify how the linearization matrices At ∈Rnz×nz, Bt ∈Rnz×nu and offset ot ∈Rnz are predicted. Following the same approach as for distribution means and covariance matrices, we predict all local transformation parameters from samples zt based on the hidden representation htrans ψ (zt) ∈Rnt of a third neural network with parameters ψ – to which we refer as the transformation network. Specifically, we parametrize the transformation matrices and offset as vec[At] = WA htrans ψ (zt) + bA, vec[Bt] = WB htrans ψ (zt) + bB, ot = Wo htrans ψ (zt) + bo, (10) where vec denotes vectorization and therefore vec[At] ∈R(n2 z) and vec[Bt] ∈R(nz·nu). To circumvent estimating the full matrix At of size nz × nz, we can choose it to be a perturbation of the identity matrix At = (I + vtrT t ) which reduces the parameters to be estimated for At to 2nz. A sketch of the complete architecture is shown in Figure 1. It also visualizes an additional constraint that is essential for learning a representation for long-term predictions: we require samples ˆzt+1 from the state transition distribution ˆQψ to be similar to the encoding of xt+1 through Qφ. While it might seem that just learning a perfect reconstruction of xt+1 from ˆzt+1 is enough, we require multistep predictions for planning in Z which must correspond to valid trajectories in the observed space X. Without enforcing similarity between samples from ˆQψ and Qφ, following a transition in latent space from zt with action ut may lead to a point ˆzt+1, from which reconstruction of xt+1 is possible, but that is not a valid encoding (i.e. the model will never encode any image as ˆzt+1). Executing another action in ˆzt+1 then does not result in a valid latent state – since the transition model is conditional on samples coming from the inference network – and thus long-term predictions fail. In a nutshell, such a divergence between encodings and the transition model results in a generative model that does not accurately model the Markov chain formed by the observations. 2.4 Learning via stochastic gradient variational Bayes For training the model we use a data set D = {(x1, u1, x2), . . . , (xT −1, uT −1, xT )} containing observation tuples with corresponding controls obtained from interactions with the dynamical system. Using this data set, we learn the parameters of the inference, transition and generative model by minimizing a variational bound on the true data negative log-likelihood −log P(xt, ut, xt+1) plus an additional constraint on the latent representation. The complete loss function2 is given as L(D) = X (xt,ut,xt+1)∈D Lbound(xt, ut, xt+1) + λ KL ˆQψ( ˆZ | µt, ut)
Qφ(Z | xt+1) . (11) The first part of this loss is the per-example variational bound on the log-likelihood Lbound(xt, ut, xt+1) = E zt∼Qφ ˆzt+1∼ˆ Qψ [−log Pθ(xt|zt) −log Pθ(xt+1|ˆzt+1)]+KL(Qφ||P(Z)), (12) where Qφ, Pθ and ˆQψ are the parametric inference, generative and transition distributions from Section 2.3 and P(Zt) is a prior on the approximate posterior Qφ; which we always chose to be 1A Bernoulli distribution for Pθ is a common choice when modeling black-and-white images. 2Note that this is the loss for the latent state space model and distinct from the SOC costs. 4 an isotropic Gaussian distribution with mean zero and unit variance. The second KL divergence in Equation (11) is an additional contraction term with weight λ, that enforces agreement between the transition and inference models. This term is essential for establishing a Markov chain in latent space that corresponds to the real system dynamics (see Section 2.3 above for an in depth discussion). This KL divergence can also be seen as a prior on the latent transition model. Note that all KL terms can be computed analytically for our model (see supplementary for details). During training we approximate the expectation in L(D) via sampling. Specifically, we take one sample zt for each input xt and transform that sample using Equation (10) to give a valid sample ˆzt+1 from ˆQψ. We then jointly learn all parameters of our model by minimizing L(D) using SGD. 3 Experimental Results We evaluate our model on four visual tasks: an agent in a plane with obstacles, a visual version of the classic inverted pendulum swing-up task, balancing a cart-pole system, and control of a three-link arm with larger images. These are described in detail below. 3.1 Experimental Setup Model training. We consider two different network types for our model: Standard fully connected neural networks with up to three layers, which work well for moderately sized images, are used for the planar and swing-up experiments; A deep convolutional network for the encoder in combination with an up-convolutional network as the decoder which, in accordance with recent findings from the literature [8, 9], we found to be an adequate model for larger images. Training was performed using Adam [14] throughout all experiments. The training data set D for all tasks was generated by randomly sampling N state observations and actions with corresponding successor states. For the plane we used N =3, 000 samples, for the inverted pendulum and cart-pole system we used N = 15, 000 and for the arm N=30, 000. A complete list of architecture parameters and hyperparameter choices as well as an in-depth explanation of the up-convolutional network are specified in the supplementary material. We will make our code and a video containing controlled trajectories for all systems available under http://ml.informatik.uni-freiburg.de/research/e2c . Model variants. In addition to the Embed to Control (E2C) dynamics model derived above, we also consider two variants: By removing the latent dynamics network htrans ψ , i.e. setting its output to one in Equation (10) – we obtain a variant in which At, Bt and ot are estimated as globally linear matrices (Global E2C). If we instead replace the transition model with a network estimating the dynamics as a non-linear function ˆf lat and only linearize during planning, estimating At, Bt, ot as Jacobians to ˆf lat as described in Section 2.2, we obtain a variant with nonlinear latent dynamics. Baseline models. For a thorough comparison and to exhibit the complicated nature of the tasks, we also test a set of baseline models on the plane and the inverted pendulum task (using the same architecture as the E2C model): a standard variational autoencoder (VAE) and a deep autoencoder (AE) are trained on the autoencoding subtask for visual problems. That is, given a data set D used for training our model, we remove all actions from the tuples in D and disregard temporal context between images. After autoencoder training we learn a dynamics model in latent space, approximating f lat from Section 2.2. We also consider a VAE variant with a slowness term on the latent representation – a full description of this variant is given in the supplementary material. Optimal control algorithms. To perform optimal control in the latent space of different models, we employ two trajectory optimization algorithms: iterative linear quadratic regulation (iLQR) [11] (for the plane and inverted pendulum) and approximate inference control (AICO) [12] (all other experiments). For all VAEs both methods operate on the mean of distributions Qφ and ˆQψ. AICO additionally makes use of the local Gaussian covariances Σt and Ct. Except for the experiments on the planar system, control was performed in a model predictive control fashion using the receding horizon scheme introduced in [3]. To obtain closed loop control given an image xt, it is first passed through the encoder to obtain the latent state zt. A locally optimal trajectory is subsequently found by optimizing (z∗ t:t+T , u∗ t:t+T ) ≈arg minzt:t+T ut:t+T J(zt:t+T , ut:t+T ) with fixed, small horizon T (with T = 10 unless noted otherwise). Controls u∗ t are applied to the system and a transition to zt+1 is observed (by encoding the next image xt+1). Then a new control sequence – with horizon 5 VAE with slowness AE Non-linear E2C Global E2C E2C VAE 5 10 15 20 25 30 35 5 10 15 20 25 30 35 Figure 2: The true state space of the planar system (left) with examples (obstacles encoded as circles) and the inferred spaces (right) of different models. The spaces are spanned by generating images for every valid position of the agent and embedding them with the respective encoders. T – starting in zt+1 is found using the last estimated trajectory as a bootstrap. Note that planning is performed entirely in the latent state without access to any observations except for the depiction of the current state. To compute the cost function c(zt, ut) required for trajectory optimization in z we assume knowledge of the observation xgoal of the goal state sgoal. This observation is then transformed into latent space and costs are computed according to Equation (5). 3.2 Control in a planar system The agent in the planar system can move in a bounded two-dimensional plane by choosing a continuous offset in x- and y-direction. The high-dimensional representation of a state is a 40 × 40 black-and-white image. Obstructed by six circular obstacles, the task is to move to the bottom right of the image, starting from a random x position at the top of the image. The encodings of obstacles are obtained prior to planning and an additional quadratic cost term is penalizing proximity to them. A depiction of the observations on which control is performed – together with their corresponding state values and embeddings into latent space – is shown in Figure 2. The figure also clearly shows a fundamental advantage the E2C model has over its competitors: While the separately trained autoencoders make for aesthetically pleasing pictures, the models failed to discover the underlying structure of the state space, complicating dynamics estimation and largely invalidating costs based on distances in said space. Including the latent dynamics constraints in these end-to-end models on the other hand, yields latent spaces approaching the optimal planar embedding. We test the long-term accuracy by accumulating latent and real trajectory costs to quantify whether the imagined trajectory reflects reality. The results for all models when starting from random positions at the top and executing 40 pre-computed actions are summarized in Table 1 – using a seperate test set for evaluating reconstructions. While all methods achieve a low reconstruction loss, the difference in accumulated real costs per trajectory show the superiority of the E2C model. Using the globally or locally linear E2C model, trajectories planned in latent space are as good as trajectories planned on the real state. All models besides E2C fail to give long-term predictions that result in good performance. 3.3 Learning swing-up for an inverted pendulum We next turn to the task of controlling the classical inverted pendulum system [15] from images. We create depictions of the state by rendering a fixed length line starting from the center of the image at an angle corresponding to the pendulum position. The goal in this task is to swing-up and balance an underactuated pendulum from a resting position (pendulum hanging down). Exemplary observations and reconstructions for this system are given in Figure 3(d). In the visual inverted pendulum task our algorithm faces two additional difficulties: the observed space is non-Markov, as the angular velocity cannot be inferred from a single image, and second, discretization errors due to rendering pendulum angles as small 48x48 pixel images make exact control difficult. To restore the Markov property, we stack two images (as input channels), thus observing a one-step history. Figure 3 shows the topology of the latent space for our model, as well as one sample trajectory in true state and latent space. The fact that the model can learn a meaningful embedding, separating 6 Table 1: Comparison between different approaches to model learning from raw pixels for the planar and pendulum system. We compare all models with respect to their prediction quality on a test set of sampled transitions and with respect to their performance when combined with SOC (trajectory cost for control from different start states). Note that trajectory costs in latent space are not necessarily comparable. The “real” trajectory cost was computed on the dynamics of the simulator while executing planned actions. For the true models for st, real trajectory costs were 20.24 ± 4.15 for the planar system, and 9.8 ± 2.4 for the pendulum. Success was defined as reaching the goal state and staying ϵ-close to it for the rest of the trajectory (if non terminating). All statistics quantify over 5/30 (plane/pendulum) different starting positions. A † marks separately trained dynamics networks. Algorithm State Loss Next State Loss Trajectory Cost Success log p(xt|ˆxt) log p(xt+1|ˆxt, ut) Latent Real percent Planar System AE† 11.5 ± 97.8 3538.9 ± 1395.2 1325.6 ± 81.2 273.3 ± 16.4 0 % VAE† 3.6 ± 18.9 652.1 ± 930.6 43.1 ± 20.8 91.3 ± 16.4 0 % VAE + slowness† 10.5 ± 22.8 104.3 ± 235.8 47.1 ± 20.5 89.1 ± 16.4 0 % Non-linear E2C 8.3 ± 5.5 11.3 ± 10.1 19.8 ± 9.8 42.3 ± 16.4 96.6 % Global E2C 6.9 ± 3.2 9.3 ± 4.6 12.5 ± 3.9 27.3 ± 9.7 100 % E2C 7.7 ± 2.0 9.7 ± 3.2 10.3 ± 2.8 25.1 ± 5.3 100 % Inverted Pendulum Swing-Up AE† 8.9 ± 100.3 13433.8 ± 6238.8 1285.9 ± 355.8 194.7 ± 44.8 0 % VAE† 7.5 ± 47.7 8791.2 ± 17356.9 497.8 ± 129.4 237.2 ± 41.2 0 % VAE + slowness† 26.5 ± 18.0 779.7 ± 633.3 419.5 ± 85.8 188.2 ± 43.6 0 % E2C no latent KL 64.4 ± 32.8 87.7 ± 64.2 489.1 ± 87.5 213.2 ± 84.3 0 % Non-linear E2C 59.6 ± 25.2 72.6 ± 34.5 313.3 ± 65.7 37.4 ± 12.4 63.33 % Global E2C 115.5 ± 56.9 125.3 ± 62.6 628.1 ± 45.9 125.1 ± 10.7 0 % E2C 84.0 ± 50.8 89.3 ± 42.9 275.0 ± 16.6 15.4 ± 3.4 90 % velocities and positions, from this data is remarkable (no other model recovered this shape). Table 1 again compares the different models quantitatively. While the E2C model is not the best in terms of reconstruction performance, it is the only model resulting in stable swing-up and balance behavior. We explain the failure of the other models with the fact that the non-linear latent dynamics model cannot be guaranteed to be linearizable for all control magnitudes, resulting in undesired behavior around unstable fixpoints of the real system dynamics, and that for this task a globally linear dynamics model is inadequate. 3.4 Balancing a cart-pole and controlling a simulated robot arm Finally, we consider control of two more complex dynamical systems from images using a six layer convolutional inference and six layer up-convolutional generative network, resulting in a 12-layer deep path from input to reconstruction. Specifically, we control a visual version of the classical cartpole system [16] from a history of two 80 × 80 pixel images as well as a three-link planar robot arm based on a history of two 128 × 128 pixel images. The latent space was set to be 8-dimensional in both experiments. The real state dimensionality for the cart-pole is four and is controlled using one −10 −5 0 5 10 Angular velocity −3 −2 −1 0 1 2 3 Angle z0 −3 −2 −1 0 1 2 3 z1 −3 −2 −1 0 1 2 3 z2 −3 −2 −1 0 1 2 3 z0 z1 −3 −2 −1 0 1 2 3 z2 −3 −2 −1 0 1 2 3 x100 x70 ˆx100 ˆx70 (a) (b) (c) (d) Figure 3: (a) The true state space of the inverted pendulum task overlaid with a successful trajectory taken by the E2C agent. (b) The learned latent space. (c) The trajectory from (a) traced out in the latent space. (d) Images x and reconstructions ˆx showing current positions (right) and history (left). 7 Observed Predicted 1 2 3 4 5 6 7 8 Figure 4: Left: Trajectory from the cart-pole domain. Only the first image (green) is “real”, all other images are “dreamed up” by our model. Notice discretization artifacts present in the real image. Right: Exemplary observed (with history image omitted) and predicted images (including the history image) for a trajectory in the visual robot arm domain with the goal marked in red. action, while for the arm the real state can be described in 6 dimensions (joint angles and velocities) and controlled using a three-dimensional action vector corresponding to motor torques. As in previous experiments the E2C model seems to have no problem finding a locally linear embedding of images into latent space in which control can be performed. Figure 4 depicts exemplary images – for both problems – from a trajectory executed by our system. The costs for these trajectories (11.13 for the cart-pole, 85.12 for the arm) are only slightly worse than trajectories obtained by AICO operating on the real system dynamics starting from the same start-state (7.28 and 60.74 respectively). The supplementary material contains additional experiments using these domains. 4 Comparison to recent work In the context of representation learning for control (see B¨ohmer et al. [17] for a review), deep autoencoders (ignoring state transitions) similar to our baseline models have been applied previously, e.g. by Lange and Riedmiller [18]. A more direct route to control based on image streams is taken by recent work on (model free) deep end-to-end Q-learning for Atari games by Mnih et al. [19], as well as kernel based [20] and deep policy learning for robot control [21]. Close to our approach is a recent paper by Wahlstr¨om et al. [22], where autoencoders are used to extract a latent representation for control from images, on which a non-linear model of the forward dynamics is learned. Their model is trained jointly and is thus similar to the non-linear E2C variant in our comparison. In contrast to our model, their formulation requires PCA pre-processing and does neither ensure that long-term predictions in latent space do not diverge, nor that they are linearizable. As stated above, our system belongs to the family of VAEs and is generally similar to recent work such as Kingma and Welling [6], Rezende et al. [7], Gregor et al. [23], Bayer and Osendorfer [24]. Two additional parallels between our work and recent advances for training deep neural networks can be observed. First, the idea of enforcing desired transformations in latent space during learning – such that the data becomes easy to model – has appeared several times already in the literature. This includes the development of transforming auto-encoders [25] and recent probabilistic models for images [26, 27]. Second, learning relations between pairs of images – although without control – has received considerable attention from the community during the last years [28, 29]. In a broader context our model is related to work on state estimation in Markov decision processes (see Langford et al. [30] for a discussion) through, e.g., hidden Markov models and Kalman filters [31, 32]. 5 Conclusion We presented Embed to Control (E2C), a system for stochastic optimal control on high-dimensional image streams. Key to the approach is the extraction of a latent dynamics model which is constrained to be locally linear in its state transitions. An evaluation on four challenging benchmarks revealed that E2C can find embeddings on which control can be performed with ease, reaching performance close to that achievable by optimal control on the real system model. Acknowledgments We thank A. Radford, L. Metz, and T. DeWolf for sharing code, as well as A. Dosovitskiy for useful discussions. This work was partly funded by a DFG grant within the priority program “Autonomous learning” (SPP1597) and the BrainLinks-BrainTools Cluster of Excellence (grant number EXC 1086). M. Watter is funded through the State Graduate Funding Program of Baden-W¨urttemberg. 8 References [1] D. Jacobson and D. Mayne. Differential dynamic programming. American Elsevier, 1970. [2] E. Todorov and W. Li. A generalized iterative LQG method for locally-optimal feedback control of constrained nonlinear stochastic systems. In ACC. IEEE, 2005. [3] Y. Tassa, T. Erez, and W. D. Smart. Receding horizon differential dynamic programming. In Proc. of NIPS, 2008. [4] Y. Pan and E. Theodorou. Probabilistic differential dynamic programming. In Proc. of NIPS, 2014. [5] S. Levine and V. Koltun. Variational policy search via trajectory optimization. In Proc. of NIPS, 2013. [6] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In Proc. of ICLR, 2014. [7] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proc. of ICML, 2014. [8] M. D. Zeiler, D. Krishnan, G. W. Taylor, and R. Fergus. Deconvolutional networks. In CVPR, 2010. [9] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In Proc. of CVPR, 2015. [10] R. F. Stengel. Optimal Control and Estimation. Dover Publications, 1994. [11] W. Li and E. Todorov. Iterative Linear Quadratic Regulator Design for Nonlinear Biological Movement Systems. In Proc. of ICINCO, 2004. [12] M. Toussaint. Robot Trajectory Optimization using Approximate Inference. In Proc. of ICML, 2009. [13] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. In Machine Learning, 1999. [14] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In Proc. of ICLR, 2015. [15] H. Wang, K. Tanaka, and M. Griffin. An approach to fuzzy control of nonlinear systems; stability and design issues. IEEE Trans. on Fuzzy Systems, 4(1), 1996. [16] R. S. Sutton and A. G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998. ISBN 0262193981. [17] W. B¨ohmer, J. T. Springenberg, J. Boedecker, M. Riedmiller, and K. Obermayer. Autonomous learning of state representations for control. KI - K¨unstliche Intelligenz, 2015. [18] S. Lange and M. Riedmiller. Deep auto-encoder neural networks in reinforcement learning. In Proc. of IJCNN, 2010. [19] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540), 02 2015. [20] H. van Hoof, J. Peters, and G. Neumann. Learning of non-parametric control policies with highdimensional state features. In Proc. of AISTATS, 2015. [21] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. CoRR, abs/1504.00702, 2015. URL http://arxiv.org/abs/1504.00702. [22] N. Wahlstr¨om, T. B. Sch¨on, and M. P. Deisenroth. From pixels to torques: Policy learning with deep dynamical models. CoRR, abs/1502.02251, 2015. URL http://arxiv.org/abs/1502.02251. [23] K. Gregor, I. Danihelka, A. Graves, D. Rezende, and D. Wierstra. DRAW: A recurrent neural network for image generation. In Proc. of ICML, 2015. [24] J. Bayer and C. Osendorfer. Learning stochastic recurrent networks. In NIPS 2014 Workshop on Advances in Variational Inference, 2014. [25] G. Hinton, A. Krizhevsky, and S. Wang. Transforming auto-encoders. In Proc. of ICANN, 2011. [26] L. Dinh, D. Krueger, and Y. Bengio. Nice: Non-linear independent components estimation. CoRR, abs/1410.8516, 2015. URL http://arxiv.org/abs/1410.8516. [27] T. Cohen and M. Welling. Transformation properties of learned visual representations. In ICLR, 2015. [28] G. W. Taylor, L. Sigal, D. J. Fleet, and G. E. Hinton. Dynamical binary latent variable models for 3d human pose tracking. In Proc. of CVPR, 2010. [29] R. Memisevic. Learning to relate images. IEEE Trans. on PAMI, 35(8):1829–1846, 2013. [30] J. Langford, R. Salakhutdinov, and T. Zhang. Learning nonlinear dynamic models. In ICML, 2009. [31] M. West and J. Harrison. Bayesian Forecasting and Dynamic Models (Springer Series in Statistics). Springer-Verlag, February 1997. ISBN 0387947256. [32] T. Matsubara, V. G´omez, and H. J. Kappen. Latent Kullback Leibler control for continuous-state systems using probabilistic graphical models. UAI, 2014. 9 | 2015 | 252 |
5,761 | Newton-Stein Method: A Second Order Method for GLMs via Stein’s Lemma Murat A. Erdogdu Department of Statistics Stanford University erdogdu@stanford.edu Abstract We consider the problem of efficiently computing the maximum likelihood estimator in Generalized Linear Models (GLMs) when the number of observations is much larger than the number of coefficients (n ≫p ≫1). In this regime, optimization algorithms can immensely benefit from approximate second order information. We propose an alternative way of constructing the curvature information by formulating it as an estimation problem and applying a Stein-type lemma, which allows further improvements through sub-sampling and eigenvalue thresholding. Our algorithm enjoys fast convergence rates, resembling that of second order methods, with modest per-iteration cost. We provide its convergence analysis for the case where the rows of the design matrix are i.i.d. samples with bounded support. We show that the convergence has two phases, a quadratic phase followed by a linear phase. Finally, we empirically demonstrate that our algorithm achieves the highest performance compared to various algorithms on several datasets. 1 Introduction Generalized Linear Models (GLMs) play a crucial role in numerous statistical and machine learning problems. GLMs formulate the natural parameter in exponential families as a linear model and provide a miscellaneous framework for statistical methodology and supervised learning tasks. Celebrated examples include linear, logistic, multinomial regressions and applications to graphical models [MN89, KF09]. In this paper, we focus on how to solve the maximum likelihood problem efficiently in the GLM setting when the number of observations n is much larger than the dimension of the coefficient vector p, i.e., n ≫p. GLM optimization task is typically expressed as a minimization problem where the objective function is the negative log-likelihood that is denoted by `(β) where β 2 Rp is the coefficient vector. Many optimization algorithms are available for such minimization problems [Bis95, BV04, Nes04]. However, only a few uses the special structure of GLMs. In this paper, we consider updates that are specifically designed for GLMs, which are of the from β β −γQrβ`(β) , (1.1) where γ is the step size and Q is a scaling matrix which provides curvature information. For the updates of the form Eq. (1.1), the performance of the algorithm is mainly determined by the scaling matrix Q. Classical Newton’s Method (NM) and Natural Gradient Descent (NG) are recovered by simply taking Q to be the inverse Hessian and the inverse Fisher’s information at the current iterate, respectively [Ama98, Nes04]. Second order methods may achieve quadratic convergence rate, yet they suffer from excessive cost of computing the scaling matrix at every iteration. On the other hand, if we take Q to be the identity matrix, we recover the simple Gradient Descent (GD) method which has a linear convergence rate. Although GD’s convergence rate is slow compared to that of second order methods, modest per-iteration cost makes it practical for large-scale problems. The trade-off between the convergence rate and per-iteration cost has been extensively studied [BV04, Nes04]. In n ≫p regime, the main objective is to construct a scaling matrix Q that 1 is computational feasible and provides sufficient curvature information. For this purpose, several Quasi-Newton methods have been proposed [Bis95, Nes04]. Updates given by Quasi-Newton methods satisfy an equation which is often referred as the Quasi-Newton relation. A well-known member of this class of algorithms is the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm [Nes04]. In this paper, we propose an algorithm that utilizes the structure of GLMs by relying on a Stein-type lemma [Ste81]. It attains fast convergence rate with low per-iteration cost. We call our algorithm Newton-Stein Method which we abbreviate as NewSt. Our contributions are summarized as follows: • We recast the problem of constructing a scaling matrix as an estimation problem and apply a Stein-type lemma along with sub-sampling to form a computationally feasible Q. • Newton method’s O(np2 + p3) per-iteration cost is replaced by O(np + p2) per-iteration cost and a one-time O(n|S|2) cost, where |S| is the sub-sample size. • Assuming that the rows of the design matrix are i.i.d. and have bounded support, and denoting the iterates of Newton-Stein method by {ˆβt}t≥0, we prove a bound of the form !!ˆβt+1 −β⇤ !! 2 ⌧1 !!ˆβt −β⇤ !! 2 + ⌧2 !!ˆβt −β⇤ !!2 2, (1.2) where β⇤is the minimizer and ⌧1, ⌧2 are the convergence coefficients. The above bound implies that the convergence starts with a quadratic phase and transitions into linear later. • We demonstrate its performance on four datasets by comparing it to several algorithms. The rest of the paper is organized as follows: Section 1.1 surveys the related work and Section 1.2 introduces the notations used throughout the paper. Section 2 briefly discusses the GLM framework and its relevant properties. In Section 3, we introduce Newton-Stein method, develop its intuition, and discuss the computational aspects. Section 4 covers the theoretical results and in Section 4.3 we discuss how to choose the algorithm parameters. Finally, in Section 5, we provide the empirical results where we compare the proposed algorithm with several other methods on four datasets. 1.1 Related work There are numerous optimization techniques that can be used to find the maximum likelihood estimator in GLMs. For moderate values of n and p, classical second order methods such as NM, NG are commonly used. In large-scale problems, data dimensionality is the main factor while choosing the right optimization method. Large-scale optimization tasks have been extensively studied through online and batch methods. Online methods use a gradient (or sub-gradient) of a single, randomly selected observation to update the current iterate [Bot10]. Their per-iteration cost is independent of n, but the convergence rate might be extremely slow. There are several extensions of the classical stochastic descent algorithms (SGD), providing significant improvement and/or stability [Bot10, DHS11, SRB13]. On the other hand, batch algorithms enjoy faster convergence rates, though their per-iteration cost may be prohibitive. In particular, second order methods attain quadratic rate, but constructing the Hessian matrix requires excessive computation. Many algorithms aim at forming an approximate, cost-efficient scaling matrix,. This idea lies at the core of Quasi-Newton methods [Bis95]. Another approach to construct an approximate Hessian makes use of sub-sampling techniques [Mar10, BCNN11, VP12, EM15]. Many contemporary learning methods rely on sub-sampling as it is simple and it provides significant boost over the first order methods. Further improvements through conjugate gradient methods and Krylov sub-spaces are available. Many hybrid variants of the aforementioned methods are proposed. Examples include the combinations of sub-sampling and Quasi-Newton methods [BHNS14], SGD and GD [FS12], NG and NM [LRF10], NG and low-rank approximation [LRMB08]. Lastly, algorithms that specialize on certain types of GLMs include coordinate descent methods for the penalized GLMs [FHT10] and trust region Newton methods [LWK08]. 1.2 Notation Let [n] = {1, 2, ..., n}, and denote the size of a set S by |S|. The gradient and the Hessian of f with respect to β are denoted by rβf and r2 βf, respectively. The j-th derivative of a function g is denoted by g(j). For vector x 2 Rp and matrix X 2 Rp⇥p, kxk2 and kXk2 denote the `2 and spectral norms, respectively. PC is the Euclidean projection onto set C, and Bp(R) ⇢Rp is the ball of radius R. For random variables x, y, d(x, y) and D(x, y) denote probability metrics (to be explicitly defined later), measuring the distance between the distributions of x and y. 2 2 Generalized Linear Models Distribution of a random variable y 2 R belongs to an exponential family with natural parameter ⌘2 R if its density can be written of the form f(y|⌘) = exp ! ⌘y −φ(⌘) " h(y), where φ is the cumulant generating function and h is the carrier density. Let y1, y2, ..., yn be independent observations such that 8i 2 [n], yi ⇠f(yi|⌘i). For ⌘= (⌘1, ..., ⌘n), the joint likelihood is f(y1, y2, ..., yn|⌘) = exp ( n X i=1 [yi⌘i −φ(⌘i)] ) n Y i=1 h(yi). We consider the problem of learning the maximum likelihood estimator in the above exponential family framework, where the vector ⌘2 Rn is modeled through the linear relation, ⌘= Xβ, for some design matrix X 2 Rn⇥p with rows xi 2 Rp, and a coefficient vector β 2 Rp. This formulation is known as Generalized Linear Models (GLMs) in canonical form. The cumulant generating function φ determines the class of GLMs, i.e., for the ordinary least squares (OLS) φ(z) = z2 and for the logistic regression (LR) φ(z) = log(1 + ez). Maximum likelihood estimation in the above formulation is equivalent to minimizing the negative log-likelihood function `(β), `(β) = 1 n n X i=1 [φ(hxi, βi) −yihxi, βi] , (2.1) where hx, βi is the inner product between the vectors x and β. The relation to OLS and LR can be seen much easier by plugging in the corresponding φ(z) in Eq. (2.1). The gradient and the Hessian of `(β) can be written as: rβ`(β) = 1 n n X i=1 h φ(1)(hxi, βi)xi −yixi i , r2 β`(β) = 1 n n X i=1 φ(2)(hxi, βi)xixT i . (2.2) For a sequence of scaling matrices {Qt}t>0 2 Rp⇥p, we consider iterations of the form ˆβt+1 ˆβt −γtQtrβ`(ˆβt), where γt is the step size. The above iteration is our main focus, but with a new approach on how to compute the sequence of matrices {Qt}t>0. We formulate the problem of finding a scalable Qt as an estimation problem and use a Stein-type lemma that provides a computationally efficient update. 3 Newton-Stein Method Classical Newton-Raphson update is generally used for training GLMs. However, its per-iteration cost makes it impractical for large-scale optimization. The main bottleneck is the computation of the Hessian matrix that requires O(np2) flops which is prohibitive when n ≫p ≫1. Numerous methods have been proposed to achieve NM’s fast convergence rate while keeping the per-iteration cost manageable. The task of constructing an approximate Hessian can be viewed as an estimation problem. Assuming that the rows of X are i.i.d. random vectors, the Hessian of GLMs with cumulant generating function φ has the following form ⇥ Qt⇤−1 = 1 n n X i=1 xixT i φ(2)(hxi, βi) ⇡E[xxT φ(2)(hx, βi)] . We observe that [Qt]−1 is just a sum of i.i.d. matrices. Hence, the true Hessian is nothing but a sample mean estimator to its expectation. Another natural estimator would be the sub-sampled Hessian method suggested by [Mar10, BCNN11, EM15]. Similarly, our goal is to propose an appropriate estimator that is also computationally efficient. We use the following Stein-type lemma to derive an efficient estimator to the expectation of Hessian. Lemma 3.1 (Stein-type lemma). Assume that x ⇠Np(0, ⌃) and β 2 Rp is a constant vector. Then for any function f : R ! R that is twice “weakly" differentiable, we have E[xxT f(hx, βi)] = E[f(hx, βi)]⌃+ E[f (2)(hx, βi)]⌃ββT ⌃. (3.1) 3 Algorithm 1 Newton-Stein method Input: ˆβ0, r, ✏, γ. 1. Set t = 0 and sub-sample a set of indices S ⇢[n] uniformly at random. 2. Compute: ˆσ2 = λr+1(b⌃S), and ⇣r(b⌃S) = ˆσ2I + argminrank(M) = r ""b⌃S −ˆσ2I −M "" F . 3. while ""ˆβt+1 −ˆβt"" 2 ✏do ˆµ2(ˆβt) = 1 n Pn i=1 φ(2)(hxi, ˆβti), ˆµ4(ˆβt) = 1 n Pn i=1 φ(4)(hxi, ˆβti), Qt = 1 ˆµ2( ˆβt) h ⇣r(b⌃S)−1 − ˆβt[ ˆβt]T ˆµ2( ˆβt)/ˆµ4( ˆβt)+h⇣r(b⌃S) ˆβt, ˆβti i , ˆβt+1 = PBp(R) ⇣ ˆβt −γQtrβ`(ˆβt) ⌘ , t t + 1. 4. end while Output: ˆβt. The proof of Lemma 3.1 is given in Appendix. The right hand side of Eq.(3.1) is a rank-1 update to the first term. Hence, its inverse can be computed with O(p2) cost. Quantities that change at each iteration are the ones that depend on β, i.e., µ2(β) = E[φ(2)(hx, βi)] and µ4(β) = E[φ(4)(hx, βi)]. µ2(β) and µ4(β) are scalar quantities and can be estimated by their corresponding sample means ˆµ2(β) and ˆµ4(β) (explicitly defined at Step 3 of Algorithm 1), with only O(np) computation. To complete the estimation task suggested by Eq. (3.1), we need an estimator for the covariance matrix ⌃. A natural estimator is the sample mean where, we only use a sub-sample S ⇢[n] so that the cost is reduced to O(|S|p2) from O(np2). Sub-sampling based sample mean estimator is denoted by b⌃S = P i2S xixT i /|S|, which is widely used in large-scale problems [Ver10]. We highlight the fact that Lemma 3.1 replaces NM’s O(np2) per-iteration cost with a one-time cost of O(np2). We further use sub-sampling to reduce this one-time cost to O(|S|p2). In general, important curvature information is contained in the largest few spectral features. Following [EM15], we take the largest r eigenvalues of the sub-sampled covariance estimator, setting rest of them to (r + 1)-th eigenvalue. This operation helps denoising and would require only O(rp2) computation. Step 2 of Algorithm 1 performs this procedure. Inverting the constructed Hessian estimator can make use of the low-rank structure several times. First, notice that the updates in Eq. (3.1) are based on rank-1 matrix additions. Hence, we can simply use a matrix inversion formula to derive an explicit equation (See Qt in Step 3 of Algorithm 1). This formulation would impose another inverse operation on the covariance estimator. Since the covariance estimator is also based on rank-r approximation, one can utilize the low-rank inversion formula again. We emphasize that this operation is performed once. Therefore, instead of NM’s per-iteration cost of O(p3) due to inversion, Newton-Stein method (NewSt) requires O(p2) per-iteration and a one-time cost of O(rp2). Assuming that NewSt and NM converge in T1 and T2 iterations respectively, the overall complexity of NewSt is O ( npT1 + p2T1 + (|S| + r)p2) ⇡ O ( npT1 + p2T1 + |S|p2) whereas that of NM is O ( np2T2 + p3T2 ) . Even though Proposition 3.1 assumes that the covariates are multivariate Gaussian random vectors, in Section 4, the only assumption we make on the covariates is that they have bounded support, which covers a wide class of random variables. The left plot of Figure 1 shows that the estimation is accurate for various distributions. This is a consequence of the fact that the proposed estimator in Eq. (3.1) relies on the distribution of x only through inner products of the form hx, vi, which in turn results in approximate normal distribution due to the central limit theorem when p is sufficiently large. We will discuss this phenomenon in detail in Section 4. The convergence rate of Newton-Stein method has two phases. Convergence starts quadratically and transitions into a linear rate when it gets close to the true minimizer. The phase transition behavior can be observed through the right plot in Figure 1. This is a consequence of the bound provided in Eq. (1.2), which is the main result of our theorems stated in Section 4. 4 −4 −3 −2 −1 0 0 100 200 300 400 Dimension (p) log10(Estimation error) Randomness Bernoulli Gaussian Poisson Uniform Difference between estimated and true Hessian −3 −2 −1 0 0 10 20 30 40 50 Iterations log10(Error) Sub−sample size NewSt : S = 1000 NewSt : S = 10000 Convergence Rate Figure 1: The left plot demonstrates the accuracy of proposed Hessian estimation over different distributions. Number of observations is set to be n = O(p log(p)). The right plot shows the phase transition in the convergence rate of Newton-Stein method (NewSt). Convergence starts with a quadratic rate and transitions into linear. Plots are obtained using Covertype dataset. 4 Theoretical results We start this section by introducing the terms that will appear in the theorems. Then, we provide our technical results on uniformly bounded covariates. The proofs are provided in Appendix. 4.1 Preliminaries Hessian estimation described in the previous section relies on a Gaussian approximation. For theoretical purposes, we use the following probability metric to quantify the gap between the distribution of xi’s and that of a normal vector. Definition 1. Given a family of functions H, and random vectors x, y 2 Rp, and any h 2 H, define dH(x, y) = sup h2H dh(x, y) where dh(x, y) = !!E [h(x)] −E [h(y)] !!. Many probability metrics can be expressed as above by choosing a suitable function class H. Examples include Total Variation (TV), Kolmogorov and Wasserstein metrics [GS02, CGS10]. Based on the second and fourth derivatives of cumulant generating function, we define the following classes: H1 = n h(x) = φ(2)(hx, βi) : β 2 Bp(R) o , H2 = n h(x) = φ(4)(hx, βi) : β 2 Bp(R) o , H3 = n h(x) = hv, xi2φ(2)(hx, βi) : β 2 Bp(R), kvk2 = 1 o , where Bp(R) 2 Rp is the ball of radius R. Exact calculation of such probability metrics are often difficult. The general approach is to upper bound the distance by a more intuitive metric. In our case, we observe that dHj(x, y) for j = 1, 2, 3, can be easily upper bounded by dTV(x, y) up to a scaling constant, when the covariates have bounded support. We will further assume that the covariance matrix follows r-spiked model, i.e., ⌃= σ2I + Pr i=1 ✓iuiuT i , which is commonly encountered in practice [BS06]. This simply means that the first r eigenvalues of the covariance matrix are large and the rest are small and equal to each other. Large eigenvalues of ⌃correspond to the signal part and small ones (denoted by σ2) can be considered as the noise component. 4.2 Composite convergence rate We have the following per-step bound for the iterates generated by the Newton-Stein method, when the covariates are supported on a p-dimensional ball. Theorem 4.1. Assume that the covariates x1, x2, ..., xn are i.i.d. random vectors supported on a ball of radius p K with E[xi] = 0 and E ⇥ xixT i ⇤ = ⌃, where ⌃follows the r-spiked model. Further assume that the cumulant generating function φ has bounded 2nd-5th derivatives and that R is the radius of the projection PBp(R). For 'ˆβt t>0 given 5 by the Newton-Stein method for γ = 1, define the event E = n"""µ2(ˆβt) + µ4(ˆβt)h⌃ˆβt, ˆβti """ > ⇠, β⇤2 Bp(R) o (4.1) for some positive constant ⇠, and the optimal value β⇤. If n, |S| and p are sufficiently large, then there exist constants c, c1, c2 and depending on the radii K, R, P(E) and the bounds on |φ(2)| and |φ(4)| such that conditioned on the event E, with probability at least 1 −c/p2, we have $$ˆβt+1 −β⇤ $$ 2 ⌧1 $$ˆβt −β⇤ $$ 2 + ⌧2 $$ˆβt −β⇤ $$2 2, (4.2) where the coefficients ⌧1 and ⌧2 are deterministic constants defined as ⌧1 = D(x, z) + c1 r p min {p/ log(p)|S|, n/ log(n)}, ⌧2 = c2, and D(x, z) is defined as D(x, z) = k⌃k2 dH1(x, z) + k⌃k2 2R2 dH2(x, z) + dH3(x, z), (4.3) for a multivariate Gaussian random variable z with the same mean and covariance as xi’s. The bound in Eq. (4.2) holds with high probability, and the coefficients ⌧1 and ⌧2 are deterministic constants which will describe the convergence behavior of the Newton-Stein method. Observe that the coefficient ⌧1 is sum of two terms: D(x, z) measures how accurate the Hessian estimation is, and the second term depends on the sub-sample size and the data dimensions. Theorem 4.1 shows that the convergence of Newton-Stein method can be upper bounded by a compositely converging sequence, that is, the squared term will dominate at first giving a quadratic rate, then the convergence will transition into a linear phase as the iterate gets close to the optimal value. The coefficients ⌧1 and ⌧2 govern the linear and quadratic terms, respectively. The effect of sub-sampling appears in the coefficient of linear term. In theory, there is a threshold for the subsampling size |S|, namely O(n/ log(n)), beyond which further sub-sampling has no effect. The transition point between the quadratic and the linear phases is determined by the sub-sampling size and the properties of the data. The phase transition can be observed through the right plot in Figure 1. Using the above theorem, we state the following corollary. Corollary 4.2. Assume that the assumptions of Theorem 4.1 hold. For a constant δ ≥P & EC' , a tolerance ✏satisfying ✏≥20R ( c/p2 + δ , and for an iterate satisfying E ⇥ kˆβt −β⇤k2 ⇤ > ✏, the iterates of Newton-Stein method will satisfy, E h kˆβt+1 −β⇤k2 i ˜⌧1E h kˆβt −β⇤k2 i + ⌧2E h kˆβt −β⇤k2 2 i , where ˜⌧1 = ⌧1 + 0.1 and , ⌧1, ⌧2 are as in Theorem 4.1. The bound stated in the above corollary is an analogue of composite convergence (given in Eq. (4.2)) in expectation. Note that our results make strong assumptions on the derivatives of the cumulant generating function φ. We emphasize that these assumptions are valid for linear and logistic regressions. An example that does not fit in our scheme is Poisson regression with φ(z) = ez. However, we observed empirically that the algorithm still provides significant improvement. The following theorem states a sufficient condition for the convergence of composite sequence. Theorem 4.3. Let {ˆβt}t≥0 be a compositely converging sequence with convergence coefficients ⌧1 and ⌧2 as in Eq. (4.2) to the minimizer β⇤. Let the starting point satisfy $$ˆβ0 −β⇤ $$ 2 = # < (1 −⌧1)/⌧2 and define ⌅= ⇣ ⌧1# 1−⌧2#, # ⌘ . Then the sequence of `2-distances converges to 0. Further, the number of iterations to reach a tolerance of ✏can be upper bounded by inf⇠2⌅J (⇠), where J (⇠) = log2 ✓log (δ (⌧1/⇠+ ⌧2)) log (⌧1/⇠+ ⌧2) # ◆ + log(✏/⇠) log(⌧1 + ⌧2⇠) . (4.4) Above theorem gives an upper bound on the number of iterations until reaching a tolerance of ✏. The first and second terms on the right hand side of Eq. (4.4) stem from the quadratic and linear phases, respectively. 6 4.3 Algorithm parameters NewSt takes three input parameters and for those, we suggest near-optimal choices based on our theoretical results. • Sub-sample size: NewSt uses a subset of indices to approximate the covariance matrix ⌃. Corollary 5.50 of [Ver10] proves that a sample size of O(p) is sufficient for sub-gaussian covariates and that of O(p log(p)) is sufficient for arbitrary distributions supported in some ball to estimate a covariance matrix by its sample mean estimator. In the regime we consider, n ≫p, we suggest to use a sample size of |S| = O(p log(p)). • Rank: Many methods have been suggested to improve the estimation of covariance matrix and almost all of them rely on the concept of shrinkage [CCS10, DGJ13]. Eigenvalue thresholding can be considered as a shrinkage operation which will retain only the important second order information [EM15]. Choosing the rank threshold r can be simply done on the sample mean estimator of ⌃. After obtaining the sub-sampled estimate of the mean, one can either plot the spectrum and choose manually or use a technique from [DG13]. • Step size: Step size choices of NewSt are quite similar to Newton’s method (i.e., See [BV04]). The main difference comes from the eigenvalue thresholding. If the data follows the r-spiked model, the optimal step size will be close to 1 if there is no sub-sampling. However, due to fluctuations resulting from sub-sampling, we suggest the following step size choice for NewSt: γ = 2 1 + ˆσ2−O(p p/|S|) ˆσ2 . (4.5) In general, this formula yields a step size greater than 1, which is due to rank thresholding, providing faster convergence. See [EM15] for a detailed discussion. 5 Experiments In this section, we validate the performance of NewSt through extensive numerical studies. We experimented on two commonly used GLM optimization problems, namely, Logistic Regression (LR) and Linear Regression (OLS). LR minimizes Eq. (2.1) for the logistic function φ(z) = log(1+ ez), whereas OLS minimizes the same equation for φ(z) = z2. In the following, we briefly describe the algorithms that are used in the experiments: • Newton’s Method (NM) uses the inverse Hessian evaluated at the current iterate, and may achieve quadratic convergence. NM steps require O(np2 + p3) computation which makes it impractical for large-scale datasets. • Broyden-Fletcher-Goldfarb-Shanno (BFGS) forms a curvature matrix by cultivating the information from the iterates and the gradients at each iteration. Under certain assumptions, the convergence rate is locally super-linear and the per-iteration cost is comparable to that of first order methods. • Limited Memory BFGS (L-BFGS) is similar to BFGS, and uses only the recent few iterates to construct the curvature matrix, gaining significant performance in terms of memory. • Gradient Descent (GD) update is proportional to the negative of the full gradient evaluated at the current iterate. Under smoothness assumptions, GD achieves a linear convergence rate, with O(np) per-iteration cost. • Accelerated Gradient Descent (AGD) is proposed by Nesterov [Nes83], which improves over the gradient descent by using a momentum term. Performance of AGD strongly depends of the smoothness of the function. For all the algorithms, we use a constant step size that provides the fastest convergence. Sub-sample size, rank and the constant step size for NewSt is selected by following the guidelines in Section 4.3. We experimented over two real, two synthetic datasets which are summarized in Table 1. Synthetic data are generated through a multivariate Gaussian distribution and data dimensions are chosen so that Newton’s method still does well. The experimental results are summarized in Figure 2. We observe that NewSt provides a significant improvement over the classical techniques. The methods that come closer to NewSt is Newton’s method for moderate n and p and BFGS when n is large. Observe that the convergence rate of NewSt has a clear phase transition point. As argued earlier, this point depends on various factors including sub-sampling size |S| and data dimensions n, p, the 7 S3# CT#Slices# Covertype# Dataset:# S20# −4 −3 −2 −1 0 10 20 30 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Logistic Regression, rank=3 −4 −3 −2 −1 0 10 20 30 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Linear Regression, rank=3 −4 −3 −2 −1 0 10 20 30 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Logistic Regression, rank=20 −4 −3 −2 −1 0 10 20 30 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Linear Regression, rank=20 −4 −3 −2 −1 0 0.0 2.5 5.0 7.5 10.0 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Logistic Regression, rank=40 −4 −3 −2 −1 0 1 2 0 1 2 3 4 5 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Linear Regression, rank=40 −4 −3 −2 −1 0 0 10 20 30 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Logistic Regression, rank=2 −4 −3 −2 −1 0 1 2 3 4 5 Time(sec) log(Error) Method NewSt BFGS LBFGS Newton GD AGD Linear Regression, rank=2 Figure 2: Performance of various optimization methods on different datasets. Red straight line represents the proposed method NewSt. Algorithm parameters including the rank threshold is selected by the guidelines described in Section 4.3. rank threshold r and structure of the covariance matrix. The prediction of the phase transition point is an interesting line of research, which would allow further tuning of algorithm parameters. The optimal step-size for NewSt will typically be larger than 1 which is mainly due to the eigenvalue thresholding operation. This feature is desirable if one is able to obtain a large step-size that provides convergence. In such cases, the convergence is likely to be faster, yet more unstable compared to the smaller step size choices. We observed that similar to other second order algorithms, NewSt is susceptible to the step size selection. If the data is not well-conditioned, and the sub-sample size is not sufficiently large, algorithm might have poor performance. This is mainly because the subsampling operation is performed only once at the beginning. Therefore, it might be good in practice to sub-sample once in every few iterations. Dataset n p Reference, UCI repo [Lic13] CT slices 53500 386 [GKS+11] Covertype 581012 54 [BD99] S3 500000 300 3-spiked model, [DGJ13] S20 500000 300 20-spiked model, [DGJ13] Table 1: Datasets used in the experiments. 6 Discussion In this paper, we proposed an efficient algorithm for training GLMs. We call our algorithm Newton-Stein method (NewSt) as it takes a Newton update at each iteration relying on a Stein-type lemma. The algorithm requires a one time O(|S|p2) cost to estimate the covariance structure and O(np) per-iteration cost to form the update equations. We observe that the convergence of NewSt has a phase transition from quadratic rate to linear. This observation is justified theoretically along with several other guarantees for covariates with bounded support, such as per-step bounds, conditions for convergence, etc. Parameter selection guidelines of NewSt are based on our theoretical results. Our experiments show that NewSt provides high performance in GLM optimization. Relaxing some of the theoretical constraints is an interesting line of research. In particular, bounded support assumption as well as strong constraints on the cumulant generating functions might be loosened. Another interesting direction is to determine when the phase transition point occurs, which would provide a better understanding of the effects of sub-sampling and rank thresholding. Acknowledgements The author is grateful to Mohsen Bayati and Andrea Montanari for stimulating conversations on the topic of this work. The author would like to thank Bhaswar B. Bhattacharya and Qingyuan Zhao for carefully reading this article and providing valuable feedback. 8 References [Ama98] Shun-Ichi Amari, Natural gradient works efficiently in learning, Neural computation 10 (1998). [BCNN11] Richard H Byrd, Gillian M Chin, Will Neveitt, and Jorge Nocedal, On the use of stochastic hessian information in optimization methods for machine learning, SIAM Journal on Optimization (2011). [BD99] Jock A Blackard and Denis J Dean, Comparative accuracies of artificial neural networks and discriminant analysis in predicting forest cover types from cartographic variables, Computers and electronics in agriculture (1999), 131–151. [BHNS14] Richard H Byrd, SL Hansen, Jorge Nocedal, and Yoram Singer, A stochastic quasi-newton method for large-scale optimization, arXiv preprint arXiv:1401.7020 (2014). [Bis95] Christopher M. Bishop, Neural networks for pattern recognition, Oxford University Press, 1995. [Bot10] Lèon Bottou, Large-scale machine learning with stochastic gradient descent, COMPSTAT, 2010. [BS06] Jinho Baik and Jack W Silverstein, Eigenvalues of large sample covariance matrices of spiked population models, Journal of Multivariate Analysis 97 (2006), no. 6, 1382–1408. [BV04] Stephen Boyd and Lieven Vandenberghe, Convex optimization, Cambridge University Press, 2004. [CCS10] Jian-Feng Cai, Emmanuel J Candès, and Zuowei Shen, A singular value thresholding algorithm for matrix completion, SIAM Journal on Optimization 20 (2010), no. 4, 1956–1982. [CGS10] Louis HY Chen, Larry Goldstein, and Qi-Man Shao, Normal approximation by Steinâ ˘A ´Zs method, Springer Science, 2010. [DE15] Lee H Dicker and Murat A Erdogdu, Flexible results for quadratic forms with applications to variance components estimation, arXiv preprint arXiv:1509.04388 (2015). [DG13] David L Donoho and Matan Gavish, The optimal hard threshold for singular values is 4/sqrt3, arXiv:1305.5870 (2013). [DGJ13] David L Donoho, Matan Gavish, and Iain M Johnstone, Optimal shrinkage of eigenvalues in the spiked covariance model, arXiv preprint arXiv:1311.0851 (2013). [DHS11] John Duchi, Elad Hazan, and Yoram Singer, Adaptive subgradient methods for online learning and stochastic optimization, J. Mach. Learn. Res. 12 (2011), 2121–2159. [EM15] Murat A Erdogdu and Andrea Montanari, Convergence rates of sub-sampled Newton methods, arXiv preprint arXiv:1508.02810 (2015). [FHT10] Jerome Friedman, Trevor Hastie, and Rob Tibshirani, Regularization paths for generalized linear models via coordinate descent, Journal of statistical software 33 (2010), no. 1, 1. [FS12] Michael P Friedlander and Mark Schmidt, Hybrid deterministic-stochastic methods for data fitting, SIAM Journal on Scientific Computing 34 (2012), no. 3, A1380–A1405. [GKS+11] Franz Graf, Hans-Peter Kriegel, Matthias Schubert, Sebastian Pölsterl, and Alexander Cavallaro, 2d image registration in ct images using radial image descriptors, MICCAI 2011, Springer, 2011. [GS02] Alison L Gibbs and Francis E Su, On choosing and bounding probability metrics, ISR 70 (2002). [KF09] Daphne Koller and Nir Friedman, Probabilistic graphical models, MIT press, 2009. [Lic13] M. Lichman, UCI machine learning repository, 2013. [LRF10] Nicolas Le Roux and Andrew W Fitzgibbon, A fast natural newton method, ICML, 2010. [LRMB08] Nicolas Le Roux, Pierre-A Manzagol, and Yoshua Bengio, Topmoumoute online natural gradient algorithm, NIPS, 2008. [LWK08] Chih-J Lin, Ruby C Weng, and Sathiya Keerthi, Trust region newton method for logistic regression, JMLR (2008). [Mar10] James Martens, Deep learning via hessian-free optimization, ICML, 2010, pp. 735–742. [MN89] Peter McCullagh and John A Nelder, Generalized linear models, vol. 2, Chapman and Hall, 1989. [Nes83] Yurii Nesterov, A method for unconstrained convex minimization problem with the rate of convergence o (1/k2), Doklady AN SSSR, vol. 269, 1983, pp. 543–547. [Nes04] , Introductory lectures on convex optimization: A basic course, vol. 87, Springer, 2004. [SRB13] Mark Schmidt, Nicolas Le Roux, and Francis Bach, Minimizing finite sums with the stochastic average gradient, arXiv preprint arXiv:1309.2388 (2013). [Ste81] Charles M Stein, Estimation of the mean of a multivariate normal distribution, Annals of Statistics (1981), 1135–1151. [Ver10] Roman Vershynin, Introduction to the non-asymptotic analysis of random matrices, arXiv:1011.3027 (2010). [VP12] Oriol Vinyals and Daniel Povey, Krylov Subspace Descent for Deep Learning, AISTATS, 2012. 9 | 2015 | 253 |
5,762 | Is Approval Voting Optimal Given Approval Votes? Ariel D. Procaccia Computer Science Department Carnegie Mellon University arielpro@cs.cmu.edu Nisarg Shah Computer Science Department Carnegie Mellon University nkshah@cs.cmu.edu Abstract Some crowdsourcing platforms ask workers to express their opinions by approving a set of k good alternatives. It seems that the only reasonable way to aggregate these k-approval votes is the approval voting rule, which simply counts the number of times each alternative was approved. We challenge this assertion by proposing a probabilistic framework of noisy voting, and asking whether approval voting yields an alternative that is most likely to be the best alternative, given k-approval votes. While the answer is generally positive, our theoretical and empirical results call attention to situations where approval voting is suboptimal. 1 Introduction It is surely no surprise to the reader that modern machine learning algorithms thrive on large amounts of data — preferably labeled. Online labor markets, such as Amazon Mechanical Turk (www.mturk.com), have become a popular way to obtain labeled data, as they harness the power of a large number of human workers, and offer significantly lower costs compared to expert opinions. But this low-cost, large-scale data may require compromising quality: the workers are often unqualified or unwilling to make an effort, leading to a high level of noise in their submitted labels. To overcome this issue, it is common to hire multiple workers for the same task, and aggregate their noisy opinions to find more accurate labels. For example, TurKit [17] is a toolkit for creating and managing crowdsourcing tasks on Mechanical Turk. For our purposes its most important aspect is that it implements plurality voting: among available alternatives (e.g., possible labels), workers report the best alternative in their opinion, and the alternative that receives the most votes is selected. More generally, workers may be asked to report the k best alternatives in their opinion; such a vote is known as a k-approval vote. This has an advantage over plurality (1-approval) in noisy situations where a worker may not be able to pinpoint the best alternative accurately, but can recognize that it is among the top k alternatives [23].1 At the same time, k-approval votes, even for k > 1, are much easier to elicit than, say, rankings of the alternatives, not to mention full utility functions. For example, EteRNA [16] — a citizen science game whose goal is to design RNA molecules that fold into stable structures — uses 8-approval voting on submitted designs, that is, each player approves up to 8 favorite designs; the designs that received the largest number of approval votes are selected for synthesis in the lab. So, the elicitation of k-approval votes is common practice and has significant advantages. And it may seem that the only reasonable way to aggregate these votes, once collected, is via the approval voting rule, that is, tally the number of approvals for each alternative, and select the most approved one.2 But is it? In other words, do the k-approval votes contain useful information that can lead to 1k-approval is also used for picking k winners, e.g., various cities in the US such as San Francisco, Chicago, and New York use it in their so-called “participatory budgeting” process [15]. 2There is a subtle distinction, which we will not belabor, between k-approval voting, which is the focus of this paper, and approval voting [8], which allows voters to approve as many alternatives as they wish. The latter 1 significantly better outcomes, and is ignored by approval voting? Or is approval voting an (almost) optimal method for aggregating k-approval votes? Our Approach. We study the foregoing questions within the maximum likelihood estimation (MLE) framework of social choice theory, which posits the existence of an underlying ground truth that provides an objective comparison of the alternatives. From this viewpoint, the votes are noisy estimates of the ground truth. The optimal rule then selects the alternative that is most likely to be the best alternative given the votes. This framework has recently received attention from the machine learning community [18, 3, 2, 4, 21], in part due to its applications to crowdsourcing domains [20, 21, 9], where, indeed, there is a ground truth, and individual votes are objective. In more detail, in our model there exists a ground truth ranking over the alternatives, and each voter holds an opinion, which is another ranking that is a noisy estimate of the ground truth ranking. The opinions are drawn i.i.d. from the popular Mallows model [19], which is parametrized by the ground truth ranking, a noise parameter ϕ ∈[0, 1], and a distance metric d over the space of rankings. We use five well-studied distance metrics: the Kendall tau (KT) distance, the (Spearman) footrule distance, the maximum displacement distance, the Cayley distance, and the Hamming distance. When required to submit a k-approval vote, a voter simply approves the top k alternatives in his opinion. Given the votes, an alternative a is the maximum likelihood estimate (MLE) for the best alternative if the votes are most likely generated by a ranking that puts a first. We can now reformulate our question in slightly more technical terms: Is approval voting (almost) a maximum likelihood estimator for the best alternative, given votes drawn from the Mallows model? How does the answer depend on the noise parameter φ and the distance metric d? Our results. Our first result (Theorem 1) shows that under the Mallows model, the set of winners according to approval voting coincides with the set of MLE best alternatives under the Kendall tau distance, but under the other four distances there may exist approval winners that are not MLE best alternatives. Our next result (Theorem 2) confirms the intuition that the suboptimality of approval voting stems from the information that is being discarded: when only a single alternative is approved or disapproved in each vote, approval voting — which now utilizes all the information that can be gleaned from the anonymous votes — is optimal under mild conditions. Going back to the general case of k-approval votes, we show (Theorem 3) that even under the four distances for which approval voting is suboptimal, a weaker statement holds: in cases with very high or very low noise, every MLE best alternative is an approval winner (but some approval winners may not be MLE best alternatives). And our experiments, using real data, show that the accuracy of approval voting is usually quite close to that of the MLE in pinpointing the best alternative. We conclude that approval voting is a good way of aggregating k-approval votes in most situations. But our work demonstrates that, perhaps surprisingly, approval voting may be suboptimal, and, in situations where a high degree of accuracy is required, exact computation of the MLE best alternative is an option worth considering. We discuss our conclusions in more detail in Section 6. 2 Model Let [t] ≜{1, . . . , t}. Denote the set of alternatives by A, and let |A| = m. We use L(A) to denote the set of rankings (total orders) of the alternatives in A. For a ranking σ ∈L(A), let σ(i) denote the alternative occupying position i in σ, and let σ−1(a) denote the rank (position) of alternative a in σ. With a slight abuse of notation, let σ([t]) ≜{a ∈A|σ−1(a) ∈[t]}. We use σa↔b to denote the ranking obtained by swapping the positions of alternatives a and b in σ. We assume that there exists an unknown true ranking of the alternatives (the ground truth), denoted σ∗∈L(A). We also make the standard assumption of a uniform prior over the true ranking. framework of approval voting has been studied extensively, both from the axiomatic point of view [7, 8, 13, 22, 1], and the game-theoretic point of view [14, 12, 6]. However, even under this framework it is a standard assumption that votes are tallied by counting the number of times each alternative is approved, which is why we simply refer to the aggregation rule under consideration as approval voting. 2 Let N = {1, . . . , n} denote the set of voters. Each voter i has an opinion, denoted πi ∈L(A), which is a noisy estimate of the true ranking σ∗; the collection of opinions — the (opinion) profile — is denoted π. Fix k ∈[m]. A k-approval vote is a collection of k alternatives approved by a voter. When asked to submit a k-approval vote, voter i simply submits the vote Vi = πi([k]), which is the set of alternatives at the top k positions in his opinion. The collection of all votes is called the vote profile, and denoted V = {Vi}i∈[n]. For a ranking σ and a k-approval vote v, we say that v is generated from σ, denoted σ →k v (or σ →v when the value of k is clear from the context), if v = σ([k]). More generally, for an opinion profile π and a vote profile V , we say π →k V (or π →V ) if πi →k Vi for every i ∈[n]. Let Ak = {Ak ⊆A||Ak| = k} denote the set of all subsets of A of size k. A voting rule operating on k-approval votes is a function (Ak)n →A that returns a winning alternative given the votes.3 In particular, let us define the approval score of an alternative a, denoted SCAPP(a), as the number of voters that approve a. Then, approval voting simply chooses an alternative with the greatest approval score. Note that we do not break ties. Instead, we talk about the set of approval winners. Following the standard social choice literature, we model the opinion of each voter as being drawn i.i.d. from an underlying noise model. A noise model describes the probability of drawing an opinion σ given the true ranking σ∗, denoted Pr[σ|σ∗]. We say that a noise model is neutral if the labels of the alternatives do not matter, i.e., renaming alternatives in the true ranking σ and in the opinion σ∗, in the same fashion, keeps Pr[σ|σ∗] intact. A popular noise model is the Mallows model [19], under which Pr[σ|σ∗] = ϕd(σ,σ∗)/Zm ϕ . Here, d is a distance metric over the space of rankings. Parameter ϕ ∈[0, 1] governs the noise level; ϕ = 0 implies that the true ranking is generated with probability 1, and ϕ = 1 implies the uniform distribution. Zm ϕ is the normalization constant, which is independent of the true ranking σ∗given that distance d is neutral, i.e., renaming alternatives in the same fashion in two rankings does not change the distance between them. Below, we review five popular distances used in the social choice literature; they are all neutral. • The Kendall tau (KT) distance, denoted dKT, measures the number of pairs of alternatives over which two rankings disagree. Equivalently, it is the number of swaps required by bubble sort to convert one ranking into another. • The (Spearman) footrule (FR) distance, denoted dFR, measures the total displacement (absolute difference between positions) of all alternatives in two rankings. • The Maximum Displacement (MD) distance, denoted dMD, measures the maximum of the displacements of all alternatives between two rankings. • The Cayley (CY) distance, denoted dCY , measures the minimum number of swaps (not necessarily of adjacent alternatives) required to convert one ranking into another. • The Hamming (HM) distance, denoted dHM , measures the number of positions in which two rankings place different alternatives. Since opinions are drawn independently, the probability of a profile π given the true ranking σ∗is Pr[π|σ∗] = Qn i=1 Pr[πi|σ∗] ∝ϕd(π,σ∗), where d(π, σ∗) = Pn i=1 d(πi, σ∗). Once we fix the noise model, for a fixed k we can derive the probability of observing a given k-approval vote v: Pr[v|σ∗] = P σ∈L(A):σ→v Pr[σ|σ∗]. Then, the probability of drawing a given vote profile V is Pr[V |σ∗] = Qn i=1 Pr[Vi|σ∗]. Alternatively, this can also be expressed as Pr[V |σ∗] = P π∈L(A)n:π→V Pr[π|σ∗]. Hereinafter, we omit the domains L(A)n for π and L(A) for σ∗when they are clear from the context. Finally, given the vote profile V the likelihood of an alternative a being the best alternative in the true ranking σ∗is proportional to (via Bayes’ rule) Pr[V |σ∗(1) = a] = P σ∗:σ∗(1)=a Pr[V |σ∗]. Using the two expressions derived earlier for Pr[V |σ∗], and ignoring the normalization constant Zm ϕ from the probabilities, we define the likelihood function of a given votes V as L(V, a) ≜ X σ∗:σ∗(1)=a X π:π→V ϕd(π,σ∗) = X σ∗:σ∗(1)=a n Y i=1 " X πi:πi→Vi ϕd(πi,σ∗) # . (1) The maximum likelihood estimate (MLE) for the best alternative is given by arg maxa∈A L(V, a). Again, we do not break ties; we study the set of MLE best alternatives. 3Technically, this is a social choice function; a social welfare function returns a ranking of the alternatives. 3 3 Optimal Voting Rules At first glance, it seems natural to use approval voting (that is, returning the alternative that is approved by the largest number of voters) given k-approval votes. However, consider the following example with 4 alternatives (A = {a, b, c, d}) and 5 voters providing 2-approval votes: V1 = {b, c}, V2 = {b, c}, V3 = {a, d}, V4 = {a, b}, V5 = {a, c}. (2) Notice that alternatives a, b, and c receive 3 approvals each, while alternative d receives only a single approval. Approval voting may return any alternative other than alternative d. But is that always optimal? In particular, while alternatives b and c are symmetric, alternative a is qualitatively different due to different alternatives being approved along with a. This indicates that under certain conditions, it is possible that not all three alternatives are MLE for the best alternative. Our first result shows that this is indeed the case under three of the distance functions listed above, and a similar example works for a fourth. However, surprisingly, under the Kendall tau distance the MLE best alternatives are exactly the approval winners, and hence are polynomial-time computable, which stands in sharp contrast to the NP-hardness of computing them given rankings [5]. Theorem 1. The following statements hold for aggregating k-approval votes using approval voting. 1. Under the Mallows model with a fixed distance d ∈{dMD, dCY , dHM , dFR}, there exist a vote profile V with at most six 2-approval votes over at most five alternatives, and a choice for the Mallows parameter ϕ, such that not all approval winners are MLE best alternatives. 2. Under the Mallows model with the distance d = dKT, the set of MLE best alternatives coincides with the set of approval winners, for all vote profiles V and all values of the Mallows parameter ϕ ∈(0, 1). Proof. For the Mallows model with d ∈{dMD, dCY , dHM } and any ϕ ∈(0, 1), the profile from Equation (2) is a counterexample: alternatives b and c are MLE best alternatives, but a is not. For the Mallows model with d = dFR, we could not find a counter example with 4 alternatives; computer-based simulations generated the following counterexample with 5 alternatives that works for any ϕ ∈(0, 1): V1 = V2 = {a, b}, V3 = V4 = {c, d}, V5 = {a, e}, and V6 = {b, c}. Here, alternatives a, b, and c have the highest approval score of 3. However, alternative b has a strictly lower likelihood of being the best alternative than alternative a, and hence is not an MLE best alternative. The calculation verifying these counterexamples is presented in the online appendix (specifically, Appendix A). In contrast, for the Kendall tau distance, we show that all approval winners are MLE best alternatives, and vice-versa. We begin by simplifying the likelihood function L(V, a) from Equation (1) for the special case of the Mallows model with the Kendall tau distance. In this case, it is well known that the normalization constant satisfies Zm ϕ = Qm j=1 T j ϕ, where T j ϕ = Pj−1 i=0 ϕi. Consider a ranking πi such that πi →Vi. We can decompose dKT(πi, σ∗) into three types of pairwise mismatches: i) d1(πi, σ∗): The mismatches over pairs (b, c) where b ∈Vi and c ∈A \ Vi, or vice-versa; ii) d2(πi, σ∗): The mismatches over pairs (b, c) where b, c ∈Vi; and iii) d3(πi, σ∗): The mismatches over pairs (b, c) where b, c ∈A \ Vi. Note that every ranking πi that satisfies πi →Vi has identical mismatches of type 1. Let us denote the number of such mismatches by dKT(Vi, σ∗). Also, notice that d2(πi, σ∗) = dKT(πi|Vi, σ∗|Vi), where σ|S denotes the ranking of alternatives in S ⊆A dictated by σ. Similarly, d3(πi, σ∗) = dKT(πi|A\Vi, σ∗|A\Vi). Now, in the expression for the likelihood function L(V, a), L(V, a) = X σ∗:σ∗(1)=a n Y i=1 X πi:πi→V ϕdKT (Vi,σ∗)+dKT (πi|Vi ,σ∗|Vi )+dKT (πi|A\Vi ,σ∗|A\Vi ) = X σ∗:σ∗(1)=a n Y i=1 ϕdKT (Vi,σ∗) X π1 i ∈L(Vi) ϕdKT (π1 i ,σ∗|Vi ) · X π2 i ∈L(A\Vi) ϕdKT (π2 i ,σ∗|A\Vi ) = X σ∗:σ∗(1)=a n Y i=1 ϕdKT (Vi,σ∗) · Zk ϕ · Zm−k ϕ ∝ X σ∗:σ∗(1)=a ϕdKT (V,σ∗) ≜bL(V, a). 4 The second equality follows because every ranking πi that satisfies πi →V can be generated by picking rankings π1 i ∈L(Vi) and π2 i ∈L(A \ Vi), and concatenating them. The third equality follows from the definition of the normalization constant in the Mallows model. Finally, we denote dKT(V, σ∗) ≜Pn i=1 dKT(Vi, σ∗). It follows that maximizing L(V, a) amounts to maximizing bL(V, a). Note that dKT(V, σ∗) counts the number of times alternative a is approved while alternative b is not for all a, b ∈A with b ≻σ∗a. That is, let nV (a, −b) ≜|{i ∈[n]|a ∈Vi ∧b /∈Vi}|. Then, dKT(V, σ∗) = P a,b∈A:b≻σ∗a nV (a, −b). Also, note that for alternatives c, d ∈A, we have SCAPP(c) −SCAPP(d) = nV (c, −d) −nV (d, −c). Next, we show that bL(V, a) is a monotonically increasing function of SCAPP(a). Equivalently, bL(V, a) ≥bL(V, b) if and only if SCAPP(a) ≥SCAPP(b). Fix a, b ∈A. Consider the bijection between the sets of rankings placing a and b first, which simply swaps a and b (σ ↔σa↔b). Then, bL(V, a) −bL(V, b) = X σ∗:σ∗(1)=a ϕdKT (V,σ∗) −ϕdKT (V,σ∗ a↔b). (3) Fix σ∗such that σ∗(1) = a. Note that σ∗ a↔b(1) = b. Let C denote the set of alternatives positioned between a and b in σ∗(equivalently, in σ∗ a↔b). Now, σ∗and σ∗ a↔b have identical disagreements with V on a pair of alternatives (x, y) unless i) one of x and y belongs to {a, b}, and ii) the other belongs to C ∪{a, b}. Thus, the difference of disagreements of σ∗and σ∗ a↔b with V on such pairs is dKT(V, σ∗) −dKT(V, σ∗ a↔b) = h nV (b, −a) −nV (a, −b) i + X c∈C [nV (c, −a) + nV (b, −c) −nV (c, −b) −nV (a, −c)] = (|C| + 1) · SCAPP(b) −SCAPP(a) . Thus, SCAPP(a) = SCAPP(b) implies dKT(V, σ∗) = dKT(V, σ∗ a↔b) (and thus, bL(V, a) = bL(V, b)), and SCAPP(a) > SCAPP(b) implies dKT(V, σ∗) < dKT(V, σ∗ a↔b) (and thus, bL(V, a) > bL(V, b)). ■ Suboptimality of approval voting for distances other than the KT distance stems from the fact that in counting the number of approvals for a given alternative, one discards information regarding other alternatives approved along with the given alternative in various votes. However, no such information is discarded when only one alternative is approved (or not approved) in each vote. That is, given plurality (k = 1) or veto (k = m −1) votes, approval voting should be optimal, not only for the Mallows model but for any reasonable noise model. The next result formalizes this intuition. Theorem 2. Under a neutral noise model, the set of MLE best alternatives coincides with the set of approval winners 1. given plurality votes, if p1 > pi > 0, ∀i ∈{2, . . . , m}, where pi is the probability of the alternative in position i in the true ranking appearing in the first position in a sample, or 2. given veto votes, if 0 < q1 < qi, ∀i ∈{2, . . . , m}, where qi is the probability of the alternative in position i in the true ranking appearing in the last position in a sample. Proof. We show the proof for plurality votes. The case of veto votes is symmetric: in every vote, instead of a single approved alternative, we have a single alternative that is not approved. Note that the probability pi is independent of the true ranking σ∗due to the neutrality of the noise model. Consider a plurality vote profile V and an alternative a. Let T = {σ∗∈L(A)|σ∗(1) = a}. The likelihood function for a is given by L(V, a) = P σ∗∈T Pr[V |σ∗]. Under every σ∗∈T, the contribution of the SCAPP(a) plurality votes for a to the product Pr[V |σ∗] = Qn i=1 Pr[Vi|σ∗] is (p1)SCAPP(a). Note that the alternatives in A \ {a} are distributed among positions in {2, . . . , m} in all possible ways by the rankings in T. Let ib denote the position of alternative b ∈A \ {a}. Then, L(V, a) = pSCAPP(a) 1 · X {ib}b∈A\{a}={2,...,m} Y b∈A\{a} pSCAPP(b) ib = (p1)n·k · X {ib}b∈A\{a}={2,...,m} Y b∈A\{a} pib p1 SCAPP(b) . 5 The second transition holds because SCAPP(a) = n · k −P b∈A\{a} SCAPP(b). Our assumption in the theorem statement implies 0 < pib/p1 < 1 for ib ∈{2, . . . , m}. Now, it can be checked that for a, b ∈A, we have bL(V, a)/bL(V, b) = P i∈{2,...,m}(pi/p1)SCAPP(b)−SCAPP(a). Thus, SCAPP(a) ≥ SCAPP(b) if and only if bL(V, a) ≥bL(V, b), as required. ■ Note that the conditions of Theorem 2 are very mild. In particular, the condition for plurality votes is satisfied under the Mallows model with all five distances we consider, and the condition for veto votes is satisfied under the Mallows model with the Kendall tau, the footrule, and the maximum displacement distances. This is presented as Theorem 4 in the online appendix (Appendix B). 4 High Noise and Low Noise While Theorem 1 shows that there are situations where at least some of the approval winners may not be MLE best alternatives, it does not paint the complete picture. In particular, in both profiles used as counterexamples in the proof of Theorem 1, it holds that every MLE best alternative is an approval winner. That is, the optimal rule choosing an MLE best alternative works as if a tie-breaking scheme is imposed on top of approval voting. Does this hold true for all profiles? Part 2 of Theorem 1 gives a positive answer for the Kendall tau distance. In this section, we answer the foregoing question (largely) in the positive under the other four distance functions, with respect to the two ends of the Mallows spectrum: the case of low noise (ϕ →0), and the case of high noise (ϕ →1). The case of high noise is especially compelling (because that is when it becomes hard to pinpoint the ground truth), but both extreme cases have received special attention in the literature [24, 21, 11]. In contrast to previous results, which have almost always yielded different answers in the two cases, we show that every MLE best alternative is an approval winner in both cases, in almost every situation. We begin with the likelihood function for alternative a: L(V, a) = P σ∗:σ∗(1)=a P π:π→V ϕd(π,σ∗). When ϕ →0, maximizing L(V, a) requires minimizing the minimum exponent. Ties, if any, are broken using the number of terms achieving the minimum exponent, then the second smallest exponent, and so on. At the other extreme, let ϕ = 1−ϵ with ϵ →0. Using the first-order approximation (1 −ϵ)d(π,σ∗) ≈1 −ϵ · d(π, σ∗), maximizing L(V, a) requires minimizing the sum of d(π, σ∗) over all σ∗, π with σ∗(1) = a and π →V . Ties are broken using higher-order approximations. Let L0(V, a) = min σ∗:σ∗(1)=a min π:π→V d(π, σ∗) L1(V, a) = X σ∗:σ∗(1)=a X π:π→V d(π, σ∗). We are interested in minimizing L0(V, a) and L1(V, a); this leads to novel combinatorial problems that require detailed analysis. We are now ready for the main result of this section. Theorem 3. The following statements hold for using approval voting to aggregate k-approval votes drawn from the Mallows model. 1. Under the Mallows model with d ∈{dFR, dCY , dHM } and ϕ →0, and under the Mallows model with d ∈{dFR, dCY , dHM , dMD} and ϕ →1, it holds that for every k ∈[m −1], and every profile with k-approval votes, every MLE best alternative is an approval winner. 2. Under the Mallows model with d = dMD and ϕ →0, there exists a profile with seven 2approval votes over 5 alternatives such that no MLE best alternative is an approval winner. Before we proceed to the proof, we remark that in part 1 of the theorem, by ϕ →0 and ϕ →1, we mean that there exist 0 < ϕ∗ 0, ϕ∗ 1 < 1 such that the result holds for all ϕ ≤ϕ∗ 0 and ϕ ≥ϕ∗ 1, respectively. In part 2 of the theorem, we mean that for every ϕ∗> 0, there exists a ϕ < ϕ∗for which the negative result holds. Due to space constraints, we only present the proof for the Mallows model with d = dFR and ϕ →0; the full proof appears in the online appendix (Appendix C). Proof of Theorem 3 (only for d = dFR, φ →0). Let ϕ →0 in the Mallows model with the footrule distance. To analyze L0(V, ·), we first analyze minπ:π→V dFR(σ∗, π) for a fixed σ∗∈L(A). Then, we minimize it over σ∗, and show that the set of alternatives that appear first in the minimizers (i.e., the set of alternatives minimizing L0(V, a)) is exactly the set of approval winners. Since every MLE best alternative in the ϕ →0 case must minimize L0(V, ·), the result follows. 6 Fix σ∗∈L(A). Imagine a boundary between positions k and k + 1 in all rankings, i.e., between the approved and the non-approved alternatives. Now, given a profile π such that π →V , we first apply the following operation repeatedly. For i ∈[n], let an alternative a ∈A be in positions t and t′ in σ∗ and πi, respectively. If t and t′ are on the same side of the boundary (i.e., either both are at most k or both are greater than k) and t ̸= t′, then swap alternatives πi(t) and πi(t′) = a in πi. Note that this decreases the displacement of a in πi with respect to σ∗by |t −t′|, and increases the displacement of πi(t) by at most |t −t′|. Hence, the operation cannot increase dFR(π, σ∗). Let π∗denote the profile that we converge to. Note that π∗satisfies π∗→V (because we only swap alternatives on the same side of the boundary), dFR(π∗, σ∗) ≤dFR(π, σ∗), and the following condition: Condition X: for i ∈[n], every alternative that is on the same side of the boundary in σ∗and π∗ i is in the same position in both rankings. Because we started from an arbitrary profile π (subject to π →V ), it follows that it is sufficient to minimize dFR(π∗, σ∗) over all π∗with π∗→V satisfying condition X. However, we show that subject to π∗→V and condition X, dFR(π∗, σ∗) is actually a constant. Note that for i ∈[n], every alternative that is in different positions in π∗ i and σ∗must be on different sides of the boundary in the two rankings. It is easy to see that in every π∗ i , there is an equal number of alternatives on both sides of the boundary that are not in the same position as they are in σ∗. Now, we can divide the total footrule distance dFR(π∗, σ∗) into four parts: 1. Let i ∈[n] and t ∈[k] such that σ∗(t) ̸= π∗ i (t). Let a = σ∗(t) and (π∗ i )−1(a) = t′ > k. Then, the displacement t′ −t of a is broken into two parts: (i) t′ −k, and (ii) k −t. 2. Let i ∈[n] and t ∈[m] \ [k] such that σ∗(t) ̸= π∗ i (t). Let a = σ∗(t) and (π∗ i )−1(a) = t′ ≤k. Then, the displacement t −t′ of a is broken into two parts: (i) k −t′, and (ii) t −k. Because the number of alternatives of type 1 and 2 is equal for every π∗ i , we can see that the total displacements of types 1(i) and 2(ii) are equal, and so are the total displacements of types 1(ii) and 2(i). By observing that there are exactly n −SCAPP(σ∗(t)) instances of type 1 for a given value of t ≤k, and SCAPP(σ∗(t)) instances of type 2 for a given value of t > k, we conclude that dFR(π∗, σ∗) = 2 · " k X t=1 (n −SCAPP(σ∗(t))) · (k −t) + m X t=k+1 SCAPP(σ∗(t)) · (t −k) # . Minimizing this over σ∗reduces to minimizing Pm t=1 SCAPP(σ∗(t)) · (t −k). By the rearrangement inequality, this is minimized when alternatives are ordered in a non-increasing order of their approval scores. Note that exactly the set of approval winners appear first in such rankings. ■ Theorem 3 shows that under the Mallows model with d ∈{dFR, dCY , dHM }, every MLE best alternative is an approval winner for both ϕ →0 and ϕ →1. We believe that the same statement holds for all values of ϕ, as we were unable to find a counterexample despite extensive simulations. Conjecture 1. Under the Mallows model with distance d ∈{dFR, dCY , dHM }, every MLE best alternative is an approval winner for every ϕ ∈(0, 1). 5 Experiments We perform experiments with two real-world datasets — Dots and Puzzle [20] — to compare the performance of approval voting against that of the rule that is MLE for the empirically observed distribution of k-approval votes (and not for the Mallows model). Mao et al. [20] collected these datasets by asking workers on Amazon Mechanical Turk to rank either four images by the number of dots they contain (Dots), or four states of an 8-puzzle by their distance to the goal state (Puzzle). Hence, these datasets contain ranked votes over 4 alternatives in a setting where a true ranking of the alternatives indeed exists. Each dataset has four different noise levels; higher noise was created by increasing the task difficulty [20]. For Dots, ranking images with a smaller difference in the number of dots leads to high noise, and for Puzzle, ranking states farther away from the goal state leads to high noise. Each noise level of each dataset contains 40 profiles with approximately 20 votes each. 7 In our experiments, we extract 2-approval votes from the ranked votes by taking the top 2 alternatives in each vote. Given these 2-approval votes, approval voting returns an alternative with the largest number of approvals. To apply the MLE rule, however, we need to learn the underlying distribution of 2-approval votes. To that end, we partition the set of profiles in each noise level of each dataset into training (90%) and test (10%) sets. We use a high fraction of the profiles for training in order to examine the maximum advantage that the MLE rule may have over approval voting. Given the training profiles (which approval voting simply ignores), the MLE rule learns the probabilities of observing each of the 6 possible 2-subsets of the alternatives given a fixed true ranking.4 On the test data, the MLE rule first computes the likelihood of each ranking given the votes. Then, it computes the likelihood of each alternative being the best by adding the likelihoods of all rankings that put the alternative first. It finally returns an alternative with the highest likelihood. We measure the accuracy of both methods by their frequency of being able to pinpoint the correct best alternative. For each noise level in each dataset, the accuracy is averaged over 1000 simulations with random partitioning of the profiles into training and test sets. 1 2 3 4 0.5 0.6 0.7 0.8 0.9 Noise Level Accuracy (a) Dots 1 2 3 4 0.5 0.6 0.7 0.8 0.9 Noise Level Accuracy MLE Approval (b) Puzzle Fig. 1: The MLE rule (trained on 90% of the profiles) and approval voting for 2-approval votes. Figures 1(a) and 1(b) show that in general the MLE rule does achieve greater accuracy than approval voting. However, the increase is at most 4.5%, which may not be significant in some contexts. 6 Discussion Our main conclusion from the theoretical and empirical results is that approval voting is typically close to optimal for aggregating k-approval votes. However, the situation is much subtler than it appears at first glance. Moreover, our theoretical analysis is restricted by the assumption that the votes are drawn from the Mallows model. A recent line of work in social choice theory [9, 10] has focused on designing voting rules that perform well — simultaneously — under a wide variety of noise models. It seems intuitive that approval voting would work well for aggregating k-approval votes under any reasonable noise model; an analysis extending to a wide family of realistic noise models would provide a stronger theoretical justification for using approval voting. On the practical front, it should be emphasized that approval voting is not always optimal. When maximum accuracy matters, one may wish to switch to the MLE rule. However, learning and applying the MLE rule is much more demanding. In our experiments we learn the entire distribution over k-approval votes given the true ranking. While for 2-approval or 3-approval votes over 4 alternatives we only need to learn 6 probability values, in general for k-approval votes over m alternatives one would need to learn m k probability values, and the training data may not be sufficient for this purpose. This calls for the design of estimators for the best alternative that achieve greater statistical efficiency by avoiding the need to learn the entire underlying distribution over votes. 4Technically, we learn a neutral noise model where the probability of a subset of alternatives being observed only depends on the positions of the alternatives in the true ranking. 8 References [1] C. Al´os-Ferrer. A simple characterization of approval voting. Social Choice and Welfare, 27(3):621–625, 2006. [2] 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. [3] H. Azari Soufiani, D. C. Parkes, and L. Xia. Random utility theory for social choice. In Proc. of 26th NIPS, pages 126–134, 2012. [4] H. Azari Soufiani, D. C. Parkes, and L. Xia. Computing parametric ranking models via rankbreaking. In Proc. of 31st ICML, pages 360–368, 2014. [5] J. Bartholdi, C. A. Tovey, and M. A. Trick. Voting schemes for which it can be difficult to tell who won the election. Social Choice and Welfare, 6:157–165, 1989. [6] D. Baumeister, G. Erd´elyi, E. Hemaspaandra, L. A. Hemaspaandra, and J. Rothe. Computational aspects of approval voting. In Handbook on Approval Voting, pages 199–251. Springer, 2010. [7] S. J. Brams. Mathematics and democracy: Designing better voting and fair-division procedures. Princeton University Press, 2007. [8] S. J. Brams and P. C. Fishburn. Approval Voting. Springer, 2nd edition, 2007. [9] I. Caragiannis, A. D. Procaccia, and N. Shah. When do noisy votes reveal the truth? In Proc. of 14th EC, pages 143–160, 2013. [10] I. Caragiannis, A. D. Procaccia, and N. Shah. Modal ranking: A uniquely robust voting rule. In Proc. of 28th AAAI, pages 616–622, 2014. [11] E. Elkind and N. Shah. Electing the most probable without eliminating the irrational: Voting over intransitive domains. In Proc. of 30th UAI, pages 182–191, 2014. [12] G. Erd´elyi, M. Nowak, and J. Rothe. Sincere-strategy preference-based approval voting fully resists constructive control and broadly resists destructive control. Math. Log. Q., 55(4):425– 443, 2009. [13] P. C. Fishburn. Axioms for approval voting: Direct proof. Journal of Economic Theory, 19(1):180–185, 1978. [14] P. C. Fishburn and S. J. Brams. Approval voting, condorcet’s principle, and runoff elections. Public Choice, 36(1):89–114, 1981. [15] A. Goel, A. K. Krishnaswamy, S. Sakshuwong, and T. Aitamurto. Knapsack voting. In Proc. of Collective Intelligence, 2015. [16] J. Lee, W. Kladwang, M. Lee, D. Cantu, M. Azizyan, H. Kim, A. Limpaecher, S. Yoon, A. Treuille, and R. Das. RNA design rules from a massive open laboratory. Proceedings of the National Academy of Sciences, 111(6):2122–2127, 2014. [17] G. Little, L. B. Chilton, M. Goldman, and R. C. Miller. TurKit: Human computation algorithms on Mechanical Turk. In Proc. of 23rd UIST, pages 57–66, 2010. [18] T. Lu and C. Boutilier. Learning Mallows models with pairwise preferences. In Proc. of 28th ICML, pages 145–152, 2011. [19] C. L. Mallows. Non-null ranking models. Biometrika, 44:114–130, 1957. [20] A. Mao, A. D. Procaccia, and Y. Chen. Better human computation through principled voting. In Proc. of 27th AAAI, pages 1142–1148, 2013. [21] 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. [22] M. R. Sertel. Characterizing approval voting. Journal of Economic Theory, 45(1):207–211, 1988. [23] N. Shah, D. Zhou, and Y. Peres. Approval voting and incentives in crowdsourcing. In Proc. of 32nd ICML, pages 10–19, 2015. [24] H. P. Young. Condorcet’s theory of voting. The American Political Science Review, 82(4):1231–1244, 1988. 9 | 2015 | 254 |
5,763 | Optimization Monte Carlo: Efficient and Embarrassingly Parallel Likelihood-Free Inference Edward Meeds Informatics Institute University of Amsterdam tmeeds@gmail.com Max Welling∗ Informatics Institute University of Amsterdam welling.max@gmail.com Abstract We describe an embarrassingly parallel, anytime Monte Carlo method for likelihood-free models. The algorithm starts with the view that the stochasticity of the pseudo-samples generated by the simulator can be controlled externally by a vector of random numbers u, in such a way that the outcome, knowing u, is deterministic. For each instantiation of u we run an optimization procedure to minimize the distance between summary statistics of the simulator and the data. After reweighing these samples using the prior and the Jacobian (accounting for the change of volume in transforming from the space of summary statistics to the space of parameters) we show that this weighted ensemble represents a Monte Carlo estimate of the posterior distribution. The procedure can be run embarrassingly parallel (each node handling one sample) and anytime (by allocating resources to the worst performing sample). The procedure is validated on six experiments. 1 Introduction Computationally demanding simulators are used across the full spectrum of scientific and industrial applications, whether one studies embryonic morphogenesis in biology, tumor growth in cancer research, colliding galaxies in astronomy, weather forecasting in meteorology, climate changes in the environmental science, earthquakes in seismology, market movement in economics, turbulence in physics, brain functioning in neuroscience, or fabrication processes in industry. Approximate Bayesian computation (ABC) forms a large class algorithms that aims to sample from the posterior distribution over parameters for these likelihood-free (a.k.a. simulator based) models. Likelihoodfree inference, however, is notoriously inefficient in terms of the number of simulation calls per independent sample. Further, like regular Bayesian inference algorithms, care must be taken so that posterior sampling targets the correct distribution. The simplest ABC algorithm, ABC rejection sampling, can be fully parallelized by running independent processes with no communication or synchronization requirements. I.e. it is an embarrassingly parallel algorithm. Unfortunately, as the most inefficient ABC algorithm, the benefits of this title are limited. There has been considerable progress in distributed MCMC algorithms aimed at large-scale data problems [2, 1]. Recently, a sequential Monte Carlo (SMC) algorithm called “the particle cascade” was introduced that emits streams of samples asynchronously with minimal memory management and communication [17]. In this paper we present an alternative embarrassingly parallel sampling approach: each processor works independently, at full capacity, and will indefinitely emit independent samples. The main trick is to pull random number generation outside of the simulator and treat the simulator as a deterministic piece of code. We then minimize the difference ∗Donald Bren School of Information and Computer Sciences University of California, Irvine, and Canadian Institute for Advanced Research. 1 between observations and the simulator output over its input parameters and weight the final (optimized) parameter value with the prior and the (inverse of the) Jacobian. We show that the resulting weighted ensemble represents a Monte Carlo estimate of the posterior. Moreover, we argue that the error of this procedure is O(ϵ) if the optimization gets ϵ-close to the optimal value. This “Optimization Monte Carlo” (OMC) has several advantages: 1) it can be run embarrassingly parallel, 2) the procedure generates independent samples and 3) the core procedure is now optimization rather than MCMC. Indeed, optimization as part of a likelihood-free inference procedure has recently been proposed [12]; using a probabilistic model of the mapping from parameters to differences between observations and simulator outputs, they apply “Bayesian Optimization” (e.g. [13, 21]) to efficiently perform posterior inference. Note also that since random numbers have been separated out from the simulator, powerful tools such as “automatic differentiation” (e.g. [14]) are within reach to assist with the optimization. In practice we find that OMC uses far fewer simulations per sample than alternative ABC algorithms. The approach of controlling randomness as part of an inference procedure is also found in a related class of parameter estimation algorithms called indirect inference [11]. Connections between ABC and indirect inference have been made previously by [7] as a novel way of creating summary statistics. An indirect inference perspective led to an independently developed version of OMC called the “reverse sampler” [9, 10]. In Section 2 we briefly introduce ABC and present it from a novel viewpoint in terms of random numbers. In Section 3 we derive ABC through optimization from a geometric point of view, then proceed to generalize it to higher dimensions. We show in Section 4 extensive evidence of the correctness and efficiency of our approach. In Section 5 we describe the outlook for optimizationbased ABC. 2 ABC Sampling Algorithms The primary interest in ABC is the posterior of simulator parameters θ given a vector of (statistics of) observations y, p(θ|y). The likelihood p(y|θ) is generally not available in ABC. Instead we can use the simulator as a generator of pseudo-samples x that reside in the same space as y. By treating x as auxiliary variables, we can continue with the Bayesian treatment: p(θ|y) = p(θ)p(y|θ) p(y) ≈ p(θ) R pϵ(y|x)p(x|θ) dx R p(θ) R pϵ(y|x)p(x|θ) dx dθ (1) Of particular importance is the choice of kernel measuring the discrepancy between observations y and pseudo-data x. Popular choices for kernels are the Gaussian kernel and the uniform ϵ-tube/ball. The bandwidth parameter ϵ (which may be a vector ϵ accounting for relative importance of each statistic) plays critical role: small ϵ produces more accurate posteriors, but is more computationally demanding, whereas large ϵ induces larger error but is cheaper. We focus our attention on population-based ABC samplers, which include rejection sampling, importance sampling (IS), sequential Monte Carlo (SMC) [6, 20] and population Monte Carlo [3]. In rejection sampling, we draw parameters from the prior θ ∼p(θ), then run a simulation at those parameters x ∼p(x|θ); if the discrepancy ρ(x, y) < ϵ, then the particle is accepted, otherwise it is rejected. This is repeated until n particles are accepted. Importance sampling generalizes rejection sampling using a proposal distribution qφ(θ) instead of the prior, and produces samples with weights wi ∝p(θ)/q(θ). SMC extends IS to multiple rounds with decreasing ϵ, adapting their particles after each round, such that each new population improves the approximation to the posterior. Our algorithm has similar qualities to SMC since we generate a population of n weighted particles, but differs significantly since our particles are produced by independent optimization procedures, making it completely parallel. 3 A Parallel and Efficient ABC Sampling Algorithm Inherent in our assumptions about the simulator is that internally there are calls to a random number generator which produces the stochasticity of the pseudo-samples. We will assume for the moment that this can be represented by a vector of uniform random numbers u which, if known, would make the simulator deterministic. More concretely, we assume that any simulation output x can be represented as a deterministic function of parameters θ and a vector of random numbers u, 2 (a) Dθ = Dy (b) Dθ < Dy Figure 1: Illustration of OMC geometry. (a) Dashed lines indicate contours f(θ, u) over θ for several u. For three values of u, their initial and optimal θ positions are shown (solid blue/white circles). Within the grey acceptance region, the Jacobian, indicated by the blue diagonal line, describes the relative change in volume induced in f(θ, u) from a small change in θ. Corresponding weights ∝1/|J| are shown as vertical stems. (b) When Dθ < Dy, here 1 < 2, the change in volume is proportional to the length of the line segment inside the ellipsoid (|JT J|1/2). The orange line indicates the projection of the observation onto the contour of f(θ, u) (in this case, identical to the optimal). i.e. x = f(θ, u). This assumption has been used previously in ABC, first in “coupled ABC” [16] and also in an application of Hamiltonian dynamics to ABC [15]. We do not make any further assumptions regarding u or p(u), though for some problems their dimension and distribution may be known a priori. In these cases it may be worth employing Sobol or other low-discrepancy sequences to further improve the accuracy of any Monte Carlo estimates. We will first derive a dual representation for the ABC likelihood function pϵ(y|θ) (see also [16]), pϵ(y|θ) = Z pϵ(y|x)p(x|θ) dx = Z Z pϵ(y|x)I[x = f(θ, u)]p(u) dxdu (2) = Z pϵ(y|f(θ, u))p(u) du (3) leading to the following Monte Carlo approximation of the ABC posterior, pϵ(θ|y) ∝p(θ) Z p(u)pϵ(y|f(u, θ)) du ≈1 n X i pϵ(y|f(ui, θ))p(θ) ui ∼p(u) (4) Since pϵ is a kernel that only accepts arguments y and f(ui, θ) that are ϵ close to each other (for values of ϵ that are as small as possible), Equation 4 tells us that we should first sample values for u from p(u) and then for each such sample find the value for θo i that results in y = f(θo i , u). In practice we want to drive these values as close to each other as possible through optimization and accept an O(ϵ) error if the remaining distance is still O(ϵ). Note that apart from sampling the values for u this procedure is deterministic and can be executed completely in parallel, i.e. without any communication. In the following we will assume a single observation vector y, but the approach is equally applicable to a dataset of N cases. 3.1 The case Dθ = Dy We will first study the case when the number of parameters θ is equal to the number of summary statistics y. To understand the derivation it helps to look at Figure 1a which illustrates the derivation for the one dimensional case. In the following we use the following abbreviation: fi(θ) stands for f(θ, ui). The general idea is that we want to write the approximation to the posterior as a mixture of small uniform balls (or delta peaks in the limit): p(θ|y) ≈1 n X i pϵ(y|f(ui, θ))p(θ) ≈1 n X i wiUϵ(θ|θ∗ i )p(θ) (5) 3 with wi some weights that we will derive shortly. Then, if we make ϵ small enough we can replace any average of a sufficiently smooth function h(θ) w.r.t. this approximate posterior simply by evaluating h(θ) at some arbitrarily chosen points inside these balls (for instance we can take the center of the ball θ∗ i ), Z h(θ)p(θ|y) dθ ≈1 n X i h(θ∗ i )wip(θ∗ i ) (6) To derive this expression we first assume that: pϵ(y|fi(θ)) = C(ϵ)I[||y −fi(θ)||2 ≤ϵ2] (7) i.e. a ball of radius ϵ. C(ϵ) is the normalizer which is immaterial because it cancels in the posterior. For small enough ϵ we claim that we can linearize fi(θ) around θo i : ˆfi(θ) = fi(θo i ) + Jo i (θ −θo i ) + Ri, Ri = O(||θ −θo i ||2) (8) where Jo i is the Jacobian matrix with columns ∂fi(θo i ) ∂θd . We take θo i to be the end result of our optimization procedure for sample ui. Using this we thus get, ||y −fi(θ)||2 ≈||(y −fi(θo i )) −Jo i (θ −θo i ) −Ri||2 (9) We first note that since we assume that our optimization has ended up somewhere inside the ball defined by ||y −fi(θ)||2 ≤ϵ2 we can assume that ||y −fi(θo i )|| = O(ϵ). Also, since we only consider values for θ that satisfy ||y −fi(θ)||2 ≤ϵ2, and furthermore assume that the function fi(θ) is Lipschitz continuous in θ it follows that ||θ −θo i || = O(ϵ) as well. All of this implies that we can safely ignore the remaining term Ri (which is of order O(||θ −θo i ||2) = O(ϵ2)) if we restrict ourselves to the volume inside the ball. The next step is to view the term I[||y −fi(θ)||2 ≤ϵ2] as a distribution in θ. With the Taylor expansion this results in, I[(θ −θo i −Jo,−1 i (y −fi(θo i )))T JoT i Jo i (θ −θo i −Jo,−1 i (y −fi(θo i ))) ≤ϵ2] (10) This represents an ellipse in θ-space with a centroid θ∗ i and volume Vi given by θ∗ i = θo i + Jo,−1 i (y −fi(θo i )) Vi = γ q det(JoT i Jo i ) (11) with γ a constant independent of i. We can approximate the posterior now as, p(θ|y) ≈1 κ X i Uϵ(θ|θ∗ i )p(θ) q det(JoT i Jo i ) ≈1 κ X i δ(θ −θ∗ i )p(θ∗ i ) q det(JoT i Jo i ) (12) where in the last step we have send ϵ →0. Finally, we can compute the constant κ through normalization, κ = P i p(θ∗ i ) det(JoT i Jo i )−1/2. The whole procedure is accurate up to errors of the order O(ϵ2), and it is assumed that the optimization procedure delivers a solution that is located within the epsilon ball. If one of the optimizations for a certain sample ui did not end up within the epsilon ball there can be two reasons: 1) the optimization did not converge to the optimal value for θ, or 2) for this value of u there is no solution for which f(θ|u) can get within a distance ϵ from the observation y. If we interpret ϵ as our uncertainty in the observation y, and we assume that our optimization succeeded in finding the best possible value for θ, then we should simply reject this sample θi. However, it is hard to detect if our optimization succeeded and we may therefore sometimes reject samples that should not have been rejected. Thus, one should be careful not to create a bias against samples ui for which the optimization is difficult. This situation is similar to a sampler that will not mix to remote local optima in the posterior distribution. 3.2 The case Dθ < Dy This is the overdetermined case and here the situation as depicted in Figure 1b is typical: the manifold that f(θ, ui) traces out as we vary θ forms a lower dimensional surface in the Dy dimensional enveloping space. This manifold may or may not intersect with the sphere centered at the observation y (or ellipsoid, for the general case ϵ instead of ϵ). Assume that the manifold does intersect the 4 epsilon ball but not y. Since we trust our observation up to distance ϵ, we may simple choose to pick the closest point θ∗ i to y on the manifold, which is given by, θ∗ i = θo i + Jo† i (y −fi(θo i )) Jo† i = (JoT i Jo i )−1JoT i (13) where Jo† i is the pseudo-inverse. We can now define our ellipse around this point, shifting the center of the ball from y to fi(θ∗ i ) (which do not coincide in this case). The uniform distribution on the ellipse in θ-space is now defined in the Dθ dimensional manifold and has volume Vi = γ det(JoT i Jo i )−1/2. So once again we arrive at almost the same equation as before (Eq. 12) but with the slightly different definition of the point θ∗ i given by Eq. 13. Crucially, since ||y −fi(θ∗ i )|| ≤ϵ2 and if we assume that our optimization succeeded, we will only make mistakes of order O(ϵ2). 3.3 The case Dθ > Dy This is the underdetermined case in which it is typical that entire manifolds (e.g. hyperplanes) may be a solution to ||y −fi(θ∗ i )|| = 0. In this case we can not approximate the posterior with a mixture of point masses and thus the procedure does not apply. However, the case Dθ > Dy is less interesting than the other ones above as we expect to have more summary statistics than parameters for most problems. 4 Experiments The goal of these experiments is to demonstrate 1) the correctness of OMC and 2) the relative efficiency of OMC in relation to two sequential MC algorithms, SMC (aka population MC [3]) and adaptive weighted SMC [5]. To demonstrate correctness, we show histograms of weighted samples along with the true posterior (when known) and, for three experiments, the exact OMC weighted samples (when the exact Jacobian and optimal θ is known). To demonstrate efficiency, we compute the mean simulations per sample (SS)—the number of simulations required to reach an ϵ threshold— and the effective sample size (ESS), defined as 1/wT w. Additionally, we may measure ESS/n, the fraction of effective samples in the population. ESS is a good way of detecting whether the posterior is dominated by a few particles and/or how many particles achieve discrepancy less than epsilon. There are several algorithmic options for OMC. The most obvious is to spawn independent processes, draw u for each, and optimize until ϵ is reached (or a max nbr of simulations run), then compute Jacobians and particle weights. Variations could include keeping a sorted list of discrepancies and allocating computational resources to the worst particle. However, to compare OMC with SMC, in this paper we use a sequential version of OMC that mimics the epsilon rounds of SMC. Each simulator uses different optimization procedures, including Newton’s method for smooth simulators, and random walk optimization for others; Jacobians were computed using one-sided finite differences. To limit computational expense we placed a max of 1000 simulations per sample per round for all algorithms. Unless otherwise noted, we used n = 5000 and repeated runs 5 times; lack of error bars indicate very low deviations across runs. We also break some of the notational convention used thus far so that we can specify exactly how the random numbers translate into pseudo-data and the pseudo-data into statistics. This is clarified for each example. Results are explained in Figures 2 to 4. 4.1 Normal with Unknown Mean and Known Variance The simplest example is the inference of the mean θ of a univariate normal distribution with known variance σ2. The prior distribution π(θ) is normal with mean θ0 and variance kσ2, where k > 0 is a factor relating the dispersions of θ and the data yn. The simulator can generate data according to the normal distribution, or deterministically if the random effects rum are known: π(xm|θ) = N(xm|θ, σ2) =⇒ xm = θ + rum (14) where rum = σ √ 2 erf−1(2um −1) (using the inverse CDF). A sufficient statistic for this problem is the average s(x) = 1 M P m xm. Therefore we have f(θ, u) = θ + R(u) where R(u) = P rum/M (the average of the random effects). In our experiment we set M = 2 and y = 0. The exact Jacobian and θo i can be computed for this problem: for a draw ui, Ji = 1; if s(y) is the mean of the observations y, then by setting f(θo i , ui) = s(y) we find θo i = s(y) −R(ui). Therefore the exact weights are wi ∝π(θo i ), allowing us to compare directly with an exact posterior based on our dual representation by u (shown by orange circles in Figure 2 top-left). We used Newton’s method to optimize each particle. 5 Figure 2: Left: Inference of unknown mean. For ϵ 0.1, OMC uses 3.7 SS; AW/SMC uses 20/20 SS; at ϵ 0.01, OMC uses 4 SS (only 0.3 SS more), and SMC jumps to 110 SS. For all algorithms and ϵ values, ESS/n=1. Right: Inference for mixture of normals. Similar results for OMC; at ϵ 0.025 AW/SMC had 40/50 SS and at ϵ 0.01 has 105/120 SS. The ESS/n remained at 1 for OMC, but decreased to 0.06/0.47 (AW/SMC) at ϵ 0.025, and 0.35 for both at ϵ 0.01. Not only does the ESS remain high for OMC, but it also represents the tails of the distribution well, even at low ϵ. 4.2 Normal Mixture A standard illustrative ABC problem is the inference of the mean θ of a mixture of two normals [19, 3, 5]: p(x|θ) = ρ N(θ, σ2 1) + (1 −ρ) N(θ, σ2 2), with π(θ) = U(θa, θb) where hyperparameters are ρ = 1/2, σ2 1 = 1, σ2 2 = 1/100, θa = −10, θb = 10, and a single observation scalar y = 0. For this problem M = 1 so we drop the subscript m. The true posterior is simply p(θ|y = 0) ∝ ρ N(θ, σ2 1) + (1 −ρ) N(θ, σ2 2), θ ∈{−10, 10}. In this problem there are two random numbers u1 and u2, one for selecting the mixture component and the other for the random innovation; further, the statistic is the identity, i.e. s(x) = x: x = [u1 < ρ](θ + σ1 √ 2 erf(2u2 −1)) + [u1 ≥ρ](θ + σ2 √ 2 erf(2u2 −1)) (15) = θ + √ 2 erf(2u2 −1)σ[u1<ρ] 1 σ[u1≥ρ] 2 = θ + R(u) (16) where R(u) = √ 2 erf(2u2 −1)σ[u1<ρ] 1 σ[u1≥ρ] 2 . As with the previous example, the Jacobian is 1 and θo i = y −R(ui) is known exactly. This problem is notable for causing performance issues in ABC-MCMC [19] and its difficulty in targeting the tails of the posterior [3]; this is not the case for OMC. 4.3 Exponential with Unknown Rate In this example, the goal is to infer the rate θ of an exponential distribution, with a gamma prior p(θ) = Gamma(θ|α, β), based on M draws from Exp(θ): p(xm|θ) = Exp(xm|θ) = θ exp(−θxm) =⇒ xm = −1 θ ln(1 −um) = 1 θrum (17) where rum = −ln(1 −um) (the inverse CDF of the exponential). A sufficient statistic for this problem is the average s(x) = P m xm/M. Again, we have exact expressions for the Jacobian and θo i , using f(θ, ui) = R(ui)/θ, Ji = −R(ui)/θ2 and θo i = R(ui)/s(y). We used M = 2, s(y) = 10 in our experiments. 4.4 Linked Mean and Variance of Normal In this example we link together the mean and variance of the data generating function as follows: p(xm|θ) = N(xm|θ, θ2) =⇒ xm = θ + θ √ 2 erf−1(2um −1) = θrum (18) 6 Figure 3: Left: Inference of rate of exponential. A similar result wrt SS occurs for this experiment: at ϵ 1, OMC had 15 v 45/50 for AW/SMC; at ϵ 0.01, SS was 28 OMC v 220 AW/SMC. ESS/n dropping with below 1: OMC drops at ϵ 1 to 0.71 v 0.97 for SMC; at ϵ 0.1 ESS/n remains the same. Right: Inference of linked normal. ESS/n drops significantly for OMC: at ϵ 0.25 to 0.32 and at ϵ 0.1 to 0.13, while it remains high for SMC (0.91 to 0.83). This is the result the inability of every ui to achieve ρ < ϵ, whereas for SMC, the algorithm allows them to “drop” their random numbers and effectively switch to another. This was verified by running an expensive fine-grained optimization, resulting in 32.9% and 13.6% optimized particles having ρ under ϵ 0.25/0.1. Taking this inefficiency into account, OMC still requires 130 simulations per effective sample v 165 for SMC (ie 17/0.13 and 136/0.83). where rum = 1+ √ 2 erf−1(2um −1). We put a positive constraint on θ: p(θ) = U(0, 10). We used 2 statistics, the mean and variance of M draws from the simulator: s1(x) = 1 M xm =⇒f1(θ, u) = θR(u) ∂f1(θ, u) ∂θ = R(u) (19) s2(x) = 1 M X m (xm −s1(x))2 =⇒f2(θ, u) = θ2V (u) ∂f2(θ, u) ∂θ = 2θV (u) (20) where V (u) = P m r2 um/M −R(u)2 and R(u) = P m rum/M; the exact Jacobian is therefore [R(u), 2θV (u)]T . In our experiments M = 10, s(y) = [2.7, 12.8]. 4.5 Lotka-Volterra The simplest Lotka-Volterra model explains predator-prey populations over time, controlled by a set of stochastic differential equations: dx1 dt = θ1x1 −θ2x1x2 + r1 dx2 dt = −θ2x2 −θ3x1x2 + r2 (21) where x1 and x2 are the prey and predator population sizes, respectively. Gaussian noise r ∼ N(0, 102) is added at each full time-step. Lognormal priors are placed over θ. The simulator runs for T = 50 time steps, with constant initial populations of 100 for both prey and predator. There is therefore P = 2T outputs (prey and predator populations concatenated), which we use as the statistics. To run a deterministic simulation, we draw ui ∼π(u) where the dimension of u is P. Half of the random variables are used for r1 and the other half for r2. In other words, rust = 10 √ 2 erf−1(2ust −1), where s ∈{1, 2} for the appropriate population. The Jacobian is a 100×3 matrix that can be computed using one-sided finite-differences using 3 forward simulations. 4.6 Bayesian Inference of the M/G/1 Queue Model Bayesian inference of the M/G/1 queuing model is challenging, requiring ABC algorithms [4, 8] or sophisticated MCMC-based procedures [18]. Though simple to simulate, the output can be quite 7 Figure 4: Top: Lotka-Volterra. Bottom: M/G/1 Queue. The left plots shows the posterior mean ±1 std errors of the posterior predictive distribution (sorted for M/G/1). Simulations per sample and the posterior of θ1 are shown in the other plots. For L-V, at ϵ 3, the SS for OMC were 15 v 116/159 for AW/SMC, and increased at ϵ 2 to 23 v 279/371. However, the ESS/n was lower for OMC: at ϵ 3 it was 0.25 and down to 0.1 at ϵ 2, whereas ESS/n stayed around 0.9 for AW/SMC. This is again due to the optimal discrepancy for some u being greater than ϵ; however, the samples that remain are independent samples. For M/G/1, the results are similar, but the ESS/n is lower than the number of discrepancies satisfying ϵ 1, 9% v 12%, indicating that the volume of the Jacobians is having a large effect on the variance of the weights. Future work will explore this further. noisy. In the M/G/1 queuing model, a single server processes arriving customers, which are then served within a random time. Customer m arrives at time wm ∼Exp(θ3) after customer m−1, and is served in sm ∼U(θ1, θ2) service time. Both wm and sm are unobserved; only the inter-departure times xm are observed. Following [18], we write the simulation algorithm in terms of arrival times vm. To simplify the updates, we keep track of the departure times dm. Initially, d0 = 0 and v0 = 0, followed by updates for m ≥1: vm = vm−1 + wm xm = sm + max(0, vm −dm−1) dm = dm−1 + xm (22) After trying several optimization procedures, we found the most reliable optimizer was simply a random walk. The random sources in the problem used for Wm (there are M) and for Um (there are M), therefore u is dimension 2M. Typical statistics for this problem are quantiles of x and/or the minimum and maximum values; in other words, the vector x is sorted then evenly spaced values for the statistics functions f (we used 3 quantiles). The Jacobian is an M ×3 matrix. In our experiments θ∗= [1.0, 5.0, 0.2] 5 Conclusion We have presented Optimization Monte Carlo, a likelihood-free algorithm that, by controlling the simulator randomness, transforms traditional ABC inference into a set of optimization procedures. By using OMC, scientists can focus attention on finding a useful optimization procedure for their simulator, and then use OMC in parallel to generate samples independently. We have shown that OMC can also be very efficient, though this will depend on the quality of the optimization procedure applied to each problem. In our experiments, the simulators were cheap to run, allowing Jacobian computations using finite differences. We note that for high-dimensional input spaces and expensive simulators, this may be infeasible, solutions include randomized gradient estimates [22] or automatic differentiation (AD) libraries (e.g. [14]). Future work will include incorporating AD, improving efficiency using Sobol numbers (when the size u is known), incorporating Bayesian optimization, adding partial communication between processes, and inference for expensive simulators using gradient-based optimization. Acknowledgments We thank the anonymous reviewers for the many useful comments that improved this manuscript. MW acknowledges support from Facebook, Google, and Yahoo. 8 References [1] Ahn, S., Korattikara, A., Liu, N., Rajan, S., and Welling, M. (2015). Large scale distributed Bayesian matrix factorization using stochastic gradient MCMC. In KDD. [2] Ahn, S., Shahbaba, B., and Welling, M. (2014). Distributed stochastic gradient MCMC. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1044–1052. [3] Beaumont, M. A., Cornuet, J.-M., Marin, J.-M., and Robert, C. P. (2009). Adaptive approximate Bayesian computation. Biometrika, 96(4):983–990. [4] Blum, M. G. and Franc¸ois, O. (2010). Non-linear regression models for approximate Bayesian computation. Statistics and Computing, 20(1):63–73. [5] Bonassi, F. V. and West, M. (2015). Sequential Monte Carlo with adaptive weights for approximate Bayesian computation. Bayesian Analysis, 10(1). [6] Del Moral, P., Doucet, A., and Jasra, A. (2006). Sequential Monte Carlo samplers. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(3):411–436. [7] Drovandi, C. C., Pettitt, A. N., and Faddy, M. J. (2011). Approximate Bayesian computation using indirect inference. Journal of the Royal Statistical Society: Series C (Applied Statistics), 60(3):317–337. [8] Fearnhead, P. and Prangle, D. (2012). Constructing summary statistics for approximate Bayesian computation: semi-automatic approximate Bayesian computation. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(3):419–474. [9] Forneron, J.-J. and Ng, S. (2015a). The ABC of simulation estimation with auxiliary statistics. arXiv preprint arXiv:1501.01265v2. [10] Forneron, J.-J. and Ng, S. (2015b). A likelihood-free reverse sampler of the posterior distribution. arXiv preprint arXiv:1506.04017v1. [11] Gourieroux, C., Monfort, A., and Renault, E. (1993). Indirect inference. Journal of applied econometrics, 8(S1):S85–S118. [12] Gutmann, M. U. and Corander, J. (2015). Bayesian optimization for likelihood-free inference of simulator-based statistical models. Journal of Machine Learning Research, preprint arXiv:1501.03291. In press. [13] Jones, D. R., Schonlau, M., and Welch, W. J. (1998). Efficient global optimization of expensive black-box functions. Journal of Global optimization, 13(4):455–492. [14] Maclaurin, D. and Duvenaud, D. (2015). Autograd. github.com/HIPS/autograd. [15] Meeds, E., Leenders, R., and Welling, M. (2015). Hamiltonian ABC. Uncertainty in AI, 31. [16] Neal, P. (2012). Efficient likelihood-free Bayesian computation for household epidemics. Statistical Computing, 22:1239–1256. [17] Paige, B., Wood, F., Doucet, A., and Teh, Y. W. (2014). Asynchronous anytime Sequential Monte Carlo. In Advances in Neural Information Processing Systems, pages 3410–3418. [18] Shestopaloff, A. Y. and Neal, R. M. (2013). On Bayesian inference for the M/G/1 queue with efficient MCMC sampling. Technical Report, Dept. of Statistics, University of Toronto. [19] Sisson, S., Fan, Y., and Tanaka, M. M. (2007). Sequential Monte Carlo without likelihoods. Proceedings of the National Academy of Sciences, 104(6). [20] Sisson, S., Fan, Y., and Tanaka, M. M. (2009). Sequential Monte Carlo without likelihoods: Errata. Proceedings of the National Academy of Sciences, 106(16). [21] Snoek, J., Larochelle, H., and Adams, R. P. (2012). Practical Bayesian optimization of machine learning algorithms. Advances in Neural Information Processing Systems 25. [22] Spall, J. C. (1992). Multivariate stochastic approximation using a simultaneous perturbation gradient approximation. Automatic Control, IEEE Transactions on, 37(3):332–341. 9 | 2015 | 255 |
5,764 | Basis Refinement Strategies for Linear Value Function Approximation in MDPs Gheorghe Comanici School of Computer Science McGill University Montreal, Canada gcoman@cs.mcgill.ca Doina Precup School of Computer Science McGill University Montreal, Canada dprecup@cs.mcgill.ca Prakash Panangaden School of Computer Science McGill University Montreal, Canada prakash@cs.mcgill.ca Abstract We provide a theoretical framework for analyzing basis function construction for linear value function approximation in Markov Decision Processes (MDPs). We show that important existing methods, such as Krylov bases and Bellman-errorbased methods are a special case of the general framework we develop. We provide a general algorithmic framework for computing basis function refinements which “respect” the dynamics of the environment, and we derive approximation error bounds that apply for any algorithm respecting this general framework. We also show how, using ideas related to bisimulation metrics, one can translate basis refinement into a process of finding “prototypes” that are diverse enough to represent the given MDP. 1 Introduction Finding optimal or close-to-optimal policies in large Markov Decision Processes (MDPs) requires the use of approximation. A very popular approach is to use linear function approximation over a set of features [Sutton and Barto, 1998, Szepesvari, 2010]. An important problem is that of determining automatically this set of features in such a way as to obtain a good approximation of the problem at hand. Many approaches have been explored, including adaptive discretizations [Bertsekas and Castanon, 1989, Munos and Moore, 2002], proto-value functions [Mahadevan, 2005], Bellman error basis functions (BEBFs) [Keller et al., 2006, Parr et al., 2008a], Fourier basis [Konidaris et al., 2011], feature dependency discovery [Geramifard et al., 2011] etc. While many of these approaches have nice theoretical guarantees when constructing features for fixed policy evaluation, this problem is significantly more difficult in the case of optimal control, where multiple policies have to be evaluated using the same representation. We analyze this problem by introducing the concept of basis refinement, which can be used as a general framework that encompasses a large class of iterative algorithms for automatic feature extraction. The main idea is to start with a set of basis which are consistent with the reward function, i.e. which allow only states with similar immediate reward to be grouped together. One-step look-ahead is then used to find parts of the state space in which the current basis representation is inconsistent with the environment dynamics, and the basis functions are adjusted to fix this problem. The process continues iteratively. We show that BEBFs [Keller et al., 2006, Parr et al., 2008a] can be viewed as a special case of this iterative framework. These methods iteratively expand an existing set of basis functions in order to capture the residual Bellman error. The relationship between such features and augmented Krylov bases allows us to show that every additional feature in these sets is consistently refining intermediate bases. Based on similar arguments, it can be shown that other methods, such as those based on the concept of MDP homomorphisms [Ravindran and Barto, 2002], bisimulation metrics [Ferns et al., 2004], and partition refinement algorithms [Ruan et al., 2015], are also special cases of the framework. We provide approximation bounds for sequences of refinements, as 1 well as a basis convergence criterion, using mathematical tools rooted in bisimulation relations and metrics [Givan et al., 2003, Ferns et al., 2004]. A final contribution of this paper is a new approach for computing alternative representations based on a selection of prototypes that incorporate all the necessary information to approximate values over the entire state space. This is closely related to kernel-based approaches [Ormoneit and Sen, 2002, Jong and Stone, 2006, Barreto et al., 2011], but we do not assume that a metric over the state space is provided (which allows one to determine similarity between states). Instead, we use an iterative approach, in which prototypes are selected to properly distinguish dynamics according to the current basis functions, then a new metric is estimated, and the set of prototypes is refined again. This process relies on using pseudometrics which in the limit converge to bisimulation metrics. 2 Background and notation We will use the framework of Markov Decision Processes, consisting of a finite state space S, a finite action space A, a transition function P : (S × A) →P(S)1, where P(s, a) is a probability distribution over the state space S, a reward function2 R : (S×A) →R. For notational convenience, P a(s), Ra(s) will be used to denote P(s, a) and R(s, a), respectively. One of the main objectives of MDP solvers is to determine a good action choice, also known as a policy, from every state that the system would visit. A policy π : S →P(A) determines the probability of choosing each action a given the state s (with P a∈A π(s)(a) = 1). The value of a policy π given a state s0 is defined as V π(s0) = E P∞ i=0 γiRai(si) si+1 ∼P ai(si), ai ∼π(si) . Note that V π is a real valued function [[S →R]]; the space of all such functions will be denoted by FS. We will also call such functions features. Let Rπ and P π denote the reward and transition probabilities corresponding to choosing actions according to π. Note that Rπ ∈FS and P π ∈[[FS →FS]], where3 Rπ(s) = Ea∼π(s)[Ra(s)] and P π(f)(s) = Ea∼π(s) EP a(s)[f] . Let T π ∈[[FS →FS]] denote the Bellman operator: T π(f) = Rπ + γP π(f). This operator is linear and V π is its fixed point, i.e. T π(V π) = V π. Most algorithms for solving MDPs will either use the model (Rπ, P π) to find V π (if this model is available and/or can be estimated efficiently), or they will estimate V π directly using samples of the model, {(si, ai, ri, si+1)}∞ i=0. The value V ∗ associated with the best policy π∗is the fixed point of the Bellman optimality operator T ∗(not a linear operator), defined as: T ∗(f) = maxa∈A (Ra + γP a(f)). The main problem we address in this paper is that of finding alternative representations for a given MDP. In particular, we look for finite, linearly independent subsets Φ of FS. These are bases for subspaces that will be used to speed up the search for V π, by limiting it to span(Φ). We say that a basis B is a partition if there exists an equivalence relation ∼on S such that B = {χ(C) | C ∈S/∼}, where χ is the characteristic function (i.e. χ(X)(x) = 1 if x ∈X and 0 otherwise). Given any equivalence relation ∼, we will use the notation ∆(∼) for the set of characteristic functions on the equivalence classes of ∼, i.e. ∆(∼) = {χ(C) | C ∈S/∼}.4. Our goal will be to find subsets Φ ⊂FS which allow a value function approximation with strong quality guarantees. More precisely, for any policy π we would like to approximate V π with V π Φ = Pk i=1 wiφi for some choice of wi’s, which amounts to finding the best candidate inside the space spanned by Φ = {φ1, φ2, ..., φk}. A sufficient condition for V π to be an element of span(Φ) (and therefore representable exactly using the chosen set of bases), is for Φ to span the reward function and be an invariant subspace of the transition function: Rπ ∈span(Φ) and ∀f ∈Φ, P π(f) ∈span(Φ). Linear fixed point methods like TD, LSTD, LSPE [Sutton, 1988, Bradtke and Barto, 1996, Yu and Bertsekas, 2006] can be used to find the least squares fixed point approximation V π Φ of V π for a representation Φ; these constitute proper approximation schemes, as 1We will use P(X) to denote the set of probability distributions on a given set X. 2For simplicity, we assume WLOG that the reward is deterministic and independent of the state into which the system arrives. 3We will use Eµ[f] = P x f(x)µ(x) to mean the expectation of a function f wrt distribution µ. If the function f is multivariate, we will use Ex∼µ[f(x, y)] = P x f(x, y)µ(x) to denote expectation of f when y is fixed. 4The equivalence class of an element s ∈S is {s′ ∈S | s ∼s′}. S/∼is used for the quotient set of all equivalence classes of ∼. 2 one can determine the number of iterations required to achieve a desired approximation error. Given a representation Φ, the approximate value function V π Φ is the fixed point of the operator T π Φ, defined as: T π Φf := ΠΦ(Rπ + γP π(f)), where ΠΦ is the orthogonal projection operator on Φ. Using the linearity of ΠΦ, it directly follows that T π Φ(f) = ΠΦRπ + γΠΦP π(f) and V π Φ is the fixed point of the Bellman operator over the transformed linear model (Rπ Φ, P π Φ) := (ΠΦRπ, ΠΦP π). For more details, see [Parr et al., 2008a,b]. The analysis tools that we will use to establish our results are based on probabilistic bisimulation and its quantitative analogues. Strong probabilistic bisimulation is a notion of behavioral equivalence between the states of a probabilistic system, due to [Larsen and Skou, 1991] and applied to MDPs with rewards by [Givan et al., 2003]. The metric analog is due to [Desharnais et al., 1999, 2004] and the extension of the metric to include rewards is due to [Ferns et al., 2004]. An equivalence relation ∼is a a bisimulation relation on the state space S if for every pair (s, s′) ∈S×S, s ∼s′ if and only if ∀a ∈A, ∀C ∈S/∼, Ra(s) = Ra(s′) and P a(s)(C) = P a(s′)(C) (we use here P a(s)(C) to denote the probability of transitioning into C, under transition s, a). A pseudo-metric is a bisimulation metric if there exists some bisimulation relation ∼such that ∀s, s′, d(s, s′) = 0 ⇐⇒s ∼s′. The bisimulation metrics described by [Ferns et al., 2004] are constructed using the Kantorovich metric for comparing two probability distributions. Given a ground metric d over S, the Kantorovich metric over P(S) takes the largest difference in the expected value of Lipschitz-1 functions with respect to d: Ω(d) := {f ∈FS | ∀s, s′, f(s) −f(s′) ≤d(s, s′)}. The distance between two probabilities µ and ν is computed as: K(d) : (µ, ν) 7→supϕ∈Ω(d) Eµ[ϕ] −Eν[ϕ]. For more details on the Kantorovich metric, see [Villani, 2003]. The following approximation scheme converges to a bisimulation metric (starting with d0 = 0, the metric that associates 0 to all pairs): dk+1(s, s′) = T (dk)(s, s′) := max a (1 −γ) Ra(s) −Ra(s′) + γK(dk) P a(s), P a(s′) . (1) The operator T has a fixed point d∗, which is a bisimulation metric, and dk →d∗as k →∞. [Ferns et al., 2004] provide bounds which allow one to assess the quality of general state aggregations using this metric. Given a relation ∼and its corresponding partition ∆(∼), one can define an MDP model over ∆(∼) as: ˆRa = Π∆(∼)Ra and ˆP a = Π∆(∼)P a, ∀a ∈A. The approximation error between the true MDP optimal value function V ∗and its approximation using this reduced MDP model, denoted by V ∗ ∆(∼), is bounded above by: V ∗ ∆(∼)(s) −V ∗(s) ≤ 1 1 −γ d∗ ∼(s) + max s′∈S γ (1 −γ)2 d∗ ∼(s′). (2) where d∗ ∼(s) is average distance from a state s to its ∼-equivalence class, defined as an expectation over the uniform distribution U: d∗ ∼(s) = Eˆs∼U[d∗(s, ˆs) | s ∼ˆs]. Similar bounds for representations that are not partitions can be found in [Comanici and Precup, 2011]. Note that these bounds are minimized by aggregating states which are “close” in terms of the bisimulation distance d∗. 3 Basis refinement In this section we describe the proposed basis refinement framework, which relies on “detecting” and “fixing” inconsistencies in the dynamics induced by a given set of features. Intuitively, states are dynamically consistent with respect to a set of basis functions if transitions out of these states are evaluated the same way by the model {P a | a ∈A}. Inconsistencies are “fixed” by augmenting a basis with features that are able to distinguish inconsistent states, relative to the initial basis. We are now ready to formalize these ideas. Definition 3.1. Given a subset F ⊂FS, two states s, s′ ∈S are consistent with respect to F, denoted s ∼F s′, if ∀f ∈F, ∀a ∈A, f(s) = f(s′) and EP a(s)[f] = EP a(s′)[f]. Definition 3.2. Given two subspaces F, G ⊂FS, G refines F in an MDP M, and write F ⋉G, if F ⊆G and ∀s, s′ ∈S, s ∼F s′ ⇐⇒[∀g ∈G, g(s) = g(s′)]. Using the linearity of expectation, one can prove that, given two probability distributions µ, ν, and a finite subset Γ ⊂F, if span(Γ) = F, then ∀f ∈F, Eµ[f] = Eν[f] ⇐⇒ ∀b ∈Γ, Eµ[b] = Eν[b] . For the special case of Dirac distributions δs and δs′, for which 3 Eδs[f] = f(s), it also holds that ∀f ∈F, f(s) = f(s′) ⇐⇒ ∀b ∈Γ, b(s) = b(s′) . Therefore, Def. 3.2 gives a relation between two subspaces, but the refinement conditions could be checked on any basis choice. It is the subspace itself rather than a particular basis that matters, i.e. Γ ⋉Γ′ if span(Γ) ⋉span(Γ′). To fix inconsistencies on a pair (s, s′), for which we can find f ∈Γ and a ∈A such that either f(s) ̸= f(s′) or EP a(s)[f] ̸= EP a(s′)[f], one should construct a new function ϕ with ϕ(s) ̸= ϕ(s′) and add it to Γ′. To guarantee that all inconsistencies have been addressed, if ϕ(s) ̸= ϕ(s′) for some ϕ ∈Γ′, Γ must contain a feature f such that, for some a ∈A, either f(s) ̸= f(s′) or EP a(s)[f] ̸= EP a(s′)[f]. In Sec. 5 we present an algorithmic framework consisting of sequential improvement steps, in which a current basis Γ is refined into a new one, Γ′, with span(Γ) ⋉span(Γ′). Def 3.2 guarantees that following such strategies expands span(Γ) and that the approximation error for any policy will be decreased as a result. We now discuss bounds that can be obtained based on these definitions. 3.1 Value function approximation results One simple way to create a refinement is to add to Γ a single element that would address all inconsistencies: a feature that is valued differently for every element of ∆(∼Γ). Given ω : ∆(∼Γ) →R, ∀b, b′ ∈∆(∼Γ), b ̸= b′ ⇒ω(b) ̸= ω(b′) ⇒Γ ⋉Γ ∪ nP b∈∆(∼Γ) ω(b)b o . On the other hand, such a construction provides no approximation guarantee for the optimal value function (unless we make additional assumptions on the problem - we will discuss this further in Section 3.2). Although it addresses inconsistencies in the dynamics over the set of features spanned by Γ, it does not necessarily provide the representation power required to properly approximate the value of the optimal policy. The main theoretical result in this section provides conditions for describing refining sequences of bases, which are not necessarily accurate, but have approximation errors bounded by an exponentially decreasing function. These results are based on ∆(∼Γ), the largest basis refining subspace: any feature that is constant over equivalence classes of ∼Γ will be spanned by ∆(∼), i.e. for any refinement V ⋉W, V ⊆W ⊆span(∆(∼V )). These subsets are convenient as they can be analyzed using the bisimulation metric introduced in [Ferns et al., 2004]. Lemma 3.1. The bisimulation operator in Eq. 1) is a contraction with constant γ. That is, for any metric d over S, sups,s′∈S |T (d)(s, s′)| ≤γ sups,s′∈S |d(s, s′)|. The proof relies on the Monge-Kantorovich duality (see [Villani, 2003]) to check that T satisfies sufficient conditions to be a contraction operator. An operator Z is a contraction (with constant γ < 1) if Z(x) ≤Z(x′) whenever x ≤x′, and if Z(x + c) = Z(x) + γc for any constant c ∈R [Blackwell, 1965]. One could easily check these conditions on the operator in Equation 1. Theorem 3.1. Let ∼0 represent reward consistency, i.e. s ∼0 s′ ⇐⇒∀a ∈A, Ra(s) = Ra(s′), and Γ1 = ∆(∼0). Additionally, assume {Γn}∞ n=1 is a sequence of bases such that for all n ≥1, Γn ⋉Γn+1 and Γn+1 is as large as the partition corresponding to consistency over Γn, i.e. |Γn+1| = |S/∼Γn |. If V ∗ Γn is the optimal value function computed with respect to representation Γn, then V ∗ Γn −V ∗ ∞≤γn+1 sups,s′,a |Ra(s) −Ra(s′)|/(1 −γ)2. Proof. We will use the bisimulation metric defined in Eq. 1 and Eq. 2 applied to the special case of reduced models over bases {Γn}∞ n=1. First, note that Monge-Kantorovich duality is crucial in this proof. It basically states that the Kantorovich metric is a solution to the Monge-Kantorovich problem, when its cost function is equal to the base metric for the Kantorovich metric. Specifically, for two measures µ and ν, and a cost function f ∈[S × S →R], the Monge-Kantorovich problem computes: J (f)(µ, ν) = inf{Eξ[f(x, y)] | ξ ∈P(S ×S) s.t. µ, ν are the marginals corresponding to x and y} The set of measures ξ with marginals µ and ν is also known as the set of couplings of µ and ν. For any metric d over S, J (d)(µ, ν) = K(d)(µ, ν) (for proof, see [Villani, 2003]). Next, we describe a relation between the metric T n(0) and Γn. Since |Γn+1| = |S/∼Γn | = |∆(∼Γn)| and Γn+1 ⊆span(∆(∼Γn)), it must be the case that span(Γn+1) = span(∆(∼Γn)). It is not hard to see that for the special case of partitions, a refinement can be determined based on transitions into equivalence classes. Given 4 two equivalence relations ∼1 and ∼2, the refinement ∆(∼1) ⋉∆(∼2) holds if and only if s ∼2 s′ ⇒s ∼1 s′ and s ∼2 s′ ⇒ ∀a ∈A, ∀C ∈S/∼1 P a(s)(C) = P a(s′)(C) . In particular, ∀s, s′ with s ∼Γn+1 s′, and ∀C ∈S/∼Γn, P a(s)(C) = P a(s′)(C). This equality is crucial in defining the following coupling for J (f)(P a(s), P a(s′)): let ξC ∈P(S × S) be any coupling of P a(s)|C and P a(s′)|C, the restrictions of P a(s) and P a(s′) to C; the latter is possible as the two distributions are equal. Next, define the coupling ξ of µ and ν as ξ = P C∈S/∼Γn ξC. For any cost function f, if s ∼Γn+1 s′, then J (f)(P a(s), P a(s′)) ≤P C∈S/∼Γn EξC[f]. Using an inductive argument, we will now show that ∀n, s ∼Γn s′ ⇒T n(0)(s, s′) = 0. The base case is clear from the definition: s ∼0 s′ ⇒T (0)(s, s′) = 0. Now, assume the former holds for n; that is, ∀C ∈S/∼Γn, ∀s, s′ ∈C, T n(0)(s, s′) = 0. But ξC is zero everywhere except on the set C × C, so EξC[T n(0)] = 0. Combining the last two results, we get the following upper bound: s ∼Γn+1 s′ ⇒J (T n(0))(P a(s), P a(s′)) ≤P C∈S/∼Γn EξC[T n(0)] = 0. Since T n(0) is a metric, it also holds that J (T n(0))(P a(s), P a(s′)) ≥0. Moreover, as s and s′ are consistent over Γn ⊇∆(∼0), this pair of states agree on the reward function. Therefore, T n+1(0)(s, s′) = maxa((1 −γ)|Ra(s) −Ra(s′)| + γJ (T n(0))(P a(s), P a(s′))) = 0. Finally, for any b ∈∆(∼Γn) and s ∈S with b(s) = 1, and any other state ˆs with b(ˆs) = 1, it must be the case that s ∼Γn ˆs and T n(0)(s, ˆs) = 0. Therefore, E ˆs∼U [d∗(s, ˆs) | s ∼Γn ˆs] = E ˆs∼U [d∗(s, ˆs) −T n(0)(s, ˆs) | s ∼Γn ˆs] ≤||d∗−T n(0)||∞. (3) As span(Γn) = span(∆(∼n)), V ∗ Γn is the optimal value function for the MDP model over ∆(∼n). Based on (2) and (3), we can conclude that V ∗ Γn −V ∗ ∞≤γ||d∗−T n(0)||∞/(1 −γ)2. (4) But we already know from Lemma 3.1 that d∗(defined in Eq. 1) is the fixed point of a contraction operator with constant γ. As J (0)(µ, ν) = 0, the following holds for all n ≥1 ||d∗−T n(0)||∞≤γn||T (0) −0||∞/(1 −γ) ≤γn sup s,s′,a |Ra(s) −Ra(s′)|. (5) The final result is easily obtained by putting together Equations 4 and 5. The result of the theorem provides a strategy for constructing refining sequences with strong approximation guarantees. Still, it might be inconvenient to generate refinements as large as S/∼Γn, as this might be over-complete; although faithful to the assumptions of the theorem, it might generate features that distinguish states that are not often visited, or pairs of states which are only slightly different. To address this issue, we provide a variation on the concept of refinement that can be used to derive more flexible refining algorithms: refinements that concentrate on local properties. Definition 3.3. Given a subset F ⊂FS, and a subset ζ ⊂S, two states s, s′ ∈S are consistent on ζ with respect to F, denoted s ∼F,ζ s′, if ∀f ∈F, ∀a ∈A, f(s) = f(s′) and ∀ˆs ∈ζ, EP a(ˆs)[f] = EP a(s)[f] ⇐⇒EP a(ˆs)[f] = EP a(s′)[f]. Definition 3.4. Given two subspaces F, G ⊂FS, G refines F locally with respect to ζ, denoted F ⋉ζ G, if F ⊆G and ∀s, s′ ∈S, s ∼F,ζ s′ ⇐⇒[∀g ∈G, g(s) = g(s′)]. Definition 3.2 is the special case of Definition 3.4 corresponding to a refinement with respect to the whole state space S, i.e. F ⋉G ≡F ⋉S G. When the subset ζ is not important, we will use the notation V ⋉◦W to say that W refines V locally with respect to some subset of S. The result below states that even if one provides local refinements ⋉◦, one will eventually generate a pair of subspaces which are related through a global refinement property ⋉. Proposition 3.1. Let {Γi}n i=0 be a set of bases over S with Γi−1 ⋉ζi Γi, i = 1, ..., n, for some {ζi}n i=1 . Assume that Γn is the maximal refinement (i.e. |Γn| = |S/∼Γn−1,ζn |). Let η = ∪iζi. Then ∆(∼Γ0,η) ⊆span(Γn). Proof. Assume s ∼Γn−1,ζn s′. We will check below all conditions necessary to conclude that s ∼Γ0,η s′. First, let f ∈Γ0. It is immediate from the definition of local refinements that ∀j ≤n −1, Γj ⊆Γn−1, so that s ∼Γ0,ζn s′. It follows that ∀f ∈Γ0, f(s) = f(s′). 5 Next, fix f ∈Γ0, a ∈A and ˆs ∈η. If ˆs ∈ζn, then EP a(ˆs)[f] = EP a(s)[f] ⇐⇒ EP a(ˆs)[f] = EP a(s′)[f], by the assumption above on the pair s, s′. Otherwise, ∃j < n such that ˆs ∈ζj and Γj−1 ⋉ζj Γj. But we already know that ∀f ∈Γj, f(s) = f(s′), as Γj ⊆Γn−1. We can use this result in the definition of local refinement Γj−1 ⋉ζj Γj to conclude that s ∼Γj−1,ζj s′. Moreover, as ˆs ∈ζj, f ∈Γ0 ⊆Γj−1, EP a(ˆs)[f] = EP a(s)[f] ⇐⇒EP a(ˆs)[f] = EP a(s′)[f]. This completes the definition of consistency on η, and it becomes clear that s ∼Γn−1,ζn s′ ⇒s ∼Γ0,η s′, or ∆(∼Γ0,η) ⊆span(∆(∼Γn−1,ζn)). Finally, both Γn and ∆(∼Γn−1,η) are bases of the same size, and both refine Γn−1. It must be that span(Γn) = span(∆(∼Γn−1,ζn)) ⊇∆(∼Γ0,η). 3.2 Examples of basis refinement for feature extraction The concept of basis refinement is not only applicable to the feature extraction methods we will present later, but to methods that have been studied in the past. In particular, methods based on Bellman error basis functions, state aggregation strategies, and spectral analysis using bisimulation metrics are all special cases of basis refinement. We briefly describe the refinement property for the first two cases, and, in the next section, we elaborate on the connection between refinement and bisimulation metrics to provide a new condition for convergence to self-refining bases. Krylov bases: Consider the uncontrolled (policy evaluation) case, in which one would like to find a set of features that is suited to evaluating a single policy of interest. A common approach to automatic feature generation in this context computes Bellman error basis functions (BEBFs), which have been shown to generate a sequence of representations known as Krylov bases. Given a policy π, a Krylov basis Φn of size n is built using the model (Rπ, P π) (defined in Section 2 as elements of FS and [[FS →FS]], respectively): Φn = span{Rπ, P πRπ, (P π)2Rπ, ..., (P π)nRπ}. It is not hard to check that Φn ⋉Φn+1, where ⋉is the refinement relational property in Def 3.2. Since the initial feature Rπ ∈∆(∼0), the result in Theorem 3.1 holds for the Krylov bases. Under the assumption of a finite-state MDP (i.e. |S| < ∞), Γχ := {χ({s}) | s ∈S} is a basis for FS, therefore this set of features is finite dimensional. It follows that one can find N ≤|S| such that one of the Krylov bases is a self-refinement, i.e. ΦN ⋉ΦN. This would by no means be the only self-refining basis. In fact this property holds for the basis of characteristic functions, Γχ ⋉Γχ. The purpose our framework is to determine other self-refining bases which are suited for function approximation methods in the context of controlled systems. State aggregation: One popular strategy used for solving MDPs is that of computing state aggregation maps. Instead of working with alternative subspaces, these methods first compute equivalence relations on the state space. An aggregate/collapsed model is then derived, and the solution to this model is translated to one for the original problem: the resulting policy provides the same action choice for states that have originally been related. Given any equivalence relation ∼on S, a state aggregation map is a function from S to any set X, ρ : S →X, such that ∀s, s′, ρ(s′) = ρ(s) ⇐⇒s ∼s′. In order to obtain a significant computational gain, one would like to work with aggregation maps ρ that reduce the size of the space for which one looks to provide action choices, i.e. |X| ≪|S|. As discussed in Section 3.1, one could work with features that are defined on an aggregate state space instead of the original state space. That is, instead of computing a set of state features Γ ⊂FS, we could work instead with an aggregation map ρ : S →X and a set of features over X, ˆΓ ⊂FX. If ∼is the relation such that s ∼s′ ⇐⇒ρ(s) = ρ(s′), then ∀ϕ ∈ˆΓ, ϕ ◦ρ ∈span(∆(∼)). 4 Using bisimulation metrics for convergence of bases In Section 3.2 we provide two examples of self-refining subspaces: the Krylov bases and the characteristic functions on single states. The latter is the largest and sparsest basis; it spans the entire state space and the features share no information. The former is potentially smaller and it spans the value of the fixed policy for which it was designed. In this section we will present a third self-refining construction, which is designed to capture bisimulation properties. Based on the results presented in Section 3.1, it can be shown that given a bisimulation relation ∼, the partition it generates is self-refining, i.e. ∆(∼) ⋉∆(∼). 6 Desirable self-refining bases might be be computationally demanding and/or too complex to use or represent. We propose iterative schemes which ultimately provide a self-refining result - albeit we would have the flexibility of stopping the iterative process before reaching the final result. At the same time, we need a criterion to describe convergence of sequences of bases. That is, we would want to know how close an iterative process is to obtaining a self-refining basis. Inspired by the fixed point theory used to study bisimulation metrics [Desharnais et al., 1999], instead of using a metric over the set of all bases to characterize convergence of such sequences, we will use corresponding metrics over the original state space. This choice is better suited for generalizing previously existing methods that compare pairs of states for bisimilarity through their associated reward models and expected realizations of features over the next state distribution model associated with these states. We will study metric construction strategies based on a map D, defined below, which takes an element of the powerset P(FS) of FS and returns an element of all pseudo-metrics M (S) over S. D(Γ) : (s, s′) 7→maxa (1 −γ) |Ra(s) −Ra(s′)| + γ supϕ∈Γ EP a(s)[ϕ] −EP a(s′)[ϕ] (6) Γ is a set of features whose expectation over next-state distributions should be matched. It is not hard to see that bases Γ for which D(Γ) is a bisimulation metric are by definition self-refining. For example, consider the largest bisimulation relation ∼on a given MDP. It is not hard to see that D(∆(∼)) is a bisimulation. A more elaborate example involves the set Ω(d) of Lipschitz-1 continuous functions on [[(S, d) →(R, L1)]] (recall definition and computation details from Section 2). Define d∗ to be the fixed point of the operator T : d 7→D(Ω(d)), i.e. d∗= supn∈N T n(0). d∗has the same property as the bisimulation metric defined in Equation 1. Moreover, given any bisimulation metric d, D(Ω(d)) is a bisimulation metric. Definition 4.1. We say a sequence {Γn}∞ n=1 is a a bisimulation sequence of bases if D(Γn) converges uniformly from below to a bisimulation metric. If one has the a sequence of refining bases with Γn ⋉Γn+1, ∀n, then {D(Γn)}∞ n=1 is an increasing sequence, but not necessarily a bisimulation sequence. A bisimulation sequence of bases provide an approximation scheme for bases that satisfy two important properties studied in the past: self-refinement and bisimilarity. One could show that the approximation schemes presented in [Ferns et al., 2004], [Comanici and Precup, 2011], and [Ruan et al., 2015] are all examples of bisimulation sequences. We will present in the next section a framework that generalizes all these examples, but which can be easily extended to a broader set of approximation schemes that incorporate both refining and bisimulation principles. 5 Prototype based refinements In this section we propose a strategy that iteratively builds sequences of refineing sets of features, based on the concepts described in the previous sections. This generates layered sets of features, where the nth layer in the construction will be dependent only on the (n −1)th layer. Additionally, each feature will be associated with a reward-transition prototype: elements of Q := [[A →(R × P(S))]], associating to each action a reward and a next-state probability distribution. Prototypes can be viewed as “abstract” or representative states, such as used in KBRL methods [Ormoneit and Sen, 2002]. In the layered structure, the similarity between prototypes at the nth layer is based on a measure of consistency with respect to features at the (n −1)th layer. The same measure of similarity is used to determine whether the entire state space is “covered” by the set of prototypes/features chosen for the nth layer. We say that a space is covered if every state of the space is close to at least one prototype generated by the construction, with respect to a predefined measure of similarity. This measure is designed to make sure that consecutive layers represent refining sets of features. Note that for any given MDP, the state space S is embedded into Q (i.e. S ⊂Q), as (Ra(s), P a(s)) ∈Q for every state s ∈S. Additionally, The metric generator D, as defined in Equation 6, can be generalized to a map from P(FS) to M (Q). The algorithmic strategy will look for a sequence {Jn, ιn}∞ n=1, where Jn ⊂Q is a set of covering prototypes, and ιn : Jn →FS is a function that associates a feature to every prototype in Jn. Starting with J0 = ∅and Γ0 = ∅, the strategy needs to find, at step n > 0, a cover ˆJn for S, based on the distance metric D(Γn−1). That is, it has to guarantee that ∀s ∈S, ∃κ ∈ˆJn with D(Γn−1)(s, κ) = 0. With Jn = ˆJn ∪Jn−1 and using a strictly decreasing function τ : R≥0 →R (e.g. the energy-based Gibbs measure τ(x) = exp(−βx) for some β > 0), the framework constructs ιn : Jn →FS, a map that associates prototypes to features as ιn(κ)(s) = τ(D(Γn−1)(κ, s)). 7 Algorithm 1 Prototype refinement 1: J0 = ∅and Γ0 = ∅ 2: for n = 1 to ∞do 3: choose a representative subset ζn ⊂S and a cover approximation error ϵn ≥0 4: find an ϵn-cover ˆJn for ζn 5: define Jn = ˆJn ∪Jn−1 6: choose a strictly decreasing function τ : R≥0 →R 7: define ιn(κ) = s 7→τ(D(Γn−1)(κ, s)) if ∃ˆs ∈ζn, such that D(Γn−1)(κ, ˆs) ≤ϵn ιn−1(κ) otherwise 8: define Γn = {ιn(κ) | κ ∈Jn} (note that Γn is a local refinement, Γn−1 ⋉ζn Γn) It is not hard to see that the refinement property holds at every step, i.e. Γn ⋉Γn+1. First, every equivalence class of ∼Γn is represented by some prototype in Jn. Second, ιn is purposely defined to make sure that a distinction is made between each prototype in Jn+1. Moreover, {Γn}∞ n=1 is a bisimulation sequence of bases, as the metric generator D is the main tool used in “covering” the state space with the set of prototypes Jn. Two states will be represented by the same prototype (i.e. they will be equivalent with respect to ∼Γn) if and only if the distance between their corresponding reward-transition models is 0. Algorithm 1 provides pseudo-code for the framework described in this section. Note that it also contains two additional modifications, used to illustrate the flexibility of this feature extraction process. Through the first modification, one could use the intermediate results at time step n to determine a subset ζn ⊂S of states which are likely to have a model with significantly distinct dynamics over Γn−1. As such, the prototypes ˆJn−1 can be specialized to cover only the significant subset ζn. Moreover Theorem 3.1 guarantees that if every state in S is picked in ζn infinitely often, as n →∞, then the approximation power of the final result is not be compromised. The second modification is based on using the values in the metric D(Γn−1) for more than just choosing feature activations: one could set at every step constants ϵn ≥0 and then find Jn such that ζn is covered using ϵn-balls, i.e. for every state in ζn, there exists a prototype κ ∈Jn with D(Γn−1)(κ, s) ≤ϵn. One can easily show that the refinement property can be maintained using the modified defition of ιn described in Algorithm 1. 6 Discussion We proposed a general framework for basis refinement for linear function approximation. The theoretical results show that any algorithmic scheme of this type satisfies strong bounds on the quality of the value function that can be obtained. In other words, this approach provides a “blueprint” for designing algorithms with good approximation guarantees. As discussed, some existing value function construction schemes fall into this category (such as state aggregation refinement, for example). Other methods, like BEBFs, can be interpreted in this way in the case of policy evaluation; however, the “traditional” BEBF approach in the case of control does not exactly fit this framework. However, we suspect that it could be adapted to exactly follow this blueprint (something we leave for future work). We provided ideas for a new algorithmic approach to this problem, which would provide strong guarantees while being significantly cheaper than other existing methods with similar bounds (which rely on bisimulation metrics). We plan to experiment with this approach in the future. The focus of this paper was to establish the theoretical underpinnings of the algorithm. The algorithm structure we propose is close in spirit to [Barreto et al., 2011], which selects prototype states in order to represent well the dynamics of the system by means of stochastic factorization. However, their approach assumes a given metric which measures state similarity, and selects representative states using k-means clustering based on this metric. Instead, we iterate between computing the metric and choosing prototypes. We believe that the theory presented in this paper opens up the possibility of further development of algorithms for constructive function approximation that have quality guarantees in the control case, and which can be effective also in practice. 8 References R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. Cs. Szepesvari. Algorithms for Reinforcement Learning. Morgan & Claypool, 2010. D. P. Bertsekas and D. A. Castanon. Adaptive Aggregation Methods for Infinite Horizon Dynamic Programming. IEEE Transactions on Automatic Control, 34, 1989. R. Munos and A. Moore. Variable Resolution Discretization in Optimal Control. Machine Learning, 49(2-3):291–323, 2002. S. Mahadevan. Proto-Value Functions: Developmental Reinforcement Learning. In ICML, pages 553–560, 2005. P. W. Keller, S. Mannor, and D. Precup. Automatic Basis Function Construction for Approximate Dynamic Programming and Reinforcement Learning. In ICML, pages 449–456, 2006. R. Parr, C. Painter-Wakefiled, L. Li, and M. L. Littman. Analyzing Feature Generation for Value Function Approximation. In ICML, pages 737–744, 2008a. G. D. Konidaris, S. Osentoski, and P. S. Thomas. Value Function Approximation in Reinforcement Learning using the Fourier Basis. In AAAI, pages 380–385, 2011. A. Geramifard, F. Doshi, J. Redding, N. Roy, and J. How. Online Discovery of Feature Dependencies. In ICML, pages 881–888, 2011. B. Ravindran and A. G. Barto. Model Minimization in Hierarchical Reinforcement Learning. In Symposium on Abstraction, Reformulation and Approximation (SARA), pages 196–211, 2002. N. Ferns, P. Panangaden, and D. Precup. Metrics for finite Markov Decision Processes. In UAI, pages 162–169, 2004. S. Ruan, G. Comanici, P. Panangaden, and D. Precup. Representation Discovery for MDPs using Bisimulation Metrics. In AAAI, pages 3578–3584, 2015. R. Givan, T. Dean, and M. Greig. Equivalence Notions and Model Minimization in Markov Decision Processes. Artificial Intelligence, 147(1-2):163–223, 2003. D. Ormoneit and S. Sen. Kernel-Based Reinforcement Learning. Machine Learning, 49(2-3):161– 178, 2002. N. Jong and P. Stone. Kernel-Based Models for Reinforcement Learning. In ICML Workshop on Kernel Machines and Reinforcement Learning, 2006. A. S. Barreto, D. Precup, and J. Pineau. Reinforcement Learning using Kernel-Based Stochastic Factorization. In NIPS, pages 720–728, 2011. R. S. Sutton. Learning to Predict by the Methods of Temporal Differences. Machine Learning, 3 (1):9–44, 1988. S. J. Bradtke and A. G. Barto. Linear Least-Squares Algorithms for Temporal Difference Learning. Machine Learning, 22(1-3):33–57, 1996. H. Yu and D. Bertsekas. Convergence Results for Some Temporal Difference Methods Based on Least Squares. Technical report, LIDS MIT, 2006. R. Parr, L. Li, G. Taylor, C. Painter-Wakefield, and M. L. Littman. An Analysis of Linear Models, Linear Value-Function Approximation, and Feature Selection for Reinforcement Learning. In ICML, pages 752–759, 2008b. K. G. Larsen and A. Skou. Bisimulation through Probabilistic Testing. Information and Computation, 94:1–28, 1991. J. Desharnais, V. Gupta, R. Jagadeesan, and P. Panangaden. Metrics for Labeled Markov Systems. In CONCUR, 1999. J. Desharnais, V. Gupta, R. Jagadeesan, and P. Panangaden. A metric for labelled Markov processes. Theoretical Computer Science, 318(3):323–354, 2004. C. Villani. Topics in optimal transportation. American Mathematical Society, 2003. G. Comanici and D. Precup. Basis Function Discovery Using Spectral Clustering and Bisimulation Metrics. In AAAI, 2011. D. Blackwell. Discounted Dynamic Programming. Annals of Mathematical Statistics, 36:226–235, 1965. 9 | 2015 | 256 |
5,765 | Stop Wasting My Gradients: Practical SVRG Reza Babanezhad1, Mohamed Osama Ahmed1, Alim Virani2, Mark Schmidt1 Department of Computer Science University of British Columbia 1{rezababa, moahmed, schmidtm}@cs.ubc.ca,2alim.virani@gmail.com Jakub Koneˇcn´y School of Mathematics University of Edinburgh kubo.konecny@gmail.com Scott Sallinen Department of Electrical and Computer Engineering University of British Columbia scotts@ece.ubc.ca Abstract We present and analyze several strategies for improving the performance of stochastic variance-reduced gradient (SVRG) methods. We first show that the convergence rate of these methods can be preserved under a decreasing sequence of errors in the control variate, and use this to derive variants of SVRG that use growing-batch strategies to reduce the number of gradient calculations required in the early iterations. We further (i) show how to exploit support vectors to reduce the number of gradient computations in the later iterations, (ii) prove that the commonly–used regularized SVRG iteration is justified and improves the convergence rate, (iii) consider alternate mini-batch selection strategies, and (iv) consider the generalization error of the method. 1 Introduction We consider the problem of optimizing the average of a finite but large sum of smooth functions, min x∈Rd f(x) = 1 n n X i=1 fi(x). (1) A huge proportion of the model-fitting procedures in machine learning can be mapped to this problem. This includes classic models like least squares and logistic regression but also includes more advanced methods like conditional random fields and deep neural network models. In the highdimensional setting (large d), the traditional approaches for solving (1) are: full gradient (FG) methods which have linear convergence rates but need to evaluate the gradient fi for all n examples on every iteration, and stochastic gradient (SG) methods which make rapid initial progress as they only use a single gradient on each iteration but ultimately have slower sublinear convergence rates. Le Roux et al. [1] proposed the first general method, stochastic average gradient (SAG), that only considers one training example on each iteration but still achieves a linear convergence rate. Other methods have subsequently been shown to have this property [2, 3, 4], but these all require storing a previous evaluation of the gradient f ′ i or the dual variables for each i. For many objectives this only requires O(n) space, but for general problems this requires O(np) space making them impractical. Recently, several methods have been proposed with similar convergence rates to SAG but without the memory requirements [5, 6, 7, 8]. They are known as mixed gradient, stochastic variance-reduced gradient (SVRG), and semi-stochastic gradient methods (we will use SVRG). We give a canonical SVRG algorithm in the next section, but the salient features of these methods are that they evaluate two gradients on each iteration and occasionally must compute the gradient on all examples. SVRG 1 methods often dramatically outperform classic FG and SG methods, but these extra evaluations mean that SVRG is slower than SG methods in the important early iterations. They also mean that SVRG methods are typically slower than memory-based methods like SAG. In this work we first show that SVRG is robust to inexact calculation of the full gradients it requires (§3), provided the accuracy increases over time. We use this to explore growing-batch strategies that require fewer gradient evaluations when far from the solution, and we propose a mixed SG/SVRG method that may improve performance in the early iterations (§4). We next explore using support vectors to reduce the number of gradients required when close to the solution (§5), give a justification for the regularized SVRG update that is commonly used in practice (§6), consider alternative minibatch strategies (§7), and finally consider the generalization error of the method (§8). 2 Notation and SVRG Algorithm SVRG assumes f is µ-strongly convex, each fi is convex, and each gradient f ′ i is Lipschitzcontinuous with constant L. The method begins with an initial estimate x0, sets x0 = x0 and then generates a sequence of iterates xt using xt = xt−1 −η(f ′ it(xt−1) −f ′ it(xs) + µs), (2) where η is the positive step size, we set µs = f ′(xs), and it is chosen uniformly from {1, 2, . . . , n}. After every m steps, we set xs+1 = xt for a random t ∈{1, . . . , m}, and we reset t = 0 with x0 = xs+1. To analyze the convergence rate of SVRG, we will find it convenient to define the function ρ(a, b) = 1 1 −2ηa 1 mµη + 2bη . as it appears repeatedly in our results. We will use ρ(a) to indicate the value of ρ(a, b) when a = b, and we will simply use ρ for the special case when a = b = L. Johnson & Zhang [6] show that if η and m are chosen such that 0 < ρ < 1, the algorithm achieves a linear convergence rate of the form E[f(xs+1) −f(x∗)] ≤ρE[f(xs) −f(x∗)], where x∗is the optimal solution. This convergence rate is very fast for appropriate η and m. While this result relies on constants we may not know in general, practical choices with good empirical performance include setting m = n, η = 1/L, and using xs+1 = xm rather than a random iterate. Unfortunately, the SVRG algorithm requires 2m + n gradient evaluations for every m iterations of (2), since updating xt requires two gradient evaluations and computing µs require n gradient evaluations. We can reduce this to m + n if we store the gradients f ′ i(xs), but this is not practical in most applications. Thus, SVRG requires many more gradient evaluations than classic SG iterations of memory-based methods like SAG. 3 SVRG with Error We first give a result for the SVRG method where we assume that µs is equal to f ′(xs) up to some error es. This is in the spirit of the analysis of [9], who analyze FG methods under similar assumptions. We assume that ∥xt −x∗∥≤Z for all t, which has been used in related work [10] and is reasonable because of the coercity implied by strong-convexity. Proposition 1. If µs = f ′(xs) + es and we set η and m so that ρ < 1, then the SVRG algorithm (2) with xs+1 chosen randomly from {x1, x2, . . . , xm} satisfies E[f(xs+1) −f(x∗)] ≤ρE[f(xs) −f(x∗)] + ZE∥es∥+ ηE∥es∥2 1 −2ηL . We give the proof in Appendix A. This result implies that SVRG does not need a very accurate approximation of f ′(xs) in the crucial early iterations since the first term in the bound will dominate. Further, this result implies that we can maintain the exact convergence rate of SVRG as long as the errors es decrease at an appropriate rate. For example, we obtain the same convergence rate provided that max{E∥es∥, E∥es∥2} ≤γ˜ρs for any γ ≥0 and some ˜ρ < ρ. Further, we still obtain a linear convergence rate as long as ∥es∥converges to zero with a linear convergence rate. 2 Algorithm 1 Batching SVRG Input: initial vector x0, update frequency m, learning rate η. for s = 0, 1, 2, . . . do Choose batch size |Bs| Bs = |Bs| elements sampled without replacement from {1, 2, . . . , n}. µs = 1 |Bs| P i∈Bs f ′ i(xs) x0=xs for t = 1, 2, . . . , m do Randomly pick it ∈1, . . . , n xt = xt−1 −η(f ′ it(xt−1) −f ′ it(xs) + µs) (∗) end for option I: set xs+1 = xm option II: set xs+1 = xt for random t ∈{1, . . . , m} end for 3.1 Non-Uniform Sampling Xiao & Zhang [11] show that non-uniform sampling (NUS) improves the performance of SVRG. They assume each f ′ i is Li-Lipschitz continuous, and sample it = i with probability Li/n¯L where ¯L = 1 n Pn i=1 Li. The iteration is then changed to xt = xt−1 −η ¯L Lit [f ′ it(xt−1) −f ′ it(˜x)] + µs , which maintains that the search direction is unbiased. In Appendix A, we show that if µs is computed with error for this algorithm and if we set η and m so that 0 < ρ(¯L) < 1, then we have a convergence rate of E[f(xs+1) −f(x∗)] ≤ρ(¯L)E[f(xs) −f(x∗)] + ZE∥es∥+ ηE∥es∥2 1 −2η ¯L , which can be faster since the average ¯L may be much smaller than the maximum value L. 3.2 SVRG with Batching There are many ways we could allow an error in the calculation of µs to speed up the algorithm. For example, if evaluating each f ′ i involves solving an optimization problem, then we could solve this optimization problem inexactly. For example, if we are fitting a graphical model with an iterative approximate inference method, we can terminate the iterations early to save time. When the fi are simple but n is large, a natural way to approximate µs is with a subset (or ‘batch’) of training examples Bs (chosen without replacement), µs = 1 |Bs| X i∈Bs f ′ i(xs). The batch size |Bs| controls the error in the approximation, and we can drive the error to zero by increasing it to n. Existing SVRG methods correspond to the special case where |Bs| = n for all s. Algorithm 1 gives pseudo-code for an SVRG implementation that uses this sub-sampling strategy. If we assume that the sample variance of the norms of the gradients is bounded by S2 for all xs, 1 n −1 n X i=1 ∥f ′ i(xs)∥2 −∥f ′(xs)∥2 ≤S2, then we have that [12, Chapter 2] E∥es∥2 ≤n −|Bs| n|Bs| S2. So if we want E∥es∥2 ≤γ˜ρ2s, where γ ≥0 is a constant for some ˜ρ < 1, we need |Bs| ≥ nS2 S2 + nγ˜ρ2s . (3) 3 Algorithm 2 Mixed SVRG and SG Method Replace (*) in Algorithm 1 with the following lines: if fit ∈Bs then xt = xt−1 −η(f ′ it(xt−1) −f ′ it(xs) + µs) else xt = xt−1 −ηf ′ it(xt−1) end if If the batch size satisfies the above condition then ZE∥es−1∥+ ηE∥es−1∥2 ≤Z√γ˜ρs + ηγ˜ρ2s ≤2 max{Z√γ, ηγ˜ρ}˜ρs, and the convergence rate of SVRG is unchanged compared to using the full batch on all iterations. The condition (3) guarantees a linear convergence rate under any exponentially-increasing sequence of batch sizes, the strategy suggested by [13] for classic SG methods. However, a tedious calculation shows that (3) has an inflection point at s = log(S2/γn)/2 log(1/˜ρ), corresponding to |Bs| = n 2 . This was previously observed empirically [14, Figure 3], and occurs because we are sampling without replacement. This transition means we don’t need to increase the batch size exponentially. 4 Mixed SG and SVRG Method An approximate µs can drastically reduce the computational cost of the SVRG algorithm, but does not affect the 2 in the 2m+n gradients required for m SVRG iterations. This factor of 2 is significant in the early iterations, since this is when stochastic methods make the most progress and when we typically see the largest reduction in the test error. To reduce this factor, we can consider a mixed strategy: if it is in the batch Bs then perform an SVRG iteration, but if it is not in the current batch then use a classic SG iteration. We illustrate this modification in Algorithm 2. This modification allows the algorithm to take advantage of the rapid initial progress of SG, since it predominantly uses SG iterations when far from the solution. Below we give a convergence rate for this mixed strategy. Proposition 2. Let µs = f ′(xs)+es and we set η and m so that 0 < ρ(L, αL) < 1 with α = |Bs|/n. If we assume E∥f ′ i(x)∥2 ≤σ2 then Algorithm 2 has E[f(xs+1) −f(x∗)] ≤ρ(L, αL)E[f(xs) −f(x∗)] + ZE∥es∥+ ηE∥es∥2 + ησ2 2 (1 −α) 1 −2ηL We give the proof in Appendix B. The extra term depending on the variance σ2 is typically the bottleneck for SG methods. Classic SG methods require the step-size η to converge to zero because of this term. However, the mixed SG/SVRG method can keep the fast progress from using a constant η since the term depending on σ2 converges to zero as α converges to one. Since α < 1 implies that ρ(L, αL) < ρ, this result implies that when [f(xs) −f(x∗)] is large compared to es and σ2 that the mixed SG/SVRG method actually converges faster. Sharing a single step size η between the SG and SVRG iterations in Proposition 2 is sub-optimal. For example, if x is close to x∗and |Bs| ≈n, then the SG iteration might actually take us far away from the minimizer. Thus, we may want to use a decreasing sequence of step sizes for the SG iterations. In Appendix B, we show that using η = O∗( p (n −|B|)/n|B|) for the SG iterations can improve the dependence on the error es and variance σ2. 5 Using Support Vectors Using a batch Bs decreases the number of gradient evaluations required when SVRG is far from the solution, but its benefit diminishes over time. However, for certain objectives we can further 4 Algorithm 3 Heuristic for skipping evaluations of fi at x if ski = 0 then compute f ′ i(x). if f ′ i(x) = 0 then psi = psi + 1. {Update the number of consecutive times f ′ i(x) was zero.} ski = 2max{0,psi−2}. {Skip exponential number of future evaluations if it remains zero.} else psi = 0. {This could be a support vector, do not skip it next time.} end if return f ′ i(x). else ski = ski −1. {In this case, we skip the evaluation.} return 0. end if reduce the number of gradient evaluations by identifying support vectors. For example, consider minimizing the Huberized hinge loss (HSVM) with threshold ϵ [15], min x∈Rd 1 n n X i=1 f(biaT i x), f(τ) = 0 if τ > 1 + ϵ, 1 −τ if τ < 1 −ϵ, (1+ϵ−τ)2 4ϵ if |1 −τ| ≤ϵ, In terms of (1), we have fi(x) = f(biaT i x). The performance of this loss function is similar to logistic regression and the hinge loss, but it has the appealing properties of both: it is differentiable like logistic regression meaning we can apply methods like SVRG, but it has support vectors like the hinge loss meaning that many examples will have fi(x∗) = 0 and f ′ i(x∗) = 0. We can also construct Huberized variants of many non-smooth losses for regression and multi-class classification. If we knew the support vectors where fi(x∗) > 0, we could solve the problem faster by ignoring the non-support vectors. For example, if there are 100000 training examples but only 100 support vectors in the optimal solution, we could solve the problem 1000 times faster. While we typically don’t know the support vectors, in this section we outline a heuristic that gives large practical improvements by trying to identify them as the algorithm runs. Our heuristic has two components. The first component is maintaining the list of non-support vectors at xs. Specifically, we maintain a list of examples i where f ′ i(xs) = 0. When SVRG picks an example it that is part of this list, we know that f ′ it(xs) = 0 and thus the iteration only needs one gradient evaluation. This modification is not a heuristic, in that it still applies the exact SVRG algorithm. However, at best it can only cut the runtime in half. The heuristic part of our strategy is to skip f ′ i(xs) or f ′ i(xt) if our evaluation of f ′ i has been zero more than two consecutive times (and skipping it an exponentially larger number of times each time it remains zero). Specifically, for each example i we maintain two variables, ski (for ‘skip’) and psi (for ‘pass’). Whenever we need to evaluate f ′ i for some xs or xt, we run Algorithm 3 which may skip the evaluation. This strategy can lead to huge computational savings in later iterations if there are few support vectors, since many iterations will require no gradient evaluations. Identifying support vectors to speed up computation has long been an important part of SVM solvers, and is related to the classic shrinking heuristic [16]. While it has previously been explored in the context of dual coordinate ascent methods [17], this is the first work exploring it for linearly-convergent stochastic gradient methods. 6 Regularized SVRG We are often interested in the special case where problem (1) has the decomposition min x∈Rd f(x) ≡h(x) + 1 n n X i=1 gi(x). (4) 5 A common choice of h is a scaled 1-norm of the parameter vector, h(x) = λ∥x∥1. This non-smooth regularizer encourages sparsity in the parameter vector, and can be addressed with the proximalSVRG method of Xiao & Zhang [11]. Alternately, if we want an explicit Z we could set h to the indicator function for a 2-norm ball containing x∗. In Appendix C, we give a variant of Proposition 1 that allows errors in the proximal-SVRG method for non-smooth/constrained settings like this. Another common choice is the ℓ2-regularizer, h(x) = λ 2 ∥x∥2. With this regularizer, the SVRG updates can be equivalently written in the form xt+1 = xt −η h′(xt) + g′ it(xt) −g′ it(xs) + µs , (5) where µs = 1 n Pn i=1 gi(xs). That is, they take an exact gradient step with respect to the regularizer and an SVRG step with respect to the gi functions. When the g′ i are sparse, this form of the update allows us to implement the iteration without needing full-vector operations. A related update is used by Le Roux et al. to avoid full-vector operations in the SAG algorithm [1, §4]. In Appendix C, we prove the below convergence rate for this update. Proposition 3. Consider instances of problem (1) that can be written in the form (4) where h′ is Lh-Lipschitz continuous and each g′ i is Lg-Lipschitz continuous, and assume that we set η and m so that 0 < ρ(Lm) < 1 with Lm = max{Lg, Lh}. Then the regularized SVRG iteration (5) has E[f(xs+1) −f(x∗)] ≤ρ(Lm)E[f(xs) −f(x∗)], Since Lm ≤L, and strictly so in the case of ℓ2-regularization, this result shows that for ℓ2regularized problems SVRG actually converges faster than the standard analysis would indicate (a similar result appears in Koneˇcn´y et al. [18]). Further, this result gives a theoretical justification for using the update (5) for other h functions where it is not equivalent to the original SVRG method. 7 Mini-Batching Strategies Koneˇcn´y et al. [18] have also recently considered using batches of data within SVRG. They consider using ‘mini-batches’ in the inner iteration (the update of xt) to decrease the variance of the method, but still use full passes through the data to compute µs. This prior work is thus complimentary to the current work (in practice, both strategies can be used to improve performance). In Appendix D we show that sampling the inner mini-batch proportional to Li achieves a convergence rate of E f(xs+1) −f(x∗) ≤ρME [f(xs) −f(x∗)] , where M is the size of the mini-batch while ρM = 1 M −2η ¯L M mµη + 2¯Lη , and we assume 0 < ρM < 1. This generalizes the standard rate of SVRG and improves on the result of Koneˇcn´y et al. [18] in the smooth case. This rate can be faster than the rate of the standard SVRG method at the cost of a more expensive iteration, and may be clearly advantageous in settings where parallel computation allows us to compute several gradients simultaneously. The regularized SVRG form (5) suggests an alternate mini-batch strategy for problem (1): consider a mini-batch that contains a ‘fixed’ set Bf and a ‘random’ set Bt. Without loss of generality, assume that we sort the fi based on their Li values so that L1 ≥L2 ≥· · · ≥Ln. For the fixed Bf we will always choose the Mf values with the largest Li, Bf = {f1, f2, . . . , fMf }. In contrast, we choose the members of the random set Bt by sampling from Br = {fMf +1, . . . , fn} proportional to their Lipschitz constants, pi = Li (Mr)¯Lr with ¯Lr = (1/Mr) Pn i=Mf +1 Li. In Appendix D, we show the following convergence rate for this strategy: Proposition 4. Let g(x) = (1/n) P i/∈[Bf ] fi(x) and h(x) = (1/n) P i∈[Bf ] fi(x). If we replace the SVRG update with xt+1 = xt −η h′(xt) + (1/Mr) X i∈Bt ¯Lr Li (f ′ i(xt) −f ′ i(xs)) + g′(xs) ! , then the convergence rate is E[f(xs+1) −f(x∗)] ≤ρ(κ, ζ)E[F(xs) −f(x∗)]. where ζ = (n−Mf )¯Lr (M−Mf )n and κ = max{ L1 n , ζ}. 6 If L1 ≤n¯L/M and Mf < (α−1)nM αn−M with α = ¯L ¯Lr , then we get a faster convergence rate than SVRG with a mini-batch of size M. The scenario where this rate is slower than the existing minibatch SVRG strategy is when L1 ≤n¯L/M. But we could relax this assumption by dividing each element of the fixed set Bf into two functions: βfi and (1 −β)fi, where β = 1/M, then replacing each function fi in Bf with βfi and adding (1 −β)fi to the random set Br. This result may be relevant if we have access to a field-programmable gate array (FPGA) or graphical processing unit (GPU) that can compute the gradient for a fixed subset of the examples very efficiently. However, our experiments (Appendix F) indicate this strategy only gives marginal gains. In Appendix F, we also consider constructing mini-batches by sampling proportional to fi(xs) or ∥f ′ i(xs)∥. These seemed to work as well as Lipschitz sampling on all but one of the datasets in our experiments, and this strategy is appealing because we have access to these values while we may not know the Li values. However, these strategies diverged on one of the datasets. 8 Learning efficiency In this section we compare the performance of SVRG as a large-scale learning algorithm compared to FG and SG methods. Following Bottou & Bousquet [19], we can formulate the generalization error E of a learning algorithm as the sum of three terms E = Eapp + Eest + Eopt where the approximation error Eapp measures the effect of using a limited class of models, the estimation error Eest measures the effect of using a finite training set, and the optimization error Eopt measures the effect of inexactly solving problem (1). Bottou & Bousquet [19] study asymptotic performance of various algorithms for a fixed approximation error and under certain conditions on the distribution of the data depending on parameters α or ν. In Appendix E, we discuss how SVRG can be analyzed in their framework. The table below includes SVRG among their results. Algorithm Time to reach Eopt ≤ϵ Time to reach E = O(Eapp + ϵ) Previous with κ ∼n FG O nκd log 1 ϵ O d2κ ϵ1/α log2 1 ϵ O d3 ϵ2/α log3 1 ϵ SG O dνκ2 ϵ O dνκ2 ϵ O d3ν ϵ log2 1 ϵ SVRG O (n + κ)d log 1 ϵ O d2 ϵ1/α log2 1 ϵ + κd log 1 ϵ O d2 ϵ1/α log2 1 ϵ In this table, the condition number is κ = L/µ. In this setting, linearly-convergent stochastic gradient methods can obtain better bounds for ill-conditioned problems, with a better dependence on the dimension and without depending on the noise variance ν. 9 Experimental Results In this section, we present experimental results that evaluate our proposed variations on the SVRG method. We focus on logistic regression classification: given a set of training data (a1, b1) . . . (an, bn) where ai ∈Rd and bi ∈{−1, +1}, the goal is to find the x ∈Rd solving argmin x∈Rd λ 2 ∥x∥2 + 1 n n X i=1 log(1 + exp(−biaT i x)), We consider the datasets used by [1], whose properties are listed in the supplementary material. As in their work we add a bias variable, normalize dense features, and set the regularization parameter λ to 1/n. We used a step-size of α = 1/L and we used m = |Bs| which gave good performance across methods and datasets. In our first experiment, we compared three variants of SVRG: the original strategy that uses all n examples to form µs (Full), a growing batch strategy that sets |Bs| = 2s (Grow), and the mixed SG/SVRG described by Algorithm 2 under this same choice (Mixed). While a variety of practical batching methods have been proposed in the literature [13, 20, 21], we did not find that any of these strategies consistently outperformed the doubling used by the simple Grow 7 Effective Passes 0 5 10 15 Objective minus Optimum 10-8 10-6 10-4 10-2 100 Full Grow Mixed Effective Passes 0 5 10 15 Test Error 0 0.01 0.02 0.03 0.04 0.05 Full Grow Mixed Effective Passes 0 5 10 15 Objective minus Optimum 10-10 10-5 100 Full Grow SV(Full) SV(Grow) Effective Passes 0 5 10 15 Test Error 0 0.01 0.02 0.03 0.04 0.05 Full Grow SV(Full) SV(Grow) Figure 1: Comparison of training objective (left) and test error (right) on the spam dataset for the logistic regression (top) and the HSVM (bottom) losses under different batch strategies for choosing µs (Full, Grow, and Mixed) and whether we attempt to identify support vectors (SV). strategy. Our second experiment focused on the ℓ2-regularized HSVM on the same datasets, and we compared the original SVRG algorithm with variants that try to identify the support vectors (SV). We plot the experimental results for one run of the algorithms on one dataset in Figure 1, while Appendix F reports results on the other 8 datasets over 10 different runs. In our results, the growing batch strategy (Grow) always had better test error performance than using the full batch, while for large datasets it also performed substantially better in terms of the training objective. In contrast, the Mixed strategy sometimes helped performance and sometimes hurt performance. Utilizing support vectors often improved the training objective, often by large margins, but its effect on the test objective was smaller. 10 Discussion As SVRG is the only memory-free method among the new stochastic linearly-convergent methods, it represents the natural method to use for a huge variety of machine learning problems. In this work we show that the convergence rate of the SVRG algorithm can be preserved even under an inexact approximation to the full gradient. We also showed that using mini-batches to approximate µs gives a natural way to do this, explored the use of support vectors to further reduce the number of gradient evaluations, gave an analysis of the regularized SVRG update, and considered several new mini-batch strategies. Our theoretical and experimental results indicate that many of these simple modifications should be considered in any practical implementation of SVRG. Acknowledgements We would like to thank the reviewers for their helpful comments. This research was supported by the Natural Sciences and Engineering Research Council of Canada (RGPIN 312176-2010, RGPIN 311661-08, RGPIN-06068-2015). Jakub Koneˇcn´y is supported by a Google European Doctoral Fellowship. 8 References [1] N. Le Roux, M. Schmidt, and F. Bach, “A stochastic gradient method with an exponential convergence rate for strongly-convex optimization with finite training sets,” Advances in neural information processing systems (NIPS), 2012. [2] S. Shalev-Schwartz and T. Zhang, “Stochastic dual coordinate ascent methods for regularized loss minimization,” Journal of Machine Learning Research, vol. 14, pp. 567–599, 2013. [3] J. Mairal, “Optimization with first-order surrogate functions,” International Conference on Machine Learning (ICML), 2013. [4] A. Defazio, F. Bach, and S. Lacoste-Julien, “Saga: A fast incremental gradient method with support for non-strongly convex composite objectives,” Advances in neural information processing systems (NIPS), 2014. [5] M. Mahdavi, L. Zhang, and R. Jin, “Mixed optimization for smooth functions,” Advances in neural information processing systems (NIPS), 2013. [6] R. Johnson and T. Zhang, “Accelerating stochastic gradient descent using predictive variance reduction,” Advances in neural information processing systems (NIPS), 2013. [7] L. Zhang, M. Mahdavi, and R. Jin, “Linear convergence with condition number independent access of full gradients,” Advances in neural information processing systems (NIPS), 2013. [8] J. Koneˇcn´y and P. Richt´arik, “Semi-stochastic gradient descent methods,” arXiv preprint, 2013. [9] M. Schmidt, N. Le Roux, and F. Bach, “Convergence rates of inexact proximal-gradient methods for convex optimization,” Advances in neural information processing systems (NIPS), 2011. [10] C. Hu, J. Kwok, and W. Pan, “Accelerated gradient methods for stochastic optimization and online learning,” Advances in neural information processing systems (NIPS), 2009. [11] L. Xiao and T. Zhang, “A proximal stochastic gradient method with progressive variance reduction,” SIAM Journal on Optimization, vol. 24, no. 2, pp. 2057–2075, 2014. [12] S. Lohr, Sampling: design and analysis. Cengage Learning, 2009. [13] M. P. Friedlander and M. Schmidt, “Hybrid deterministic-stochastic methods for data fitting,” SIAM Journal of Scientific Computing, vol. 34, no. 3, pp. A1351–A1379, 2012. [14] A. Aravkin, M. P. Friedlander, F. J. Herrmann, and T. Van Leeuwen, “Robust inversion, dimensionality reduction, and randomized sampling,” Mathematical Programming, vol. 134, no. 1, pp. 101–125, 2012. [15] S. Rosset and J. Zhu, “Piecewise linear regularized solution paths,” The Annals of Statistics, vol. 35, no. 3, pp. 1012–1030, 2007. [16] T. Joachims, “Making large-scale SVM learning practical,” in Advances in Kernel Methods Support Vector Learning (B. Sch¨olkopf, C. Burges, and A. Smola, eds.), ch. 11, pp. 169–184, Cambridge, MA: MIT Press, 1999. [17] N. Usunier, A. Bordes, and L. Bottou, “Guarantees for approximate incremental svms,” International Conference on Artificial Intelligence and Statistics (AISTATS), 2010. [18] J. Koneˇcn´y, J. Liu, P. Richt´arik, and M. Tak´aˇc, “ms2gd: Mini-batch semi-stochastic gradient descent in the proximal setting,” arXiv preprint, 2014. [19] L. Bottou and O. Bousquet, “The tradeoffs of large scale learning,” Advances in neural information processing systems (NIPS), 2007. [20] R. H. Byrd, G. M. Chin, J. Nocedal, and Y. Wu, “Sample size selection in optimization methods for machine learning,” Mathematical programming, vol. 134, no. 1, pp. 127–155, 2012. [21] K. van den Doel and U. Ascher, “Adaptive and stochastic algorithms for EIT and DC resistivity problems with piecewise constant solutions and many measurements,” SIAM J. Scient. Comput, vol. 34, 2012. 9 | 2015 | 257 |
5,766 | Saliency, Scale and Information: Towards a Unifying Theory Shafin Rahman Department of Computer Science University of Manitoba shafin109@gmail.com Neil D.B. Bruce Department of Computer Science University of Manitoba bruce@cs.umanitoba.ca Abstract In this paper we present a definition for visual saliency grounded in information theory. This proposal is shown to relate to a variety of classic research contributions in scale-space theory, interest point detection, bilateral filtering, and to existing models of visual saliency. Based on the proposed definition of visual saliency, we demonstrate results competitive with the state-of-the art for both prediction of human fixations, and segmentation of salient objects. We also characterize different properties of this model including robustness to image transformations, and extension to a wide range of other data types with 3D mesh models serving as an example. Finally, we relate this proposal more generally to the role of saliency computation in visual information processing and draw connections to putative mechanisms for saliency computation in human vision. 1 Introduction Many models of visual saliency have been proposed in the last decade with differences in defining principles and also divergent objectives. The motivation for these models is divided among several distinct but related problems including human fixation prediction, salient object segmentation, and more general measures of objectness. Models also vary in intent and range from hypotheses for saliency computation in human visual cortex to those motivated exclusively by applications in computer vision. At a high level the notion of saliency seems relatively straightforward and characterized by patterns that stand out from their context according to unique colors, striking patterns, discontinuities in structure, or more generally, figure against ground. While this is a seemingly simplistic concept, the relative importance of defining principles of a model, and fine grained implementation details in determining output remains obscured. Given similarities in the motivation for different models, there is also value in considering how different definitions of saliency relate to each other while also giving careful consideration to parallels to related concepts in biological and computer vision. The characterization sought by models of visual saliency is reminiscent ideas expressed throughout seminal work in computer vision. For example, early work in scale-space theory includes emphasis on the importance of extrema in structure expressed across scale-space as an indicator of potentially important image content [1, 2]. Related efforts grounded in information theory that venture closer to modern notions of saliency include Kadir and Brady [3] and Jagersand’s [4] analysis of interaction between scale and local entropy in defining relevant image content. These concepts have played a significant role in techniques for affine invariant keypoint matching [5], but have received less attention in the direct prediction of saliency. Information theoretic models are found in the literature directly addressing saliency prediction for determining gaze points or proto-objects. A prominent example of this is the AIM model wherein saliency is based directly on measuring the self-information of image patterns [6]. Alternative information theoretic definitions have been pro1 posed [7, 8] including numerous models based on measures of redundancy or compressibility that are strongly related to information theoretic concepts given common roots in communication theory. In this paper, we present a relatively simple information theoretic definition of saliency that is shown to have strong ties to a number of classic concepts in the computer vision and visual saliency literature. Beyond a specific model, this also serves to establish formalism for characterizing relationships between scale, information and saliency. This analysis also hints at the relative importance of fine grained implementation details in differentiating performance across models that employ disparate, but strongly related definitions of visual salience. The balance of the paper is structured as follows: In section 2 we outline the principle for visual saliency computation proposed in this paper defined by maxima in information scale-space (MISS). In section 3 we demonstrate different characteristics of the proposed metric, and performance on standard benchmarks. Finally, section 4 summarizes main points of this paper, and includes discussion of broader implications. 2 Maxima in Information Scale-Space (MISS) In the following, we present a general definition of saliency that is strongly related to prior work discussed in section 1. In short, according to our proposal, saliency corresponds to maxima in information-scale space (MISS). The description of MISS follows, and is accompanied by more specific discussion of related concepts in computer vision and visual saliency research. Let us first assume that the saliency of statistics that define a local region of an image are a function of the rarity (likelihood) of such statistics. We’ll further assume without loss of generality that these local statistics correspond to pixel intensities. The likelihood of observing a pixel at position p with intensity Ip in an image based on the global statistics, is given by the frequency of intensity Ip relative to the total number of pixels (i.e. a normalized histogram lookup). This may be expressed as follows: H(Ip) = P q∈S δ(Iq −Ip)/|S| with δ the Dirac delta function. One may generalize this expression to a non-parametric (kernel) density estimate: H(Ip) = P q∈S Gσi(Ip −Iq) where Gσi corresponds to a kernel function (assumed to be Gaussian in this case). This may be viewed as either smoothing the intensity histogram, or applying a density estimate that is more robust to low sample density1. In practice, the proximity of pixels to one another is also relevant. Filtering operations applied to images are typically local in their extent, and the correlation among pixel values inversely proportional to the spatial distance between them. Adding a local spatial weighting to the likelihood estimate such that nearby pixels have a stronger influence, the expression is as follows: H(Ip) = X q∈S Gσb(||p −q||)Gσi(||Ip −Iq||) (1) This constitutes a locally weighted likelihood estimate of intensity values based on pixels in the surround. Having established the expression in equation 1, we shift to discussion of scale-space theory. In traditional scale-space theory the scale-space representation L(x, y; t) is defined by convolution of an image f(x, y) with a Gaussian kernel g(x, y) such that L(x, y; t) = g(., ., t) ∗f(., .) with t the variance of a Gaussian filter. Scale-space features are often derived from the family of Gaussian derivatives defined by Lxmyn(., .; t) = δxmyng(., ., t) ∗f(., .) with differential invariants produced by combining Gaussian derivatives of different orders in a weighted combination. An important concept in scale-space theory is the notion that scale selection or the size and position of relevant structure in the data, is related to the scale at which features (e.g. normalized derivatives) assume a maximum value. This consideration forms the basis for early definitions of saliency which derive a measure of saliency corresponding to the scale at which local entropy is maximal. This point is revisited later in this section. The scale-space representation may also be defined as the solution to the heat equation: δI δt = ∆I = Ixx + Iyy which may be rewritten as G[I]p −I ≈∆I where G[I]p = R S GσsIqdq and S the local 1Although this example is based on pixels intensities, the same analysis may be applied to statistics of arbitrary dimensionality. For higher dimensional feature vectors, appropriate sampling is especially important. 2 spatial support. This expression is the solution to the heat equation when σs = √ 2t. This corresponds to a diffusion process that is isotropic. There are also a variety of operations in image analysis and filtering that correspond to a more general process of anisotropic diffusion. One prominent example is the that proposed by Perona and Malik [9] that implements edge preserving smoothing. A similar process is captured by the Yaroslavsky filter: Y [I]p = 1 C(p) R BσS Gσr(||Ip −Iq||)Iqdq [10] with BσS reflecting the spatial range of the filter. The difference between these techniques and an isotropic diffusion process is that relative intensity values among local pixels determine the degree of diffusion (or weighted local sampling). The Yaroslavsky filter may be shown to be a special case of the more general bilateral filter corresponding to a step-function for the spatial weight factor [11]: B[I]p = 1 Wp P q∈S Gσb(||p −q||)Gσi(||Ip −Iq||)Iq with Wp = P q∈S Gσb(||p −q||)Gσi(||Ip −Iq||). In the same manner that selection of scale-space extrema defined by an isotropic diffusion process carries value in characterizing relevant image content and scale, we propose to consider scale-space extrema that carry a relationship to an anisotropic diffusion process. Note that the normalization term Wp appearing in the equation for the bilateral filter is equivalent to the expression appearing in equation 1. In contrast to bilateral filtering, we are not interested in producing a weighted sample of local intensities but we instead consider the sum of the weights themselves which correspond to a robust estimate of the likelihood of Ip. One may further relate this to an information theoretic quantity of self-information in considering −log(p(Ip)), the selfinformation associated with the observation of intensity Ip. With the above terms defined, Maxima in Information Scale-Space are defined as: MISS(Ip) = max σb −log( X q∈S Gσb(||p −q||)Gσi(||Ip −Iq||)) (2) Saliency is therefore equated to the local self-information for the scale at which this quantity has its maximum value (for each pixel location) in a manner akin to scale selection based on normalized gradients or differential invariants [12]. This also corresponds to scale (and value) selection based on maxima in the sum of weights that define a local anisotropic diffusion process. In what follows, we comment further on conceptual connections to related work: 1. Scale space extrema: The definition expressed in equation 2 has a strong relationship to the idea of selecting extrema corresponding to normalized gradients in scale-space [1] or in curvature-scale space [13]. In this case, rather than a Gaussian blurred intensity profile scale extrema are evaluated with respect to local information expressed across scale space. 2. Kadir and Brady: In Kadir and Brady’s proposal, interest points or saliency in general is related to the scale at which entropy is maximal [3]. While entropy and self-information are related, maxima in local entropy alone are insufficient to define salient content. Regions are therefore selected on the basis of the product of maximal local entropy and magnitude change of the probability density function. In contrast, the approach employed by MISS relies only on the expression in equation 2, and does not require additional normalization. It is worth noting that success in matching keypoints relies on the distinctness of keypoint descriptors which is a notion closely related to saliency. 3. Attention based on Information Maximization (AIM): The quantity expressed in equation 2 is identical to the definition of saliency assumed by the AIM model [6] for a specific choice of local features, and a fixed scale. The method proposed in equation 2 considers the maximum selfinformation expressed across scale space for each local observation to determine relative saliency. 4. Bilateral filtering: Bilateral filtering produces a weighted sample of local intensity values based on proximity in space and feature space. The sum of weights in the normalization term provides a direct estimate of the likelihood of the intensity (or statistics) at the Kernel center, and is directly related to self-information. 5. Graph Based Saliency and Random Walks: Proposals for visual saliency also include techniques defined by graphs and random walks [14]. There is also common ground between this family of approaches and those grounded in information theory. Specifically, a random walk or Markov process defined on a lattice may be seen as a process related to anisotropic diffusion where the transition probabilities between nodes define diffusion on the lattice. For a model such as Graph Based Visual Saliency (GBVS) [14], a directed edge from node (i, j) to node (p, q) is given a weight 3 w((i, j), (p, q)) = d((i, j)||(p, q))F(i −p, j −q) where d is a measure of dissimilarity and F a 2-D Gaussian profile. In the event that the dissimilarity measure is also defined by a Gaussian function of intensity values at (i, j) and (p, q), the edge weight defining a transition probability is equivalent to Wp and the expression in equation 1. 3 Evaluation In this section we present an array of results that demonstrate the utility and generality of the proposed saliency measure. This includes typical saliency benchmark results for both fixation prediction and object segmentation based on MISS. We also consider the relative invariance of this measure to image deformations (e.g. viewpoint, lighting) and demonstrate robustness to such deformations. This is accompanied by demonstration of the value of MISS in a more general sense in assessing saliency for a broad range of data types, with a demonstration based on 3D point cloud data. Finally, we also contrast behavior against very recently proposed models of visual saliency that leverage deep learning, revealing distinct and important facets of the overall problem. The results that are included follow the framework established in section 2. However, the intensity value appearing in equations in section 2 is replaced by a 3D vector of RGB values corresponding to each pixel. ||.|| denotes the L2 norm, and is therefore a Euclidean distance in the RGB colorspace. It is worth noting that the definition of MISS may be applied to arbitrary features including normalized gradients, differential invariants or alternative features. The motivation for choosing pixel color values is to demonstrate that a high level of performance may be achieved on standard benchmarks using a relatively simple set of features in combination with MISS. A variety of post-processing steps are commonplace in evaluating saliency models, including topological spatial bias of output, or local Gaussian blur of the saliency map. In some of our results (as noted) bilateral blurring has been applied to the output saliency map in place of standard Gaussian blurring. The reasons for this are detailed later on in in this section, but it is worth stating that this has shown to be advantageous in comparison to the standard of Gaussian blur in our benchmark results. Benchmark results are provided for both fixation data and salient object segmentation. For segmentation based evaluation, we apply the methods described by Li et al. [15]. This involves segmentation using MCG [16], with resulting segments weighted based on the saliency map 2. 3.1 MISS versus Scale In considering scale space extrema, plotting entropy or energy among normalized derivatives across scale is revealing with respect to characteristic scale and regions of interest [3]. Following this line of analysis, in Figure 1 we demonstrate variation in information scale-space values as a function of σb expressed in pixels. In Figure 1(a) three pixels are labeled corresponding to each of these categories as indicated by colored dots. The plot in Figure 1(b) shows the self-information for all of the selected pixels considering a wide range of scales. Object pixels, edge pixels and non-object pixels tend to produce different characteristic curves across scale in considering −log(p(Ip)). 3.2 Center bias via local connectivity Center bias has been much discussed in the saliency literature, and as such, we include results in this section that apply a different strategy for considering center bias. In particular, in the following center bias appears more directly as a factor that influences the relative weights assigned to a likelihood estimate defined by local pixels. This effectively means that pixels closer to the center have more influence in determining estimated likelihoods. One can imagine such an operation having a more prominent role in a foveated vision system wherein centrally located photoreceptors have a much greater density than those in the periphery. The first variant of center bias proposed is as follows: MISSCB−1(Ip) = max σb −log P q∈S Gσb(||p −q||)Gσi(||Ip −Iq||)Gσcb(||q −c||) where, c 2Note that while the authors originally employed CMPC [17] as a segmentation algorithm, more recent recommendations from the authors prescribe the use of MCG [16]. 4 (a) 20 40 60 80 100 120 140 5 5.5 6 6.5 7 7.5 8 kernel size in pixels self−information (b) object pixel 1 object pixel 2 object pixel 3 edge pixel 1 edge pixel 2 edge pixel 3 non−object pixel 1 non−object pixel 2 non−object pixel 3 Figure 1: (a) Sample image with select pixel locations highlighted in color. (b) Self-information of the corresponding pixel locations as a function of scale. Figure 2: Input images in (a) and sample output for (b) raw saliency maps (c) with bilateral blur (d) using CB-1 bias (e) using CB-2 bias (f) object segmentation using MCG+MISS is the spatial center of the image, Gσcb is a Gaussian function which controls the amount of center bias based on σcb. The second approach includes the center bias control parameters directly within in the second Gaussian function. MISSCB−2(Ip) = max σb −log P q∈S Gσb(||p−q||)Gσi(||Ip −Iq||×(M −||q −c||)) where, M is the maximum possible distance from the center pixel c to any other pixel. 3.3 Salient objects and fixations Evaluation results address two distinct and standard problems in saliency prediction. These are fixation prediction, and salient object prediction respectively. The evaluation largely follows the methodology employed by Li et al. [15]. Benchmarking metrics considered are common standards in saliency model evaluation, and details are found in the supplementary material. We have compared our results with several saliency and segmentation algorithms ITTI [18], AIM [6], GBVS [14], DVA [19], SUN [20], SIG [21], AWS [22], FT [23], GC [24], SF [25], PCAS [26], and across different datasets. Note that for segmentation based tests comparison among saliency algorithms considers only MCG+GBVS. The reason for this is that this was the highest performing of all of the saliency algorithms considered by Li et al. [15]. In our results, we exercise a range of parameters to gauge their relative importance. The size of Gaussian kernel Gσb determines the spatial scale. 25 different Kernel sizes are considered in a range from 3x3 to 125x125 pixels with the standard deviation σb equal to one third of the kernel width. For fixation prediction, only a subset of smaller scales is sufficient to achieve good performance, but the complete set of scales is necessary for segmentation. The Gaussian kernel that defines color distance Gσi is determined by the standard deviation σi. We tested values for σi ranging from 0.1 to 10. For 5 post processing standard bilateral filtering (BB), a kernel size of 9×9 is used, and center bias results are based on a fixed σcb = 5 for the kernel Gσcb for CB-1. For the second alternative method (CB-2) one Gaussian kernel Gσi is used with σi = 10. All of these settings have also considered different scaling factors applied to the overall image 0.25, 0.5 and 1 and in most cases, results corresponding to the resize factor of 0.25 are best. Scaling down the image implies a shift in the scales spanned in scale space towards lower spatial frequencies. Table 1: Benchmarking results for fixation prediction s-AUC aws aim sig dva gbvs sun itti miss miss miss miss Basic BB CB-1 CB-2 bruce 0.7171 0.6973 0.714 0.684 0.67 0.665 0.656 0.68 0.6914 0.625 0.672 cerf 0.7343 0.756 0.7432 0.716 0.706 0.691 0.681 0.7431 0.72 0.621 0.7264 judd 0.8292 0.824 0.812 0.807 0.777 0.806 0.794 0.807 0.809 0.8321 0.8253 imgsal 0.8691 0.854 0.862 0.856 0.83 0.8682 0.851 0.8653 0.8644 0.832 0.845 pascal 0.8111 0.803 0.8072 0.795 0.758 0.8044 0.773 0.802 0.803 0.8043 0.801 Table 2: Benchmarking results for salient object prediction (saliency algorithms) F-score aws aim sig dva gbvs sun itti miss miss miss miss Basic BB CB-1 CB-2 ft 0.6932 0.6564 0.652 0.633 0.649 0.638 0.623 0.640 0.6853 0.653 0.7131 imgsal 0.5951 0.536 0.5902 0.491 0.5574 0.438 0.520 0.432 0.521 0.527 0.5823 pascal 0.569 0.5871 0.566 0.529 0.529 0.514 0.5852 0.486 0.508 0.5833 0.5744 Table 3: Benchmarking results for salient object prediction (segmentation algorithms) F-score sf gc pcas ft mcg+gbvs mcg+miss mcg+miss mcg+miss mcg+miss [15] Basic BB CB-1 CB-2 ft 0.8533 0.804 0.833 0.709 0.8532 0.8493 0.8454 0.8551 0.839 imgsal 0.494 0.5712 0.6121 0.418 0.5423 0.5354 0.513 0.514 0.521 pascal 0.534 0.582 0.600 0.415 0.6752 0.6674 0.666 0.6791 0.6733 In Figure 2, we show some qualitative results of output corresponding to MISS with different postprocessing variants of center bias weighting for both saliency prediction and object segmentation. 3.4 Lighting and viewpoint invariance Given the relationship between MISS and models that address the problem of invariant keypoint selection, it is interesting to consider the relative invariance in saliency output subject to changing viewpoint, lighting or other imaging conditions. This is especially true given that saliency models have been shown to typically exhibit a high degree of sensitivity to imaging conditions [27]. This implies that this analysis is relevant not only to interest point selection, but also to measuring the relative robustness to small changes in viewpoint, lighting or optics in predicting fixations or salient targets. To examine affine invariance, we have to used image samples from a classic benchmark [5] which represent changes in zoom+rotation, blur, lighting and viewpoint. In all of these sequence, the first image is the reference image and the imaging conditions change gradually throughout the sequence. We have applied the MISS algorithm (without considering any center bias) to all of the full-size images in those sequences. From the raw saliency output, we have selected keypoints based on nonmaxima suppression with radius = 5 pixels, and threshold = 0.1. For every detected keypoint we assign a circular region centered at the keypoint. The radius of this circular region is based on the width of the Gaussian kernel Gσb defining the characteristic scale at which self-information achieves a maximum response. Keypoint regions are compared across images subject to their repeatability [5]. Repeatability measures the similarity among detected regions across different frames and is a standard way of gauging the capability to detect common regions across different types of image deformations. We compare our results with several other region detectors including Harris, Hessian, MSER, IBR and EBR [5]. Figure 3 demonstrates that output corresponding to the proposed saliency measure, revealing a considerable degree of invariance to affine transformations and changing image characteristics suggesting robustness for applications for gaze prediction and object selection. 6 1 2 3 4 5 0 20 40 60 80 100 (a) bark sequence repeatebility % increasing zoom + rotation 1 2 3 4 5 30 40 50 60 70 80 (b) bikes sequence repeatebility % increasing blur 1 2 3 4 5 45 50 55 60 65 70 75 80 (c) leuven sequence repeatebility % increasing light 1 2 3 4 5 10 20 30 40 50 60 70 80 (d) wall sequence repeatebility % increasing viewpoint angle haraff hesaff mseraf ibraff ebraff miss Figure 3: A demonstration of invariance to varying image conditions including viewpoint, lighting and blur based on a standard benchmark [5]. 3.5 Beyond Images Figure 4: Saliency for 2 different scales on a mesh model. Results correspond to a surround based on 100 nearest neighbors (left) and 4000 nearest neighbors (right) respectively. While the discussion in this paper has focused almost exclusively on image input, it is worth noting that the proposed definition of saliency is sufficiently general that this may be applied to alternative forms of data including images/videos, 3D models, audio signals or any form of data with locality in space or time. To demonstrate this, we present saliency output based on scale-space information for a 3D mesh model. Given that vertices are sparsely represented in a 3D coordinate space in contrast to the continuous discretized grid representation present for images, some differences are necessary in how likelihood estimates are derived. In this case, the spatial support is defined according to the k nearest (spatial) neighbors of each vertex. Instead of color values, each vertex belonging to the mesh is characterized by a three dimensional vector defining a surface normal in the x, y and z directions. Computation is otherwise identical to the process outlined in equation 2. An example of output associated with two different choices of k is shown in figure 4 corresponding to k = 100 and k = 4000 respectively for a 3D model with 172974 vertices. For demonstrative purposes, the output for two individual spatial scales is shown rather than the maximum across scales. Red indicates high levels of saliency, and green low. Values on the mesh are histogram equalized to equate any contrast differences. It is interesting to note that this saliency metric (and output) is very similar to proposals in computer graphics for determining local mesh saliency serving mesh simplification [28]. Note that this method allows determination of a characteristic scale for vertices on the mesh in addition to defining saliency. This may also useful to inferring the relationship between different parts (e.g. hands vs. fingers). There is considerable generality in that the measure of saliency assumed is agnostic to the features considered, with a few caveats. Given that our results are based on local color values, this implies a relatively low dimensional feature space on which likelihoods are estimated. However, one can imagine an analogous scenario wherein each image location is characterized by a feature vector (e.g. outputs of a bank of log-Gabor filters) resulting in much higher dimensionality in the statistics. As dimensionality increases in feature space, the finite number of samples within a local spatial or temporal window implies an exponential decline in the sample density for likelihood estimation. This consideration can be solved in applying an approximation based on marginal statistics (as in [29, 20, 30]). Such an approximation relies on assumptions such as independence which may be achieved for arbitrary data sets in first encoding raw feature values via stacked (sparse) autoencoders or related feature learning strategies. One might also note that saliency values may be assigned to units across different layers of a hierarchical representation based on such a feature representation. 3.6 Saliency, context and human vision Solutions to quantifying visual saliency based on deep learning have begun to appear in the literature. This has been made possible in part by efforts to scale up data collection via crowdsourcing in 7 defining tasks that serve as an approximation of traditional gaze tracking studies [31]. Recent (yet to be published) methods of this variety show a considerable improvement on some standard benchmarks over traditional models. It is therefore interesting to consider what differences exist between such approaches, and more traditional approaches premised on measures of local feature contrast. To this end, we present some examples in Figure 5 where output differs significantly between a model based on deep learning (SALICON [31]) and one based on feature contrast (MISS). The importance of this example is in highlighting different aspects of saliency computation that contribute to the bigger picture. It is evident that models capable of detecting specific objects and modeling context are may perform well on saliency benchmarks. However, it is also evident that there is some deficit in their capacity to represent saliency defined by strong feature contrast or according to factors of importance in human visual search behavior. In the same vane, in human vision, hierarchical feature extraction from edges to complex objects, and local measures for gain control, normalization and feature contrast play a significant role, all acting in concert. It is therefore natural to entertain the idea that a comprehensive solution to the problem involves considering both high-level features of the nature implemented in deep learning models coupled with contrastive saliency akin to MISS. In practice, the role of salience in a distributed representation in modulating object and context specific signals presents one promising avenue for addressing this problem. It has been argued that normalization is a canonical operation in sensory neural information processing. Under the assumption of Generalized Gaussian statistics, it can be shown that divisive normalization implements an operation equivalent to a log likelihood of a neural response in reference to cells in the surround [30]. The nature of computation assumed by MISS therefore finds a strong correlate in basic operations that implement feature contrast in human vision, and that pairs naturally with the structure of computation associated with representing objects and context. Figure 5: Examples where a deep learning model produces counterintuitive results relative to models based on feature contrast. Top: Original Image. Middle: SALICON output. Bottom: MISS output. 4 Discussion In this paper we present a generalized information theoretic characterization of saliency based on maxima in information scale-space. This definition is shown to be related to a variety of classic research contributions in scale-space theory, interest point detection, bilateral filtering, and existing models of visual saliency. Based on a relatively simplistic definition, the proposal is shown to be competitive against contemporary saliency models for both fixation based and object based saliency prediction. This also includes a demonstration of the relative robustness to image transformations and generalization of the proposal to a broad range of data types. Finally, we motivate an important distinction between contextual and contrast related factors in driving saliency, and draw connections to associated mechanisms for saliency computation in human vision. Acknowledgments The authors acknowledge financial support from the NSERC Canada Discovery Grants program, University of Manitoba GETS funding, and ONR grant #N00178-14-Q-4583. References [1] J.J. Koenderink. The structure of images. Biological cybernetics, 50(5):363–370, 1984. 8 [2] T. Lindeberg. Scale-space theory: A basic tool for analyzing structures at different scales. Journal of applied statistics, 21(1-2):225–270, 1994. [3] T. Kadir and M. Brady. Saliency, scale and image description. IJCV, 45(2):83–105, 2001. [4] M. Jagersand. Saliency maps and attention selection in scale and spatial coordinates: An information theoretic approach. In ICCV 1995, pages 195–202. IEEE, 1995. [5] K. Mikolajczyk et al. A comparison of affine region detectors. IJCV, 65(1-2):43–72, 2005. [6] N.D.B. Bruce and J.K. Tsotsos. Saliency based on information maximization. NIPS 2005, pages 155–162, 2005. [7] M. Toews and W.M. Wells. A mutual-information scale-space for image feature detection and featurebased classification of volumetric brain images. In CVPR Workshops, pages 111–116. IEEE, 2010. [8] A. Borji, D. Sihite, and L. Itti. Quantitative analysis of human-model agreement in visual saliency modeling: A comparative study. IEEE TIP, 22(1):55–69, 2013. [9] P. Perona, T. Shiota, and J. Malik. Anisotropic diffusion. In Geometry-driven diffusion in computer vision, pages 73–92. Springer, 1994. [10] A. Buades, B. Coll, and J-M Morel. A non-local algorithm for image denoising. In CVPR 2005, volume 2, pages 60–65. IEEE, 2005. [11] S. Paris and F. Durand. A fast approximation of the bilateral filter using a signal processing approach. In ECCV 2006, pages 568–580. Springer, 2006. [12] LMJ Florack, BM Ter Haar Romeny, Jan J Koenderink, and Max A Viergever. General intensity transformations and differential invariants. Journal of Mathematical Imaging and Vision, 4(2):171–187, 1994. [13] F. Mokhtarian and R. Suomela. Robust image corner detection through curvature scale space. IEEE T PAMI, 20(12):1376–1381, 1998. [14] J. Harel, C. Koch, and P. Perona. Graph-based visual saliency. NIPS 2006, 19:545, 2007. [15] Y. Li, X. Hou, C. Koch, J.M. Rehg, and A.L. Yuille. The secrets of salient object segmentation. CVPR 2014, pages 280–287, 2014. [16] P. Arbelez, J. Pont-Tuset, J. Barron, F. Marques, and J. Malik. Multiscale combinatorial grouping. CVPR 2014, pages 328–335, 2014. [17] J. Carreira and C. Sminchisescu. Cpmc: Automatic object segmentation using constrained parametric min-cuts. IEEE TPAMI, 34(7):1312–1328, 2012. [18] L. Itti, C. Koch, and E. Niebur. A model of saliency-based visual attention for rapid scene analysis. IEEE T PAMI, 20(11):1254–1259, 1998. [19] X. Hou and L. Zhang. Dynamic visual attention: Searching for coding length increments. NIPS 2008, pages 681–688, 2009. [20] L. Zhang, M.H. Tong, T.K. Marks, H. Shan, and G.W. Cottrell. Sun: A bayesian framework for saliency using natural statistics. Journal of Vision, 8(7), 2008. [21] X. Hou, J. Harel, and C. Koch. Image signature: Highlighting sparse salient regions. IEEE TPAMI, 34(1):194–201, 2012. [22] A. Garcia-Diaz, V. Lebor n, X.R. Fdez-Vidal, and X.M. Pardo. On the relationship between optical variability, visual saliency, and eye fixations: A computational approach. Journal of Vision, 12(6), 2012. [23] R. Achanta, S. Hemamiz, F. Estrada, and S. Susstrunk. Frequency-tuned salient region detection. CVPR 2009 Workshops, pages 1597–1604, 2009. [24] M.-M. Cheng, N.J. Mitra, X. Huang, P.H.S. Torr, and S.-M. Hu. Global contrast based salient region detection. IEEE TPAMI, 37(3):569–582, 2015. [25] F. Perazzi, P. Krahenbuhl, Y. Pritch, and A. Hornung. Saliency filters: Contrast based filtering for salient region detection. CVPR 2012, pages 733–740, 2012. [26] Tal A. Zelnik-Manor L. Margolin, R.˙What makes a patch distinct? CVPR 2013, pages 1139–1146, 2013. [27] A. Andreopoulos and J.K. Tsotsos. On sensor bias in experimental methods for comparing interest-point, saliency, and recognition algorithms. IEEE TPAMI, 34(1):110–126, 2012. [28] C-H Lee, A. Varshney, and D.W. Jacobs. Mesh saliency. ACM SIGGRAPH 2005, pages 659–666, 2005. [29] N.D.B. Bruce and J.K. Tsotsos. Saliency, attention, and visual search: An information theoretic approach. Journal of vision, 9(3):5, 2009. [30] D. Gao and N. Vasconcelos. Decision-theoretic saliency: computational principles, biological plausibility, and implications for neurophysiology and psychophysics. Neural computation, 21(1):239–271, 2009. [31] M. Jiang et al. Salicon: Saliency in context. CVPR 2015, pages 1072–1080, 2015. 9 | 2015 | 258 |
5,767 | Efficient Learning of Continuous-Time Hidden Markov Models for Disease Progression Yu-Ying Liu, Shuang Li, Fuxin Li, Le Song, and James M. Rehg College of Computing Georgia Institute of Technology Atlanta, GA Abstract The Continuous-Time Hidden Markov Model (CT-HMM) is an attractive approach to modeling disease progression due to its ability to describe noisy observations arriving irregularly in time. However, the lack of an efficient parameter learning algorithm for CT-HMM restricts its use to very small models or requires unrealistic constraints on the state transitions. In this paper, we present the first complete characterization of efficient EM-based learning methods for CT-HMM models. We demonstrate that the learning problem consists of two challenges: the estimation of posterior state probabilities and the computation of end-state conditioned statistics. We solve the first challenge by reformulating the estimation problem in terms of an equivalent discrete time-inhomogeneous hidden Markov model. The second challenge is addressed by adapting three approaches from the continuous time Markov chain literature to the CT-HMM domain. We demonstrate the use of CT-HMMs with more than 100 states to visualize and predict disease progression using a glaucoma dataset and an Alzheimer’s disease dataset. 1 Introduction The goal of disease progression modeling is to learn a model for the temporal evolution of a disease from sequences of clinical measurements obtained from a longitudinal sample of patients. By distilling population data into a compact representation, disease progression models can yield insights into the disease process through the visualization and analysis of disease trajectories. In addition, the models can be used to predict the future course of disease in an individual, supporting the development of individualized treatment schedules and improved treatment efficiencies. Furthermore, progression models can support phenotyping by providing a natural similarity measure between trajectories which can be used to group patients based on their progression. Hidden variable models are particularly attractive for modeling disease progression for three reasons: 1) they support the abstraction of a disease state via the latent variables; 2) they can deal with noisy measurements effectively; and 3) they can easily incorporate dynamical priors and constraints. While conventional hidden Markov models (HMMs) have been used to model disease progression, they are not suitable in general because they assume that measurement data is sampled regularly at discrete intervals. However, in reality patient visits are irregular in time, as a consequence of scheduling issues, missed visits, and changes in symptomatology. A Continuous-Time HMM (CT-HMM) is an HMM in which both the transitions between hidden states and the arrival of observations can occur at arbitrary (continuous) times [1, 2]. It is therefore suitable for irregularly-sampled temporal data such as clinical measurements [3, 4, 5]. Unfortunately, the additional modeling flexibility provided by CT-HMM comes at the cost of a more complex inference procedure. In CT-HMM, not only are the hidden states unobserved, but the transition times at which the hidden states are changing are also unobserved. Moreover, multiple unobserved hidden state transitions can occur between two successive observations. A previous method addressed these challenges by directly maximizing the data likelihood [2], but this approach is limited 1 to very small model sizes. A general EM framework for continuous-time dynamic Bayesian networks, of which CT-HMM is a special case, was introduced in [6], but that work did not address the question of efficient learning. Consequently, there is a need for efficient CT-HMM learning methods that can scale to large state spaces (e.g. hundreds of states or more) [7]. A key aspect of our approach is to leverage the existing literature for continuous time Markov chain (CTMC) models [8, 9, 10]. These models assume that states are directly observable, but retain the irregular distribution of state transition times. EM approaches to CTMC learning compute the expected state durations and transition counts conditioned on each pair of successive observations. The key computation is the evaluation of integrals of the matrix exponential (Eqs. 12 and 13). Prior work by Wang et. al. [5] used a closed form estimator due to [8] which assumes that the transition rate matrix can be diagonalized through an eigendecomposition. Unfortunately, this is frequently not achievable in practice, limiting the usefulness of the approach. We explore two additional CTMC approaches [9] which use (1) an alternative matrix exponential on an auxillary matrix (Expm method); and (2) a direct truncation of the infinite sum expansion of the exponential (Unif method). Neither of these approaches have been previously exploited for CT-HMM learning. We present the first comprehensive framework for efficient EM-based parameter learning in CTHMM, which both extends and unifies prior work on CTMC models. We show that a CT-HMM can be conceptualized as a time-inhomogenous HMM which yields posterior state distributions at the observation times, coupled with CTMCs that govern the distribution of hidden state transitions between observations (Eqs. 9 and 10). We explore both soft (forward-backward) and hard (Viterbi decoding) approaches to estimating the posterior state distributions, in combination with three methods for calculating the conditional expectations. We validate these methods in simulation and evaluate our approach on two real-world datasets for glaucoma and Alzheimer’s disease, including visualizations of the progression model and predictions of future progression. Our approach outperforms a state-of-the-art method [11] for glaucoma prediction, which demonstrates the practical utility of CT-HMM for clinical data modeling. 2 Continuous-Time Markov Chain A continuous-time Markov chain (CTMC) is defined by a finite and discrete state space S, a state transition rate matrix Q, and an initial state probability distribution π. The elements qij in Q describe the rate the process transitions from state i to j for i ̸= j, and qii are specified such that each row of Q sums to zero (qi = P j̸=i qij, qii = −qi) [1]. In a time-homogeneous process, in which the qij are independent of t, the sojourn time in each state i is exponentially-distributed with parameter qi, which is f(t) = qie−qit with mean 1/qi. The probability that the process’s next move from state i is to state j is qij/qi. When a realization of the CTMC is fully observed, meaning that one can observe every transition time (t′ 0, t′ 1, . . . , t′ V ′), and the corresponding state Y ′ = {y0 = s(t′ 0), ..., yV ′ = s(t′ V ′)}, where s(t) denotes the state at time t, the complete likelihood (CL) of the data is CL = V ′−1 Y v′=0 (qyv′ ,yv′+1/qyv′ )(qyv′ e−qyv′ τv′ ) = V ′−1 Y v′=0 qyv′ ,yv′+1e−qyv′ τv′ = |S| Y i=1 |S| Y j=1,j̸=i q nij ij e−qiτi (1) where τv′ = t′ v′+1 −t′ v′ is the time interval between two transitions, nij is the number of transitions from state i to j, and τi is the total amount of time the chain remains in state i. In general, a realization of the CTMC is observed only at discrete and irregular time points (t0, t1, ..., tV ), corresponding to a state sequence Y , which are distinct from the switching times. As a result, the Markov process between two consecutive observations is hidden, with potentially many unobserved state transitions. Thus both nij and τi are unobserved. In order to express the likelihood of the incomplete observations, we can utilize a discrete time hidden Markov model by defining a state transition probability matrix for each distinct time interval t, P(t) = eQt, where Pij(t), the entry (i, j) in P(t), is the probability that the process is in state j after time t given that it is in state i at time 0. This quantity takes into account all possible intermediate state transitions and timing between i and j which are not observed. Then the likelihood of the data is L = V −1 Y v=0 Pyv,yv+1(τv) = V −1 Y v=0 |S| Y i,j=1 Pij(τv)I(yv=i,yv+1=j) = r Y ∆=1 |S| Y i,j=1 Pij(τ∆)C(τ=τ∆,yv=i,yv+1=j) (2) where τv = tv+1 −tv is the time interval between two observations, I(yv = i, yv+1 = j) is an indicator function that is 1 if the condition is true, otherwise it is 0, τ∆, ∆= 1, ..., r, represents r unique values among all time intervals τv, and C(τ = τ∆, yv = i, yv+1 = j) is the total counts 2 from all successive visits when the condition is true. Note that there is no analytic maximizer of L, due to the structure of the matrix exponential, and direct numerical maximization with respect to Q is computationally challenging. This motivates the use of an EM-based approach. An EM algorithm for CTMC is described in [8]. Based on Eq. 1, the expected complete log likelihood takes the form P|S| i=1 P|S| j=1,j̸=i{log(qij)E[nij|Y, ˆQ0]−qiE[τi|Y, ˆQ0]}, where ˆQ0 is the current estimate for Q, and E[nij|Y, ˆQ0] and E[τi|Y, ˆQ0] are the expected state transition count and total duration given the incomplete observation Y and the current transition rate matrix ˆQ0, respectively. Once these two expectations are computed in the E-step, the updated ˆQ parameters can be obtained via the M-step as ˆqij = E[nij|Y, ˆQ0] E[τi|Y, ˆQ0] , i ̸= j and ˆqii = − X j̸=i ˆqij. (3) Now the main computational challenge is to evaluate E[nij|Y, ˆQ0] and E[τi|Y, ˆQ0]. By exploiting the properties of the Markov process, the two expectations can be decomposed as [12]: E[nij|Y, ˆQ0] = V −1 X v=0 E[nij|yv, yv+1, ˆQ0] = V −1 X v=0 |S| X k,l=1 I(yv = k, yv+1 = l)E[nij|yv = k, yv+1 = l, ˆQ0] E[τi|Y, ˆQ0] = V −1 X v=0 E[τi|yv, yv+1, ˆQ0] = V −1 X v=0 |S| X k,l=1 I(yv = k, yv+1 = l)E[τi|yv = k, yv+1 = l, ˆQ0] where I(yv = k, yv+1 = l) = 1 if the condition is true, otherwise it is 0. Thus, the computation reduces to computing the end-state conditioned expectations E[nij|yv = k, yv+1 = l, ˆQ0] and E[τi|yv = k, yv+1 = l, ˆQ0], for all k, l, i, j ∈S. These expectations are also a key step in CT-HMM learning, and Section 4 presents our approach to computing them. 3 Continuous-Time Hidden Markov Model In this section, we describe the continuous-time hidden Markov model (CT-HMM) for disease progression and the proposed framework for CT-HMM learning. 3.1 Model Description In contrast to CTMC, where the states are directly observed, none of the states are directly observed in CT-HMM. Instead, the available observational data o depends on the hidden states s via the measurement model p(o|s). In contrast to a conventional HMM, the observations (o0, o1, . . . , oV ) are only available at irregularly-distributed continuous points in time (t0, t1, . . . , tV ). As a consequence, there are two levels of hidden information in a CT-HMM. First, at observation time, the state of the Markov chain is hidden and can only be inferred from measurements. Second, the state transitions in the Markov chain between two consecutive observations are also hidden. As a result, a Markov chain may visit multiple hidden states before reaching a state that emits a noisy observation. This additional complexity makes CT-HMM a more effective model for event data, in comparison to HMM and CTMC. But as a consequence the parameter learning problem is more challenging. We believe we are the first to present a comprehensive and systematic treatment of efficient EM algorithms to address these challenges. A fully observed CT-HMM contains four sequences of information: the underlying state transition time (t′ 0, t′ 1, . . . , t′ V ′), the corresponding state Y ′ = {y0 = s(t′ 0), ..., yV ′ = s(t′ V ′)} of the hidden Markov chain, and the observed data O = (o0, o1, . . . , oV ) at time T = (t0, t1, . . . , tV ). Their joint complete likelihood can be written as CL = V ′−1 Y v′=0 qyv′ ,yv′+1e−qyv′ τv′ V Y v=0 p(ov|s(tv)) = |S| Y i=1 |S| Y j=1,j̸=i q nij ij e−qiτi V Y v=0 p(ov|s(tv)). (4) We will focus our development on the estimation of the transition rate matrix Q. Estimates for the parameters of the emission model p(o|s) and the initial state distribution π can be obtained from the standard discrete time HMM formulation [13], but with time-inhomogeneous transition probabilities (described below). 3 3.2 Parameter Estimation Given a current estimate of the parameter ˆQ0, the expected complete log-likelihood takes the form L(Q) = |S| X i=1 |S| X j=1,j̸=i {log(qij)E[nij|O, T, ˆQ0] −qiE[τi|O, T, ˆQ0]} + V X v=0 E[log p(ov|s(tv))|O, T, ˆQ0]. (5) In the M-step, taking the derivative of L with respect to qij, we have ˆqij = E[nij|O, T, ˆQ0] E[τi|O, T, ˆQ0] , i ̸= j and ˆqii = − X j̸=i ˆqij. (6) The challenge lies in the E-step, where we compute the expectations of nij and τi conditioned on the observation sequence. The statistic for nij can be expressed in terms of the expectations between successive pairs of observations as follows: E[nij|O, T, ˆQ0] = X s(t1),...,s(tV ) p(s(t1), ..., s(tV )|O, T, ˆQ0)E[nij|s(t1), ..., s(tV ), ˆQ0] (7) = X s(t1),...,s(tV ) p(s(t1), ..., s(tV )|O, T, ˆQ0) V −1 X v=1 E[nij|s(tv), s(tv+1), ˆQ0] (8) = V −1 X v=1 |S| X k,l=1 p(s(tv) = k, s(tv+1) = l|O, T, ˆQ0)E[nij|s(tv) = k, s(tv+1) = l, ˆQ0]. (9) In a similar way, we can obtain an expression for the expectation of τi: E[τi|O, T, ˆQ0] = n−1 X v=1 |S| X k,l=1 p(s(tv) = k, s(tv+1) = l|O, T, ˆQ0)E[τi|s(tv) = k, s(tv+1) = l, ˆQ0]. (10) In Section 4, we present our approach to computing the end-state conditioned statistics E[nij|s(tv) = k, s(tv+1) = l, ˆQ0] and E[τi|s(tv) = k, s(tv+1) = l, ˆQ0]. The remaining step is to compute the posterior state distribution at two consecutive observation times: p(s(tv) = k, s(tv+1) = l|O, T, ˆQ0). 3.3 Computing the Posterior State Probabilities The challenge in efficiently computing p(s(tv) = k, s(tv+1) = l|O, T, ˆQ0) is to avoid the explicit enumeration of all possible state transition sequences and the variable time intervals between intermediate state transitions (from k to l). The key is to note that the posterior state probabilities are only needed at the times where we have observation data. We can exploit this insight to reformulate the estimation problem in terms of an equivalent discrete time-inhomogeneous hidden Markov model. Specifically, given the current estimate ˆQ0, O and T, we will divide the time into V intervals, each with duration τv = tv −tv−1. We then make use of the transition property of CTMC, and associate each interval v with a state transition matrix P v(τv) := e ˆ Q0τv. Together with the emission model p(o|s), we then have a discrete time-inhomogeneous hidden Markov model with joint likelihood: V Y v=1 [P v(τv)](s(tv−1),s(tv)) V Y v=0 p(ov|s(tv)). (11) The formulation in Eq. 11 allows us to reduce the computation of p(s(tv) = k, s(tv+1) = l|O, T, ˆQ0) to familiar operations. The forward-backward algorithm [13] can be used to compute the posterior distribution of the hidden states, which we refer to as the Soft method. Alternatively, the MAP assignment of hidden states obtained from the Viterbi algorithm can provide an approximate distribution, which we refer to as the Hard method. 4 EM Algorithms for CT-HMM Pseudocode for the EM algorithm for CT-HMM parameter learning is shown in Algorithm 1. Multiple variants of the basic algorithm are possible, depending on the choice of method for computing the end-state conditioned expectations along with the choice of Hard or Soft decoding for obtaining the posterior state probabilities in Eq. 11. Note that in line 7 of Algorithm 1, 4 Algorithm 1 CT-HMM Parameter learning (Soft/Hard) 1: Input: data O = (o0, ..., oV ) and T = (t0, . . . , tV ), state set S, edge set L, initial guess of Q 2: Output: transition rate matrix Q = (qij) 3: Find all distinct time intervals t∆, ∆= 1, ..., r, from T 4: Compute P(t∆) = eQt∆for each t∆ 5: repeat 6: Compute p(v, k, l) = p(s(tv) = k, s(tv+1) = l|O, T, Q) for all v, and the complete/stateoptimized data likelihood l by using Forward-Backward (soft) or Viterbi (hard) 7: Create soft count table C(∆, k, l) from p(v, k, l) by summing prob. from visits of same t∆ 8: Use Expm, Unif or Eigen method to compute E[nij|O, T, Q] and E[τi|O, T, Q] 9: Update qij = E[nij|O,T,Q] E[τi|O,T,Q] , and qii = −P i̸=j qij 10: until likelihood l converges we group probabilities from successive visits of same time interval and the same specified endstates in order to save computation time. This is valid because in a time-homogeneous CT-HMM, E[nij|s(tv) = k, s(tv+1) = l, ˆQ0] = E[nij|s(0) = k, s(t∆) = l, ˆQ0], where t∆= tv+1−tv, so that the expectations only need to be evaluated for each distinct time interval, rather than each different visiting time (also see the discussion below Eq. 2). 4.1 Computing the End-State Conditioned Expectations The remaining step in finalizing the EM algorithm is to discuss the computation of the end-state conditioned expectations for nij and τi from Eqs. 9 and 10, respectively. The first step is to express the expectations in integral form, following [14]: E[nij|s(0) = k, s(t) = l, Q] = qi,j Pk,l(t) Z t 0 Pk,i(x)Pj,l(t −x) dx (12) E[τi|s(0) = k, s(t) = l, Q] = 1 Pk,l(t) Z t 0 Pk,i(x)Pi,l(t −x) dx. (13) From Eq. 12, we define τ i,j k,l(t) = R t 0 Pk,i(x)Pj,l(t −x)dx = R t 0(eQx)k,i(eQ(t−x))j,l dx, while τ i,i k,l(t) can be similarly defined for Eq. 13 (see [6] for a similar construction). Several methods for computing τ i,j k,l(t) and τ i,i k,l(t) have been proposed in the CTMC literature. Metzner et. al. observe that closed-form expressions can be obtained when Q is diagonalizable [8]. Unfortunately, this property is not guaranteed to exist, and in practice we find that the intermediate Q matrices are frequently not diagonalizable during EM iterations. We refer to this approach as Eigen. An alternative is to leverage a classic method of Van Loan [15] for computing integrals of matrix exponentials. In this approach, an auxiliary matrix A is constructed as A = Q B 0 Q , where B is a matrix with identical dimensions to Q. It is shown in [15] that R t 0 eQxBeQ(t−x)dt = (eAt)(1:n),(n+1):(2n), where n is the dimension of Q. Following [9], we set B = I(i, j), where I(i, j) is the matrix with a 1 in the (i, j)th entry and 0 elsewhere. Thus the left hand side reduces to τ i,j k,l(t) for all k, l in the corresponding matrix entries. Thus we can leverage the substantial literature on numerical computation of the matrix exponential. We refer to this approach as Expm, after the popular Matlab function. A third approach for computing the expectations, introduced by Hobolth and Jensen [9] for CTMCs, is called uniformization (Unif) and is described in the supplementary material, along with additional details for Expm. Expm Based Algorithm Algorithm 2 presents pseudocode for the Expm method for computing end-state conditioned statistics. The algorithm exploits the fact that the A matrix does not change with time t∆. Therefore, when using the scaling and squaring method [16] for computing matrix exponentials, one can easily cache and reuse the intermediate powers of A to efficiently compute etA for different values of t. 4.2 Analysis of Time Complexity and Run-Time Comparisons We conducted asymptotic complexity analysis for all six combinations of Hard and Soft EM with the methods Expm, Unif, and Eigen for computing the conditional expectations. For both hard and 5 Algorithm 2 The Expm Algorithm for Computing End-State Conditioned Statistics 1: for each state i in S do 2: for ∆= 1 to r do 3: Di = (et∆A)(1:n),(n+1):(2n) Pkl(t∆) , where A = Q I(i, i) 0 Q 4: E[τi|O, T, Q] + = P (k,l)∈L C(∆, k, l)(Di)k,l 5: end for 6: end for 7: for each edge (i, j) in L do 8: for ∆= 1 to r do 9: Nij = qij(et∆A)(1:n),(n+1):(2n) Pkl(t∆) , where A = Q I(i, j) 0 Q 10: E[nij|O, T, Q] + = P (k,l)∈L C(∆, k, l)(Nij)k,l 11: end for 12: end for soft variants, the time complexity of Expm is O(rS4 +rLS3), where r is the number of distinct time intervals between observations, S is the number of states, and L is the number of edges. The soft version of Eigen has the same time complexity, but since the eigendecomposition of non-symmetric matrices can be ill-conditioned in any EM iteration [17], this method is not attractive. Unif is based on truncating an infinite sum and the truncation point M varies with maxi,t∆qit∆, with the result that the cost of Unif varies significantly with both the data and the parameters. In comparison, Expm is much less sensitive to these values (log versus quadratic dependency). See the supplemental material for the details. We conclude that Expm is the most robust method available for the soft EM case. When the state space is large, hard EM can be used to tradeoff accuracy with time. In the hard EM case, Unif can be more efficient than Expm, because Unif can evaluate only the expectations specified by the required end-states from the best decoded paths, whereas Expm must always produce results from all end-states. These asymptotic results are consistent with our experimental findings. On the glaucoma dataset from Section 5.2, using a model with 105 states, Soft Expm requires 18 minutes per iteration on a 2.67 GHz machine with unoptimized MATLAB code, while Soft Unif spends more than 105 minutes per iteration, Hard Unif spends 2 minutes per iteration, and Eigen fails. 5 Experimental results We evaluated our EM algorithms in simulation (Sec. 5.1) and on two real-world datasets: a glaucoma dataset (Sec. 5.2) in which we compare our prediction performance to a state-of-the-art method, and a dataset for Alzheimer’s disease (AD, Sec. 5.3) where we compare visualized progression trends to recent findings in the literature. Our disease progression models employ 105 (Glaucoma) and 277 (AD) states, representing a significant advance in the ability to work with large models (previous CT-HMM works [2, 7, 5] employed fewer than 100 states). 5.1 Simulation on a 5-state Complete Digraph We test the accuracy of all methods on a 5-state complete digraph with synthetic data generated under different noise levels. Each qi is randomly drawn from [1, 5] and then qij is drawn from [0, 1] and renormalized such that P j̸=i qij = qi. The state chains are generated from Q, such that each chain has a total duration around T = 100 mini qi , where 1 mini qi is the largest mean holding time. The data emission model for state i is set as N(i, σ2), where σ varies under different noise level settings. The observations are then sampled from the state chains with rate 0.5 maxi qi , where 1 maxi qi is the smallest mean holding time, which should be dense enough to make the chain identifiable. A total of 105 observations are sampled. The average 2-norm relative error ||ˆq−q|| ||q|| is used as the performance metric, where ˆq is a vector contains all learned qij parameters, and q is the ground truth. The simulation results from 5 random runs are listed in Table 1. Expm and Unif produce nearly identical results so they are combined in the table. Eigen fails at least once for each setting, but when it works it produces similar results. All Soft methods achieve significantly better accuracy 6 Table 1: The average 2-norm relative error from 5 random runs on a 5-state complete digraph under varying noise levels. The convergence threshold is ≤10−8 on relative data likelihood change. Error σ = 1/4 σ = 3/8 σ = 1/2 σ = 1 σ = 2 S(Expm,Unif) 0.026±0.008 0.032±0.008 0.042±0.012 0.199±0.084 0.510±0.104 H(Expm,Unif) 0.031±0.009 0.197±0.062 0.476±0.100 0.857±0.080 0.925±0.030 s(0)=i s(t)=j t1 t2 b1 b2 b3 Functional deterioration Structural deterioration ... ... Functional deterioration Structural deterioration (a) (b) (c) Figure 1: (a) The 2D-grid state structure for glaucoma progression modeling. (b) Illustration of the prediction of future states from s(0) = i. (c) One fold of convergence behavior of Soft(Expm) on the glaucoma dataset. than Hard methods, especially when the noise level becomes higher. This can be attributed to the maintenance of the full hidden state distribution which makes it more robust to noise. 5.2 Application of CT-HMM to Predicting Glaucoma Progression In this experiment we used CT-HMM to visualize a real-world glaucoma dataset and predict glaucoma progression. Glaucoma is a leading cause of blindness and visual morbidity worldwide [18]. This disease is characterized by a slowly progressing optic neuropathy with associated irreversible structural and functional damage. There are conflicting findings in the temporal ordering of detectable structural and functional changes, which confound glaucoma clinical assessment and treatment plans [19]. Here, we use a 2D-grid state space model with 105 states, defined by successive value bands of the two main glaucoma markers, Visual Field Index (VFI) (functional marker) and average RNFL (Retinal Nerve Fiber Layer) thickness (structural marker) with forwarding edges (see Fig. 1(a)). More details of the dataset and model can be found in the supplementary material. We utilize Soft Expm for the following experiments, since it converges quickly (see Fig. 1(c)), has an acceptable computational cost, and exhibits the best performance. To predict future continuous measurements, we follow a simple procedure illustrated in Fig. 1(b). Given a testing patient, Viterbi decoding is used to decode the best hidden state path for the past visits. Then, given a future time t, the most probable future state is predicted by j = maxj Pij(t) (blue node), where i is the current state (black node). To predict the continuous measurements, we search for the future time t1 and t2 in a desired resolution when the patient enters and leaves a state having same value range as state j for each disease marker separately. The measurement at time t can then be computed by linear interpolation between t1 and t2 and the two data bounds of state j for the specified marker ([b1, b2] in Fig. 1(b)). The mean absolute error (MAE) between the predicted values and the actual measurements was used for performance assessment. The performance of CTHMM was compared to both conventional linear regression and Bayesian joint linear regression [11]. For the Bayesian method, the joint prior distribution of the four parameters (two intercepts and two slopes) computed from the training set [11] is used alongside the data likelihood. The results in Table 2 demonstrate the significantly improved performance of CT-HMM. In Fig. 2(a), we visualize the model trained using the entire dataset. Several dominant paths can be identified: there is an early stage containing RNFL thinning with intact vision (blue vertical path in the first column), and at around RNFL range [80, 85] the transition trend reverses and VFI changes become more evident (blue horizontal paths). This L shape in the disease progression supports the finding in [20] that RNFL thickness of around 77 microns is a tipping point at which functional deterioration becomes clinically observable with structural deterioration. Our 2D CT-HMM model can be used to visualize the non-linear relationship between structural and functional degeneration, yielding insights into the progression process. 5.3 Application of CT-HMM to Exploratory Analysis of Alzheimer’s Disease We now demonstrate the use of CT-HMM as an exploratory tool to visualize the temporal interaction of disease markers of Alzheimer’s Disease (AD). AD is an irreversible neuro-degenerative disease that results in a loss of mental function due to the degeneration of brain tissues. An estimated 5.3 7 Table 2: The mean absolute error (MAE) of predicting the two glaucoma measures. (∗represents that CTHMM performs significantly better than the competing method under student t-test). MAE CT-HMM Bayesian Joint Linear Regression Linear Regression VFI 4.64 ± 10.06 5.57 ± 11.11 * (p = 0.005) 7.00 ± 12.22 *(p ≈0.000) RNFL 7.05 ± 6.57 9.65 ± 8.42 * (p ≈0.000) 18.13 ± 20.70 * (p ≈0.000) million Americans have AD, yet no prevention or cures have been found [21]. It could be beneficial to visualize the relationship between clinical, imaging, and biochemical markers as the pathology evolves, in order to better understand AD progression and develop treatments. A 277 state CT-HMM model was constructed from a cohort of AD patients (see the supplementary material for additional details). The 3D visualization result is shown in Fig. 2(b). The state transition trends show that the abnormality of Aβ level emerges first (blue lines) when cognition scores are still normal. Hippocampus atrophy happens more often (green lines) when Aβ levels are already low and cognition has started to show abnormality. Most cognition degeneration happens (red lines) when both Aβ levels and Hippocampus volume are already in abnormal stages. Our quantitative visualization results supports recent findings that the decreasing of Aβ level in CSF is an early marker before detectable hippocampus atrophy in cognition-normal elderly [22]. The CT-HMM disease model with interactive visualization can be utilized as an exploratory tool to gain insights of the disease progression and generate hypotheses to be further investigated by medical researchers. Functional degeneration (VFI) Structural degeneration (RNFL) structural (Hippocampus) biochemical (A beta) functional (Cognition) (a) Glaucoma progression (b) Alzheimer's disease progression Figure 2: Visualization scheme: (a) The strongest transition among the three instantaneous links from each state are shown in blue while other transitions are drawn in dotted black. The line width and the node size reflect the expected count. The node color represents the average sojourn time (red to green: 0 to 5 years and above). (b) similar to (a) but the strongest transition from each state is color coded as follows: Aβ direction (blue), hippo (green), cog (red), Aβ+hippo (cyan), Aβ+cog (magenta), hippo+cog (yellow), Aβ+hippo+ cog(black). The node color represents the average sojourn time (red to green: 0 to 3 years and above). 6 Conclusion In this paper, we present novel EM algorithms for CT-HMM learning which leverage recent approaches [9] for evaluating the end-state conditioned expectations in CTMC models. To our knowledge, we are the first to develop and test the Expm and Unif methods for CT-HMM learning. We also analyze their time complexity and provide experimental comparisons among the methods under soft and hard EM frameworks. We find that soft EM is more accurate than hard EM, and Expm works the best under soft EM. We evaluated our EM algorithsm on two disease progression datasets for glaucoma and AD. We show that CT-HMM outperforms the state-of-the-art Bayesian joint linear regression method [11] for glaucoma progression prediction. This demonstrates the practical value of CT-HMM for longitudinal disease modeling and prediction. Acknowledgments Portions of this work were supported in part by NIH R01 EY13178-15 and by grant U54EB020404 awarded by the National Institute of Biomedical Imaging and Bioengineering through funds provided by the Big Data to Knowledge (BD2K) initiative (www.bd2k.nih.gov). Additionally, the collection and sharing of the Alzheimers data was funded by ADNI under NIH U01 AG024904 and DOD award W81XWH-12-2-0012. The research was also supported in part by NSF/NIH BIGDATA 1R01GM108341, ONR N00014-15-1-2340, NSF IIS-1218749, and NSF CAREER IIS-1350983. 8 References [1] D. R. Cox and H. D. Miller, The Theory of Stochastic Processes. London: Chapman and Hall, 1965. [2] C. H. Jackson, “Multi-state models for panel data: the msm package for R,” Journal of Statistical Software, vol. 38, no. 8, 2011. [3] N. Bartolomeo, P. Trerotoli, and G. Serio, “Progression of liver cirrhosis to HCC: an application of hidden markov model,” BMC Med Research Methold., vol. 11, no. 38, 2011. [4] Y. Liu, H. Ishikawa, M. Chen, and et al., “Longitudinal modeling of glaucoma progression using 2-dimensional continuous-time hidden markov model,” Med Image Comput Comput Assist Interv, vol. 16, no. 2, pp. 444–51, 2013. [5] X. Wang, D. Sontag, and F. Wang, “Unsupervised learning of disease progression models,” Proceeding KDD, vol. 4, no. 1, pp. 85–94, 2014. [6] U. Nodelman, C. R. Shelton, and D. Koller, “Expectation maximization and complex duration distributions for continuous time bayesian networks,” in Proc. Uncertainty in AI (UAI 05), 2005. [7] J. M. Leiva-Murillo, A. Arts-Rodrguez, and E. Baca-Garca, “Visualization and prediction of disease interactions with continuous-time hidden markov models,” in NIPS, 2011. [8] P. Metzner, I. Horenko, and C. Schtte, “Generator estimation of markov jump processes based on incomplete observations nonequidistant in time,” Physical Review E, vol. 76, no. 066702, 2007. [9] A. Hobolth and J. L. Jensen, “Summary statistics for endpoint-conditioned continuous-time markov chains,” Journal of Applied Probability, vol. 48, no. 4, pp. 911–924, 2011. [10] P. Tataru and A. Hobolth, “Comparison of methods for calculating conditional expectations of sufficient statistics for continuous time markov chains,” BMC Bioinformatics, vol. 12, no. 465, 2011. [11] F. Medeiros, L. Zangwill, C. Girkin, and et al., “Combining structural and functional measurements to improve estimates of rates of glaucomatous progression,” Am J Ophthalmol, vol. 153, no. 6, pp. 1197–205, 2012. [12] M. Bladt and M. Srensen, “Statistical inference for discretely observed markov jump processes,” J. R. Statist. Soc. B, vol. 39, no. 3, p. 395410, 2005. [13] L. R. Rabinar, “A tutorial on hidden markov models and selected applications in speech recognition,” Proceedings of the IEEE, vol. 77, no. 2, 1989. [14] A. Hobolth and J. L.Jensen, “Statistical inference in evolutionary models of DNA sequences via the EM algorithm,” Statistical Applications in Genetics and Molecular Biology, vol. 4, no. 1, 2005. [15] C. Van Loan, “Computing integrals involving the matrix exponential,” IEEE Trans. Automatic Control, vol. 23, pp. 395–404, 1978. [16] N. Higham, Functions of Matrices: Theory and Computation. SIAM, 2008. [17] P. Metzner, I. Horenko, and C. Schtte, “Generator estimation of markov jump processes,” Journal of Computational Physics, vol. 227, p. 353375, 2007. [18] S. Kingman, “Glaucoma is second leading cause of blindness globally,” Bulletin of the World Health Organization, vol. 82, no. 11, 2004. [19] G. Wollstein, J. Schuman, L. Price, and et al., “Optical coherence tomography longitudinal evaluation of retinal nerve fiber layer thickness in glaucoma,” Arch Ophthalmol, vol. 123, no. 4, pp. 464–70, 2005. [20] G. Wollstein, L. Kagemann, R. Bilonick, and et al., “Retinal nerve fibre layer and visual function loss in glaucoma: the tipping point,” Br J Ophthalmol, vol. 96, no. 1, pp. 47–52, 2012. [21] The Alzheimers Disease Neuroimaging Initiative, “http://adni.loni.usc.edu,” [22] A. M. Fagan, D. Head, A. R. Shah, and et. al, “Decreased CSF A beta 42 correlates with brain atrophy in cognitively normal elderly,” Ann Neurol., vol. 65, no. 2, p. 176183, 2009. 9 | 2015 | 259 |
5,768 | Policy Evaluation Using the Ω-Return Philip S. Thomas University of Massachusetts Amherst Carnegie Mellon University Scott Niekum University of Texas at Austin Georgios Theocharous Adobe Research George Konidaris Duke University Abstract We propose the Ω-return as an alternative to the λ-return currently used by the TD(λ) family of algorithms. The benefit of the Ω-return is that it accounts for the correlation of different length returns. Because it is difficult to compute exactly, we suggest one way of approximating the Ω-return. We provide empirical studies that suggest that it is superior to the λ-return and γ-return for a variety of problems. 1 Introduction Most reinforcement learning (RL) algorithms learn a value function—a function that estimates the expected return obtained by following a given policy from a given state. Efficient algorithms for estimating the value function have therefore been a primary focus of RL research. The most widely used family of RL algorithms, the TD(λ) family [1], forms an estimate of return (called the λ-return) that blends low-variance but biased temporal difference return estimates with high-variance but unbiased Monte Carlo return estimates, using a parameter λ ∈[0, 1]. While several different algorithms exist within the TD(λ) family—the original linear-time algorithm [1], least-squares formulations [2], and methods for adapting λ [3], among others—the λ-return formulation has remained unchanged since its introduction in 1988 [1]. Recently Konidaris et al. [4] proposed the γ-return as an alternative to the λ-return, which uses a more accurate model of how the variance of a return increases with its length. However, both the γ and λ-returns fail to account for the correlation of returns of different lengths, instead treating them as statistically independent. We propose the Ω-return, which uses well-studied statistical techniques to directly account for the correlation of returns of different lengths. However, unlike the λ and γ-returns, the Ω-return is not simple to compute, and often can only be approximated. We propose a method for approximating the Ω-return, and show that it outperforms the λ and γ-returns on a range of off-policy evaluation problems. 2 Complex Backups Estimates of return lie at the heart of value-function based RL algorithms: an estimate, ˆV π, of the value function, V π, estimates return from each state, and the learning process aims to reduce the error between estimated and observed returns. For brevity we suppress the dependencies of V π and ˆV π on π and write V and ˆV . Temporal difference (TD) algorithms use an estimate of the return obtained by taking a single transition in the Markov decision process (MDP) [5] and then estimating the remaining return using the estimate of the value function: RTD st = rt + γ ˆV (st+1), 1 where RTD st is the return estimate from state st, rt is the reward for going from st to st+1 via action at, and γ ∈[0, 1] is a discount parameter. Monte Carlo algorithms (for episodic tasks) do not use intermediate estimates but instead use the full return, RMC st = L−1 X i=0 γirt+i, for an episode L transitions in length after time t (we assume that L is finite). These two types of return estimates can be considered instances of the more general notion of an n-step return, R(n) st = n−1 X i=0 γirt+i ! + γn ˆV (st+n), for n ≥1. Here, n transitions are observed from the MDP and the remaining portion of return is estimated using the estimate of the value function. Since st+L is a state that occurs after the end of an episode, we assume that ˆV (st+L) = 0, always. A complex return is a weighted average of the 1, . . . , L step returns: R† st = L X n=1 w†(n, L)R(n) st , (1) where w†(n, L) are weights and † ∈{λ, γ, Ω} will be used to specify the weighting schemes of different approaches. The question that this paper proposes an answer to is: what weighting scheme will produce the best estimates of the true expected return? The λ-return, Rλ st, is the weighting scheme that is used by the entire family of TD(λ) algorithms [5]. It uses a parameter λ ∈[0, 1] that determines how the weight given to a return decreases as the length of the return increases: wλ(n, L) = ( (1 −λ)λn−1 if n < L 1 −Pn−1 i=1 wλ(i) if n = L. When λ = 0, Rλ st = RTD st , which has low variance but high bias. When λ = 1, Rλ st = RMC st , which has high variance but is unbiased. Intermediate values of λ blend the high-bias but low-variance estimates from short returns with the low-bias but high-variance estimates from the longer returns. The success of the λ-return is largely due to its simplicity—TD(λ) using linear function approximation has per-time-step time complexity linear in the number of features. However, this efficiency comes at a cost: the λ-return is not founded on a principled statistical derivation.1 Konidaris et al. [4] remedied this recently by showing that the λ-return is the maximum likelihood estimator of V (st) given three assumptions. Specifically, Rλ st ∈arg maxx∈R Pr(R(1) st , R(2) st , . . . , R(L) st |V (st) = x) if Assumption 1 (Independence). R(1) st , . . . , R(L) st are independent random variables, Assumption 2 (Unbiased Normal Estimators). R(n) st is normally distributed with mean E[R(n) st ] = V (st) for all n. Assumption 3 (Geometric Variance). Var(R(n) st ) ∝1/λn. Although this result provides a theoretical foundation for the λ-return, it is based on three typically false assumptions: the returns are highly correlated, only the Monte Carlo return is unbiased, and the variance of the n-step returns from each state do not usually increase geometrically. This suggests three areas where the λ-return might be improved—it could be modified to better account for the correlation of returns, the bias of the different returns, and the true form of Var(R(n) st ). The γ-return uses an approximate formula for the variance of an n-step return in place of Assumption 3. This allows the γ-return to better account for how the variance of returns increases with their 1To be clear: there is a wealth of theoretical and empirical analyses of algorithms that use the λ-return. Until recently there was not a derivation of the λ-return as the estimator of V (st) that optimizes some objective (e.g., maximizes log likelihood or minimizes expected squared error). 2 length, while simultaneously removing the need for the λ parameter. The γ-return is given by the weighting scheme: wγ(n, L) = (Pn i=1 γ2(i−1))−1 PL ˆn=1(Pˆn i=1 γ2(i−1))−1 . 3 The Ω-Return We propose a new complex return, the Ω-return, that improves upon the λ and γ returns by accounting for the correlations of the returns. To emphasize this problem, notice that R(20) st and R(21) st will be almost identical (perfectly correlated) for many MDPs (particularly when γ is small). This means that Assumption 1 is particularly egregious, and suggests that a new complex return might improve upon the λ and γ-returns by properly accounting for the correlation of returns. We formulate the problem of how best to combine different length returns to estimate the true expected return as a linear regression problem. This reformulation allows us to leverage the wellunderstood properties of linear regression algorithms. Consider a regression problem with L points, {(xi, yi)}L i=1, where the value of yi depends on the value of xi. The goal is to predict yi given xi. We set xi = 1 and yi = R(i) st . We can then construct the design matrix (a vector in this case), x = 1 = [1, . . . , 1]⊺∈RL and the response vector, y = [R(1) st , R(2) st , . . . , R(L) st ]⊺. We seek a regression coefficient, ˆβ ∈R, such that y ≈xˆβ. This ˆβ will be our estimate of the true expected return. Generalized least squares (GLS) is a method for selecting ˆβ when the yi are not necessarily independent and may have different variances. Specifically, if we use a linear model with (possibly correlated) mean-zero noise to model the data, i.e., y = xβ + ϵ, where β ∈R is unknown, ϵ is a random vector, E[ϵ] = 0, and Var(ϵ|x) = Ω, then the GLS estimator ˆβ = (x⊺Ω−1x)−1x⊺Ω−1y, (2) is the best linear unbiased estimator (BLUE) for β [6]—the linear unbiased estimator with the lowest possible variance. In our setting the assumptions about the true model that produced the data become that [R(1) st , R(2) st , . . . , R(L) st ]⊺= [V (st), V (st), . . . , V (st)]⊺+ ϵ, where E[ϵ] = 0 (i.e., the returns are all unbiased estimates of the true expected return) and Var(ϵ|x) = Ω. Since x = 1 in our case, Var(ϵ|x)(i, j) = Cov(R(i) st −V (st), R(j) st −V (st)) = Cov(R(i) st , R(j) st ), where Var(ϵ|x)(i, j) denotes the element of Var(ϵ|x) in the ith row and jth column. So, using only Assumption 2, GLS ((2), solved for ˆβ) gives us the complex return: ˆβ = [ 1 1 . . . 1 ] Ω−1 1 1 ... 1 −1 | {z } = 1 PL n,m=1 Ω−1(n,m) [ 1 1 . . . 1 ] Ω−1 R(1) st R(2) st ... R(L) st | {z } =PL n,m=1 Ω−1(n,m)R(n) st , which can be written in the form of (1) with weights: wΩ(n, L) = PL m=1 Ω−1(n, m) PL ˆn,m=1 Ω−1(ˆn, m) , (3) where Ωis an L × L matrix with Ω(i, j) = Cov(R(i) st , R(j) st ). Notice that the Ω-return is a generalization of the λ and γ returns. The λ-return can be obtained by reintroducing the false assumption that the returns are independent and that their variance grows geometrically, i.e., by making Ωa diagonal matrix with Ωn,n = λ−n. Similarly, the γ-return can be obtained by making Ωa diagonal matrix with Ωn,n = Pn i=1 γ2(i−1). 3 Notice that RΩ st is a BLUE of V (st) if Assumption 2 holds. Since Assumption 2 does not hold, the Ω-return is not an unbiased estimator of V (s). Still, we expect it to outperform the λ and γ-returns because it accounts for the correlation of n-step returns and they do not. However, in some cases it may perform worse because it is still based on the false assumption that all of the returns are unbiased estimators of V (st). Furthermore, given Assumption 2, there may be biased estimators of V (st) that have lower expected mean squared error than a BLUE (which must be unbiased). 4 Approximating the Ω-Return In practice the covariance matrix, Ω, is unknown and must be approximated from data. This approach, known as feasible generalized least squares (FGLS), can perform worse than ordinary least squares given insufficient data to accurately estimate Ω. We must therefore accurately approximate Ωfrom small amounts of data. To study the accuracy of covariance matrix estimates, we estimated Ωusing a large number of trajectories for four different domains: a 5 × 5 gridworld, a variant of the canonical mountain car domain, a real-world digital marketing problem, and a continuous control problem (DAS1), all of which are described in more detail in subsequent experiments. The covariance matrix estimates are depicted in Figures 1(a), 2(a), 3(a), and 4(a). We do not specify rows and columns in the figures because all covariance matrices and estimates thereof are symmetric. Because they were computed from a very large number of trajectories, we will treat them as ground truth. We must estimate the Ω-return when only a few trajectories are available. Figures 1(b), 2(b), 3(b), and 4(b) show direct empirical estimates of the covariance matrices using only a few trajectories. These empirical approximations are poor due to the very limited amount of data, except for the digital marketing domain, where a “few” trajectories means 10,000. The solid black entries in Figures 1(f), 2(f), 3(f), and 4(f) show the weights, wΩ(n, L), on different length returns when using different estimates of Ω. The noise in the direct empirical estimate of the covariance matrix using only a few trajectories leads to poor estimates of the return weights. When approximating Ωfrom a small number of trajectories, we must be careful to avoid this overfitting of the available data. One way to do this is to assume a compact parametric model for Ω. Below we describe a parametric model of Ωthat has only four parameters, regardless of L (which determines the size of Ω). We use this parametric model in our experiments as a proof of concept— we show that the Ω-return using even this simple estimate of Ωcan produce improved results over the other existing complex returns. We do not claim that this scheme for estimating Ωis particularly principled or noteworthy. 4.1 Estimating Off-Diagonal Entries of Ω Notice in Figures 1(a), 2(a), 3(a), and 4(a) that for j > i, Cov(Ri st, Rj st) ≈Cov(Ri st, Ri st) = Var(Ri st). This structure would mean that we can fill in Ωgiven its diagonal values, leaving only L parameters. We now explain why this relationship is reasonable in general, and not just an artifact of our domains. We can write each entry in Ωas a recurrence relation: Cov[R(i) st , R(j) st ] =Cov[R(i) st , R(j−1) st + γj−1(rt+j + γ ˆV (st+j) −ˆV (st+j−1)] =Cov[R(i) st , R(j−1) st ] + γj−1Cov[R(i) st , rt+j + γ ˆV (st+j) −ˆV (st+j−1)], when i < j. The term rt+j + γ ˆV (st+j) −ˆV (st+j−1) is the temporal difference error j steps in the future. The proposed assumption that Cov(Ri st, Rj st) = Var(Ri st) is equivalent to assuming that the covariance of this temporal difference error and the i-step return is negligible: γj−1Cov[R(i) st , rt+j + γ ˆV (st+j) −ˆV (st+j−1)] ≈0. The approximate independence of these two terms is reasonable in general due to the Markov property, which ensures that at least the conditional covariance, Cov[R(i) st , rt+j + γ ˆV (st+j) −ˆV (st+j−1)|st], is zero. Because this relationship is not exact, the off-diagonal entries tend to grow as they get farther from the diagonal. However, especially when some trajectories are padded with absorbing states, this relationship is quite accurate when j = L, since the temporal difference errors at the absorbing state are all zero, and Cov[R(i) st , 0] = 0. This results in a significant difference between Cov[R(i) st , R(L−1) st ] 4 5 10 15 20 0 5 10 15 20 25 0 5 10 15 20 25 (a) Empirical Ωfrom 1 million trajectories. 5 10 15 20 0 5 10 15 20 25 −10 0 10 20 30 (b) Empirical Ωfrom 5 trajectories. 5 10 15 20 0 5 10 15 20 25 0 5 10 15 20 25 (c) Approximate Ωfrom 1 million trajectories. 5 10 15 20 0 5 10 15 20 25 0 10 20 30 (d) Approximate Ωfrom 5 trajectories. 0 15 30 0 20 Variance Return Length Empirical 1M Approx 1M Empirical 5 Approx 5 (e) Approximate and empirical diagonals of Ω. -0.2 1 1 20 Weight, w(n, 20) Return Length, n Empirical 1M Approx 1M Empirical 5 Approx 5 (f) Approximate and empirical weights for each return. λ=0.8, 3.19055 App Ω, 1.95394 1 10 100 1,000 Mean Squared Error Return Type (g) Mean squared error from five trajectories. Figure 1: Gridworld Results. 5 10 15 20 25 30 0 10 20 30 40 −20 0 20 40 60 80 (a) Empirical Ωfrom 1 million trajectories. 5 10 15 20 25 30 0 10 20 30 40 −100 0 100 200 (b) Empirical Ωfrom 2 trajectories. 5 10 15 20 25 30 0 10 20 30 40 0 20 40 60 80 (c) Approximate Ωfrom 1 million trajectories. 5 10 15 20 25 30 0 10 20 30 40 0 50 100 150 (d) Approximate Ωfrom 2 trajectories. 0 80 160 0 30 Variance Return Length Empirical 1M Approx 1M Empirical 2 Approx 2 (e) Approximate and empirical diagonals of Ω. -0.2 1 1 30 Weight, w(n, 11) Return Length, n Empirical 1M Approx 1M Empirical 2 Approx 2 (f) Approximate and empirical weights for each return. WIS, 144.48 App Ω, 76.39 10 100 1,000 10,000 IS WIS λ=0 λ=0.1 λ=0.2 λ=0.3 λ=0.4 λ=0.5 λ=0.6 λ=0.7 λ=0.8 λ=0.9 λ=1 γ Emp Ω App Ω Mean Squared Error Return Type (g) Mean squared error from two trajectories. Figure 2: Mountain Car Results. 5 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 910 0 0.05 0.1 0.15 0.2 (a) Empirical Ωfrom 1 million trajectories. 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 910 0 0.05 0.1 0.15 0.2 (b) Empirical Ω from 10000 trajectories. 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 910 0 0.05 0.1 0.15 0.2 (c) Approximate Ωfrom 1 million trajectories. 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 910 0 0.05 0.1 0.15 0.2 (d) Approximate Ωfrom 10000 trajectories. 0 0.08 0.16 0 10 Variance Return Length Empirical 1M Approx 1M Empirical 10k Approx 10k (e) Approximate and empirical diagonals of Ω. -0.5 1 1 10 Weight, w(n, 10) Return Length, n Empirical 1M Approx 1M Empirical 10k Approx 10k (f) Approximate and empirical weights for each return. λ=0, 0.0011 Emp Ω, 0.0007 App Ω, 0.0011 0 0.002 0.004 IS WIS λ=0 λ=0.1 λ=0.2 λ=0.3 λ=0.4 λ=0.5 λ=0.6 λ=0.7 λ=0.8 λ=0.9 λ=1 γ Emp Ω App Ω Mean Squared Error Return Type (g) Mean squared error from 10000 trajectories. Figure 3: Digital Marketing Results. 5 10 15 20 0 5 10 15 20 25 0 10 20 30 40 (a) Empirical Ω from 10000 trajectories. 5 10 15 20 0 5 10 15 20 25 −10 0 10 20 30 (b) Empirical Ωfrom 10 trajectories. 5 10 15 20 0 5 10 15 20 25 0 10 20 30 40 (c) Approximate Ωfrom 10000 trajectories. 5 10 15 20 0 5 10 15 20 25 0 5 10 15 20 25 (d) Approximate Ωfrom 10 trajectories. 0 20 40 0 10 20 Variance Return Length Empirical 10K Approx 10K Empirical 10 Approx 10 (e) Approximate and empirical diagonals of Ω. -0.5 1 1 20 Weight, w(n, 10) Return Length, n Empirical 10K Approx 10K Empirical 10 Approx 10 (f) Approximate and empirical weights for each return. λ=0, 3.2102 λ=1, 3.47436 App Ω, 3.1070 1 10 100 IS WIS λ=0 λ=0.1 λ=0.2 λ=0.3 λ=0.4 λ=0.5 λ=0.6 λ=0.7 λ=0.8 λ=0.9 λ=1 γ Emp Ω App Ω Mean Squared Error Return Type (g) Mean squared error from 10 trajectories. Figure 4: Functional Electrical Stimulation Results. 6 and Cov[R(i) st , R(L) st ]. Rather than try to model this drop, which can influence the weights significantly, we reintroduce the assumption that the Monte Carlo return is independent of the other returns, making the off-diagonal elements of the last row and column zero. 4.2 Estimating Diagonal Entries of Ω The remaining question is how best to approximate the diagonal of Ωfrom a very small number of trajectories. Consider the solid and dotted black curves in Figures 1(e), 2(e), 3(e), and 4(e), which depict the diagonals of Ωwhen estimated from either a large number or small number of trajectories. When using only a few trajectories, the diagonal includes fluctuations that can have significant impacts on the resulting weights. However, when using many trajectories (which we treat as giving ground truth), the diagonal tends to be relatively smooth and monotonically increasing until it plateaus (ignoring the final entry). This suggests using a smooth parametric form to approximate the diagonal, which we do as follows. Let vi denote the sample variance of R(i) st for i = 1 . . . L. Let v+ be the largest sample variance: v+ = maxi∈{1,...,L} vi. We parameterize the diagonal using four parameters, k1, k2, v+, and vL: ˆΩk1,k2,v+,vL(i, i) = k1 if i = 1 vL if i = L min{v+, k1k(1−t) 2 } otherwise. Ω(1, 1) = k1 sets the initial variance, and vL is the variance of the Monte Carlo return. The parameter v+ enforces a ceiling on the variance of the i-step return, and k2 captures the growth rate of the variance, much like λ. We select the k1 and k2 that minimize the mean squared error between ˆΩ(i, i) and vi, and set v+ and vL directly from the data.2 This reduces the problem of estimating Ω, an L × L matrix, to estimating four numbers from return data. Consider Figures 1(c), 2(c), 3(c), and 4(c), which depict ˆΩas computed from many trajectories. The differences between these estimates and the ground truth show that this parameterization is not perfect, as we cannot represent the true Ωexactly. However, the estimate is reasonable and the resulting weights (solid red) are visually similar to the ground truth weights (solid black) in Figures 1(f), 2(f), 3(f), and 4(f). We can now get accurate estimates of Ωfrom very few trajectories. Figures 1(d), 2(d), 3(d), and 4(d) show ˆΩwhen computed from only a few trajectories. Note their similarity to ˆΩwhen using a large number of trajectories, and that the resulting weights (unfilled red in Figures 1(f), 2(f), 3(f), and 4(f)) are similar to the those obtained using many more trajectories (the filled red bars). Pseudocode for approximating the Ω-return is provided in Algorithm 1. Unlike the λ-return, which can be computed from a single trajectory, the Ω-return requires a set of trajectories in order to estimate Ω. The pseudocode assumes that every trajectory is of length L, which can be achieved by padding shorter trajectories with absorbing states. 2We include the constraints that k2 ∈[0, 1] and 0 ≤k1 ≤v+. 7 Algorithm 1: Computing the Ω-return. Require: n trajectories beginning at s and of length L. 1. Compute R(i) s for i = 1, . . . , L and for each trajectory. 2. Compute the sample variances, vi = Var(R(i) s ), for i = 1, . . . , L. 3. Set v+ = maxi∈{1,...,L} vi. 4. Search for the k1 and k2 that minimize the mean squared error between vi and ˆΩk1,k2,v+,vL(i, i) for i = 1, . . . , L. 5. Fill the diagonal of the L × L matrix, Ω, with Ω(i, i) = ˆΩk1,k2,v+,vL(i, i), using the optimized k1 and k2. 6. Fill all of the other entries with Ω(i, j) = Ω(i, i) where j > i. If (i = L or j = L) and i ̸= j then set Ω(i, j) = 0 instead. 7. Compute the weights for the returns according to (3). 8. Compute the Ω-return for each trajectory according to (1). 5 Experiments Approximations of the Ω-return could, in principle, replace the λ-return in the whole family of TD(λ) algorithms. However, using the Ω-return for TD(λ) raises several interesting questions that are beyond the scope of this initial work (e.g., is there a linear-time way to estimate the Ω-return? Since a different Ωis needed for every state, how can the Ω-return be used with function approximation where most states will never be revisited?). We therefore focus on the specific problem of off-policy policy evaluation—estimating the performance of a policy using trajectories generated by a possibly different policy. This problem is of interest for applications that require the evaluation of a proposed policy using historical data. Due to space constraints, we relegate the details of our experiments to the appendix in the supplemental documents. However, the results of the experiments are clear—Figures 1(g), 2(g), 3(g), and 4(g) show the mean squared error (MSE) of value estimates when using various methods.3 Notice that, for all domains, using the Ω-return (the EMP Ωand APP Ωlabels) results in lower MSE than the γ-return and the λ-return with any setting of λ. 6 Conclusions Recent work has begun to explore the statistical basis of complex estimates of return, and how we might reformulate them to be more statistically efficient [4]. We have proposed a return estimator that improves upon the λ and γ-returns by accounting for the covariance of return estimates. Our results show that understanding and exploiting the fact that in control settings—unlike in standard supervised learning—observed samples are typically neither independent nor identically distributed, can substantially improve data efficiency in an algorithm of significant practical importance. Many (largely positive) theoretical properties of the λ-return and TD(λ) have been discovered over the past few decades. This line of research into other complex returns is still in its infancy, and so there are many open questions. For example, can the Ω-return be improved upon by removing Assumption 2 or by keeping Assumption 2 but using a biased estimator (not a BLUE)? Is there a method for approximating the Ω-return that allows for value function approximation with the same time complexity as TD(λ), or which better leverages our knowledge that the environment is Markovian? Would TD(λ) using the Ω-return be convergent in the same settings as TD(λ)? While we hope to answer these questions in future work, it is also our hope that this work will inspire other researchers to revisit the problem of constructing a statistically principled complex return. 3To compute the MSE we used a large number of Monte Carlo rollouts to estimate the true value of each policy. 8 References [1] R.S. Sutton. Learning to predict by the methods of temporal differences. Machine Learning, 3(1):9–44, 1988. [2] S.J. Bradtke and A.G. Barto. Linear least-squares algorithms for temporal difference learning. Machine Learning, 22(1-3):33–57, March 1996. [3] C. Downey and S. Sanner. Temporal difference Bayesian model averaging: A Bayesian perspective on adapting lambda. In Proceedings of the 27th International Conference on Machine Learning, pages 311– 318, 2010. [4] G.D. Konidaris, S. Niekum, and P.S. Thomas. TDγ: Re-evaluating complex backups in temporal difference learning. In Advances in Neural Information Processing Systems 24, pages 2402–2410, 2011. [5] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 1998. [6] T. Kariya and H. Kurata. Generalized Least Squares. Wiley, 2004. [7] D. Precup, R. S. Sutton, and S. Singh. Eligibility traces for off-policy policy evaluation. In Proceedings of the 17th International Conference on Machine Learning, pages 759–766, 2000. [8] A. R. Mahmood, H. Hasselt, and R. S. Sutton. Weighted importance sampling for off-policy learning with linear function approximation. In Advances in Neural Information Processing Systems 27, 2014. [9] J. R. Tetreault and D. J. Litman. Comparing the utility of state features in spoken dialogue using reinforcement learning. In Proceedings of the Human Language Technology/North American Association for Computational Linguistics, 2006. [10] G. D. Konidaris, S. Osentoski, and P. S. Thomas. Value function approximation in reinforcement learning using the Fourier basis. In Proceedings of the Twenty-Fifth Conference on Artificial Intelligence, pages 380–395, 2011. [11] G. Theocharous and A. Hallak. Lifetime value marketing using reinforcement learning. In The 1st Multidisciplinary Conference on Reinforcement Learning and Decision Making, 2013. [12] P. S. Thomas, G. Theocharous, and M. Ghavamzadeh. High confidence off-policy evaluation. In Proceedings of the Twenty-Ninth Conference on Artificial Intelligence, 2015. [13] D. Blana, R. F. Kirsch, and E. K. Chadwick. Combined feedforward and feedback control of a redundant, nonlinear, dynamic musculoskeletal system. Medical and Biological Engineering and Computing, 47: 533–542, 2009. [14] P. S. Thomas, M. S. Branicky, A. J. van den Bogert, and K. M. Jagodnik. Application of the actor-critic architecture to functional electrical stimulation control of a human arm. In Proceedings of the TwentyFirst Innovative Applications of Artificial Intelligence, pages 165–172, 2009. [15] P. M. Pilarski, M. R. Dawson, T. Degris, F. Fahimi, J. P. Carey, and R. S. Sutton. Online human training of a myoelectric prosthesis controller via actor-critic reinforcement learning. In Proceedings of the 2011 IEEE International Conference on Rehabilitation Robotics, pages 134–140, 2011. [16] K. Jagodnik and A. van den Bogert. A proportional derivative FES controller for planar arm movement. In 12th Annual Conference International FES Society, Philadelphia, PA, 2007. [17] N. Hansen and A. Ostermeier. Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation, 9(2):159–195, 2001. 9 | 2015 | 26 |
5,769 | Efficient Output Kernel Learning for Multiple Tasks Pratik Jawanpuria1, Maksim Lapin2, Matthias Hein1 and Bernt Schiele2 1Saarland University, Saarbr¨ucken, Germany 2Max Planck Institute for Informatics, Saarbr¨ucken, Germany Abstract The paradigm of multi-task learning is that one can achieve better generalization by learning tasks jointly and thus exploiting the similarity between the tasks rather than learning them independently of each other. While previously the relationship between tasks had to be user-defined in the form of an output kernel, recent approaches jointly learn the tasks and the output kernel. As the output kernel is a positive semidefinite matrix, the resulting optimization problems are not scalable in the number of tasks as an eigendecomposition is required in each step. Using the theory of positive semidefinite kernels we show in this paper that for a certain class of regularizers on the output kernel, the constraint of being positive semidefinite can be dropped as it is automatically satisfied for the relaxed problem. This leads to an unconstrained dual problem which can be solved efficiently. Experiments on several multi-task and multi-class data sets illustrate the efficacy of our approach in terms of computational efficiency as well as generalization performance. 1 Introduction Multi-task learning (MTL) advocates sharing relevant information among several related tasks during the training stage. The advantage of MTL over learning tasks independently has been shown theoretically as well as empirically [1, 2, 3, 4, 5, 6, 7]. The focus of this paper is the question how the task relationships can be inferred from the data. It has been noted that naively grouping all the tasks together may be detrimental [8, 9, 10, 11]. In particular, outlier tasks may lead to worse performance. Hence, clustered multi-task learning algorithms [10, 12] aim to learn groups of closely related tasks. The information is then shared only within these clusters of tasks. This corresponds to learning the task covariance matrix, which we denote as the output kernel in this paper. Most of these approaches lead to non-convex problems. In this work, we focus on the problem of directly learning the output kernel in the multi-task learning framework. The multi-task kernel on input and output is assumed to be decoupled as the product of a scalar kernel and the output kernel, which is a positive semidefinite matrix [1, 13, 14, 15]. In classical multi-task learning algorithms [1, 16], the degree of relatedness between distinct tasks is set to a constant and is optimized as a hyperparameter. However, constant similarity between tasks is a strong assumption and is unlikely to hold in practice. Thus recent approaches have tackled the problem of directly learning the output kernel. [17] solves a multi-task formulation in the framework of vector-valued reproducing kernel Hilbert spaces involving squared loss where they penalize the Frobenius norm of the output kernel as a regularizer. They formulate an invex optimization problem that they solve optimally. In comparison, [18] recently proposed an efficient barrier method to optimize a generic convex output kernel learning formulation. On the other hand, [9] proposes a convex formulation to learn low rank output kernel matrix by enforcing a trace constraint. The above approaches [9, 17, 18] solve the resulting optimization problem via alternate minimization between task parameters and the output kernel. Each step of the alternate minimization requires an eigen1 value decomposition of a matrix having as size the number of tasks and a problem corresponding to learning all tasks independently. In this paper we study a similar formulation as [17]. However, we allow arbitrary convex loss functions and employ general p-norms for p ∈(1, 2] (including the Frobenius norm) as regularizer for the output kernel. Our problem is jointly convex over the task parameters and the output kernel. Small p leads to sparse output kernels which allows for an easier interpretation of the learned task relationships in the output kernel. Under certain conditions on p we show that one can drop the constraint that the output kernel should be positive definite as it is automatically satisfied for the unconstrained problem. This significantly simplifies the optimization and our result could also be of interest in other areas where one optimizes over the cone of positive definite matrices. The resulting unconstrained dual problem is amenable to efficient optimization methods such as stochastic dual coordinate ascent [19], which scale well to large data sets. Overall we do not require any eigenvalue decomposition operation at any stage of our algorithm and no alternate minimization is necessary, leading to a highly efficient methodology. Furthermore, we show that this trick not only applies to p-norms but also applies to a large class of regularizers for which we provide a characterization. Our contributions are as follows: (a) we propose a generic p-norm regularized output kernel matrix learning formulation, which can be extended to a large class of regularizers; (b) we show that the constraint on the output kernel to be positive definite can be dropped as it is automatically satisfied, leading to an unconstrained dual problem; (c) we propose an efficient stochastic dual coordinate ascent based method for solving the dual formulation; (d) we empirically demonstrate the superiority of our approach in terms of generalization performance as well as significant reduction in training time compared to other methods learning the output kernel. The paper is organized as follows. We introduce our formulation in Section 2. Our main technical result is discussed in Section 3. The proposed optimization algorithm is described in Section 4. In Section 5, we report the empirical results. All the proofs can be found in the supplementary material. 2 The Output Kernel Learning Formulation We first introduce the setting considered in this paper. We denote the number of tasks by T. We assume that all tasks have a common input space X and a common positive definite kernel function k : X × X →R. We denote by ψ(·) the feature map and by Hk the reproducing kernel Hilbert space (RKHS) [20] associated with k. The training data is (xi, yi, ti)n i=1, where xi ∈X, ti is the task the i-th instance belongs to and yi is the corresponding label. Moreover, we have a positive definite matrix Θ ∈ST + on the set of tasks {1, . . . , T}, where ST + is the set of T × T symmetric and positive semidefinite (p.s.d.) matrices. If one arranges the predictions of all tasks in a vector one can see multi-task learning as learning a vector-valued function in a RKHS [see 1, 13, 14, 15, 18, and references therein]. However, in this paper we use the one-to-one correspondence between real-valued and matrix-valued kernels, see [21], in order to limit the technical overhead. In this framework we define the joint kernel of input space and the set of tasks M : (X × {1, . . . , T}) × (X × {1, . . . , T}) →R as M (x, s), (z, t) = k(x, z)Θ(s, t), (1) We denote the corresponding RKHS of functions on X × {1, . . . , T} as HM and by ∥·∥HM the corresponding norm. We formulate the output kernel learning problem for multiple tasks as min Θ∈ST +,F ∈HM C n X i=1 L yi, F(xi, ti) + 1 2 ∥F∥2 HM + λ V (Θ) (2) where L : R × R →R is the convex loss function (convex in the second argument), V (Θ) is a convex regularizer penalizing the complexity of the output kernel Θ and λ ∈R+ is the regularization parameter. Note that ∥F∥2 HM implicitly depends also on Θ. In the following we show that (2) can be reformulated into a jointly convex problem in the parameters of the prediction function and the output kernel Θ. Using the standard representer theorem [20] (see the supplementary material) for fixed output kernel Θ, one can show that the optimal solution F ∗∈HM of (2) can be written as F ∗(x, t) = T X s=1 n X i=1 γisM (xi, s), (x, t) = T X s=1 n X i=1 γisk(xi, x)Θ(s, t). (3) 2 With the explicit form of the prediction function one can rewrite the main problem (2) as min Θ∈ST +,γ∈Rn×T C n X i=1 L yi, T X s=1 n X j=1 γjskjiΘs ti + 1 2 T X r,s=1 n X i,j=1 γirγjskijΘrs + λ V (Θ), (4) where Θrs = Θ(r, s) and kij = k(xi, xj). Unfortunately, problem (4) is not jointly convex in Θ and γ due to the product in the second term. A similar problem has been analyzed in [17]. They could show that for the squared loss and V (Θ) = ∥Θ∥2 F the corresponding optimization problem is invex and directly optimize it. For an invex function every stationary point is globally optimal [22]. We follow a different path which leads to a formulation similar to the one of [2] used for learning an input mapping (see also [9]). Our formulation for the output kernel learning problem is jointly convex in the task kernel Θ and the task parameters. We present a derivation for the general RKHS Hk, analogous to the linear case presented in [2, 9]. We use the following variable transformation, βit = T X s=1 Θtsγis, i = 1, . . . , n, s = 1, . . . , T, resp. γis = T X t=1 Θ−1 stβit. In the last expression Θ−1 has to be understood as the pseudo-inverse if Θ is not invertible. Note that this causes no problems as in case Θ is not invertible, we can without loss of generality restrict γ in (4) to the range of Θ. The transformation leads to our final problem formulation, where the prediction function F and its squared norm ∥F∥2 HM can be written as F(x, t) = n X i=1 βitk(xi, x), ∥F∥2 HM = T X r,s=1 n X i,j=1 Θ−1 srβisβjrk(xi, xj). (5) We get our final primal optimization problem min Θ∈ST +,β∈Rn×T C n X i=1 L yi, n X j=1 βjtikji + 1 2 T X r,s=1 n X i,j=1 Θ−1 srβisβjrkij + λ V (Θ) (6) Before we analyze the convexity of this problem, we want to illustrate the connection to the formulations in [9, 17]. With the task weight vectors wt = Pn j=1 βjtψ(xj) ∈Hk we get predictions as F(x, t) = ⟨wt, ψ(x)⟩and one can rewrite ∥F∥2 HM = T X r,s=1 n X i,j=1 Θ−1 srβisβjrk(xi, xj) = T X r,s=1 Θ−1 sr ⟨ws, wt⟩. This identity is known for vector-valued RKHS, see [15] and references therein. When Θ is κ times the identity matrix, then ∥F∥2 HM = PT t=1 ∥wt∥2 κ and thus (2) is learning the tasks independently. As mentioned before the convexity of the expression of ∥F∥2 HM is crucial for the convexity of the full problem (6). The following result has been shown in [2] (see also [9]). Lemma 1 Let R(Θ) denote the range of Θ ∈ST + and let Θ† be the pseudoinverse. The extended function f : ST + × Rn×T →R ∪{∞} defined as f(Θ, β) = (PT r,s=1 Pn i,j=1 Θ† srβisβjrk(xi, xj), if βi· ∈R(Θ), ∀i = 1, . . . , n, ∞ else . , is jointly convex. The formulation in (6) is similar to [9, 17, 18]. [9] uses the constraint Trace(Θ) ≤1 instead of a regularizer V (Θ) enforcing low rank of the output kernel. On the other hand, [17] employs squared Frobenius norm for V (Θ) with squared loss function. [18] proposed an efficient algorithm for convex V (Θ). Instead we think that sparsity of Θ is better to avoid the emergence of spurious relations between tasks and also leads to output kernels which are easier to interpret. Thus we propose to use the following regularization functional for the output kernel Θ: V (Θ) = T X t,t′=1 |Θtt′|p = ∥Θ∥p p , 3 for p ∈[1, 2]. Several approaches [9, 17, 18] employ alternate minimization scheme, involving costly eigendecompositions of T × T matrix per iteration (as Θ ∈ST +). In the next section we show that for a certain set of values of p one can derive an unconstrained dual optimization problem which thus avoids the explicit minimization over the ST + cone. The resulting unconstrained dual problem can then be easily optimized by stochastic coordinate ascent. Having explicit expressions of the primal variables Θ and β in terms of the dual variables allows us to get back to the original problem. 3 Unconstrained Dual Problem Avoiding Optimization over ST + The primal formulation (6) is a convex multi-task output kernel learning problem. The next lemma derives the Fenchel dual function of (6). This still involves the optimization over the primal variable Θ ∈ST +. A main contribution of this paper is to show that this optimization problem over the ST + cone can be solved with an analytical solution for a certain class of regularizers V (Θ). In the following we denote by αr := {αi | ti = r} the dual variables corresponding to task r and by Krs the kernel matrix (k(xi, xj) | ti = r, tj = s) corresponding to the dual variables of tasks r and s. Lemma 2 Let L∗ i be the conjugate function of the loss Li : R →R, u 7→L(yi, u), then q : Rn →R, q(α) = −C n X i=1 L∗ i −αi C −λ max Θ∈ST + 1 2λ T X r,s=1 Θrs ⟨αr, Krsαs⟩−V (Θ) (7) is the dual function of (6), where α ∈Rn are the dual variables. The primal variable β ∈Rn×T in (6) and the prediction function F can be expressed in terms of Θ and α as βis = αiΘsti and F(x, s) = Pn j=1 αjΘstjk(xj, x) respectively, where tj is the task of the j-th training example. We now focus on the remaining maximization problem in the dual function in (7) max Θ∈ST + 1 2λ T X r,s=1 Θrs ⟨αr, Krsαs⟩−V (Θ). (8) This is a semidefinite program which is computationally expensive to solve and thus prohibits to scale the output kernel learning problem to a large number of tasks. However, we show in the following that this problem has an analytical solution for a subset of the regularizers V (Θ) = 1 2 PT r,s=1 |Θrs|p for p ≥1. For better readability we defer a more general result towards the end of the section. The basic idea is to relax the constraint on Θ ∈RT ×T in (8) so that it is equivalent to the computation of the conjugate V ∗of V . If the maximizer of the relaxed problem is positive semi-definite, one has found the solution of the original problem. Theorem 3 Let k ∈N and p = 2k 2k−1, then with ρrs = 1 2λ ⟨αr, Krsαs⟩we have max Θ∈ST + T X r,s=1 Θrsρrs −1 2 T X r,s=1 |Θrs|p = 1 4k −2 2k −1 2kλ 2k T X r,s=1 ⟨αr, Krsαs⟩2k , (9) and the maximizer is given by the positive semi-definite matrix Θ∗ rs = 2k −1 2kλ 2k−1 ⟨αr, Krsαs⟩2k−1 , r, s = 1, . . . , T. (10) Plugging the result of the previous theorem into the dual function of Lemma 2 we get for k ∈N and p = 2k 2k−1 with V (Θ) = ∥Θ∥p p the following unconstrained dual of our main problem (6): max α∈Rn −C n X i=1 L∗ i −αi C − λ 4k −2 2k −1 2kλ 2k T X r,s=1 ⟨αr, Krsαs⟩2k . (11) Note that by doing the variable transformation κi := αi C we effectively have only one hyperparameter in (11). This allows us to cross-validate more efficiently. The range of admissible values for p in Theorem 3 lies in the interval (1, 2], where we get for k = 1 the value p = 2 and as k →∞ 4 Table 1: Examples of regularizers V (Θ) together with their generating function φ and the explicit form of Θ∗in terms of the dual variables, ρrs = 1 2λ ⟨αr, Krsαs⟩. The optimal value of (8) is given in terms of φ as max Θ∈RT ×T ⟨ρ, Θ⟩−V (Θ) = PT r,s=1 φ(ρrs). φ(z) V (Θ) Θ∗ rs z2k 2k , k ∈N 2k−1 2k TP r,s=1 |Θrs| 2k 2k−1 ρ2k−1 rs ez = P∞ k=0 zk k! TP r,s=1 Θrs log(Θrs) −Θrs if Θrs > 0∀r, s ∞ else . eρrs cosh(z) −1 = P∞ k=1 z2k (2k)! TP r,s=1 Θrs arcsinh(Θrs) − p 1 + Θ2rs + T 2 arcsinh(ρrs) we have p →1. The regularizer for p = 2 together with the squared loss has been considered in the primal in [17, 18]. Our analytical expression of the dual is novel and allows us to employ stochastic dual coordinate ascent to solve the involved primal optimization problem. Please also note that by optimizing the dual, we have access to the duality gap and thus a well-defined stopping criterion. This is in contrast to the alternating scheme of [17, 18] for the primal problem which involves costly matrix operations. Our runtime experiments show that our solver for (11) outperforms the solvers of [17, 18]. Finally, note that even for suboptimal dual variables α, the corresponding Θ matrix in (10) is positive semidefinite. Thus we always get a feasible set of primal variables. Characterizing the set of convex regularizers V which allow an analytic expression for the dual function The previous theorem raises the question for which class of convex, separable regularizers we can get an analytical expression of the dual function by explicitly solving the optimization problem (8) over the positive semidefinite cone. A key element in the proof of the previous theorem is the characterization of functions f : R →R which when applied elementwise f(A) = (f(aij))T i,j=1 to a positive semidefinite matrix A ∈ST + result in a p.s.d. matrix, that is f(A) ∈ST +. This set of functions has been characterized by Hiai [23]. Theorem 4 ([23]) Let f : R →R and A ∈ST +. We denote by f(A) = (f(aij))T i,j=1 the elementwise application of f to A. It holds ∀T ≥2, A ∈ST + =⇒f(A) ∈ST + if and only if f is analytic and f(x) = P∞ k=0 akxk with ak ≥0 for all k ≥0. Note that in the previous theorem the condition on f is only necessary when we require the implication to hold for all T. If T is fixed, the set of functions is larger and includes even (large) fractional powers, see [24]. We use the stronger formulation as we want that the result holds without any restriction on the number of tasks T. Theorem 4 is the key element used in our following characterization of separable regularizers of Θ which allow an analytical expression of the dual function. Theorem 5 Let φ : R →R be analytic on R and given as φ(z) = P∞ k=0 ak k+1zk+1 where ak ≥ 0 ∀k ≥0. If φ is convex, then, V (Θ) := PT r,s=1 φ∗(Θrs), is a convex function V : RT ×T →R and max Θ∈RT ×T ⟨ρ, Θ⟩−V (Θ) = V ∗(ρ) = T X r,s=1 φ ρrs , (12) where the global maximizer fulfills Θ∗∈ST + if ρ ∈ST + and Θ∗ rs = P∞ k=0 akρk rs. Table 1 summarizes e.g. of functions φ, the corresponding V (Θ) and the maximizer Θ∗in (12). 4 Optimization Algorithm The dual problem (11) can be efficiently solved via decomposition based methods like stochastic dual coordinate ascent algorithm (SDCA) [19]. SDCA enjoys low computational complexity per iteration and has been shown to scale effortlessly to large scale optimization problems. 5 Algorithm 1 Fast MTL-SDCA Input: Gram matrix K, label vector y, regularization parameter and relative duality gap parameter ϵ Output: α (Θ is computed from α using our result in 10) Initialize α = α(0) repeat Randomly choose a dual variable αi Solve for ∆in (13) corresponding to αi αi ←αi + ∆ until Relative duality gap is below ϵ Our algorithm for learning the output kernel matrix and task parameters is summarized in Algorithm 1 (refer to the supplementary material for more details). At each step of the iteration we optimize the dual objective over a randomly chosen αi variable. Let ti = r be the task corresponding to αi. We apply the update αi ←αi + ∆. The optimization problem of solving (11) with respect to ∆ is as follows: min ∆∈R L∗ i (−αi −∆)/C + η (a∆2 + 2brr∆+ crr)2k + 2 X s̸=r (brs∆+ crs)2k + X s,z̸=r c2k sz , (13) where a = kii, brs = P j:tj=s kijαj ∀s, csz = ⟨αs, Kszαz⟩∀s, z and η = λ C(4k−2) 2k−1 2kλ 2k . This one-dimensional convex optimization problem is solved efficiently via Newton method. The complexity of the proposed algorithm is O(T) per iteration . The proposed algorithm can also be employed for learning output kernels regularized by generic V (Θ), discussed in the previous section. Special case p = 2(k = 1): For certain loss functions such as the hinge loss, the squared loss, etc., L∗ ti −αti+∆ C yields a linear or a quadratic expression in ∆. In such cases problem (13) reduces to finding the roots of a cubic equation, which has a closed form expression. Hence, our algorithm is highly efficient with the above loss functions when Θ is regularized by the squared Frobenius norm. 5 Empirical Results In this section, we present our results on benchmark data sets comparing our algorithm with existing approaches in terms of generalization accuracy as well as computational efficiency. Please refer to the supplementary material for additional results and details. 5.1 Multi-Task Data Sets We begin with the generalization results in multi-task setups. The data sets are as follows: a) Sarcos: a regression data set, aim is to predict 7 degrees of freedom of a robotic arm, b) Parkinson: a regression data set, aim is to predict the Parkinson’s disease symptom score for 42 patients, c) Yale: a face recognition data with 28 binary classification tasks, d) Landmine: a data set containing binary classifications from 19 different landmines, e) MHC-I: a bioinformatics data set having 10 binary classification tasks, f) Letter: a handwritten letters data set with 9 binary classification tasks. We compare the following algorithms: Single task learning (STL), multi-task methods learning the output kernel matrix (MTL [16], CMTL [12], MTRL [9]) and approaches that learn both input and output kernel matrices (MTFL [11], GMTL [10]). Our proposed formulation (11) is denoted by FMTLp. We consider three different values for the p-norm: p = 2 (k = 1), p = 4/3 (k = 2) and p = 8/7 (k = 4). Hinge and ϵ-SVR loss functions were employed for classification and regression problems respectively. We follow the experimental protocol1 described in [11]. Table 2 reports the performance of the algorithms averaged over ten random train-test splits. The proposed FMTLp attains the best generalization accuracy in general. It outperforms the baseline MTL as well as MTRL and CMTL, which solely learns the output kernel matrix. Moreover, it achieves an overall better performance than GMTL and MTFL. The FMTLp=4/3,8/7 give comparable generalization to p = 2 case, with the additional benefit of learning sparser and more interpretable output kernel matrix (see Figure 1). 1The performance of STL, MTL, CMTL and MTFL are reported from [11]. 6 Table 2: Mean generalization performance and the standard deviation over ten train-test splits. Data set STL MTL CMTL MTFL GMTL MTRL FMTLp p = 2 p = 4/3 p = 8/7 Regression data sets: Explained Variance (%) Sarcos 40.5±7.6 34.5±10.2 33.0±13.4 49.9±6.3 45.8±10.6 41.6±7.1 46.7±6.9 50.3±5.8 48.4±5.8 Parkinson 2.8±7.5 4.9±20.0 2.7±3.6 16.8±10.8 33.6±9.4 12.0±6.8 27.0±4.4 27.0±4.4 27.0±4.4 Classification data sets: AUC (%) Yale 93.4±2.3 96.4±1.6 95.2±2.1 97.0±1.6 91.9±3.2 96.1±2.1 97.0±1.2 97.0±1.4 96.8±1.4 Landmine 74.6±1.6 76.4±0.8 75.9±0.7 76.4±1.0 76.7±1.2 76.1±1.0 76.8±0.8 76.7±1.0 76.4±0.9 MHC-I 69.3±2.1 72.3±1.9 72.6±1.4 71.7±2.2 72.5±2.7 71.5±1.7 71.7±1.9 70.8±2.1 70.7±1.9 Letter 61.2±0.8 61.0±1.6 60.5±1.1 60.5±1.8 61.2±0.9 60.3±1.4 61.4±0.7 61.5±1.0 61.4±1.0 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18 (p = 2) (p = 4/3) (p = 8/7) Figure 1: Plots of |Θ| matrices (rescaled to [0,1] and averaged over ten splits) computed by our solver FMTLp for the Landmine data set for different p-norms, with cross-validated hyper-parameter values. The darker regions indicate higher value. Tasks (landmines) numbered 1-10 correspond to highly foliated regions and those numbered 11-19 correspond to bare earth or desert regions. Hence, we expect two groups of tasks (indicated by the red squares). We can observe that the learned Θ matrix at p = 2 depicts much more spurious task relationships than the ones at p = 4/3 and p = 8/7. Thus, our sparsifying regularizer improves interpretability. Table 3: Mean accuracy and the standard deviation over five train-test splits. Data set STL MTL-SDCA GMTL MTRL FMTLp-H FMTLp-S p = 2 p = 4/3 p = 8/7 p = 2 p = 4/3 p = 8/7 MNIST 84.1±0.3 86.0±0.2 84.8±0.3 85.6±0.4 86.1±0.4 85.8±0.4 86.2±0.4 82.2±0.6 82.5±0.4 82.4±0.3 USPS 90.5±0.3 90.6±0.2 91.6±0.3 92.4±0.2 92.4±0.2 92.6±0.2 92.6±0.1 87.2±0.4 87.7±0.3 87.5±0.3 5.2 Multi-Class Data Sets The multi-class setup is cast as T one-vs-all binary classification tasks, corresponding to T classes. In this section we experimented with two loss functions: a) FMTLp-H – the hinge loss employed in SVMs, and b) FMTLp-S – the squared loss employed in OKL [17]. In these experiments, we also compare our results with MTL-SDCA, a state-of-the-art multi-task feature learning method [25]. USPS & MNIST Experiments: We followed the experimental protocol detailed in [10]. Results are tabulated in Table 3. Our approach FMTLp-H obtains better accuracy than GMTL, MTRL and MTL-SDCA [25] on both data sets. MIT Indoor67 Experiments: We report results on the MIT Indoor67 benchmark [26] which covers 67 indoor scene categories. We use the train/test split (80/20 images per class) provided by the authors. FMTLp-S achieved the accuracy of 73.3% with p = 8/7. Note that this is better than the ones reported in [27] (70.1%) and [26] (68.24%). SUN397 Experiments: SUN397 [28] is a challenging scene classification benchmark [26] with 397 classes. We use m = 5, 50 images per class for training, 50 images per class for testing and report the average accuracy over the 10 standard splits. We employed the CNN features extracted with the 7 Table 4: Mean accuracy and the standard deviation over ten train-test splits on SUN397. m STL MTL MTL-SDCA FMTLp-H FMTLp-S p = 2 p = 4/3 p = 8/7 p = 2 p = 4/3 p = 8/7 5 40.5±0.9 42.0±1.4 41.2±1.3 41.5±1.1 41.6±1.3 41.6±1.2 44.1±1.3 44.1±1.1 44.0±1.2 50 55.0±0.4 57.0±0.2 54.8±0.3 55.1±0.2 55.6±0.3 55.1±0.3 58.6±0.1 58.5±0.1 58.6±0.2 50 100 150 200 250 300 350 400 10 −2 10 −1 10 0 10 1 10 2 10 3 Number of Tasks Time (log10 scale), s FMTL2−S ConvexOKL OKL 3 3.5 4 4.5 5 5.5 6 6.5 7 0 2 4 6 8 10 12 14 16 18 20 Log10(η) (Time by baseline) / (Time by FMTL2−S) MIT Indoor67, OKL SUN397, OKL MIT Indoor67, ConvexOKL . SUN397, ConvexOKL (a) (b) Figure 2: (a) Plot compares the runtime of various algorithms with varying number of tasks on SUN397. Our approach FMTL2-S is 7 times faster that OKL [17] and 4.3 times faster than ConvexOKL [18] when the number of tasks is maximum. (b) Plot showing the factor by which FMTL2S outperforms OKL and ConvexOKL over the hyper-parameter range on various data sets. On SUN397, we outperform OKL and ConvexOKL by factors of 5.2 and 7 respectively. On MIT Indoor67, we are better than OKL and ConvexOKL by factors of 8.4 and 2.4 respectively. convolutional neural network (CNN) [26] using Places 205 database. The results are tabulated in Table 4. The Θ matrices computed by FMTLp-S are discussed in the supplementary material. 5.3 Scaling Experiment We compare the runtime of our solver for FMTL2-S with the OKL solver of [17] and the ConvexOKL solver of [18] on several data sets. All the three methods solve the same optimization problem. Figure 2a shows the result of the scaling experiment where we vary the number of tasks (classes). The parameters employed are the ones obtained via cross-validation. Note that both OKL and ConvexOKL algorithms do not have a well defined stopping criterion whereas our approach can easily compute the relative duality gap (set as 10−3). We terminate them when they reach the primal objective value achieved by FMTL2-S . Our optimization approach is 7 times and 4.3 times faster than the alternate minimization based OKL and ConvexOKL, respectively, when the number of tasks is maximal. The generic FMTLp=4/3,8/7 are also considerably faster than OKL and ConvexOKL. Figure 2b compares the average runtime of our FMTLp-S with OKL and ConvexOKL on the crossvalidated range of hyper-parameter values. FMTLp-S outperform them on both MIT Indoor67 and SUN397 data sets. On MNIST and USPS data sets, FMTLp-S is more than 25 times faster than OKL, and more than 6 times faster than ConvexOKL. Additional details of the above experiments are discussed in the supplementary material. 6 Conclusion We proposed a novel formulation for learning the positive semi-definite output kernel matrix for multiple tasks. Our main technical contribution is our analysis of a certain class of regularizers on the output kernel matrix where one may drop the positive semi-definite constraint from the optimization problem, but still solve the problem optimally. This leads to a dual formulation that can be efficiently solved using stochastic dual coordinate ascent algorithm. Results on benchmark multi-task and multi-class data sets demonstrates the effectiveness of the proposed multi-task algorithm in terms of runtime as well as generalization accuracy. Acknowledgments. P.J. and M.H. acknowledge the support by the Cluster of Excellence (MMCI). 8 References [1] T. Evgeniou, C. A. Micchelli, and M. Pontil. Learning multiple tasks with kernel methods. JMLR, 6:615–637, 2005. [2] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. ML, 73:243–272, 2008. [3] K. Lounici, M. Pontil, A. B. Tsybakov, and S. van de Geer. Taking advantage of sparsity in multi-task learning. In COLT, 2009. [4] A. Jalali, P. Ravikumar, S. Sanghavi, and C. Ruan. A dirty model for multi-task learning. In NIPS, 2010. [5] P. Jawanpuria and J. S. Nath. Multi-task multiple kernel learning. In SDM, 2011. [6] A. Maurer, M. Pontil, and B. Romera-paredes. Sparse coding for multitask and transfer learning. In ICML, 2013. [7] P. Jawanpuria, J. S. Nath, and G. Ramakrishnan. Generalized hierarchical kernel learning. JMLR, 16:617– 652, 2015. [8] R. Caruana. Multitask learning. ML, 28:41–75, 1997. [9] Y. Zhang and D. Y. Yeung. A convex formulation for learning task relationships in multi-task learning. In UAI, 2010. [10] Z. Kang, K. Grauman, and F. Sha. Learning with whom to share in multi-task feature learning. In ICML, 2011. [11] P. Jawanpuria and J. S. Nath. A convex feature learning formulation for latent task structure discovery. In ICML, 2012. [12] L. Jacob, F. Bach, and J. P. Vert. Clustered multi-task learning: A convex formulation. In NIPS, 2008. [13] C. A. Micchelli and M. Pontil. Kernels for multitask learning. In NIPS, 2005. [14] A. Caponnetto, C. A. Micchelli, M. Pontil, and Y. Ying. Universal multi-task kernels. JMLR, 9:1615– 1646, 2008. [15] M. A. ´Alvarez, L. Rosasco, and N. D. Lawrence. Kernels for vector-valued functions: a review. Foundations and Trends in Machine Learning, 4:195–266, 2012. [16] T. Evgeniou and M. Pontil. Regularized multi–task learning. In KDD, 2004. [17] F. Dinuzzo, C. S. Ong, P. Gehler, and G. Pillonetto. Learning output kernels with block coordinate descent. In ICML, 2011. [18] C. Ciliberto, Y. Mroueh, T. Poggio, and L. Rosasco. Convex learning of multiple tasks and their structure. In ICML, 2015. [19] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss. JMLR, 14(1):567–599, 2013. [20] B. Sch¨olkopf and A. Smola. Learning with Kernels. MIT Press, 2002. [21] M. Hein and O. Bousquet. Kernels, associated structures and generalizations. Technical Report TR-127, Max Planck Institute for Biological Cybernetics, 2004. [22] A. Ben-Israel and B. Mond. What is invexity ? J. Austral. Math. Soc. Ser. B, 28:1–9, 1986. [23] F. Hiai. Monotonicity for entrywise functions of matrices. Linear Algebra and its Applications, 431(8):1125 – 1146, 2009. [24] R. A. Horn. The theory of infinitely divisible matrices and kernels. Trans. Amer. Math. Soc., 136:269–286, 1969. [25] M. Lapin, B. Schiele, and M. Hein. Scalable multitask representation learning for scene classification. In CVPR, 2014. [26] B. Zhou, A. Lapedriza, J. Xiao, A. Torralba, and A. Oliva. Learning deep features for scene recognition using places database. In NIPS, 2014. [27] M. Koskela and J. Laaksonen. Convolutional network features for scene recognition. In Proceedings of the ACM International Conference on Multimedia, 2014. [28] J. Xiao, J. Hays, K. A. Ehinger, A. Oliva, and A. Torralba. SUN database: Large-scale scene recognition from abbey to zoo. In CVPR, 2010. 9 | 2015 | 260 |
5,770 | Texture Synthesis Using Convolutional Neural Networks Leon A. Gatys Centre for Integrative Neuroscience, University of T¨ubingen, Germany Bernstein Center for Computational Neuroscience, T¨ubingen, Germany Graduate School of Neural Information Processing, University of T¨ubingen, Germany leon.gatys@bethgelab.org Alexander S. Ecker Centre for Integrative Neuroscience, University of T¨ubingen, Germany Bernstein Center for Computational Neuroscience, T¨ubingen, Germany Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany Baylor College of Medicine, Houston, TX, USA Matthias Bethge Centre for Integrative Neuroscience, University of T¨ubingen, Germany Bernstein Center for Computational Neuroscience, T¨ubingen, Germany Max Planck Institute for Biological Cybernetics, T¨ubingen, Germany Abstract Here we introduce a new model of natural textures based on the feature spaces of convolutional neural networks optimised for object recognition. Samples from the model are of high perceptual quality demonstrating the generative power of neural networks trained in a purely discriminative fashion. Within the model, textures are represented by the correlations between feature maps in several layers of the network. We show that across layers the texture representations increasingly capture the statistical properties of natural images while making object information more and more explicit. The model provides a new tool to generate stimuli for neuroscience and might offer insights into the deep representations learned by convolutional neural networks. 1 Introduction The goal of visual texture synthesis is to infer a generating process from an example texture, which then allows to produce arbitrarily many new samples of that texture. The evaluation criterion for the quality of the synthesised texture is usually human inspection and textures are successfully synthesised if a human observer cannot tell the original texture from a synthesised one. In general, there are two main approaches to find a texture generating process. The first approach is to generate a new texture by resampling either pixels [5, 28] or whole patches [6, 16] of the original texture. These non-parametric resampling techniques and their numerous extensions and improvements (see [27] for review) are capable of producing high quality natural textures very efficiently. However, they do not define an actual model for natural textures but rather give a mechanistic procedure for how one can randomise a source texture without changing its perceptual properties. In contrast, the second approach to texture synthesis is to explicitly define a parametric texture model. The model usually consists of a set of statistical measurements that are taken over the 1 Figure 1: Synthesis method. Texture analysis (left). The original texture is passed through the CNN and the Gram matrices Gl on the feature responses of a number of layers are computed. Texture synthesis (right). A white noise image ˆ⃗x is passed through the CNN and a loss function El is computed on every layer included in the texture model. The total loss function L is a weighted sum of the contributions El from each layer. Using gradient descent on the total loss with respect to the pixel values, a new image is found that produces the same Gram matrices ˆGl as the original texture. spatial extent of the image. In the model a texture is uniquely defined by the outcome of those measurements and every image that produces the same outcome should be perceived as the same texture. Therefore new samples of a texture can be generated by finding an image that produces the same measurement outcomes as the original texture. Conceptually this idea was first proposed by Julesz [13] who conjectured that a visual texture can be uniquely described by the Nth-order joint histograms of its pixels. Later on, texture models were inspired by the linear response properties of the mammalian early visual system, which resemble those of oriented band-pass (Gabor) filters [10, 21]. These texture models are based on statistical measurements taken on the filter responses rather than directly on the image pixels. So far the best parametric model for texture synthesis is probably that proposed by Portilla and Simoncelli [21], which is based on a set of carefully handcrafted summary statistics computed on the responses of a linear filter bank called Steerable Pyramid [24]. However, although their model shows very good performance in synthesising a wide range of textures, it still fails to capture the full scope of natural textures. In this work, we propose a new parametric texture model to tackle this problem (Fig. 1). Instead of describing textures on the basis of a model for the early visual system [21, 10], we use a convolutional neural network – a functional model for the entire ventral stream – as the foundation for our texture model. We combine the conceptual framework of spatial summary statistics on feature responses with the powerful feature space of a convolutional neural network that has been trained on object recognition. In that way we obtain a texture model that is parameterised by spatially invariant representations built on the hierarchical processing architecture of the convolutional neural network. 2 2 Convolutional neural network We use the VGG-19 network, a convolutional neural network trained on object recognition that was introduced and extensively described previously [25]. Here we give only a brief summary of its architecture. We used the feature space provided by the 16 convolutional and 5 pooling layers of the VGG-19 network. We did not use any of the fully connected layers. The network’s architecture is based on two fundamental computations: 1. Linearly rectified convolution with filters of size 3 × 3 × k where k is the number of input feature maps. Stride and padding of the convolution is equal to one such that the output feature map has the same spatial dimensions as the input feature maps. 2. Maximum pooling in non-overlapping 2×2 regions, which down-samples the feature maps by a factor of two. These two computations are applied in an alternating manner (see Fig. 1). A number of convolutional layers is followed by a max-pooling layer. After each of the first three pooling layers the number of feature maps is doubled. Together with the spatial down-sampling, this transformation results in a reduction of the total number of feature responses by a factor of two. Fig. 1 provides a schematic overview over the network architecture and the number of feature maps in each layer. Since we use only the convolutional layers, the input images can be arbitrarily large. The first convolutional layer has the same size as the image and for the following layers the ratio between the feature map sizes remains fixed. Generally each layer in the network defines a non-linear filter bank, whose complexity increases with the position of the layer in the network. The trained convolutional network is publicly available and its usability for new applications is supported by the caffe-framework [12]. For texture generation we found that replacing the maxpooling operation by average pooling improved the gradient flow and one obtains slightly cleaner results, which is why the images shown below were generated with average pooling. Finally, for practical reasons, we rescaled the weights in the network such that the mean activation of each filter over images and positions is equal to one. Such re-scaling can always be done without changing the output of a neural network as long as the network is fully piece-wise linear 1. 3 Texture model The texture model we describe in the following is much in the spirit of that proposed by Portilla and Simoncelli [21]. To generate a texture from a given source image, we first extract features of different sizes homogeneously from this image. Next we compute a spatial summary statistic on the feature responses to obtain a stationary description of the source image (Fig. 1A). Finally we find a new image with the same stationary description by performing gradient descent on a random image that has been initialised with white noise (Fig. 1B). The main difference to Portilla and Simoncelli’s work is that instead of using a linear filter bank and a set of carefully chosen summary statistics, we use the feature space provided by a highperforming deep neural network and only one spatial summary statistic: the correlations between feature responses in each layer of the network. To characterise a given vectorised texture ⃗x in our model, we first pass ⃗x through the convolutional neural network and compute the activations for each layer l in the network. Since each layer in the network can be understood as a non-linear filter bank, its activations in response to an image form a set of filtered images (so-called feature maps). A layer with Nl distinct filters has Nl feature maps each of size Ml when vectorised. These feature maps can be stored in a matrix F l ∈RNl×Ml, where F l jk is the activation of the jth filter at position k in layer l. Textures are per definition stationary, so a texture model needs to be agnostic to spatial information. A summary statistic that discards the spatial information in the feature maps is given by the correlations between the responses of 1Source code to generate textures with CNNs as well as the rescaled VGG-19 network can be found at http://github.com/leongatys/DeepTextures 3 different features. These feature correlations are, up to a constant of proportionality, given by the Gram matrix Gl ∈RNl×Nl, where Gl ij is the inner product between feature map i and j in layer l: Gl ij = X k F l ikF l jk. (1) A set of Gram matrices {G1, G2, ..., GL} from some layers 1, . . . , L in the network in response to a given texture provides a stationary description of the texture, which fully specifies a texture in our model (Fig. 1A). 4 Texture generation To generate a new texture on the basis of a given image, we use gradient descent from a white noise image to find another image that matches the Gram-matrix representation of the original image. This optimisation is done by minimising the mean-squared distance between the entries of the Gram matrix of the original image and the Gram matrix of the image being generated (Fig. 1B). Let ⃗x and ˆ⃗x be the original image and the image that is generated, and Gl and ˆGl their respective Gram-matrix representations in layer l (Eq. 1). The contribution of layer l to the total loss is then El = 1 4N 2 l M 2 l X i,j Gl ij −ˆGl ij 2 (2) and the total loss is L(⃗x, ˆ⃗x) = L X l=0 wlEl (3) where wl are weighting factors of the contribution of each layer to the total loss. The derivative of El with respect to the activations in layer l can be computed analytically: ∂El ∂ˆF l ij = ( 1 N 2 l M 2 l ( ˆF l)T Gl −ˆGl ji if ˆF l ij > 0 0 if ˆF l ij < 0 . (4) The gradients of El, and thus the gradient of L(⃗x, ˆ⃗x), with respect to the pixels ˆ⃗x can be readily computed using standard error back-propagation [18]. The gradient ∂L ∂ˆ⃗x can be used as input for some numerical optimisation strategy. In our work we use L-BFGS [30], which seemed a reasonable choice for the high-dimensional optimisation problem at hand. The entire procedure relies mainly on the standard forward-backward pass that is used to train the convolutional network. Therefore, in spite of the large complexity of the model, texture generation can be done in reasonable time using GPUs and performance-optimised toolboxes for training deep neural networks [12]. 5 Results We show textures generated by our model from four different source images (Fig. 2). Each row of images was generated using an increasing number of layers in the texture model to constrain the gradient descent (the labels in the figure indicate the top-most layer included). In other words, for the loss terms above a certain layer we set the weights wl = 0, while for the loss terms below and including that layer, we set wl = 1. For example the images in the first row (‘conv1 1’) were generated only from the texture representation of the first layer (‘conv1 1’) of the VGG network. The images in the second row (‘pool1’) where generated by jointly matching the texture representations on top of layer ‘conv1 1’, ‘conv1 2’ and ‘pool1’. In this way we obtain textures that show what structure of natural textures are captured by certain computational processing stages of the texture model. The first three columns show images generated from natural textures. We find that constraining all layers up to layer ‘pool4’ generates complex natural textures that are almost indistinguishable from the original texture (Fig. 2, fifth row). In contrast, when constraining only the feature correlations on the lowest layer, the textures contain little structure and are not far from spectrally matched noise 4 Figure 2: Generated stimuli. Each row corresponds to a different processing stage in the network. When only constraining the texture representation on the lowest layer, the synthesised textures have little structure, similarly to spectrally matched noise (first row). With increasing number of layers on which we match the texture representation we find that we generate images with increasing degree of naturalness (rows 2–5; labels on the left indicate the top-most layer included). The source textures in the first three columns were previously used by Portilla and Simoncelli [21]. For better comparison we also show their results (last row). The last column shows textures generated from a non-texture image to give a better intuition about how the texture model represents image information. 5 Figure 3: A, Number of parameters in the texture model. We explore several ways to reduce the number of parameters in the texture model (see main text) and compare the results. B, Textures generated from the different layers of the caffe reference network [12, 15]. The textures are of lesser quality than those generated with the VGG network. C, Textures generated with the VGG architecture but random weights. Texture synthesis fails in this case, indicating that learned filters are crucial for texture generation. (Fig. 2, first row). We can interpolate between these two extremes by using only the constraints from all layers up to some intermediate layer. We find that the statistical structure of natural images is matched on an increasing scale as the number of layers we use for texture generation increases. We did not include any layers above layer ‘pool4’ since this did not improve the quality of the synthesised textures. For comparability we used source textures that were previously used by Portilla and Simoncelli [21] and also show the results of their texture model (Fig. 2, last row). 2 To give a better intuition for how the texture synthesis works, we also show textures generated from a non-texture image taken from the ImageNet validation set [23] (Fig. 2, last column). Our algorithm produces a texturised version of the image that preserves local spatial information but discards the global spatial arrangement of the image. The size of the regions in which spatial information is preserved increases with the number of layers used for texture generation. This property can be explained by the increasing receptive field sizes of the units over the layers of the deep convolutional neural network. When using summary statistics from all layers of the convolutional neural network, the number of parameters of the model is very large. For each layer with Nl feature maps, we match Nl × (Nl + 1)/2 parameters, so if we use all layers up to and including ‘pool4’, our model has ∼852k parameters (Fig. 3A, fourth column). However, we find that this texture model is heavily overparameterised. In fact, when using only one layer on each scale in the network (i.e. ‘conv1 1’, 2A curious finding is that the yellow box, which indicates the source of the original texture, is also placed towards the bottom left corner in the textures generated by our model. As our texture model does not store any spatial information about the feature responses, the only possible explanation for such behaviour is that some features in the network explicitly encode the information at the image boundaries. This is exactly what we find when inspecting feature maps in the VGG network: Some feature maps, at least from layer ‘conv3 1’ onwards, only show high activations along their edges. This might originate from the zero-padding that is used for the convolutions in the VGG network and it could be interesting to investigate the effect of such padding on learning and object recognition performance. 6 Classification performance 1.0 0 0.2 0.4 0.6 0.8 pool1 pool5 pool4 pool3 pool2 Decoding layer top1 Gram top5 VGG top1 VGG top5 Gram Figure 4: Performance of a linear classifier on top of the texture representations in different layers in classifying objects from the ImageNet dataset. High-level information is made increasingly explicit along the hierarchy of our texture model. and ‘pool1-4’), the model contains ∼177k parameters while hardly loosing any quality (Fig. 3A, third column). We can further reduce the number of parameters by doing PCA of the feature vector in the different layers of the network and then constructing the Gram matrix only for the first k principal components. By using the first 64 principal components for layers ‘conv1 1’, and ‘pool14’ we can further reduce the model to ∼10k parameters (Fig. 3A, second column). Interestingly, constraining only the feature map averages in layers ‘conv1 1’, and ‘pool1-4’, (1024 parameters), already produces interesting textures (Fig. 3A, first column). These ad hoc methods for parameter reduction show that the texture representation can be compressed greatly with little effect on the perceptual quality of the synthesised textures. Finding minimal set of parameters that reproduces the quality of the full model is an interesting topic of ongoing research and beyond the scope of the present paper. A larger number of natural textures synthesised with the ≈177k parameter model can be found in the Supplementary Material as well as on our website3. There one can also observe some failures of the model in case of very regular, man-made structures (e.g. brick walls). In general, we find that the very deep architecture of the VGG network with small convolutional filters seems to be particularly well suited for texture generation purposes. When performing the same experiment with the caffe reference network [12], which is very similar to the AlexNet [15], the quality of the generated textures decreases in two ways. First, the statistical structure of the source texture is not fully matched even when using all constraints (Fig 3B, ‘conv5’). Second, we observe an artifactual grid that overlays the generated textures (Fig 3B). We believe that the artifactual grid originates from the larger receptive field sizes and strides in the caffe reference network. While the results from the caffe reference network show that the architecture of the network is important, the learned feature spaces are equally crucial for texture generation. When synthesising a texture with a network with the VGG architecture but random weights, texture generation fails (Fig. 3C), underscoring the importance of using a trained network. To understand our texture features better in the context of the original object recognition task of the network, we evaluated how well object identity can be linearly decoded from the texture features in different layers of the network. For each layer we computed the Gram-matrix representation of each image in the ImageNet training set [23] and trained a linear soft-max classifier to predict object identity. As we were not interested in optimising prediction performance, we did not use any data augmentation and trained and tested only on the 224 × 224 centre crop of the images. We computed the accuracy of these linear classifiers on the ImageNet validation set and compared them to the performance of the original VGG-19 network also evaluated on the 224 × 224 centre crops of the validation images. The analysis suggests that our texture representation continuously disentangles object identity information (Fig. 4). Object identity can be decoded increasingly well over the layers. In fact, linear decoding from the final pooling layer performs almost as well as the original network, suggesting that our texture representation preserves almost all high-level information. At first sight this might appear surprising since the texture representation does not necessarily preserve the global structure of objects in non-texture images (Fig. 2, last column). However, we believe that this “inconsis3www.bethgelab.org/deeptextures 7 tency” is in fact to be expected and might provide an insight into how CNNs encode object identity. The convolutional representations in the network are shift-equivariant and the network’s task (object recognition) is agnostic to spatial information, thus we expect that object information can be read out independently from the spatial information in the feature maps. We show that this is indeed the case: a linear classifier on the Gram matrix of layer ‘pool5’ comes close to the performance of the full network (87.7% vs. 88.6% top 5 accuracy, Fig. 4). 6 Discussion We introduced a new parametric texture model based on a high-performing convolutional neural network. Our texture model exceeds previous work as the quality of the textures synthesised using our model shows a substantial improvement compared to the current state of the art in parametric texture synthesis (Fig. 2, fourth row compared to last row). While our model is capable of producing natural textures of comparable quality to non-parametric texture synthesis methods, our synthesis procedure is computationally more expensive. Nevertheless, both in industry and academia, there is currently much effort taken in order to make the evaluation of deep neural networks more efficient [11, 4, 17]. Since our texture synthesis procedure builds exactly on the same operations, any progress made in the general field of deep convolutional networks is likely to be transferable to our texture synthesis method. Thus we expect considerable improvements in the practical applicability of our texture model in the near future. By computing the Gram matrices on feature maps, our texture model transforms the representations from the convolutional neural network into a stationary feature space. This general strategy has recently been employed to improve performance in object recognition and detection [9] or texture recognition and segmentation [3]. In particular Cimpoi et al. report impressive performance in material recognition and scene segmentation by using a stationary Fisher-Vector representation built on the highest convolutional layer of readily trained neural networks [3]. In agreement with our results, they show that performance in natural texture recognition continuously improves when using higher convolutional layers as the input to their Fisher-Vector representation. As our main aim is to synthesise textures, we have not evaluated the Gram matrix representation on texture recognition benchmarks, but would expect that it also provides a good feature space for those tasks. In recent years, texture models inspired by biological vision have provided a fruitful new analysis tool for studying visual perception. In particular the parametric texture model proposed by Portilla and Simoncelli [21] has sparked a great number of studies in neuroscience and psychophysics [8, 7, 1, 22, 20]. Our texture model is based on deep convolutional neural networks that are the first artificial systems that rival biology in terms of difficult perceptual inference tasks such as object recognition [15, 25, 26]. At the same time, their hierarchical architecture and basic computational properties admit a fundamental similarity to real neural systems. Together with the increasing amount of evidence for the similarity of the representations in convolutional networks and those in the ventral visual pathway [29, 2, 14], these properties make them compelling candidate models for studying visual information processing in the brain. In fact, it was recently suggested that textures generated from the representations of performance-optimised convolutional networks “may therefore prove useful as stimuli in perceptual or physiological investigations” [19]. We feel that our texture model is the first step in that direction and envision it to provide an exciting new tool in the study of visual information processing in biological systems. Acknowledgments This work was funded by the German National Academic Foundation (L.A.G.), the Bernstein Center for Computational Neuroscience (FKZ 01GQ1002) and the German Excellency Initiative through the Centre for Integrative Neuroscience T¨ubingen (EXC307)(M.B., A.S.E, L.A.G.) References [1] B. Balas, L. Nakano, and R. Rosenholtz. A summary-statistic representation in peripheral vision explains visual crowding. Journal of vision, 9(12):13, 2009. 8 [2] C. F. Cadieu, H. Hong, D. L. K. Yamins, N. Pinto, D. Ardila, E. A. Solomon, N. J. Majaj, and J. J. DiCarlo. Deep Neural Networks Rival the Representation of Primate IT Cortex for Core Visual Object Recognition. PLoS Comput Biol, 10(12):e1003963, December 2014. [3] M. Cimpoi, S. Maji, and A. Vedaldi. Deep convolutional filter banks for texture recognition and segmentation. arXiv:1411.6836 [cs], November 2014. arXiv: 1411.6836. [4] E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting Linear Structure Within Convolutional Networks for Efficient Evaluation. In NIPS, 2014. [5] A. Efros and T. K. Leung. Texture synthesis by non-parametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pages 1033–1038. IEEE, 1999. [6] A. A. Efros and W. T. Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 341–346. ACM, 2001. [7] J. Freeman and E. P. Simoncelli. Metamers of the ventral stream. Nature Neuroscience, 14(9):1195–1201, September 2011. [8] J. Freeman, C. M. Ziemba, D. J. Heeger, E. P. Simoncelli, and A. J. Movshon. A functional and perceptual signature of the second visual area in primates. Nature Neuroscience, 16(7):974–981, July 2013. [9] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. arXiv preprint arXiv:1406.4729, 2014. [10] D. J. Heeger and J. R. Bergen. Pyramid-based Texture Analysis/Synthesis. In Proceedings of the 22Nd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’95, pages 229–238, New York, NY, USA, 1995. ACM. [11] M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up Convolutional Neural Networks with Low Rank Expansions. In BMVC 2014, 2014. [12] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the ACM International Conference on Multimedia, pages 675–678. ACM, 2014. [13] B. Julesz. Visual Pattern Discrimination. IRE Transactions on Information Theory, 8(2), February 1962. [14] S. Khaligh-Razavi and N. Kriegeskorte. Deep Supervised, but Not Unsupervised, Models May Explain IT Cortical Representation. PLoS Comput Biol, 10(11):e1003915, November 2014. [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 27, pages 1097–1105, 2012. [16] V. Kwatra, A. Sch¨odl, I. Essa, G. Turk, and A. Bobick. Graphcut textures: image and video synthesis using graph cuts. In ACM Transactions on Graphics (ToG), volume 22, pages 277–286. ACM, 2003. [17] V. Lebedev, Y. Ganin, M. Rakhuba, I. Oseledets, and V. Lempitsky. Speeding-up Convolutional Neural Networks Using Fine-tuned CP-Decomposition. arXiv preprint arXiv:1412.6553, 2014. [18] Y. A. LeCun, L. Bottou, G. B. Orr, and K. R. M¨uller. Efficient backprop. In Neural networks: Tricks of the trade, pages 9–48. Springer, 2012. [19] A. J. Movshon and E. P. Simoncelli. Representation of naturalistic image structure in the primate visual cortex. Cold Spring Harbor Symposia on Quantitative Biology: Cognition, 2015. [20] G. Okazawa, S. Tajima, and H. Komatsu. Image statistics underlying natural texture selectivity of neurons in macaque V4. PNAS, 112(4):E351–E360, January 2015. [21] J. Portilla and E. P. Simoncelli. A Parametric Texture Model Based on Joint Statistics of Complex Wavelet Coefficients. International Journal of Computer Vision, 40(1):49–70, October 2000. [22] R. Rosenholtz, J. Huang, A. Raj, B. J. Balas, and L. Ilie. A summary statistic representation in peripheral vision explains visual search. Journal of vision, 12(4):14, 2012. [23] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. arXiv:1409.0575 [cs], September 2014. arXiv: 1409.0575. [24] E. P. Simoncelli and W. T. Freeman. The steerable pyramid: A flexible architecture for multi-scale derivative computation. In Image Processing, International Conference on, volume 3, pages 3444–3444. IEEE Computer Society, 1995. [25] K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv:1409.1556 [cs], September 2014. arXiv: 1409.1556. [26] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going Deeper with Convolutions. arXiv:1409.4842 [cs], September 2014. arXiv: 1409.4842. [27] L. Wei, S. Lefebvre, V. Kwatra, and G. Turk. State of the art in example-based texture synthesis. In Eurographics 2009, State of the Art Report, EG-STAR, pages 93–117. Eurographics Association, 2009. [28] L. Wei and M. Levoy. Fast texture synthesis using tree-structured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 479–488. ACM Press/Addison-Wesley Publishing Co., 2000. [29] D. L. K. Yamins, H. Hong, C. F. Cadieu, E. A. Solomon, D. Seibert, and J. J. DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. PNAS, page 201403112, May 2014. [30] C. Zhu, R. H. Byrd, P. Lu, and J. Nocedal. Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound-constrained optimization. ACM Transactions on Mathematical Software (TOMS), 23(4):550–560, 1997. 9 | 2015 | 261 |
5,771 | Hessian-free Optimization for Learning Deep Multidimensional Recurrent Neural Networks Minhyung Cho Chandra Shekhar Dhir Jaehyung Lee Applied Research Korea, Gracenote Inc. {mhyung.cho,shekhardhir}@gmail.com jaehyung.lee@kaist.ac.kr Abstract Multidimensional recurrent neural networks (MDRNNs) have shown a remarkable performance in the area of speech and handwriting recognition. The performance of an MDRNN is improved by further increasing its depth, and the difficulty of learning the deeper network is overcome by using Hessian-free (HF) optimization. Given that connectionist temporal classification (CTC) is utilized as an objective of learning an MDRNN for sequence labeling, the non-convexity of CTC poses a problem when applying HF to the network. As a solution, a convex approximation of CTC is formulated and its relationship with the EM algorithm and the Fisher information matrix is discussed. An MDRNN up to a depth of 15 layers is successfully trained using HF, resulting in an improved performance for sequence labeling. 1 Introduction Multidimensional recurrent neural networks (MDRNNs) constitute an efficient architecture for building a multidimensional context into recurrent neural networks [1]. End-to-end training of MDRNNs in conjunction with connectionist temporal classification (CTC) has been shown to achieve a state-of-the-art performance in on/off-line handwriting and speech recognition [2, 3, 4]. In previous approaches, the performance of MDRNNs having a depth of up to five layers, which is limited as compared to the recent progress in feedforward networks [5], was demonstrated. The effectiveness of MDRNNs deeper than five layers has thus far been unknown. Training a deep architecture has always been a challenging topic in machine learning. A notable breakthrough was achieved when deep feedforward neural networks were initialized using layerwise pre-training [6]. Recently, approaches have been proposed in which supervision is added to intermediate layers to train deep networks [5, 7]. To the best of our knowledge, no such pre-training or bootstrapping method has been developed for MDRNNs. Alternatively, Hesssian-free (HF) optimization is an appealing approach to training deep neural networks because of its ability to overcome pathological curvature of the objective function [8]. Furthermore, it can be applied to any connectionist model provided that its objective function is differentiable. The recent success of HF for deep feedforward and recurrent neural networks [8, 9] supports its application to MDRNNs. In this paper, we claim that an MDRNN can benefit from a deeper architecture, and the application of second order optimization such as HF allows its successful learning. First, we offer details of the development of HF optimization for MDRNNs. Then, to apply HF optimization for sequence labeling tasks, we address the problem of the non-convexity of CTC, and formulate a convex approximation. In addition, its relationship with the EM algorithm and the Fisher information matrix is discussed. Experimental results for offline handwriting and phoneme recognition show that an MDRNN with HF optimization performs better as the depth of the network increases up to 15 layers. 1 2 Multidimensional recurrent neural networks MDRNNs constitute a generalization of RNNs to process multidimensional data by replacing the single recurrent connection with as many connections as the dimensions of the data [1]. The network can access the contextual information from 2N directions, allowing a collective decision to be made based on rich context information. To enhance its ability to exploit context information, long shortterm memory (LSTM) [10] cells are usually utilized as hidden units. In addition, stacking MDRNNs to construct deeper networks further improves the performance as the depth increases, achieving the state-of-the-art performance in phoneme recognition [4]. For sequence labeling, CTC is applied as a loss function of the MDRNN. The important advantage of using CTC is that no pre-segmented sequences are required, and the entire transcription of the input sample is sufficient. 2.1 Learning MDRNNs A d-dimensional MDRNN with M inputs and K outputs is regarded as a mapping from an input sequence x ∈RM×T1×···×Td to an output sequence a ∈(RK)T of length T, where the input data for M input neurons are given by the vectorization of d-dimensional data, and T1, . . . , Td is the length of the sequence in each dimension. All learnable weights and biases are concatenated to obtain a parameter vector θ ∈RN. In the learning phase with fixed training data, the MDRNN is formalized as a mapping N : RN →(RK)T from the parameters θ to the output sequence a, i.e., a = N(θ). The scalar loss function is defined over the output sequence as L : (RK)T →R. Learning an MDRNN is viewed as an optimization of the objective L(N(θ)) = L ◦N(θ) with respect to θ. The Jacobian JF of a function F : Rm →Rn is the n × m matrix where each element is a partial derivative of an element of output with respect to an element of input. The Hessian HF of a scalar function F : Rm →R is the m × m matrix of second-order partial derivatives of the output with respect to its inputs. Throughout this paper, a vector sequence is denoted by boldface a, a vector at time t in a is denoted by at, and the k-th element of at is denoted by at k. 3 Hessian-free optimization for MDRNNs The application of HF optimization to an MDRNN is straightforward if the matching loss function [11] for its output layer is adopted. However, this is not the case for CTC, which is necessarily adopted for sequence labeling. Before developing an appropriate approximation to CTC that is compatible with HF optimization, we discuss two considerations related to the approximation. The first is obtaining a quadratic approximation of the loss function, and the second is the efficient calculation of the matrix-vector product used at each iteration of the conjugate gradient (CG) method. HF optimization minimizes an objective by constructing a local quadratic approximation for the objective function and minimizing the approximate function instead of the original one. The loss function L(θ) needs to be approximated at each point θn of the n-th iteration: Qn(θ) = L(θn) + ∇θL|⊤ θnδn + 1 2δ⊤ n Gδn, (1) where δn = θ −θn is the search direction, i.e., the parameters of the optimization, and G is a local approximation to the curvature of L(θ) at θn, which is typically obtained by the generalized Gauss-Newton (GGN) matrix as an approximation of the Hessian. HF optimization uses the CG method in a subroutine to minimize the quadratic objective above for utilizing the complete curvature information and achieving computational efficiency. CG requires the computation of Gv for an arbitrary vector v, but not the explicit evaluation of G. For neural networks, an efficient way to compute Gv was proposed in [11], extending the study in [12]. In section 3.2, we provide the details of the efficient computation of Gv for MDRNNs. 3.1 Quadratic approximation of loss function The Hessian matrix, HL◦N , of the objective L (N (θ)) is written as HL◦N = J⊤ N HLJN + KT X i=1 [JL]iH[N ]i, (2) 2 where JN ∈RKT ×N, HL ∈RKT ×KT , and [q]i denotes the i-th component of the vector q. An indefinite Hessian matrix is problematic for second-order optimization, because it defines an unbounded local quadratic approximation [13]. For nonlinear systems, the Hessian is not necessarily positive semidefinite, and thus, the GGN matrix is used as an approximation of the Hessian [11, 8]. The GGN matrix is obtained by ignoring the second term in Eq. (2), as given by GL◦N = J⊤ N HLJN . (3) The sufficient condition for the GGN approximation to be exact is that the network makes a perfect prediction for every given sample, that is, JL = 0, or [N]i stays in the linear region for all i, that is, H[N ]i = 0. GL◦N has less rank than KT and is positive semidefinite provided that HL is. Thus, L is chosen to be a convex function so that HL is positive semidefinite. In principle, it is best to define L and N such that L performs as much of the computation as possible, with the positive semidefiniteness of HL as a minimum requirement [13]. In practice, a nonlinear output layer together with its matching loss function [11], such as the softmax function with cross-entropy loss, is widely used. 3.2 Computation of matrix-vector product for MDRNN The product of an arbitrary vector v by the GGN matrix, Gv = J⊤ N HLJN v, amounts to the sequential multiplication of v by three matrices. First, the product JN v is a Jacobian times vector and is therefore equal to the directional derivative of N(θ) along the direction of v. Thus, JN v can be written using a differential operator JN v = Rv(N(θ)) [12] and the properties of the operator can be utilized for efficient computation. Because an MDRNN is a composition of differentiable components, the computation of Rv(N(θ)) throughout the whole network can be accomplished by repeatedly applying the sum, product, and chain rules starting from the input layer. The detailed derivation of the R operator to LSTM, normally used as a hidden unit in MDRNNs, is provided in appendix A. Next, the multiplication of JN v by HL can be performed by direct computation. The dimension of HL could at first appear problematic, since the dimension of the output vector used by the loss function L can be as high as KT, in particular, if CTC is adopted as an objective for the MDRNN. If the loss function can be expressed as the sum of individual loss functions with a domain restricted in time, the computation can be reduced significantly. For example, with the commonly used crossentropy loss function, the KT × KT matrix HL can be transformed into a block diagonal matrix with T blocks of a K ×K Hessian matrix. Let HL,t be the t-th block in HL. Then, the GGN matrix can be written as GL◦N = X t J⊤ NtHL,tJNt, (4) where JNt is the Jacobian of the network at time t. Finally, the multiplication of a vector u = HLJN v by the matrix J⊤ N is calculated using the backpropagation through time algorithm by propagating u instead of the error at the output layer. 4 Convex approximation of CTC for application to HF optimization Connectioninst temporal classification (CTC) [14] provides an objective function of learning an MDRNN for sequence labeling. In this section, we derive a convex approximation of CTC inspired by the GGN approximation according to the following steps. First, the non-convex part of the original objective is separated out by reformulating the softmax part. Next, the remaining convex part is approximated without altering its Hessian, making it well matched to the non-convex part. Finally, the convex approximation is obtained by reuniting the convex and non-convex parts. 4.1 Connectionist temporal classification CTC is formulated as the mapping from an output sequence of the recurrent network, a ∈(RK)T , to a scalar loss. The output activations at time t are normalized using the softmax function yt k = exp(at k) P k′ exp(at k′), (5) 3 where yt k is the probability of label k given a at time t. The conditional probability of the path π is calculated by the multiplication of the label probabilities at each timestep, as given by p(π|a) = T Y t=1 yt πt, (6) where πt is the label observed at time t along the path π. The path π of length T is mapped to a label sequence of length M ≤T by an operator B, which removes the repeated labels and then the blanks. Several mutually exclusive paths can map to the same label sequence. Let S be a set containing every possible sequence mapped by B, that is, S = {s|s ∈B(π) for some π} is the image of B, and let |S| denote the cardinality of the set. The conditional probability of a label sequence l is given by p(l|a) = X π∈B−1(l) p(π|a), (7) which is the sum of probabilities of all the paths mapped to a label sequence l by B. The cross-entropy loss assigns a negative log probability to the correct answer. Given a target sequence z, the loss function of CTC for the sample is written as L(a) = −log p(z|a). (8) From the description above, CTC is composed of the sum of the product of softmax components. The function −log(yt k), corresponding to the softmax with cross-entropy loss, is convex [11]. Therefore, yt k is log-concave. Whereas log-concavity is closed under multiplication, the sum of log-concave functions is not log-concave in general [15]. As a result, the CTC objective is not convex in general because it contains the sum of softmax components in Eq. (7). 4.2 Reformulation of CTC objective function We reformulate the CTC objective Eq. (8) to separate out the terms that are responsible for the nonconvexity of the function. By reformulation, the softmax function is defined over the categorical label sequences. By substituting Eq. (5) into Eq. (6), it follows that p(π|a) = exp(bπ) P π′∈all exp(bπ′), (9) where bπ = P t at πt. By substituting Eq. (9) into Eq. (7) and setting l = z, p(z|a) can be re-written as p(z|a) = P π∈B−1(z) exp(bπ) P π∈all exp(bπ) = exp(fz) P z′∈S exp(fz′), (10) where S is the set of every possible label sequence and fz = log P π∈B−1(z) exp(bπ) is the logsum-exp function1, which is proportional to the probability of observing the label sequence z among all the other label sequences. With the reformulation above, the CTC objective can be regarded as the cross-entropy loss with the softmax output, which is defined over all the possible label sequences. Because the cross-entropy loss function matches the softmax output layer [11], the CTC objective is convex, except the part that computes fz for each of the label sequences. At this point, an obvious candidate for the convex approximation of CTC is the GGN matrix separating the convex and non-convex parts. Let the non-convex part be Nc and the convex part be Lc. The mapping Nc : (RK)T →R|S| is defined by Nc(a) = F = [fz1, . . . , fz|S|]⊤, (11) 1f(x1, . . . , xn) = log(ex1 + · · · + exn) is the log-sum-exp function defined on Rn 4 where fz is given above, and |S| is the number of all the possible label sequences. For given F as above, the mapping Lc : R|S| →R is defined by Lc(F) = −log exp(fz) P z′∈S exp(fz′) = −fz + log X z′∈S exp(fz′) ! , (12) where z is the label sequence corresponding to a. The final reformulation for the loss function of CTC is given by L(a) = Lc ◦Nc(a). (13) 4.3 Convex approximation of CTC loss function The GGN approximation of Eq. (13) immediately gives a convex approximation of the Hessian for CTC as GLc◦Nc = J⊤ NcHLcJNc. Although HLc has the form of a diagonal matrix plus a rank-1 matrix, i.e., diag(Y ) −Y Y ⊤, the dimension of HLc is |S| × |S|, where |S| becomes exponentially large as the length of the sequence increases. This makes the practical calculation of HLc difficult. On the other hand, removing the linear team −fz from Lc(F) in Eq. (12) does not alter its Hessian. The resulting formula is Lp(F) = log P z′∈S exp(fz′) . The GGN matrices of L = Lc ◦Nc and M = Lp ◦Nc are the same, i.e., GLc◦Nc = GLp◦Nc. Therefore, their Hessian matrices are approximations of each other. The condition that the two Hessian matrices, HL and HM, converges to the same matrix is discussed below. Interestingly, M is given as a compact formula M(a) = Lp ◦Nc(a) = P t log P k exp(at k), where at k is the output unit k at time t. Its Hessian HM can be directly computed, resulting in a block diagonal matrix. Each block is restricted in time, and the t-th block is given by HM,t = diag(Y t) −Y tY t⊤, (14) where Y t = [yt 1, . . . , yt K]⊤and yt k is given in Eq. (5). Because the Hessian of each block is positive semidefinite, HM is positive semidefinite. A convex approximation of the Hessian of an MDRNN using the CTC objective can be obtained by substituting HM for HL in Eq. (3). Note that the resulting matrix is block diagonal and Eq. (4) can be utilized for efficient computation. Our derivation can be summarized as follows: 1. HL = HLc◦Nc is not positive semidefinite. 2. GLc◦Nc = GLp◦Nc is positive semidefinite, but not computationally tractable. 3. HLp◦Nc is positive semidefinite and computationally tractable. 4.4 Sufficient condition for the proposed approximation to be exact From Eq. (2), the condition HLc◦Nc = HLp◦Nc holds if and only if PKT i=1[JLc]iH[Nc]i = PKT i=1[JLp]iH[Nc]i. Since JLc ̸= JLp in general, we consider only the case of H[Nc]i = 0 for all i, which corresponds to the case where Nc is a linear mapping. [Nc]i contains a log-sum-exp function mapping from paths to a label sequence. Let l be the label sequence corresponding to [Nc]i; then, [Nc]i = fl(. . . , bπ, . . . ) for π ∈B−1(l). If the probability of one path π′ is sufficiently large to ignore all the other paths, that is, exp(bπ′) ≫exp(bπ) for π ∈{B−1(l)\π′}, it follows that fl(. . . , bπ′, . . . ) = bπ′. This is a linear mapping, which results in H[Nc]i = 0. In conclusion, the condition HLc◦Nc = HLp◦Nc holds if one dominant path π ∈B−1(l) exists such that fl(. . . , bπ, . . . ) = bπ for each label sequence l. 4.5 Derivation of the proposed approximation from the Fisher information matrix The identity of the GGN and the Fisher information matrix [16] has been shown for the network using the softmax with cross-entropy loss [17, 18]. Thus, it follows that the GGN matrix of Eq. (13) is identical to the Fisher information matrix. Now, we show that the proposed matrix in Eq. (14) 5 is derived from the Fisher information matrix under the condition given in section 4.4. The Fisher information matrix of an MDRNN using CTC is written as F = Ex " J⊤ N El∼p(l|a) "∂log p(l|a) ∂a ⊤∂log p(l|a) ∂a # JN # , (15) where a = a(x, θ) is the KT-dimensional output of the network N. CTC assumes output probabilities at each timestep to be independent of those at other timesteps [1], and therefore, its Fisher information matrix is given as the sum of every timestep. It follows that F = Ex "X t J⊤ NtEl∼p(l|a) "∂log p(l|a) ∂at ⊤∂log p(l|a) ∂at # JNt # . (16) Under the condition in section 4.4, the Fisher information matrix is given by F = Ex "X t J⊤ Nt(diag(Y t) −Y tY t⊤)JNt # , (17) which is the same form as Eqs. (4) and (14) combined. See appendix B for the detailed derivation. 4.6 EM interpretation of the proposed approximation The goal of the Expectation-Maximization (EM) algorithm is to find the maximum likelihood solution for models having latent variables [19]. Given an input sequence x, and its corresponding target label sequence z, the log likelihood of z is given by log p(z|x, θ) = log P π∈B−1(z) p(π|x, θ), where θ represents the model parameters. For each observation x, we have a corresponding latent variable q which is a 1-of-k binary vector where k is the number of all the paths mapped to z. The log likelihood can be written in terms of q as log p(z, q|x, θ) = P π∈B−1(z) qπ|x,z log p(π|x, θ). The EM algorithm starts with an initial parameter ˆθ, and repeats the following process until convergence. Expectation step calculates: γπ|x,z = p(π|x,ˆθ) P π∈B−1(z) p(π|x,ˆθ). Maximization step updates: ˆθ = argmaxθQ(θ), where Q(θ) = P π∈B−1(z) γπ|x,z log p(π|x, θ). In the context of CTC and RNN, p(π|x, θ) is given as p(π|a(x, θ)) as in Eq. (6), where a(x, θ) is the KT-dimensional output of the neural network. Taking the second-order derivative of log p(π|a) with respect to at gives diag(Y t)−Y tY t⊤, with Y t as in Eq. (14). Because this term is independent of π and P π∈B−1(z) γπ|x,z = 1, the Hessian of Q with respect to at is given by HQ,t = diag(Y t) −Y tY t⊤, (18) which is the same as the convex approximation in Eq. (14). 5 Experiments In this section, we present the experimental results for two different sequence labeling tasks, offline handwriting recognition and phoneme recognition. The performance of Hessian-free optimization for MDRNNs with the proposed matrix is compared with that of stochastic gradient descent (SGD) optimization on the same settings. 5.1 Database and preprocessing The IFN/ENIT Database [20] is a database of handwritten Arabic words, which consists of 32,492 images. The entire dataset has five subsets (a, b, c, d, e). The 25,955 images corresponding to the subsets (b −e) were used for training. The validation set consisted of 3,269 images corresponding to the first half of the sorted list in alphabetical order (ae07 001.tif −ai54 028.tif) in set a. The remaining images in set a, amounting to 3,268, were used for the test. The intensity of pixels was centered and scaled using the mean and standard deviation calculated from the training set. 6 The TIMIT corpus [21] is a benchmark database for evaluating speech recognition performance. The standard training, validation, and core datasets were used. Each set contains 3,696 sentences, 400 sentences, and 192 sentences, respectively. A mel spectrum with 26 coefficients was used as a feature vector with a pre-emphasis filter, 25 ms window size, and 10 ms shift size. Each input feature was centered and scaled using the mean and standard deviation of the training set. 5.2 Experimental setup For handwriting recognition, the basic architecture was adopted from that proposed in [3]. Deeper networks were constructed by replacing the top layer with more layers. The number of LSTM cells in the augmented layer was chosen such that the total number of weights between the different networks was similar. The detailed architectures are described in Table 1, together with the results. For phoneme recognition, the deep bidirectional LSTM and CTC in [4] was adopted as the basic architecture. In addition, the memory cell block [10], in which the cells share the gates, was applied for efficient information sharing. Each LSTM block was constrained to have 10 memory cells. According to the results, using a large value of bias for input/output gates is beneficial for training deep MDRNNs. A possible explanation is that the activation of neurons is exponentially decayed by input/output gates during the propagation. Thus, setting large bias values for these gates may facilitate the transmission of information through many layers at the beginning of the learning. For this reason, the biases of the input and output gates were initialized to 2, whereas those of the forget gates and memory cells were initialized to 0. All the other weight parameters of the MDRNN were initialized randomly from a uniform distribution in the range [−0.1, 0.1]. The label error rate was used as the metric for performance evaluation, together with the average loss of CTC in Eq. (8). It is defined by the edit distance, which sums the total number of insertions, deletions, and substitutions required to match two given sequences. The final performance, shown in Tables 1 and 2, was evaluated using the weight parameters that gave the best label error rate on the validation set. To map output probabilities to a label sequence, best path decoding [1] was used for handwriting recognition and beam search decoding [4, 22] with a beam width of 100 was used for phoneme recognition. For phoneme recognition, 61 phoneme labels were used during training and decoding, and then, mapped to 39 classes for calculating the phoneme error rate (PER) [4, 23]. For phoneme recognition, the regularization method suggested in [24] was used. We applied Gaussian weight noise of standard deviation σ = {0.03, 0.04, 0.05} together with L2 regularization of strength 0.001. The network was first trained without noise, and then, it was initialized to the weights that gave the lowest CTC loss on the validation set. Then, the network was retrained with Gaussian weight noise [4]. Table 2 presents the best result for different values of σ. 5.2.1 Parameters For HF optimization, we followed the basic setup described in [8], but different parameters were utilized. Tikhonov damping was used together with Levenberg-Marquardt heuristics. The value of the damping parameter λ was initialized to 0.1, and adjusted according to the reduction ratio ρ (multiplied by 0.9 if ρ > 0.75, divided by 0.9 if ρ < 0.25, and unchanged otherwise). The initial search direction for each run of CG was set to the CG direction found by the previous HF optimization iteration decayed by 0.7. To ensure that CG followed the descent direction, we continued to perform a minimum 5 and maximum 30 of additional CG iterations after it found the first descent direction. We terminated CG at iteration i before reaching the maximum iteration if the following condition was satisfied: (φ(xi) −φ(xi−5))/φ(xi) < 0.005 , where φ is the quadratic objective of CG without offset. The training data were divided into 100 and 50 mini-batches for the handwriting and phoneme recognition experiments, respectively, and used for both the gradient and matrix-vector product calculation. The learning was stopped if any of two criteria did not improve for 20 epochs and 10 epochs in handwriting and phoneme recognition, respectively. For SGD optimization, the learning rate ϵ was chosen from {10−4, 10−5, 10−6}, and the momentum µ from {0.9, 0.95, 0.99}. For handwriting recognition, the best performance obtained using all the possible combinations of parameters is presented in Table 1. For phoneme recognition, the best parameters out of nine candidates for each network were selected after training without weight noise based on the CTC loss. Additionally, the backpropagated error in LSTM layer was clipped to remain 7 in the range [−1, 1] for stable learning [25]. The learning was stopped after 1000 epochs had been processed, and the final performance was evaluated using the weight parameters that showed the best label error rate on the validation set. It should be noted that in order to guarantee the convergence, we selected a conservative criterion as compared to the study where the network converged after 85 epochs in handwriting recognition [3] and after 55-150 epochs in phoneme recognition [4]. 5.3 Results Table 1 presents the label error rate on the test set for handwriting recognition. In all cases, the networks trained using HF optimization outperformed those using SGD. The advantage of using HF is more pronounced as the depth increases. The improvements resulting from the deeper architecture can be seen with the error rate dropping from 6.1% to 4.5% as the depth increases from 3 to 13. Table 2 shows the phoneme error rate (PER) on the core set for phoneme recognition. The improved performance according to the depth can be observed for both optimization methods. The best PER for HF optimization is 18.54% at 15 layers and that for SGD is 18.46% at 10 layers, which are comparable to that reported in [4], where the reported results are a PER of 18.6% from a network with 3 layers having 3.8 million weights and a PER of 18.4% from a network with 5 layers having 6.8 million weights. The benefit of a deeper network is obvious in terms of the number of weight parameters, although this is not intended to be a definitive performance comparison because of the different preprocessing. The advantage of HF optimization is not prominent in the result of the experiments using the TIMIT database. One explanation is that the networks tend to overfit to a relatively small number of the training data samples, which removes the advantage of using advanced optimization techniques. Table 1: Experimental results for Arabic offline handwriting recognition. The label error rate is presented with the different network depths. AB denotes a stack of B layers having A hidden LSTM cells in each layer. “Epochs” is the number of epochs required by the network using HF optimization so that the stopping criteria are fulfilled. ϵ is the learning rate and µ is the momentum. NETWORKS DEPTH WEIGHTS HF (%) EPOCHS SGD (%) {ϵ, µ} 2-10-50 3 159,369 6.10 77 9.57 {10−4,0.9} 2-10-213 5 157,681 5.85 90 9.19 {10−5,0.99} 2-10-146 8 154,209 4.98 140 9.67 {10−4,0.95} 2-10-128 10 154,153 4.95 109 9.25 {10−4,0.95} 2-10-1011 13 150,169 4.50 84 10.63 {10−4,0.9} 2-10-913 15 145,417 5.69 84 12.29 {10−5,0.99} Table 2: Experimental results for phoneme recognition using the TIMIT corpus. PER is presented with the different MDRNN architectures (depth × block × cell/block). σ is the standard deviation of Gaussian weight noise. The remaining parameters are the same as in Table 1. NETWORKS WEIGHTS HF (%) EPOCHS {σ} SGD (%) {ϵ, µ, σ} 3 × 20 × 10 771,542 20.14 22 {0.03} 20.96 {10−5, 0.99, 0.05 } 5 × 15 × 10 795,752 19.18 30 {0.05} 20.82 {10−4, 0.9, 0.04 } 8 × 11 × 10 720,826 19.09 29 {0.05} 19.68 {10−4, 0.9, 0.04 } 10 × 10 × 10 755,822 18.79 60 {0.04} 18.46 {10−5, 0.95, 0.04 } 13 × 9 × 10 806,588 18.59 93 {0.05} 18.49 {10−5, 0.95, 0.04 } 15 × 8 × 10 741,230 18.54 50 {0.04} 19.09 {10−5, 0.95, 0.03 } 3 × 250 × 1† 3.8M 18.6 {10−4, 0.9, 0.075 } 5 × 250 × 1† 6.8M 18.4 {10−4, 0.9, 0.075 } † The results were reported by Graves in 2013 [4]. 6 Conclusion Hessian-free optimization as an approach for successful learning of deep MDRNNs, in conjunction with CTC, was presented. To apply HF optimization to CTC, a convex approximation of its objective function was explored. In experiments, improvements in performance were seen as the depth of the network increased for both HF and SGD. HF optimization showed a significantly better performance for handwriting recognition than did SGD, and a comparable performance for speech recognition. 8 References [1] Alex Graves. Supervised sequence labelling with recurrent neural networks, volume 385. Springer, 2012. [2] Alex Graves, Marcus Liwicki, Horst Bunke, J¨urgen Schmidhuber, and Santiago Fern´andez. Unconstrained on-line handwriting recognition with recurrent neural networks. In Advances in Neural Information Processing Systems, pages 577–584, 2008. [3] Alex Graves and J¨urgen Schmidhuber. Offline handwriting recognition with multidimensional recurrent neural networks. In Advances in Neural Information Processing Systems, pages 545–552, 2009. [4] Alex Graves, Abdel-ranhman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Proceedings of ICASSP, pages 6645–6649. IEEE, 2013. [5] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. CoRR, abs/1412.6550, 2014. URL http://arxiv.org/ abs/1412.6550. [6] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [7] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. [8] James Martens. Deep learning via Hessian-free optimization. In Proceedings of the 27th International Conference on Machine Learning, pages 735–742, 2010. [9] James Martens and Ilya Sutskever. Learning recurrent neural networks with Hessian-free optimization. In Proceedings of the 28th International Conference on Machine Learning, pages 1033–1040, 2011. [10] Sepp Hochreiter and J¨urgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735– 1780, 1997. [11] Nicol N Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural Computation, 14(7):1723–1738, 2002. [12] Barak A Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160, 1994. [13] James Martens and Ilya Sutskever. Training deep and recurrent networks with Hessian-free optimization. In Neural Networks: Tricks of the Trade, pages 479–535. Springer, 2012. [14] Alex Graves, Santiago Fern´andez, Faustino Gomez, and J¨urgen Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd International Conference on Machine Learning, pages 369–376, 2006. [15] Stephen Boyd and Lieven Vandenberghe, editors. Convex Optimization. Cambridge University Press, 2004. [16] Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural computation, 10(2):251–276, 1998. [17] Razvan Pascanu and Yoshua Bengio. Revisiting natural gradient for deep networks. In International Conference on Learning Representations, 2014. [18] Hyeyoung Park, S-I Amari, and Kenji Fukumizu. Adaptive natural gradient learning algorithms for various stochastic models. Neural Networks, 13(7):755–764, 2000. [19] Christopher M. Bishop, editor. Pattern Recognition and Machine Learning. Springer, 2007. [20] Mario Pechwitz, S Snoussi Maddouri, Volker M¨argner, Noureddine Ellouze, and Hamid Amiri. IFN/ENIT-database of handwritten arabic words. In Proceedings of CIFED, pages 129–136, 2002. [21] DARPA-ISTO. The DARPA TIMIT acoustic-phonetic continuous speech corpus (TIMIT). In speech disc cd1-1.1 edition, 1990. [22] Alex Graves. Sequence transduction with recurrent neural networks. In ICML Representation Learning Workshop, 2012. [23] Kai-Fu Lee and Hsiao-Wuen Hon. Speaker-independent phone recognition using hidden markov models. IEEE Transactions on Acoustics, Speech and Signal Processing, 37(11):1641–1648, 1989. [24] Alex Graves. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348–2356, 2011. [25] Alex Graves. Rnnlib: A recurrent neural network library for sequence learning problems, 2008. 9 | 2015 | 262 |
5,772 | Matrix Completion from Fewer Entries: Spectral Detectability and Rank Estimation Alaa Saade1 and Florent Krzakala1,2 1 Laboratoire de Physique Statistique, CNRS & École Normale Supérieure, Paris, France. 2Sorbonne Universités, Université Pierre et Marie Curie Paris 06, F-75005, Paris, France Lenka Zdeborová Institut de Physique Théorique, CEA Saclay and CNRS UMR 3681, 91191 Gif-sur-Yvette, France Abstract The completion of low rank matrices from few entries is a task with many practical applications. We consider here two aspects of this problem: detectability, i.e. the ability to estimate the rank r reliably from the fewest possible random entries, and performance in achieving small reconstruction error. We propose a spectral algorithm for these two tasks called MaCBetH (for Matrix Completion with the Bethe Hessian). The rank is estimated as the number of negative eigenvalues of the Bethe Hessian matrix, and the corresponding eigenvectors are used as initial condition for the minimization of the discrepancy between the estimated matrix and the revealed entries. We analyze the performance in a random matrix setting using results from the statistical mechanics of the Hopfield neural network, and show in particular that MaCBetH efficiently detects the rank r of a large n × m matrix from C(r)r√nm entries, where C(r) is a constant close to 1. We also evaluate the corresponding root-mean-square error empirically and show that MaCBetH compares favorably to other existing approaches. Matrix completion is the task of inferring the missing entries of a matrix given a subset of known entries. Typically, this is possible because the matrix to be completed has (at least approximately) low rank r. This problem has witnessed a burst of activity, see e.g. [1, 2, 3], motivated by many applications such as collaborative filtering [1], quantum tomography [4] in physics, or the analysis of a covariance matrix [1]. A commonly studied model for matrix completion assumes the matrix to be exactly low rank, with the known entries chosen uniformly at random and observed without noise. The most widely considered question in this setting is how many entries need to be revealed such that the matrix can be completed exactly in a computationally efficient way [1, 3]. While our present paper assumes the same model, the main questions we investigate are different. The first question we address is detectability: how many random entries do we need to reveal in order to be able to estimate the rank r reliably. This is motivated by the more generic problem of detecting structure (in our case, low rank) hidden in partially observed data. It is reasonable to expect the existence of a region where exact completion is hard or even impossible yet the rank estimation is tractable. A second question we address is what is the minimum achievable root-mean-square error (RMSE) in estimating the unknown elements of the matrix. In practice, even if exact reconstruction is not possible, having a procedure that provides a very small RMSE might be quite sufficient. In this paper we propose an algorithm called MaCBetH that gives the best known empirical performance for the two tasks above when the rank r is small. The rank in our algorithm is estimated as the number of negative eigenvalues of an associated Bethe Hessian matrix [5, 6], and the corresponding eigenvectors are used as an initial condition for the local optimization of a cost function commonly considered in matrix completion (see e.g. [3]). In particular, in the random matrix setting, we show 1 that MaCBetH detects the rank of a large n × m matrix from C(r)r√nm entries, where C(r) is a small constant, see Fig. 2, and C(r) →1 as r →∞. The RMSE is evaluated empirically and, in the regime close to C(r)r√nm, compares very favorably to existing approache such as OptSpace [3]. This paper is organized as follows. We define the problem and present generally our approach in the context of existing work in Sec. 1. In Sec. 2 we describe our algorithm and motivate its construction via a spectral relaxation of the Hopfield model of neural network. Next, in Sec. 3 we show how the performance of the proposed spectral method can be analyzed using, in parts, results from spin glass theory and phase transitions, and rigorous results on the spectral density of large random matrices. Finally, in Sec. 4 we present numerical simulations that demonstrate the efficiency of MaCBetH. Implementations of our algorithms in the Julia and Matlab programming languages are available at the SPHINX webpage http://www.lps.ens.fr/~krzakala/WASP.html. 1 Problem definition and relation to other work Let Mtrue be a rank-r matrix such that Mtrue = XY T , (1) where X ∈Rn×r and Y ∈Rm×r are two (unknown) tall matrices. We observe only a small fraction of the elements of Mtrue, chosen uniformly at random. We call E the subset of observed entries, and M the (sparse) matrix supported on E whose nonzero elements are the revealed entries of Mtrue. The aim is to reconstruct the rank r matrix Mtrue = XY T given M. An important parameter which controls the difficulty of the problem is ϵ = |E|/√nm. In the case of a square matrix M, this is the average number of revealed entries per line or column. In our numerical examples and theoretical justifications we shall generate the low rank matrix Mtrue = XY T, using tall matrices X and Y with iid Gaussian elements, we call this the random matrix setting. The MaCBetH algorithm is, however, non-parametric and does not use any prior knowledge about X and Y . The analysis we perform applies to the limit n →∞while m/n = α = O(1) and r = O(1). The matrix completion problem was popularized in [1] who proposed nuclear norm minimization as a convex relaxation of the problem. The algorithmic complexity of the associated semidefinite programming is, however, O(n2m2). A low complexity procedure to solve the problem was later proposed by [7] and is based on singular value decomposition (SVD). A considerable step towards theoretical understanding of matrix completion from few entries was made in [3] who proved that with the use of trimming the performance of SVD-based matrix completion can be improved and a RMSE proportional to p nr/|E| can be achieved. The algorithm of [3] is referred to as OptSpace, and empirically it achieves state-of-the-art RMSE in the regime of very few revealed entries. OptSpace proceeds in three steps [3]. First, one trims the observed matrix M by setting to zero all rows (resp. columns) with more revealed entries than twice the average number of revealed entries per row (resp. per column). Second, a singular value decompositions is performed on the matrix and only the first r components are kept. When the rank r is unknown it is estimated as the index for which the ratio between two consecutive singular values has a minimum. Third, a local minimization of the discrepancy between the observed entries and the estimate is performed. The initial condition for this minimization is given by the first r left and right singular vectors from the second step. In this work we improve upon OptSpace by replacing the first two steps by a different spectral procedure that detects the rank and provides a better initial condition for the discrepancy minimization. Our method leverages on recent progress made in the task of detecting communities in the stochastic block model [8, 5] with spectral methods. Both in community detection and matrix completion, traditional spectral methods fail in the very sparse regime due to the existence of spurious large eigenvalues (or singular values) corresponding to localized eigenvectors [8, 3]. The authors of [8, 5, 9] showed that using the non-backtracking matrix or the closely related Bethe Hessian as a basis for the spectral method in community detection provides reliable rank estimation and better inference performance. The present paper provides an analogous improvement for the matrix completion problem. In particular, we shall analyze the algorithm using tools from spin glass theory in statistical mechanics, and show that there exists a phase transition between a phase where it is able to detect the rank, and a phase where it is unable to do so. 2 2 Algorithm and motivation 2.1 The MaCBetH algorithm A standard approach to the completion problem (see e.g. [3]) is to minimize the cost function min X,Y X (ij)∈E [Mij −(XY T)ij]2 (2) over X ∈Rn×r and Y ∈Rm×r. This function is non-convex, and global optimization is hard. One therefore resorts to a local optimization technique with a careful choice of the initial conditions X0, Y0. In our method, given the matrix M, we consider a weighted bipartite undirected graph with adjacency matrix A ∈R(n+m)×(n+m) A = 0 M MT 0 . (3) We will refer to the graph thus defined as G. We now define the Bethe Hessian matrix H(β) ∈ R(n+m)×(n+m) to be the matrix with elements Hij(β) = 1 + X k∈∂i sinh2 βAik ! δij −1 2 sinh(2βAij) , (4) where β is a parameter that we will fix to a well-defined value βSG depending on the data, and ∂i stands for the neighbors of i in the graph G. Expression (4) corresponds to the matrix introduced in [5], applied to the case of graphical model (6). The MaCBetH algorithm that is the main subject of this paper is then, given the matrix A, which we assume to be centered: Algorithm (MaCBetH) 1. Numerically solve for the value of ˆβSG such that F(ˆβSG) = 1, where F(β) := 1 √nm X (i,j)∈E tanh2(βMij) . (5) 2. Build the Bethe Hessian H(ˆβSG) following eq. (4). 3. Compute all its negative eigenvalues λ1, · · · , λˆr and corresponding eigenvectors v1, · · · , vˆr. ˆr is our estimate for the rank r. Set X0 (resp. Y0) to be the first n lines (resp. the last m lines) of the matrix [v1 v2 · · · vˆr]. 4. Perform local optimization of the cost function (2) with rank ˆr and initial condition X0, Y0. In step 1, ˆβSG is an approximation of the optimal value of β, for which H(β) has a maximum number of negative eigenvalues (see section 3). Instead of this approximation, β can be chosen in such a way as to maximize the number of negative eigenvalues. We however observed numerically that the algorithm is robust to some imprecision on the value of ˆβSG. In step 2 we could also use the non-backtracking matrix weighted by tanh βMij, it was shown in [5] that the spectrum of the Bethe Hessian and the non-backtracking matrix are closely related. In the next section, we will motivate and analyze this algorithm (in the setting where Mtrue was generated from element-wise random X and Y ) and show that in this case MaCBetH is able to infer the rank whenever ϵ > ϵc. Fig. 1 illustrates the spectral properties of the Bethe Hessian that justify this algorithm: the spectrum is composed of a few informative negative eigenvalues, well separated from the bulk (which remains positive). In particular, as observed in [8, 5], it avoids the spurious eigenvalues with localized eigenvectors that make trimming necessary in the case of [3]. This algorithm is computationally efficient as it is based on the eigenvalue decomposition of a sparse, symmetric matrix. 2.2 Motivation from a Hopfield model We shall now motivate the construction of the MaCBetH algorithm from a graphical model perspective and a spectral relaxation. Given the observed matrix M from the previous section, we consider 3 the following graphical model P({s}, {t}) = 1 Z exp β X (i,j)∈E Mijsitj , (6) where the {si}1≤i≤n and {tj}1≤j≤m are binary variables, and β is a parameter controlling the strength of the interactions. This model is a (generalized) Hebbian Hopfield model on a bipartite sparse graph, and is therefore known to have r modes (up to symmetries) correlated with the lines of X and Y [10]. To study it, we can use the standard Bethe approximation which is widely believed to be exact for such problems on large random graphs [11, 12]. In this approximation the means E(si), E(tj) and moments E(sitj) of each variable are approximated by the parameters bi, cj and ξij that minimize the so-called Bethe free energy FBethe({bi}, {cj}, {ξij}) that reads FBethe({bi}, {cj}, {ξij}) = − X (i,j)∈E Mijξij + X (i,j)∈E X si,tj η 1 + bisi + cjtj + ξijsitj 4 + n X i=1 (1 −di) X si η 1 + bisi 2 + m X j=1 (1 −dj) X tj η 1 + cjtj 2 , (7) where η(x) := x ln x, and di, dj are the degrees of nodes i and j in the graph G. Neural network models such as eq. (6) have been extensively studied over the last decades (see e.g. [12, 13, 14, 15, 16] and references therein) and the phenomenology, that we shall review briefly here, is well known. In particular, for β small enough, the global minimum of the Bethe free energy corresponds to the so-called paramagnetic state ∀i, j, bi = cj = 0, ξij = tanh (βMij). (8) As we increase β, above a certain value βR, the model enters a retrieval phase, where the free energy has local minima correlated with the factors X and Y . There are r local minima, called retrieval states ({bl i}, {cl j}, {ξl ij}) indexed by l = 1, · · · , r such that, in the large n, m limit, ∀l = 1 · · · r, 1 n n X i=1 Xi,lbl i > 0, 1 m m X j=1 Yj,lcl j > 0 . (9) These retrieval states are therefore convenient initial conditions for the local optimization of eq. (2), and we expect their number to tell us the correct rank. Increasing β above a critical value βSG the system eventually enters a spin glass phase, marked by the appearance of many spurious minima. It would be tempting to continue the Bethe approach leading to belief propagation, but we shall instead consider a simpler spectral relaxation of the problem, following the same strategy as used in [5, 6] for graph clustering. First, we use the fact that the paramagnetic state (8) is always a stationary point of the Bethe free energy, for any value of β [17, 18]. In order to detect the retrieval states, we thus study its stability by looking for negative eigenvalues of the Hessian of the Bethe free energy evaluated at the paramagnetic state (8). At this point, the elements of the Hessian involving one derivative with respect to ξij vanish, while the block involving two such derivatives is a diagonal positive definite matrix [5, 17]. The remaining part is the matrix called Bethe Hessian in [5] (which however considers a different graphical model than (6)). Eigenvectors corresponding to its negative eigenvalues are thus expected to give an approximation of the retrieval states (9). The picture exposed in this section is summarized in Figure 1 and motivates the MaCBetH algorithm. Note that a similar approach was used in [16] to detect the retrieval states of a Hopfield model using the weighted non-backtracking matrix [8], which linearizes the belief propagation equations rather than the Bethe free energy, resulting in a larger, non-symmetric matrix. The Bethe Hessian, while mathematically closely related, is also simpler to handle in practice. 3 Analysis of performance in detection We now show how the performance of MaCBetH can be analyzed, and the spectral properties of the matrix characterized using both tools from statistical mechanics and rigorous arguments. 4 λ 0 5 10 15 20 25 ρ(λ) 0 0.04 0.08 0.12 0.16 0.2 β = 0.25 Direct diag BP λ 0 1 2 3 4 5 6 7 8 ρ(λ) 0 0.1 0.2 0.3 0.4 0.5 β = 0.12824 Direct diag BP λ -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 ρ(λ) 0 0.2 0.4 0.6 0.8 1 1.2 1.4 β = 0.05 Direct diag BP λ 0.2 0.4 0.6 0.8 1 1.2 ρ(λ) 0 1 2 3 4 5 6 7 β = 0.01 Direct diag BP 0.7 0.8 0.9 0 0.9 1.8 0 0.25 0.5 0 0.15 0.3 0 0.6 1.2 0 0.03 0.06 -0.5 0 0.5 0 0.09 0.18 Figure 1: Spectral density of the Bethe Hessian for various values of the parameter β. Red dots are the result of the direct diagonalisation of the Bethe Hessian for a rank r = 5 and n = m = 104 matrix, with ϵ = 15 revealed entries per row on average. The black curves are the solutions of (18) computed with belief propagation on a graph of size 105. We isolated the 5 smallest eigenvalues, represented as small bars for convenience, and the inset is a zoom around these smallest eigenvalues. For β small enough (top plots), the Bethe Hessian is positive definite, signaling that the paramagnetic state (8) is a local minimum of the Bethe free energy. As β increases, the spectrum is shifted towards the negative region and has 5 negative eigenvalues at the approximate value of ˆβSG = 0.12824 (to be compared to βR = 0.0832 for this case) evaluated by our algorithm (lower left plot). These eigenvalues, corresponding to the retrieval states (9), become positive and eventually merge in the bulk as β is further increased (lower right plot), while the bulk of uninformative eigenvalues remains at all values of β in the positive region. 3.1 Analysis of the phase transition We start by investigating the phase transition above which our spectral method will detect the correct rank. Let xp = (xl p)1≤l≤r, yp = (yl p)1≤l≤r be random vectors with the same empirical distribution as the lines of X and Y respectively. Using the statistical mechanics correspondence between the negative eigenvalues of the Bethe Hessian and the appearance of phase transitions in model (6), we can compute the values βR and βSG where instabilities towards, respectively, the retrieval states and the spurious glassy states, arise. We have repeated the computations of [13, 14, 15, 16] in the case of model (6), using the cavity method [12]. We refer the reader interested in the technical details of the statistical mechanics approach to neural networks to [14, 15, 16]. Following a standard computation for locating phase transitions in the Bethe approximation (see e.g. [12, 19]), the stability of the paramagnetic state (8) towards these two phases can be monitored in terms of the two following parameters: λ(β) = lim s→∞E h s Y p=1 tanh2 β r X l=1 xl pyl p tanh2 β r X l=1 xl p+1yl p i 1 2s , (10) µ(β) = lim s→∞E h s Y p=1 tanh β|x1 py1 p| + β r X l=2 xl pyl p tanh β|x1 p+1y1 p| + β r X l=2 xl p+1yl p i 1 2s , (11) where the expectation is over the distribution of the vectors xp, yp. The parameter λ(β) controls the sensitivity of the paramagnetic solution to random noise, while µ(β) measures its sensitivity to a perturbation in the direction of a retrieval state. βSG and βR are defined implicitly as ϵλ(βSG) = 1 and ϵµ(βR) = 1, i.e. the value beyond which the perturbation diverges. The existence of a retrieval phase is equivalent to the condition βSG > βR, so that there exists a range of values of β where the retrieval states exist, but not the spurious ones. If this condition is met, by setting β = βSG in our algorithm, we ensure the presence of meaningful negative eigenvalues of the Bethe Hessian. 5 We define the critical value of ϵ = ϵc such that βSG > βR if and only if ϵ > ϵc. In general, there is no closed-form formula for this critical value, which is defined implicitly in terms of the functions λ and µ. We thus computed ϵc numerically using a population dynamics algorithm [12] and the results for C(r) = ϵc/r are presented on Figure 2. Quite remarkably, with the definition ϵ = |E|/√nm, the critical value ϵc does not depend on the ratio m/n, only on the rank r. r 5 10 15 20 25 C(r) 0.9 1 1.1 1.2 1.3 1.4 1.5 C(r) C(r →∞) 1 + 0.812 r−3/4 Figure 2: Location of the critical value as a function of the rank r. MaCBetH is able to estimate the correct rank from |E| > C(r)r√nm known entries. We used a population dynamics algorithm with a population of size 106 to compute the functions λ and µ from (10,11). The dotted line is a fit suggesting that C(r) −1 = O(r−3/4). In the limit of large ϵ and r it is possible to obtain a simple closed-form formula. In this case the observed entries of the matrix become jointly Gaussian distributed, and uncorrelated, and therefore independent. Expression (10) then simplifies to λ(β) =r→∞E h tanh2 β r X l=1 xlyli . (12) Note that the MaCBetH algorithm uses an empirical estimator F(β) ≃ϵλ(β) (5) of this quantity to compute an approximation ˆβSG of βSG purely from the revealed entries. In the large r, ϵ regime, both βSG, βR decay to 0, so that we can further approximate 1 = ϵλ(βSG) ∼r→∞ϵrβ2 SGE[x2]E[y2] , (13) 1 = ϵµ(βR) ∼r→∞ϵβR p E[x2]E[y2] , (14) so that we reach the simple asymptotic expression, in the large ϵ, r limit, that ϵc = r, or equivalently C(r) = 1. Interestingly, this result was obtained as the detectability threshold in completion of rank r = O(n) matrices from O(n2) entries in the Bayes optimal setting in [20]. Notice, however, that exact completion in the setting of [20] is only possible for ϵ > r(m+n)/√nm: clearly detection and exact completion are different phenomena. The previous analysis can be extended beyond the random setting assumption, as long as the empirical distribution of the entries is well defined, and the lines of X (resp. Y ) are approximately orthogonal and centered. This condition is related to the standard incoherence property [1, 3]. 3.2 Computation of the spectral density In this section, we show how the spectral density of the Bethe Hessian can be computed analytically on tree-like graphs such as those generated by picking uniformly at random the observed entries of the matrix XY T. This further motivates our algorithm and in particular our choice of β = ˆβSG, independently of section 3. The spectral density is defined as ν(λ) = lim n,m→∞ 1 n + m n+m X i=1 δ(λ −λi) , (15) where the λi’s are the eigenvalues of the Bethe Hessian. Using again the cavity method, it can be shown [21] that the spectral density (in which potential delta peaks have been removed) is given by ν(λ) = lim n,m→∞ 1 π(n + m) n+m X i=1 Im∆i(λ) , (16) where the ∆i are complex variables living on the vertices of the graph G, which are given by: ∆i = −λ + 1 + X k∈∂i sinh2 βAik − X l∈∂i 1 4 sinh2(2βAil)∆l→i −1 , (17) where ∂i is the set of neighbors of i. The ∆i→j are the (linearly stable) solution of the following belief propagation recursion: ∆i→j = −λ + 1 + X k∈∂i sinh2 βAik − X l∈∂i\j 1 4 sinh2(2βAil)∆l→i −1 . (18) 6 ϵ 2 3 4 5 6 7 8 9 10 Mean inferred rank 0 0.5 1 1.5 2 2.5 3 Rank 3 n = m = 500 n = m = 2000 n = m = 8000 n = m = 16000 Transition ϵc ϵ 9 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 10 Rank 10 Figure 3: Mean inferred rank as a function of ϵ, for different sizes, averaged over 100 samples of n × m XY T matrices. The entries of X, Y are drawn from a Gaussian distribution of mean 0 and variance 1. The theoretical transition is computed with a population dynamics algorithm (see section 3.1). The finite size effects are considerable but consistent with the asymptotic prediction. This formula can be derived by turning the computation of the spectral density into a marginalization problem for a graphical model on the graph G and then solving it using loopy belief propagation. Quite remarkably, this approach leads to an asymptotically exact (and rigorous [22]) description of the spectral density on Erd˝os-Rényi random graphs. Solving equation (18) numerically we obtain the results shown on Fig. 1: the bulk of the spectrum, in particular, is always positive. We now demonstrate that for any value of β < βSG, there exists an open set around λ = 0 where the spectral density vanishes. This justifies independently or choice for the parameter β. The proof follows [5] and begins by noticing that ∆i→j = cosh−2(βAij) is a fixed point of the recursion (18) for λ = 0. Since this fixed point is real, the corresponding spectral density is 0. Now consider a small perturbation δij of this solution such that ∆i→j = cosh−2(βAij)(1 + cosh−2(βAij)δij). The linearized version of (18) writes δi→j = P l∈∂i\j tanh2(βAil)δi→l . The linear operator thus defined is a weighted version of the non-backtracking matrix of [8]. Its spectral radius is given by ρ = ϵλ(β), where λ is defined in 10. In particular, for β < βSG, ρ < 1, so that a straightforward application [5] of the implicit function theorem allows to show that there exists a neighborhood U of 0 such that for any λ ∈U, there exists a real, linearly stable fixed point of (18), yielding a spectral density equal to 0. At β = ˆβSG, the informative eigenvalues (those outside of the bulk), are therefore exactly the negative ones, which motivates independently our algorithm. 4 Numerical tests Figure 3 illustrates the ability of the Bethe Hessian to infer the rank above the critical value ϵc in the limit of large size n, m (see section 3.1). In Figure 4, we demonstrate the suitability of the eigenvectors of the Bethe Hessian as starting point for the minimization of the cost function (2). We compare the final RMSE achieved on the reconstructed matrix XY T with 4 other initializations of the optimization, including the largest singular vectors of the trimmed matrix M [3]. MaCBetH systematically outperforms all the other choices of initial conditions, providing a better initial condition for the optimization of (2). Remarkably, the performance achieved by MaCBetH with the inferred rank is essentially the same as the one achieved with an oracle rank. By contrast, estimating the correct rank from the (trimmed) SVD is more challenging. We note that for the choice of parameters we consider, trimming had a negligible effect. Along the same lines, OptSpace [3] uses a different minimization procedure, but from our tests we could not see any difference in performance due to that. When using Alternating Least Squares [23, 24] as optimization method, we also obtained a similar improvement in reconstruction by using the eigenvectors of the Bethe Hessian, instead of the singular vectors of M, as initial condition. 7 10 20 30 40 50 P(RMSE < 10−1) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Rank 3 Macbeth OR Tr-SVD OR Random OR Macbeth IR Tr-SVD IR ϵ 10 20 30 40 50 P(RMSE < 10−8) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 20 30 40 50 60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Rank 10 ϵ 10 20 30 40 50 60 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Figure 4: RMSE as a function of the number of revealed entries per row ϵ: comparison between different initializations for the optimization of the cost function (2). The top row shows the probability that the achieved RMSE is smaller than 10−1, while the bottom row shows the probability that the final RMSE is smaller than 10−8. The probabilities were estimated as the frequency of success over 100 samples of matrices XY T of size 10000 × 10000, with the entries of X, Y drawn from a Gaussian distribution of mean 0 and variance 1. All methods optimize the cost function (2) using a low storage BFGS algorithm [25] part of NLopt [26], starting from different initial conditions. The maximum number of iterations was set to 1000. The initial conditions compared are MaCBetH with oracle rank (MaCBetH OR) or inferred rank (MaCBetH IR), SVD of the observed matrix M after trimming, with oracle rank (Tr-SVD OR), or inferred rank (Tr-SVD IR, note that this is equivalent to OptSpace [3] in this regime), and random initial conditions with oracle rank (Random OR). For the Tr-SVD IR method, we inferred the rank from the SVD by looking for an index for which the ratio between two consecutive eigenvalues is minimized, as suggested in [27]. 5 Conclusion In this paper, we have presented MaCBetH, an algorithm for matrix completion that is efficient for two distinct, complementary, tasks: (i) it has the ability to estimate a finite rank r reliably from fewer random entries than other existing approaches, and (ii) it gives lower root-mean-square reconstruction errors than its competitors. The algorithm is built around the Bethe Hessian matrix and leverages both on recent progresses in the construction of efficient spectral methods for clustering of sparse networks [8, 5, 9], and on the OptSpace approach [3] for matrix completion. The method presented here offers a number of possible future directions, including replacing the minimization of the cost function by a message-passing type algorithm, the use of different neural network models, or a more theoretical direction involving the computation of information theoretically optimal transitions for detectability. Acknowledgment Our research has received funding from the European Research Council under the European Union’s 7th Framework Programme (FP/2007-2013/ERC Grant Agreement 307087-SPARCS). 8 References [1] E. J. Candès and B. Recht, “Exact matrix completion via convex optimization,” Foundations of Computational mathematics, vol. 9, no. 6, pp. 717–772, 2009. [2] E. J. Candès and T. Tao, “The power of convex relaxation: Near-optimal matrix completion,” Information Theory, IEEE Transactions on, vol. 56, no. 5, pp. 2053–2080, 2010. [3] R. H. Keshavan, A. Montanari, and S. Oh, “Matrix completion from a few entries,” Information Theory, IEEE Transactions on, vol. 56, no. 6, pp. 2980–2998, 2010. [4] D. Gross, Y.-K. Liu, S. T. Flammia, S. Becker, and J. Eisert, “Quantum state tomography via compressed sensing,” Physical review letters, vol. 105, no. 15, p. 150401, 2010. [5] A. Saade, F. Krzakala, and L. Zdeborová, “Spectral clustering of graphs with the bethe hessian,” in Advances in Neural Information Processing Systems, 2014, pp. 406–414. [6] A. Saade, F. Krzakala, M. Lelarge, and L. Zdeborová, “Spectral detection in the censored block model,” IEEE International Symposium on Information Theory (ISIT2015), to appear, 2015. [7] J.-F. Cai, E. J. Candès, and Z. Shen, “A singular value thresholding algorithm for matrix completion,” SIAM Journal on Optimization, vol. 20, no. 4, pp. 1956–1982, 2010. [8] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborová, and P. Zhang, “Spectral redemption in clustering sparse networks,” Proc. Natl. Acad. Sci., vol. 110, no. 52, pp. 20 935–20 940, 2013. [9] C. Bordenave, M. Lelarge, and L. Massoulié, “Non-backtracking spectrum of random graphs: community detection and non-regular ramanujan graphs,” 2015, arXiv:1501.06087. [10] J. J. Hopfield, “Neural networks and physical systems with emergent collective computational abilities,” Proc. Nat. Acad. Sci., vol. 79, no. 8, pp. 2554–2558, 1982. [11] J. S. Yedidia, W. T. Freeman, and Y. Weiss, “Bethe free energy, kikuchi approximations, and belief propagation algorithms,” Advances in neural information processing systems, vol. 13, 2001. [12] M. Mezard and A. Montanari, Information, Physics, and Computation. Oxford University Press, 2009. [13] D. J. Amit, H. Gutfreund, and H. Sompolinsky, “Spin-glass models of neural networks,” Physical Review A, vol. 32, no. 2, p. 1007, 1985. [14] B. Wemmenhove and A. Coolen, “Finite connectivity attractor neural networks,” Journal of Physics A: Mathematical and General, vol. 36, no. 37, p. 9617, 2003. [15] I. P. Castillo and N. Skantzos, “The little–hopfield model on a sparse random graph,” Journal of Physics A: Mathematical and General, vol. 37, no. 39, p. 9087, 2004. [16] P. Zhang, “Nonbacktracking operator for the ising model and its applications in systems with multiple states,” Physical Review E, vol. 91, no. 4, p. 042120, 2015. [17] J. M. Mooij and H. J. Kappen, “Validity estimates for loopy belief propagation on binary real-world networks.” in Advances in Neural Information Processing Systems, 2004, pp. 945–952. [18] F. Ricci-Tersenghi, “The bethe approximation for solving the inverse ising problem: a comparison with other inference methods,” J. Stat. Mech.: Th. and Exp., p. P08015, 2012. [19] L. Zdeborová, “Statistical physics of hard optimization problems,” acta physica slovaca, vol. 59, no. 3, pp. 169–303, 2009. [20] Y. Kabashima, F. Krzakala, M. Mézard, A. Sakata, and L. Zdeborová, “Phase transitions and sample complexity in bayes-optimal matrix factorization,” 2014, arXiv:1402.1298. [21] T. Rogers, I. P. Castillo, R. Kühn, and K. Takeda, “Cavity approach to the spectral density of sparse symmetric random matrices,” Phys. Rev. E, vol. 78, no. 3, p. 031116, 2008. [22] C. Bordenave and M. Lelarge, “Resolvent of large random graphs,” Random Structures and Algorithms, vol. 37, no. 3, pp. 332–352, 2010. [23] P. Jain, P. Netrapalli, and S. Sanghavi, “Low-rank matrix completion using alternating minimization,” in Proceedings of the forty-fifth annual ACM symposium on Theory of computing. ACM, 2013, pp. 665–674. [24] M. Hardt, “Understanding alternating minimization for matrix completion,” in Foundations of Computer Science (FOCS), 2014 IEEE 55th Annual Symposium on. IEEE, 2014, pp. 651–660. [25] D. C. Liu and J. Nocedal, “On the limited memory bfgs method for large scale optimization,” Mathematical programming, vol. 45, no. 1-3, pp. 503–528, 1989. [26] S. G. Johnson, “The nlopt nonlinear-optimization package,” 2014. [27] R. H. Keshavan, A. Montanari, and S. Oh, “Low-rank matrix completion with noisy observations: a quantitative comparison,” in 47th Annual Allerton Conference on Communication, Control, and Computing, 2009, pp. 1216–1222. 9 | 2015 | 263 |
5,773 | Large-scale probabilistic predictors with and without guarantees of validity Vladimir Vovk∗, Ivan Petej∗, and Valentina Fedorova† ∗Department of Computer Science, Royal Holloway, University of London, UK †Yandex, Moscow, Russia {volodya.vovk,ivan.petej,alushaf}@gmail.com Abstract This paper studies theoretically and empirically a method of turning machinelearning algorithms into probabilistic predictors that automatically enjoys a property of validity (perfect calibration) and is computationally efficient. The price to pay for perfect calibration is that these probabilistic predictors produce imprecise (in practice, almost precise for large data sets) probabilities. When these imprecise probabilities are merged into precise probabilities, the resulting predictors, while losing the theoretical property of perfect calibration, are consistently more accurate than the existing methods in empirical studies. 1 Introduction Prediction algorithms studied in this paper belong to the class of Venn–Abers predictors, introduced in [1]. They are based on the method of isotonic regression [2] and prompted by the observation that when applied in machine learning the method of isotonic regression often produces miscalibrated probability predictions (see, e.g., [3, 4]); it has also been reported ([5], Section 1) that isotonic regression is more prone to overfitting than Platt’s scaling [6] when data is scarce. The advantage of Venn–Abers predictors is that they are a special case of Venn predictors ([7], Chapter 6), and so ([7], Theorem 6.6) are always well-calibrated (cf. Proposition 1 below). They can be considered to be a regularized version of the procedure used by [8], which helps them resist overfitting. The main desiderata for Venn (and related conformal, [7], Chapter 2) predictors are validity, predictive efficiency, and computational efficiency. This paper introduces two computationally efficient versions of Venn–Abers predictors, which we refer to as inductive Venn–Abers predictors (IVAPs) and cross-Venn–Abers predictors (CVAPs). The ways in which they achieve the three desiderata are: • Validity (in the form of perfect calibration) is satisfied by IVAPs automatically, and the experimental results reported in this paper suggest that it is inherited by CVAPs. • Predictive efficiency is determined by the predictive efficiency of the underlying learning algorithms (so that the full arsenal of methods of modern machine learning can be brought to bear on the prediction problem at hand). • Computational efficiency is, again, determined by the computational efficiency of the underlying algorithm; the computational overhead of extracting probabilistic predictions consists of sorting (which takes time O(n log n), where n is the number of observations) and other computations taking time O(n). An advantage of Venn prediction over conformal prediction, which also enjoys validity guarantees, is that Venn predictors output probabilities rather than p-values, and probabilities, in the spirit of Bayesian decision theory, can be easily combined with utilities to produce optimal decisions. 1 In Sections 2 and 3 we discuss IVAPs and CVAPs, respectively. Section 4 is devoted to minimax ways of merging imprecise probabilities into precise probabilities and thus making IVAPs and CVAPs precise probabilistic predictors. In this paper we concentrate on binary classification problems, in which the objects to be classified are labelled as 0 or 1. Most of machine learning algorithms are scoring algorithms, in that they output a real-valued score for each test object, which is then compared with a threshold to arrive at a categorical prediction, 0 or 1. As precise probabilistic predictors, IVAPs and CVAPs are ways of converting the scores for test objects into numbers in the range [0, 1] that can serve as probabilities, or calibrating the scores. In Section 5 we briefly discuss two existing calibration methods, Platt’s [6] and the method [8] based on isotonic regression. Section 6 is devoted to experimental comparisons and shows that CVAPs consistently outperform the two existing methods (more extensive experimental studies can be found in [9]). 2 Inductive Venn–Abers predictors (IVAPs) In this paper we consider data sequences (usually loosely referred to as sets) consisting of observations z = (x, y), each observation consisting of an object x and a label y ∈{0, 1}; we only consider binary labels. We are given a training set whose size will be denoted l. This section introduces inductive Venn–Abers predictors. Our main concern is how to implement them efficiently, but as functions, an IVAP is defined in terms of a scoring algorithm (see the last paragraph of the previous section) as follows: • Divide the training set of size l into two subsets, the proper training set of size m and the calibration set of size k, so that l = m + k. • Train the scoring algorithm on the proper training set. • Find the scores s1, . . . , sk of the calibration objects x1, . . . , xk. • When a new test object x arrives, compute its score s. Fit isotonic regression to (s1, y1), . . . , (sk, yk), (s, 0) obtaining a function f0. Fit isotonic regression to (s1, y1), . . . , (sk, yk), (s, 1) obtaining a function f1. The multiprobability prediction for the label y of x is the pair (p0, p1) := (f0(s), f1(s)) (intuitively, the prediction is that the probability that y = 1 is either f0(s) or f1(s)). Notice that the multiprobability prediction (p0, p1) output by an IVAP always satisfies p0 < p1, and so p0 and p1 can be interpreted as the lower and upper probabilities, respectively; in practice, they are close to each other for large training sets. First we state formally the property of validity of IVAPs (adapting the approach of [1] to IVAPs). A random variable P taking values in [0, 1] is perfectly calibrated (as a predictor) for a random variable Y taking values in {0, 1} if E(Y | P) = P a.s. A selector is a random variable taking values in {0, 1}. As a general rule, in this paper random variables are denoted by capital letters (e.g., X are random objects and Y are random labels). Proposition 1. Let (P0, P1) be an IVAP’s prediction for X based on a training sequence (X1, Y1), . . . , (Xl, Yl). There is a selector S such that PS is perfectly calibrated for Y provided the random observations (X1, Y1), . . . , (Xl, Yl), (X, Y ) are i.i.d. Our next proposition concerns the computational efficiency of IVAPs; Proposition 1 will be proved later in this section while Proposition 2 is proved in [9]. Proposition 2. Given the scores s1, . . . , sk of the calibration objects, the prediction rule for computing the IVAP’s predictions can be computed in time O(k log k) and space O(k). Its application to each test object takes time O(log k). Given the sorted scores of the calibration objects, the prediction rule can be computed in time and space O(k). Proofs of both statements rely on the geometric representation of isotonic regression as the slope of the GCM (greatest convex minorant) of the CSD (cumulative sum diagram): see [10], pages 9–13 (especially Theorem 1.1). To make our exposition more self-contained, we define both GCM and CSD below. 2 First we explain how to fit isotonic regression to (s1, y1), . . . , (sk, yk) (without necessarily assuming that si are the calibration scores and yi are the calibration labels, which will be needed to cover the use of isotonic regression in IVAPs). We start from sorting all scores s1, . . . , sk in the increasing order and removing the duplicates. (This is the most computationally expensive step in our calibration procedure, O(k log k) in the worst case.) Let k′ ≤k be the number of distinct elements among s1, . . . , sk, i.e., the cardinality of the set {s1, . . . , sk}. Define s′ j, j = 1, . . . , k′, to be the jth smallest element of {s1, . . . , sk}, so that s′ 1 < s′ 2 < · · · < s′ k′. Define wj := i = 1, . . . , k : si = s′ j to be the number of times s′ j occurs among s1, . . . , sk. Finally, define y′ j := 1 wj X i=1,...,k:si=s′ j yi to be the average label corresponding to si = s′ j. The CSD of (s1, y1), . . . , (sk, yk) is the set of points Pi := i X j=1 wj, i X j=1 y′ jwj , i = 0, 1, . . . , k′; in particular, P0 = (0, 0). The GCM is the greatest convex minorant of the CSD. The value at s′ i, i = 1, . . . , k′, of the isotonic regression fitted to (s1, y1), . . . , (sk, yk) is defined to be the slope of the GCM between Pi−1 j=1 wj and Pi j=1 wj; the values at other s are somewhat arbitrary (namely, the value at s ∈(s′ i, s′ i+1) can be set to anything between the left and right slopes of the GCM at Pi j=1 wj) but are never needed in this paper (unlike in the standard use of isotonic regression in machine learning, [8]): e.g., f1(s) is the value of the isotonic regression fitted to a sequence that already contains (s, 1). Proof of Proposition 1. Set S := Y . The statement of the proposition even holds conditionally on knowing the values of (X1, Y1), . . . , (Xm, Ym) and the multiset *(Xm+1, Ym+1), . . . , (Xl, Yl), (X, Y )+; this knowledge allows us to compute the scores *s1, . . . , sk, s+ of the calibration objects Xm+1, . . . , Xl and the test object X. The only remaining randomness is over the equiprobable permutations of (Xm+1, Ym+1), . . . , (Xl, Yl), (X, Y ); in particular, (s, Y ) is drawn randomly from the multiset *(s1, Ym+1), . . . , (sk, Yl), (s, Y )+. It remains to notice that, according to the GCM construction, the average label of the calibration and test observations corresponding to a given value of PS is equal to PS. The idea behind computing the pair (f0(s), f1(s)) efficiently is to pre-compute two vectors F 0 and F 1 storing f0(s) and f1(s), respectively, for all possible values of s. Let k′ and s′ i be as defined above in the case where s1, . . . , sk are the calibration scores and y1, . . . , yk are the corresponding labels. The vectors F 0 and F 1 are of length k′, and for all i = 1, . . . , k′ and both ϵ ∈{0, 1}, F ϵ i is the value of fϵ(s) when s = s′ i. Therefore, for all i = 1, . . . , k′: • F 1 i is also the value of f1(s) when s is just to the left of s′ i; • F 0 i is also the value of f0(s) when s is just to the right of s′ i. Since f0 and f1 can change their values only at the points s′ i, the vectors F 0 and F 1 uniquely determine the functions f0 and f1, respectively. For details of computing F 0 and F 1, see [9]. Remark. There are several algorithms for performing isotonic regression on a partially, rather than linearly, ordered set: see, e.g., [10], Section 2.3 (although one of the algorithms described in that section, the Minimax Order Algorithm, was later shown to be defective [11, 12]). Therefore, IVAPs (and CVAPs below) can be defined in the situation where scores take values only in a partially ordered set; moreover, Proposition 1 will continue to hold. (For the reader familiar with the notion of Venn predictors we could also add that Venn–Abers predictors will continue to be Venn predictors, which follows from the isotonic regression being the average of the original function over certain equivalence classes.) The importance of partially ordered scores stems from the fact that they enable us to benefit from a possible “synergy” between two or more prediction algorithms 3 Algorithm 1 CVAP(T, x) // cross-Venn–Abers predictor for training set T 1: split the training set T into K folds T1, . . . , TK 2: for k ∈{1, . . . , K} 3: (pk 0, pk 1) := IVAP(T \ Tk, Tk, x) 4: return GM(p1)/(GM(1 −p0) + GM(p1)) [13]. Suppose, e.g., that one prediction algorithm outputs (scalar) scores s1 1, . . . , s1 k for the calibration objects x1, . . . , xk and another outputs s2 1, . . . , s2 k for the same calibration objects; we would like to use both sets of scores. We could merge the two sets of scores into composite vector scores, si := (s1 i , s2 i ), i = 1, . . . , k, and then classify a new object x as described earlier using its composite score s := (s1, s2), where s1 and s2 are the scalar scores computed by the two algorithms. Preliminary results reported in [13] in a related context suggest that the resulting predictor can outperform predictors based on the individual scalar scores. However, we will not pursue this idea further in this paper. 3 Cross Venn–Abers predictors (CVAPs) A CVAP is just a combination of K IVAPs, where K is the parameter of the algorithm. It is described as Algorithm 1, where IVAP(A, B, x) stands for the output of IVAP applied to A as proper training set, B as calibration set, and x as test object, and GM stands for geometric mean (so that GM(p1) is the geometric mean of p1 1, . . . , pK 1 and GM(1−p0) is the geometric mean of 1−p1 0, . . . , 1−pK 0 ). The folds should be of approximately equal size, and usually the training set is split into folds at random (although we choose contiguous folds in Section 6 to facilitate reproducibility). One way to obtain a random assignment of the training observations to folds (see line 1) is to start from a regular array in which the first l1 observations are assigned to fold 1, the following l2 observations are assigned to fold 2, up to the last lK observations which are assigned to fold K, where |lk −l/K| < 1 for all k, and then to apply a random permutation. Remember that the procedure RANDOMIZE-IN-PLACE ([14], Section 5.3) can do the last step in time O(l). See the next section for a justification of the expression GM(p1)/(GM(1 −p0) + GM(p1)) used for merging the IVAPs’ outputs. 4 Making probability predictions out of multiprobability ones In CVAP (Algorithm 1) we merge the K multiprobability predictions output by K IVAPs. In this section we design a minimax way for merging them, essentially following [1]. For the log-loss function the result is especially simple, GM(p1)/(GM(1 −p0) + GM(p1)). Let us check that GM(p1)/(GM(1 −p0) + GM(p1)) is indeed the minimax expression under log loss. Suppose the pairs of lower and upper probabilities to be merged are (p1 0, p1 1), . . . , (pK 0 , pK 1 ) and the merged probability is p. The extra cumulative loss suffered by p over the correct members p1 1, . . . , pK 1 of the pairs when the true label is 1 is log p1 1 p + · · · + log pK 1 p , (1) and the extra cumulative loss of p over the correct members of the pairs when the true label is 0 is log 1 −p1 0 1 −p + · · · + log 1 −pK 0 1 −p . (2) Equalizing the two expressions we obtain p1 1 · · · pK 1 pK = (1 −p1 0) · · · (1 −pK 0 ) (1 −p)K , which gives the required minimax expression for the merged probability (since (1) is decreasing and (2) is increasing in p). For the computations in the case of the Brier loss function, see [9]. 4 Notice that the argument above (“conditioned” on the proper training set) is also applicable to IVAP, in which case we need to set K := 1; the probability predictor obtained from an IVAP by replacing (p0, p1) with p := p1/(1 −p0 + p1) will be referred to as the log-minimax IVAP. (And CVAP is log-minimax by definition.) 5 Comparison with other calibration methods The two alternative calibration methods that we consider in this paper are Platt’s [6] and isotonic regression [8]. 5.1 Platt’s method Platt’s [6] method uses sigmoids to calibrate the scores. Platt uses a regularization procedure ensuring that the predictions of his method are always in the range 1 k−+ 2, k+ + 1 k+ + 2 , where k−is the number of calibration observations labelled 0 and k+ is the number of calibration observations labelled 1. It is interesting that the predictions output by the log-minimax IVAP are in the same range (except that the end-points are now allowed): see [9]. 5.2 Isotonic regression There are two standard uses of isotonic regression: we can train the scoring algorithm using what we call a proper training set, and then use the scores of the observations in a disjoint calibration (also called validation) set for calibrating the scores of test objects (as in [5]); alternatively, we can train the scoring algorithm on the full training set and also use the full training set for calibration (it appears that this was done in [8]). In both cases, however, we can expect to get an infinite log loss when the test set becomes large enough (see [9]). The presence of regularization is an advantage of Platt’s method: e.g., it never suffers an infinite loss when using the log loss function. There is no standard method of regularization for isotonic regression, and we do not apply one. 6 Empirical studies The main loss function (cf., e.g., [15]) that we use in our empirical studies is the log loss λlog(p, y) := −log p if y = 1 −log(1 −p) if y = 0, (3) where log is binary logarithm, p ∈[0, 1] is a probability prediction, and y ∈{0, 1} is the true label. Another popular loss function is the Brier loss λBr(p, y) := 4(y −p)2. (4) We choose the coefficient 4 in front of (y −p)2 in (4) and the base 2 of the logarithm in (3) in order for the minimax no-information predictor that always predicts p := 1/2 to suffer loss 1. An advantage of the Brier loss function is that it still makes it possible to compare the quality of prediction in cases when prediction algorithms (such as isotonic regression) give a categorical but wrong prediction (and so are simply regarded as infinitely bad when using log loss). The loss of a probability predictor on a test set will be measured by the arithmetic average of the losses it suffers on the test set, namely, by the mean log loss (MLL) and the mean Brier loss (MBL) MLL := 1 n n X i=1 λlog(pi, yi), MBL := 1 n n X i=1 λBr(pi, yi), (5) where yi are the test labels and pi are the probability predictions for them. We will not be checking directly whether various calibration methods produce well-calibrated predictions, since it is well 5 known that lack of calibration increases the loss as measured by loss functions such as log loss and Brier loss (see, e.g., [16] for the most standard decomposition of the latter into the sum of the calibration error and refinement error). In this section we compare log-minimax IVAPs (i.e., IVAPs whose outputs are replaced by probability predictions, as explained in Section 4) and CVAPs with Platt’s method [6] and the standard method [8] based on isotonic regression; the latter two will be referred to as “Platt” and “Isotonic” in our tables and figures. For both IVAPs and CVAPs we use the log-minimax procedure (the Brier-minimax procedure leads to virtually identical empirical results). We use the same underlying algorithms as in [1], namely J48 decision trees (abbreviated to “J48”), J48 decision trees with bagging (“J48 bagging”), logistic regression (sometimes abbreviated to “logistic”), na¨ıve Bayes, neural networks, and support vector machines (SVM), as implemented in Weka [17] (University of Waikato, New Zealand). The underlying algorithms (except for SVM) produce scores in the interval [0, 1], which can be used directly as probability predictions (referred to as “Underlying” in our tables and figures) or can be calibrated using the methods of [6, 8] or the methods proposed in this paper (“IVAP” or “CVAP” in the tables and figures). For illustrating our results in this paper we use the adult data set available from the UCI repository [18] (this is the main data set used in [6] and one of the data sets used in [8]); however, the picture that we observe is typical for other data sets as well (cf. [9]). We use the original split of the data set into a training set of Ntrain = 32, 561 observations and a test set of Ntest = 16, 281 observations. The results of applying the four calibration methods (including the vacuous one, corresponding to just using the underlying algorithm) to the six underlying algorithms for this data set are shown in Figure 1. The six top plots report results for the log loss (namely, MLL, as defined in (5)) and the six bottom plots for the Brier loss (namely, MBL). The underlying algorithms are given in the titles of the plots and the calibration methods are represented by different line styles, as explained in the legends. The horizontal axis is labelled by the ratio of the size of the proper training set to that of the calibration set (except for the label all, which will be explained later); in particular, in the case of CVAPs it is labelled by the number K −1 one less than the number of folds. In the case of CVAPs, the training set is split into K equal (or as close to being equal as possible) contiguous folds: the first ⌈Ntrain/K⌉training observations are included in the first fold, the next ⌈Ntrain/K⌉(or ⌊Ntrain/K⌋) in the second fold, etc. (first ⌈·⌉and then ⌊·⌋is used unless Ntrain is divisible by K). In the case of the other calibration methods, we used the first ⌈K−1 K Ntrain⌉training observation as the proper training set (used for training the scoring algorithm) and the rest of the training observations are used as the calibration set. In the case of log loss, isotonic regression often suffers infinite losses, which is indicated by the absence of the round marker for isotonic regression; e.g., all the log losses for SVM are infinite. We are not trying to use ad hoc solutions, such as clipping predictions to the interval [ϵ, 1−ϵ] for a small ϵ > 0, since we are also using the bounded Brier loss function. The CVAP lines tend to be at the bottom in all plots; experiments with other data sets also confirm this. The column all in the plots of Figure 1 refers to using the full training set as both the proper training set and calibration set. (In our official definition of IVAP we require that the last two sets be disjoint, but in this section we continue to refer to IVAPs modified in this way simply as IVAPs; in [1], such prediction algorithms were referred to as SVAPs, simplified Venn–Abers predictors.) Using the full training set as both the proper training set and calibration set might appear na¨ıve (and is never used in the extensive empirical study [5]), but it often leads to good empirical results on larger data sets. However, it can also lead to very poor results, as in the case of “J48 bagging” (for IVAP, Platt, and Isotonic), the underlying algorithm that achieves the best performance in Figure 1. A natural question is whether CVAPs perform better than the alternative calibration methods in Figure 1 (and our other experiments) because of applying cross-over (in moving from IVAP to CVAP) or because of the extra regularization used in IVAPs. The first reason is undoubtedly important for both loss functions and the second for the log loss function. The second reason plays a smaller role for Brier loss for relatively large data sets (in the lower half of Figure 1 the curve for Isotonic and IVAP are very close to each other), but IVAPs are consistently better for smaller data sets even when using Brier loss. In Tables 1 and 2 we apply the four calibration methods and six underlying algorithms to a much smaller training set, namely to the first 5, 000 observations of the adult data set as the new training set, following [5]; the first 4, 000 training observations are used as the proper training set, the following 1, 000 training observations as the calibration set, and all other observa6 1 2 3 4 all 0.490 0.495 0.500 0.505 SVM Platt Isotonic IVAP CVAP 1 2 3 4 all 0.486 0.488 0.490 0.492 0.494 0.496 logistic regression Underlying Isotonic IVAP CVAP 1 2 3 4 all 0.452 0.454 0.456 0.458 0.460 naive Bayes Isotonic IVAP CVAP 1 2 3 4 all 0.440 0.460 0.480 0.500 0.520 0.540 J48 Underlying Platt Isotonic IVAP CVAP 1 2 3 4 all 0.420 0.440 0.460 0.480 J48 bagging Underlying Platt Isotonic IVAP CVAP Log Loss 1 2 3 4 all 0.440 0.450 0.460 0.470 0.480 neural networks Underlying Platt Isotonic IVAP CVAP Student Version of MATLAB 1 2 3 4 all 0.430 0.432 0.434 0.436 0.438 SVM Platt Isotonic IVAP CVAP 1 2 3 4 all 0.4285 0.4290 0.4295 0.4300 0.4305 0.4310 logistic regression Underlying Isotonic IVAP CVAP 1 2 3 4 all 0.400 0.420 0.440 0.460 naive Bayes Underlying Platt Isotonic IVAP CVAP 1 2 3 4 all 0.380 0.390 0.400 0.410 0.420 0.430 J48 Underlying Platt Isotonic IVAP CVAP 1 2 3 4 all 0.360 0.370 0.380 0.390 0.400 J48 bagging Underlying Platt Isotonic IVAP CVAP Brier Loss 1 2 3 4 all 0.390 0.400 0.410 0.420 neural networks Underlying Platt Isotonic IVAP CVAP Student Version of MATLAB Figure 1: The log and Brier losses of the four calibration methods applied to the six prediction algorithms on the adult data set. The numbers on the horizontal axis are ratios m/k of the size of the proper training set to the size of the calibration set; in the case of CVAPs, they can also be expressed as K−1, where K is the number of folds (therefore, column 4 corresponds to the standard choice of 5 folds in the method of cross-validation). Missing curves or points on curves mean that the corresponding values either are too big and would squeeze unacceptably the interesting parts of the plot if shown or are infinite (such as many results for isotonic regression and J48 for log loss). tions (the remaining training and all test observations) are used as the new test set. The results are shown in Tables 1 for log loss and 2 for Brier loss. They are consistently better for IVAP than for IR (isotonic regression). Results for nine very small data sets are given in Tables 1 and 2 of [1], where the results for IVAP (with the full training set used as both proper training and calibration sets, labelled “SVA” in the tables in [1]) are consistently (in 52 cases out of the 54 using Brier loss) better, usually significantly better, than for isotonic regression (referred to as DIR in the tables in [1]). The following information might help the reader in reproducing our results (in addition to our code being publicly available [9]). For each of the standard prediction algorithms within Weka that we use, we optimise the parameters by minimising the Brier loss on the calibration set, apart from the column labelled all. (We cannot use the log loss since it is often infinite in the case of isotonic regression.) We then use the trained algorithm to generate the scores for the calibration and test sets, which allows us to compute probability predictions using Platt’s method, isotonic regression, IVAP, 7 Table 1: The log loss for the four calibration methods and six underlying algorithms for a small subset of the adult data set algorithm Platt IR IVAP CVAP J48 0.5226 ∞ 0.5117 0.5102 J48 bagging 0.4949 ∞ 0.4733 0.4602 logistic 0.5111 ∞ 0.4981 0.4948 na¨ıve Bayes 0.5534 ∞ 0.4839 0.4747 neural networks 0.5175 ∞ 0.5023 0.4805 SVM 0.5221 ∞ 0.5015 0.4997 Table 2: The analogue of Table 1 for the Brier loss algorithm Platt IR IVAP CVAP J48 0.4463 0.4378 0.4370 0.4368 J48 bagging 0.4225 0.4153 0.4123 0.3990 logistic 0.4470 0.4417 0.4377 0.4342 na¨ıve Bayes 0.4670 0.4329 0.4311 0.4227 neural networks 0.4525 0.4574 0.4440 0.4234 SVM 0.4550 0.4450 0.4408 0.4375 and CVAP. All the scores apart from SVM are already in the [0, 1] range and can be used as probability predictions. Most of the parameters are set to their default values, and the only parameters that are optimised are C (pruning confidence) for J48 and J48 bagging, R (ridge) for logistic regression, L (learning rate) and M (momentum) for neural networks (MultilayerPerceptron), and C (complexity constant) for SVM (SMO, with the linear kernel); na¨ıve Bayes does not involve any parameters. Notice that none of these parameters are “hyperparameters”, in that they do not control the flexibility of the fitted prediction rule directly; this allows us to optimize the parameters on the training set for the all column. In the case of CVAPs, we optimise the parameters by minimising the cumulative Brier loss over all folds (so that the same parameters are used for all folds). To apply Platt’s method to calibrate the scores generated by the underlying algorithms we use logistic regression, namely the function mnrfit within MATLAB’s Statistics toolbox. For isotonic regression calibration we use the implementation of the PAVA in the R package fdrtool (namely, the function monoreg). For further experimental results, see [9]. 7 Conclusion This paper introduces two new algorithms for probabilistic prediction, IVAP, which can be regarded as a regularised form of the calibration method based on isotonic regression, and CVAP, which is built on top of IVAP using the idea of cross-validation. Whereas IVAPs are automatically perfectly calibrated, the advantage of CVAPs is in their good empirical performance. This paper does not study empirically upper and lower probabilities produced by IVAPs and CVAPs, whereas the distance between them provides information about the reliability of the merged probability prediction. Finding interesting ways of using this extra information is one of the directions of further research. Acknowledgments We are grateful to the conference reviewers for numerous helpful comments and observations, to Vladimir Vapnik for sharing his ideas about exploiting synergy between different learning algorithms, and to participants of the conference Machine Learning: Prospects and Applications (October 2015, Berlin) for their questions and comments. The first author has been partially supported by EPSRC (grant EP/K033344/1) and AFOSR (grant “Semantic Completions”). The second and third authors are grateful to their home institutions for funding their trips to Montr´eal. 8 References [1] Vladimir Vovk and Ivan Petej. Venn–Abers predictors. In Nevin L. Zhang and Jin Tian, editors, Proceedings of the Thirtieth Conference on Uncertainty in Artificial Intelligence, pages 829– 838, Corvallis, OR, 2014. AUAI Press. [2] Miriam Ayer, H. Daniel Brunk, George M. Ewing, W. T. Reid, and Edward Silverman. An empirical distribution function for sampling with incomplete information. Annals of Mathematical Statistics, 26:641–647, 1955. [3] Xiaoqian Jiang, Melanie Osl, Jihoon Kim, and Lucila Ohno-Machado. Smooth isotonic regression: a new method to calibrate predictive models. AMIA Summits on Translational Science Proceedings, 2011:16–20, 2011. [4] Antonis Lambrou, Harris Papadopoulos, Ilia Nouretdinov, and Alex Gammerman. Reliable probability estimates based on support vector machines for large multiclass datasets. In Lazaros Iliadis, Ilias Maglogiannis, Harris Papadopoulos, Kostas Karatzas, and Spyros Sioutas, editors, Proceedings of the AIAI 2012 Workshop on Conformal Prediction and its Applications, volume 382 of IFIP Advances in Information and Communication Technology, pages 182–191, Berlin, 2012. Springer. [5] Rich Caruana and Alexandru Niculescu-Mizil. An empirical comparison of supervised learning algorithms. In Proceedings of the Twenty Third International Conference on Machine Learning, pages 161–168, New York, 2006. ACM. [6] John C. Platt. Probabilities for SV machines. In Alexander J. Smola, Peter L. Bartlett, Bernhard Sch¨olkopf, and Dale Schuurmans, editors, Advances in Large Margin Classifiers, pages 61–74. MIT Press, 2000. [7] Vladimir Vovk, Alex Gammerman, and Glenn Shafer. Algorithmic Learning in a Random World. Springer, New York, 2005. [8] Bianca Zadrozny and Charles Elkan. Obtaining calibrated probability estimates from decision trees and naive Bayesian classifiers. In Carla E. Brodley and Andrea P. Danyluk, editors, Proceedings of the Eighteenth International Conference on Machine Learning, pages 609– 616, San Francisco, CA, 2001. Morgan Kaufmann. [9] Vladimir Vovk, Ivan Petej, and Valentina Fedorova. Large-scale probabilistic predictors with and without guarantees of validity. Technical report, arXiv.org e-Print archive, November 2015. A full version of this paper. [10] Richard E. Barlow, D. J. Bartholomew, J. M. Bremner, and H. Daniel Brunk. Statistical Inference under Order Restrictions: The Theory and Application of Isotonic Regression. Wiley, London, 1972. [11] Chu-In Charles Lee. The Min-Max algorithm and isotonic regression. Annals of Statistics, 11:467–477, 1983. [12] Gordon D. Murray. Nonconvergence of the minimax order algorithm. Biometrika, 70:490–491, 1983. [13] Vladimir N. Vapnik. Intelligent learning: Similarity control and knowledge transfer. Talk at the 2015 Yandex School of Data Analysis Conference Machine Learning: Prospects and Applications, 6 October 2015, Berlin. [14] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. MIT Press, Cambridge, MA, third edition, 2009. [15] Vladimir Vovk. The fundamental nature of the log loss function. In Lev D. Beklemishev, Andreas Blass, Nachum Dershowitz, Berndt Finkbeiner, and Wolfram Schulte, editors, Fields of Logic and Computation II: Essays Dedicated to Yuri Gurevich on the Occasion of His 75th Birthday, volume 9300 of Lecture Notes in Computer Science, pages 307–318, Cham, 2015. Springer. [16] Allan H. Murphy. A new vector partition of the probability score. Journal of Applied Meteorology, 12:595–600, 1973. [17] Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, and Ian H. Witten. The WEKA data mining software: an update. SIGKDD Explorations, 11:10–18, 2011. [18] A. Frank and A. Asuncion. UCI machine learning repository, 2015. 9 | 2015 | 264 |
5,774 | Learning with a Wasserstein Loss Charlie Frogner⇤ Chiyuan Zhang⇤ Center for Brains, Minds and Machines Massachusetts Institute of Technology frogner@mit.edu, chiyuan@mit.edu Hossein Mobahi CSAIL Massachusetts Institute of Technology hmobahi@csail.mit.edu Mauricio Araya-Polo Shell International E & P, Inc. Mauricio.Araya@shell.com Tomaso Poggio Center for Brains, Minds and Machines Massachusetts Institute of Technology tp@ai.mit.edu Abstract Learning to predict multi-label outputs is challenging, but in many problems there is a natural metric on the outputs that can be used to improve predictions. In this paper we develop a loss function for multi-label learning, based on the Wasserstein distance. The Wasserstein distance provides a natural notion of dissimilarity for probability measures. Although optimizing with respect to the exact Wasserstein distance is costly, recent work has described a regularized approximation that is efficiently computed. We describe an efficient learning algorithm based on this regularization, as well as a novel extension of the Wasserstein distance from probability measures to unnormalized measures. We also describe a statistical learning bound for the loss. The Wasserstein loss can encourage smoothness of the predictions with respect to a chosen metric on the output space. We demonstrate this property on a real-data tag prediction problem, using the Yahoo Flickr Creative Commons dataset, outperforming a baseline that doesn’t use the metric. 1 Introduction We consider the problem of learning to predict a non-negative measure over a finite set. This problem includes many common machine learning scenarios. In multiclass classification, for example, one often predicts a vector of scores or probabilities for the classes. And in semantic segmentation [1], one can model the segmentation as being the support of a measure defined over the pixel locations. Many problems in which the output of the learning machine is both non-negative and multi-dimensional might be cast as predicting a measure. We specifically focus on problems in which the output space has a natural metric or similarity structure, which is known (or estimated) a priori. In practice, many learning problems have such structure. In the ImageNet Large Scale Visual Recognition Challenge [ILSVRC] [2], for example, the output dimensions correspond to 1000 object categories that have inherent semantic relationships, some of which are captured in the WordNet hierarchy that accompanies the categories. Similarly, in the keyword spotting task from the IARPA Babel speech recognition project, the outputs correspond to keywords that likewise have semantic relationships. In what follows, we will call the similarity structure on the label space the ground metric or semantic similarity. Using the ground metric, we can measure prediction performance in a way that is sensitive to relationships between the different output dimensions. For example, confusing dogs with cats might ⇤Authors contributed equally. 1Code and data are available at http://cbcl.mit.edu/wasserstein. 1 3 4 5 6 7 Grid Size 0.0 0.1 0.2 0.3 Distance Divergence Wasserstein 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Noise 0.1 0.2 0.3 0.4 Distance Divergence Wasserstein Figure 2: The Wasserstein loss encourages predictions that are similar to ground truth, robustly to incorrect labeling of similar classes (see Appendix E.1). Shown is Euclidean distance between prediction and ground truth vs. (left) number of classes, averaged over different noise levels and (right) noise level, averaged over number of classes. Baseline is the multiclass logistic loss. be more severe an error than confusing breeds of dogs. A loss function that incorporates this metric might encourage the learning algorithm to favor predictions that are, if not completely accurate, at least semantically similar to the ground truth. In this paper, we develop a loss function for multi-label learnSiberian husky Eskimo dog Figure 1: Semantically nearequivalent classes in ILSVRC ing that measures the Wasserstein distance between a prediction and the target label, with respect to a chosen metric on the output space. The Wasserstein distance is defined as the cost of the optimal transport plan for moving the mass in the predicted measure to match that in the target, and has been applied to a wide range of problems, including barycenter estimation [3], label propagation [4], and clustering [5]. To our knowledge, this paper represents the first use of the Wasserstein distance as a loss for supervised learning. We briefly describe a case in which the Wasserstein loss improves learning performance. The setting is a multiclass classification problem in which label noise arises from confusion of semantically near-equivalent categories. Figure 1 shows such a case from the ILSVRC, in which the categories Siberian husky and Eskimo dog are nearly indistinguishable. We synthesize a toy version of this problem by identifying categories with points in the Euclidean plane and randomly switching the training labels to nearby classes. The Wasserstein loss yields predictions that are closer to the ground truth, robustly across all noise levels, as shown in Figure 2. The standard multiclass logistic loss is the baseline for comparison. Section E.1 in the Appendix describes the experiment in more detail. The main contributions of this paper are as follows. We formulate the problem of learning with prior knowledge of the ground metric, and propose the Wasserstein loss as an alternative to traditional information divergence-based loss functions. Specifically, we focus on empirical risk minimization (ERM) with the Wasserstein loss, and describe an efficient learning algorithm based on entropic regularization of the optimal transport problem. We also describe a novel extension to unnormalized measures that is similarly efficient to compute. We then justify ERM with the Wasserstein loss by showing a statistical learning bound. Finally, we evaluate the proposed loss on both synthetic examples and a real-world image annotation problem, demonstrating benefits for incorporating an output metric into the loss. 2 Related work Decomposable loss functions like KL Divergence and `p distances are very popular for probabilistic [1] or vector-valued [6] predictions, as each component can be evaluated independently, often leading to simple and efficient algorithms. The idea of exploiting smoothness in the label space according to a prior metric has been explored in many different forms, including regularization [7] and post-processing with graphical models [8]. Optimal transport provides a natural distance for probability distributions over metric spaces. In [3, 9], the optimal transport is used to formulate the Wasserstein barycenter as a probability distribution with minimum total Wasserstein distance to a set of given points on the probability simplex. [4] propagates histogram values on a graph by minimizing a Dirichlet energy induced by optimal transport. The Wasserstein distance is also used to formulate a metric for comparing clusters in [5], and is applied to image retrieval [10], contour 2 matching [11], and many other problems [12, 13]. However, to our knowledge, this is the first time it is used as a loss function in a discriminative learning framework. The closest work to this paper is a theoretical study [14] of an estimator that minimizes the optimal transport cost between the empirical distribution and the estimated distribution in the setting of statistical parameter estimation. 3 Learning with a Wasserstein loss 3.1 Problem setup and notation We consider the problem of learning a map from X ⇢RD into the space Y = RK + of measures over a finite set K of size |K| = K. Assume K possesses a metric dK(·, ·), which is called the ground metric. dK measures semantic similarity between dimensions of the output, which correspond to the elements of K. We perform learning over a hypothesis space H of predictors h✓: X ! Y, parameterized by ✓2 ⇥. These might be linear logistic regression models, for example. In the standard statistical learning setting, we get an i.i.d. sequence of training examples S = ((x1, y1), . . . , (xN, yN)), sampled from an unknown joint distribution PX⇥Y. Given a measure of performance (a.k.a. risk) E(·, ·), the goal is to find the predictor h✓2 H that minimizes the expected risk E[E(h✓(x), y)]. Typically E(·, ·) is difficult to optimize directly and the joint distribution PX⇥Y is unknown, so learning is performed via empirical risk minimization. Specifically, we solve min h✓2H ( ˆES[`(h✓(x), y) = 1 N N X i=1 `(h✓(xi), yi) ) (1) with a loss function `(·, ·) acting as a surrogate of E(·, ·). 3.2 Optimal transport and the exact Wasserstein loss Information divergence-based loss functions are widely used in learning with probability-valued outputs. Along with other popular measures like Hellinger distance and χ2 distance, these divergences treat the output dimensions independently, ignoring any metric structure on K. Given a cost function c : K ⇥K ! R, the optimal transport distance [15] measures the cheapest way to transport the mass in probability measure µ1 to match that in µ2: Wc(µ1, µ2) = inf γ2⇧(µ1,µ2) Z K⇥K c(1, 2)γ(d1, d2) (2) where ⇧(µ1, µ2) is the set of joint probability measures on K⇥K having µ1 and µ2 as marginals. An important case is that in which the cost is given by a metric dK(·, ·) or its p-th power dp K(·, ·) with p ≥ 1. In this case, (2) is called a Wasserstein distance [16], also known as the earth mover’s distance [10]. In this paper, we only work with discrete measures. In the case of probability measures, these are histograms in the simplex ∆K. When the ground truth y and the output of h both lie in the simplex ∆K, we can define a Wasserstein loss. Definition 3.1 (Exact Wasserstein Loss). For any h✓2 H, h✓: X ! ∆K, let h✓(|x) = h✓(x)be the predicted value at element 2 K, given input x 2 X. Let y() be the ground truth value for given by the corresponding label y. Then we define the exact Wasserstein loss as W p p (h(·|x), y(·)) = inf T 2⇧(h(x),y)hT, Mi (3) where M 2 RK⇥K + is the distance matrix M,0 = dp K(, 0), and the set of valid transport plans is ⇧(h(x), y) = {T 2 RK⇥K + : T1 = h(x), T >1 = y} (4) where 1 is the all-one vector. W p p is the cost of the optimal plan for transporting the predicted mass distribution h(x) to match the target distribution y. The penalty increases as more mass is transported over longer distances, according to the ground metric M. 3 Algorithm 1 Gradient of the Wasserstein loss Given h(x), y, λ, K. (γa, γb if h(x), y unnormalized.) u 1 while u has not converged do u 8 > < > : h(x) ↵ ) K ) y ↵K>u ** if h(x), y normalized h(x) γaλ γaλ+1 ↵ ✓ K ) y ↵K>u * γbλ γbλ+1 ◆ γaλ γaλ+1 if h(x), y unnormalized end while If h(x), y unnormalized: v y γbλ γbλ+1 ↵ ) K>u * γbλ γbλ+1 @W p p /@h(x) ⇢ log u λ −log u>1 λK 1 if h(x), y normalized γa (1 −(diag(u)Kv) ↵h(x)) if h(x), y unnormalized 4 Efficient optimization via entropic regularization To do learning, we optimize the empirical risk minimization functional (1) by gradient descent. Doing so requires evaluating a descent direction for the loss, with respect to the predictions h(x). Unfortunately, computing a subgradient of the exact Wasserstein loss (3), is quite costly, as follows. The exact Wasserstein loss (3) is a linear program and a subgradient of its solution can be computed using Lagrange duality. The dual LP of (3) is dW p p (h(x), y) = sup ↵,β2CM ↵>h(x) + β>y, CM = {(↵, β) 2 RK⇥K : ↵+ β0 M,0}. (5) As (3) is a linear program, at an optimum the values of the dual and the primal are equal (see, e.g. [17]), hence the dual optimal ↵is a subgradient of the loss with respect to its first argument. Computing ↵is costly, as it entails solving a linear program with O(K2) contraints, with K being the dimension of the output space. This cost can be prohibitive when optimizing by gradient descent. 4.1 Entropic regularization of optimal transport Cuturi [18] proposes a smoothed transport objective that enables efficient approximation of both the transport matrix in (3) and the subgradient of the loss. [18] introduces an entropic regularization term that results in a strictly convex problem: λW p p (h(·|x), y(·)) = inf T 2⇧(h(x),y)hT, Mi −1 λH(T), H(T) = − X ,0 T,0 log T,0. (6) Importantly, the transport matrix that solves (6) is a diagonal scaling of a matrix K = e−λM−1: T ⇤= diag(u)Kdiag(v) (7) for u = eλ↵and v = eλβ, where ↵and β are the Lagrange dual variables for (6). Identifying such a matrix subject to equality constraints on the row and column sums is exactly a matrix balancing problem, which is well-studied in numerical linear algebra and for which efficient iterative algorithms exist [19]. [18] and [3] use the well-known Sinkhorn-Knopp algorithm. 4.2 Extending smoothed transport to the learning setting When the output vectors h(x) and y lie in the simplex, (6) can be used directly in place of (3), as (6) can approximate the exact Wasserstein distance closely for large enough λ [18]. In this case, the gradient ↵of the objective can be obtained from the optimal scaling vector u as ↵= log u λ −log u>1 λK 1. 1 A Sinkhorn iteration for the gradient is given in Algorithm 1. 1Note that ↵is only defined up to a constant shift: any upscaling of the vector u can be paired with a corresponding downscaling of the vector v (and vice versa) without altering the matrix T ⇤. The choice ↵= log u λ −log u>1 λK 1 ensures that ↵is tangent to the simplex. 4 (a) Convergence to smoothed transport. (b) Approximation of exact Wasserstein. (c) Convergence of alternating projections (λ = 50). Figure 3: The relaxed transport problem (8) for unnormalized measures. For many learning problems, however, a normalized output assumption is unnatural. In image segmentation, for example, the target shape is not naturally represented as a histogram. And even when the prediction and the ground truth are constrained to the simplex, the observed label can be subject to noise that violates the constraint. There is more than one way to generalize optimal transport to unnormalized measures, and this is a subject of active study [20]. We will develop here a novel objective that deals effectively with the difference in total mass between h(x) and y while still being efficient to optimize. 4.3 Relaxed transport We propose a novel relaxation that extends smoothed transport to unnormalized measures. By replacing the equality constraints on the transport marginals in (6) with soft penalties with respect to KL divergence, we get an unconstrained approximate transport problem. The resulting objective is: λ,γa,γbWKL(h(·|x), y(·)) = min T 2RK⇥K + hT, Mi−1 λH(T)+γa f KL (T1kh(x))+γb f KL ) T >1ky * (8) where f KL (wkz) = w> log(w ↵z) −1>w + 1>z is the generalized KL divergence between w, z 2 RK + . Here ↵represents element-wise division. As with the previous formulation, the optimal transport matrix with respect to (8) is a diagonal scaling of the matrix K. Proposition 4.1. The transport matrix T ⇤optimizing (8) satisfies T ⇤= diag(u)Kdiag(v), where u = (h(x) ↵T ⇤1)γaλ, v = ) y ↵(T ⇤)>1 *γbλ, and K = e−λM−1. And the optimal transport matrix is a fixed point for a Sinkhorn-like iteration. 2 Proposition 4.2. T ⇤= diag(u)Kdiag(v) optimizing (8) satisfies: i) u = h(x) γaλ γaλ+1 ⊙(Kv)− γaλ γaλ+1 , and ii) v = y γbλ γbλ+1 ⊙ ) K>u *− γbλ γbλ+1 , where ⊙represents element-wise multiplication. Unlike the previous formulation, (8) is unconstrained with respect to h(x). The gradient is given by rh(x)WKL(h(·|x), y(·)) = γa (1 −T ⇤1 ↵h(x)). The iteration is given in Algorithm 1. When restricted to normalized measures, the relaxed problem (8) approximates smoothed transport (6). Figure 3a shows, for normalized h(x) and y, the relative distance between the values of (8) and (6) 3. For λ large enough, (8) converges to (6) as γa and γb increase. (8) also retains two properties of smoothed transport (6). Figure 3b shows that, for normalized outputs, the relaxed loss converges to the unregularized Wasserstein distance as λ, γa and γb increase 4. And Figure 3c shows that convergence of the iterations in (4.2) is nearly independent of the dimension K of the output space. 2Note that, although the iteration suggested by Proposition 4.2 is observed empirically to converge (see Figure 3c, for example), we have not proven a guarantee that it will do so. 3In figures 3a-c, h(x), y and M are generated as described in [18] section 5. In 3a-b, h(x) and y have dimension 256. In 3c, convergence is defined as in [18]. Shaded regions are 95% intervals. 4The unregularized Wasserstein distance was computed using FastEMD [21]. 5 0 1 2 3 4 p-th norm 0.08 0.10 0.12 0.14 0.16 0.18 0.20 Posterior Probability 0 1 2 3 (a) Posterior predictions for images of digit 0. 0 1 2 3 4 p-th norm 0.08 0.10 0.12 0.14 0.16 0.18 0.20 Posterior Probability 2 3 4 5 6 (b) Posterior predictions for images of digit 4. Figure 4: MNIST example. Each curve shows the predicted probability for one digit, for models trained with different p values for the ground metric. 5 Statistical Properties of the Wasserstein loss Let S = ((x1, y1), . . . , (xN, yN)) be i.i.d. samples and hˆ✓be the empirical risk minimizer hˆ✓= argmin h✓2H ( ˆES ⇥ W p p (h✓(·|x), y) ⇤ = 1 N N X i=1 W p p (hx✓(·|xi), yi) ) . Further assume H = s ◦Ho is the composition of a softmax s and a base hypothesis space Ho of functions mapping into RK. The softmax layer outputs a prediction that lies in the simplex ∆K. Theorem 5.1. For p = 1, and any δ > 0, with probability at least 1 −δ, it holds that E ⇥ W 1 1 (hˆ✓(·|x), y) ⇤ inf h✓2H E ⇥ W 1 1 (h✓(·|x), y) ⇤ + 32KCMRN(Ho) + 2CM r log(1/δ) 2N (9) with the constant CM = max,0 M,0. RN(Ho) is the Rademacher complexity [22] measuring the complexity of the hypothesis space Ho. The Rademacher complexity RN(Ho) for commonly used models like neural networks and kernel machines [22] decays with the training set size. This theorem guarantees that the expected Wasserstein loss of the empirical risk minimizer approaches the best achievable loss for H. As an important special case, minimizing the empirical risk with Wasserstein loss is also good for multiclass classification. Let y = be the “one-hot” encoded label vector for the groundtruth class. Proposition 5.2. In the multiclass classification setting, for p = 1 and any δ > 0, with probability at least 1 −δ, it holds that Ex, ⇥ dK(ˆ✓(x), ) ⇤ inf h✓2H KE[W 1 1 (h✓(x), y)]+32K2CMRN(Ho)+2CMK r log(1/δ) 2N (10) where the predictor is ˆ✓(x) = argmaxhˆ✓(|x), with hˆ✓being the empirical risk minimizer. Note that instead of the classification error Ex,[ {ˆ✓(x) 6= }], we actually get a bound on the expected semantic distance between the prediction and the groundtruth. 6 Empirical study 6.1 Impact of the ground metric In this section, we show that the Wasserstein loss encourages smoothness with respect to an artificial metric on the MNIST handwritten digit dataset. This is a multi-class classification problem with output dimensions corresponding to the 10 digits, and we apply a ground metric dp(, 0) = |− 0|p, where , 0 2 {0, . . . , 9} and p 2 [0, 1). This metric encourages the recognized digit to be numerically close to the true one. We train a model independently for each value of p and plot the average predicted probabilities of the different digits on the test set in Figure 4. 6 5 10 15 20 K (# of proposed tags) 0.70 0.75 0.80 0.85 0.90 0.95 1.00 top-K Cost Loss Function Divergence Wasserstein (↵=0.5) Wasserstein (↵=0.3) Wasserstein (↵=0.1) (a) Original Flickr tags dataset. 5 10 15 20 K (# of proposed tags) 0.70 0.75 0.80 0.85 0.90 0.95 1.00 top-K Cost Loss Function Divergence Wasserstein (↵=0.5) Wasserstein (↵=0.3) Wasserstein (↵=0.1) (b) Reduced-redundancy Flickr tags dataset. Figure 5: Top-K cost comparison of the proposed loss (Wasserstein) and the baseline (Divergence). Note that as p ! 0, the metric approaches the 0 −1 metric d0(, 0) = 6=0, which treats all incorrect digits as being equally unfavorable. In this case, as can be seen in the figure, the predicted probability of the true digit goes to 1 while the probability for all other digits goes to 0. As p increases, the predictions become more evenly distributed over the neighboring digits, converging to a uniform distribution as p ! 1 5. 6.2 Flickr tag prediction We apply the Wasserstein loss to a real world multi-label learning problem, using the recently released Yahoo/Flickr Creative Commons 100M dataset [23]. 6 Our goal is tag prediction: we select 1000 descriptive tags along with two random sets of 10,000 images each, associated with these tags, for training and testing. We derive a distance metric between tags by using word2vec [24] to embed the tags as unit vectors, then taking their Euclidean distances. To extract image features we use MatConvNet [25]. Note that the set of tags is highly redundant and often many semantically equivalent or similar tags can apply to an image. The images are also partially tagged, as different users may prefer different tags. We therefore measure the prediction performance by the top-K cost, defined as CK = 1/K PK k=1 minj dK(ˆk, j), where {j} is the set of groundtruth tags, and {ˆk} are the tags with highest predicted probability. The standard AUC measure is also reported. We find that a linear combination of the Wasserstein loss W p p and the standard multiclass logistic loss KL yields the best prediction results. Specifically, we train a linear model by minimizing W p p +↵KL on the training set, where ↵controls the relative weight of KL. Note that KL taken alone is our baseline in these experiments. Figure 5a shows the top-K cost on the test set for the combined loss and the baseline KL loss. We additionally create a second dataset by removing redundant labels from the original dataset: this simulates the potentially more difficult case in which a single user tags each image, by selecting one tag to apply from amongst each cluster of applicable, semantically similar tags. Figure 3b shows that performance for both algorithms decreases on the harder dataset, while the combined Wasserstein loss continues to outperform the baseline. In Figure 6, we show the effect on performance of varying the weight ↵on the KL loss. We observe that the optimum of the top-K cost is achieved when the Wasserstein loss is weighted more heavily than at the optimum of the AUC. This is consistent with a semantic smoothing effect of Wasserstein, which during training will favor mispredictions that are semantically similar to the ground truth, sometimes at the cost of lower AUC 7. We finally show two selected images from the test set in Figure 7. These illustrate cases in which both algorithms make predictions that are semantically relevant, despite overlapping very little with the ground truth. The image on the left shows errors made by both algorithms. More examples can be found in the appendix. 5To avoid numerical issues, we scale down the ground metric such that all of the distance values are in the interval [0, 1). 6The dataset used here is available at http://cbcl.mit.edu/wasserstein. 7The Wasserstein loss can achieve a similar trade-off by choosing the metric parameter p, as discussed in Section 6.1. However, the relationship between p and the smoothing behavior is complex and it can be simpler to implement the trade-off by combining with the KL loss. 7 0.0 0.5 1.0 1.5 2.0 0.65 0.70 0.75 0.80 0.85 0.90 0.95 Top-K cost K = 1 K = 2 K = 3 K = 4 0.0 0.5 1.0 1.5 2.0 ↵ 0.54 0.56 0.58 0.60 0.62 0.64 AUC Wasserstein AUC Divergence AUC (a) Original Flickr tags dataset. 0.0 0.5 1.0 1.5 2.0 0.65 0.70 0.75 0.80 0.85 0.90 0.95 Top-K cost K = 1 K = 2 K = 3 K = 4 0.0 0.5 1.0 1.5 2.0 ↵ 0.54 0.56 0.58 0.60 0.62 0.64 AUC Wasserstein AUC Divergence AUC (b) Reduced-redundancy Flickr tags dataset. Figure 6: Trade-off between semantic smoothness and maximum likelihood. (a) Flickr user tags: street, parade, dragon; our proposals: people, protest, parade; baseline proposals: music, car, band. (b) Flickr user tags: water, boat, reflection, sunshine; our proposals: water, river, lake, summer; baseline proposals: river, water, club, nature. Figure 7: Examples of images in the Flickr dataset. We show the groundtruth tags and as well as tags proposed by our algorithm and the baseline. 7 Conclusions and future work In this paper we have described a loss function for learning to predict a non-negative measure over a finite set, based on the Wasserstein distance. Although optimizing with respect to the exact Wasserstein loss is computationally costly, an approximation based on entropic regularization is efficiently computed. We described a learning algorithm based on this regularization and we proposed a novel extension of the regularized loss to unnormalized measures that preserves its efficiency. We also described a statistical learning bound for the loss. The Wasserstein loss can encourage smoothness of the predictions with respect to a chosen metric on the output space, and we demonstrated this property on a real-data tag prediction problem, showing improved performance over a baseline that doesn’t incorporate the metric. An interesting direction for future work may be to explore the connection between the Wasserstein loss and Markov random fields, as the latter are often used to encourage smoothness of predictions, via inference at prediction time. 8 References [1] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. CVPR (to appear), 2015. [2] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 2015. [3] Marco Cuturi and Arnaud Doucet. Fast Computation of Wasserstein Barycenters. ICML, 2014. [4] Justin Solomon, Raif M Rustamov, Leonidas J Guibas, and Adrian Butscher. Wasserstein Propagation for Semi-Supervised Learning. In ICML, pages 306–314, 2014. [5] Michael H Coen, M Hidayath Ansari, and Nathanael Fillmore. Comparing Clusterings in Space. ICML, pages 231–238, 2010. [6] Lorenzo Rosasco Mauricio A. Alvarez and Neil D. Lawrence. Kernels for vector-valued functions: A review. Foundations and Trends in Machine Learning, 4(3):195–266, 2011. [7] Leonid I Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena, 60(1):259–268, 1992. [8] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [9] Marco Cuturi, Gabriel Peyr´e, and Antoine Rolet. A Smoothed Dual Approach for Variational Wasserstein Problems. arXiv.org, March 2015. [10] Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. IJCV, 40(2):99–121, 2000. [11] Kristen Grauman and Trevor Darrell. Fast contour matching using approximate earth mover’s distance. In CVPR, 2004. [12] S Shirdhonkar and D W Jacobs. Approximate earth mover’s distance in linear time. In CVPR, 2008. [13] Herbert Edelsbrunner and Dmitriy Morozov. Persistent homology: Theory and practice. In Proceedings of the European Congress of Mathematics, 2012. [14] Federico Bassetti, Antonella Bodini, and Eugenio Regazzini. On minimum kantorovich distance estimators. Stat. Probab. Lett., 76(12):1298–1302, 1 July 2006. [15] C´edric Villani. Optimal Transport: Old and New. Springer Berlin Heidelberg, 2008. [16] Vladimir I Bogachev and Aleksandr V Kolesnikov. The Monge-Kantorovich problem: achievements, connections, and perspectives. Russian Math. Surveys, 67(5):785, 10 2012. [17] Dimitris Bertsimas, John N. Tsitsiklis, and John Tsitsiklis. Introduction to Linear Optimization. Athena Scientific, Boston, third printing edition, 1997. [18] Marco Cuturi. Sinkhorn Distances: Lightspeed Computation of Optimal Transport. NIPS, 2013. [19] Philip A Knight and Daniel Ruiz. A fast algorithm for matrix balancing. IMA Journal of Numerical Analysis, 33(3):drs019–1047, October 2012. [20] Lenaic Chizat, Gabriel Peyr´e, Bernhard Schmitzer, and Franc¸ois-Xavier Vialard. Unbalanced Optimal Transport: Geometry and Kantorovich Formulation. arXiv.org, August 2015. [21] Ofir Pele and Michael Werman. Fast and robust Earth Mover’s Distances. ICCV, pages 460–467, 2009. [22] Peter L Bartlett and Shahar Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results. JMLR, 3:463–482, March 2003. [23] Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. The new data and new challenges in multimedia research. arXiv preprint arXiv:1503.01817, 2015. [24] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013. [25] A. Vedaldi and K. Lenc. MatConvNet – Convolutional Neural Networks for MATLAB. CoRR, abs/1412.4564, 2014. [26] M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. Classics in Mathematics. Springer Berlin Heidelberg, 2011. [27] Clark R. Givens and Rae Michael Shortt. A class of wasserstein metrics for probability distributions. Michigan Math. J., 31(2):231–240, 1984. 9 | 2015 | 265 |
5,775 | Deep Generative Image Models using a Laplacian Pyramid of Adversarial Networks Emily Denton∗ Dept. of Computer Science Courant Institute New York University Soumith Chintala∗ Arthur Szlam Rob Fergus Facebook AI Research New York Abstract In this paper we introduce a generative parametric model capable of producing high quality samples of natural images. Our approach uses a cascade of convolutional networks within a Laplacian pyramid framework to generate images in a coarse-to-fine fashion. At each level of the pyramid, a separate generative convnet model is trained using the Generative Adversarial Nets (GAN) approach [11]. Samples drawn from our model are of significantly higher quality than alternate approaches. In a quantitative assessment by human evaluators, our CIFAR10 samples were mistaken for real images around 40% of the time, compared to 10% for samples drawn from a GAN baseline model. We also show samples from models trained on the higher resolution images of the LSUN scene dataset. 1 Introduction Building a good generative model of natural images has been a fundamental problem within computer vision. However, images are complex and high dimensional, making them hard to model well, despite extensive efforts. Given the difficulties of modeling entire scene at high-resolution, most existing approaches instead generate image patches. In contrast, we propose an approach that is able to generate plausible looking scenes at 32 × 32 and 64 × 64. To do this, we exploit the multiscale structure of natural images, building a series of generative models, each of which captures image structure at a particular scale of a Laplacian pyramid [1]. This strategy breaks the original problem into a sequence of more manageable stages. At each scale we train a convolutional networkbased generative model using the Generative Adversarial Networks (GAN) approach of Goodfellow et al. [11]. Samples are drawn in a coarse-to-fine fashion, commencing with a low-frequency residual image. The second stage samples the band-pass structure at the next level, conditioned on the sampled residual. Subsequent levels continue this process, always conditioning on the output from the previous scale, until the final level is reached. Thus drawing samples is an efficient and straightforward procedure: taking random vectors as input and running forward through a cascade of deep convolutional networks (convnets) to produce an image. Deep learning approaches have proven highly effective at discriminative tasks in vision, such as object classification [4]. However, the same level of success has not been obtained for generative tasks, despite numerous efforts [14, 26, 30]. Against this background, our proposed approach makes a significant advance in that it is straightforward to train and sample from, with the resulting samples showing a surprising level of visual fidelity. 1.1 Related Work Generative image models are well studied, falling into two main approaches: non-parametric and parametric. The former copy patches from training images to perform, for example, texture synthesis [7] or super-resolution [9]. More ambitiously, entire portions of an image can be in-painted, given a sufficiently large training dataset [13]. Early parametric models addressed the easier problem of tex∗denotes equal contribution. 1 ture synthesis [3, 33, 22], with Portilla & Simoncelli [22] making use of a steerable pyramid wavelet representation [27], similar to our use of a Laplacian pyramid. For image processing tasks, models based on marginal distributions of image gradients are effective [20, 25], but are only designed for image restoration rather than being true density models (so cannot sample an actual image). Very large Gaussian mixture models [34] and sparse coding models of image patches [31] can also be used but suffer the same problem. A wide variety of deep learning approaches involve generative parametric models. Restricted Boltzmann machines [14, 18, 21, 23], Deep Boltzmann machines [26, 8], Denoising auto-encoders [30] all have a generative decoder that reconstructs the image from the latent representation. Variational auto-encoders [16, 24] provide probabilistic interpretation which facilitates sampling. However, for all these methods convincing samples have only been shown on simple datasets such as MNIST and NORB, possibly due to training complexities which limit their applicability to larger and more realistic images. Several recent papers have proposed novel generative models. Dosovitskiy et al. [6] showed how a convnet can draw chairs with different shapes and viewpoints. While our model also makes use of convnets, it is able to sample general scenes and objects. The DRAW model of Gregor et al. [12] used an attentional mechanism with an RNN to generate images via a trajectory of patches, showing samples of MNIST and CIFAR10 images. Sohl-Dickstein et al. [28] use a diffusion-based process for deep unsupervised learning and the resulting model is able to produce reasonable CIFAR10 samples. Theis and Bethge [29] employ LSTMs to capture spatial dependencies and show convincing inpainting results of natural textures. Our work builds on the GAN approach of Goodfellow et al. [11] which works well for smaller images (e.g. MNIST) but cannot directly handle large ones, unlike our method. Most relevant to our approach is the preliminary work of Mirza and Osindero [19] and Gauthier [10] who both propose conditional versions of the GAN model. The former shows MNIST samples, while the latter focuses solely on frontal face images. Our approach also uses several forms of conditional GAN model but is much more ambitious in its scope. 2 Approach The basic building block of our approach is the generative adversarial network (GAN) of Goodfellow et al. [11]. After reviewing this, we introduce our LAPGAN model which integrates a conditional form of GAN model into the framework of a Laplacian pyramid. 2.1 Generative Adversarial Networks The GAN approach [11] is a framework for training generative models, which we briefly explain in the context of image data. The method pits two networks against one another: a generative model G that captures the data distribution and a discriminative model D that distinguishes between samples drawn from G and images drawn from the training data. In our approach, both G and D are convolutional networks. The former takes as input a noise vector z drawn from a distribution pNoise(z) and outputs an image ˜h. The discriminative network D takes an image as input stochastically chosen (with equal probability) to be either ˜h – as generated from G, or h – a real image drawn from the training data pData(h). D outputs a scalar probability, which is trained to be high if the input was real and low if generated from G. A minimax objective is used to train both models together: min G max D Eh∼pData(h)[log D(h)] + Ez∼pNoise(z)[log(1 −D(G(z)))] (1) This encourages G to fit pData(h) so as to fool D with its generated samples ˜h. Both G and D are trained by backpropagating the loss in Eqn. 1 through both models to update the parameters. The conditional generative adversarial net (CGAN) is an extension of the GAN where both networks G and D receive an additional vector of information l as input. This might contain, say, information about the class of the training example h. The loss function thus becomes min G max D Eh,l∼pData(h,l)[log D(h, l)] + Ez∼pNoise(z),l∼pl(l)[log(1 −D(G(z, l), l))] (2) where pl(l) is, for example, the prior distribution over classes. This model allows the output of the generative model to be controlled by the conditioning variable l. Mirza and Osindero [19] and Gauthier [10] both explore this model with experiments on MNIST and faces, using l as a class indicator. In our approach, l will be another image, generated from another CGAN model. 2 2.2 Laplacian Pyramid The Laplacian pyramid [1] is a linear invertible image representation consisting of a set of band-pass images, spaced an octave apart, plus a low-frequency residual. Formally, let d(.) be a downsampling operation which blurs and decimates a j × j image I, so that d(I) is a new image of size j/2 × j/2. Also, let u(.) be an upsampling operator which smooths and expands I to be twice the size, so u(I) is a new image of size 2j × 2j. We first build a Gaussian pyramid G(I) = [I0, I1, . . . , IK], where I0 = I and Ik is k repeated applications of d(.) to I, i.e. I2 = d(d(I)). K is the number of levels in the pyramid, selected so that the final level has very small spatial extent (≤8 × 8 pixels). The coefficients hk at each level k of the Laplacian pyramid L(I) are constructed by taking the difference between adjacent levels in the Gaussian pyramid, upsampling the smaller one with u(.) so that the sizes are compatible: hk = Lk(I) = Gk(I) −u(Gk+1(I)) = Ik −u(Ik+1) (3) Intuitively, each level captures image structure present at a particular scale. The final level of the Laplacian pyramid hK is not a difference image, but a low-frequency residual equal to the final Gaussian pyramid level, i.e. hK = IK. Reconstruction from a Laplacian pyramid coefficients [h1, . . . , hK] is performed using the backward recurrence: Ik = u(Ik+1) + hk (4) which is started with IK = hK and the reconstructed image being I = Io. In other words, starting at the coarsest level, we repeatedly upsample and add the difference image h at the next finer level until we get back to the full resolution image. 2.3 Laplacian Generative Adversarial Networks (LAPGAN) Our proposed approach combines the conditional GAN model with a Laplacian pyramid representation. The model is best explained by first considering the sampling procedure. Following training (explained below), we have a set of generative convnet models {G0, . . . , GK}, each of which captures the distribution of coefficients hk for natural images at a different level of the Laplacian pyramid. Sampling an image is akin to the reconstruction procedure in Eqn. 4, except that the generative models are used to produce the hk’s: ˜Ik = u(˜Ik+1) + ˜hk = u(˜Ik+1) + Gk(zk, u(˜Ik+1)) (5) The recurrence starts by setting ˜IK+1 = 0 and using the model at the final level GK to generate a residual image ˜IK using noise vector zK: ˜IK = GK(zK). Note that models at all levels except the final are conditional generative models that take an upsampled version of the current image ˜Ik+1 as a conditioning variable, in addition to the noise vector zk. Fig. 1 shows this procedure in action for a pyramid with K = 3 using 4 generative models to sample a 64 × 64 image. The generative models {G0, . . . , GK} are trained using the CGAN approach at each level of the pyramid. Specifically, we construct a Laplacian pyramid from each training image I. At each level we make a stochastic choice (with equal probability) to either (i) construct the coefficients hk either using the standard procedure from Eqn. 3, or (ii) generate them using Gk: ˜hk = Gk(zk, u(Ik+1)) (6) G2 ~ I3 G3 z2 ~ h2 z3 G1 z1 G0 z0 ~ I2 l2 ~ I0 h0 ~ I1 ~ ~ h1 l1 l0 Figure 1: The sampling procedure for our LAPGAN model. We start with a noise sample z3 (right side) and use a generative model G3 to generate ˜I3. This is upsampled (green arrow) and then used as the conditioning variable (orange arrow) l2 for the generative model at the next level, G2. Together with another noise sample z2, G2 generates a difference image ˜h2 which is added to l2 to create ˜I2. This process repeats across two subsequent levels to yield a final full resolution sample I0. 3 G0 l2 ~ I3 G3 D0 z0 D1 D2 h2 ~ h2 z3 D3 I3 I2 I2 I3 Real/Generated? Real/ Generated? G1 z1 G2 z2 Real/Generated? Real/ Generated? l0 I = I0 h0 I1 I1 l1 ~ h1 h1 h0 ~ Figure 2: The training procedure for our LAPGAN model. Starting with a 64x64 input image I from our training set (top left): (i) we take I0 = I and blur and downsample it by a factor of two (red arrow) to produce I1; (ii) we upsample I1 by a factor of two (green arrow), giving a low-pass version l0 of I0; (iii) with equal probability we use l0 to create either a real or a generated example for the discriminative model D0. In the real case (blue arrows), we compute high-pass h0 = I0 −l0 which is input to D0 that computes the probability of it being real vs generated. In the generated case (magenta arrows), the generative network G0 receives as input a random noise vector z0 and l0. It outputs a generated high-pass image ˜h0 = G0(z0, l0), which is input to D0. In both the real/generated cases, D0 also receives l0 (orange arrow). Optimizing Eqn. 2, G0 thus learns to generate realistic high-frequency structure ˜h0 consistent with the low-pass image l0. The same procedure is repeated at scales 1 and 2, using I1 and I2. Note that the models at each level are trained independently. At level 3, I3 is an 8×8 image, simple enough to be modeled directly with a standard GANs G3 & D3. Note that Gk is a convnet which uses a coarse scale version of the image lk = u(Ik+1) as an input, as well as noise vector zk. Dk takes as input hk or ˜hk, along with the low-pass image lk (which is explicitly added to hk or ˜hk before the first convolution layer), and predicts if the image was real or generated. At the final scale of the pyramid, the low frequency residual is sufficiently small that it can be directly modeled with a standard GAN: ˜hK = GK(zK) and DK only has hK or ˜hK as input. The framework is illustrated in Fig. 2. Breaking the generation into successive refinements is the key idea in this work. Note that we give up any “global” notion of fidelity; we never make any attempt to train a network to discriminate between the output of a cascade and a real image and instead focus on making each step plausible. Furthermore, the independent training of each pyramid level has the advantage that it is far more difficult for the model to memorize training examples – a hazard when high capacity deep networks are used. As described, our model is trained in an unsupervised manner. However, we also explore variants that utilize class labels. This is done by add a 1-hot vector c, indicating class identity, as another conditioning variable for Gk and Dk. 3 Model Architecture & Training We apply our approach to three datasets: (i) CIFAR10 [17] – 32×32 pixel color images of 10 different classes, 100k training samples with tight crops of objects; (ii) STL10 [2] – 96×96 pixel color images of 10 different classes, 100k training samples (we use the unlabeled portion of data); and (iii) LSUN [32] – ∼10M images of 10 different natural scene types, downsampled to 64×64 pixels. For each dataset, we explored a variety of architectures for {Gk, Dk}. Model selection was performed using a combination of visual inspection and a heuristic based on ℓ2 error in pixel space. The heuristic computes the error for a given validation image at level k in the pyramid as Lk(Ik) = min{zj}||Gk(zj, u(Ik+1)) −hk||2 where {zj} is a large set of noise vectors, drawn from pnoise(z). In other words, the heuristic is asking, are any of the generated residual images close to the ground truth? Torch training and evaluation code, along with model specification files can be found at http://soumith.ch/eyescream/. For all models, the noise vector zk is drawn from a uniform [-1,1] distribution. 4 3.1 CIFAR10 and STL10 Initial scale: This operates at 8 × 8 resolution, using densely connected nets for both GK & DK with 2 hidden layers and ReLU non-linearities. DK uses Dropout and has 600 units/layer vs 1200 for GK. zK is a 100-d vector. Subsequent scales: For CIFAR10, we boost the training set size by taking four 28 × 28 crops from the original images. Thus the two subsequent levels of the pyramid are 8 →14 and 14 →28. For STL, we have 4 levels going from 8 →16 →32 →64 →96. For both datasets, Gk & Dk are convnets with 3 and 2 layers, respectively (see [5]). The noise input zk to Gk is presented as a 4th “color plane” to low-pass lk, hence its dimensionality varies with the pyramid level. For CIFAR10, we also explore a class conditional version of the model, where a vector c encodes the label. This is integrated into Gk & Dk by passing it through a linear layer whose output is reshaped into a single plane feature map which is then concatenated with the 1st layer maps. The loss in Eqn. 2 is trained using SGD with an initial learning rate of 0.02, decreased by a factor of (1 + 4 × 10−4) at each epoch. Momentum starts at 0.5, increasing by 0.0008 at epoch up to a maximum of 0.8. Training time depends on the models size and pyramid level, with smaller models taking hours to train and larger models taking up to a day. 3.2 LSUN The larger size of this dataset allows us to train a separate LAPGAN model for each of the scene classes. The four subsequent scales 4 →8 →16 →32 →64 use a common architecture for Gk & Dk at each level. Gk is a 5-layer convnet with {64, 368, 128, 224} feature maps and a linear output layer. 7 × 7 filters, ReLUs, batch normalization [15] and Dropout are used at each hidden layer. Dk has 3 hidden layers with {48, 448, 416} maps plus a sigmoid output. See [5] for full details. Note that Gk and Dk are substantially larger than those used for CIFAR10 and STL, as afforded by the larger training set. 4 Experiments We evaluate our approach using 3 different methods: (i) computation of log-likelihood on a held out image set; (ii) drawing sample images from the model and (iii) a human subject experiment that compares (a) our samples, (b) those of baseline methods and (c) real images. 4.1 Evaluation of Log-Likelihood Like Goodfellow et al. [11], we are compelled to use a Gaussian Parzen window estimator to compute log-likelihood, since there no direct way of computing it using our model. Table 1 compares the log-likelihood on a validation set for our LAPGAN model and a standard GAN using 50k samples for each model (the Gaussian width σ was also tuned on the validation set). Our approach shows a marginal gain over a GAN. However, we can improve the underlying estimation technique by leveraging the multi-scale structure of the LAPGAN model. This new approach computes a probability at each scale of the Laplacian pyramid and combines them to give an overall image probability (see Appendix A in supplementary material for details). Our multi-scale Parzen estimate, shown in Table 1, produces a big gain over the traditional estimator. The shortcomings of both estimators are readily apparent when compared to a simple Gaussian, fit to the CIFAR-10 training set. Even with added noise, the resulting model can obtain a far higher loglikelihood than either the GAN or LAPGAN models, or other published models. More generally, log-likelihood is problematic as a performance measure due to its sensitivity to the exact representation used. Small variations in the scaling, noise and resolution of the image (much less changing from RGB to YUV, or more substantive changes in input representation) results in wildly different scores, making fair comparisons to other methods difficult. Model CIFAR10 (@32×32) STL10 (@32×32) GAN [11] (Parzen window estimate) -3617 ± 353 -3661 ± 347 LAPGAN (Parzen window estimate) -3572 ± 345 -3563 ± 311 LAPGAN (multi-scale Parzen window estimate) -1799 ± 826 -2906 ± 728 Table 1: Log-likelihood estimates for a standard GAN and our proposed LAPGAN model on CIFAR10 and STL10 datasets. The mean and std. dev. are given in units of nats/image. Rows 1 and 2 use a Parzen-window approach at full-resolution, while row 3 uses our multi-scale Parzen-window estimator. 5 4.2 Model Samples We show samples from models trained on CIFAR10, STL10 and LSUN datasets. Additional samples can be found in the supplementary material [5]. Fig. 3 shows samples from our models trained on CIFAR10. Samples from the class conditional LAPGAN are organized by class. Our reimplementation of the standard GAN model [11] produces slightly sharper images than those shown in the original paper. We attribute this improvement to the introduction of data augmentation. The LAPGAN samples improve upon the standard GAN samples. They appear more object-like and have more clearly defined edges. Conditioning on a class label improves the generations as evidenced by the clear object structure in the conditional LAPGAN samples. The quality of these samples compares favorably with those from the DRAW model of Gregor et al. [12] and also Sohl-Dickstein et al. [28]. The rightmost column of each image shows the nearest training example to the neighboring sample (in L2 pixel-space). This demonstrates that our model is not simply copying the input examples. Fig. 4(a) shows samples from our LAPGAN model trained on STL10. Here, we lose clear object shape but the samples remain sharp. Fig. 4(b) shows the generation chain for random STL10 samples. Fig. 5 shows samples from LAPGAN models trained on three LSUN categories (tower, bedroom, church front). To the best of our knowledge, no other generative model is been able to produce samples of this complexity. The substantial gain in quality over the CIFAR10 and STL10 samples is likely due to the much larger training LSUN training set which allows us to train bigger and deeper models. In supplemental material we show additional experiments probing the models, e.g. drawing multiple samples using the same fixed 4 × 4 image, which illustrates the variation captured by the LAPGAN models. 4.3 Human Evaluation of Samples To obtain a quantitative measure of quality of our samples, we asked 15 volunteers to participate in an experiment to see if they could distinguish our samples from real images. The subjects were presented with the user interface shown in Fig. 6(right) and shown at random four different types of image: samples drawn from three different GAN models trained on CIFAR10 ((i) LAPGAN, (ii) class conditional LAPGAN and (iii) standard GAN [11]) and also real CIFAR10 images. After being presented with the image, the subject clicked the appropriate button to indicate if they believed the image was real or generated. Since accuracy is a function of viewing time, we also randomly pick the presentation time from one of 11 durations ranging from 50ms to 2000ms, after which a gray mask image is displayed. Before the experiment commenced, they were shown examples of real images from CIFAR10. After collecting ∼10k samples from the volunteers, we plot in Fig. 6 the fraction of images believed to be real for the four different data sources, as a function of presentation time. The curves show our models produce samples that are more realistic than those from standard GAN [11]. 5 Discussion By modifying the approach in [11] to better respect the structure of images, we have proposed a conceptually simple generative model that is able to produce high-quality sample images that are qualitatively better than other deep generative modeling approaches. While they exhibit reasonable diversity, we cannot be sure that they cover the full data distribution. Hence our models could potentially be assigning low probability to parts of the manifold on natural images. Quantifying this is difficult, but could potentially be done via another human subject experiment. A key point in our work is giving up any “global” notion of fidelity, and instead breaking the generation into plausible successive refinements. We note that many other signal modalities have a multiscale structure that may benefit from a similar approach. Acknowledgements We would like to thank the anonymous reviewers for their insightful and constructive comments. We also thank Andrew Tulloch, Wojciech Zaremba and the FAIR Infrastructure team for useful discussions and support. Emily Denton was supported by an NSERC Fellowship. 6 CC-LAPGAN: Airplane CC-LAPGAN: Automobile CC-LAPGAN: Bird CC-LAPGAN: Cat CC-LAPGAN: Deer CC-LAPGAN: Dog CC-LAPGAN: Frog CC-LAPGAN: Horse CC-LAPGAN: Ship CC-LAPGAN: Truck GAN [14] LAPGAN Figure 3: CIFAR10 samples: our class conditional CC-LAPGAN model, our LAPGAN model and the standard GAN model of Goodfellow [11]. The yellow column shows the training set nearest neighbors of the samples in the adjacent column. (a) (b) Figure 4: STL10 samples: (a) Random 96x96 samples from our LAPGAN model. (b) Coarse-tofine generation chain. 7 Figure 5: 64 × 64 samples from three different LSUN LAPGAN models (top: tower, middle: bedroom, bottom: church front) 50 75 100 150 200 300 400 650 1000 2000 0 10 20 30 40 50 60 70 80 90 100 Presentation time (ms) % classified real Real CC−LAPGAN LAPGAN GAN Figure 6: Left: Human evaluation of real CIFAR10 images (red) and samples from Goodfellow et al. [11] (magenta), our LAPGAN (blue) and a class conditional LAPGAN (green). The error bars show ±1σ of the inter-subject variability. Around 40% of the samples generated by our class conditional LAPGAN model are realistic enough to fool a human into thinking they are real images. This compares with ≤10% of images from the standard GAN model [11], but is still a lot lower than the > 90% rate for real images. Right: The user-interface presented to the subjects. 8 References [1] P. J. Burt, Edward, and E. H. Adelson. The laplacian pyramid as a compact image code. IEEE Transactions on Communications, 31:532–540, 1983. [2] A. Coates, H. Lee, and A. Y. Ng. An analysis of single layer networks in unsupervised feature learning. In AISTATS, 2011. [3] J. S. De Bonet. Multiresolution sampling procedure for analysis and synthesis of texture images. In Proceedings of the 24th annual conference on Computer graphics and interactive techniques, pages 361–368. ACM Press/Addison-Wesley Publishing Co., 1997. [4] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255. IEEE, 2009. [5] E. Denton, S. Chintala, A. Szlam, and R. Fergus. Deep generative image models using a laplacian pyramid of adversarial networks: Supplementary material. http://soumith.ch/eyescream. [6] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. arXiv preprint arXiv:1411.5928, 2014. [7] A. A. Efros and T. K. Leung. Texture synthesis by non-parametric sampling. In ICCV, volume 2, pages 1033–1038. IEEE, 1999. [8] S. A. Eslami, N. Heess, C. K. Williams, and J. Winn. The shape boltzmann machine: a strong model of object shape. International Journal of Computer Vision, 107(2):155–176, 2014. [9] W. T. Freeman, T. R. Jones, and E. C. Pasztor. Example-based super-resolution. Computer Graphics and Applications, IEEE, 22(2):56– 65, 2002. [10] J. Gauthier. Conditional generative adversarial nets for convolutional face generation. Class Project for Stanford CS231N: Convolutional Neural Networks for Visual Recognition, Winter semester 2014 2014. [11] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, pages 2672–2680. 2014. [12] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. DRAW: A recurrent neural network for image generation. CoRR, abs/1502.04623, 2015. [13] J. Hays and A. A. Efros. Scene completion using millions of photographs. ACM Transactions on Graphics (TOG), 26(3):4, 2007. [14] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [15] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167v3, 2015. [16] D. P. Kingma and M. Welling. Auto-encoding variational bayes. ICLR, 2014. [17] A. Krizhevsky. Learning multiple layers of features from tiny images. Masters Thesis, Deptartment of Computer Science, University of Toronto, 2009. [18] A. Krizhevsky, G. E. Hinton, et al. Factored 3-way restricted boltzmann machines for modeling natural images. In AISTATS, pages 621–628, 2010. [19] M. Mirza and S. Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. [20] B. A. Olshausen and D. J. Field. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision research, 37(23):3311–3325, 1997. [21] S. Osindero and G. E. Hinton. Modeling image patches with a directed hierarchy of markov random fields. In J. Platt, D. Koller, Y. Singer, and S. Roweis, editors, NIPS, pages 1121–1128. 2008. [22] J. Portilla and E. P. Simoncelli. A parametric texture model based on joint statistics of complex wavelet coefficients. International Journal of Computer Vision, 40(1):49–70, 2000. [23] M. Ranzato, V. Mnih, J. M. Susskind, and G. E. Hinton. Modeling natural images using gated MRFs. IEEE Transactions on Pattern Analysis & Machine Intelligence, (9):2206–2222, 2013. [24] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and variational inference in deep latent gaussian models. arXiv preprint arXiv:1401.4082, 2014. [25] S. Roth and M. J. Black. Fields of experts: A framework for learning image priors. In In CVPR, pages 860–867, 2005. [26] R. Salakhutdinov and G. E. Hinton. Deep boltzmann machines. In AISTATS, pages 448–455, 2009. [27] E. P. Simoncelli, W. T. Freeman, E. H. Adelson, and D. J. Heeger. Shiftable multiscale transforms. Information Theory, IEEE Transactions on, 38(2):587–607, 1992. [28] J. Sohl-Dickstein, E. A. Weiss, N. Maheswaranathan, and S. Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585, 2015. [29] L. Theis and M. Bethge. Generative image modeling using spatial LSTMs. Dec 2015. [30] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, pages 1096–1103, 2008. [31] J. Wright, Y. Ma, J. Mairal, G. Sapiro, T. S. Huang, and S. Yan. Sparse representation for computer vision and pattern recognition. Proceedings of the IEEE, 98(6):1031–1044, 2010. [32] Y. Zhang, F. Yu, S. Song, P. Xu, A. Seff, and J. Xiao. Large-scale scene understanding challenge. In CVPR Workshop, 2015. [33] S. C. Zhu, Y. Wu, and D. Mumford. Filters, random fields and maximum entropy (frame): Towards a unified theory for texture modeling. International Journal of Computer Vision, 27(2):107–126, 1998. [34] D. Zoran and Y. Weiss. From learning models of natural image patches to whole image restoration. In ICCV, 2011. 9 | 2015 | 266 |
5,776 | Estimating Jaccard Index with Missing Observations: A Matrix Calibration Approach Wenye Li Macao Polytechnic Institute Macao SAR, China wyli@ipm.edu.mo Abstract The Jaccard index is a standard statistics for comparing the pairwise similarity between data samples. This paper investigates the problem of estimating a Jaccard index matrix when there are missing observations in data samples. Starting from a Jaccard index matrix approximated from the incomplete data, our method calibrates the matrix to meet the requirement of positive semi-definiteness and other constraints, through a simple alternating projection algorithm. Compared with conventional approaches that estimate the similarity matrix based on the imputed data, our method has a strong advantage in that the calibrated matrix is guaranteed to be closer to the unknown ground truth in the Frobenius norm than the un-calibrated matrix (except in special cases they are identical). We carried out a series of empirical experiments and the results confirmed our theoretical justification. The evaluation also reported significantly improved results in real learning tasks on benchmark datasets. 1 Introduction A critical task in data analysis is to determine how similar two data samples are. The applications arise in many science and engineering disciplines. For example, in statistical and computing sciences, similarity analysis lays a foundation for cluster analysis, pattern classification, image analysis and recommender systems [15, 8, 17]. A variety of similarity models have been established for different types of data. When data samples can be represented as algebraic vectors, popular choices include cosine similarity model, linear kernel model, and so on [24, 25]. When each vector element takes a value of zero or one, the Jaccard index model is routinely applied, which measures the similarity by the ratio of the number of unique elements common to two samples against the total number of unique elements in either of them [14, 23]. Despite the wide applications, the Jaccard index model faces a non-trivial challenge when data samples are not fully observed. As a treatment, imputation approaches may be applied, which replace the missing observations with substituted values and then calculate the Jaccard index based on the imputed data. Unfortunately, with a large portion of missing observations, imputing data samples often becomes un-reliable or even infeasible, as evidenced in our evaluation. Instead of trying to fill in the missing values, this paper investigates a completely different approach based on matrix calibration. Starting from an approximate Jaccard index matrix that is estimated from incomplete samples, the proposed method calibrates the matrix to meet the requirement of positive semi-definiteness and other constraints. The calibration procedure is carried out with a simple yet flexible alternating projection algorithm. 1 The proposed method has a strong theoretical advantage. The calibrated matrix is guaranteed to be better than, or at least identical to (in special cases), the un-calibrated matrix in terms of a shorter Frobenius distance to the true Jaccard index matrix, which was verified empirically as well. Besides, our evaluation of the method also reported improved results in learning applications, and the improvement was especially significant with a high portion of missing values. A note on notation. Throughout the discussion, a data sample, Ai (1 ≤i ≤n), is treated as a set of features. Let F = {f1, · · · , fd} be the set of all possible features. Without causing ambiguity, Ai also represents a binary-valued vector. If the j-th (1 ≤j ≤d) element of vector Ai is one, it means fj ∈Ai (feature fj belongs to sample Ai); if the element is zero, fj ̸∈Ai; if the element is marked as missing, it remains unknown whether feature fj belongs to sample Ai or not. 2 Background 2.1 The Jaccard index The Jaccard index is a commonly used statistical indicator for measuring the pairwise similarity [14, 23]. For two nonempty and finite sets Ai and Aj, it is defined to be the ratio of the number of elements in their intersection against the number of elements in their union: J∗ ij = |Ai ∩Aj| |Ai ∪Aj| where |·| denotes the cardinality of a set. The Jaccard index has a value of 0 when the two sets have no elements in common, 1 when they have exactly the same elements, and strictly between 0 and 1 otherwise. The two sets are more similar (have more common elements) when the value gets closer to 1. For n sets A1, · · · , An (n ≥2), the Jaccard index matrix is defined as an n × n matrix J∗= J∗ ij n i,j=1. The matrix is symmetric and all diagonal elements of the matrix are 1. 2.2 Handling missing observations When data samples are fully observed, the accurate Jaccard index can be obtained trivially by enumerating the intersection and the union between each pair of samples if both the number of samples and the number of features are small. For samples with a large number of features, the index can often be approximated by MinHash and related methods [5, 18], which avoid the explicit counting of the intersection and the union of the two sets. When data samples are not fully observed, however, obtaining the accurate Jaccard index generally becomes infeasible. One na¨ıve approximation is to ignore the features with missing values. Only those features that have no missing values in all samples are used to calculate the Jaccard index. Obviously, for a large dataset with missing-at-random features, it is very likely that this method will throw away all features and therefore does not work at all. The mainstream work tries to replace the missing observations with substituted values, and then calculates the Jaccard index based on the imputed data. Several simple approaches, including zero, median and k-nearest neighbors (kNN) methods, are popularly used. A missing element is set to zero, often implying the corresponding feature does not exist in a sample. It can also be set to the median value (or the mean value) of the feature over all samples, or sometimes over a number of nearest neighboring instances. A more systematical imputation framework is based on the classical expectation maximization (EM) algorithm [6], which generalizes maximum likelihood estimation to the case of incomplete data. Assuming the existence of un-observed latent variables, the algorithm alternates between the expectation step and the maximization step, and finds maximum likelihood or maximum a posterior estimates of the un-observed variables. In practice, the imputation is often carried out through iterating between learning a mixture of clusters of the filled data and re-filling missing values using cluster means, weighted by the posterior probability that a cluster generates the samples [11]. 2 3 Solution Our work investigates the Jaccard index matrix estimation problem for incomplete data. Instead of throwing away the un-observed features or imputing the missing values, a completely different solution based on matrix calibration is designed. 3.1 Initial approximation For a sample Ai, denote by O+ i the set of features that are known to be in Ai, and denote by O− i the set of features that are known to be not in Ai. Let Oi = O+ i ∪O− i . If Oi = F, Ai is fully observed without missing values; otherwise, Ai is not fully observed with missing values. The complement of Oi with respect to F, denoted by Oi, gives Ai’s unknown features and missing values. For two samples Ai and Aj with missing values, we approximate their Jaccard index by: J0 ij = O+ i ∩Oj ∩ O+ j ∩Oi O+ i ∩Oj ∪ O+ j ∩Oi = O+ i ∩O+ j O+ i ∩Oj ∪ O+ j ∩Oi Here we assume that each sample has at least one observed feature. It is obvious that J0 ij is equal to the ground truth J∗ ij if the samples are fully observed. There exists an interval [ℓij, µij] that the true value J∗ ij lies in, where ℓij = 1, if i = j |O+ i ∩O+ j | O− i ∩O− j , otherwise and µij = 1, if i = j O− i ∪O− j |Oi∪Oj∪O+ i ∪O+ j |, otherwise . The lower bound ℓij is obtained from the extreme case of setting the missing values in a way that the two sets have the fewest features in their intersection while having the most features in their union. On the contrary, the upper bound µij is obtained from the other extreme. When the samples are fully observed, the interval shrinks to a single point ℓij = µij = J∗ ij. 3.2 Matrix calibration Denote by J∗= J∗ ij n ij=1 the true Jaccard index matrix for a set of data samples {A1, · · · , An}, we have [2]: Theorem 1. For a given set of data samples, its Jaccard index matrix J∗is positive semi-definite. For data samples with missing values, the matrix J0 = J0 ij n ij=1 often loses positive semidefiniteness. Nevertheless, it can be calibrated to ensure the property by seeking an n × n matrix J = {Jij}n ij=1 to minimize: L0 (J) =
J −J0
2 F subject to the constraints: J ⪰0, and, ℓij ≤Jij ≤µij (1 ≤i, j ≤n) where J ⪰0 requires J to be positive semi-definite and ∥·∥F denotes the Frobenius norm of a matrix and ∥J∥2 F = P ij J2 ij. Let Mn be the set of n × n symmetric matrices. The feasible region defined by the constraints, denoted by R, is a nonempty closed and convex subset of Mn. Following standard results in optimization theory [20, 3, 10], the problem of minimizing L0 (J) is convex. Denote by PR the projection onto R. Its unique solution is given by the projection of J0 onto R: J0 R = PR J0 . For J0 R, we have: 3 Theorem 2.
J∗−J0 R
2 F ≤
J∗−J0
2 F . The equality holds iff J0 ∈R, i.e., J0 = J0 R. Proof. Define an inner product on Mn that induces the Frobenius norm: ⟨X, Y ⟩= trace XT Y , for X, Y ∈Mn. Then
J∗−J0
2 F =
J∗−J0 R − J0 −J0 R
2 F =
J∗−J0 R
2 F +
J0 −J0 R
2 F −2 J∗−J0 R, J0 −J0 R ≥
J∗−J0 R
2 F −2 J∗−J0 R, J0 −J0 R ≥
J∗−J0 R
2 F The second “≥” holds due to the Kolmogrov’s criterion, which states that the projection of J0 onto R, J0 R, is unique and characterized by: J0 R ∈R, and J −J0 R, J0 −J0 R ≤0 for all J ∈R. The equality holds iff
J0 −J0 R
2 F = 0 and J∗−J0 R, J0 −J0 R = 0, i.e., J0 = J0 R . This key observation shows that projecting J0 onto the feasible region R will produce an improved estimate towards J∗, although this ground truth matrix remains unknown to us. 3.3 Projection onto subsets Based on the results in Section 3.2, we are to seek a minimizer to L0 (J) to improve the estimate J0. Define two nonempty closed and convex subsets of Mn: S = {X|X ∈Mn, X ⪰0} and T = {X|X ∈Mn, ℓij ≤Xij ≤µij (1 ≤i, j ≤n)} . Obviously R = S ∩T. Now our minimization problem becomes finding the projection of J0 onto the intersection of two sets S and T with respect to the Frobenius norm. This can be done by studying the projection onto the two sets individually. Denote by PS the projection onto S, and PT the projection onto T. For projection onto T, a straightforward result based on the Kolmogrov’s criterion is: Theorem 3. For a given matrix X ∈Mn, its projection onto T, XT = PT (X), is given by (XT )ij = Xij, if ℓij ≤Xij ≤µij ℓij, if Xij < ℓij µij, if Xij > µij . For projection onto S, a well known result is the following [12, 16, 13]: Theorem 4. For X ∈Mn and its singular value decomposition X = UΣV T where Σ = diag (λ1, · · · , λn), the projection of X onto S is given by: XS = PS (X) = UΣ′V T where Σ′ = diag (λ′ 1, · · · , λ′ n) and λ′ i = λi, if λi ≥0 0, otherwise . The matrix XS = PS (X) gives the positive semi-definite matrix that most closely approximates X with respect to the Frobenius norm. 4 3.4 Dykstra’s algorithm To study the orthogonal projection onto the intersection of subspaces, a classical result is von Neumann’s alternating projection algorithm. Let H be a Hilbert space with two closed subspaces C1 and C2. The orthogonal projection onto the intersection C1 ∩C2 can be obtained by the product of the two projections PC1PC2 when the two projections commute (PC1PC2 = PC2PC1). When they do not commute, the work shows that for each x0 ∈H, the projection of x0 onto the intersection can be obtained by the limit point of a sequence of projections onto each subspace respectively: limk→∞(PC2PC1)k x0 = PC1∩C2 x0 . The algorithm generalizes to any finite number of subspaces and projections onto them. Unfortunately, different from the application in [19], in our problem both S and T are not subspaces but subsets, and von Neumann’s convergence result does not apply. The limit point of the generated sequence may converge to non-optimal points. To handle the difficulty, Dykstra extended von Neumann’s work and proposed an algorithm that works with subsets [9]. Consider the case of C = Tr i=1 Ci where C is nonempty and each Ci is a closed and convex subset in H. Assume that for any x ∈H, obtaining PC (x) is hard, while obtaining each PCi (x) is easy. Starting from x0 ∈H, Dykstra’s algorithm produces two sequences, the iterates xk i and the increments Ik i . The two sequences are generated by: xk 0 = xk−1 r xk i = PCi xk i−1 −Ik−1 i Ik i = xk i − xk i−1 −Ik−1 i where i = 1, · · · , r and k = 1, 2, · · · . The initial values are given by x0 r = x0, I0 i = 0. The sequence of xk i converges to the optimal solution with a theoretical guarantee [9, 10]. Theorem 5. Let C1, · · · , Cr be closed and convex subsets of a Hilbert space H such that C = rT k=1 Ck ̸= Φ. For any i = 1, · · · , r and any x0 ∈H, the sequence xk i converges strongly to x0 C = PC x0 (i.e.
xk i −x0 C
→0 as k →∞). The convergent rate of Dykstra’s algorithm for polyhedral sets is linear [7], which coincides with the convergence rate of von Neumann’s alternating projection method. 3.5 An iterative method Based on the discussion in Section 3.4, we have a simple approach, shown in Algorithm 1, that finds the projection of an initial matrix J0 onto the nonempty set R = S ∩T. Here the projections onto S and T are given by the two theorems in Section 3.3. The algorithm stops when Jk falls into the feasible region or when a maximal number of iterations is achieved. For practical implementation, a more robust stopping criterion can be adopted [1]. 3.6 Related work It is a known study in mathematical optimization field to find a positive semi-definite matrix that is closest to a given matrix. A number of methods have been proposed recently. The idea of alternating projection method was firstly applied in a financial application [13]. The problem can also be phrased as a semi-definite programming (SDP) model [13] and be solved via the interior-point method. In the work of [21] and [4], the quasi-Newton method and the projected gradient method to the Lagrangian dual of the original problem were applied, which reported faster results than the SDP formulation. An even faster Newton’s method was developed in [22] by investigating the dual problem, which is unconstrained with a twice continuously differentiable objective function and has a quadratically convergent solution. 5 Algorithm 1 Projection onto R = S ∩T Require: Initial matrix J0 k = 0 J0 T = J0 I0 S = 0 I0 T = 0 while NOT CONVERGENT do Jk+1 S = PS Jk T −Ik S Ik+1 S = Jk+1 S − Jk T −Ik S Jk+1 T = PT Jk+1 S −Ik T Ik+1 T = Jk+1 T − Jk+1 S −Ik T k = k + 1 end while return Jk = Jk T 4 Evaluation To evaluate the performance of the proposed method, four benchmark datasets were used in our experiments. • MNIST: a grayscale image database of handwritten digits (“0” to “9”). After binarization, each image is represented as a 784-dimensional 0-1 vector. • USPS: another grayscale image database of handwritten digits. After binarization, each image is represented as a 256-dimensional 0-1 vector. • PROTEIN: a bioinformatics database with three classes of instances. Each instance is represented as a sparse 357-dimensional 0-1 vector. • WEBSPAM: a dataset with both spam and non-spam web pages. Each page is represented as a 0-1 vector. The data are highly sparse. On average one vector has about 4, 000 non-zero values out of more than 16 million features. Our experiments have two objectives. One is to verify the effectiveness of the proposed method in estimating the Jaccard index matrix by measuring the derivation of the calibrated matrix from the ground truth in Frobenius norm. The other is to evaluate the performance of the calibrated matrix in general learning applications. The comparison is made against the popular imputation approaches listed in Section 2.2, including the zero, kNN and EM 1 approaches. (As the median approach gave very similar performance as the zero approach, its results were not reported separately.) 4.1 Jaccard index matrix estimation The experiment was carried out under various settings. For each dataset, we experimented with 1, 000 and 10, 000 samples respectively. For each sample, different portions (from 10% to 90%) of feature values were marked as missing, which was assumed to be “missing at random” and all features had the same probability of being marked. As mentioned in Section 3, for the proposed calibration approach, an initial Jaccard index matrix was firstly built based on the incomplete data. Then the matrix was calibrated to meet the positive semi-definite requirement and the lower and upper bounds requirement. While for the imputation approaches, the Jaccard index matrix was calculated directly from the imputed data. Note that for the kNN approach, we iterated different k from 1 to 5 and the best result was collected, which actually overestimated its performance. Under some settings, the results of the EM approach were not available due to its prohibitive computational requirement to our platform. The results are presented through the comparison of mean square deviations from the ground truth of the Jaccard index matrix J∗. For an n × n estimated matrix J′, its mean square deviation from 1ftp://ftp.cs.toronto.edu/pub/zoubin/old/EMcode.tar.Z 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features Mean Square Deviation (log−scale) Mean Square Deviation (1,000 Samples) ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (a) MNIST 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features 0HDQ6TXDUH'HYLDWLRQ (log−scale) .FBO4RVBSF%FWJBUJPO (1,000 Samples) ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (b) USPS 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features Mean Square Deviation (log−scale) Mean Square Deviation (1,000 Samples) ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (c) PROTEIN 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −5 10 −4 10 −3 10 −2 Ratio of Observed Features 0HDQ6TXDUH'HYLDWLRQ (log−scale) .FBO4RVBSF%FWJBUJPO (1,000 Samples) ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (d) WEBSPAM 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features Mean Square Deviation (log−scale) Mean Square Deviation (10,000 Samples) ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (e) MNIST 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features 0HDQ6TXDUH'HYLDWLRQ (log−scale) .FBO4RVBSF%FWJBUJPO (10,000 Samples) ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (f) USPS 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −4 10 −3 10 −2 10 −1 Ratio of Observed Features Mean Square Deviation (log−scale) Mean Square Deviation (10,000 Samples) ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (g) PROTEIN 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 −5 10 −4 10 −3 10 −2 Ratio of Observed Features 0HDQ6TXDUH'HYLDWLRQ (log−scale) .FBO4RVBSF%FWJBUJPO (10,000 Samples) ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (h) WEBSPAM Figure 1: Mean square deviations from the ground truth on benchmark datasets by different methods. Horizontal: percentages of observed values (from 10% to 90%); Vertical: mean square deviations in log-scale. (a)-(d): 1, 000 samples; (e)-(f): 10, 000 samples. (For better visualization effect of the results shown in color, the reader is referred to the soft copy of this paper.) J∗is defined as the square Frobenius distance between the two matrices, divided by the number of elements, i.e., Pn ij=1(J′ ij−J∗ ij) 2 n2 . In addition to the comparison with the popular approaches, the mean square deviation between the un-calibrated matrix J0 and J∗, shown as NO CALIBRATION, is also reported as a baseline. Figure 1 shows the results. It can be seen that the calibrated matrices reported the smallest derivation from the ground truth in nearly all experiments. The improvement is especially significant when the ratio of observed features is low (the missing ratio is high). It is guaranteed to be no worse than the un-calibrated matrix. As evidenced in the results, for all the imputation approaches, there is no such a guarantee. 4.2 Supervised learning Knowing the improved results in reducing the deviation from the ground truth matrix, we would like to further investigate whether this improvement indeed benefits practical applications, specifically in supervised learning. We applied the calibrated results in nearest neighbor classification tasks. Given a training set of labeled samples, we tried to predict the labels of the samples in the testing set. For each testing sample, its label was determined by the label of the sample in the training set that had the largest Jaccard index value with it. Similarly the experiment was carried out with 1, 000/10, 000 samples and different portions of missing values from 10% to 90% respectively. In each run, 90% of the samples were randomly chosen as the training set and the remaining 10% were used as the testing set. The mean and standard deviation of the classification errors in 1, 000 runs were reported. As a reference, the results from the ground truth matrix J∗, shown as FULLY OBSERVED, were also included. Figure 2 shows the results. Again the matrix calibration method reported evidently improved results over the imputation approaches in most experiments. The improvement verified the benefits brought by the reduced deviation from the true Jaccard index matrix, and therefore justified the usefulness of the proposed method in learning applications. 7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Ratio of Observed Features Classification Error Classification Error (1,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (a) MNIST 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Ratio of Observed Features Classification Error Classification Error (1,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (b) USPS 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.5 0.55 0.6 0.65 0.7 0.75 0.8 Ratio of Observed Features Classification Error Classification Error (1,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (c) PROTEIN 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 Ratio of Observed Features Classification Error Classification Error (1,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (d) WEBSPAM 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Ratio of Observed Features Classification Error Classification Error (10,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (e) MNIST 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Ratio of Observed Features Classification Error Classification Error (10,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN EM NO_CALIBRATION CALIBRATION (f) USPS 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.4 0.45 0.5 0.55 0.6 0.65 Ratio of Observed Features Classification Error Classification Error (10,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (g) PROTEIN 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 Ratio of Observed Features Classification Error Classification Error (10,000 Samples) FULLY_OBSERVED ZERO/MEDIAN kNN NO_CALIBRATION CALIBRATION (h) WEBSPAM Figure 2: Classification errors on benchmark datasets by different methods. Horizontal: percentage of observed values (from 10% to 90%); Vertical: classification errors. (a)-(d): 1, 000 samples; (e)(f): 10, 000 samples. (For better visualization effect of the results shown in color, the reader is referred to the soft copy of this paper.) 5 Discussion and conclusion The Jaccard index measures the pairwise similarity between data samples, which is routinely used in real applications. Unfortunately in practice, it is non-trivial to estimate the Jaccard index matrix for incomplete data samples. This paper investigates the problem, and proposes a matrix calibration approach in a way that is completely different from the existing methods. Instead of throwing away the unknown features or imputing the missing values, the proposed approach calibrates any approximate Jaccard index matrix by ensuring the positive semi-definite requirement on the matrix. It is theoretically shown and empirically verified that the approach indeed brings about improvement in practical problems. One point that is not particularly addressed in this paper is the computational complexity issue. We adopted a simple alternating projection procedure based on Dykstra’s algorithm. The computational complexity of the algorithm heavily depends on the successive matrix decompositions. It is expensive when the size of the matrix becomes large. Calibrating a Jaccard index matrix for 1, 000 samples can be finished in seconds of time on our platform, while calibrating a matrix for 10, 000 samples quickly increases to more than an hour. Further investigations for faster solutions are thus necessary for scalability. Actually, there is a simple divide-and-conquer heuristic to calibrate a large matrix. Firstly divide the matrix into small sub-matrices. Then calibrate each sub-matrix to meet the constraints. Finally merge the results. Although the heuristic may not give the optimal result, it also guarantees to produce a matrix better than or identical to the un-calibrated matrix. The heuristic runs with high parallel efficiency and easily scales to very large matrices. The detailed discussion is omitted here due to the space limit. Acknowledgments The work is supported by The Science and Technology Development Fund (Project No. 006/2014/A), Macao SAR, China. 8 References [1] E.G. Birgin and M. Raydan. Robust stopping criteria for Dykstra’s algorithm. SIAM Journal on Scientific Computing, 26(4):1405–1414, 2005. [2] M. Bouchard, A.L. Jousselme, and P.E. Dor´e. A proof for the positive definiteness of the Jaccard index matrix. International Journal of Approximate Reasoning, 54(5):615–626, 2013. [3] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, New York, NY, USA, 2004. [4] S. Boyd and L. Xiao. Least-squares covariance matrix adjustment. SIAM Journal on Matrix Analysis and Applications, 27(2):532–546, 2005. [5] A.Z. Broder, M. Charikar, A.M. Frieze, and M. Mitzenmacher. Min-wise independent permutations. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, pages 327–336. ACM, 1998. [6] A.P. Dempster, N.M. Laird, and D.B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B, 39:1–38, 1977. [7] F. Deutsch. Best Approximation in Inner Product Spaces. Springer, New York, NY, USA, 2001. [8] R.O. Duda and P.E. Hart. Pattern Classification. John Wiley and Sons, Hoboken, NJ, USA, 2000. [9] R.L. Dykstra. An algorithm for restricted least squares regression. Journal of the American Statistical Association, 78(384):837–842, 1983. [10] R. Escalante and M. Raydan. Alternating Projection Methods. SIAM, Philadelphia, PA, USA, 2011. [11] Z. Ghahramani and M.I. Jordan. Supervised learning from incomplete data via an EM approach. In Advances in Neural Information Processing Systems, volume 6, pages 120–127. Morgan Kaufmann, 1994. [12] G.H. Golub and C.F. Van Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, MD, USA, 1996. [13] N.J. Higham. Computing the nearest correlation matrix - a problem from finance. IMA Journal of Numerical Analysis, 22:329–343, 2002. [14] P. Jaccard. The distribution of the flora in the alpine zone. New Phytologist, 11(2):37–50, 1912. [15] A.K. Jain, M.N. Murty, and P.J. Flynn. Data clustering: A review. ACM Computing Surveys, 31(3):264– 323, 1999. [16] D.L. Knol and J.M.F. ten Berge. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 54(1):53–61, 1989. [17] J. Leskovec, A. Rajaraman, and J. Ullman. Mining of Massive Datasets. Cambridge University Press, New York, NY, USA, 2014. [18] P. Li and A.C. K¨onig. Theory and applications of b-bit minwise hashing. Communications of the ACM, 54(8):101–109, 2011. [19] W. Li, K.H. Lee, and K.S. Leung. Large-scale RLSC learning without agony. In Proceedings of the 24th International Conference on Machine Learning, pages 529–536. ACM, 2007. [20] D.G. Luenberger. Optimization by Vector Space Methods. John Wiley & Sons, New York, NY, USA, 1969. [21] J. Malick. A dual approach to semidefinite least-squares problems. SIAM Journal on Matrix Analysis and Applications, 26(1):272–284, 2004. [22] H. Qi and D. Sun. A quadratically convergent newton method for computing the nearest correlation matrix. SIAM Journal on Matrix Analysis and Applications, 28(2):360–385, 2006. [23] D.J. Rogers and T.T. Tanimoto. A computer program for classifying plants. Science, 132(3434):1115– 1118, 1960. [24] G. Salton, A. Wong, and C.S. Yang. A vector space model for automatic indexing. Communications of the ACM, 18(11):613–620, 1975. [25] B. Scholk¨opf and A.J. Smola. Learning With Kernels, Support Vector Machines, Regularization, Optimization, and Beyond. The MIT Press, Cambridge, MA, USA, 2001. 9 | 2015 | 267 |
5,777 | On Top-k Selection in Multi-Armed Bandits and Hidden Bipartite Graphs Wei Cao1 Jian Li1 Yufei Tao2 Zhize Li1 1Tsinghua University 2Chinese University of Hong Kong 1{cao-w13@mails, lijian83@mail, zz-li14@mails}.tsinghua.edu.cn 2taoyf@cse.cuhk.edu.hk Abstract This paper discusses how to efficiently choose from n unknown distributions the k ones whose means are the greatest by a certain metric, up to a small relative error. We study the topic under two standard settings—multi-armed bandits and hidden bipartite graphs—which differ in the nature of the input distributions. In the former setting, each distribution can be sampled (in the i.i.d. manner) an arbitrary number of times, whereas in the latter, each distribution is defined on a population of a finite size m (and hence, is fully revealed after m samples). For both settings, we prove lower bounds on the total number of samples needed, and propose optimal algorithms whose sample complexities match those lower bounds. 1 Introduction This paper studies a class of problems that share a common high-level objective: from a number n of probabilistic distributions, find the k ones whose means are the greatest by a certain metric. Crowdsourcing. A crowdsourcing algorithm (see recent works [1, 13] and the references therein) summons a certain number, say k, of individuals, called workers, to collaboratively accomplish a complex task. Typically, the algorithm breaks the task into a potentially very large number of micro-tasks, each of which makes a binary decision (yes or no) by taking the majority vote from the participating workers. Each worker is given an (often monetary) reward for every micro-task that s/he participates in. It is therefore crucial to identify the most reliable workers that have the highest rates of making correct decisions. Because of this, a crowdsourcing algorithm should ideally be preceded by an exploration phase, which selects the best k workers from n candidates by a series of “control questions”. Every control-question must be paid for in the same way as a micro-task. The challenge is to find the best workers with the least amount of money. Frequent Pattern Discovery. Let B and W be two relations. Given a join predicate Q(b, w), the joining power of a tuple b ∈B equals the number of tuples w ∈W such that b and w satisfy Q. A top-k semi-join [14, 17] returns the k tuples in B with the greatest joining power. This type of semijoins is notoriously difficult to process when the evaluation of Q is complicated, and thus unfriendly to tailored-made optimization. A well-known example from graph databases is the discovery of frequent patterns [14], where B is a set of graph patterns, W a set of data graphs, and Q(b, w) decides if a pattern b is a subgraph of a data graph w. In this case, top-k semi-join essentially returns the set of k graph patterns most frequently found in the data graphs. Given a black box for resolving subgraph isomorphism Q(b, w), the challenge is to minimize the number of calls to the black box. We refer to the reader to [14, 15] for more examples of difficult top-k semi-joins of this sort. 1.1 Problem Formulation The paper studies four problems that capture the essence of the above applications. Multi-Armed Bandit. We consider a standard setting of stochastic multi-armed bandit selection. Specifically, there is a bandit with a set B of n arms, where the i-th arm is associated with a Bernoulli 1 distribution with an unknown mean θi ∈(0, 1]. In each round, we choose an arm, pull it, and then collect a reward, which is an i.i.d. sample from the arm’s reward distribution. Given a subset V ⊆B of arms, we denote by ai(V ) the arm with the i-th largest mean in V , and by θi(V ) the mean of ai(V ). Define θavg(V ) = 1 k Pk i=1 θi(V ), namely, the average of the means of the top-k arms in V . Our first two problems aim to identify k arms whose means are the greatest either individually or aggregatively: Problem 1 [Top-k Arm Selection (k-AS)] Given parameters ϵ ∈ 0, 1 4 , δ ∈ 0, 1 48 , and k ≤ n/2, we want to select a k-sized subset V of B such that, with probability at least 1−δ, it holds that θi(V ) ≥(1 −ϵ)θi(B), ∀i ≤k. We further study a variation of k-AS where we change the multiplicative guarantee θi(V ) ≥(1 − ϵ)θi(B) to an additive guarantee θi(V ) ≥θi(B) −ϵ′. We refer to the modified problem as Topkadd Arm Selection(kadd-AS). Due to the space constraint, we present all the details of kadd-AS in Appendix C. Problem 2 [Top-kavg Arm Selection (kavg-AS)] Given the same parameters as in k-AS, we want to select a k-sized subset V of B such that, with probability at least 1 −δ, it holds that θavg(V ) ≥(1 −ϵ)θavg(B). For both problems, the cost of an algorithm is the total number of arms pulled, or equivalently, the total number of samples drawn from the arms’ distributions. For this reason, we refer to the cost as the algorithm’s sample complexity. It is easy to see that k-AS is more stringent than kavg-AS; hence, a feasible solution to the former is also a feasible solution to the latter, but not the vice versa. Hidden Bipartite Graph. The second main focus of the paper is the exploration of hidden bipartite graphs. Let G = (B, W, E) be a bipartite graph, where the nodes in B are colored black, and those in W colored white. Set n = |B| and m = |W|. The edge set E is hidden in the sense that an algorithm does not see any edge at the beginning. To find out whether an edge exists between a black vertex b and a white vertex w, the algorithm must perform a probe operation. The cost of the algorithm equals the number of such operations performed. If an edge exists between b and w, we say that there is a solid edge between them; otherwise, we say that they have an empty edge. Let deg(b) be the degree of a black vertex b, namely, the number of solid edges of b. Given a subset of black vertices V ⊆B, we denote by bi(V ) the black vertex with i-th largest degree in V , and by degi(V ) the degree of bi(V ). Furthermore, define degavg(V ) = 1 k Pk i=1 degi(V ). We now state the other two problems studied in this work, which aim to identify k black vertices whose degrees are the greatest either individually or aggregatively: Problem 3 [k-Most Connected Vertex [14] (k-MCV)] Given parameters ϵ ∈ 0, 1 4 , δ ∈ 0, 1 48 , and k ≤n/2, we want to select a k-sized subset V of B such that, with probability at least 1 −δ, it holds that degi(V ) ≥(1 −ϵ) degi(B), ∀i ≤k. Problem 4 [kavg-Most Connected Vertex (kavg-MCV)] Given the same parameters as in k-MCV, we want to select a k-sized subset V of B such that, with probability at least 1 −δ, it holds that degavg(V ) ≥(1 −ϵ) degavg(B). A feasible solution to k-MCV is also feasible for kavg-MCV, but not the vice versa. We will refer to the cost of an algorithm also as its sample complexity, by regarding a probe operation as “sampling” the edge probed. For any deterministic algorithm, the adversary can force the algorithm to always probe Ω(mn) edges. Hence, we only consider randomized algorithms. k-MCV can be reduced to k-AS. Given a hidden bipartite graph (B, W, E), we can treat every black vertex b ∈B as an “arm” associated with a Bernoulli reward distribution: the reward is 1 with probability deg(b)/m (recall m = |W|), and 0 with probability 1−deg(b)/m. Any algorithm A for k-AS can be deployed to solve k-MCV as follows. Whenever A samples from arm b, we randomly choose a white vertex w ∈W, and probe the edge between b and w. A reward of 1 is returned to A if and only if the edge exists. 2 k-AS and k-MCV differ, however, in the size of the population that a reward distribution is defined on. For k-AS, the reward of each arm is sampled from a population of an indefinite size, which can even be infinite. Consequently, k-AS nicely models situations such as the crowdsourcing application mentioned earlier. For k-MCV, the reward distribution of each “arm” (i.e., a black vertex b) is defined on a population of size m = |W| (i.e., the edges of b). This has three implications. First, k-MCV is a better modeling of applications like top-k semi-join (where an edge exists between b ∈B and w ∈W if and only if Q(b, w) is true). Second, the problem admits an obvious algorithm with cost O(nm) (recall n = |B|): simply probe all the hidden edges. Third, an algorithm never needs to probe the same edge between b and w twice—once probed, whether the edge is solid or empty is perpetually revealed. We refer to the last implication as the history-awareness property. The above discussion on k-AS and k-MCV also applies to kavg-AS and kavg-MCV. For each of above problems, we refer to an algorithm which achieves the precision and failure requirements prescribed by ϵ and δ as an (ϵ, δ)-approximate algorithm. 1.2 Previous Results Problem 1. Sheng et al. [14] presented an algorithm1 that solves k-AS with expected cost O( n ϵ2 1 θk(B) log n δ ). No lower bound is known on the sample complexity of k-AS. The closest work is due to Kalyanakrishnan et al. [11]. They considered the EXPLORE-k problem, where the goal is to return a set V of k arms such that, with probability at least 1 −δ, the mean of each arm in V is at least θk(B) −ϵ′. They showed an algorithm with sample complexity Θ( n ϵ′2 log k δ ) in expectation and establish a matching lower bound. Note that EXPLORE-k ensures an absolute-error guarantee, which is weaker than the individually relative-error guarantee of k-AS. Therefore, the same EXPLORE-k lower bound also applies to k-AS. The readers may be tempted to set ϵ′ = ϵ · θk(B) to derive a “lower bound” of Ω( n ϵ2 1 (θk(B))2 log k δ ) for k-AS. This, however, is clearly wrong because when θk(B) = o(1) (a typical case in practice) this “lower bound” may be even higher than the upper bound of [14] mentioned earlier. The cause of the error lies in that the hard instance constructed in [11] requires θk(B) = Ω(1). Problem 2. The O( n ϵ2 1 θk(B) log n δ ) upper bound of [14] on k-AS carries over to kavg-AS (which, as mentioned before, can be solved by any k-AS algorithm). Zhou et al. [16] considered an OPTMAI problem whose goal is to find a k-sized subset V such that θavg(V ) −θavg(B) ≤ϵ′ holds with probability at least 1−δ. Note, once again, that this is an absolute-error guarantee, as opposed to the relative-error guarantee of kavg-AS. For OPTMAI, Zhou et al. presented an algorithm with sample complexity O( n ϵ′2 (1 + log(1/δ) k )) in expectation. Observe that if θavg(B) is available magically in advance, we can immediately apply the OPTMAI algorithm of [16] to settle kavg-AS by setting ϵ′ = ϵ · θavg(B). The expected cost of the algorithm becomes O( n ϵ2 1 (θavg(B))2 (1 + log(1/δ) k )) (which is suboptimal. See the table). No lower bound is known on the sample complexity of kavg-AS. For OPTMAI, Zhou et al. [16] proved a lower bound of Ω( n ϵ′2 (1 + log(1/δ) k )), which directly applies to kavg-AS due to its stronger quality guarantee. Problems 3 and 4. Both problems can be trivially solved with cost O(nm). Furthermore, as explained in Section 1.1, k-MCV and kavg-MCV can be reduced to k-AS and kavg-AS respectively. Indeed, the best existing k-AS and kavg-AS algorithms (surveyed in the above) serve as the state of the art for k-MCV and kavg-MCV, respectively. Prior to this work, no lower bound results were known for k-MCV and kavg-MCV. Note that none of the lower bounds for k-AS (or kavg-AS) is applicable to k-MCV (or kavg-MCV, resp.), because there is no reduction from the former problem to the latter. 1.3 Our Results We obtain tight upper and lower bounds for all of the problems defined in Section 1.1. Our main results are summarized in Table 1 (all bounds are in expectation). Next, we explain several highlights, and provide an overview into our techniques. 1The algorithm was designed for k-MCV, but it can be adapted to k-AS as well. 3 Table 1: Comparison of our and previous results (all bounds are in expectation) problem sample complexity source k-AS upper bound O n ϵ2 1 θk(B) log n δ [14] O n ϵ2 1 θk(B) log k δ new lower bound Ω n ϵ2 log k δ [11] Ω n ϵ2 1 θk(B) log k δ new O( n ϵ2 1 θk(B) log n δ ) [14] upper bound O n ϵ2 1 (θavg(B))2 1 + log(1/δ) k [16] kavg-AS O n ϵ2 1 θavg(B) 1 + log(1/δ) k new lower bound Ω n ϵ2 1 + log(1/δ) k [16] Ω n ϵ2 1 θavg(B) 1 + log(1/δ) k new k-MCV upper bound O min n n ϵ2 m degk(B) log n δ , nm o [14] O min n n ϵ2 m degk(B) log k δ , nm o new lower bound ( Ω n ϵ2 m degk(B) log k δ if degk(B) ≥Ω( 1 ϵ2 log n δ ) Ω(nm) if degk(B) < O( 1 ϵ ) new O min n n ϵ2 m degk(B) log n δ , nm o [14] upper bound O min n n ϵ2 m2 (degavg(B))2 1 + log(1/δ) k , nm o [16] kavg-MCV O min n n ϵ2 m degavg(B) 1 + log(1/δ) k , nm o new lower bound Ω n ϵ2 m degavg(B) 1 + log(1/δ) k if degavg(B) ≥Ω( 1 ϵ2 log n δ ) Ω(nm) if degavg(B) < O( 1 ϵ ) new k-AS. Our algorithm improves the log n factor of [14] to log k (in practice k ≪n), thereby achieving the optimal sample complexity (Theorem 1). Our analysis for k-AS is inspired by [8, 10, 11] (in particular the median elimination technique in [8]). However, the details are very different and more involved than the previous ones (the application of median elimination of [8] was in a much simpler context where the analysis was considerably easier). On the lower bound side, our argument is similar to that of [11], but we need to get rid of the θk(B) = Ω(1) assumption (as explained in Section 1.2), which requires several changes in the analysis (Theorem 2). kavg-AS. Our algorithm improves both existing solutions in [14, 16] significantly, noticing that both θk(B) and (θavg(B))2 are never larger, but can be far smaller, than θavg(B). This improvement results from an enhanced version of median elimination, and once again, requires a non-trivial analysis specific to our context (Theorem 4). Our lower bound is established with a novel reduction from the 1-AS problem (Theorem 5). It is worth nothing that the reduction can be used to simplify the proof of the lower bound in [16, Theorem 5.5] . k-MCV and kavg-MCV. The stated upper bounds for k-MCV and kavg-MCV in Table 1 can be obtained directly from our k-AS and kavg-AS algorithms. In contrast, all the lower-bound arguments for k-AS and kavg-AS—which crucially rely on the samples being i.i.d.—break down for the two MCV problems, due to the history-awareness property explained in Section 1.1. For k-MCV, we remedy the issue by (i) (when degk(B) is large) a reduction from k-AS, and (ii) (when degk(B) is small) a reduction from a sampling lower bound for distinguishing two extremely similar distributions (Theorem 3). Analogous ideas are deployed for kavg-MCV (Theorem 6). Note that for a small range of degk(B) (i.e., Ω( 1 ϵ ) < degk(B) < O( 1 ϵ2 log n δ )), we do not have the optimal lower bounds yet for k-MCV and kavg-MCV. Closing the gap is left as an interesting open problem. 4 Algorithm 1: ME-AS 1 input: B, ϵ, δ, k 2 for µ = 1/2, 1/4, . . . do 3 S = ME(B, ϵ, δ, µ, k); 4 {(ai, ˆθUS(ai)) | 1 ≤i ≤k} = US(S, ϵ, δ, (1 −ϵ/2)µ, k); 5 if ˆθUS(ak) ≥2µ then 6 return {a1, . . . , ak}; Algorithm 2: Median Elimination (ME) 1 input: B, ϵ, δ, µ, k 2 S1 = B, ϵ1 = ϵ/16, δ1 = δ/8, µ1 = µ, and ℓ= 1; 3 while |Sℓ| > 4k do 4 sample every arm a ∈Sℓfor Qℓ= (12/ϵ2 ℓ)(1/µℓ) log(6k/δℓ) times; 5 for each arm a ∈Sℓdo 6 its empirical value ˆθ(a) = the average of the Qℓsamples from a; 7 a1, . . . , a|Sℓ| = the arms sorted in non-increasing order of their empirical values; 8 Sℓ+1 = {a1, . . . , a|Sℓ|/2}; 9 ϵℓ+1 = 3ϵℓ/4, δℓ+1 = δℓ/2, µℓ+1 = (1 −ϵℓ)µℓ, and ℓ= ℓ+ 1; 10 return Sℓ; Algorithm 3: Uniform Sampling (US) 1 input: S, ϵ, δ, µs, k 2 sample every arm a ∈S for Q = (96/ϵ2)(1/µs) log(4|S|/δ) times; 3 for each arm a ∈S do 4 its US-empirical value ˆθUS(a) = the average of the Q samples from a; 5 a1, . . . , a|S| = the arms sorted in non-increasing order of their US-empirical values; 6 return {(a1, ˆθUS(a1)), . . . , (ak, ˆθUS(ak))} 2 Top-k Arm Selection In this section, we describe a new algorithm for the k-AS problem. We present the detailed analysis in Appendix B. Our k-AS algorithm consists of three components: ME-AS, Median Elimination (ME), and Uniform Sampling (US), as shown in Algorithms 1, 2, and 3, respectively. Given parameters B, ϵ, δ, k (as in Problem 1), ME-AS takes a “guess” µ (Line 2) on the value of θk(B), and then applies ME (Line 3) to prune B down to a set S of at most 4k arms. Then, at Line 4, US is invoked to process S. At Line 5, (as will be clear shortly) the value of ˆθUS(ak) is what ME-AS thinks should be the value of θk(B); thus, the algorithm performs a quality check to see whether ˆθUS(ak) is larger than but close to µ. If the check fails, ME-AS halves its guess µ (Line 2), and repeats the above steps; otherwise, the output of US from Line 4 is returned as the final result. ME runs in rounds. Round ℓ(= 1, 2, ...) is controlled by parameters Sℓ, ϵℓ, δℓ, and µℓ(their values for Round 1 are given at Line 1). In general, Sℓis the set of arms from which we still want to sample. For each arm a ∈Sℓ, ME takes Qℓ(Line 4) samples from a, and calculates its empirical value ˆθ(a) (Lines 5 and 6). ME drops (at Lines 7 and 8) half of the arms in Sℓwith the smallest empirical values, and then (at Line 9) sets the parameters of the next round. ME terminates by returning Sℓas soon as |Sℓ| is at most 4k (Lines 3 and 10). US simply takes Q samples from each arm a ∈S (Line 2), and calculates its US-empirical value ˆθUS(a) (Lines 3 and 4). Finally, US returns the k arms in S with the largest US-empirical values (Lines 5 and 6). Remark. If we ignore Line 3 of Algorithm 1 and simply set S = B, then ME-AS degenerates into the algorithm in [14]. 5 Theorem 1 ME-AS solves the k-AS problem with expected cost O n ϵ2 1 θk(B) log k δ . We extends the proof in [11] and establish the lower bound for k-AS as shown in Theorem 2. Theorem 2 For any ϵ ∈ 0, 1 4 and δ ∈ 0, 1 48 , given any algorithm, there is an instance of the k-AS problem on which the algorithm must entail Ω( n ϵ2 1 θk(B) log k δ ) cost in expectation. 3 k-MOST CONNECTED VERTEX This section is devoted to the k-MCV problem (Problem 3). We will focus on lower bounds because our k-AS algorithm in the previous section also settles k-MCV with the cost claimed in Table 1 by applying the reduction described in Section 1.1. We establish matching lower bounds below: Theorem 3 For any ϵ ∈ 0, 1 12 and δ ∈ 0, 1 48 , the following statements are true about any k-MCV algorithm: • when degk(B) ≥Ω 1 ϵ2 log n δ , there is an instance on which the algorithm must probe Ω( n ϵ2 m degk(B) log k δ ) edges in expectation. • when degk(B) < O( 1 ϵ ), there is an instance on which the algorithm must probe Ω(nm) edges in expectation. For large degk(B) in Theorem 3, we utilize an instance for k-AS to construct a random hidden bipartite graph and fed it to any algorithm solves k-MCV. By doing this, we reduce k-AS to kMCV and thus, establish our first lower bound. For small degk(B), we define the single-vertex problem where the goal is to distinguish two extremely distributions. We prove the lower bound of single-vertex problem and reduce it to k-MCV. Thus, we establish our second lower bound. The details are presented in Appendix D. 4 Top-kavg Arm Selection Our kavg-AS algorithm QE-AS is similar to ME-AS described in Section 2, except that the parameters are adjusted appropriately, as shown in Algorithm 4, 5, 6 respectively. We present the details in Appendix E. Theorem 4 QE-AS solves the kavg-AS problem with expected cost O n ϵ2 1 θavg(B) 1 + log(1/δ) k . We establish the lower bound for kavg-AS as shown in Theorem 5. Theorem 5 For any ϵ ∈ 0, 1 12 and δ ∈ 0, 1 48 , given any (ϵ, δ)-approximate algorithm, there is an instance of the kavg-AS problem on which the algorithm must entail Ω n ϵ2 1 θavg(B) 1 + log(1/δ) k cost in expectation. We show that the lower bound of kavg-AS is the maximum of Ω n ϵ2 1 θavg(B) log(1/δ) k and Ω n ϵ2 1 θavg(B) . Our proof of the first lower bound is based on a novel reduction from 1-AS. We stress that our reduction can be used to simplify the proof of the lower bound in [16, Theorem 5.5]. 5 kavg-MOST CONNECTED VERTEX Our kavg-AS algorithm, combined with the reduction described in Section 1.1, already settles kavgMCV with the sample complexity given in Table 1. We establish the following lower bound and prove it in Appendix F. Theorem 6 For any ϵ ∈ 0, 1 12 and δ ∈ 0, 1 48 , the following statements are true about any kavg-MCV algorithm: • when degavg(B) ≥Ω 1 ϵ2 log n δ , there is an instance on which the algorithm must probe Ω n ϵ2 m degavg(B) 1 + log(1/δ) k edges in expectation. • when degk(B) < O( 1 ϵ ), there is an instance on which the algorithm must probe Ω(nm) edges in expectation. 6 Algorithm 4: QE-AS 1 input: B, ϵ, δ, k 2 for µ = 1/2, 1/4, . . . do 3 S = QE(B, ϵ, δ, µ, k); 4 {(ai | 1 ≤i ≤k), ˆθUS avg } = US(S, ϵ, δ, (1 −ϵ/2)µ, k); 5 if ˆθUS avg ≥2µ then 6 return {a1, . . . , ak}; Algorithm 5: Quartile Elimination (QE) 1 input: B, ϵ, δ, µ, k 2 S1 = B, ϵ1 = ϵ/32, δ1 = δ/8, µ1 = µ, and ℓ= 1; 3 while |Sℓ| > 4k do 4 sample every arm a ∈Sℓfor Qℓ= (48/ϵ2 ℓ)(1/µℓ) 1 + log(2/δℓ) k times; 5 for each arm a ∈Sℓdo 6 its empirical value ˆθ(a) = the average of the Qℓsamples from a; 7 a1, . . . , a|Sℓ| = the arms sorted in non-increasing order of their empirical values; 8 Sℓ+1 = {a1, . . . , a3|Sℓ|/4}; 9 ϵℓ+1 = 7ϵℓ/8, δℓ+1 = δℓ/2, µℓ+1 = (1 −ϵℓ)µℓ, and ℓ= ℓ+ 1; 10 return Sℓ; Algorithm 6: Uniform Sampling (US) 1 input: S, ϵ, δ, µs, k 2 sample every arm a ∈S for Q = (120/ϵ2)(1/µs) 1 + log(4/δ) k times; 3 for each arm a ∈S do 4 its US-empirical value ˆθUS(a) = the average of the Q samples from a; 5 a1, . . . , a|S| = the arms sorted in non-increasing order of their US-empirical values; 6 return {(a1, . . . , ak), ˆθUS avg = 1 k Pk i=1 ˆθUS(ai)} 6 Experiment Evaluation Due to the space constraint, we show only the experiments that compare ME-AS and AMCV [14] for k-MCV problem. Additional experiments can be found in Appendix G. We use two synthetic data sets and one real world data set to evaluate the algorithms. Each dataset is represented as a bipartite graph with n = m = 5000. For the synthetic data, the degrees of the black vertices follow a power law distribution. For each black vertex b ∈B, its degree equals d with probability c(d+1)−τ where τ is the parameter to be set and c is the normalizing factor. Furthermore, for each black vertex with degree d, we connected it to d randomly selected white vertices. Thus, we build two bipartite graphs by setting the proper parameters in order to control the average degrees of the black vertices to be 50 and 3000 respectively. For the real world data, we crawl 5000 active users from twitter with their corresponding relationships. We construct a bipartite graph G = (B, W, E) where each of B and W represents all the users and E represents the 2-hop relationships. We say two users b ∈B and w ∈W have a 2-hop relationship if they share at least one common friend. As the theoretical analysis is rather pessimistic due to the extensive usage of the union bound, to make a fair comparison, we adopt the same strategy as in [14], i.e., to divide the sample cost in theory by a heuristic constant ξ. We use the same parameter ξ = 2000 for AMCV as in [14]. For ME-AS, we first take ξ = 107 for each round of the median elimination step and then we use the previous sample cost dividing 250 as the samples of the uniform sampling step. Notice that it does not conflict the theoretical sample complexity since the median elimination step dominates the sample complexity of the algorithm. We fix the parameters δ = 0.1, k = 20 and enumerate ϵ from 0.01 to 0.1. We then calculate the actual failure probability by counting the successful runs in 100 repeats. Recall that due to the heuristic nature, the algorithm may not achieve the theoretical guarantees prescribed by (ϵ, δ). 7 Whenever this happens, we label the percentage of actual error ϵa it achieves according to the failure probability δ. For example 2.9 means the algorithm actually achieves an error ϵa = 0.029 with failure probability δ. The experiment result is shown in Fig 1. 0.01 0.03 0.05 0.07 0.09 ϵ 105 106 107 108 sample cost 2.9 5.6 8.5 11.0 16.3 19.2 18.9 26.2 28.0 11.0 12.1 13.9 15.5 AMCV ME-AS (a) Power law with ¯ deg = 50 0.01 0.03 0.05 0.07 0.09 ϵ 105 106 107 108 sample cost 11.8 AMCV ME-AS (b) Power law with ¯ deg = 3000 0.01 0.03 0.05 0.07 0.09 ϵ 105 106 107 108 sample cost 3.7 9.3 12.1 16.3 18.0 22.7 23.1 27.6 29.5 5.7 7.4 8.6 9.9 11.2 12.8 AMCV ME-AS (c) 2-hop Figure 1: Performance comparison for k-MCV vs. ϵ As we can see, ME-AS outperforms AMCV in both sample complexity and the actual error in all data sets. We stress that in the worst case, it seems ME-AS only shows a difference when n ≫k. However for the most of the real world data, the degrees of the vertices usually follow a power law distribution or a Gaussian distribution. For such cases, our algorithm only needs to take a few samples in each round of the elimination step and drops half of vertices with high confidence. Therefore, the experimental result shows that the sample cost of ME-AS is much less than AMCV. 7 Related Work Multi-armed bandit problems are classical decision problems with exploration-exploitation tradeoffs, and have been extensively studied for several decades (dating back to 1930s). In this line of research, k-AS and kavg-AS fit into the pure exploration category, which has attracted significant attentions in recent years due to its abundant applications such as online advertisement placement [6], channel allocation for mobile communications [2], crowdsourcing [16], etc. We mention some closely related work below, and refer the interested readers to a recent survey [4]. Even-Dar et al. [8] proposed an optimal algorithm for selecting a single arm which approximates the best arm with an additive error at most ϵ (a matching lower bound was established by Mannor et al. [12]). Kalyanakrishnan et al. [10, 11] considered the EXPLORE-k problem which we mentioned in Section 1.2. They provided an algorithm with the sample complexity O( n ϵ2 log k δ ). Similarly, Zhou et al. [16] studied the OPTMAI problem which, again as mentioned in Section 1.2, is the absolute-error version of kavg-AS. Audibert et al. [2] and Bubeck et al. [4] investigated the fixed budget setting where, given a fixed number of samples, we want to minimize the so-called misidentification probability (informally, the probability that the solution is not optimal). Buckeck et al. [5] also showed the links between the simple regret (the gap between the arm we obtain and the best arm) and the cumulative regret (the gap between the reward we obtained and the expected reward of the best arm). Gabillon et al. [9] provide a unified approach UGapE for EXPLORE-k in both the fixed budget and the fixed confidence settings. They derived the algorithms based on “lower and upper confidence bound” (LUCB) where the time complexity depends on the gap between θk(B) and the other arms . Note that each time LUCB samples the two arms that are most difficult to distinguish. Since our problem ensures an individually guarantee, it is unclear whether only sampling the most difficult-to-distinguish arms would be enough. We leave it as an intriguing direction for future work. Chen et al. [6] studied how to select the best arms under various combinatorial constraints. Acknowledgements. Jian Li, Wei Cao, Zhize Li were supported in part by the National Basic Research Program of China grants 2015CB358700, 2011CBA00300, 2011CBA00301, and the National NSFC grants 61202009, 61033001, 61361136003. Yufei Tao was supported in part by projects GRF 4168/13 and GRF 142072/14 from HKRGC. 8 References [1] Y. Amsterdamer, S. B. Davidson, T. Milo, S. Novgorodov, and A. Somech. OASSIS: query driven crowd mining. In SIGMOD, pages 589–600, 2014. [2] J.-Y. Audibert, S. Bubeck, et al. Best arm identification in multi-armed bandits. COLT, 2010. [3] Z. Bar-Yossef. The complexity of massive data set computations. PhD thesis, University of California, 2002. [4] S. Bubeck, N. Cesa-Bianchi, et al. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and trends in machine learning, 5(1):1–122, 2012. [5] S. Bubeck, R. Munos, and G. Stoltz. Pure exploration in finitely-armed and continuous-armed bandits. Theoretical Computer Science, 412(19):1832–1852, 2011. [6] S. Chen, T. Lin, I. King, M. R. Lyu, and W. Chen. Combinatorial pure exploration of multiarmed bandits. In Advances in Neural Information Processing Systems, pages 379–387, 2014. [7] D. P. Dubhashi and A. Panconesi. Concentration of measure for the analysis of randomized algorithms. Cambridge University Press, 2009. [8] E. Even-Dar, S. Mannor, and Y. Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. The Journal of Machine Learning Research, 7:1079–1105, 2006. [9] V. Gabillon, M. Ghavamzadeh, and A. Lazaric. Best arm identification: A unified approach to fixed budget and fixed confidence. In Advances in Neural Information Processing Systems, pages 3212–3220, 2012. [10] S. Kalyanakrishnan and P. Stone. Efficient selection of multiple bandit arms: Theory and practice. In ICML, pages 511–518, 2010. [11] S. Kalyanakrishnan, A. Tewari, P. Auer, and P. Stone. PAC subset selection in stochastic multiarmed bandits. In ICML, pages 655–662, 2012. [12] S. Mannor and J. N. Tsitsiklis. The sample complexity of exploration in the multi-armed bandit problem. The Journal of Machine Learning Research, 5:623–648, 2004. [13] A. G. Parameswaran, S. Boyd, H. Garcia-Molina, A. Gupta, N. Polyzotis, and J. Widom. Optimal crowd-powered rating and filtering algorithms. PVLDB, 7(9):685–696, 2014. [14] C. Sheng, Y. Tao, and J. Li. Exact and approximate algorithms for the most connected vertex problem. TODS, 37(2):12, 2012. [15] J. Wang, E. Lo, and M. L. Yiu. Identifying the most connected vertices in hidden bipartite graphs using group testing. TKDE, 25(10):2245–2256, 2013. [16] Y. Zhou, X. Chen, and J. Li. Optimal PAC multiple arm identification with applications to crowdsourcing. In ICML, pages 217–225, 2014. [17] M. Zhu, D. Papadias, J. Zhang, and D. L. Lee. Top-k spatial joins. TKDE, 17(4):567–579, 2005. 9 | 2015 | 268 |
5,778 | Black-box optimization of noisy functions with unknown smoothness Jean-Bastien Grill Michal Valko SequeL team, INRIA Lille - Nord Europe, France jean-bastien.grill@inria.fr michal.valko@inria.fr R´emi Munos Google DeepMind, UK∗ munos@google.com Abstract We study the problem of black-box optimization of a function f of any dimension, given function evaluations perturbed by noise. The function is assumed to be locally smooth around one of its global optima, but this smoothness is unknown. Our contribution is an adaptive optimization algorithm, POO or parallel optimistic optimization, that is able to deal with this setting. POO performs almost as well as the best known algorithms requiring the knowledge of the smoothness. Furthermore, POO works for a larger class of functions than what was previously considered, especially for functions that are difficult to optimize, in a very precise sense. We provide a finite-time analysis of POO’s performance, which shows that its error after n evaluations is at most a factor of √ ln n away from the error of the best known optimization algorithms using the knowledge of the smoothness. 1 Introduction We treat the problem of optimizing a function f : X →R given a finite budget of n noisy evaluations. We consider that the cost of any of these function evaluations is high. That means, we care about assessing the optimization performance in terms of the sample complexity, i.e., the number of n function evaluations. This is typically the case when one needs to tune parameters for a complex system seen as a black-box, which performance can only be evaluated by a costly simulation. One such example, is the hyper-parameter tuning where the sensitivity to perturbations is large and the derivatives of the objective function with respect to these parameters do not exist or are unknown. Such setting fits the sequential decision-making setting under bandit feedback. In this setting, the actions are the points that lie in a domain X. At each step t, an algorithm selects an action xt ∈X and receives a reward rt, which is a noisy function evaluation such that rt = f(xt) + εt, where εt is a bounded noise with E [εt |xt ] = 0. After n evaluations, the algorithm outputs its best guess x(n), which can be different from xn. The performance measure we want to minimize is the value of the function at the returned point compared to the optimum, also referred to as simple regret, Rn def= sup x∈X f(x) −f (x (n)) . We assume there exists at least one point x⋆∈X such that f(x⋆) = supx∈X f(x). The relationship with bandit settings motivated UCT [10, 8], an empirically successful heuristic that hierarchically partitions domain X and selects the next point xt ∈X using upper confidence bounds [1]. The empirical success of UCT on one side but the absence of performance guarantees for it on the other, incited research on similar but theoretically founded algorithms [4, 9, 12, 2, 6]. As the global optimization of the unknown function without absolutely any assumptions would be a daunting needle-in-a-haystack problem, most of the algorithms assume at least a very weak ∗on the leave from SequeL team, INRIA Lille - Nord Europe, France 1 assumption that the function does not decrease faster than a known rate around one of its global optima. In other words, they assume a certain local smoothness property of f. This smoothness is often expressed in the form of a semi-metric ℓthat quantifies this regularity [4]. Naturally, this regularity also influences the guarantees that these algorithms are able to furnish. Many of them define a near-optimality dimension d or a zooming dimension. These are ℓ-dependent quantities used to bound the simple regret Rn or a related notion called cumulative regret. Our work focuses on a notion of such near-optimality dimension d that does not directly relate the smoothness property of f to a specific metric ℓbut directly to the hierarchical partitioning P = {Ph,i}, a tree-based representation of the space used by the algorithm. Indeed, an interesting fundamental question is to determine a good characterization of the difficulty of the optimization for an algorithm that uses a given hierarchical partitioning of the space X as its input. The kind of hierarchical partitioning {Ph,i} we consider is similar to the ones introduced in prior work: for any depth h ≥0 in the tree representation, the set of cells {Ph,i}1≤i≤Ih form a partition of X, where Ih is the number of cells at depth h. At depth 0, the root of the tree, there is a single cell P0,1 = X. A cell Ph,i of depth h is split into several children subcells {Ph+1,j}j of depth h + 1. We refer to the standard partitioning as to one where each cell is split into regular same-sized subcells [13]. An important insight, detailed in Section 2, is that a near-optimality dimension d that is independent from the partitioning used by an algorithm (as defined in prior work [4, 9, 2]) does not embody the optimization difficulty perfectly. This is easy to see, as for any f we could define a partitioning, perfectly suited for f. An example is a partitioning, that at the root splits X into {x⋆} and X \ x⋆, which makes the optimization trivial, whatever d is. This insight was already observed by Slivkins [14] and Bull [6], whose zooming dimension depends both on the function and the partitioning. In this paper, we define a notion of near-optimality dimension d which measures the complexity of the optimization problem directly in terms of the partitioning used by an algorithm. First, we make the following local smoothness assumption about the function, expressed in terms of the partitioning and not any metric: For a given partitioning P, we assume that there exist ν > 0 and ρ ∈(0, 1), s.t., ∀h ≥0, ∀x ∈Ph,i⋆ h, f(x) ≥f (x⋆) −νρh where (h, i⋆ h) is the (unique) cell of depth h containing x⋆. Then, we define the near-optimality dimension d(ν, ρ) as d(ν, ρ) def= inf n d′ ∈R+ : ∃C > 0, ∀h ≥0, Nh(2νρh) ≤Cρ−d′ho , where for all ε > 0, Nh(ε) is the number of cells Ph,i of depth h s.t. supx∈Ph,i f(x) ≥f (x⋆) −ε. Intuitively, functions with smaller d are easier to optimize and we denote (ν, ρ), for which d(ν, ρ) is the smallest, as (ν⋆, ρ⋆). Obviously, d(ν, ρ) depends on P and f, but does not depend on any choice of a specific metric. In Section 2, we argue that this definition of d1 encompasses the optimization complexity better. We stress this is not an artifact of our analysis and previous algorithms, such as HOO [4], TaxonomyZoom [14], or HCT [2], can be shown to scale with this new notion of d. Most of the prior bandit-based algorithms proposed for function optimization, for either deterministic or stochastic setting, assume that the smoothness of the optimized function is known. This is the case of known semi-metric [4, 2] and pseudo-metric [9]. This assumption limits the application of these algorithms and opened a very compelling question of whether this knowledge is necessary. Prior work responded with algorithms not requiring this knowledge. Bubeck et al. [5] provided an algorithm for optimization of Lipschitz functions without the knowledge of the Lipschitz constant. However, they have to assume that f is twice differentiable and a bound on the second order derivative is known. Combes and Prouti`ere [7] treat unimodal f restricted to dimension one. Slivkins [14] considered a general optimization problem embedded in a taxonomy2 and provided guarantees as a function of the quality of the taxonomy. The quality refers to the probability of reaching two cells belonging to the same branch that can have values that differ by more that half of the diameter (expressed by the true metric) of the branch. The problem is that the algorithm needs a lower bound on this quality (which can be tiny) and the performance depends inversely on this quantity. Also it assumes that the quality is strictly positive. In this paper, we do not rely on the knowledge of quality and also consider a more general class of functions for which the quality can be 0 (Appendix E). 1we use the simplified notation d instead of d(ν, ρ) for clarity when no confusion is possible 2which is similar to the hierarchical partitioning previously defined 2 0.0 0.2 0.4 0.6 0.8 1.0 x −1.0 −0.8 −0.6 −0.4 −0.2 0.0 f(x) 0.0 0.2 0.4 0.6 0.8 1.0 ρ 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 simple regret after 5000 evaluations Figure 1: Difficult function f : x →s (log2 |x −0.5|) · ( p |x −0.5| −(x −0.5)2) − p |x −0.5| where, s(x) = 1 if the fractional part of x, that is, x −⌊x⌋, is in [0, 0.5] and s(x) = 0, if it is in (0.5, 1). Left: Oscillation between two envelopes of different smoothness leading to a nonzero d for a standard partitioning. Right: Regret of HOO after 5000 evaluations for different values of ρ. Another direction has been followed by Munos [11], where in the deterministic case (the function evaluations are not perturbed by noise), their SOO algorithm performs almost as well as the best known algorithms without the knowledge of the function smoothness. SOO was later extended to StoSOO [15] for the stochastic case. However StoSOO only extends SOO for a limited case of easy instances of functions for which there exists a semi-metric under which d = 0. Also, Bull [6] provided a similar regret bound for the ATB algorithm for a class of functions, called zooming continuous functions, which is related to the class of functions for which there exists a semi-metric under which the near-optimality dimension is d = 0. But none of the prior work considers a more general class of functions where there is no semi-metric adapted to the standard partitioning for which d = 0. To give an example of a difficult function, consider the function in Figure 1. It possesses a lower and upper envelope around its global optimum that are equivalent to x2 and √x; and therefore have different smoothness. Thus, for a standard partitioning, there is no semi-metric of the form ℓ(x, y) = ||x −y||α for which the near-optimality dimension is d = 0, as shown by Valko et al. [15]. Other examples of nonzero near-optimality dimension are the functions that for a standard partitioning behave differently depending on the direction, for instance f : (x, y) 7→1 −|x| −y2. Using a bad value for the ρ parameter can have dramatic consequences on the simple regret. In Figure 1, we show the simple regret after 5000 function evaluations for different values of ρ. For the values of ρ that are too low, the algorithm does not explore enough and is stuck in a local maximum while for values of ρ too high the algorithm wastes evaluations by exploring too much. In this paper, we provide a new algorithm, POO, parallel optimistic optimization, which competes with the best algorithms that assume the knowledge of the function smoothness, for a larger class of functions than was previously done. Indeed, POO handles a panoply of functions, including hard instances, i.e., such that d > 0, like the function illustrated above. We also recover the result of StoSOO and ATB for functions with d = 0. In particular, we bound the POO’s simple regret as E[Rn] ≤O ln2 n /n 1/(2+d(ν⋆,ρ⋆)) . This result should be compared to the simple regret of the best known algorithm that uses the knowledge of the metric under which the function is smooth, or equivalently (ν, ρ), which is of the order of O((ln n/n)1/(2+d)). Thus POO’s performance is at most a factor of (ln n)1/(2+d) away from that of the best known optimization algorithms that require the knowledge of the function smoothness. Interestingly, this factor decreases with the complexity measure d: the harder the function to optimize, the less important it is to know its precise smoothness. 2 Background and assumptions 2.1 Hierarchical optimistic optimization POO optimizes functions without the knowledge of their smoothness using a subroutine, an anytime algorithm optimizing functions using the knowledge of their smoothness. In this paper, we use a modified version of HOO [4] as such subroutine. Therefore, we embark with a quick review of HOO. HOO follows an optimistic strategy close to UCT [10], but unlike UCT, it uses proper confidence bounds to provide theoretical guarantees. HOO refines a partition of the space based on a hierarchical partitioning, where at each step, a yet unexplored cell (a leaf of the corresponding tree) is selected, 3 and the function is evaluated at a point within this cell. The selected path (from the root to the leaf) is the one that maximizes the minimum value Uh,i(t) among all cells of each depth, where the value Uh,i(t) of any cell Ph,i is defined as Uh,i(t) = bµh,i(t) + s 2 ln(t) Nh,i(t) + νρh, where t is the number of evaluations done so far, bµh,i(t) is the empirical average of all evaluations done within Ph,i, and Nh,i(t) is the number of them. The second term in the definition of Uh,i(t) is a Chernoff-Hoeffding type confidence interval, measuring the estimation error induced by the noise. The third term, νρh with ρ ∈(0, 1) is, by assumption, a bound on the difference f(x⋆) −f(x) for any x ∈Ph,i⋆ h, a cell containing x⋆. Is it this bound, where HOO relies on the knowledge of the smoothness, because the algorithm requires the values of ν and ρ. In the next sections, we clarify the assumptions made by HOO vs. related algorithms and point out the differences with POO. 2.2 Assumptions made in prior work Most of previous work relies on the knowledge of a semi-metric on X such that the function is either locally smooth near to one of its maxima with respect to this metric [11, 15, 2] or require a stronger, weakly-Lipschitz assumption [4, 12, 2]. Furthermore, Kleinberg et al. [9] assume the full metric. Note, that the semi-metric does not require the triangular inequality to hold. For instance, consider the semi-metric ℓ(x, y) = ||x −y||α on Rp with || · || being the euclidean metric. When α < 1 then this semi-metric does not satisfy the triangular inequality. However, it is a metric for α ≥1. Therefore, using only semi-metric allows us to consider a larger class of functions. Prior work typically requires two assumptions. The first one is on semi-metric ℓand the function. An example is the weakly-Lipschitz assumption needed by Bubeck et al. [4] which requires that ∀x, y ∈X, f(x⋆) −f(y) ≤f(x⋆) −f(x) + max {f(x⋆) −f(x), ℓ(x, y)} . It is a weak version of a Lipschitz condition, restricting f in particular for the values close to f(x⋆). More recent results [11, 15, 2] assume only a local smoothness around one of the function maxima, x ∈X f(x⋆) −f(x) ≤ℓ(x⋆, x). The second common assumption links the hierarchical partitioning with the semi-metric. It requires the partitioning to be adapted to the (semi) metric. More precisely the well-shaped assumption states that there exist ρ < 1 and ν1 ≥ν2 > 0, such that for any depth h ≥0 and index i = 1, . . . , Ih, the subset Ph,i is contained by and contains two open balls of radius ν1ρh and ν2ρh respectively, where the balls are w.r.t. the same semi-metric used in the definition of the function smoothness. ‘Local smoothness’ is weaker than ‘weakly Lipschitz’ and therefore preferable. Algorithms requiring the local-smoothness assumption always sample a cell Ph,i in a special representative point and, in the stochastic case, collect several function evaluations from the same point before splitting the cell. This is not the case of HOO, which allows to sample any point inside the selected cell and to expand each cell after one sample. This additional flexibility comes at the price of requiring the stronger weakly-Lipschitzness assumption. Nevertheless, although HOO does not wait before expanding a cell, it does something similar by selecting a path from the root to this leaf that maximizes the minimum of the U-value over the cells of the path, as mentioned in Section 2.1. The fact that HOO follows an optimistic strategy even after reaching the cell that possesses the minimal U-value along the path is not used in the analysis of the HOO algorithm. Furthermore, a reason for better dependency on the smoothness in other algorithms, e.g., HCT [2], is not only algorithmic: HCT needs to assume a slightly stronger condition on the cell, i.e., that the single center of the two balls (one that covers and the other one that contains the cell) is actually the same point that HCT uses for sampling. This is stronger than just assuming that there simply exist such centers of the two balls, which are not necessarily the same points where we sample (which is the HOO assumption). Therefore, this is in contrast with HOO that samples any point from the cell. In fact, it is straightforward to modify HOO to only sample at a representative point in each cell and only require the local-smoothness assumption. In our analysis and the algorithm, we use this modified version of HOO, thereby profiting from this weaker assumption. 4 Prior work [9, 4, 11, 2, 12] often defined some ‘dimension’ d of the near-optimal space of f measured according to the (semi-) metric ℓ. For example, the so-called near-optimality dimension [4] measures the size of the near-optimal space Xε = {x ∈X : f(x) > f(x⋆) −ε} in terms of packing numbers: For any c > 0, ε0 > 0, the (c, ε0)-near-optimality dimension d of f with respect to ℓis defined as inf d ∈[0, ∞) : ∃C s.t. ∀ε ≤ε0, N(Xcε, ℓ, ε) ≤Cε−d , (1) where for any subset A ⊆X, the packing number N(A, ℓ, ε) is the maximum number of disjoint balls of radius ε contained in A. 2.3 Our assumption Contrary to the previous approaches, we need only a single assumption. We do not introduce any (semi)-metric and instead directly relate f to the hierarchical partitioning P, defined in Section 1. Let K be the maximum number of children cells (Ph+1,jk)1≤k≤K per cell Ph,i. We remind the reader that given a global maximum x⋆of f, i⋆ h denotes the index of the unique cell of depth h containing x⋆, i.e., such that x⋆∈Ph,i⋆ h. With this notation we can state our sole assumption on both the partitioning (Ph,i) and the function f. Assumption 1. There exists ν > 0 and ρ ∈(0, 1) such that ∀h ≥0, ∀x ∈Ph,i⋆ h, f(x) ≥f (x⋆) −νρh. The values (ν, ρ) defines a lower bound on the possible drop of f near the optimum x⋆according to the partitioning. The choice of the exponential rate νρh is made to cover a very large class of functions, as well as to relate to results from prior work. In particular, for a standard partitioning on Rp and any α, β > 0, any function f such that f(x) ∼x→x⋆β||x −x⋆||α fits this assumption. This is also the case for more complicated functions such as the one illustrated in Figure 1. An example of a function and a partitioning that does not satisfy this assumption is the function f : x 7→1/ ln x and a standard partitioning of [0, 1) because the function decreases too fast around x⋆= 0. As observed by Valko [15], this assumption can be weaken to hold only for values of f that are η-close to f(x⋆) up to an η-dependent constant in the regret. Let us note that the set of assumptions made by prior work (Section 2.2) can be reformulated using solely Assumption 1. For example, for any f(x) ∼x→x⋆β||x −x⋆||α, one could consider the semimetric ℓ(x, y) = β||x −y||α for which the corresponding near-optimality dimension defined by Equation 1 for a standard partitioning is d = 0. Yet we argue that our setting provides a more natural way to describe the complexity of the optimization problem for a given hierarchical partitioning. Indeed, existing algorithms, that use a hierarchical partitioning of X, like HOO, do not use the full metric information but instead only use the values ν and ρ, paired up with the partitioning. Hence, the precise value of the metric does not impact the algorithms’t decisions, neither their performance. What really matters, is how the hierarchical partitioning of X fits f. Indeed, this fit is what we measure. To reinforce this argument, notice again that any function can be trivially optimized given a perfectly adapted partitioning, for instance the one that associates x⋆to one child of the root. Also, the previous analyses tried to provide performance guaranties based only on the metric and f. However, since the metric is assumed to be such that the cells of the partitioning are well shaped, the large diversity of possible metrics vanishes. Choosing such metric then comes down to choosing only ν, ρ, and a hierarchical decomposition of X. Another way of seeing this is to remark that previous works make an assumption on both the function and the metric, and an other on both the metric and the partitioning. We underline that the metric is actually there just to create a link between the function and the partitioning. By discarding the metric, we merge the two assumptions into a single one and convert a topological problem into a combinatorial one, leading to easier analysis. To proceed, we define a new near-optimality dimension. For any ν > 0 and ρ ∈(0, 1), the nearoptimality dimension d(ν, ρ) of f with respect to the partitioning P is defined as follows. Definition 1. Near-optimality dimension of f is d(ρ) def = inf n d′ ∈R+ : ∃C > 0, ∀h ≥0, Nh(2νρh) ≤Cρ−d′ho where Nh(ε) is the number of cells Ph,i of depth h such that supx∈Ph,i f(x) ≥f(x⋆) −ε. 5 The hierarchical decomposition of the space X is the only prior information available to the algorithm. The (new) near-optimality dimension is a measure of how well is this partitioning adapted to f. More precisely, it is a measure of the size of the near-optimal set, i.e., the cells which are such that supx∈Ph,i f(x) ≥f(x⋆) −ε. Intuitively, this corresponds to the set of cells that any algorithm would have to sample in order to discover the optimum. As an example, any f such that f(x) ∼x→x⋆||x −x⋆||α, for any α > 0, has a zero near-optimality dimension with respect to the standard partitioning and an appropriate choice of ρ. As discussed by Valko et al. [15], any function such that the upper and lower envelopes of f near its maximum are of the same order has a near-optimality dimension of zero for a standard partitioning of [0, 1]. An example of a function with d > 0 for the standard partitioning is in Figure 1. Functions that behave differently in different dimensions have also d > 0 for the standard partitioning. Nonetheless, for a some handcrafted partitioning, it is possible to have d = 0 even for those troublesome functions. Under our new assumption and our new definition of near-optimality dimension, one can prove the same regret bound for HOO as Bubeck et al. [4] and the same can be done for other related algorithms. 3 The POO algorithm 3.1 Description of POO The POO algorithm uses, as a subroutine, an optimizing algorithm that requires the knowledge of the function smoothness. We use HOO [4] as the base algorithm, but other algorithms, such as HCT [2], could be used as well. POO, with pseudocode in Algorithm 1, runs several HOO instances in parallel, hence the name parallel optimistic optimization. The number of base HOO instances and other parameters are adapted to the budget of evaluations and are automatically decided on the fly. Algorithm 1 POO Parameters: K, P = {Ph,i} Optional parameters: ρmax, νmax Initialization: Dmax ←ln K/ ln (1/ρmax) n ←0 {number of evaluation performed} N ←1 {number of HOO instances} S ←{(νmax, ρmax)} {set of HOO instances} while computational budget is available do while N ≥1 2Dmax ln (n/(ln n)) do for i ←1, . . . , N do {start new HOOs} s ← νmax, ρmax2N/(2i+1) S ←S ∪{s} Perform n N function evaluation with HOO(s) Update the average reward bµ[s] of HOO(s) end for n ←2n N ←2N end while{ensure there is enough HOOs} for s ∈S do Perform a function evaluation with HOO(s) Update the average reward bµ[s] of HOO(s) end for n ←n + N end while s⋆←argmaxs∈S bµ[s] Output: A random point evaluated by HOO(s⋆) Each instance of HOO requires two real numbers ν and ρ. Running HOO parametrized with (ρ, ν) that are far from the optimal one (ν⋆, ρ⋆)3 would cause HOO to underperform. Surprisingly, our analysis of this suboptimality gap reveals that it does not decrease too fast as we stray away from (ν⋆, ρ⋆). This motivates the following observation. If we simultaneously run a slew of HOOs with different (ν, ρ)s, one of them is going to perform decently well. In fact, we show that to achieve good performance, we only require (ln n) HOO instances, where n is the current number of function evaluations. Notice, that we do not require to know the total number of rounds in advance which hints that we can hope for a naturally anytime algorithm. The strategy of POO is quite simple: It consists of running N instances of HOO in parallel, that are all launched with different (ν, ρ)s. At the end of the whole process, POO selects the instance s⋆which performed the best and returns one of the points selected by this instance, chosen uniformly at random. Note that just using a doubling trick in HOO with increasing values of ρ and ν is not enough to guarantee a good performance. Indeed, it is important to keep track of all HOO instances. Otherwise, the regret rate would suffer way too much from using the value of ρ that is too far from the optimal one. 3the parameters (ν, ρ) satisfying Assumption 1 for which d(ν, ρ) is the smallest 6 For clarity, the pseudo-code of Algorithm 1 takes ρmax and νmax as parameters but in Appendix C we show how to set ρmax and νmax automatically as functions of the number of evaluations, i.e., ρmax (n), νmax (n). Furthermore, in Appendix D, we explain how to share information between the HOO instances which makes the empirical performance light-years better. Since POO is anytime, the number of instances N(n) is time-dependent and does not need to be known in advance. In fact, N(n) is increased alongside the execution of the algorithm. More precisely, we want to ensure that N(n) ≥1 2Dmax ln (n/ ln n) , where Dmax def=(ln K)/ ln (1/ρmax) · To keep the set of different (ν, ρ)s well distributed, the number of HOOs is not increased one by one but instead is doubled when needed. Moreover, we also require that HOOs run in parallel, perform the same number of function evaluations. Consequently, when we start running new instances, we first ensure to make these instances on par with already existing ones in terms of number of evaluations. Finally, as our analysis reveals, a good choice of parameters (ρi) is not a uniform grid on [0, 1]. Instead, as suggested by our analysis, we require that 1/ ln(1/ρi) is a uniform grid on [0, 1/(ln 1/ρmax)]. As a consequence, we add HOO instances in batches such that ρi = ρmaxN/i. 3.2 Upper bound on POO’s regret POO does not require the knowledge of a (ν, ρ) verifying Assumption 1 and4 yet we prove that it achieves a performance close5 to the one obtained by HOO using the best parameters (ν⋆, ρ⋆). This result solves the open question of Valko et al. [15], whether the stochastic optimization of f with unknown parameters (ν, ρ) when d > 0 for the standard partitioning is possible. Theorem 1. Let Rn be the simple regret of POO at step n. For any (ν, ρ) verifying Assumption 1 such that ν ≤νmax and ρ ≤ρmax there exists κ such that for all n E[Rn] ≤κ · ln2 n /n 1/(d(ν,ρ)+2) Moreover, κ = α · Dmax(νmax/ν⋆)Dmax, where α is a constant independent of ρmax and νmax. We prove Theorem 1 in the Appendix A and B. Notice that Theorem 1 holds for any ν ≤νmax and ρ ≤ρmax and in particular for the parameters (ν⋆, ρ⋆) for which d(ν, ρ) is minimal as long as ν⋆≤νmax and ρ⋆≤ρmax. In Appendix C, we show how to make ρmax and νmax optional. To give some intuition on Dmax, it is easy to prove that it is the attainable upper bound on the nearoptimality dimension of functions verifying Assumption 1 with ρ ≤ρmax. Moreover, any function of [0, 1]p, Lipschitz for the Euclidean metric, has (ln K)/ ln (1/ρ) = p for a standard partitioning. The POO’s performance should be compared to the simple regret of HOO run with the best parameters ν⋆and ρ⋆, which is of order O ((ln n) /n)1/(d(ν⋆,ρ⋆)+2) . Thus POO’s performance is only a factor of O((ln n)1/(d(ν⋆,ρ⋆)+2)) away from the optimally fitted HOO. Furthermore, we our regret bound for POO is slightly better than the known regret bound for StoSOO [15] in the case when d(ν, ρ) = 0 for the same partitioning, i.e., E[Rn] = O (ln n/√n) . With our algorithm and analysis, we generalize this bound for any value of d ≥0. Note that we only give a simple regret bound for POO whereas HOO ensures a bound on both the cumulative and simple regret.6 Notice that since POO runs several HOOs with non-optimal values of the (ν, ρ) parameters, this algorithm explores much more than optimally fitted HOO, which dramatically impacts the cumulative regret. As a consequence, our result applies to the simple regret only. 4note that several possible values of those parameters are possible for the same function 5up to a logarithmic term √ ln n in the simple regret 6in fact, the bound on the simple regret is a direct consequence of the bound on the cumulative regret [3] 7 100 200 300 400 500 number of evaluations 0.06 0.08 0.10 0.12 0.14 0.16 0.18 simple regret HOO, ρ = 0.0 HOO, ρ = 0.3 HOO, ρ = 0.66 HOO, ρ = 0.9 POO 4 5 6 7 8 number of evaluation (log-scaled) −4.0 −3.5 −3.0 −2.5 −2.0 simple regret (log-scaled) HOO, ρ = 0.0 HOO, ρ = 0.3 HOO, ρ = 0.66 HOO, ρ = 0.9 POO Figure 2: Regret of POO and HOO run for different values of ρ. 4 Experiments We ran experiments on the function plotted in Figure 1 for HOO algorithms with different values of ρ and the POO7 algorithm for ρmax = 0.9. This function, as described in Section 1, has an upper and lower envelope that are not of the same order and therefore has d > 0 for a standard partitioning. In Figure 2, we show the simple regret of the algorithms as function of the number of evaluations. In the figure on the left, we plot the simple regret after 500 evaluations. In the right one, we plot the regret after 5000 evaluations in the log-log scale, in order to see the trend better. The HOO algorithms return a random point chosen uniformly among those evaluated. POO does the same for the best empirical instance of HOO. We compare the algorithms according to the expected simple regret, which is the difference between the optimum and the expected value of function value at the point they return. We compute it as the average of the value of the function for all evaluated points. While we did not investigate possibly different heuristics, we believe that returning the deepest evaluated point would give a better empirical performance. As expected, the HOO algorithms using values of ρ that are too low, do not explore enough and become quickly stuck in a local optimum. This is the case for both UCT (HOO run for ρ = 0) and HOO run for ρ = 0.3. The HOO algorithm using ρ that is too high waste their budget on exploring too much. This way, we empirically confirmed that the performance of the HOO algorithm is greatly impacted by the choice of this ρ parameter for the function we considered. In particular, at T = 500, the empirical regret of HOO with ρ = 0.66 was a half of the regret of UCT. In our experiments, HOO with ρ = 0.66 performed the best which is a bit lower than what the theory would suggest, since ρ⋆= 1/ √ 2 ≈0.7. The performance of HOO using this parameter is almost matched by POO. This is surprising, considering the fact the POO was simultaneously running 100 different HOOs. It shows that carefully sharing information between the instances of HOO, as described and justified in Appendix D, has a major impact on empirical performance. Indeed, among the 100 HOO instances, only two (on average) actually needed a fresh function evaluation, the 98 could reuse the ones performed by another HOO instance. 5 Conclusion We introduced POO for global optimization of stochastic functions with unknown smoothness and showed that it competes with the best known optimization algorithms that know this smoothness. This results extends the previous work of Valko et al. [15], which is only able to deal with a nearoptimality dimension d = 0. POO is provable able to deal with a trove of functions for which d ≥0 for a standard partitioning. Furthermore, we gave a new insight on several assumptions required by prior work and provided a more natural measure of the complexity of optimizing a function given a hierarchical partitioning of the space, without relying on any (semi-)metric. Acknowledgements The research presented in this paper was supported by French Ministry of Higher Education and Research, Nord-Pas-de-Calais Regional Council, a doctoral grant of ´Ecole Normale Sup´erieure in Paris, Inria and Carnegie Mellon University associated-team project EduBand, and French National Research Agency project ExTra-Learn (n.ANR-14-CE24-0010-01). 7code available at https://sequel.lille.inria.fr/Software/POO 8 References [1] 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. [2] Mohammad Gheshlaghi Azar, Alessandro Lazaric, and Emma Brunskill. Online Stochastic Optimization under Correlated Bandit Feedback. In International Conference on Machine Learning, 2014. [3] S´ebastien Bubeck, R´emi Munos, and Gilles Stoltz. Pure Exploration in Finitely-Armed and Continuously-Armed Bandits. Theoretical Computer Science, 412:1832–1852, 2011. [4] S´ebastien Bubeck, R´emi Munos, Gilles Stoltz, and Csaba Szepesv´ari. X-armed Bandits. Journal of Machine Learning Research, 12:1587–1627, 2011. [5] S´ebastien Bubeck, Gilles Stoltz, and Jia Yuan Yu. Lipschitz Bandits without the Lipschitz Constant. In Algorithmic Learning Theory, 2011. [6] Adam D. Bull. Adaptive-treed bandits. Bernoulli, 21(4):2289–2307, 2015. [7] Richard Combes and Alexandre Prouti`ere. Unimodal Bandits without Smoothness. ArXiv e-prints: http://arxiv.org/abs/1406.7447, 2015. [8] Pierre-Arnaud Coquelin and R´emi Munos. Bandit Algorithms for Tree Search. In Uncertainty in Artificial Intelligence, 2007. [9] Robert Kleinberg, Alexander Slivkins, and Eli Upfal. Multi-armed Bandit Problems in Metric Spaces. In Symposium on Theory Of Computing, 2008. [10] Levente Kocsis and Csaba Szepesv´ari. Bandit based Monte-Carlo Planning. In European Conference on Machine Learning, 2006. [11] R´emi Munos. Optimistic Optimization of Deterministic Functions without the Knowledge of its Smoothness. In Neural Information Processing Systems, 2011. [12] R´emi Munos. From Bandits to Monte-Carlo Tree Search: The Optimistic Principle Applied to Optimization and Planning. Foundations and Trends in Machine Learning, 7(1):1–130, 2014. [13] Philippe Preux, R´emi Munos, and Michal Valko. Bandits Attack Function Optimization. In Congress on Evolutionary Computation, 2014. [14] Aleksandrs Slivkins. Multi-armed Bandits on Implicit Metric Spaces. In Neural Information Processing Systems, 2011. [15] Michal Valko, Alexandra Carpentier, and R´emi Munos. Stochastic Simultaneous Optimistic Optimization. In International Conference on Machine Learning, 2013. 9 | 2015 | 269 |
5,779 | Bayesian Optimization with Exponential Convergence Kenji Kawaguchi MIT Cambridge, MA, 02139 kawaguch@mit.edu Leslie Pack Kaelbling MIT Cambridge, MA, 02139 lpk@csail.mit.edu Tom´as Lozano-P´erez MIT Cambridge, MA, 02139 tlp@csail.mit.edu Abstract This paper presents a Bayesian optimization method with exponential convergence without the need of auxiliary optimization and without the δ-cover sampling. Most Bayesian optimization methods require auxiliary optimization: an additional non-convex global optimization problem, which can be time-consuming and hard to implement in practice. Also, the existing Bayesian optimization method with exponential convergence [1] requires access to the δ-cover sampling, which was considered to be impractical [1, 2]. Our approach eliminates both requirements and achieves an exponential convergence rate. 1 Introduction We consider a general global optimization problem: maximize f(x) subject to x ∈Ω ⊂RD where f : Ω →R is a non-convex black-box deterministic function. Such a problem arises in many realworld applications, such as parameter tuning in machine learning [3], engineering design problems [4], and model parameter fitting in biology [5]. For this problem, one performance measure of an algorithm is the simple regret, rn, which is given by rn = supx∈Ω f(x) −f(x+) where x+ is the best input vector found by the algorithm. For brevity, we use the term “regret” to mean simple regret. The general global optimization problem is known to be intractable if we make no further assumptions [6]. The simplest additional assumption to restore tractability is to assume the existence of a bound on the slope of f. A well-known variant of this assumption is Lipschitz continuity with a known Lipschitz constant, and many algorithms have been proposed in this setting [7, 8, 9]. These algorithms successfully guaranteed certain bounds on the regret. However appealing from a theoretical point of view, a practical concern was soon raised regarding the assumption that a tight Lipschitz constant is known. Some researchers relaxed this somewhat strong assumption by proposing procedures to estimate a Lipschitz constant during the optimization process [10, 11, 12]. Bayesian optimization is an efficient way to relax this assumption of complete knowledge of the Lipschitz constant, and has become a well-recognized method for solving global optimization problems with non-convex black-box functions. In the machine learning community, Bayesian optimization— especially by means of a Gaussian process (GP)—is an active research area [13, 14, 15]. With the requirement of the access to the δ-cover sampling procedure (it samples the function uniformly such that the density of samples doubles in the feasible regions at each iteration), de Freitas et al. [1] recently proposed a theoretical procedure that maintains an exponential convergence rate (exponential regret). However, as pointed out by Wang et al. [2], one remaining problem is to derive a GP-based optimization method with an exponential convergence rate without the δ-cover sampling procedure, which is computationally too demanding in many cases. In this paper, we propose a novel GP-based global optimization algorithm, which maintains an exponential convergence rate and converges rapidly without the δ-cover sampling procedure. 1 2 Gaussian Process Optimization In Gaussian process optimization, we estimate the distribution over function f and use this information to decide which point of f should be evaluated next. In a parametric approach, we consider a parameterized function f(x; θ), with θ being distributed according to some prior. In contrast, the nonparametric GP approach directly puts the GP prior over f as f(∙) ∼GP(m(∙), κ(∙, ∙)) where m(∙) is the mean function and κ(∙, ∙) is the covariance function or the kernel. That is, m(x) = E[f(x)] and κ(x, x′) = E[(f(x) −m(x))(f(x′) −m(x′))T ]. For a finite set of points, the GP model is simply a joint Gaussian: f(x1:N) ∼N (m(x1:N), K), where Ki,j = κ(xi, xj) and N is the number of data points. To predict the value of f at a new data point, we first consider the joint distribution over f of the old data points and the new data point: f(x1:N) f(xN+1) ∼N m(x1:N) m(xN+1) , K k kT κ(xN+1, xN+1) where k = κ(x1:N, xN+1) ∈RN×1. Then, after factorizing the joint distribution using the Schur complement for the joint Gaussian, we obtain the conditional distribution, conditioned on observed entities DN := {x1:N, f(x1:N)} and xN+1, as: f(xN+1)|DN, xN+1 ∼N (μ(xN+1|DN), σ2(xN+1|DN)) where μ(xN+1|DN) = m(xN+1) + kT K−1(f(x1:N) −m(x1:N)) and σ2(xN+1|DN) = κ(xN+1, xN+1) −kT K−1k. One advantage of GP is that this closed-form solution simplifies both its analysis and implementation. To use a GP, we must specify the mean function and the covariance function. The mean function is usually set to be zero. With this zero mean function, the conditional mean μ(xN+1|DN) can still be flexibly specified by the covariance function, as shown in the above equation for μ. For the covariance function, there are several common choices, including the Matern kernel and the Gaussian kernel. For example, the Gaussian kernel is defined as κ(x, x′) = exp −1 2(x −x′)T Σ−1(x −x′) where Σ−1 is the kernel parameter matrix. The kernel parameters or hyperparameters can be estimated by empirical Bayesian methods [16]; see [17] for more information about GP. The flexibility and simplicity of the GP prior make it a common choice for continuous objective functions in the Bayesian optimization literature. Bayesian optimization with GP selects the next query point that optimizes the acquisition function generated by GP. Commonly used acquisition functions include the upper confidence bound (UCB) and expected improvement (EI). For brevity, we consider Bayesian optimization with UCB, which works as follows. At each iteration, the UCB function U is maintained as U(x|DN) = μ(x|DN) + ςσ(x|DN) where ς ∈R is a parameter of the algorithm. To find the next query xn+1 for the objective function f, GP-UCB solves an additional non-convex optimization problem with U as xN+1 = arg maxx U(x|DN). This is often carried out by other global optimization methods such as DIRECT and CMA-ES. The justification for introducing a new optimization problem lies in the assumption that the cost of evaluating the objective function f dominates that of solving additional optimization problem. For deterministic function, de Freitas et al. [1] recently presented a theoretical procedure that maintains exponential convergence rate. However, their own paper and the follow-up research [1, 2] point out that this result relies on an impractical sampling procedure, the δ-cover sampling. To overcome this issue, Wang et al. [2] combined GP-UCB with a hierarchical partitioning optimization method, the SOO algorithm [18], providing a regret bound with polynomial dependence on the number of function evaluations. They concluded that creating a GP-based algorithm with an exponential convergence rate without the impractical sampling procedure remained an open problem. 3 Infinite-Metric GP Optimization 3.1 Overview The GP-UCB algorithm can be seen as a member of the class of bound-based search methods, which includes Lipschitz optimization, A* search, and PAC-MDP algorithms with optimism in the face of uncertainty. Bound-based search methods have a common property: the tightness of the bound determines its effectiveness. The tighter the bound is, the better the performance becomes. 2 However, it is often difficult to obtain a tight bound while maintaining correctness. For example, in A* search, admissible heuristics maintain the correctness of the bound, but the estimated bound with admissibility is often too loose in practice, resulting in a long period of global search. The GP-UCB algorithm has the same problem. The bound in GP-UCB is represented by UCB, which has the following property: f(x) ≤U(x|D) with some probability. We formalize this property in the analysis of our algorithm. The problem is essentially due to the difficulty of obtaining a tight bound U(x|D) such that f(x) ≤U(x|D) and f(x) ≈U(x|D) (with some probability). Our solution strategy is to first admit that the bound encoded in GP prior may not be tight enough to be useful by itself. Instead of relying on a single bound given by the GP, we leverage the existence of an unknown bound encoded in the continuity at a global optimizer. Assumption 1. (Unknown Bound) There exists a global optimizer x∗and an unknown semi-metric ℓsuch that for all x ∈Ω, f(x∗) ≤f(x) + ℓ(x, x∗) and ℓ(x, x∗) < ∞. In other words, we do not expect the known upper bound due to GP to be tight, but instead expect that there exists some unknown bound that might be tighter. Notice that in the case where the bound by GP is as tight as the unknown bound by semi-metric ℓin Assumption 1, our method still maintains an exponential convergence rate and an advantage over GP-UCB (no need for auxiliary optimization). Our method is expected to become relatively much better when the known bound due to GP is less tight compared to the unknown bound by ℓ. As the semi-metric ℓis unknown, there are infinitely many possible candidates that we can think of for ℓ. Accordingly, we simultaneously conduct global and local searches based on all the candidates of the bounds. The bound estimated by GP is used to reduce the number of candidates. Since the bound estimated by GP is known, we can ignore the candidates of the bounds that are looser than the bound estimated by GP. The source code of the proposed algorithm is publicly available at http://lis.csail.mit.edu/code/imgpo.html. 3.2 Description of Algorithm Figure 1 illustrates how the algorithm works with a simple 1-dimensional objective function. We employ hierarchical partitioning to maintain hyperintervals, as illustrated by the line segments in the figure. We consider a hyperrectangle as our hyperinterval, with its center being the evaluation point of f (blue points in each line segment in Figure 1). For each iteration t, the algorithm performs the following procedure for each interval size: (i) Select the interval with the maximum center value among the intervals of the same size. (ii) Keep the interval selected by (i) if it has a center value greater than that of any larger interval. (iii) Keep the interval accepted by (ii) if it contains a UCB greater than the center value of any smaller interval. (iv) If an interval is accepted by (iii), divide it along with the longest coordinate into three new intervals. (v) For each new interval, if the UCB of the evaluation point is less than the best function value found so far, skip the evaluation and use the UCB value as the center value until the interval is accepted in step (ii) on some future iteration; otherwise, evaluate the center value. (vi) Repeat steps (i)–(v) until every size of intervals are considered Then, at the end of each iteration, the algorithm updates the GP hyperparameters. Here, the purpose of steps (i)–(iii) is to select an interval that might contain the global optimizer. Steps (i) and (ii) select the possible intervals based on the unknown bound by ℓ, while Step (iii) does so based on the bound by GP. We now explain the procedure using the example in Figure 1. Let n be the number of divisions of intervals and let N be the number of function evaluations. t is the number of iterations. Initially, there is only one interval (the center of the input region Ω ⊂R) and thus this interval is divided, resulting in the first diagram of Figure 1. At the beginning of iteration t = 2 , step (i) selects the third interval from the left side in the first diagram (t = 1, n = 2), as its center value is the maximum. Because there are no intervals of different size at this point, steps (ii) and (iii) are skipped. Step (iv) divides the third interval, and then the GP hyperparameters are updated, resulting in the second 3 Figure 1: An illustration of IMGPO: t is the number of iteration, n is the number of divisions (or splits), N is the number of function evaluations. diagram (t = 2, n = 3). At the beginning of iteration t = 3, it starts conducting steps (i)–(v) for the largest intervals. Step (i) selects the second interval from the left side and step (ii) is skipped. Step (iii) accepts the second interval, because the UCB within this interval is no less than the center value of the smaller intervals, resulting in the third diagram (t = 3, n = 4). Iteration t = 3 continues by conducting steps (i)–(v) for the smaller intervals. Step (i) selects the second interval from the left side, step (ii) accepts it, and step (iii) is skipped, resulting in the forth diagram (t = 3, n = 4). The effect of the step (v) can be seen in the diagrams for iteration t = 9. At n = 16, the far right interval is divided, but no function evaluation occurs. Instead, UCB values given by GP are placed in the new intervals indicated by the red asterisks. One of the temporary dummy values is resolved at n = 17 when the interval is queried for division, as shown by the green asterisk. The effect of step (iii) for the rejection case is illustrated in the last diagram for iteration t = 10. At n = 18, t is increased to 10 from 9, meaning that the largest intervals are first considered for division. However, the three largest intervals are all rejected in step (iii), resulting in the division of a very small interval near the global optimum at n = 18. 3.3 Technical Detail of Algorithm We define h to be the depth of the hierarchical partitioning tree, and ch,i to be the center point of the ith hyperrectangle at depth h. Ngp is the number of the GP evaluations. Define depth(T ) to be the largest integer h such that the set Th is not empty. To compute UCB U, we use ςM = p 2 log(π2M 2/12η) where M is the number of the calls made so far for U (i.e., each time we use U, we increment M by one). This particular form of ςM is to maintain the property of f(x) ≤U(x|D) during an execution of our algorithm with probability at least 1 −η. Here, η is the parameter of IMGPO. Ξmax is another parameter, but it is only used to limit the possibly long computation of step (iii) (in the worst case, step (iii) computes UCBs 3Ξmax times although it would rarely happen). The pseudocode is shown in Algorithm 1. Lines 8 to 23 correspond to steps (i)-(iii). These lines compute the index i∗ h of the candidate of the rectangle that may contain a global optimizer for each depth h. For each depth h, non-null index i∗ h at Line 24 indicates the remaining candidate of a rectangle that we want to divide. Lines 24 to 33 correspond to steps (iv)-(v) where the remaining candidates of the rectangles for all h are divided. To provide a simple executable division scheme (line 29), we assume Ω to be a hyperrectangle (see the last paragraph of section 4 for a general case). Lines 8 to 17 correspond to steps (i)-(ii). Specifically, line 10 implements step (i) where a single candidate is selected for each depth, and lines 11 to 12 conduct step (ii) where some candidates are screened out. Lines 13 to 17 resolve the the temporary dummy values computed by GP. Lines 18 to 23 correspond to step (iii) where the candidates are further screened out. At line 21, T ′ h+ξ(ch,i∗ h) indicates the set of all center points of a fully expanded tree until depth h + ξ within the region covered by the hyperrectangle centered at ch,i∗ h. In other words, T ′ h+ξ(ch,i∗ h) contains the nodes of the fully expanded tree rooted at ch,i∗ h with depth ξ and can be computed by dividing the current rectangle at ch,i∗ h and recursively divide all the resulting new rectangles until depth ξ (i.e., depth ξ from ch,i∗ h, which is depth h + ξ in the whole tree). 4 Algorithm 1 Infinite-Metric GP Optimization (IMGPO) Input: an objective function f, the search domain Ω, the GP kernel κ, Ξmax ∈N+ and η ∈(0, 1) 1: Initialize the set Th = {∅} ∀h ≥0 2: Set c0,0 to be the center point of Ω and T0 ←{c0,0} 3: Evaluate f at c0,0: g(c0,0) ←f(c0,0) 4: f+ ←g(c0,0), D ←{(c0,0, g(c0,0))} 5: n, N ←1, Ngp ←0, Ξ ←1 6: for t = 1, 2, 3, ... do 7: υmax ←−∞ 8: for h = 0 to depth(T ) do # for-loop for steps (i)-(ii) 9: while true do 10: i∗ h ←arg maxi:ch,i∈Th g(ch,i) 11: if g(ch,i∗ h) < υmax then 12: i∗ h ←∅, break 13: else if g(ch,i∗ h) is not labeled as GP-based then 14: υmax ←g(ch,i∗ h), break 15: else 16: g(ch,i∗ h) ←f(ch,i∗ h) and remove the GP-based label from g(ch,i∗ h) 17: N ←N + 1, Ngp ←Ngp −1 18: D ←{D, (ch,i∗ h, g(ch,i∗ h))} 19: for h = 0 to depth(T ) do # for-loop for step (iii) 20: if i∗ h ̸= ∅then 21: ξ ←the smallest positive integer s.t. i∗ h+ξ ̸= ∅and ξ ≤min(Ξ, Ξmax) if exists, and 0 otherwise 22: z(h, i∗ h) = maxk:ch+ξ,k∈T ′ h+ξ(ch,i∗ h ) U(ch+ξ,k|D) 23: if ξ ̸= 0 and z(h, i∗ h) < g(ch+ξ,i∗ h+ξ) then 24: i∗ h ←∅, break 25: υmax ←−∞ 26: for h = 0 to depth(T ) do # for-loop for steps (iv)-(v) 27: if i∗ h ̸= ∅and g(ch,i∗ h) ≥υmax then 28: n ←n + 1. 29: Divide the hyperrectangle centered at ch,i∗ h along with the longest coordinate into three new hyperrectangles with the following centers: S = {ch+1,i(left), ch+1,i(center), ch+1,i(right)} 30: Th+1 ←{Th+1, S} 31: Th ←Th \ ch,i∗ h, g(ch+1,i(center)) ←g(ch,i∗ h) 32: for inew = {i(left), i(right)} do 33: if U(ch+1,inew|D) ≥f+ then 34: g(ch+1,inew) ←f(ch+1,inew) 35: D ←{D, (ch+1,inew, g(ch+1,inew))} N ←N + 1, f+ ←max(f+, g(ch+1,inew)), υmax = max(υmax, g(ch+1,inew)) 36: else 37: g(ch+1,inew) ←U(ch+1,inew|D) and label g(ch+1,inew) as GP-based. Ngp ←Ngp + 1 38: Update Ξ: if f + was updated, Ξ ←Ξ + 22 , and otherwise, Ξ ←max(Ξ −2−1, 1) 39: Update GP hyperparameters by an empirical Bayesian method 3.4 Relationship to Previous Algorithms The most closely related algorithm is the BaMSOO algorithm [2], which combines SOO with GPUCB. However, it only achieves a polynomial regret bound while IMGPO achieves a exponential regret bound. IMGPO can achieve exponential regret because it utilizes the information encoded in the GP prior/posterior to reduce the degree of the unknownness of the semi-metric ℓ. The idea of considering a set of infinitely many bounds was first proposed by Jones et al. [19]. Their DIRECT algorithm has been successfully applied to real-world problems [4, 5], but it only maintains the consistency property (i.e., convergence in the limit) from a theoretical viewpoint. DIRECT takes an input parameter ϵ to balance the global and local search efforts. This idea was generalized to the case of an unknown semi-metric and strengthened with a theoretical support (finite regret bound) by 5 Munos [18] in the SOO algorithm. By limiting the depth of the search tree with a parameter hmax, the SOO algorithm achieves a finite regret bound that depends on the near-optimality dimension. 4 Analysis In this section, we prove an exponential convergence rate of IMGPO and theoretically discuss the reason why the novel idea underling IMGPO is beneficial. The proofs are provided in the supplementary material. To examine the effect of considering infinitely many possible candidates of the bounds, we introduce the following term. Definition 1. (Infinite-metric exploration loss). The infinite-metric exploration loss ρt is the number of intervals to be divided during iteration t. The infinite-metric exploration loss ρτ can be computed as ρt = Pdepth(T ) h=1 1(i∗ h ̸= ∅) at line 25. It is the cost (in terms of the number of function evaluations) incurred by not committing to any particular upper bound. If we were to rely on a specific bound, ρτ would be minimized to 1. For example, the DOO algorithm [18] has ρt = 1 ∀t ≥1. Even if we know a particular upper bound, relying on this knowledge and thus minimizing ρτ is not a good option unless the known bound is tight enough compared to the unknown bound leveraged in our algorithm. This will be clarified in our analysis. Let ˉρt be the maximum of the averages of ρ1:t′ for t′ = 1, 2, ..., t (i.e., ˉρt ≡max({ 1 t′ Pt′ τ=1 ρτ ; t′ = 1, 2, ..., t}). Assumption 2. There exist L > 0, α > 0 and p ≥1 in R such that for all x, x′ ∈Ω, ℓ(x′, x) ≤ L||x′ −x||α p . In Theorem 1, we show that the exponential convergence rate O λN+Ngp with λ < 1 is achieved. We define Ξn ≤Ξmax to be the largest ξ used so far with n total node expansions. For simplicity, we assume that Ω is a square, which we satisfied in our experiments by scaling original Ω. Theorem 1. Assume Assumptions 1 and 2. Let β = supx,x′∈Ω 1 2∥x−x′∥∞. Let λ = 3− α 2CD ˉ ρt < 1. Then, with probability at least 1 −η, the regret of IMGPO is bounded as rN ≤L(3βD1/p)α exp −α N + Ngp 2CDˉρt −Ξn −2 ln 3 = O λN+Ngp . Importantly, our bound holds for the best values of the unknown L, α and p even though these values are not given. The closest result in previous work is that of BaMSOO [2], which obtained ˜O(n− 2α D(4−α) ) with probability 1 −η for α = {1, 2}. As can be seen, we have improved the regret bound. Additionally, in our analysis, we can see how L, p, and α affect the bound, allowing us to view the inherent difficulty of an objective function in a theoretical perspective. Here, C is a constant in N and is used in previous work [18, 2]. For example, if we conduct 2D or 3D −1 function evaluations per node-expansion and if p = ∞, we have that C = 1. We note that λ can get close to one as input dimension D increases, which suggests that there is a remaining challenge in scalability for higher dimensionality. One strategy for addressing this problem would be to leverage additional assumptions such as those in [14, 20]. Remark 1. (The effect of the tightness of UCB by GP) If UCB computed by GP is “useful” such that N/ˉρt = Ω(N), then our regret bound becomes O exp −N+Ngp 2CD α ln 3 . If the bound due to UCB by GP is too loose (and thus useless), ˉρt can increase up to O(N/t) (due to ˉρt ≤Pt i=1 i/t ≤ O(N/t)), resulting in the regret bound of O exp −t(1+Ngp/N) 2CD α ln 3 , which can be bounded by O exp −N+Ngp 2CD max( 1 √ N , t N )α ln 3 1. This is still better than the known results. Remark 2. (The effect of GP) Without the use of GP, our regret bound would be as follows: rN ≤ L(3βD1/p)α exp(−α[ N 2CD 1 ˜ρt −2] ln 3), where ˉρt ≤˜ρt is the infinite-metric exploration loss without 1This can be done by limiting the depth of search tree as depth(T) = O( √ N). Our proof works with this additional mechanism, but results in the regret bound with N being replaced by √ N. Thus, if we assume to have at least “not useless” UCBs such that N/ˉρt = Ω( √ N), this additional mechanism can be disadvantageous. Accordingly, we do not adopt it in our experiments. 6 GP. Therefore, the use of GP reduces the regret bound by increasing Ngp and decreasing ˉρt, but may potentially increase the bound by increasing Ξn ≤Ξ. Remark 3. (The effect of infinite-metric optimization) To understand the effect of considering all the possible upper bounds, we consider the case without GP. If we consider all the possible bounds, we have the regret bound L(3βD1/p)α exp(−α[ N 2CD 1 ˜ρt −2] ln 3) for the best unknown L, α and p. For standard optimization with a estimated bound, we have L′(3βD1/p′)α′ exp(−α′[ N 2C′D −2] ln 3) for an estimated L′, α′, and p′. By algebraic manipulation, considering all the possible bounds has a better regret when ˜ρ−1 t ≥ 2CD N ln 3α (( N 2C′D −2) ln 3α′ + 2 ln 3α −ln L′(3βD1/p′)α′ L(3βD1/p)α ). For an intuitive insight, we can simplify the above by assuming α′ = α and C′ = C as ˜ρ−1 t ≥1−Cc2D N ln L′Dα/p′ LDα/p . Because L and p are the ones that achieve the lowest bound, the logarithm on the right-hand side is always non-negative. Hence, ˜ρt = 1 always satisfies the condition. When L′ and p′ are not tight enough, the logarithmic term increases in magnitude, allowing ˜ρt to increase. For example, if the second term on the right-hand side has a magnitude of greater than 0.5, then ˜ρt = 2 satisfies the inequality. Therefore, even if we know the upper bound of the function, we can see that it may be better not to rely on this, but rather take the infinite many possibilities into account. One may improve the algorithm with different division procedures than one presented in Algorithm 1. Accordingly, in the supplementary material, we derive an abstract version of the regret bound for IMGPO with a family of division procedures that satisfy some assumptions. This information could be used to design a new division procedure. 5 Experiments In this section, we compare the IMGPO algorithm with the SOO, BaMSOO, GP-PI and GP-EI algorithms [18, 2, 3]. In previous work, BaMSOO and GP-UCB were tested with a pair of a handpicked good kernel and hyperparameters for each function [2]. In our experiments, we assume that the knowledge of good kernel and hyperparameters is unavailable, which is usually the case in practice. Thus, for IMGPO, BaMSOO, GP-PI and GP-EI, we simply used one of the most popular kernels, the isotropic Matern kernel with ν = 5/2. This is given by κ(x, x′) = g( p 5||x −x′||2/l), where g(z) = σ2(1 + z + z2/3) exp(−z). Then, we blindly initialized the hyperparameters to σ = 1 (a) Sin1: [1, 1.92, 2] (b) Sin2: [2, 3.37, 3] (c) Peaks: [2, 3.14, 4] (d) Rosenbrock2: [2, 3.41, 4] (e) Branin: [2, 4.44, 2] (f) Hartmann3: [3, 4.11, 3] (g) Hartmann6: [6, 4.39, 4] (h) Shekel5: [4, 3.95, 4] (i) Sin1000: [1000, 3.95, 4] Figure 2: Performance Comparison: in the order, the digits inside of the parentheses [ ] indicate the dimensionality of each function, and the variables ˉρt and Ξn at the end of computation for IMGPO. 7 Table 1: Average CPU time (in seconds) for the experiment with each test function Algorithm Sin1 Sin2 Peaks Rosenbrock2 Branin Hartmann3 Hartmann6 Shekel5 GP-PI 29.66 115.90 47.90 921.82 1124.21 573.67 657.36 611.01 GP-EI 12.74 115.79 44.94 893.04 1153.49 562.08 604.93 558.58 SOO 0.19 0.19 0.24 0.744 0.33 0.30 0.25 0.29 BaMSOO 43.80 4.61 7.83 12.09 14.86 14.14 26.68 371.36 IMGPO 1.61 3.15 4.70 11.11 5.73 6.80 13.47 15.92 and l = 0.25 for all the experiments; these values were updated with an empirical Bayesian method after each iteration. To compute the UCB by GP, we used η = 0.05 for IMGPO and BaMSOO. For IMGPO, Ξmax was fixed to be 22 (the effect of selecting different values is discussed later). For BaMSOO and SOO, the parameter hmax was set to √n, according to Corollary 4.3 in [18]. For GP-PI and GP-EI, we used the SOO algorithm and a local optimization method using gradients to solve the auxiliary optimization. For SOO, BaMSOO and IMGPO, we used the corresponding deterministic division procedure (given Ω, the initial point is fixed and no randomness exists). For GP-PI and GP-EI, we randomly initialized the first evaluation point and report the mean and one standard deviation for 50 runs. The experimental results for eight different objective functions are shown in Figure 2. The vertical axis is log10(f(x∗) −f(x+)), where f(x∗) is the global optima and f(x+) is the best value found by the algorithm. Hence, the lower the plotted value on the vertical axis, the better the algorithm’s performance. The last five functions are standard benchmarks for global optimization [21]. The first two were used in [18] to test SOO, and can be written as fsin1(x) = (sin(13x) sin +1)/2 for Sin1 and fsin2(x) = fsin1(x1)fsin1(x2) for Sin2. The form of the third function is given in Equation (16) and Figure 2 in [22]. The last function is Sin2 embedded in 1000 dimension in the same manner described in Section 4.1 in [14], which is used here to illustrate a possibility of using IMGPO as a main subroutine to scale up to higher dimensions with additional assumptions. For this function, we used REMBO [14] with IMGPO and BaMSOO as its Bayesian optimization subroutine. All of these functions are multimodal, except for Rosenbrock2, with dimensionality from 1 to 1000. As we can see from Figure 2, IMGPO outperformed the other algorithms in general. SOO produced the competitive results for Rosenbrock2 because our GP prior was misleading (i.e., it did not model the objective function well and thus the property f(x) ≤U(x|D) did not hold many times). As can be seen in Table 1, IMGPO is much faster than traditional GP optimization methods although it is slower than SOO. For Sin 1, Sin2, Branin and Hartmann3, increasing Ξmax does not affect IMGPO because Ξn did not reach Ξmax = 22 (Figure 2). For the rest of the test functions, we would be able to improve the performance of IMGPO by increasing Ξmax at the cost of extra CPU time. 6 Conclusion We have presented the first GP-based optimization method with an exponential convergence rate O λN+Ngp (λ < 1) without the need of auxiliary optimization and the δ-cover sampling. Perhaps more importantly in the viewpoint of a broader global optimization community, we have provided a practically oriented analysis framework, enabling us to see why not relying on a particular bound is advantageous, and how a non-tight bound can still be useful (in Remarks 1, 2 and 3). Following the advent of the DIRECT algorithm, the literature diverged along two paths, one with a particular bound and one without. GP-UCB can be categorized into the former. Our approach illustrates the benefits of combining these two paths. As stated in Section 3.1, our solution idea was to use a bound-based method but rely less on the estimated bound by considering all the possible bounds. It would be interesting to see if a similar principle can be applicable to other types of bound-based methods such as planning algorithms (e.g., A* search and the UCT or FSSS algorithm [23]) and learning algorithms (e.g., PAC-MDP algorithms [24]). Acknowledgments The authors would like to thank Dr. Remi Munos for his thoughtful comments and suggestions. We gratefully acknowledge support from NSF grant 1420927, from ONR grant N00014-14-1-0486, and from ARO grant W911NF1410433. Kenji Kawaguchi was supported in part by the Funai Overseas Scholarship. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of our sponsors. 8 References [1] N. De Freitas, A. J. Smola, and M. Zoghi. Exponential regret bounds for Gaussian process bandits with deterministic observations. In Proceedings of the 29th International Conference on Machine Learning (ICML), 2012. [2] Z. Wang, B. Shakibi, L. Jin, and N. de Freitas. Bayesian Multi-Scale Optimistic Optimization. In Proceedings of the 17th International Conference on Artificial Intelligence and Statistics (AISTAT), pages 1005–1014, 2014. [3] J. Snoek, H. Larochelle, and R. P. Adams. Practical Bayesian optimization of machine learning algorithms. In Proceedings of Advances in Neural Information Processing Systems (NIPS), pages 2951–2959, 2012. [4] R. G. Carter, J. M. Gablonsky, A. Patrick, C. T. Kelley, and O. J. Eslinger. Algorithms for noisy problems in gas transmission pipeline optimization. Optimization and engineering, 2(2):139–157, 2001. [5] J. W. Zwolak, J. J. Tyson, and L. T. Watson. Globally optimised parameters for a model of mitotic control in frog egg extracts. IEEE Proceedings-Systems Biology, 152(2):81–92, 2005. [6] L. C. W. Dixon. Global optima without convexity. Numerical Optimisation Centre, Hatfield Polytechnic, 1977. [7] B. O. Shubert. A sequential method seeking the global maximum of a function. SIAM Journal on Numerical Analysis, 9(3):379–388, 1972. [8] D. Q. Mayne and E. Polak. Outer approximation algorithm for nondifferentiable optimization problems. Journal of Optimization Theory and Applications, 42(1):19–30, 1984. [9] R. H. Mladineo. An algorithm for finding the global maximum of a multimodal, multivariate function. Mathematical Programming, 34(2):188–200, 1986. [10] R. G. Strongin. Convergence of an algorithm for finding a global extremum. Engineering Cybernetics, 11(4):549–555, 1973. [11] D. E. Kvasov, C. Pizzuti, and Y. D. Sergeyev. Local tuning and partition strategies for diagonal GO methods. Numerische Mathematik, 94(1):93–106, 2003. [12] S. Bubeck, G. Stoltz, and J. Y. Yu. Lipschitz bandits without the Lipschitz constant. In Algorithmic Learning Theory, pages 144–158. Springer, 2011. [13] J. Gardner, M. Kusner, K. Weinberger, and J. Cunningham. Bayesian Optimization with Inequality Constraints. In Proceedings of The 31st International Conference on Machine Learning (ICML), pages 937– 945, 2014. [14] Z. Wang, M. Zoghi, F. Hutter, D. Matheson, and N. De Freitas. Bayesian optimization in high dimensions via random embeddings. In Proceedings of the Twenty-Third international joint conference on Artificial Intelligence, pages 1778–1784. AAAI Press, 2013. [15] N. Srinivas, A. Krause, M. Seeger, and S. M. Kakade. Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design. In Proceedings of the 27th International Conference on Machine Learning (ICML), pages 1015–1022, 2010. [16] K. P. Murphy. Machine learning: a probabilistic perspective. MIT press, page 521, 2012. [17] C. E. Rasmussen and C. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [18] R. Munos. Optimistic optimization of deterministic functions without the knowledge of its smoothness. In Proceedings of Advances in neural information processing systems (NIPS), 2011. [19] D. R. Jones, C. D. Perttunen, and B. E. Stuckman. Lipschitzian optimization without the Lipschitz constant. Journal of Optimization Theory and Applications, 79(1):157–181, 1993. [20] K. Kandasamy, J. Schneider, and B. Poczos. High dimensional Bayesian optimisation and bandits via additive models. arXiv preprint arXiv:1503.01673, 2015. [21] S. Surjanovic and D. Bingham. Virtual library of simulation experiments: Test functions and datasets. Retrieved November 30, 2014, from http://www.sfu.ca/˜ssurjano, 2014. [22] D. B. McDonald, W. J. Grantham, W. L. Tabor, and M. J. Murphy. Global and local optimization using radial basis function response surface models. Applied Mathematical Modelling, 31(10):2095–2110, 2007. [23] T. J. Walsh, S. Goschin, and M. L. Littman. Integrating Sample-Based Planning and Model-Based Reinforcement Learning. In Proceedings of the 24th AAAI conference on Artificial Intelligence (AAAI), 2010. [24] A. L. Strehl, L. Li, and M. L. Littman. Reinforcement learning in finite MDPs: PAC analysis. The Journal of Machine Learning Research (JMLR), 10:2413–2444, 2009. 9 | 2015 | 27 |
5,780 | Semi-supervised Convolutional Neural Networks for Text Categorization via Region Embedding Rie Johnson RJ Research Consulting Tarrytown, NY, USA riejohnson@gmail.com Tong Zhang∗ Baidu Inc., Beijing, China Rutgers University, Piscataway, NJ, USA tzhang@stat.rutgers.edu Abstract This paper presents a new semi-supervised framework with convolutional neural networks (CNNs) for text categorization. Unlike the previous approaches that rely on word embeddings, our method learns embeddings of small text regions from unlabeled data for integration into a supervised CNN. The proposed scheme for embedding learning is based on the idea of two-view semi-supervised learning, which is intended to be useful for the task of interest even though the training is done on unlabeled data. Our models achieve better results than previous approaches on sentiment classification and topic classification tasks. 1 Introduction Convolutional neural networks (CNNs) [15] are neural networks that can make use of the internal structure of data such as the 2D structure of image data through convolution layers, where each computation unit responds to a small region of input data (e.g., a small square of a large image). On text, CNN has been gaining attention, used in systems for tagging, entity search, sentence modeling, and so on [4, 5, 26, 7, 21, 12, 25, 22, 24, 13], to make use of the 1D structure (word order) of text data. Since CNN was originally developed for image data, which is fixed-sized, low-dimensional and dense, without modification it cannot be applied to text documents, which are variable-sized, highdimensional and sparse if represented by sequences of one-hot vectors. In many of the CNN studies on text, therefore, words in sentences are first converted to low-dimensional word vectors. The word vectors are often obtained by some other method from an additional large corpus, which is typically done in a fashion similar to language modeling though there are many variations [3, 4, 20, 23, 6, 19]. Use of word vectors obtained this way is a form of semi-supervised learning and leaves us with the following questions. Q1. How effective is CNN on text in a purely supervised setting without the aid of unlabeled data? Q2. Can we use unlabeled data with CNN more effectively than using general word vector learning methods? Our recent study [11] addressed Q1 on text categorization and showed that CNN without a word vector layer is not only feasible but also beneficial when not aided by unlabeled data. Here we address Q2 also on text categorization: building on [11], we propose a new semi-supervised framework that learns embeddings of small text regions (instead of words) from unlabeled data, for use in a supervised CNN. The essence of CNN, as described later, is to convert small regions of data (e.g., “love it” in a document) to feature vectors for use in the upper layers; in other words, through training, a convolution layer learns an embedding of small regions of data. Here we use the term ‘embedding’ loosely to mean a structure-preserving function, in particular, a function that generates low-dimensional features that preserve the predictive structure. [11] applies CNN directly to high-dimensional one-hot vectors, which leads to directly learning an embedding of small text regions (e.g., regions of size 3 ∗Tong Zhang would like to acknowledge NSF IIS-1250985, NSF IIS-1407939, and NIH R01AI116744 for supporting his research. 1 like phrases, or regions of size 20 like sentences), eliminating the extra layer for word vector conversion. This direct learning of region embedding was noted to have the merit of higher accuracy with a simpler system (no need to tune hyper-parameters for word vectors) than supervised word vector-based CNN in which word vectors are randomly initialized and trained as part of CNN training. Moreover, the performance of [11]’s best CNN rivaled or exceeded the previous best results on the benchmark datasets. Motivated by this finding, we seek effective use of unlabeled data for text categorization through direct learning of embeddings of text regions. Our new semi-supervised framework learns a region embedding from unlabeled data and uses it to produce additional input (additional to one-hot vectors) to supervised CNN, where a region embedding is trained with labeled data. Specifically, from unlabeled data, we learn tv-embeddings (‘tv’ stands for ‘two-view’; defined later) of a text region through the task of predicting its surrounding context. According to our theoretical finding, a tv-embedding has desirable properties under ideal conditions on the relations between two views and the labels. While in reality the ideal conditions may not be perfectly met, we consider them as guidance in designing the tasks for tv-embedding learning. We consider several types of tv-embedding learning task trained on unlabeled data; e.g., one task is to predict the presence of the concepts relevant to the intended task (e.g., ‘desire to recommend the product’) in the context, and we indirectly use labeled data to set up this task. Thus, we seek to learn tv-embeddings useful specifically for the task of interest. This is in contrast to the previous word vector/embedding learning methods, which typically produce a word embedding for general purposes so that all aspects (e.g., either syntactic or semantic) of words are captured. In a sense, the goal of our region embedding learning is to map text regions to high-level concepts relevant to the task. This cannot be done by word embedding learning since individual words in isolation are too primitive to correspond to high-level concepts. For example, “easy to use” conveys positive sentiment, but “use” in isolation does not. We show that our models with tv-embeddings outperform the previous best results on sentiment classification and topic classification. Moreover, a more direct comparison confirms that our region tv-embeddings provide more compact and effective representations of regions for the task of interest than what can be obtained by manipulation of a word embedding. 1.1 Preliminary: one-hot CNN for text categorization [11] A CNN is a feed-forward network equipped with convolution layers interleaved with pooling layers. A convolution layer consists of computation units, each of which responds to a small region of input (e.g., a small square of an image), and the small regions collectively cover the entire data. A computation unit associated with the ℓ-th region of input x computes: σ(W · rℓ(x) + b) , (1) where rℓ(x) ∈Rq is the input region vector that represents the ℓ-th region. Weight matrix W ∈ Rm×q and bias vector b ∈Rm are shared by all the units in the same layer, and they are learned through training. In [11], input x is a document represented by one-hot vectors (Figure 1); therefore, we call [11]’s CNN one-hot CNN; rℓ(x) can be either a concatenation of one-hot vectors, a bag-ofword vector (bow), or a bag-of-n-gram vector: e.g., for a region “love it” I it love I it love rℓ(x) =[ 0 0 1 | 0 1 0 ]⊤ (concatenation) (2) I it love rℓ(x) =[ 0 1 1 ]⊤ (bow) (3) The bow representation (3) loses word order within the region but is more robust to data sparsity, enables a large region size such as 20, and speeds up training by having fewer parameters. This is what we mainly use for embedding learning from unlabeled data. CNN with (2) is called seq-CNN and CNN with (3) bow-CNN. The region size and stride (distance between the region centers) are meta-parameters. Note that we used a tiny three-word vocabulary for the vector examples above to save space, but a vocabulary of typical applications could be much larger. σ in (1) is a componentwise non-linear function (e.g., applying σ(x) = max(x, 0) to each vector component). Thus, each computation unit generates an m-dimensional vector where m is the number of weight vectors (W’s rows) or neurons. In other words, a convolution layer embodies an embedding of text regions, which produces an m-dim vector for each text region. In essence, a region embedding uses co-presence and absence of words in a region as input to produce predictive features, e.g., if presence of “easy 2 I really love it ! Output 1 (positive) Convolution layer (size 2) Top layer really love it ! Pooling layer 1 (positive) Input: One-hot vectors Figure 1: One-hot CNN example. Region size 2, stride 1. good good acting fun plot :) plot :) :) good acting , fun plot :) … Convolution layer f1 Top layer g1 acting Output X2 fun plot :) Input X1 … Figure 2: Tv-embedding learning by training to predict adjacent regions. to use” with absence of “not” is a predictive indicator, it can be turned into a large feature value by having a negative weight on “not” (to penalize its presence) and positive weights on the other three words in one row of W. A more formal argument can be found in the supplementary material. The m-dim vectors from all the text regions of each document are aggregated by the pooling layer, by either component-wise maximum (max-pooling) or average (average-pooling), and used by the top layer (a linear classifier) as features for classification. Here we focused on the convolution layer; for other details, [11] should be consulted. 2 Semi-supervised CNN with tv-embeddings for text categorization It was shown in [11] that one-hot CNN is effective on text categorization, where the essence is direct learning of an embedding of text regions aided by new options of input region vector representation. We go further along this line and propose a semi-supervised learning framework that learns an embedding of text regions from unlabeled data and then integrates the learned embedding in supervised training. The first step is to learn an embedding with the following property. Definition 1 (tv-embedding). A function f1 is a tv-embedding of X1 w.r.t. X2 if there exists a function g1 such that P(X2|X1) = g1(f1(X1), X2) for any (X1, X2) ∈X1 × X2. A tv-embedding (‘tv’ stands for two-view) of a view (X1), by definition, preserves everything required to predict another view (X2), and it can be trained on unlabeled data. The motivation of tvembedding is our theoretical finding (formalized in the Appendix) that, essentially, a tv-embedded feature vector f1(X1) is as useful as X1 for the purpose of classification under ideal conditions. The conditions essentially state that there exists a set H of hidden concepts such that two views and labels of the classification task are related to each other only through the concepts in H. The concepts in H might be, for example, “pricey”, “handy”, “hard to use”, and so on for sentiment classification of product reviews. While in reality the ideal conditions may not be completely met, we consider them as guidance and design tv-embedding learning accordingly. Tv-embedding learning is related to two-view feature learning [2] and ASO [1], which learn a linear embedding from unlabeled data through tasks such as predicting a word (or predicted labels) from the features associated with its surrounding words. These studies were, however, limited to a linear embedding. A related method in [6] learns a word embedding so that left context and right context maximally correlate in terms of canonical correlation analysis. While we share with these studies the general idea of using the relations of two views, we focus on nonlinear learning of region embeddings useful for the task of interest, and the resulting methods are very different. An important difference of tv-embedding learning from co-training is that it does not involve label guessing, thus avoiding risk of label contamination. [8] used a Stacked Denoising Auto-encoder to extract features invariant across domains for sentiment classification from unlabeled data. It is for fully-connected neural networks, which underperformed CNNs in [11]. Now let B be the base CNN model for the task of interest, and assume that B has one convolution layer with region size p. Note, however, that the restriction of having only one convolution layer is merely for simplifying the description. We propose a semi-supervised framework with the following two steps. 1. Tv-embedding learning: Train a neural network U to predict the context from each region of size p so that U’s convolution layer generates feature vectors for each text region of size p for use in the classifier in the top layer. It is this convolution layer, which embodies the tv-embedding, that we transfer to the supervised learning model in the next step. (Note that U differs from CNN in that each small region is associated with its own target/output.) 3 2. Final supervised learning: Integrate the learned tv-embedding (the convolution layer of U) into B, so that the tv-embedded regions (the output of U’s convolution layer) are used as an additional input to B’s convolution layer. Train this final model with labeled data. These two steps are described in more detail in the next two sections. 2.1 Learning tv-embeddings from unlabeled data We create a task on unlabeled data to predict the context (adjacent text regions) from each region of size p defined in B’s convolution layer. To see the correspondence to the definition of tv-embeddings, it helps to consider a sub-task that assigns a label (e.g., positive/negative) to each text region (e.g., “, fun plot”) instead of the ultimate task of categorizing the entire document. This is sensible because CNN makes predictions by building up from these small regions. In a document “good acting, fun plot :)” as in Figure 2, the clues for predicting a label of “, fun plot” are “, fun plot” itself (view1: X1) and its context “good acting” and “:)” (view-2: X2). U is trained to predict X2 from X1, i.e., to approximate P(X2|X1) by g1(f1(X1), X2)) as in Definition 1, and functions f1 and g1 are embodied by the convolution layer and the top layer, respectively. Given a document x, for each text region indexed by ℓ, U’s convolution layer computes: uℓ(x) = σ(U) W(U) · r(U) ℓ (x) + b(U) , (4) which is the same as (1) except for the superscript “(U)” to indicate that these entities belong to U. The top layer (a linear model for classification) uses uℓ(x) as features for prediction. W(U) and b(U) (and the top-layer parameters) are learned through training. The input region vector representation r(U) ℓ (x) can be either sequential, bow, or bag-of-n-gram, independent of rℓ(x) in B. The goal here is to learn an embedding of text regions (X1), shared with all the text regions at every location. Context (X2) is used only in tv-embedding learning as prediction target (i.e., not transferred to the final model); thus, the representation of context should be determined to optimize the final outcome without worrying about the cost at prediction time. Our guidance is the conditions on the relationships between the two views mentioned above; ideally, the two views should be related to each other only through the relevant concepts. We consider the following two types of target/context representation. Unsupervised target A straightforward vector encoding of context/target X2 is bow vectors of the text regions on the left and right to X1. If we distinguish the left and right, the target vector is 2|V |-dimensional with vocabulary V , and if not, |V |-dimensional. One potential problem of this encoding is that adjacent regions often have syntactic relations (e.g., “the” is often followed by an adjective or a noun), which are typically irrelevant to the task (e.g., to identify positive/negative sentiment) and therefore undesirable. A simple remedy we found effective is vocabulary control of context to remove function words (or stop-words if available) from (and only from) the target vocabulary. Partially-supervised target Another context representation that we consider is partially supervised in the sense that it uses labeled data. First, we train a CNN with the labeled data for the intended task and apply it to the unlabeled data. Then we discard the predictions and only retain the internal output of the convolution layer, which is an m-dimensional vector for each text region where m is the number of neurons. We use these m-dimensional vectors to represent the context. [11] has shown, by examples, that each dimension of these vectors roughly represents concepts relevant to the task, e.g., ‘desire to recommend the product’, ‘report of a faulty product’, and so on. Therefore, an advantage of this representation is that there is no obvious noise between X1 and X2 since context X2 is represented only by the concepts relevant to the task. A disadvantage is that it is only as good as the supervised CNN that produced it, which is not perfect and in particular, some relevant concepts would be missed if they did not appear in the labeled data. 2.2 Final supervised learning: integration of tv-embeddings into supervised CNN We use the tv-embedding obtained from unlabeled data to produce additional input to B’s convolution layer, by replacing σ (W · rℓ(x) + b) (1) with: σ (W · rℓ(x) + V · uℓ(x) + b) , (5) 4 where uℓ(x) is defined by (4), i.e., uℓ(x) is the output of the tv-embedding applied to the ℓ-th region. We train this model with the labeled data of the task; that is, we update the weights W, V, bias b, and the top-layer parameters so that the designated loss function is minimized on the labeled training data. W(U) and b(U) can be either fixed or updated for fine-tuning, and in this work we fix them for simplicity. Note that while (5) takes a tv-embedded region as input, (5) itself is also an embedding of text regions; let us call it (and also (1)) a supervised embedding, as it is trained with labeled data, to distinguish it from tv-embeddings. That is, we use tv-embeddings to improve the supervised embedding. Note that (5) can be naturally extended to accommodate multiple tv-embeddings by σ W · rℓ(x) + k X i=1 V(i) · u(i) ℓ(x) + b ! , (6) so that, for example, two types of tv-embedding (i.e., k = 2) obtained with the unsupervised target and the partially-supervised target can be used at once, which can lead to performance improvement as they complement each other, as shown later. 3 Experiments Our code and the experimental settings are available at riejohnson.com/cnn download.html. Data We used the three datasets used in [11]: IMDB, Elec, and RCV1, as summarized in Table 1. IMDB (movie reviews) [17] comes with an unlabeled set. To facilitate comparison with previous studies, we used a union of this set and the training set as unlabeled data. Elec consists of Amazon reviews of electronics products. To use as unlabeled data, we chose 200K reviews from the same data source so that they are disjoint from the training and test sets, and that the reviewed products are disjoint from the test set. On the 55-way classification of the second-level topics on RCV1 (news), unlabeled data was chosen to be disjoint from the training and test sets. On the multi-label categorization of 103 topics on RCV1, since the official LYRL04 split for this task divides the entire corpus into a training set and a test set, we used the entire test set as unlabeled data (the transductive learning setting). #train #test #unlabeled #class output IMDB 25,000 25,000 75K (20M words) 2 Positive/negative Elec 25,000 25,000 200K (24M words) 2 sentiment RCV1 15,564 49,838 669K (183M words) 55 (single) Topic(s) 23,149 781,265 781K (214M words) 103 (multi)† Table 1: Datasets. †The multi-label RCV1 is used only in Table 6. Implementation We used the one-layer CNN models found to be effective in [11] as our base models B, namely, seq-CNN on IMDB/Elec and bow-CNN on RCV1. Tv-embedding training minimized weighted square loss P i,j αi,j(zi[j] −pi[j])2 where i goes through the regions, z represents the target regions, and p is the model output. The weights αi,j were set to balance the loss originating from the presence and absence of words (or concepts in case of the partially-supervised target) and to speed up training by eliminating some negative examples, similar to negative sampling of [19]. To experiment with the unsupervised target, we set z to be bow vectors of adjacent regions on the left and right, while only retaining the 30K most frequent words with vocabulary control; on sentiment classification, function words were removed, and on topic classification, numbers and stop-words provided by [16] were removed. Note that these words were removed from (and only from) the target vocabulary. To produce the partially-supervised target, we first trained the supervised CNN models with 1000 neurons and applied the trained convolution layer to unlabeled data to generate 1000-dimensional vectors for each region. The rest of implementation follows [11]; i.e., supervised models minimized square loss with L2 regularization and optional dropout [9]; σ and σ(U) were the rectifier; response normalization was performed; optimization was done by SGD. Model selection On all the tested methods, tuning of meta-parameters was done by testing the models on the held-out portion of the training data, and then the models were re-trained with the chosen meta-parameters using the entire training data. 5 3.1 Performance results Overview After confirming the effectiveness of our new models in comparison with the supervised CNN, we report the performances of [13]’s CNN, which relies on word vectors pre-trained with a very large corpus (Table 3). Besides comparing the performance of approaches as a whole, it is also of interest to compare the usefulness of what was learned from unlabeled data; therefore, we show how it performs if we integrate the word vectors into our base model one-hot CNNs (Figure 3). In these experiments we also test word vectors trained by word2vec [19] on our unlabeled data (Figure 4). We then compare our models with two standard semi-supervised methods, transductive SVM (TSVM) [10] and co-training (Table 3), and with the previous best results in the literature (Tables 4–6). In all comparisons, our models outperform the others. In particular, our region tvembeddings are shown to be more compact and effective than region embeddings obtained by simple manipulation of word embeddings, which supports our approach of using region embedding instead of word embedding. names in Table 3 X1: r(U) ℓ (x) X2: target of U training unsup-tv. bow vector bow vector parsup-tv. bow vector output of supervised embedding unsup3-tv. bag-of-{1,2,3}-gram vector bow vector Table 2: Tested tv-embeddings. IMDB Elec RCV1 1 linear SVM with 1-3grams [11] 10.14 9.16 10.68 2 linear TSVM with 1-3grams 9.99 16.41 10.77 3 [13]’s CNN 9.17 8.03 10.44 4 One-hot CNN (simple) [11] 8.39 7.64 9.17 5 One-hot CNN (simple) co-training best (8.06) (7.63) (8.73) 6 unsup-tv. 100-dim 7.12 6.96 8.10 7 200-dim 6.81 6.69 7.97 8 Our CNN parsup-tv. 100-dim 7.12 6.58 8.19 9 200-dim 7.13 6.57 7.99 10 unsup3-tv. 100-dim 7.05 6.66 8.13 11 200-dim 6.96 6.84 8.02 12 all three 100×3 6.51 6.27 7.71 Table 3: Error rates (%). For comparison, all the CNN models were constrained to have 1000 neurons. The parentheses around the error rates indicate that co-training meta-parameters were tuned on test data. Our CNN with tv-embeddings We tested three types of tv-embedding as summarized in Table 2. The first thing to note is that all of our CNNs (Table 3, row 6–12) outperform their supervised counterpart in row 4. This confirms the effectiveness of the framework we propose. In Table 3, for meaningful comparison, all the CNNs are constrained to have exactly one convolution layer (except for [13]’s CNN) with 1000 neurons. The best-performing supervised CNNs within these constraints (row 4) are: seq-CNN (region size 3) on IMDB and Elec and bow-CNN (region size 20) on RCV11. They also served as our base models B (with region size parameterized on IMDB/Elec). More complex supervised CNNs from [11] will be reviewed later. On sentiment classification (IMDB and Elec), the region size chosen by model selection for our models was 5, larger than 3 for the supervised CNN. This indicates that unlabeled data enabled effective use of larger regions which are more predictive but might suffer from data sparsity in supervised settings. ‘unsup3-tv.’ (rows 10–11) uses a bag-of-n-gram vector to initially represent each region, thus, retains word order partially within the region. When used individually, unsup3-tv. did not outperform the other tv-embeddings, which use bow instead (rows 6–9). But we found that it contributed to error reduction when combined with the others (not shown in the table). This implies that it learned from unlabeled data predictive information that the other two embeddings missed. The best performances (row 12) were obtained by using all the three types of tv-embeddings at once according to (6). By doing so, the error rates were improved by nearly 1.9% (IMDB) and 1.4% (Elec and RCV1) compared with the supervised CNN (row 4), as a result of the three tv-embeddings with different strengths complementing each other. 1 The error rate on RCV1 in row 4 slightly differs from [11] because here we did not use the stopword list. 6 concat avg IMDB 8.31 7.83 Elec 7.37 7.24 RCV1 8.70 8.62 Figure 3: GN word vectors integrated into our base models. Better than [13]’s CNN (Table 3, row 3). 6.5 7 7.5 8 8.5 0 150 300 Error rate (%) additional dim IMDB 6 6.5 7 7.5 8 0 150 300 Error rate (%) additional dim Elec 7.5 8.5 9.5 Error rate (%) 7.5 8 8.5 9 9.5 0 150 300 additional dim RCV1 supervised w: concat w: average r: unsup-tv r: 3 tv-embed. Figure 4: Region tv-embeddings vs. word2vec word embeddings. Trained on our unlabeled data. x-axis: dimensionality of the additional input to supervised region embedding. ‘r:’: region, ‘w:’: word. [13]’s CNN It was shown in [13] that CNN that uses the Google News word vectors as input is competitive on a number of sentence classification tasks. These vectors (300-dimensional) were trained by the authors of word2vec [19] on a very large Google News (GN) corpus (100 billion words; 500–5K times larger than our unlabeled data). [13] argued that these vectors can be useful for various tasks, serving as ‘universal feature extractors’. We tested [13]’s CNN, which is equipped with three convolution layers with different region sizes (3, 4, and 5) and max-pooling, using the GN vectors as input. Although [13] used only 100 neurons for each layer, we changed it to 400, 300, and 300 to match the other models, which use 1000 neurons. Our models clearly outperform these models (Table 3, row 3) with relatively large differences. Comparison of embeddings Besides comparing the performance of the approaches as a whole, it is also of interest to compare the usefulness of what was learned from unlabeled data. For this purpose, we experimented with integration of a word embedding into our base models using two methods; one takes the concatenation, and the other takes the average, of word vectors for the words in the region. These provide additional input to the supervised embedding of regions in place of uℓ(x) in (5). That is, for comparison, we produce a region embedding from a word embedding to replace a region tv-embedding. We show the results with two types of word embeddings: the GN word embedding above (Figure 3), and word embeddings that we trained with the word2vec software on our unlabeled data, i.e., the same data as used for tv-embedding learning and all others (Figure 4). Note that Figure 4 plots error rates in relation to the dimensionality of the produced additional input; a smaller dimensionality has an advantage of faster training/prediction. On the results, first, the region tv-embedding is more useful for these tasks than the tested word embeddings since the models with a tv-embedding clearly outperform all the models with a word embedding. Word vector concatenations of much higher dimensionality than those shown in the figure still underperformed 100-dim region tv-embedding. Second, since our region tv-embedding takes the form of σ(W · rℓ(x) + b) with rℓ(x) being a bow vector, the columns of W correspond to words, and therefore, W · rℓ(x) is the sum of W’s columns whose corresponding words are in the ℓ-th region. Based on that, one might wonder why we should not simply use the sum or average of word vectors obtained by an existing tool such as word2vec instead. The suboptimal performances of ‘w: average’ (Figure 4) tells us that this is a bad idea. We attribute it to the fact that region embeddings learn predictiveness of co-presence and absence of words in a region; a region embedding can be more expressive than averaging of word vectors. Thus, an effective and compact region embedding cannot be trivially obtained from a word embedding. In particular, effectiveness of the combination of three tv-embeddings (‘r: 3 tv-embed.’ in Figure 4) stands out. Additionally, our mechanism of using information from unlabeled data is more effective than [13]’s CNN since our CNNs with GN (Figure 3) outperform [13]’s CNNs with GN (Table 3, row 3). This is because in our model, one-hot vectors (the original features) compensate for potential information loss in the embedding learned from unlabeled data. This, as well as region-vs-word embedding, is a major difference between our model and [13]’s model. Standard semi-supervised methods Many of the standard semi-supervised methods are not applicable to CNN as they require bow vectors as input. We tested TSVM with bag-of-{1,2,3}-gram vectors using SVMlight. TSVM underperformed the supervised SVM2 on two of the three datasets 2 Note that for feasibility, we only used the 30K most frequent n-grams in the TSVM experiments, thus, showing the SVM results also with 30K vocabulary for comparison, though on some datasets SVM performance can be improved by use of all the n-grams (e.g., 5 million n-grams on IMDB) [11]. This is because the computational cost of TSVM (single-core) turned out to be high, taking several days even with 30K vocabulary. 7 NB-LM 1-3grams [18] 8.13 – [11]’s best CNN 7.67 – Paragraph vectors [14] 7.46 Unlab.data Ensemble of 3 models [18] 7.43 Ens.+unlab. Our best 6.51 Unlab.data Table 4: IMDB: previous error rates (%). SVM 1-3grams [11] 8.71 – dense NN 1-3grams [11] 8.48 – NB-LM 1-3grams [11] 8.11 – [11]’s best CNN 7.14 – Our best 6.27 Unlab.data Table 5: Elec: previous error rates (%). models micro-F macro-F extra resource SVM [16] 81.6 60.7 – bow-CNN [11] 84.0 64.8 – bow-CNN w/ three tv-embed. 85.7 67.1 Unlabeled data Table 6: RCV1 micro- and macro-averaged F on the multi-label task (103 topics) with the LYRL04 split. (Table 3, rows 1–2). Since co-training is a meta-learner, it can be used with CNN. Random split of vocabulary and split into the first and last half of each document were tested. To reduce the computational burden, we report the best (and unrealistic) co-training performances obtained by optimizing the meta-parameters including when to stop on the test data. Even with this unfair advantage to cotraining, co-training (Table 3, row 5) clearly underperformed our models. The results demonstrate the difficulty of effectively using unlabeled data on these tasks, given that the size of the labeled data is relatively large. Comparison with the previous best results We compare our models with the previous best results on IMDB (Table 4). Our best model with three tv-embeddings outperforms the previous best results by nearly 0.9%. All of our models with a single tv-embed. (Table 3, row 6–11) also perform better than the previous results. Since Elec is a relatively new dataset, we are not aware of any previous semi-supervised results. Our performance is better than [11]’s best supervised CNN, which has a complex network architecture of three convolution-pooling pairs in parallel (Table 5). To compare with the benchmark results in [16], we tested our model on the multi-label task with the LYRL04 split [16] on RCV1, in which more than one out of 103 categories can be assigned to each document. Our model outperforms the best SVM of [16] and the best supervised CNN of [11] (Table 6). 4 Conclusion This paper proposed a new semi-supervised CNN framework for text categorization that learns embeddings of text regions with unlabeled data and then labeled data. As discussed in Section 1.1, a region embedding is trained to learn the predictiveness of co-presence and absence of words in a region. In contrast, a word embedding is trained to only represent individual words in isolation. Thus, a region embedding can be more expressive than simple averaging of word vectors in spite of their seeming similarity. Our comparison of embeddings confirmed its advantage; our region tvembeddings, which are trained specifically for the task of interest, are more effective than the tested word embeddings. Using our new models, we were able to achieve higher performances than the previous studies on sentiment classification and topic classification. Appendix A Theory of tv-embedding Suppose that we observe two views (X1, X2) ∈X1 × X2 of the input, and a target label Y ∈Y of interest, where X1 and X2 are finite discrete sets. Assumption 1. Assume that there exists a set of hidden states H such that X1, X2, and Y are conditionally independent given h in H, and that the rank of matrix [P(X1, X2)] is |H|. Theorem 1. Consider a tv-embedding f1 of X1 w.r.t. X2. Under Assumption 1, there exists a function q1 such that P(Y |X1) = q1(f1(X1), Y ). Further consider a tv-embedding f2 of X2 w.r.t. X1. Then, under Assumption 1, there exists a function q such that P(Y |X1, X2) = q(f1(X1), f2(X2), Y ). The proof can be found in the supplementary material. 8 References [1] Rie K. Ando and Tong Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6:1817–1853, 2005. [2] Rie K. Ando and Tong Zhang. Two-view feature generation model for semi-supervised learning. In Proceedings of ICML, 2007. [3] Yoshua Bengio, R´ejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic language model. Journal of Marchine Learning Research, 3:1137–1155, 2003. [4] Ronan Collobert and Jason Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of ICML, 2008. [5] Ronan Collobert, Jason Weston, L´eon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12:2493– 2537, 2011. [6] Paramveer S. Dhillon, Dean Foster, and Lyle Ungar. Multi-view learning of word embeddings via CCA. In Proceedings of NIPS, 2011. [7] Jianfeng Gao, Patric Pantel, Michael Gamon, Xiaodong He, and Li dent. Modeling interestingness with deep neural networks. In Proceedings of EMNLP, 2014. [8] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In Proceedings of ICML, 2011. [9] Geoffrey E. Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012. [10] Thorsten Joachims. Transductive inference for text classification using support vector machines. In Proceedings of ICML, 1999. [11] Rie Johnson and Tong Zhang. Effective use of word order for text categorization with convolutional neural networks. In Proceedings of NAACL HLT, 2015. [12] Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modeling sentences. In Proceedings of ACL, pages 655–665, 2014. [13] Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of EMNLP, pages 1746–1751, 2014. [14] Quoc Le and Tomas Mikolov. Distributed representations of sentences and documents. In Proceedings of ICML, 2014. [15] Yann LeCun, Le´on Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE. [16] David D. Lewis, Yiming Yang, Tony G. Rose, and Fan Li. RCV1: A new benchmark collection for text categorization research. Journal of Marchine Learning Research, 5:361–397, 2004. [17] Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of ACL, 2011. [18] Gr´egoire Mesnil, Tomas Mikolov, Marc’Aurelio Ranzato, and Yoshua Bengio. Ensemble of generative and discriminative techniques for sentiment analysis of movie reviews. arXiv:1412.5335v5 (4 Feb 2015 version), 2014. [19] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. In Proceedings of NIPS, 2013. [20] Andriy Mnih and Geoffrey E. Hinton. A scalable hierarchical distributed language model. In NIPS, 2008. [21] Yelong Shen, Xiaodong He, Jianfeng Gao, Li Deng, and Gr´egoire Mensnil. A latent semantic model with convolutional-pooling structure for information retrieval. In Proceedings of CIKM, 2014. [22] Duyu Tang, Furu Wei, Nan Yang, Ming Zhou, Ting Liu, and Bing Qin. Learning sentiment-specific word embedding for twitter sentiment classification. In Proceedings of ACL, pages 1555–1565, 2014. [23] Joseph Turian, Lev Rainov, and Yoshua Bengio. Word representations: A simple and general method for semi-supervised learning. In Proceedings of ACL, pages 384–394, 2010. [24] Jason Weston, Sumit Chopra, and Keith Adams. #tagspace: Semantic embeddings from hashtags. In Proceedings of EMNLP, pages 1822–1827, 2014. [25] Liheng Xu, Kang Liu, Siwei Lai, and Jun Zhao. Product feature mining: Semantic clues versus syntactic constituents. In Proceedings of ACL, pages 336–346, 2014. [26] Puyang Xu and Ruhi Sarikaya. Convolutional neural network based triangular CRF for joint intent detection and slot filling. In ASRU, 2013. 9 | 2015 | 270 |
5,781 | Fast Rates for Exp-concave Empirical Risk Minimization Tomer Koren Technion Haifa 32000, Israel tomerk@technion.ac.il Kfir Y. Levy Technion Haifa 32000, Israel kfiryl@tx.technion.ac.il Abstract We consider Empirical Risk Minimization (ERM) in the context of stochastic optimization with exp-concave and smooth losses—a general optimization framework that captures several important learning problems including linear and logistic regression, learning SVMs with the squared hinge-loss, portfolio selection and more. In this setting, we establish the first evidence that ERM is able to attain fast generalization rates, and show that the expected loss of the ERM solution in d dimensions converges to the optimal expected loss in a rate of d/n. This rate matches existing lower bounds up to constants and improves by a log n factor upon the state-of-the-art, which is only known to be attained by an online-to-batch conversion of computationally expensive online algorithms. 1 Introduction Statistical learning and stochastic optimization with exp-concave loss functions captures several fundamental problems in statistical machine learning, which include linear regression, logistic regression, learning support-vector machines (SVMs) with the squared hinge loss, and portfolio selection, amongst others. Exp-concave functions constitute a rich class of convex functions, which is substantially richer than its more familiar subclass of strongly convex functions. Similarly to their strongly-convex counterparts, it is well-known that exp-concave loss functions are amenable to fast generalization rates. Specifically, a standard online-to-batch conversion [6] of either the Online Newton Step algorithm [8] or exponential weighting schemes [5, 8] in d dimensions gives rise to convergence rate of d/n, as opposed to the standard 1/√n rate of generic (Lipschitz) stochastic convex optimization. Unfortunately, the latter online methods are highly inefficient computationally-wise; e.g., the runtime complexity of the Online Newton Step algorithm scales as d4 with the dimension of the problem, even in very simple optimization scenarios [13]. An alternative and widely-used learning paradigm is that of Empirical Risk Minimization (ERM), which is often regarded as the strategy of choice due to its generality and its statistical efficiency. In this scheme, a sample of training instances is drawn from the underlying data distribution, and the minimizer of the sample average (or the regularized sample average) is computed. As opposed to methods based on online-to-batch conversions, the ERM approach enables the use of any optimization procedure of choice and does not restrict one to use a specific online algorithm. Furthermore, the ERM solution often enjoys several distribution-dependent generalization bounds in conjunction, and thus is able to obliviously adapt to the properties of the underlying data distribution. In the context of exp-concave functions, however, nothing is known about the generalization abilities of ERM besides the standard 1/√n convergence rate that applies to any convex losses. Surprisingly, it appears that even in the specific and extensively-studied case of linear regression with the squared loss, the state of affairs remains unsettled: this important case was recently addressed by Shamir 1 [19], who proved a Ω(d/n) lower bound on the convergence rate of any algorithm, and conjectured that the rate of an ERM approach should match this lower bound. In this paper, we explore the convergence rate of ERM for stochastic exp-concave optimization. We show that when the exp-concave loss functions are also smooth, a slightly-regularized ERM approach yields a convergence rate of O(d/n), which matches the lower bound of Shamir [19] up to constants. In fact, our result shows for ERM a generalization rate tighter than the state-of-the-art obtained by the Online Newton Step algorithm, improving upon the latter by a log n factor. Even in the specific case of linear regression with the squared loss, our result improves by a log(n/d) factor upon the best known fast rates provided by the Vovk-Azoury-Warmuth algorithm [3, 22]. Our results open an avenue for potential improvements to the runtime complexity of exp-concave stochastic optimization, by permitting the use of accelerated methods for large-scale regularized loss minimization. The latter has been the topic of an extensive research effort in recent years, and numerous highly-efficient methods have been developed; see, e.g., Johnson and Zhang [10], ShalevShwartz and Zhang [16, 17] and the references therein. On the technical side, our convergence analysis relies on stability arguments introduced by Bousquet and Elisseeff [4]. We prove that the expected loss of the regularized ERM solution does not change significantly when a single instance, picked uniformly at random from the training sample, is discarded. Then, the technique of Bousquet and Elisseeff [4] allows us to translate this average stability property into a generalization guarantee. We remark that in all previous stability analyses that we are aware of, stability was shown to hold uniformly over all discarded training intances, either with probability one [4, 16] or in expectation [20]; in contrast, in the case of exp-concave functions it is crucial to look at the average stability. In order to bound the average stability of ERM, we make use of a localized notion of strong convexity, defined with respect to a local norm at a certain point in the optimization domain. Roughly speaking, we show that when looking at the right norm, which is determined by the local properties of the empirical risk at the right point, the minimizer of the empirical risk becomes stable. This part of our analysis is inspired by recent analysis techniques of regularization-based online learning algorithms [1], that use local norms to study the regret performance of online linear optimization algorithms. 1.1 Related Work The study of exp-concave loss functions was initiated in the online learning community by Kivinen and Warmuth [12], who considered the problem of prediction with expert advice with exp-concave losses. Later, Hazan et al. [8] considered a more general framework that allows for a continuous decision set, and proposed the Online Newton Step (ONS) algorithm that attains a regret bound that grows logarithmically with the number of optimization rounds. Mahdavi et al. [15] considered the ONS algorithm in the statistical setting, and showed how it can be used to establish generalization bounds that hold with high probability, while still keeping the fast 1/n rate. Fast convergence rates in stochastic optimization are known to be achievable under various conditions. Bousquet and Elisseeff [4] and Shalev-Shwartz et al. [18] have shown, via a uniform stability argument, that ERM guarantees a convergence rate of 1/n for strongly convex functions. Sridharan et al. [21] proved a similar result, albeit using the notion of localized Rademacher complexity. For the case of smooth and non-negative losses, Srebro et al. [20] established a 1/n rate in low-noise conditions, i.e., when the expected loss of the best hypothesis is of order 1/n. For further discussion of fast rates in stochastic optimization and learning, see [20] and the references therein. 2 Setup and Main Results We consider the problem of minimizing a stochastic objective F(w) = E[f(w, Z)] (1) over a closed and convex domain W ⊆Rd in d-dimensional Euclidean space. Here, the expectation is taken with respect to a random variable Z distributed according to an unknown distribution over a parameter space Z. Given a budget of n samples z1, . . . , zn of the random variable Z, we are required to produce an estimate bw ∈W whose expected excess loss, defined by 2 E[F( bw)] −minw∈W F(w), is small. (Here, the expectation is with respect the randomization of the training set z1, . . . , zn used to produce bw.) We make the following assumptions over the loss function f. First, we assume that for any fixed parameter z ∈Z, the function f(·, z) is α-exp-concave over the domain W for some α > 0, namely, that the function exp (−αf(·, z)) is concave over W. We will also assume that f(·, z) is β-smooth over W with respect to Euclidean norm ∥· ∥2, which means that its gradient is β-Lipschitz with respect to the same norm: ∀w, w′ ∈W , ∥∇f(w, z) −∇f(w′, z)∥2 ≤β∥w −w′∥2 . (2) In particular, this property implies that f(·, z) is differentiable. For simplicity, and without loss of generality, we assume β ≥1. Finally, we assume that f(·, z) is bounded over W, in the sense that |f(w, z) −f(w′, z)| ≤C for all w, w′ ∈W for some C > 0. In this paper, we analyze a regularized Empirical Risk Minimization (ERM) procedure for optimizing the stochastic objective in Eq. (1), that based on the sample z1, . . . , zn computes bw = arg min w∈W bF(w) , (3) where bF(w) = 1 n n X i=1 f(w, zi) + 1 nR(w) . (4) The function R : W 7→R serves as a regularizer, which is assumed to be 1-strongly-convex with respect to the Euclidean norm; for instance, one can simply choose R(w) = 1 2∥w∥2 2. The strong convexity of R implies in particular that bF is also strongly convex, which ensures that the optimizer bw is unique. For our bounds, we will assume that |R(w) −R(w′)| ≤B for all w, w′ ∈W for some constant B > 0. Our main result, which we now present, establishes a fast 1/n convergence rate for the expected excess loss of the ERM estimate bw given in Eq. (3). Theorem 1. Let f : W × Z 7→R be a loss function defined over a closed and convex domain W ⊆ Rd, which is α-exp-concave, β-smooth and B-bounded with respect to its first argument. Let R : W 7→R be a 1-strongly-convex and B-bounded regularization function. Then, for the regularized ERM estimate bw defined in Eqs. (3) and (4) based on an i.i.d. sample z1, . . . , zn, the expected excess loss is bounded as E[F( bw)] −min w∈W F(w) ≤24βd αn + 100Cd n + B n = O d n . In other words, the theorem states that for ensuring an expected excess loss of at most ϵ, a sample of size n = O(d/ϵ) suffices. This result improves upon the best known fast convergence rates for exp-concave functions by a O(log n) factor, and matches the lower bound of Shamir [19] for the special case where the loss function is the squared loss. For this particular case, our result affirms the conjecture of Shamir [19] regarding the sample complexity of ERM for the squared loss; see Section 2.1 below for details. It is important to note that Theorem 1 establishes a fast convergence rate with respect to the actual expected loss F itself, and not for a regularized version thereof (and in particular, not with respect to the expectation of bF). Notably, the magnitude of the regularization we use is only O(1/n), as opposed to the O(1/√n) regularization used in standard regularized loss minimization methods (that can only give rise to a traditional O(1/√n) rate). 2.1 Results for the Squared Loss In this section we focus on the important special case where the loss function f is the squared loss, namely, f(w; x, y) = 1 2(w·x −y)2 where x ∈Rd is an instance vector and y ∈R is a target value. This case, that was extensively studied in the past, was recently addressed by Shamir [19] who gave lower bounds on the sample complexity of any learning algorithm under mild assumptions. 3 Shamir [19] analyzed learning with the squared loss in a setting where the domain is W = {w ∈ Rd : ∥w∥2 ≤B} for some constant B > 0, and the parameters distribution is supported over {x ∈Rd : ∥x∥2 ≤1} × {y ∈R : |y| ≤B}. It is not hard to verify that in this setup, for the squared loss we can take β = 1, α = 4B2 and C = 2B2. Furthermore, if we choose the standard regularizer R(w) = 1 2∥w∥2 2, we have |R(w)−R(w′)| ≤1 2B2 for all w, w′ ∈W. As a consequence, Theorem 1 implies that the expected excess loss of the regularized ERM estimator bw we defined in Eq. (3) is bounded by O(B2d/n). On the other hand, standard uniform convergence results for generalized linear functions [e.g., 11] show that, under the same conditions, ERM also enjoys an upper bound of O(B2/√n) over its expected excess risk. Overall, we conclude: Corollary 2. For the squared loss f(w; x, y) = 1 2(w·x −y)2 over the domain W = {w ∈Rd : ∥w∥2 ≤B} with Z = {x ∈Rd : ∥x∥2 ≤1} × {y ∈R : |y| ≤B}, the regularized ERM estimator bw defined in Eqs. (3) and (4) based on an i.i.d. sample of n instances has E[F( bw)] −min w∈W F(w) = O min B2d n , B2 √n . This result slightly improves, by a log(n/d) factor, upon the bound conjectured by Shamir [19] for the ERM estimator, and matches the lower bound proved therein up to constants.1 Previous fast-rate results for ERM that we are aware of either included excess log factors [2] or were proven under additional distributional assumptions [14, 9]; see also the discussion in [19]. We remark that Shamir conjectures this bound for ERM without any regularization. For the specific case of the squared loss, it is indeed possible to obtain the same rates without regularizing; we defer details to the full version of the paper. However, in practice, regularization has several additional benefits: it renders the ERM optimization problem well-posed (i.e., ensures that the underlying matrix that needs to be inverted is well-conditioned), and guarantees it has a unique minimizer. 3 Proof of Theorem 1 Our proof of Theorem 1 proceeds as follows. First, we relate the expected excess risk of the ERM estimator bw to its average leave-one-out stability [4]. Then, we bound this stability in terms of certain local properties of the empirical risk at the point bw. To introduce the average stability notion we study, we first define for each i = 1, . . . , n the following empirical leave-one-out risk: bF i(w) = 1 n X j̸=i f(w, zj) + 1 nR(w) (i = 1, . . . , n) . Namely, bF i is the regularized empirical risk corresponding to the sample obtained by discarding the instance zi. Then, for each i we let bwi = arg minw∈W bF i(w) be the ERM estimator corresponding to bF i. The average leave-one-out stability of bw is then defined as the quantity 1 n Pn i=1(f( bwi, zi) −f( bw, zi)). Intuitively, the average leave-one-out stability serves as an unbiased estimator of the amount of change in the expected loss of the ERM estimator when one of the instances z1, . . . , zn, chosen uniformly at random, is removed from the training sample. We note that looking at the average is crucial for us, and the stronger condition of (expected) uniform stability does not hold for expconcave functions. For further discussion of the various stability notions, refer to Bousquet and Elisseeff [4]. Our main step in proving Theorem 1 involves bounding the average leave-one-out stability of bw defined in Eq. (3), which is the purpose of the next theorem. Theorem 3 (average leave-one-out stability). For any z1, . . . , zn ∈Z and for bw1, . . . , bwn and bw as defined above, we have 1 n n X i=1 f( bwi, zi) −f( bw, zi) ≤24βd αn + 100Cd n . 1We remark that Shamir’s result assumes two different bounds over the magnitude of the predictors w and the target values y, while here we assume both are bounded by the same constant B. We did not attempt to capture this refined dependence on the two different parameters. 4 Before proving this theorem, we first show how it can be used to obtain our main theorem. The proof follows arguments similar to those of Bousquet and Elisseeff [4] and Shalev-Shwartz et al. [18]. Proof of Theorem 1. To obtain the stated result, it is enough to upper bound the expected excess loss of bwn, which is the minimizer of the regularized empirical risk over the i.i.d. sample {z1, . . . , zn−1}. To this end, fix an arbitrary w⋆∈W. We first write F(w⋆) + 1 nR(w⋆) = E[ bF(w⋆)] ≥E[ bF( bw)] , which holds true since bw is the minimizer of bF over W. Hence, E[F( bwn)]−F(w⋆) ≤E[F( bwn) −bF( bw)] + 1 nR(w⋆) . (5) Next, notice that the random variables bw1, . . . , bwn have exactly the same distribution: each is the output of regularized ERM on an i.i.d. sample of n −1 examples. Also, notice that bwi, which is the minimizer of the sample obtained by discarding the i’th example, is independent of zi. Thus, we have E[F( bwn)] = 1 n n X i=1 E[F( bwi)] = 1 n n X i=1 E[f( bwi, zi)] . Furthermore, we can write E[ bF( bw)] = 1 n n X i=1 E[f( bw, zi)] + 1 nE[R( bw)] . Plugging these expressions into Eq. (5) gives a bound over the expected excess loss of bwn in terms of the average stability: E[F( bwn)]−F(w⋆) ≤1 n n X i=1 E[f( bwi, zi) −f( bw, zi)] + 1 nE[R(w⋆) −R( bw)] . Using Theorem 3 for bounding average stability term on the right-hand side, and our assumption that supw,w′∈W |R(w) −R(w′)| ≤B to bound the second term, we obtain the stated bound over the expected excess loss of bwn. The remainder of the section is devoted to the proof of Theorem 3. Before we begin with the proof of the theorem itself, we first present a useful tool for analyzing the stability of minimizers of convex functions, which we later apply to the empirical leave-one-out risks. 3.1 Local Strong Convexity and Stability Our stability analysis for exp-concave functions is inspired by recent analysis techniques of regularization-based online learning algorithms, that make use of strong convexity with respect to local norms [1]. The crucial strong-convexity property is summarized in the following definition. Definition 4 (Local strong convexity). We say that a function g : K 7→R is locally σ-stronglyconvex over a domain K ⊆Rd at x with respect to a norm ∥·∥, if ∀y ∈K , g(y) ≥g(x) + ∇g(x)·(y −x) + σ 2 ∥y −x∥2 . In words, a function is locally strongly-convex at x if it can be lower bounded (globally over its entire domain) by a quadratic tangent to the function at x; the nature of the quadratic term in this lower bound is determined by a choice of a local norm, which is typically adapted to the local properties of the function at the point x. With the above definition, we can now prove the following stability result for optima of convex functions, that underlies our stability analysis for exp-concave functions. 5 Lemma 5. Let g1, g2 : K 7→R be two convex functions defined over a closed and convex domain K ⊆Rd, and let x1 ∈arg minx∈K g1(x) and x2 ∈arg minx∈K g2(x). Assume that g2 is locally σ-strongly-convex at x1 with respect to a norm ∥·∥. Then, for h = g2 −g1 we have ∥x2 −x1∥≤2 σ ∥∇h(x1)∥∗. Furthermore, if h is convex then 0 ≤h(x1) −h(x2) ≤2 σ ∥∇h(x1)∥∗2 . Proof. The local strong convexity of g2 at x1 implies ∇g2(x1)·(x1 −x2) ≥g2(x1) −g2(x2) + σ 2 ∥x2 −x1∥2 . Notice that g2(x1) −g2(x2) ≥0, since x2 is a minimizer of g2. Also, since x1 is a minimizer of g1, first-order optimality conditions imply that ∇g1(x1)·(x1 −x2) ≤0, whence ∇g2(x1)·(x1 −x2) = ∇g1(x1)·(x1 −x2) + ∇h(x1)·(x1 −x2) ≤∇h(x1)·(x1 −x2) . Combining the observations yields σ 2 ∥x2 −x1∥2 ≤∇h(x1)·(x1 −x2) ≤∥∇h(x1)∥∗·∥x1 −x2∥, where we have used H¨older’s inequality in the last inequality. This gives the first claim of the lemma. To obtain the second claim, we first observe that g1(x2) + h(x2) ≤g1(x1) + h(x1) ≤g1(x2) + h(x1) where we used the fact that x2 is the minimizer of g2 = g1 + h for the first inequality, and the fact that x1 is the minimizer of g1 for the second. This establishes the lower bound 0 ≤h(x1) −h(x2). For the upper bound, we use the assumed convexity of h to write h(x1) −h(x2) ≤∇h(x1)·(x1 −x2) ≤∥∇h(x1)∥∗·∥x1 −x2∥≤2 σ ∥∇h(x1)∥∗2 , where the second inequality follows from H¨older’s inequality, and the final one from the first claim of the lemma. 3.2 Average Stability Analysis With Lemma 5 at hand, we now turn to prove Theorem 3. First, a few definitions are needed. For brevity, we henceforth denote fi(·) = f(·, zi) for all i. We let hi = ∇fi( bw) be the gradient of fi at the point bw defined in Eq. (3), and let H = 1 σId + Pn i=1 hihT i and Hi = 1 σId + P j̸=i hjhT j for all i, where σ = 1 2 min{ 1 4C , α}. Finally, we will use ∥·∥M to denote the norm induced by a positive definite matrix M, i.e., ∥x∥M = √ xTMx. In this case, the dual norm ∥x∥∗ M induced by M simply equals ∥x∥M −1 = √ xTM −1x. In order to obtain an upper bound over the average stability, we first bound each of the individual stability expressions fi( bwi)−fi( bw) in terms of a certain norm of the gradient hi of the corresponding function fi. As the proof below reveals, this norm is the local norm at bw with respect to which the leave-one-out risk bF i is locally strongly convex. Lemma 6. For all i = 1, . . . , n it holds that fi( bwi) −fi( bw) ≤6β σ ∥hi∥∗ Hi 2 . Notice that the expression on the right-hand side might be quite large for a particular function fi; indeed, uniform stability does not hold in our case. However, as we show below, the average of these expressions is small. The proof of Lemma 6 relies on Lemma 5 above and the following property of exp-concave functions, established by Hazan et al. [8]. 6 Lemma 7 (Hazan et al. [8], Lemma 3). Let f : K 7→R be an α-exp-concave function over a convex domain K ⊆Rd such that |f(x) −f(y)| ≤C for any x, y ∈K. Then for any σ ≤1 2 min{ 1 4C , α} it holds that ∀x, y ∈K , f(y) ≥f(x) + ∇f(x)·(y −x) + σ 2 ∇f(x)·(y −x) 2 . (6) Proof of Lemma 6. We apply Lemma 5 with g1 = bF and g2 = bF i (so that h = −1 nfi). We should first verify that bF i is indeed (σ/n)-strongly-convex at bw with respect to the norm ∥·∥Hi. Since each fi is α-exp-concave, Lemma 7 shows that for all w ∈W, fi(w) ≥fi( bw) + ∇fi( bw)·(w −bw) + σ 2 hi·(w −bw) 2 , (7) with our choice of σ = 1 2 min{ 1 4C , α}. Also, the strong convexity of the regularizer R implies that R(w) ≥R( bw) + ∇R( bw)·(w −bw) + 1 2∥w −bw∥2 2 . (8) Summing Eq. (7) over all j ̸= i with Eq. (8) and dividing through by n gives bF i(w) ≥bF i( bw) + ∇bF i( bw)·(w −bw) + σ 2n X j̸=i hi·(w −bw) 2 + 1 2n∥w −bw∥2 2 = bF i( bw) + ∇bF i( bw)·(w −bw) + σ 2n∥w −bw∥2 Hi , which establishes the strong convexity. Now, applying Lemma 5 gives ∥bwi −bw∥Hi ≤2n σ ∥∇h( bw)∥∗ Hi = 2 σ ∥hi∥∗ Hi . (9) On the other hand, since fi is convex, we have fi( bwi) −fi( bw) ≤∇fi( bwi)·( bwi −bw) = ∇fi( bw)·( bwi −bw) + ∇fi( bwi) −∇fi( bw) ·( bwi −bw) . (10) The first term can be bounded using H¨older’s inequality and Eq. (9) as ∇fi( bwi)·( bwi −bw) = hi·( bwi −bw) ≤∥hi∥∗ Hi ·∥bwi −bw∥Hi ≤2 σ ∥hi∥∗ Hi 2 . Also, since fi is β-smooth (with respect to the Euclidean norm), we can bound the second term in Eq. (10) as follows: ∇fi( bwi) −∇fi( bw) ·( bwi −bw) ≤∥∇fi( bwi) −∇fi( bw)∥2·∥bwi −bw∥2 ≤β∥bwi −bw∥2 2 , and since Hi ⪰(1/σ)Id, we can further bound using Eq. (9), ∥bwi −bw∥2 2 ≤σ∥bwi −bw∥2 Hi ≤4 σ ∥hi∥∗ Hi 2 . Combining the bounds (and simplifying using our assumption β ≥1) gives the lemma. Next, we bound a sum involving the local-norm terms introduced in Lemma 6. Lemma 8. Let I = {i ∈[n] : ∥hi∥∗ H > 1 2}. Then |I| ≤2d, and we have X i/∈I ∥hi∥∗ Hi 2 ≤2d . Proof. Denote ai = hT i H−1hi for all i = 1, . . . , n. First, we claim that ai > 0 for all i, and P i ai ≤d. The fact that ai > 0 is evident from H−1 being positive-definite. For the sum of the ai’s, we write: n X i=1 ai = n X i=1 hT i H−1hi = n X i=1 tr(H−1hihT i ) ≤tr(H−1H) = tr(Id) = d , (11) 7 where we have used the linearity of the trace, and the fact that H ⪰Pn i=1 hihT i . Now, our claim that |I| ≤2d is evident: if ∥hi∥∗ H > 1 2 for more than 2d terms, then the sum P i∈I ai = P i∈I hT i H−1hi must be larger than d, which is a contradiction to Eq. (11). To prove our second claim, we first write Hi = H −hihT i and use the Sherman-Morrison identity [e.g., 7] to obtain H−1 i = (H −hihT i )−1 = H−1 + H−1hihT i H−1 1 −hT i H−1hi for all i /∈I. Note that for i /∈I we have hT i H−1hi < 1, so that the identity applies and the inverse on the right-hand side is well defined. We therefore have: ∥hi∥∗ Hi 2 = hT i H−1 i hi = hT i H−1hi + hT i H−1hi 2 1 −hT i H−1hi = ai + a2 i 1 −ai ≤2ai , where the inequality follows from the fact that 1 −ai ≥ai for i /∈I. Summing this inequality over i /∈I and recalling that the ai’s are nonnegative, we obtain X i/∈I ∥hi∥∗ Hi 2 ≤2 X i/∈I ai ≤2 n X i=1 ai = 2d , which concludes the proof. Theorem 3 is now obtained as an immediate consequence of our lemmas above. Proof of Theorem 3. As a consequence of Lemmas 6 and 8, we have 1 n X i∈I fi( bwi) −fi( bw) ≤C|I| n ≤2Cd n , and 1 n X i/∈I fi( bwi) −fi( bw) ≤6β σn X i/∈I ∥hi∥∗ Hi 2 ≤12βd σn . Summing the inequalities and using 1 σ = 2 max{4C, 1 α} ≤2(4C + 1 α) gives the result. 4 Conclusions and Open Problems We have proved the first fast convergence rate for a regularized ERM procedure for exp-concave loss functions. Our bounds match the existing lower bounds in the specific case of the squared loss up to constants, and improve by a logarithmic factor upon the best known upper bounds achieved by online methods. Our stability analysis required us to assume smoothness of the loss functions, in addition to their exp-concavity. We note, however, that the Online Newton Step algorithm of Hazan et al. [8] for online exp-concave optimization does not require such an assumption. Even though most of the popular exp-concave loss functions are also smooth, it would be interesting to understand whether smoothness is indeed required for the convergence of the ERM estimator we study in the present paper, or whether it is simply a limitation of our analysis. Another interesting issue left open in our work is how to obtain bounds on the excess risk of ERM that hold with high probability, and not only in expectation. Since the excess risk is non-negative, one can always apply Markov’s inequality to obtain a bound that holds with probability 1 −δ but scales linearly with 1/δ. Also, using standard concentration inequalities (or success amplification techniques), we may also obtain high probability bounds that scale with p log(1/δ)/n, losing the fast 1/n rate. We leave the problem of obtaining bounds that depends both linearly on 1/n and logarithmically on 1/δ for future work. 8 References [1] J. D. Abernethy, E. Hazan, and A. Rakhlin. Interior-point methods for full-information and bandit online learning. Information Theory, IEEE Transactions on, 58(7):4164–4175, 2012. [2] M. Anthony and P. L. Bartlett. Neural network learning: Theoretical foundations. cambridge university press, 2009. [3] K. S. Azoury and M. K. Warmuth. Relative loss bounds for on-line density estimation with the exponential family of distributions. Machine Learning, 43(3):211–246, 2001. [4] O. Bousquet and A. Elisseeff. Stability and generalization. The Journal of Machine Learning Research, 2:499–526, 2002. [5] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [6] N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, 2004. [7] G. H. Golub and C. F. Van Loan. Matrix computations, volume 3. JHU Press, 2012. [8] E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [9] D. Hsu, S. M. Kakade, and T. Zhang. Random design analysis of ridge regression. Foundations of Computational Mathematics, 14(3):569–600, 2014. [10] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [11] S. M. Kakade, K. Sridharan, and A. Tewari. On the complexity of linear prediction: Risk bounds, margin bounds, and regularization. In Advances in neural information processing systems, pages 793–800, 2009. [12] J. Kivinen and M. K. Warmuth. Averaging expert predictions. In Computational Learning Theory, pages 153–167. Springer, 1999. [13] T. Koren. Open problem: Fast stochastic exp-concave optimization. In Conference on Learning Theory, pages 1073–1075, 2013. [14] G. Lecu´e and S. Mendelson. Performance of empirical risk minimization in linear aggregation. arXiv preprint arXiv:1402.5763, 2014. [15] M. Mahdavi, L. Zhang, and R. Jin. Lower and upper bounds on the generalization of stochastic exponentially concave optimization. In Proceedings of The 28th Conference on Learning Theory, 2015. [16] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss. The Journal of Machine Learning Research, 14(1):567–599, 2013. [17] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. Mathematical Programming, pages 1–41, 2014. [18] S. Shalev-Shwartz, O. Shamir, N. Srebro, and K. Sridharan. Learnability, stability and uniform convergence. The Journal of Machine Learning Research, 11:2635–2670, 2010. [19] O. Shamir. The sample complexity of learning linear predictors with the squared loss. arXiv preprint arXiv:1406.5143, 2014. [20] N. Srebro, K. Sridharan, and A. Tewari. Smoothness, low noise and fast rates. In Advances in neural information processing systems, pages 2199–2207, 2010. [21] K. Sridharan, S. Shalev-Shwartz, and N. Srebro. Fast rates for regularized objectives. In Advances in Neural Information Processing Systems, pages 1545–1552, 2009. [22] V. Vovk. Competitive on-line statistics. International Statistical Review, 69(2):213–248, 2001. 9 | 2015 | 271 |
5,782 | Learning both Weights and Connections for Efficient Neural Networks Song Han Stanford University songhan@stanford.edu Jeff Pool NVIDIA jpool@nvidia.com John Tran NVIDIA johntran@nvidia.com William J. Dally Stanford University NVIDIA dally@stanford.edu Abstract Neural networks are both computationally intensive and memory intensive, making them difficult to deploy on embedded systems. Also, conventional networks fix the architecture before training starts; as a result, training cannot improve the architecture. To address these limitations, we describe a method to reduce the storage and computation required by neural networks by an order of magnitude without affecting their accuracy by learning only the important connections. Our method prunes redundant connections using a three-step method. First, we train the network to learn which connections are important. Next, we prune the unimportant connections. Finally, we retrain the network to fine tune the weights of the remaining connections. On the ImageNet dataset, our method reduced the number of parameters of AlexNet by a factor of 9×, from 61 million to 6.7 million, without incurring accuracy loss. Similar experiments with VGG-16 found that the total number of parameters can be reduced by 13×, from 138 million to 10.3 million, again with no loss of accuracy. 1 Introduction Neural networks have become ubiquitous in applications ranging from computer vision [1] to speech recognition [2] and natural language processing [3]. We consider convolutional neural networks used for computer vision tasks which have grown over time. In 1998 Lecun et al. designed a CNN model LeNet-5 with less than 1M parameters to classify handwritten digits [4], while in 2012, Krizhevsky et al. [1] won the ImageNet competition with 60M parameters. Deepface classified human faces with 120M parameters [5], and Coates et al. [6] scaled up a network to 10B parameters. While these large neural networks are very powerful, their size consumes considerable storage, memory bandwidth, and computational resources. For embedded mobile applications, these resource demands become prohibitive. Figure 1 shows the energy cost of basic arithmetic and memory operations in a 45nm CMOS process. From this data we see the energy per connection is dominated by memory access and ranges from 5pJ for 32 bit coefficients in on-chip SRAM to 640pJ for 32bit coefficients in off-chip DRAM [7]. Large networks do not fit in on-chip storage and hence require the more costly DRAM accesses. Running a 1 billion connection neural network, for example, at 20Hz would require (20Hz)(1G)(640pJ) = 12.8W just for DRAM access - well beyond the power envelope of a typical mobile device. Our goal in pruning networks is to reduce the energy required to run such large networks so they can run in real time on mobile devices. The model size reduction from pruning also facilitates storage and transmission of mobile applications incorporating DNNs. 1 Operation Energy [pJ] Relative Cost 32 bit int ADD 0.1 1 32 bit float ADD 0.9 9 32 bit Register File 1 10 32 bit int MULT 3.1 31 32 bit float MULT 3.7 37 32 bit SRAM Cache 5 50 32 bit DRAM Memory 640 6400 1 10 100 1000 10000 Relative Energy Cost Figure 1: Energy table for 45nm CMOS process [7]. Memory access is 3 orders of magnitude more energy expensive than simple arithmetic. To achieve this goal, we present a method to prune network connections in a manner that preserves the original accuracy. After an initial training phase, we remove all connections whose weight is lower than a threshold. This pruning converts a dense, fully-connected layer to a sparse layer. This first phase learns the topology of the networks — learning which connections are important and removing the unimportant connections. We then retrain the sparse network so the remaining connections can compensate for the connections that have been removed. The phases of pruning and retraining may be repeated iteratively to further reduce network complexity. In effect, this training process learns the network connectivity in addition to the weights - much as in the mammalian brain [8][9], where synapses are created in the first few months of a child’s development, followed by gradual pruning of little-used connections, falling to typical adult values. 2 Related Work Neural networks are typically over-parameterized, and there is significant redundancy for deep learning models [10]. This results in a waste of both computation and memory. There have been various proposals to remove the redundancy: Vanhoucke et al. [11] explored a fixed-point implementation with 8-bit integer (vs 32-bit floating point) activations. Denton et al. [12] exploited the linear structure of the neural network by finding an appropriate low-rank approximation of the parameters and keeping the accuracy within 1% of the original model. With similar accuracy loss, Gong et al. [13] compressed deep convnets using vector quantization. These approximation and quantization techniques are orthogonal to network pruning, and they can be used together to obtain further gains [14]. There have been other attempts to reduce the number of parameters of neural networks by replacing the fully connected layer with global average pooling. The Network in Network architecture [15] and GoogLenet [16] achieves state-of-the-art results on several benchmarks by adopting this idea. However, transfer learning, i.e. reusing features learned on the ImageNet dataset and applying them to new tasks by only fine-tuning the fully connected layers, is more difficult with this approach. This problem is noted by Szegedy et al. [16] and motivates them to add a linear layer on the top of their networks to enable transfer learning. Network pruning has been used both to reduce network complexity and to reduce over-fitting. An early approach to pruning was biased weight decay [17]. Optimal Brain Damage [18] and Optimal Brain Surgeon [19] prune networks to reduce the number of connections based on the Hessian of the loss function and suggest that such pruning is more accurate than magnitude-based pruning such as weight decay. However, second order derivative needs additional computation. HashedNets [20] is a recent technique to reduce model sizes by using a hash function to randomly group connection weights into hash buckets, so that all connections within the same hash bucket share a single parameter value. This technique may benefit from pruning. As pointed out in Shi et al. [21] and Weinberger et al. [22], sparsity will minimize hash collision making feature hashing even more effective. HashedNets may be used together with pruning to give even better parameter savings. 2 Train Connectivity Prune Connections Train Weights Figure 2: Three-Step Training Pipeline. pruning neurons pruning synapses after pruning before pruning Figure 3: Synapses and neurons before and after pruning. 3 Learning Connections in Addition to Weights Our pruning method employs a three-step process, as illustrated in Figure 2, which begins by learning the connectivity via normal network training. Unlike conventional training, however, we are not learning the final values of the weights, but rather we are learning which connections are important. The second step is to prune the low-weight connections. All connections with weights below a threshold are removed from the network — converting a dense network into a sparse network, as shown in Figure 3. The final step retrains the network to learn the final weights for the remaining sparse connections. This step is critical. If the pruned network is used without retraining, accuracy is significantly impacted. 3.1 Regularization Choosing the correct regularization impacts the performance of pruning and retraining. L1 regularization penalizes non-zero parameters resulting in more parameters near zero. This gives better accuracy after pruning, but before retraining. However, the remaining connections are not as good as with L2 regularization, resulting in lower accuracy after retraining. Overall, L2 regularization gives the best pruning results. This is further discussed in experiment section. 3.2 Dropout Ratio Adjustment Dropout [23] is widely used to prevent over-fitting, and this also applies to retraining. During retraining, however, the dropout ratio must be adjusted to account for the change in model capacity. In dropout, each parameter is probabilistically dropped during training, but will come back during inference. In pruning, parameters are dropped forever after pruning and have no chance to come back during both training and inference. As the parameters get sparse, the classifier will select the most informative predictors and thus have much less prediction variance, which reduces over-fitting. As pruning already reduced model capacity, the retraining dropout ratio should be smaller. Quantitatively, let Ci be the number of connections in layer i, Cio for the original network, Cir for the network after retraining, Ni be the number of neurons in layer i. Since dropout works on neurons, and Ci varies quadratically with Ni, according to Equation 1 thus the dropout ratio after pruning the parameters should follow Equation 2, where Do represent the original dropout rate, Dr represent the dropout rate during retraining. Ci = NiNi−1 (1) Dr = Do r Cir Cio (2) 3.3 Local Pruning and Parameter Co-adaptation During retraining, it is better to retain the weights from the initial training phase for the connections that survived pruning than it is to re-initialize the pruned layers. CNNs contain fragile co-adapted features [24]: gradient descent is able to find a good solution when the network is initially trained, but not after re-initializing some layers and retraining them. So when we retrain the pruned layers, we should keep the surviving parameters instead of re-initializing them. 3 Table 1: Network pruning can save 9× to 13× parameters with no drop in predictive performance. Network Top-1 Error Top-5 Error Parameters Compression Rate LeNet-300-100 Ref 1.64% 267K LeNet-300-100 Pruned 1.59% 22K 12× LeNet-5 Ref 0.80% 431K LeNet-5 Pruned 0.77% 36K 12× AlexNet Ref 42.78% 19.73% 61M AlexNet Pruned 42.77% 19.67% 6.7M 9× VGG-16 Ref 31.50% 11.32% 138M VGG-16 Pruned 31.34% 10.88% 10.3M 13× Retraining the pruned layers starting with retained weights requires less computation because we don’t have to back propagate through the entire network. Also, neural networks are prone to suffer the vanishing gradient problem [25] as the networks get deeper, which makes pruning errors harder to recover for deep networks. To prevent this, we fix the parameters for CONV layers and only retrain the FC layers after pruning the FC layers, and vice versa. 3.4 Iterative Pruning Learning the right connections is an iterative process. Pruning followed by a retraining is one iteration, after many such iterations the minimum number connections could be found. Without loss of accuracy, this method can boost pruning rate from 5× to 9× on AlexNet compared with single-step aggressive pruning. Each iteration is a greedy search in that we find the best connections. We also experimented with probabilistically pruning parameters based on their absolute value, but this gave worse results. 3.5 Pruning Neurons After pruning connections, neurons with zero input connections or zero output connections may be safely pruned. This pruning is furthered by removing all connections to or from a pruned neuron. The retraining phase automatically arrives at the result where dead neurons will have both zero input connections and zero output connections. This occurs due to gradient descent and regularization. A neuron that has zero input connections (or zero output connections) will have no contribution to the final loss, leading the gradient to be zero for its output connection (or input connection), respectively. Only the regularization term will push the weights to zero. Thus, the dead neurons will be automatically removed during retraining. 4 Experiments We implemented network pruning in Caffe [26]. Caffe was modified to add a mask which disregards pruned parameters during network operation for each weight tensor. The pruning threshold is chosen as a quality parameter multiplied by the standard deviation of a layer’s weights. We carried out the experiments on Nvidia TitanX and GTX980 GPUs. We pruned four representative networks: Lenet-300-100 and Lenet-5 on MNIST, together with AlexNet and VGG-16 on ImageNet. The network parameters and accuracy 1 before and after pruning are shown in Table 1. 4.1 LeNet on MNIST We first experimented on MNIST dataset with the LeNet-300-100 and LeNet-5 networks [4]. LeNet300-100 is a fully connected network with two hidden layers, with 300 and 100 neurons each, which achieves 1.6% error rate on MNIST. LeNet-5 is a convolutional network that has two convolutional layers and two fully connected layers, which achieves 0.8% error rate on MNIST. After pruning, the network is retrained with 1/10 of the original network’s original learning rate. Table 1 shows 1Reference model is from Caffe model zoo, accuracy is measured without data augmentation 4 Table 2: For Lenet-300-100, pruning reduces the number of weights by 12× and computation by 12×. Layer Weights FLOP Act% Weights% FLOP% fc1 235K 470K 38% 8% 8% fc2 30K 60K 65% 9% 4% fc3 1K 2K 100% 26% 17% Total 266K 532K 46% 8% 8% Table 3: For Lenet-5, pruning reduces the number of weights by 12× and computation by 6×. Layer Weights FLOP Act% Weights% FLOP% conv1 0.5K 576K 82% 66% 66% conv2 25K 3200K 72% 12% 10% fc1 400K 800K 55% 8% 6% fc2 5K 10K 100% 19% 10% Total 431K 4586K 77% 8% 16% Figure 4: Visualization of the first FC layer’s sparsity pattern of Lenet-300-100. It has a banded structure repeated 28 times, which correspond to the un-pruned parameters in the center of the images, since the digits are written in the center. pruning saves 12× parameters on these networks. For each layer of the network the table shows (left to right) the original number of weights, the number of floating point operations to compute that layer’s activations, the average percentage of activations that are non-zero, the percentage of non-zero weights after pruning, and the percentage of actually required floating point operations. An interesting byproduct is that network pruning detects visual attention regions. Figure 4 shows the sparsity pattern of the first fully connected layer of LeNet-300-100, the matrix size is 784 ∗300. It has 28 bands, each band’s width 28, corresponding to the 28 × 28 input pixels. The colored regions of the figure, indicating non-zero parameters, correspond to the center of the image. Because digits are written in the center of the image, these are the important parameters. The graph is sparse on the left and right, corresponding to the less important regions on the top and bottom of the image. After pruning, the neural network finds the center of the image more important, and the connections to the peripheral regions are more heavily pruned. 4.2 AlexNet on ImageNet We further examine the performance of pruning on the ImageNet ILSVRC-2012 dataset, which has 1.2M training examples and 50k validation examples. We use the AlexNet Caffe model as the reference model, which has 61 million parameters across 5 convolutional layers and 3 fully connected layers. The AlexNet Caffe model achieved a top-1 accuracy of 57.2% and a top-5 accuracy of 80.3%. The original AlexNet took 75 hours to train on NVIDIA Titan X GPU. After pruning, the whole network is retrained with 1/100 of the original network’s initial learning rate. It took 173 hours to retrain the pruned AlexNet. Pruning is not used when iteratively prototyping the model, but rather used for model reduction when the model is ready for deployment. Thus, the retraining time is less a concern. Table 1 shows that AlexNet can be pruned to 1/9 of its original size without impacting accuracy, and the amount of computation can be reduced by 3×. 5 Table 4: For AlexNet, pruning reduces the number of weights by 9× and computation by 3×. Layer Weights FLOP Act% Weights% FLOP% conv1 35K 211M 88% 84% 84% conv2 307K 448M 52% 38% 33% conv3 885K 299M 37% 35% 18% conv4 663K 224M 40% 37% 14% conv5 442K 150M 34% 37% 14% fc1 38M 75M 36% 9% 3% fc2 17M 34M 40% 9% 3% fc3 4M 8M 100% 25% 10% Total 61M 1.5B 54% 11% 30% M 15M 30M 45M 60M conv1 conv2 conv3 conv4 conv5 fc1 fc2 fc3 total Remaining Parameters Pruned Parameters Table 5: For VGG-16, pruning reduces the number of weights by 12× and computation by 5×. Layer Weights FLOP Act% Weights% FLOP% conv1 1 2K 0.2B 53% 58% 58% conv1 2 37K 3.7B 89% 22% 12% conv2 1 74K 1.8B 80% 34% 30% conv2 2 148K 3.7B 81% 36% 29% conv3 1 295K 1.8B 68% 53% 43% conv3 2 590K 3.7B 70% 24% 16% conv3 3 590K 3.7B 64% 42% 29% conv4 1 1M 1.8B 51% 32% 21% conv4 2 2M 3.7B 45% 27% 14% conv4 3 2M 3.7B 34% 34% 15% conv5 1 2M 925M 32% 35% 12% conv5 2 2M 925M 29% 29% 9% conv5 3 2M 925M 19% 36% 11% fc6 103M 206M 38% 4% 1% fc7 17M 34M 42% 4% 2% fc8 4M 8M 100% 23% 9% total 138M 30.9B 64% 7.5% 21% 4.3 VGG-16 on ImageNet With promising results on AlexNet, we also looked at a larger, more recent network, VGG-16 [27], on the same ILSVRC-2012 dataset. VGG-16 has far more convolutional layers but still only three fully-connected layers. Following a similar methodology, we aggressively pruned both convolutional and fully-connected layers to realize a significant reduction in the number of weights, shown in Table 5. We used five iterations of pruning an retraining. The VGG-16 results are, like those for AlexNet, very promising. The network as a whole has been reduced to 7.5% of its original size (13× smaller). In particular, note that the two largest fully-connected layers can each be pruned to less than 4% of their original size. This reduction is critical for real time image processing, where there is little reuse of fully connected layers across images (unlike batch processing during training). 5 Discussion The trade-off curve between accuracy and number of parameters is shown in Figure 5. The more parameters pruned away, the less the accuracy. We experimented with L1 and L2 regularization, with and without retraining, together with iterative pruning to give five trade off lines. Comparing solid and dashed lines, the importance of retraining is clear: without retraining, accuracy begins dropping much sooner — with 1/3 of the original connections, rather than with 1/10 of the original connections. It’s interesting to see that we have the “free lunch” of reducing 2× the connections without losing accuracy even without retraining; while with retraining we are ably to reduce connections by 9×. 6 -4.5% -4.0% -3.5% -3.0% -2.5% -2.0% -1.5% -1.0% -0.5% 0.0% 0.5% 40% 50% 60% 70% 80% 90% 100% Accuracy Loss Parametes Pruned Away L2 regularization w/o retrain L1 regularization w/o retrain L1 regularization w/ retrain L2 regularization w/ retrain L2 regularization w/ iterative prune and retrain Figure 5: Trade-off curve for parameter reduction and loss in top-5 accuracy. L1 regularization performs better than L2 at learning the connections without retraining, while L2 regularization performs better than L1 at retraining. Iterative pruning gives the best result. -20% -15% -10% -5% 0% 0% 25% 50% 75% 100% Accuracy Loss #Parameters conv1 conv2 conv3 conv4 conv5 -20% -15% -10% -5% 0% 0% 25% 50% 75% 100% Accuracy Loss #Parameters fc1 fc2 fc3 Figure 6: Pruning sensitivity for CONV layer (left) and FC layer (right) of AlexNet. L1 regularization gives better accuracy than L2 directly after pruning (dotted blue and purple lines) since it pushes more parameters closer to zero. However, comparing the yellow and green lines shows that L2 outperforms L1 after retraining, since there is no benefit to further pushing values towards zero. One extension is to use L1 regularization for pruning and then L2 for retraining, but this did not beat simply using L2 for both phases. Parameters from one mode do not adapt well to the other. The biggest gain comes from iterative pruning (solid red line with solid circles). Here we take the pruned and retrained network (solid green line with circles) and prune and retrain it again. The leftmost dot on this curve corresponds to the point on the green line at 80% (5× pruning) pruned to 8×. There’s no accuracy loss at 9×. Not until 10× does the accuracy begin to drop sharply. Two green points achieve slightly better accuracy than the original model. We believe this accuracy improvement is due to pruning finding the right capacity of the network and hence reducing overfitting. Both CONV and FC layers can be pruned, but with different sensitivity. Figure 6 shows the sensitivity of each layer to network pruning. The figure shows how accuracy drops as parameters are pruned on a layer-by-layer basis. The CONV layers (on the left) are more sensitive to pruning than the fully connected layers (on the right). The first convolutional layer, which interacts with the input image directly, is most sensitive to pruning. We suspect this sensitivity is due to the input layer having only 3 channels and thus less redundancy than the other convolutional layers. We used the sensitivity results to find each layer’s threshold: for example, the smallest threshold was applied to the most sensitive layer, which is the first convolutional layer. Storing the pruned layers as sparse matrices has a storage overhead of only 15.6%. Storing relative rather than absolute indices reduces the space taken by the FC layer indices to 5 bits. Similarly, CONV layer indices can be represented with only 8 bits. 7 Table 6: Comparison with other model reduction methods on AlexNet. Data-free pruning [28] saved only 1.5× parameters with much loss of accuracy. Deep Fried Convnets [29] worked on fully connected layers only and reduced the parameters by less than 4×. [30] reduced the parameters by 4× with inferior accuracy. Naively cutting the layer size saves parameters but suffers from 4% loss of accuracy. [12] exploited the linear structure of convnets and compressed each layer individually, where model compression on a single layer incurred 0.9% accuracy penalty with biclustering + SVD. Network Top-1 Error Top-5 Error Parameters Compression Rate Baseline Caffemodel [26] 42.78% 19.73% 61.0M 1× Data-free pruning [28] 44.40% 39.6M 1.5× Fastfood-32-AD [29] 41.93% 32.8M 2× Fastfood-16-AD [29] 42.90% 16.4M 3.7× Collins & Kohli [30] 44.40% 15.2M 4× Naive Cut 47.18% 23.23% 13.8M 4.4× SVD [12] 44.02% 20.56% 11.9M 5× Network Pruning 42.77% 19.67% 6.7M 9× −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0 1 2 3 4 5 6 7 8 9 10 11 x 10 5 Weight Value Count Weight distribution before pruning −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0 1 2 3 4 5 6 7 8 9 10 11 x 10 4 Weight Value Count Weight distribution after pruning and retraining Figure 7: Weight distribution before and after parameter pruning. The right figure has 10× smaller scale. After pruning, the storage requirements of AlexNet and VGGNet are are small enough that all weights can be stored on chip, instead of off-chip DRAM which takes orders of magnitude more energy to access (Table 1). We are targeting our pruning method for fixed-function hardware specialized for sparse DNN, given the limitation of general purpose hardware on sparse computation. Figure 7 shows histograms of weight distribution before (left) and after (right) pruning. The weight is from the first fully connected layer of AlexNet. The two panels have different y-axis scales. The original distribution of weights is centered on zero with tails dropping off quickly. Almost all parameters are between [−0.015, 0.015]. After pruning the large center region is removed. The network parameters adjust themselves during the retraining phase. The result is that the parameters form a bimodal distribution and become more spread across the x-axis, between [−0.025, 0.025]. 6 Conclusion We have presented a method to improve the energy efficiency and storage of neural networks without affecting accuracy by finding the right connections. Our method, motivated in part by how learning works in the mammalian brain, operates by learning which connections are important, pruning the unimportant connections, and then retraining the remaining sparse network. We highlight our experiments on AlexNet and VGGNet on ImageNet, showing that both fully connected layer and convolutional layer can be pruned, reducing the number of connections by 9× to 13× without loss of accuracy. This leads to smaller memory capacity and bandwidth requirements for real-time image processing, making it easier to be deployed on mobile systems. References [1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 8 [2] Alex Graves and J¨urgen Schmidhuber. Framewise phoneme classification with bidirectional lstm and other neural network architectures. Neural Networks, 18(5):602–610, 2005. [3] Ronan Collobert, Jason Weston, L´eon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. Natural language processing (almost) from scratch. JMLR, 12:2493–2537, 2011. [4] Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [5] Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, pages 1701–1708. IEEE, 2014. [6] Adam Coates, Brody Huval, Tao Wang, David Wu, Bryan Catanzaro, and Ng Andrew. Deep learning with cots hpc systems. In 30th ICML, pages 1337–1345, 2013. [7] Mark Horowitz. Energy table for 45nm process, Stanford VLSI wiki. [8] JP Rauschecker. Neuronal mechanisms of developmental plasticity in the cat’s visual system. Human neurobiology, 3(2):109–114, 1983. [9] Christopher A Walsh. Peter huttenlocher (1931-2013). Nature, 502(7470):172–172, 2013. [10] Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pages 2148–2156, 2013. [11] Vincent Vanhoucke, Andrew Senior, and Mark Z Mao. Improving the speed of neural networks on cpus. In Proc. Deep Learning and Unsupervised Feature Learning NIPS Workshop, 2011. [12] Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In NIPS, pages 1269–1277, 2014. [13] Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. [14] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. [15] Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. [16] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. [17] Stephen Jos´e Hanson and Lorien Y Pratt. Comparing biases for minimal network construction with back-propagation. In Advances in neural information processing systems, pages 177–185, 1989. [18] Yann Le Cun, John S. Denker, and Sara A. Solla. Optimal brain damage. In Advances in Neural Information Processing Systems, pages 598–605. Morgan Kaufmann, 1990. [19] Babak Hassibi, David G Stork, et al. Second order derivatives for network pruning: Optimal brain surgeon. Advances in neural information processing systems, pages 164–164, 1993. [20] Wenlin Chen, James T. Wilson, Stephen Tyree, Kilian Q. Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. arXiv preprint arXiv:1504.04788, 2015. [21] Qinfeng Shi, James Petterson, Gideon Dror, John Langford, Alex Smola, and SVN Vishwanathan. Hash kernels for structured data. The Journal of Machine Learning Research, 10:2615–2637, 2009. [22] Kilian Weinberger, Anirban Dasgupta, John Langford, Alex Smola, and Josh Attenberg. Feature hashing for large scale multitask learning. In ICML, pages 1113–1120. ACM, 2009. [23] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 15:1929–1958, 2014. [24] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in Neural Information Processing Systems, pages 3320–3328, 2014. [25] Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [26] Yangqing Jia, et al. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [27] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [28] Suraj Srinivas and R Venkatesh Babu. Data-free parameter pruning for deep neural networks. arXiv preprint arXiv:1507.06149, 2015. [29] Zichao Yang, Marcin Moczulski, Misha Denil, Nando de Freitas, Alex Smola, Le Song, and Ziyu Wang. Deep fried convnets. arXiv preprint arXiv:1412.7149, 2014. [30] Maxwell D Collins and Pushmeet Kohli. Memory bounded deep convolutional networks. arXiv preprint arXiv:1412.1442, 2014. 9 | 2015 | 272 |
5,783 | Bayesian Dark Knowledge Anoop Korattikara, Vivek Rathod, Kevin Murphy Google Research {kbanoop, rathodv, kpmurphy}@google.com Max Welling University of Amsterdam m.welling@uva.nl Abstract We consider the problem of Bayesian parameter estimation for deep neural networks, which is important in problem settings where we may have little data, and/ or where we need accurate posterior predictive densities p(y|x, D), e.g., for applications involving bandits or active learning. One simple approach to this is to use online Monte Carlo methods, such as SGLD (stochastic gradient Langevin dynamics). Unfortunately, such a method needs to store many copies of the parameters (which wastes memory), and needs to make predictions using many versions of the model (which wastes time). We describe a method for “distilling” a Monte Carlo approximation to the posterior predictive density into a more compact form, namely a single deep neural network. We compare to two very recent approaches to Bayesian neural networks, namely an approach based on expectation propagation [HLA15] and an approach based on variational Bayes [BCKW15]. Our method performs better than both of these, is much simpler to implement, and uses less computation at test time. 1 Introduction Deep neural networks (DNNs) have recently been achieving state of the art results in many fields. However, their predictions are often over confident, which is a problem in applications such as active learning, reinforcement learning (including bandits), and classifier fusion, which all rely on good estimates of uncertainty. A principled way to tackle this problem is to use Bayesian inference. Specifically, we first compute the posterior distribution over the model parameters, p(θ|DN) ∝p(θ) QN i=1 p(yi|xi, θ), where DN = {(xi, yi)}N i=1, xi ∈X D is the i’th input (where D is the number of features), and yi ∈Y is the i’th output. Then we compute the posterior predictive distribution, p(y|x, DN) = R p(y|x, θ)p(θ|DN)dθ, for each test point x. For reasons of computational speed, it is common to approximate the posterior distribution by a point estimate such as the MAP estimate, ˆθ = argmax p(θ|DN). When N is large, we often use stochastic gradient descent (SGD) to compute ˆθ. Finally, we make a plug-in approximation to the predictive distribution: p(y|x, DN) ≈p(y|x, ˆθ). Unfortunately, this loses most of the benefits of the Bayesian approach, since uncertainty in the parameters (which induces uncertainty in the predictions) is ignored. Various ways of more accurately approximating p(θ|DN) (and hence p(y|x, DN)) have been developed. Recently, [HLA15] proposed a method called “probabilistic backpropagation” (PBP) based on an online version of expectation propagation (EP), (i.e., using repeated assumed density filtering (ADF)), where the posterior is approximated as a product of univariate Gaussians, one per parameter: p(θ|DN) ≈q(θ) ≜Q i N(θi|mi, vi). An alternative to EP is variational Bayes (VB) where we optimize a lower bound on the marginal likelihood. [Gra11] presented a (biased) Monte Carlo estimate of this lower bound and applies 1 his method, called “variational inference” (VI), to infer the neural network weights. More recently, [BCKW15] proposed an approach called “Bayes by Backprop” (BBB), which extends the VI method with an unbiased MC estimate of the lower bound based on the “reparameterization trick” of [KW14, RMW14]. In both [Gra11] and [BCKW15], the posterior is approximated by a product of univariate Gaussians. Although EP and VB scale well with data size (since they use online learning), there are several problems with these methods: (1) they can give poor approximations when the posterior p(θ|DN) does not factorize, or if it has multi-modality or skew; (2) at test time, computing the predictive density p(y|x, DN) can be much slower than using the plug-in approximation, because of the need to integrate out the parameters; (3) they need to use double the memory of a standard plug-in method (to store the mean and variance of each parameter), which can be problematic in memory-limited settings such as mobile phones; (4) they can be quite complicated to derive and implement. A common alternative to EP and VB is to use MCMC methods to approximate p(θ|DN). Traditional MCMC methods are batch algorithms, that scale poorly with dataset size. However, recently a method called stochastic gradient Langevin dynamics (SGLD) [WT11] has been devised that can draw samples approximately from the posterior in an online fashion, just as SGD updates a point estimate of the parameters online. Furthermore, various extensions of SGLD have been proposed, including stochastic gradient hybrid Monte Carlo (SGHMC) [CFG14], stochastic gradient Nos´e-Hoover Thermostat (SG-NHT) [DFB+14] (which improves upon SGHMC), stochastic gradient Fisher scoring (SGFS) [AKW12] (which uses second order information), stochastic gradient Riemannian Langevin Dynamics [PT13], distributed SGLD [ASW14], etc. However, in this paper, we will just use “vanilla” SGLD [WT11].1 All these MCMC methods (whether batch or online) produce a Monte Carlo approximation to the posterior, q(θ) = 1 S PS s=1 δ(θ −θs), where S is the number of samples. Such an approximation can be more accurate than that produced by EP or VB, and the method is much easier to implement (for SGLD, you essentially just add Gaussian noise to your SGD updates). However, at test time, things are S times slower than using a plug-in estimate, since we need to compute q(y|x) = 1 S PS s=1 p(y|x, θs), and the memory requirements are S times bigger, since we need to store the θs. (For our largest experiment, our DNN has 500k parameters, so we can only afford to store a single sample.) In this paper, we propose to train a parametric model S(y|x, w) to approximate the Monte Carlo posterior predictive distribution q(y|x) in order to gain the benefits of the Bayesian approach while only using the same run time cost as the plugin method. Following [HVD14], we call q(y|x) the “teacher” and S(y|x, w) the “student”. We use SGLD2 to estimate q(θ) and hence q(y|x) online; we simultaneously train the student online to minimize KL(q(y|x)||S(y|x, w)). We give the details in Section 2. Similar ideas have been proposed in the past. In particular, [SG05] also trained a parametric student model to approximate a Monte Carlo teacher. However, they used batch training and they used mixture models for the student. By contrast, we use online training (and can thus handle larger datasets), and use deep neural networks for the student. [HVD14] also trained a student neural network to emulate the predictions of a (larger) teacher network (a process they call “distillation”), extending earlier work of [BCNM06] which approximated an ensemble of classifiers by a single one. The key difference from our work is that our teacher is generated using MCMC, and our goal is not just to improve classification accuracy, but also to get reliable probabilistic predictions, especially away from the training data. [HVD14] coined the term “dark knowledge” to represent the information which is “hidden” inside the teacher network, and which can then be distilled into the student. We therefore call our approach “Bayesian dark knowledge”. 1 We did some preliminary experiments with SG-NHT for fitting an MLP to MNIST data, but the results were not much better than SGLD. 2Note that SGLD is an approximate sampling algorithm and introduces a slight bias in the predictions of the teacher and student network. If required, we can replace SGLD with an exact MCMC method (e.g. HMC) to get more accurate results at the expense of more training time. 2 In summary, our contributions are as follows. First, we show how to combine online MCMC methods with model distillation in order to get a simple, scalable approach to Bayesian inference of the parameters of neural networks (and other kinds of models). Second, we show that our probabilistic predictions lead to improved log likelihood scores on the test set compared to SGD and the recently proposed EP and VB approaches. 2 Methods Our goal is to train a student neural network (SNN) to approximate the Bayesian predictive distribution of the teacher, which is a Monte Carlo ensemble of teacher neural networks (TNN). If we denote the predictions of the teacher by p(y|x, DN) and the parameters of the student network by w, our objective becomes L(w|x) = KL(p(y|x, DN)||S(y|x, w)) = −Ep(y|x,DN) log S(y|x, w) + const = − Z Z p(y|x, θ)p(θ|DN)dθ log S(y|x, w)dy = − Z p(θ|DN) Z p(y|x, θ) log S(y|x, w)dy dθ = − Z p(θ|DN) Ep(y|x,θ) log S(y|x, w) dθ (1) Unfortunately, computing this integral is not analytically tractable. However, we can approximate this by Monte Carlo: ˆL(w|x) = −1 |Θ| X θs∈Θ Ep(y|x,θs) log S(y|x, w) (2) where Θ is a set of samples from p(θ|DN). To make this a function just of w, we need to integrate out x. For this, we need a dataset to train the student network on, which we will denote by D′. Note that points in this dataset do not need ground truth labels; instead the labels (which will be probability distributions) will be provided by the teacher. The choice of student data controls the domain over which the student will make accurate predictions. For low dimensional problems (such as in Section 3.1), we can uniformly sample the input domain. For higher dimensional problems, we can sample “near” the training data, for example by perturbing the inputs slightly. In any case, we will compute a Monte Carlo approximation to the loss as follows: ˆL(w) = Z p(x)L(w|x)dx ≈ 1 |D′| X x′∈D′ L(w|x′) ≈ −1 |Θ| 1 |D′| X θs∈Θ X x′∈D′ Ep(y|x′,θs) log S(y|x′, w) (3) It can take a lot of memory to pre-compute and store the set of parameter samples Θ and the set of data samples D′, so in practice we use the stochastic algorithm shown in Algorithm 1, which uses a single posterior sample θs and a minibatch of x′ at each step. The hyper-parameters λ and γ from Algorithm 1 control the strength of the priors for the teacher and student networks. We use simple spherical Gaussian priors (equivalent to L2 regularization); we set the precision (strength) of these Gaussian priors by cross-validation. Typically λ ≫γ, since the student gets to “see” more data than the teacher. This is true for two reasons: first, the teacher is trained to predict a single label per input, whereas the student is trained to predict a distribution, which contains more information (as argued in [HVD14]); second, the teacher makes multiple passes over the same training data, whereas the student sees “fresh” randomly generated data D′ at each step. 2.1 Classification For classification problems, each teacher network θs models the observations using a standard softmax model, p(y = k|x, θs). We want to approximate this using a student network, which also has a 3 Algorithm 1: Distilled SGLD Input: DN = {(xi, yi)}N i=1, minibatch size M, number of iterations T, teacher learning schedule ηt, student learning schedule ρt, teacher prior λ, student prior γ for t = 1 : T do // Train teacher (SGLD step) Sample minibatch indices S ⊂[1, N] of size M Sample zt ∼N(0, ηtI) Update θt+1 := θt + ηt 2 ∇θ log p(θ|λ) + N M P i∈S ∇θ log p(yi|xi, θ) + zt // Train student (SGD step) Sample D′ of size M from student data generator wt+1 := wt −ρt 1 M P x′∈D′ ∇w ˆL(w, θt+1|x′) + γwt softmax output, S(y = k|x, w). Hence from Eqn. 2, our loss function estimate is the standard cross entropy loss: ˆL(w|θs, x) = − K X k=1 p(y = k|x, θs) log S(y = k|x, w) (4) The student network outputs βk(x, w) = log S(y = k|x, w). To estimate the gradient w.r.t. w, we just have to compute the gradients w.r.t. β and back-propagate through the network. These gradients are given by ∂ˆL(w,θs|x) ∂βk(x,w) = −p(y = k|x, θs). 2.2 Regression In regression, the observations are modeled as p(yi|xi, θ) = N(yi|f(xi|θ), λ−1 n ) where f(x|θ) is the prediction of the TNN and λn is the noise precision. We want to approximate the predictive distribution as p(y|x, DN) ≈S(y|x, w) = N(y|µ(x, w), eα(x,w)). We will train a student network to output the parameters of the approximating distribution µ(x, w) and α(x, w); note that this is twice the number of outputs of the teacher network, since we want to capture the (data dependent) variance.3 We use eα(x,w) instead of directly predicting the variance σ2(x|w) to avoid dealing with positivity constraints during training. To train the SNN, we will minimize the objective defined in Eqn. 2: ˆL(w|θs, x) = −Ep(y|x,θs) log N(y|µ(x, w), eα(x,w)) = 1 2Ep(y|x,θs) h α(x, w) + e−α(x,w)(y −µ(x, w)2) i = 1 2 α(x, w) + e−α(x,w) (f(x|θs) −µ(x, w))2 + 1 λn Now, to estimate ∇w ˆL(w, θs|x), we just have to compute ∂ˆL ∂µ(x,w) and ∂ˆL ∂α(x,w), and back propagate through the network. These gradients are: ∂ˆL(w, θs|x) ∂µ(x, w) = e−α(x,w) {µ(x, w) −f(x|θs)} (5) ∂ˆL(w, θs|x ∂α(x, w) = 1 2 1 −e−α(x,w) (f(x|θs) −µ(x, w))2 + 1 λn (6) 3 Experimental results In this section, we compare SGLD and distilled SGLD with other approximate inference methods, including the plugin approximation using SGD, the PBP approach of [HLA15], the BBB approach of 3 This is not necessary in the classification case, since the softmax distribution already captures uncertainty. 4 Dataset N D Y PBP BBB HMC ToyClass 20 2 {0, 1} N N Y MNIST 60k 784 {0, . . . , 9} N Y N ToyReg 10 1 R Y N Y Boston Housing 506 13 R Y N N Table 1: Summary of our experimental configurations. (a) (b) (c) (d) (e) (f) Figure 1: Posterior predictive density for various methods on the toy 2d dataset. (a) SGD (plugin) using the 2-10-2 network. (b) HMC using 20k samples. (c) SGLD using 1k samples. (d-f) Distilled SGLD using a student network with the following architectures: 2-10-2, 2-100-2 and 2-10-10-2. [BCKW15], and Hamiltonian Monte Carlo (HMC) [Nea11], which is considered the “gold standard” for MCMC for neural nets. We implemented SGD and SGLD using the Torch library (torch.ch). For HMC, we used Stan (mc-stan.org). We perform this comparison for various classification and regression problems, as summarized in Table 1.4 3.1 Toy 2d classification problem We start with a toy 2d binary classification problem, in order to visually illustrate the performance of different methods. We generate a synthetic dataset in 2 dimensions with 2 classes, 10 points per class. We then fit a multi layer perceptron (MLP) with one hidden layer of 10 ReLu units and 2 softmax outputs (denoted 2-10-2) using SGD. The resulting predictions are shown in Figure 1(a). We see the expected sigmoidal probability ramp orthogonal to the linear decision boundary. Unfortunately, this method predicts a label of 0 or 1 with very high confidence, even for points that are far from the training data (e.g., in the top left and bottom right corners). In Figure 1(b), we show the result of HMC using 20k samples. This is the “true” posterior predictive density which we wish to approximate. In Figure 1(c), we show the result of SGLD using about 1000 samples. Specifically, we generate 100k samples, discard the first 2k for burnin, and then keep every 100’th sample. We see that this is a good approximation to the HMC distribution. In Figures 1(d-f), we show the results of approximating the SGLD Monte Carlo predictive distribution with a single student MLP of various sizes. To train this student network, we sampled points at random from the domain of the input, [−10, 10] × [−10, 10]; this encourages the student to predict accurately at all locations, including those far from the training data. In (d), the student has the same 4 Ideally, we would apply all methods to all datasets, to enable a proper comparison. Unfortunately, this was not possible, for various reasons. First, the open source code for the EP approach only supports regression, so we could not evaluate this on classification problems. Second, we were not able to run the BBB code, so we just quote performance numbers from their paper [BCKW15]. Third, HMC is too slow to run on large problems, so we just applied it to the small “toy” problems. Nevertheless, our experiments show that our methods compare favorably to these other methods. 5 Model Num. params. KL SGD 40 0.246 SGLD 40k 0.007 Distilled 2-10-2 40 0.031 Distilled 2-100-2 400 0.014 Distilled 2-10-10-2 140 0.009 Table 2: KL divergence on the 2d classification dataset. SGD [BCKW15] Dropout BBB SGD (our impl.) SGLD Dist. SGLD 1.83 1.51 1.82 1.536 ± 0.0120 1.271 ± 0.0126 1.307 ± 0.0169 Table 3: Test set misclassification rate on MNIST for different methods using a 784-400-400-10 MLP. SGD (first column), Dropout and BBB numbers are quoted from [BCKW15]. For our implmentation of SGD (fourth column), SGLD and distilled SGLD, we report the mean misclassification rate over 10 runs and its standard error. size as the teacher (2-10-2), but this is too simple a model to capture the complexity of the predictive distribution (which is an average over models). In (e), the student has a larger hidden layer (2-1002); this works better. However, we get best results using a two hidden layer model (2-10-10-2), as shown in (f). In Table 2, we show the KL divergence between the HMC distribution (which we consider as ground truth) and the various approximations mentioned above. We computed this by comparing the probability distributions pointwise on a 2d grid. The numbers match the qualitative results shown in Figure 1. 3.2 MNIST classification Now we consider the MNIST digit classification problem, which has N = 60k examples, 10 classes, and D = 784 features. The only preprocessing we do is divide the pixel values by 126 (as in [BCKW15]). We train only on 50K datapoints and use the remaining 10K for tuning hyperparameters. This means our results are not strictly comparable to a lot of published work, which uses the whole dataset for training; however, the difference is likely to be small. Following [BCKW15], we use an MLP with 2 hidden layers with 400 hidden units per layer, ReLU activations, and softmax outputs; we denote this by 784-400-400-10. This model has 500k parameters. We first fit this model by SGD, using these hyper parameters: fixed learning rate of ηt = 5 × 10−6, prior precision λ = 1, minibatch size M = 100, number of iterations T = 1M. As shown in Table 3, our final error rate on the test set is 1.536%, which is a bit lower than the SGD number reported in [BCKW15], perhaps due to the slightly different training/ validation configuration. Next we fit this model by SGLD, using these hyper parameters: fixed learning rate of ηt = 4×10−6, thinning interval τ = 100, burn in iterations B = 1000, prior precision λ = 1, minibatch size M = 100. As shown in Table 3, our final error rate on the test set is about 1.271%, which is better than the SGD, dropout and BBB results from [BCKW15].5 Finally, we consider using distillation, where the teacher is an SGLD MC approximation of the posterior predictive. We use the same 784-400-400-10 architecture for the student as well as the teacher. We generate data for the student by adding Gaussian noise (with standard deviation of 0.001) to randomly sampled training points6 We use a constant learning rate of ρ = 0.005, a batch size of M = 100, a prior precision of 0.001 (for the student) and train for T = 1M iterations. We obtain a test error of 1.307% which is very close to that obtained with SGLD (see Table 4). 5 We only show the BBB results with the same Gaussian prior that we use. Performance of BBB can be improved using other priors, such as a scale mixture of Gaussians, as shown in [BCKW15]. Our approach could probably also benefit from such a prior, but we did not try this. 6In the future, we would like to consider more sophisticated data perturbations, such as elastic distortions. 6 SGD SGLD Distilled SGLD -0.0613 ± 0.0002 -0.0419 ± 0.0002 -0.0502 ± 0.0007 Table 4: Log likelihood per test example on MNIST. We report the mean over 10 trials ± one standard error. Method Avg. test log likelihood PBP (as reported in [HLA15]) -2.574 ± 0.089 VI (as reported in [HLA15]) -2.903 ± 0.071 SGD -2.7639 ± 0.1527 SGLD -2.306 ± 0.1205 SGLD distilled -2.350 ± 0.0762 Table 5: Log likelihood per test example on the Boston housing dataset. We report the mean over 20 trials ± one standard error. We also report the average test log-likelihood of SGD, SGLD and distilled SGLD in Table 4. The log-likelihood is equivalent to the logarithmic scoring rule [Bic07] used in assessing the calibration of probabilistic models. The logarithmic rule is a strictly proper scoring rule, meaning that the score is uniquely maximized by predicting the true probabilities. From Table 4, we see that both SGLD and distilled SGLD acheive higher scores than SGD, and therefore produce better calibrated predictions. Note that the SGLD results were obtained by averaging predictions from ≈10,000 models sampled from the posterior, whereas distillation produces a single neural network that approximates the average prediction of these models, i.e. distillation reduces both storage and test time costs of SGLD by a factor of 10,000, without sacrificing much accuracy. In terms of training time, SGD took 1.3 ms, SGLD took 1.6 ms and distilled SGLD took 3.2 ms per iteration. In terms of memory, distilled SGLD requires only twice as much as SGD or SGLD during training, and the same as SGD during testing. 3.3 Toy 1d regression We start with a toy 1d regression problem, in order to visually illustrate the performance of different methods. We use the same data and model as [HLA15]. In particular, we use N = 20 points in D = 1 dimensions, sampled from the function y = x3 + ϵn, where ϵn ∼N(0, 9). We fit this data with an MLP with 10 hidden units and ReLU activations. For SGLD, we use S = 2000 samples. For distillation, the teacher uses the same architecture as the student. The results are shown in Figure 2. We see that SGLD is a better approximation to the “true” (HMC) posterior predictive density than the plugin SGD approximation (which has no predictive uncertainty), and the VI approximation of [Gra11]. Finally, we see that distilling SGLD incurs little loss in accuracy, but saves a lot computationally. 3.4 Boston housing Finally, we consider a larger regression problem, namely the Boston housing dataset, which was also used in [HLA15]. This has N = 506 data points (456 training, 50 testing), with D = 13 dimensions. Since this data set is so small, we repeated all experiments 20 times, using different train/ test splits. Following [HLA15], we use an MLP with 1 layer of 50 hidden units and ReLU activations. First we use SGD, with these hyper parameters7: Minibatch size M = 1, noise precision λn = 1.25, prior precision λ = 1, number of trials 20, constant learning rate ηt = 1e −6, number of iterations T = 170K. As shown in Table 5, we get an average log likelihood of −2.7639. Next we fit the model using SGLD. We use an initial learning rate of η0 = 1e −5, which we reduce by a factor of 0.5 every 80K iterations; we use 500K iterations, a burnin of 10K, and a thinning 7We choose all hyper-parameters using cross-validation whereas [HLA15] performs posterior inference on the noise and prior precisions, and uses Bayesian optimization to choose the remaining hyper-parameters. 7 Figure 2: Predictive distribution for different methods on a toy 1d regression problem. (a) PBP of [HLA15]. (b) HMC. (c) VI method of [Gra11]. (d) SGD. (e) SGLD. (f) Distilled SGLD. Error bars denote 3 standard deviations. (Figures a-d kindly provided by the authors of [HLA15]. We replace their term “BP” (backprop) with “SGD” to avoid confusion.) interval of 10. As shown in Table 5, we get an average log likelihood of −2.306, which is better than SGD. Finally, we distill our SGLD model. The student architecture is the same as the teacher. We use the following teacher hyper parameters: prior precision λ = 2.5; initial learning rate of η0 = 1e −5, which we reduce by a factor of 0.5 every 80K iterations. For the student, we use generated training data with Gaussian noise with standard deviation 0.05, we use a prior precision of γ = 0.001, an initial learning rate of ρ0 = 1e −2, which we reduce by 0.8 after every 5e3 iterations. As shown in Table 5, we get an average log likelihood of −2.350, which is only slightly worse than SGLD, and much better than SGD. Furthermore, both SGLD and distilled SGLD are better than the PBP method of [HLA15] and the VI method of [Gra11]. 4 Conclusions and future work We have shown a very simple method for “being Bayesian” about neural networks (and other kinds of models), that seems to work better than recently proposed alternatives based on EP [HLA15] and VB [Gra11, BCKW15]. There are various things we would like to do in the future: (1) Show the utility of our model in an end-to-end task, where predictive uncertainty is useful (such as with contextual bandits or active learning). (2) Consider ways to reduce the variance of the algorithm, perhaps by keeping a running minibatch of parameters uniformly sampled from the posterior, which can be done online using reservoir sampling. (3) Exploring more intelligent data generation methods for training the student. (4) Investigating if our method is able to reduce the prevalence of confident false predictions on adversarially generated examples, such as those discussed in [SZS+14]. Acknowledgements We thank Jos´e Miguel Hern´andez-Lobato, Julien Cornebise, Jonathan Huang, George Papandreou, Sergio Guadarrama and Nick Johnston. 8 References [AKW12] S. Ahn, A. Korattikara, and M. Welling. Bayesian Posterior Sampling via Stochastic Gradient Fisher Scoring. In ICML, 2012. [ASW14] Sungjin Ahn, Babak Shahbaba, and Max Welling. Distributed stochastic gradient MCMC. In ICML, 2014. [BCKW15] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight uncertainty in neural networks. In ICML, 2015. [BCNM06] Cristian Bucila, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In KDD, 2006. [Bic07] J Eric Bickel. Some comparisons among quadratic, spherical, and logarithmic scoring rules. Decision Analysis, 4(2):49–65, 2007. [CFG14] Tianqi Chen, Emily B Fox, and Carlos Guestrin. Stochastic Gradient Hamiltonian Monte Carlo. In ICML, 2014. [DFB+14] N Ding, Y Fang, R Babbush, C Chen, R Skeel, and H Neven. Bayesian sampling using stochastic gradient thermostats. In NIPS, 2014. [GG15] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. 6 June 2015. [Gra11] Alex Graves. Practical variational inference for neural networks. In NIPS, 2011. [HLA15] J. Hern´andez-Lobato and R. Adams. Probabilistic backpropagation for scalable learning of bayesian neural networks. In ICML, 2015. [HVD14] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning Workshop, 2014. [KW14] Diederik P Kingma and Max Welling. Stochastic gradient VB and the variational auto-encoder. In ICLR, 2014. [Nea11] Radford Neal. MCMC using hamiltonian dynamics. In Handbook of Markov chain Monte Carlo. Chapman and Hall, 2011. [PT13] Sam Patterson and Yee Whye Teh. Stochastic gradient riemannian langevin dynamics on the probability simplex. In NIPS, 2013. [RBK+14] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. FitNets: Hints for thin deep nets. Arxiv, 19 2014. [RMW14] D. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. [SG05] Edward Snelson and Zoubin Ghahramani. Compact approximations to bayesian predictive distributions. In ICML, 2005. [SZS+14] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. [WT11] Max Welling and Yee W Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. 9 | 2015 | 273 |
5,784 | On the Convergence of Stochastic Gradient MCMC Algorithms with High-Order Integrators Changyou Chen† Nan Ding‡ Lawrence Carin† †Dept. of Electrical and Computer Engineering, Duke University, Durham, NC, USA ‡Google Inc., Venice, CA, USA cchangyou@gmail.com; dingnan@google.com; lcarin@duke.edu Abstract Recent advances in Bayesian learning with large-scale data have witnessed emergence of stochastic gradient MCMC algorithms (SG-MCMC), such as stochastic gradient Langevin dynamics (SGLD), stochastic gradient Hamiltonian MCMC (SGHMC), and the stochastic gradient thermostat. While finite-time convergence properties of the SGLD with a 1st-order Euler integrator have recently been studied, corresponding theory for general SG-MCMCs has not been explored. In this paper we consider general SG-MCMCs with high-order integrators, and develop theory to analyze finite-time convergence properties and their asymptotic invariant measures. Our theoretical results show faster convergence rates and more accurate invariant measures for SG-MCMCs with higher-order integrators. For example, with the proposed efficient 2nd-order symmetric splitting integrator, the mean square error (MSE) of the posterior average for the SGHMC achieves an optimal convergence rate of L−4/5 at L iterations, compared to L−2/3 for the SGHMC and SGLD with 1st-order Euler integrators. Furthermore, convergence results of decreasing-step-size SG-MCMCs are also developed, with the same convergence rates as their fixed-step-size counterparts for a specific decreasing sequence. Experiments on both synthetic and real datasets verify our theory, and show advantages of the proposed method in two large-scale real applications. 1 Introduction In large-scale Bayesian learning, diffusion based sampling methods have become increasingly popular. Most of these methods are based on Itˆo diffusions, defined as: d Xt = F(Xt)dt + σ(Xt)dWt . (1) Here Xt ∈Rn represents model states, t the time index, Wt is Brownian motion, functions F : Rn →Rn and σ : Rn →Rn×m (m not necessarily equal to n) are assumed to satisfy the usual Lipschitz continuity condition. In a Bayesian setting, the goal is to design appropriate functions F and σ, so that the stationary distribution, ρ(X), of the Itˆo diffusion has a marginal distribution that is equal to the posterior distribution of interest. For example, 1st-order Langevin dynamics (LD) correspond to X = θ, F = −∇θU and σ = √ 2 In, with In being the n×n identity matrix; 2nd-order Langevin dynamics correspond to X = (θ, p), F = p −D p −∇θU , and σ = √ 2D 0 0 0 In for some D > 0. Here U is the unnormalized negative log-posterior, and p is known as the momentum [1, 2]. Based on the Fokker-Planck equation [3], the stationary distributions of these dynamics exist and their marginals over θ are equal to ρ(θ) ∝exp(−U(θ)), the posterior distribution we are interested in. Since Itˆo diffusions are continuous-time Markov processes, exact sampling is in general infeasible. As a result, the following two approximations have been introduced in the machine learning liter1 ature [1, 2, 4], to make the sampling numerically feasible and practically scalable: 1) Instead of analytically integrating infinitesimal increments dt, numerical integration over small step h is used to approximate the integration of the true dynamics. Although many numerical schemes have been studied in the SDE literature, in machine learning only the 1st-order Euler scheme is widely applied. 2) During every integration, instead of working with the gradient of the full negative log-posterior U(θ), a stochastic-gradient version of it, ˜Ul(θ), is calculated from the l-th minibatch of data, important when considering problems with massive data. In this paper, we call algorithms based on 1) and 2) SG-MCMC algorithms. To be complete, some recently proposed SG-MCMC algorithms are briefly reviewed in Appendix A. SG-MCMC algorithms often work well in practice, however some theoretical concerns about the convergence properties have been raised [5–7]. Recently, [5, 6, 8] showed that the SGLD [4] converges weakly to the true posterior. In [7], the author studied the sample-path inconsistency of the Hamiltonian PDE with stochastic gradients (but not the SGHMC), and pointed out its incompatibility with data subsampling. However, real applications only require convergence in the weak sense, i.e., instead of requiring sample-wise convergence as in [7], only laws of sample paths are of concern∗. Very recently, the invariance measure of an SGMCMC with a specific stochastic gradient noise was studied in [9]. However, the technique is not readily applicable to our general setting. In this paper we focus on general SG-MCMCs, and study the role of their numerical integrators. Our main contributions include: i) From a theoretical viewpoint, we prove weak convergence results for general SG-MCMCs, which are of practical interest. Specifically, for a Kth-order numerical integrator, the bias of the expected sample average of an SG-MCMC at iteration L is upper bounded by L−K/(K+1) with optimal step size h ∝L−1/(K+1), and the MSE by L−2K/(2K+1) with optimal h ∝L−1/(2K+1). This generalizes the results of the SGLD with an Euler integrator (K = 1) in [5, 6, 8], and is better when K ≥2; ii) From a practical perspective, we introduce a numerically efficient 2nd-order integrator, based on symmetric splitting schemes [9]. When applied to the SGHMC, it outperforms existing algorithms, including the SGLD and SGHMC with Euler integrators, considering both synthetic and large real datasets. 2 Preliminaries & Two Approximation Errors in SG-MCMCs In weak convergence analysis, instead of working directly with sample-paths in (1), we study how the expected value of any suitably smooth statistic of Xt evolves in time. This motivates the introduction of an (infinitesimal) generator. Formally, the generator L of the diffusion (1) is defined for any compactly supported twice differentiable function f : Rn →R, such that, Lf(Xt) ≜lim h→0+ E [f(Xt+h)] −f(Xt) h = F(Xt) · ∇+ 1 2 σ(Xt)σ(Xt)T :∇∇T f(Xt) , where a · b ≜aT b, A : B ≜tr(AT B), h →0+ means h approaches zero along the positive real axis. L is associated with an integrated form via Kolmogorov’s backward equation† : E [f(Xe T )] = eT Lf(X0), where Xe T denotes the exact solution of the diffusion (1) at time T. The operator eT L is called the Kolmogorov operator for the diffusion (1). Since diffusion (1) is continuous, it is generally infeasible to solve analytically (so is eT L). In practice, a local numerical integrator is used for every small step h, with the corresponding Kolmogorov operator Ph approximating ehL. Let Xn lh denote the approximate sample path from such a numerical integrator; similarly, we have E[f(Xn lh)] = Phf(Xn (l−1)h). Let A ◦B denote the composition of two operators A and B, i.e., A is evaluated on the output of B. For time T = Lh, we have the following approximation E [f(Xe T )] A1 = ehL ◦. . . ◦ehLf(X0) A2 ≃Ph ◦. . . ◦Phf(X0) = E[f(Xn T )], with L compositions, where A1 is obtained by decomposing TL into L sub-operators, each for a minibatch of data, while approximation A2 is manifested by approximating the infeasible ehL with Ph from a feasible integrator, e.g., the symmetric splitting integrator proposed later, such that ∗For completeness, we provide mean sample-path properties of the SGHMC (similar to [7]) in Appendix J. †More details of the equation are provided in Appendix B. Specifically, under mild conditions on F, we can expand the operator ehL up to the mth-order (m ≥1) such that the remainder terms are bounded by O(hm+1). Refer to [10] for more details. We will assume these conditions to hold for the F’s in this paper. 2 E [f(Xn T )] is close to the exact expectation E [f(Xe T )]. The latter is the first approximation error introduced in SG-MCMCs. Formally, to characterize the degree of approximation accuracies for different numerical methods, we use the following definition. Definition 1. An integrator is said to be a Kth-order local integrator if for any smooth and bounded function f, the corresponding Kolmogorov operator Ph satisfies the following relation: Phf(x) = ehLf(x) + O(hK+1) . (2) The second approximation error is manifested when handling large data. Specifically, the SGLD and SGHMC use stochastic gradients in the 1st and 2nd-order LDs, respectively, by replacing in F and L the full negative log-posterior U with a scaled log-posterior, ˜Ul, from the l-th minibatch. We denote the corresponding generators with stochastic gradients as ˜Ll, e.g., the generator in the l-th minibatch for the SGHMC becomes ˜Ll = L +∆Vl, where ∆Vl = (∇θ ˜Ul−∇θU)·∇p. As a result, in SG-MCMC algorithms, we use the noisy operator ˜P l h to approximate eh˜Ll such that E[f(Xn,s lh )] = ˜P l hf(X(l−1)h), where Xn,s lh denotes the numerical sample-path with stochastic gradient noise, i.e., E [f(Xe T )] B1 ≃eh˜LL ◦. . . ◦eh˜L1f(X0) B2 ≃˜P L h ◦. . . ◦˜P 1 hf(X0) = E[f(Xn,s T )]. (3) Approximations B1 and B2 in (3) are from the stochastic gradient and numerical integrator approximations, respectively. Similarly, we say ˜P l h corresponds to a Kth-order local integrator of ˜Ll if ˜P l hf(x) = eh˜Llf(x) + O(hK+1). In the following sections, we focus on SG-MCMCs which use numerical integrators with stochastic gradients, and for the first time analyze how the two introduced errors affect their convergence behaviors. For notational simplicity, we henceforth use Xt to represent the approximate sample-path Xn,s t . 3 Convergence Analysis This section develops theory to analyze finite-time convergence properties of general SG-MCMCs with both fixed and decreasing step sizes, as well as their asymptotic invariant measures. 3.1 Finite-time error analysis Given an ergodic‡ Itˆo diffusion (1) with an invariant measure ρ(x), the posterior average is defined as: ¯φ ≜ R X φ(x)ρ(x)d x for some test function φ(x) of interest. For a given numerical method with generated samples (Xlh)L l=1, we use the sample average ˆφ defined as ˆφ = 1 L PL l=1 φ(Xlh) to approximate ¯φ. In the analysis, we define a functional ψ that solves the following Poisson Equation: Lψ(Xlh) = φ(Xlh) −¯φ, or equivalently, 1 L L X l=1 Lψ(Xlh) = ˆφ −¯φ. (4) The solution functional ψ(Xlh) characterizes the difference between φ(Xlh) and the posterior average ¯φ for every Xlh, thus would typically possess a unique solution, which is at least as smooth as φ under the elliptic or hypoelliptic settings [12]. In the unbounded domain of Xlh ∈Rn, to make the presentation simple, we follow [6] and make certain assumptions on the solution functional, ψ, of the Poisson equation (4), which are used in the detailed proofs. Extensive empirical results have indicated the assumptions to hold in many real applications, though extra work is needed for theoretical verifications for different models, which is beyond the scope of this paper. Assumption 1. ψ and its up to 3rd-order derivatives, Dkψ, are bounded by a function§ V, i.e., ∥Dkψ∥≤CkVpk for k = (0, 1, 2, 3), Ck, pk > 0. Furthermore, the expectation of V on {Xlh} is bounded: supl EVp(Xlh) < ∞, and V is smooth such that sups∈(0,1) Vp (s X + (1 −s) Y) ≤ C (Vp (X) + Vp (Y)), ∀X, Y, p ≤max{2pk} for some C > 0. ‡See [6, 11] for conditions to ensure (1) is ergodic. §The existence of such function can be translated into finding a Lyapunov function for the corresponding SDEs, an important topic in PDE literatures [13]. See Assumption 4.1 in [6] and Appendix C for more details. 3 We emphasize that our proof techniques are related to those of the SGLD [6, 12], but with significant distinctions in that, instead of expanding the function ψ(Xlh) [6], whose parameter Xlh does not endow an explicit form in general SG-MCMCs, we start from expanding the Kolmogorov’s backward equation for each minibatch. Moreover, our techniques apply for general SG-MCMCs, instead of for one specific algorithm. More specifically, given a Kth-order local integrator with the corresponding Kolmogorov operator ˜P l h, according to Definition 1 and (3), the Kolmogorov’s backward equation for the l-th minibatch can be expanded as: E[ψ(Xlh)] = ˜P l hψ(X(l−1)h) = eh˜Llψ(X(l−1)h) + O(hK+1) = I + h˜Ll ψ(X(l−1)h) + K X k=2 hk k! ˜L k l ψ(X(l−1)h) + O(hK+1) , (5) where I is the identity map. Recall that ˜Ll = L +∆Vl, e.g., ∆Vl = (∇θ ˜Ul −∇θU)·∇p in SGHMC. By further using the Poisson equation (4) to simplify related terms associated with L, after some algebra shown in Appendix D, the bias can be derived from (5) as: |Eˆφ −¯φ| = E[ψ(Xlh)] −ψ(X0) Lh −1 L X l E[∆Vlψ(X(l−1)h)] − K X k=2 hk−1 k!L L X l=1 E[˜L k l ψ(X(l−1)h)] + O(hK) . All terms in the above equation can be bounded, with details provided in Appendix D. This gives us a bound for the bias of an SG-MCMC algorithm in Theorem 2. Theorem 2. Under Assumption 1, let ∥·∥be the operator norm. The bias of an SG-MCMC with a Kth-order integrator at time T = hL can be bounded as: Eˆφ −¯φ = O 1 Lh + P l ∥E∆Vl∥ L + hK . Note the bound above includes the term P l ∥E∆Vl∥/L, measuring the difference between the expectation of stochastic gradients and the true gradient. It vanishes when the stochastic gradient is an unbiased estimation of the exact gradient, an assumption made in the SGLD. This on the other hand indicates that if the stochastic gradient is biased, |Eˆφ −¯φ| might diverge when the growth of P l ∥E∆Vl∥is faster than O(L). We point this out to show our result to be more informative than that of the SGLD [6], though this case might not happen in real applications. By expanding the proof for the bias, we are also able to bound the MSE of SG-MCMC algorithms, given in Theorem 3. Theorem 3. Under Assumption 1, and assume ˜Ul is an unbiased estimate of Ul. For a smooth test function φ, the MSE of an SG-MCMC with a Kth-order integrator at time T = hL is bounded, for some C > 0 independent of (L, h), as E ˆφ −¯φ 2 ≤C 1 L P l E ∥∆Vl∥2 L + 1 Lh + h2K ! . Compared to the SGLD [6], the extra term 1 L2 P l E ∥∆Vl∥2 relates to the variance of noisy gradients. As long as the variance is bounded, the MSE still converges with the same rate. Specifically, when optimizing bounds for the bias and MSE, the optimal bias decreases at a rate of L−K/(K+1) with step size h ∝L−1/(K+1); while this is L−2K/(2K+1) with step size h ∝L−1/(2K+1) for the MSE¶. These rates decrease faster than those of the SGLD [6] when K ≥2. The case of K = 2 for the SGHMC with our proposed symmetric splitting integrator is discussed in Section 4. 3.2 Stationary invariant measures The asymptotic invariant measures of SG-MCMCs correspond to L approaching infinity in the above analysis. According to the bias and MSE above, asymptotically (L →∞) the sample average ˆφ is a random variable with mean Eˆφ = ¯φ+O(hK), and variance E(ˆφ−Eˆφ)2 ≤E(ˆφ−¯φ)2+E(¯φ−Eˆφ)2 = O(h2K), close to the true ¯φ. This section defines distance between measures, and studies more formally how the approximation errors affect the invariant measures of SG-MCMC algorithms. ¶To compare with the standard MCMC convergence rate of 1/2, the rate needs to be taken a square root. 4 First we note that under mild conditions, the existence of a stationary invariant measure for an SGMCMC can be guaranteed by application of the Krylov–Bogolyubov Theorem [14]. Examining the conditions is beyond the scope of this paper. For simplicity, we follow [12] and assume stationary invariant measures do exist for SG-MCMCs. We denote the corresponding invariant measure as ˜ρh, and the true posterior of a model as ρ. Similar to [12], we assume our numerical solver is geometric ergodic, meaning that for a test function φ, we have R X φ(x)˜ρh(d x) = R X Exφ(Xlh)˜ρh(d x) for any l ≥0 from the ergodic theorem, where Ex denotes the expectation conditional on X0 = x. The geometric ergodicity implies that the integration is independent of the starting point of an algorithm. Given this, we have the following theorem on invariant measures of SG-MCMCs. Theorem 4. Assume that a Kth-order integrator is geometric ergodic and its invariance measures ˜ρh exist. Define the distance between the invariant measures ˜ρh and ρ as: d(˜ρh, ρ) ≜ supφ R X φ(x)˜ρh(d x) − R X φ(x)ρ(d x) . Then any invariant measure ˜ρh of an SG-MCMC is close to ρ with an error up to an order of O(hK), i.e., there exists some C ≥0 such that: d(˜ρh, ρ) ≤ChK. For a Kth-order integrator with full gradients, the corresponding invariant measure has been shown to be bounded by an order of O(hK) [9, 12]. As a result, Theorem 4 suggests only orders of numerical approximations but not the stochastic gradient approximation affect the asymptotic invariant measure of an SG-MCMC algorithm. This is also reflected by experiments presented in Section 5. 3.3 SG-MCMCs with decreasing step sizes The original SGLD was first proposed with a decreasing-step-size sequence [4], instead of fixing step sizes, as analyzed in [6]. In [5], the authors provide theoretical foundations on its asymptotic convergence properties. We demonstrate in this section that for general SG-MCMC algorithms, decreasing step sizes for each minibatch are also feasible. Note our techniques here are different from those used for the decreasing-step-size SGLD [5], which interestingly result in similar convergence patterns. Specifically, by adapting the same techniques used in the previous sections, we establish conditions on the step size sequence to ensure asymptotic convergence, and develop theory on their finite-time ergodic error as well. To guarantee asymptotic consistency, the following conditions on decreasing step size sequences are required. Assumption 2. The step sizes {hl} are decreasing∥, i.e., 0 < hl+1 < hl, and satisfy that 1) P∞ l=1 hl = ∞; and 2) limL→∞ PL l=1 hK+1 l PL l=1 hl = 0. Denote the finite sum of step sizes as SL ≜PL l=1 hl. Under Assumption 2, we need to modify the sample average ¯φ defined in Section 3.1 as a weighted summation of {φ(Xlh)}: ˜φ = PL l=1 hl SL φ(Xlh). For simplicity, we assume ˜Ul to be an unbiased estimate of U such that E∆Vl = 0. Extending techniques in previous sections, we develop the following bounds for the bias and MSE. Theorem 5. Under Assumptions 1 and 2, for a smooth test function φ, the bias and MSE of a decreasing-step-size SG-MCMC with a Kth-order integrator at time SL are bounded as: BIAS: E˜φ −¯φ = O 1 SL + PL l=1 hK+1 l SL ! (6) MSE: E ˜φ −¯φ 2 ≤C X l h2 l S2 L E ∥∆Vl∥2 + 1 SL + (PL l=1 hK+1 l )2 S2 L ! . (7) As a result, the asymptotic bias approaches 0 according to the assumptions. If further assuming∗∗ P∞ l=1 h2 l S2 L = 0, the MSE also goes to 0. In words, the decreasing-step-size SG-MCMCs are consistent. Among the kinds of decreasing step size sequences, a commonly recognized one is hl ∝l−α for 0 < α < 1. We show in the following corollary that such a sequence leads to a valid sequence. Corollary 6. Using the step size sequences hl ∝l−α for 0 < α < 1, all the step size assumptions in Theorem 5 are satisfied. As a result, the bias and MSE approach zero asymptotically, i.e., the sample average ˜φ is asymptotically consistent with the posterior average ¯φ. ∥Actually the sequence need not be decreasing; we assume it is decreasing for simplicity. ∗∗The assumption of P∞ l=1 h2 l < ∞satisfies this requirement, but is weaker than the original assumption. 5 Remark 7. Theorem 5 indicates the sample average ˜φ asymptotically converges to the true posterior average ¯φ. It is possible to find out the optimal decreasing rates for the specific decreasing sequence hl ∝l−α. Specifically, using the bounds for PL l=1 l−α (see the proof of Corollary 6), for the two terms in the bias (6) in Theorem 5, 1 SL decreases at a rate of O(Lα−1), whereas (PL l=1 hK+1 l )/SL decreases as O(L−Kα). The balance between these two terms is achieved when α = 1/(K + 1), which agrees with Theorem 2 on the optimal rate of fixed-step-size SG-MCMCs. Similarly, for the MSE (7), the first term decreases as L−1, independent of α, while the second and third terms decrease as O(Lα−1) and O(L−2Kα), respectively, thus the balance is achieved when α = 1/(2K+ 1), which also agrees with the optimal rate for the fixed-step-size MSE in Theorem 3. According to Theorem 5, one theoretical advantage of decreasing-step-size SG-MCMCs over fixedstep-size variants is the asymptotically unbiased estimation of posterior averages, though the benefit might not be significant in large-scale real applications where the asymptotic regime is not reached. 4 Practical Numerical Integrators Given the theory for SG-MCMCs with high-order integrators, we here propose a 2nd-order symmetric splitting integrator for practical use. The Euler integrator is known as a 1st-order integrator; the proof and its detailed applications on the SGLD and SGHMC are given in Appendix I. The main idea of the symmetric splitting scheme is to split the local generator ˜Ll into several sub-generators that can be solved analytically††. Unfortunately, one cannot easily apply a splitting scheme with the SGLD. However, for the SGHMC, it can be readily split into: ˜Ll = LA+LB+LOl, where LA = p ·∇θ, LB = −D p ·∇p, LOl = −∇θ ˜U(θ) · ∇p + 2D In : ∇p∇T p . (8) These sub-generators correspond to the following SDEs, which are all analytically solvable: A : dθ = p dt d p = 0 , B : dθ = 0 d p = −D p dt , O : dθ = 0 d p = −∇θ ˜Ul(θ)dt + √ 2DdW (9) Based on these sub-SDEs, the local Kolmogorov operator ˜P l h is defined as: E[f(Xlh)] = ˜P l hf(X(l−1)h), where, ˜P l h ≜e h 2 LA ◦e h 2 LB ◦ehLOl ◦e h 2 LB ◦e h 2 LA, so that the corresponding updates for Xlh = (θlh, plh) consist of the following 5 steps: θ(1) lh = θ(l−1)h + p(l−1)h h/2 ⇒p(1) lh = e−Dh/2 p(l−1)h ⇒p(2) lh = p(1) lh −∇θ ˜Ul(θ(1) lh )h + √ 2Dhζl ⇒ plh = e−Dh/2 p(2) lh ⇒ θlh = θ(1) lh + plh h/2 , where (θ(1) lh , p(1) lh , p(2) lh ) are intermediate variables. We denote such a splitting method as the ABOBA scheme. From the Markovian property of a Kolmogorov operator, it is readily seen that all such symmetric splitting schemes (with different orders of ‘A’, ‘B’ and ‘O’) are equivalent [15]. Lemma 8 below shows the symmetric splitting scheme is a 2nd-order local integrator. Lemma 8. The symmetric splitting scheme is a 2nd-order local integrator, i.e., the corresponding Kolmogorov operator ˜P l h satisfies: ˜P l h = eh ˜ Ll + O(h3). When this integrator is applied to the SGHMC, the following properties can be obtained. Remark 9. Applying Theorem 2 to the SGHMC with the symmetric splitting scheme (K = 2), the bias is bounded as: |Eˆφ −¯φ| = O( 1 Lh + P l∥E∆Vl∥ L + h2). The optimal bias decreasing rate is L−2/3, compared to L−1/2 for the SGLD [6]. Similarly, the MSE is bounded by: E(ˆφ −¯φ)2 ≤ C( 1 L P l E∥∆Vl∥2 L + 1 Lh + h4), decreasing optimally as L−4/5 with step size h ∝L−1/5, compared to the MSE of L−2/3 for the SGLD [6]. This indicates that the SGHMC with the splitting integrator converges faster than the SGLD and SGHMC with 1st-order Euler integrators. Remark 10. For a decreasing-step-size SGHMC, based on Remark 7, the optimal step size decreasing rate for the bias is α = 1/3, and α = 1/5 for the MSE. These agree with their fixed-step-size counterparts in Remark 9, thus are faster than the SGLD/SGHMC with 1st-order Euler integrators. ††This is different from the traditional splitting in SDE literatures[9, 15], where L instead of ˜Ll is split. 6 #iterations 10 1 10 2 10 3 10 4 BIAS 10 -2 10 -1 10 0 10 1 , = 0:1 , = 0:2 , = 0:33 , = 0:7 #iterations 10 1 10 2 10 3 10 4 MSE 10 -4 10 -2 10 0 10 2 , = 0:1 , = 0:2 , = 0:3 , = 0:4 Figure 2: Bias of SGHMC-D (left) and MSE of SGHMC-F (right) with different step size rates α. Thick red curves correspond to theoretically optimal rates. 5 Experiments We here verify our theory and compare with related algorithms on both synthetic data and large-scale machine learning applications. step size 0.001 0.005 0.01 0.02 0.05 0.1 BIAS 10 -4 10 -3 10 -2 10 -1 Splitting Euler Figure 1: Comparisons of symmetric splitting and Euler integrators. Synthetic data We consider a standard Gaussian model where xi ∼N(θ, 1), θ ∼N(0, 1). 1000 data samples {xi} are generated, and every minibatch in the stochastic gradient is of size 10. The test function is defined as φ(θ) ≜θ2, with explicit expression for the posterior average. To evaluate the expectations in the bias and MSE, we average over 200 runs with random initializations. First we compare the invariant measures (with L = 106) of the proposed splitting integrator and Euler integrator for the SGHMC. Results of the SGLD are omitted since they are not as competitive. Figure 1 plots the biases with different step sizes. It is clear that the Euler integrator has larger biases in the invariant measure, and quickly explodes when the step size becomes large, which does not happen for the splitting integrator. In real applications we also find this happen frequently (shown in the next section), making the Euler scheme an unstable integrator. Next we examine the asymptotically optimal step size rates for the SGHMC. From the theory we know these are α = 1/3 for the bias and α = 1/5 for the MSE, in both fixed-step-size SGHMC (SGHMC-F) and decreasing-step-size SGHMC (SGHMC-D). For the step sizes, we did a grid search to select the best prefactors, which resulted in h=0.033×L−α for the SGHMC-F and hl=0.045×l−α for the SGHMC-D, with different α values. We plot the traces of the bias for the SGHMC-D and the MSE for the SGHMC-F in Figure 2. Similar results for the bias of the SGHMC-F and the MSE of the SGHMC-D are plotted in Appendix K. We find that when rates are smaller than the theoretically optimal rates, i.e., α = 1/3 (bias) and α = 1/5 (MSE), the bias and MSE tend to decrease faster than the optimal rates at the beginning (especially for the SGHMC-F), but eventually they slow down and are surpassed by the optimal rates, consistent with the asymptotic theory. This also suggests that if only a small number of iterations were feasible, setting a larger step size than the theoretically optimal one might be beneficial in practice. Finally, we study the relative convergence speed of the SGHMC and SGLD. We test both fixedstep-size and decreasing-step-size versions. For fixed-step-size experiments, the step sizes are set to h = CL−α, with α chosen according to the theory for SGLD and SGHMC. To provide a fair comparison, the constants C are selected via a grid search from 10−3 to 0.5 with an interval of 0.002 for L = 500, it is then fixed in the other runs with different L values. The parameter D in the SGHMC is selected within (10, 20, 30) as well. For decreasing-step-size experiments, an initial step size is chosen within [0.003, 0.05] with an interval of 0.002 for different algorithms‡‡, and then it decreases according to their theoretical optimal rates. Figure 3 shows a comparison of the biases for the SGHMC and SGLD. As indicated by both theory and experiments, the SGHMC with the splitting integrator yields a faster convergence speed than the SGLD with an Euler integrator. Large-scale machine learning applications For real applications, we test the SGLD with an Euler integrator, the SGHMC with the splitting integrator (SGHMC-S), and the SGHMC with an ‡‡Using the same initial step size is not fair because the SGLD requires much smaller step sizes. 7 #iterations 20 100 250 400 550 700 BIAS 0 0.05 0.1 0.15 0.2 SGLD SGHMC #iterations 20 100 250 400 550 700 BIAS 0 0.02 0.04 0.06 0.08 SGLD SGHMC Figure 3: Biases for the fixed-step-size (left) and decreasing-step-size (right) SGHMC and SGLD. Euler integrator (SGHMC-E). First we test them on the latent Dirichlet allocation model (LDA) [16]. The data used consists of 10M randomly downloaded documents from Wikipedia, using scripts provided in [17]. We randomly select 1K documents for testing and validation, respectively. As in [17, 18], the vocabulary size is 7,702. We use the Expanded-Natural reparametrization trick to sample from the probabilistic simplex [19]. The step sizes are chosen from {2, 5, 8, 20, 50, 80}×10−5, and parameter D from {20, 40, 80}. The minibatch size is set to 100, with one pass of the whole data in the experiments (and therefore L = 100K). We collect 300 posterior samples to calculate test perplexities, with a standard holdout technique as described in [18]. Next a recently studied sigmoid belief network model (SBN) [20] is tested, which is a directed counterpart of the popular RBM model. We use a one layer model where the bottom layer corresponds to binary observed data, which is generated from the hidden layer (also binary) via a sigmoid function. As shown in [18], the SBN is readily learned by SG-MCMCs. We test the model on the MNIST dataset, which consists of 60K hand written digits of size 28 × 28 for training, and 10K for testing. Again the step sizes are chosen from {3, 4, 5, 6}×10−4, D from {0.9, 1, 5}/ √ h. The minibatch is set to 200, with 5000 iterations for training. Like applied for the RBM [21], an advance technique called anneal importance sampler (AIS) is adopted for calculating test likelihoods. step size 2e-05 5e-05 0.0002 0.0008 Perplexity 1200 1400 1600 1800 2000 SGHMC-Euler SGHMC-Splitting Figure 4: SGHMC with 200 topics. The Euler explodes with large step sizes. We briefly describe the results here, more details are provided in Appendix K. For LDA with 200 topics, the best test perplexities for the SGHMC-S, SGHMC-E and SGLD are 1168, 1180 and 2496, respectively; while these are 1157, 1187 and 2511, respectively, for 500 topics. Similar to the synthetic experiments, we also observed SGHMC-E crashed when using large step sizes. This is illustrated more clearly in Figure 4. For the SBN with 100 hidden units, we obtain negative test log-likelihoods of 103, 105 and 126 for the SGHMC-S, SGHMC-E and SGLD, respectively; and these are 98, 100, and 110 for 200 hidden units. Note the SGHMC-S on SBN yields state-of-the-art results on test likelihoods compared to [22], which was 113 for 200 hidden units. A decrease of 2 units in the neg-log-likelihood with AIS is considered to be a reasonable gain [20], which is approximately equal to the gain from a shallow to a deep model [22]. SGHMC-S is more accuracy and robust than SGHMC-E due to its 2nd-order splitting integrator. 6 Conclusion For the first time, we develop theory to analyze finite-time ergodic errors, as well as asymptotic invariant measures, of general SG-MCMCs with high-order integrators. Our theory applies for both fixed and decreasing step size SG-MCMCs, which are shown to be equivalent in terms of convergence rates, and are faster with our proposed 2nd-order integrator than previous SG-MCMCs with 1st-order Euler integrators. Experiments on both synthetic and large real datasets validate our theory. The theory also indicates that with increasing order of numerical integrators, the convergence rate of an SG-MCMC is able to theoretically approach the standard MCMC convergence rate. Given the theoretical convergence results, SG-MCMCs can be used effectively in real applications. Acknowledgments Supported in part by ARO, DARPA, DOE, NGA and ONR. We acknowledge Jonathan C. Mattingly and Chunyuan Li for inspiring discussions; David Carlson for the AIS codes. 8 References [1] T. Chen, E. B. Fox, and C. Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In ICML, 2014. [2] N. Ding, Y. Fang, R. Babbush, C. Chen, R. D. Skeel, and H. Neven. Bayesian sampling using stochastic gradient thermostats. In NIPS, 2014. [3] H. Risken. The Fokker-Planck equation. Springer-Verlag, New York, 1989. [4] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. [5] Y. W. Teh, A. H. Thiery, and S. J. Vollmer. Consistency and fluctuations for stochastic gradient Langevin dynamics. Technical Report arXiv:1409.0578, University of Oxford, UK, Sep. 2014. URL http://arxiv.org/abs/1409.0578. [6] S. J. Vollmer, K. C. Zygalakis, and Y. W. Teh. (Non-)asymptotic properties of stochastic gradient Langevin dynamics. Technical Report arXiv:1501.00438, University of Oxford, UK, January 2015. URL http://arxiv.org/abs/1501.00438. [7] M. Betancourt. The fundamental incompatibility of Hamiltonian Monte Carlo and data subsampling. In ICML, 2015. [8] I. Sato and H. Nakagawa. Approximation analysis of stochastic gradient Langevin dynamics by using Fokker-Planck equation and Itˆo process. In ICML, 2014. [9] B. Leimkuhler and X. Shang. Adaptive thermostats for noisy gradient systems. Technical Report arXiv:1505.06889v1, University of Edinburgh, UK, May 2015. URL http: //arxiv.org/abs/1505.06889. [10] A. Abdulle, G. Vilmart, and K. C. Zygalakis. Long time accuracy of Lie–Trotter splitting methods for Langevin dynamics. SIAM J. NUMER. ANAL., 53(1):1–16, 2015. [11] R. Hasminskii. Stochastic stability of differential equations. Springer-Verlag Berlin Heidelberg, 2012. [12] J. C. Mattingly, A. M. Stuart, and M. V. Tretyakov. Construction of numerical time-average and stationary measures via Poisson equations. SIAM J. NUMER. ANAL., 48(2):552–577, 2010. [13] P. Giesl. Construction of global Lyapunov functions using radial basis functions. Springer Berlin Heidelberg, 2007. [14] N. N. Bogoliubov and N. M. Krylov. La theorie generalie de la mesure dans son application a l’etude de systemes dynamiques de la mecanique non-lineaire. Ann. Math. II (in French), 38 (1):65–113, 1937. [15] B. Leimkuhler and C. Matthews. Rational construction of stochastic numerical methods for molecular sampling. AMRX, 2013(1):34–56, 2013. [16] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 2003. [17] M. D. Hoffman, D. M. Blei, and F. Bach. Online learning for latent Dirichlet allocation. In NIPS, 2010. [18] Z. Gan, C. Chen, R. Henao, D. Carlson, and L. Carin. Scalable deep Poisson factor analysis for topic modeling. In ICML, 2015. [19] S. Patterson and Y. W. Teh. Stochastic gradient Riemannian Langevin dynamics on the probability simplex. In NIPS, 2013. [20] Z. Gan, R. Henao, D. Carlson, and L. Carin. Learning deep sigmoid belief networks with data augmentation. In AISTATS, 2015. [21] R. Salakhutdinov and I. Murray. On the quantitative analysis of deep belief networks. In ICML, 2008. [22] A. Mnih and K. Gregor. Neural variational inference and learning in belief networks. In ICML, 2014. [23] A. Debussche and E. Faou. Weak backward error analysis for SDEs. SIAM J. NUMER. ANAL., 50(3):1734–1752, 2012. [24] M. Kopec. Weak backward error analysis for overdamped Langevin processes. IMA J. NUMER. ANAL., 2014. 9 | 2015 | 274 |
5,785 | Teaching Machines to Read and Comprehend Karl Moritz Hermann† Tom´aˇs Koˇcisk´y†‡ Edward Grefenstette† Lasse Espeholt† Will Kay† Mustafa Suleyman† Phil Blunsom†‡ †Google DeepMind ‡University of Oxford {kmh,tkocisky,etg,lespeholt,wkay,mustafasul,pblunsom}@google.com Abstract Teaching machines to read natural language documents remains an elusive challenge. Machine reading systems can be tested on their ability to answer questions posed on the contents of documents that they have seen, but until now large scale training and test datasets have been missing for this type of evaluation. In this work we define a new methodology that resolves this bottleneck and provides large scale supervised reading comprehension data. This allows us to develop a class of attention based deep neural networks that learn to read real documents and answer complex questions with minimal prior knowledge of language structure. 1 Introduction Progress on the path from shallow bag-of-words information retrieval algorithms to machines capable of reading and understanding documents has been slow. Traditional approaches to machine reading and comprehension have been based on either hand engineered grammars [1], or information extraction methods of detecting predicate argument triples that can later be queried as a relational database [2]. Supervised machine learning approaches have largely been absent from this space due to both the lack of large scale training datasets, and the difficulty in structuring statistical models flexible enough to learn to exploit document structure. While obtaining supervised natural language reading comprehension data has proved difficult, some researchers have explored generating synthetic narratives and queries [3, 4]. Such approaches allow the generation of almost unlimited amounts of supervised data and enable researchers to isolate the performance of their algorithms on individual simulated phenomena. Work on such data has shown that neural network based models hold promise for modelling reading comprehension, something that we will build upon here. Historically, however, many similar approaches in Computational Linguistics have failed to manage the transition from synthetic data to real environments, as such closed worlds inevitably fail to capture the complexity, richness, and noise of natural language [5]. In this work we seek to directly address the lack of real natural language training data by introducing a novel approach to building a supervised reading comprehension data set. We observe that summary and paraphrase sentences, with their associated documents, can be readily converted to context–query–answer triples using simple entity detection and anonymisation algorithms. Using this approach we have collected two new corpora of roughly a million news stories with associated queries from the CNN and Daily Mail websites. We demonstrate the efficacy of our new corpora by building novel deep learning models for reading comprehension. These models draw on recent developments for incorporating attention mechanisms into recurrent neural network architectures [6, 7, 8, 4]. This allows a model to focus on the aspects of a document that it believes will help it answer a question, and also allows us to visualises its inference process. We compare these neural models to a range of baselines and heuristic benchmarks based upon a traditional frame semantic analysis provided by a state-of-the-art natural language processing 1 CNN Daily Mail train valid test train valid test # months 95 1 1 56 1 1 # documents 90,266 1,220 1,093 196,961 12,148 10,397 # queries 380,298 3,924 3,198 879,450 64,835 53,182 Max # entities 527 187 396 371 232 245 Avg # entities 26.4 26.5 24.5 26.5 25.5 26.0 Avg # tokens 762 763 716 813 774 780 Vocab size 118,497 208,045 Table 1: Corpus statistics. Articles were collected starting in April 2007 for CNN and June 2010 for the Daily Mail, both until the end of April 2015. Validation data is from March, test data from April 2015. Articles of over 2000 tokens and queries whose answer entity did not appear in the context were filtered out. Top N Cumulative % CNN Daily Mail 1 30.5 25.6 2 47.7 42.4 3 58.1 53.7 5 70.6 68.1 10 85.1 85.5 Table 2: Percentage of time that the correct answer is contained in the top N most frequent entities in a given document. (NLP) pipeline. Our results indicate that the neural models achieve a higher accuracy, and do so without any specific encoding of the document or query structure. 2 Supervised training data for reading comprehension The reading comprehension task naturally lends itself to a formulation as a supervised learning problem. Specifically we seek to estimate the conditional probability p(a|c, q), where c is a context document, q a query relating to that document, and a the answer to that query. For a focused evaluation we wish to be able to exclude additional information, such as world knowledge gained from co-occurrence statistics, in order to test a model’s core capability to detect and understand the linguistic relationships between entities in the context document. Such an approach requires a large training corpus of document–query–answer triples and until now such corpora have been limited to hundreds of examples and thus mostly of use only for testing [9]. This limitation has meant that most work in this area has taken the form of unsupervised approaches which use templates or syntactic/semantic analysers to extract relation tuples from the document to form a knowledge graph that can be queried. Here we propose a methodology for creating real-world, large scale supervised training data for learning reading comprehension models. Inspired by work in summarisation [10, 11], we create two machine reading corpora by exploiting online newspaper articles and their matching summaries. We have collected 93k articles from the CNN1 and 220k articles from the Daily Mail2 websites. Both news providers supplement their articles with a number of bullet points, summarising aspects of the information contained in the article. Of key importance is that these summary points are abstractive and do not simply copy sentences from the documents. We construct a corpus of document–query– answer triples by turning these bullet points into Cloze [12] style questions by replacing one entity at a time with a placeholder. This results in a combined corpus of roughly 1M data points (Table 1). Code to replicate our datasets—and to apply this method to other sources—is available online3. 2.1 Entity replacement and permutation Note that the focus of this paper is to provide a corpus for evaluating a model’s ability to read and comprehend a single document, not world knowledge or co-occurrence. To understand that distinction consider for instance the following Cloze form queries (created from headlines in the Daily Mail validation set): a) The hi-tech bra that helps you beat breast X; b) Could Saccharin help beat X ?; c) Can fish oils help fight prostate X ? An ngram language model trained on the Daily Mail would easily correctly predict that (X = cancer), regardless of the contents of the context document, simply because this is a very frequently cured entity in the Daily Mail corpus. 1www.cnn.com 2www.dailymail.co.uk 3http://www.github.com/deepmind/rc-data/ 2 Original Version Anonymised Version Context The BBC producer allegedly struck by Jeremy Clarkson will not press charges against the “Top Gear” host, his lawyer said Friday. Clarkson, who hosted one of the most-watched television shows in the world, was dropped by the BBC Wednesday after an internal investigation by the British broadcaster found he had subjected producer Oisin Tymon “to an unprovoked physical and verbal attack.” . .. the ent381 producer allegedly struck by ent212 will not press charges against the “ ent153 ” host , his lawyer said friday . ent212 , who hosted one of the most - watched television shows in the world , was dropped by the ent381 wednesday after an internal investigation by the ent180 broadcaster found he had subjected producer ent193 “ to an unprovoked physical and verbal attack . ” . . . Query Producer X will not press charges against Jeremy Clarkson, his lawyer says. producer X will not press charges against ent212 , his lawyer says . Answer Oisin Tymon ent193 Table 3: Original and anonymised version of a data point from the Daily Mail validation set. The anonymised entity markers are constantly permuted during training and testing. To prevent such degenerate solutions and create a focused task we anonymise and randomise our corpora with the following procedure, a) use a coreference system to establish coreferents in each data point; b) replace all entities with abstract entity markers according to coreference; c) randomly permute these entity markers whenever a data point is loaded. Compare the original and anonymised version of the example in Table 3. Clearly a human reader can answer both queries correctly. However in the anonymised setup the context document is required for answering the query, whereas the original version could also be answered by someone with the requisite background knowledge. Therefore, following this procedure, the only remaining strategy for answering questions is to do so by exploiting the context presented with each question. Thus performance on our two corpora truly measures reading comprehension capability. Naturally a production system would benefit from using all available information sources, such as clues through language and co-occurrence statistics. Table 2 gives an indication of the difficulty of the task, showing how frequent the correct answer is contained in the top N entity markers in a given document. Note that our models don’t distinguish between entity markers and regular words. This makes the task harder and the models more general. 3 Models So far we have motivated the need for better datasets and tasks to evaluate the capabilities of machine reading models. We proceed by describing a number of baselines, benchmarks and new models to evaluate against this paradigm. We define two simple baselines, the majority baseline (maximum frequency) picks the entity most frequently observed in the context document, whereas the exclusive majority (exclusive frequency) chooses the entity most frequently observed in the context but not observed in the query. The idea behind this exclusion is that the placeholder is unlikely to be mentioned twice in a single Cloze form query. 3.1 Symbolic Matching Models Traditionally, a pipeline of NLP models has been used for attempting question answering, that is models that make heavy use of linguistic annotation, structured world knowledge and semantic parsing and similar NLP pipeline outputs. Building on these approaches, we define a number of NLP-centric models for our machine reading task. Frame-Semantic Parsing Frame-semantic parsing attempts to identify predicates and their arguments, allowing models access to information about “who did what to whom”. Naturally this kind of annotation lends itself to being exploited for question answering. We develop a benchmark that 3 makes use of frame-semantic annotations which we obtained by parsing our model with a state-ofthe-art frame-semantic parser [13, 14]. As the parser makes extensive use of linguistic information we run these benchmarks on the unanonymised version of our corpora. There is no significant advantage in this as the frame-semantic approach used here does not possess the capability to generalise through a language model beyond exploiting one during the parsing phase. Thus, the key objective of evaluating machine comprehension abilities is maintained. Extracting entity-predicate triples— denoted as (e1, V, e2)—from both the query q and context document d, we attempt to resolve queries using a number of rules with an increasing recall/precision trade-off as follows (Table 4). Strategy Pattern 2 q Pattern 2 d Example (Cloze / Context) 1 Exact match (p, V, y) (x, V, y) X loves Suse / Kim loves Suse 2 be.01.V match (p, be.01.V, y) (x, be.01.V, y) X is president / Mike is president 3 Correct frame (p, V, y) (x, V, z) X won Oscar / Tom won Academy Award 4 Permuted frame (p, V, y) (y, V, x) X met Suse / Suse met Tom 5 Matching entity (p, V, y) (x, Z, y) X likes candy / Tom loves candy 6 Back-off strategy Pick the most frequent entity from the context that doesn’t appear in the query Table 4: Resolution strategies using PropBank triples. x denotes the entity proposed as answer, V is a fully qualified PropBank frame (e.g. give.01.V). Strategies are ordered by precedence and answers determined accordingly. This heuristic algorithm was iteratively tuned on the validation data set. For reasons of clarity, we pretend that all PropBank triples are of the form (e1, V, e2). In practice, we take the argument numberings of the parser into account and only compare like with like, except in cases such as the permuted frame rule, where ordering is relaxed. In the case of multiple possible answers from a single rule, we randomly choose one. Word Distance Benchmark We consider another baseline that relies on word distance measurements. Here, we align the placeholder of the Cloze form question with each possible entity in the context document and calculate a distance measure between the question and the context around the aligned entity. This score is calculated by summing the distances of every word in q to their nearest aligned word in d, where alignment is defined by matching words either directly or as aligned by the coreference system. We tune the maximum penalty per word (m = 8) on the validation data. 3.2 Neural Network Models Neural networks have successfully been applied to a range of tasks in NLP. This includes classification tasks such as sentiment analysis [15] or POS tagging [16], as well as generative problems such as language modelling or machine translation [17]. We propose three neural models for estimating the probability of word type a from document d answering query q: p(a|d, q) / exp (W(a)g(d, q)) , s.t. a 2 V, where V is the vocabulary4, and W(a) indexes row a of weight matrix W and through a slight abuse of notation word types double as indexes. Note that we do not privilege entities or variables, the model must learn to differentiate these in the input sequence. The function g(d, q) returns a vector embedding of a document and query pair. The Deep LSTM Reader Long short-term memory (LSTM, [18]) networks have recently seen considerable success in tasks such as machine translation and language modelling [17]. When used for translation, Deep LSTMs [19] have shown a remarkable ability to embed long sequences into a vector representation which contains enough information to generate a full translation in another language. Our first neural model for reading comprehension tests the ability of Deep LSTM encoders to handle significantly longer sequences. We feed our documents one word at a time into a Deep LSTM encoder, after a delimiter we then also feed the query into the encoder. Alternatively we also experiment with processing the query then the document. The result is that this model processes each document query pair as a single long sequence. Given the embedded document and query the network predicts which token in the document answers the query. 4The vocabulary includes all the word types in the documents, questions, the entity maskers, and the question unknown entity marker. 4 r s(1)y(1) s(3)y(3) s(2)y(2) u g s(4)y(4) Mary went to X visited England England (a) Attentive Reader. r u r Mary went to X visited England England r g (b) Impatient Reader. Mary went to X visited England England ||| g (c) A two layer Deep LSTM Reader with the question encoded before the document. Figure 1: Document and query embedding models. We employ a Deep LSTM cell with skip connections from each input x(t) to every hidden layer, and from every hidden layer to the output y(t): x0(t, k) = x(t)||y0(t, k −1), y(t) = y0(t, 1)|| . . . ||y0(t, K) i(t, k) = σ (Wkxix0(t, k) + Wkhih(t −1, k) + Wkcic(t −1, k) + bki) f(t, k) = σ (Wkxfx(t) + Wkhfh(t −1, k) + Wkcfc(t −1, k) + bkf) c(t, k) = f(t, k)c(t −1, k) + i(t, k) tanh (Wkxcx0(t, k) + Wkhch(t −1, k) + bkc) o(t, k) = σ (Wkxox0(t, k) + Wkhoh(t −1, k) + Wkcoc(t, k) + bko) h(t, k) = o(t, k) tanh (c(t, k)) y0(t, k) = Wkyh(t, k) + bky where || indicates vector concatenation h(t, k) is the hidden state for layer k at time t, and i, f, o are the input, forget, and output gates respectively. Thus our Deep LSTM Reader is defined by gLSTM(d, q) = y(|d| + |q|) with input x(t) the concatenation of d and q separated by the delimiter |||. The Attentive Reader The Deep LSTM Reader must propagate dependencies over long distances in order to connect queries to their answers. The fixed width hidden vector forms a bottleneck for this information flow that we propose to circumvent using an attention mechanism inspired by recent results in translation and image recognition [6, 7]. This attention model first encodes the document and the query using separate bidirectional single layer LSTMs [19]. We denote the outputs of the forward and backward LSTMs as −!y (t) and −y (t) respectively. The encoding u of a query of length |q| is formed by the concatenation of the final forward and backward outputs, u = −! yq(|q|) || − yq(1). For the document the composite output for each token at position t is, yd(t) = −! yd(t) || − yd(t). The representation r of the document d is formed by a weighted sum of these output vectors. These weights are interpreted as the degree to which the network attends to a particular token in the document when answering the query: m(t) = tanh (Wymyd(t) + Wumu) , s(t) / exp (w| msm(t)) , r = yds, where we are interpreting yd as a matrix with each column being the composite representation yd(t) of document token t. The variable s(t) is the normalised attention at token t. Given this attention 5 score the embedding of the document r is computed as the weighted sum of the token embeddings. The model is completed with the definition of the joint document and query embedding via a nonlinear combination: gAR(d, q) = tanh (Wrgr + Wugu) . The Attentive Reader can be viewed as a generalisation of the application of Memory Networks to question answering [3]. That model employs an attention mechanism at the sentence level where each sentence is represented by a bag of embeddings. The Attentive Reader employs a finer grained token level attention mechanism where the tokens are embedded given their entire future and past context in the input document. The Impatient Reader The Attentive Reader is able to focus on the passages of a context document that are most likely to inform the answer to the query. We can go further by equipping the model with the ability to reread from the document as each query token is read. At each token i of the query q the model computes a document representation vector r(i) using the bidirectional embedding yq(i) = −! yq(i) || − yq(i): m(i, t) = tanh (Wdmyd(t) + Wrmr(i −1) + Wqmyq(i)) , 1 i |q|, s(i, t) / exp (w| msm(i, t)) , r(0) = r0, r(i) = y| ds(i) + tanh (Wrrr(i −1)) 1 i |q|. The result is an attention mechanism that allows the model to recurrently accumulate information from the document as it sees each query token, ultimately outputting a final joint document query representation for the answer prediction, gIR(d, q) = tanh (Wrgr(|q|) + Wqgu) . 4 Empirical Evaluation Having described a number of models in the previous section, we next evaluate these models on our reading comprehension corpora. Our hypothesis is that neural models should in principle be well suited for this task. However, we argued that simple recurrent models such as the LSTM probably have insufficient expressive power for solving tasks that require complex inference. We expect that the attention-based models would therefore outperform the pure LSTM-based approaches. Considering the second dimension of our investigation, the comparison of traditional versus neural approaches to NLP, we do not have a strong prior favouring one approach over the other. While numerous publications in the past few years have demonstrated neural models outperforming classical methods, it remains unclear how much of that is a side-effect of the language modelling capabilities intrinsic to any neural model for NLP. The entity anonymisation and permutation aspect of the task presented here may end up levelling the playing field in that regard, favouring models capable of dealing with syntax rather than just semantics. With these considerations in mind, the experimental part of this paper is designed with a threefold aim. First, we want to establish the difficulty of our machine reading task by applying a wide range of models to it. Second, we compare the performance of parse-based methods versus that of neural models. Third, within the group of neural models examined, we want to determine what each component contributes to the end performance; that is, we want to analyse the extent to which an LSTM can solve this task, and to what extent various attention mechanisms impact performance. All model hyperparameters were tuned on the respective validation sets of the two corpora.5 Our experimental results are in Table 5, with the Attentive and Impatient Readers performing best across both datasets. 5For the Deep LSTM Reader, we consider hidden layer sizes [64, 128, 256], depths [1, 2, 4], initial learning rates [1E−3, 5E−4, 1E−4, 5E−5], batch sizes [16, 32] and dropout [0.0, 0.1, 0.2]. We evaluate two types of feeds. In the cqa setup we feed first the context document and subsequently the question into the encoder, while the qca model starts by feeding in the question followed by the context document. We report results on the best model (underlined hyperparameters, qca setup). For the attention models we consider hidden layer sizes [64, 128, 256], single layer, initial learning rates [1E−4, 5E−5, 2.5E−5, 1E−5], batch sizes [8, 16, 32] and dropout [0, 0.1, 0.2, 0.5]. For all models we used asynchronous RmsProp [20] with a momentum of 0.9 and a decay of 0.95. See Appendix A for more details of the experimental setup. 6 CNN Daily Mail valid test valid test Maximum frequency 30.5 33.2 25.6 25.5 Exclusive frequency 36.6 39.3 32.7 32.8 Frame-semantic model 36.3 40.2 35.5 35.5 Word distance model 50.5 50.9 56.4 55.5 Deep LSTM Reader 55.0 57.0 63.3 62.2 Uniform Reader 39.0 39.4 34.6 34.4 Attentive Reader 61.6 63.0 70.5 69.0 Impatient Reader 61.8 63.8 69.0 68.0 Table 5: Accuracy of all the models and benchmarks on the CNN and Daily Mail datasets. The Uniform Reader baseline sets all of the m(t) parameters to be equal. Figure 2: Precision@Recall for the attention models on the CNN validation data. Frame-semantic benchmark While the one frame-semantic model proposed in this paper is clearly a simplification of what could be achieved with annotations from an NLP pipeline, it does highlight the difficulty of the task when approached from a symbolic NLP perspective. Two issues stand out when analysing the results in detail. First, the frame-semantic pipeline has a poor degree of coverage with many relations not being picked up by our PropBank parser as they do not adhere to the default predicate-argument structure. This effect is exacerbated by the type of language used in the highlights that form the basis of our datasets. The second issue is that the frame-semantic approach does not trivially scale to situations where several sentences, and thus frames, are required to answer a query. This was true for the majority of queries in the dataset. Word distance benchmark More surprising perhaps is the relatively strong performance of the word distance benchmark, particularly relative to the frame-semantic benchmark, which we had expected to perform better. Here, again, the nature of the datasets used can explain aspects of this result. Where the frame-semantic model suffered due to the language used in the highlights, the word distance model benefited. Particularly in the case of the Daily Mail dataset, highlights frequently have significant lexical overlap with passages in the accompanying article, which makes it easy for the word distance benchmark. For instance the query “Tom Hanks is friends with X’s manager, Scooter Brown” has the phrase “... turns out he is good friends with Scooter Brown, manager for Carly Rae Jepson” in the context. The word distance benchmark correctly aligns these two while the frame-semantic approach fails to pickup the friendship or management relations when parsing the query. We expect that on other types of machine reading data where questions rather than Cloze queries are used this particular model would perform significantly worse. Neural models Within the group of neural models explored here, the results paint a clear picture with the Impatient and the Attentive Readers outperforming all other models. This is consistent with our hypothesis that attention is a key ingredient for machine reading and question answering due to the need to propagate information over long distances. The Deep LSTM Reader performs surprisingly well, once again demonstrating that this simple sequential architecture can do a reasonable job of learning to abstract long sequences, even when they are up to two thousand tokens in length. However this model does fail to match the performance of the attention based models, even though these only use single layer LSTMs.6 The poor results of the Uniform Reader support our hypothesis of the significance of the attention mechanism in the Attentive model’s performance as the only difference between these models is that the attention variables are ignored in the Uniform Reader. The precision@recall statistics in Figure 2 again highlight the strength of the attentive approach. We can visualise the attention mechanism as a heatmap over a context document to gain further insight into the models’ performance. The highlighted words show which tokens in the document were attended to by the model. In addition we must also take into account that the vectors at each 6Memory constraints prevented us from experimenting with deeper Attentive Readers. 7 . . . . . . Figure 3: Attention heat maps from the Attentive Reader for two correctly answered validation set queries (the correct answers are ent23 and ent63, respectively). Both examples require significant lexical generalisation and co-reference resolution in order to be answered correctly by a given model. token integrate long range contextual information via the bidirectional LSTM encoders. Figure 3 depicts heat maps for two queries that were correctly answered by the Attentive Reader.7 In both cases confidently arriving at the correct answer requires the model to perform both significant lexical generalsiation, e.g. ‘killed’ ! ‘deceased’, and co-reference or anaphora resolution, e.g. ‘ent119 was killed’ ! ‘he was identified.’ However it is also clear that the model is able to integrate these signals with rough heuristic indicators such as the proximity of query words to the candidate answer. 5 Conclusion The supervised paradigm for training machine reading and comprehension models provides a promising avenue for making progress on the path to building full natural language understanding systems. We have demonstrated a methodology for obtaining a large number of document-queryanswer triples and shown that recurrent and attention based neural networks provide an effective modelling framework for this task. Our analysis indicates that the Attentive and Impatient Readers are able to propagate and integrate semantic information over long distances. In particular we believe that the incorporation of an attention mechanism is the key contributor to these results. The attention mechanism that we have employed is just one instantiation of a very general idea which can be further exploited. However, the incorporation of world knowledge and multi-document queries will also require the development of attention and embedding mechanisms whose complexity to query does not scale linearly with the data set size. There are still many queries requiring complex inference and long range reference resolution that our models are not yet able to answer. As such our data provides a scalable challenge that should support NLP research into the future. Further, significantly bigger training data sets can be acquired using the techniques we have described, undoubtedly allowing us to train more expressive and accurate models. 7Note that these examples were chosen as they were short, the average CNN validation document contained 763 tokens and 27 entities, thus most instances were significantly harder to answer than these examples. 8 References [1] Ellen Riloff and Michael Thelen. A rule-based question answering system for reading comprehension tests. In Proceedings of the ANLP/NAACL Workshop on Reading Comprehension Tests As Evaluation for Computer-based Language Understanding Sytems. [2] Hoifung Poon, Janara Christensen, Pedro Domingos, Oren Etzioni, Raphael Hoffmann, Chloe Kiddon, Thomas Lin, Xiao Ling, Mausam, Alan Ritter, Stefan Schoenmackers, Stephen Soderland, Dan Weld, Fei Wu, and Congle Zhang. Machine reading at the University of Washington. In Proceedings of the NAACL HLT 2010 First International Workshop on Formalisms and Methodology for Learning by Reading. [3] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. CoRR, abs/1410.3916, 2014. [4] Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. CoRR, abs/1503.08895, 2015. [5] Terry Winograd. Understanding Natural Language. Academic Press, Inc., Orlando, FL, USA, 1972. [6] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. CoRR, abs/1409.0473, 2014. [7] Volodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. Recurrent models of visual attention. In Advances in Neural Information Processing Systems 27. [8] Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. DRAW: A recurrent neural network for image generation. CoRR, abs/1502.04623, 2015. [9] Matthew Richardson, Christopher J. C. Burges, and Erin Renshaw. Mctest: A challenge dataset for the open-domain machine comprehension of text. In Proceedings of EMNLP. [10] Krysta Svore, Lucy Vanderwende, and Christopher Burges. Enhancing single-document summarization by combining RankNet and third-party sources. In Proceedings of EMNLP/CoNLL. [11] Kristian Woodsend and Mirella Lapata. Automatic generation of story highlights. In Proceedings of ACL, 2010. [12] Wilson L Taylor. “Cloze procedure”: a new tool for measuring readability. Journalism Quarterly, 30:415–433, 1953. [13] Dipanjan Das, Desai Chen, Andr´e F. T. Martins, Nathan Schneider, and Noah A. Smith. Framesemantic parsing. Computational Linguistics, 40(1):9–56, 2013. [14] Karl Moritz Hermann, Dipanjan Das, Jason Weston, and Kuzman Ganchev. Semantic frame identification with distributed word representations. In Proceedings of ACL, June 2014. [15] Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Proceedings of ACL, 2014. [16] Ronan Collobert, Jason Weston, L´eon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12:2493–2537, November 2011. [17] Ilya Sutskever, Oriol Vinyals, and Quoc V. V Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27. [18] Sepp Hochreiter and J¨urgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, November 1997. [19] Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks, volume 385 of Studies in Computational Intelligence. Springer, 2012. [20] T. Tieleman and G. Hinton. Lecture 6.5—RmsProp: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012. 9 | 2015 | 275 |
5,786 | Synaptic Sampling: A Bayesian Approach to Neural Network Plasticity and Rewiring David Kappel1 Stefan Habenschuss1 Robert Legenstein Wolfgang Maass Institute for Theoretical Computer Science Graz University of Technology A-8010 Graz, Austria [kappel, habenschuss, legi, maass]@igi.tugraz.at Abstract We reexamine in this article the conceptual and mathematical framework for understanding the organization of plasticity in spiking neural networks. We propose that inherent stochasticity enables synaptic plasticity to carry out probabilistic inference by sampling from a posterior distribution of synaptic parameters. This view provides a viable alternative to existing models that propose convergence of synaptic weights to maximum likelihood parameters. It explains how priors on weight distributions and connection probabilities can be merged optimally with learned experience. In simulations we show that our model for synaptic plasticity allows spiking neural networks to compensate continuously for unforeseen disturbances. Furthermore it provides a normative mathematical framework to better understand the permanent variability and rewiring observed in brain networks. 1 Introduction In the 19th century, Helmholtz proposed that perception could be understood as unconscious inference [1]. This insight has recently (re)gained considerable attention in models of Bayesian inference in neural networks [2]. The hallmark of this theory is the assumption that the activity z of neuronal networks can be viewed as an internal model for hidden variables in the outside world that give rise to sensory experiences x. This hidden state z is usually assumed to be represented by the activity of neurons in the network. A network N of stochastically firing neurons is modeled in this framework by a probability distribution pN (x, z|θ) that describes the probabilistic relationships between a set of N inputs x = (x1, . . . , xN) and corresponding network responses z = (z1, . . . , zN), where θ denotes the vector of network parameters that shape this distribution, e.g., via synaptic weights and network connectivity. The likelihood pN (x|θ) = P z pN (x, z|θ) of the actually occurring inputs x under the resulting internal model can then be viewed as a measure for the agreement between this internal model (which carries out “predictive coding” [3]) and its environment (which generates x). The goal of network learning is usually described in this probabilistic generative framework as finding parameter values θ∗that maximize this agreement, or equivalently the likelihood of the inputs x (maximum likelihood learning): θ∗= arg maxθ pN (x|θ). Locally optimal estimates of θ∗can be determined by gradient ascent on the data likelihood pN (x|θ), which led to many previous models of network plasticity [4, 5, 6]. While these models learn point estimates of locally optimal parameters θ∗, theoretical considerations for artificial neural networks suggest that it is advantageous to learn full posterior distributions p∗(θ) over parameters. This full Bayesian treatment of learning allows to integrate structural parameter priors in a Bayes-optimal way and promises better generalization of the acquired knowledge to new inputs [7, 8]. The problem how such posterior distributions could be learned by brain networks has been highlighted in [2] as an important future challenge in computational neuroscience. 1these authors contributed equally 1 Figure 1: Illustration of synaptic sampling for two parameters θ = {θ1, θ2} of a neural network N. A: 3D plot of an example likelihood function. For a fixed set of inputs x it assigns a probability density (amplitude on z-axis) to each parameter setting θ. The likelihood function is defined by the underlying neural network N. B: Example for a prior that prefers small values for θ. C: The posterior that results as product of the prior (B) and the likelihood (A). D: A single trajectory of synaptic sampling from the posterior (C), starting at the black dot. The parameter vector θ fluctuates between different solutions, the visited values cluster near local optima (red triangles). E: Cartoon illustrating the dynamic forces (plasticity rule (2)) that enable the network to sample from the posterior distribution p∗(θ|x) in (D). Here we introduce a possible solution to this problem. We present a new theoretical framework for analyzing and understanding local plasticity mechanisms of networks of neurons as stochastic processes, that generate specific distributions p∗(θ) of network parameters θ over which these parameters fluctuate. We call this new theoretical framework synaptic sampling. We use it here to analyze and model unsupervised learning and rewiring in spiking neural networks. In Section 3 we show that the synaptic sampling hypothesis also provides a unified framework for structural and synaptic plasticity which both are integrated here into a single learning rule. This model captures salient features of the permanent rewiring and fluctuation of synaptic efficacies observed in the cortex [9, 10]. In computer simulations, we demonstrate another advantage of the synaptic sampling framework: It endows neural circuits with an inherent robustness against perturbations [11]. 2 Learning a posterior distribution through stochastic synaptic plasticity In our learning framework we assume that not only a neural network N as described above, but also a prior pS(θ) for its parameters θ = (θ1, . . . , θM) are given. This prior pS can encode both structural constraints (such as sparse connectivity) and structural rules (e.g., a heavy-tailed distribution of synaptic weights). Then the goal of network learning becomes: learn the posterior distribution: p∗(θ|x) = 1 Z pS(θ) · pN (x|θ) , (1) with normalizing constant Z. A key insight (see Fig. 1 for an illustration) is that stochastic local plasticity rules for the parameters θi enable a network to achieve the learning goal (1): The distribution of network parameters θ will converge after a while to the posterior distribution (1) – and produce samples from it – if each network parameter θi obeys the dynamics dθi = b(θi) ∂ ∂θi log pS(θ) + b(θi) ∂ ∂θi log pN (x|θ) + T b′(θi) dt + p 2Tb(θi) dWi , (2) for i = 1, . . . , M and b′(θi) = ∂ ∂θi b(θi). The stochastic term dWi describes infinitesimal stochastic increments and decrements of a Wiener process Wi, where process increments over time t −s are normally distributed with zero mean and variance t −s, i.e. Wt i −Ws i ∼NORMAL(0, t −s) [12]. The dynamics (2) extend previous models of Bayesian learning via sampling [13, 14] by including a temperature T > 0 and a sampling-speed parameter b(θi) > 0 that can depend on the current value 2 of θi without changing the stationary distribution. For example, the sampling speed of a synaptic weight can be slowed down if it reaches very high or very low values. The temperature parameter T can be used to scale the diffusion term (i.e., the noise). The resulting stationary distribution of θ is proportional to p∗(θ) 1 T , so that the dynamics of the stochastic process can be described by the energy landscape 1 T log p∗(θ). For high values of T this energy landscape is flattened, i.e., the main modes of p∗(θ) become less pronounced. For T = 1 we arrive at the learning goal (1). For T →0 the dynamics of θ approaches a deterministic process and converges to the next local maximum of p∗(θ). Thus the learning process approximates for low values of T maximum a posteriori (MAP) inference [8]. The result is formalized in the following theorem: Theorem 1. Let p(x, θ) be a strictly positive, continuous probability distribution over continuous or discrete states x and continuous parameters θ = (θ1, . . . , θM), twice continuously differentiable with respect to θ. Let b(θ) be a strictly positive, twice continuously differentiable function. Then the set of stochastic differential equations (2) leaves the distribution p∗(θ) invariant: p∗(θ) ≡ 1 Z′ p∗(θ | x) 1 T , (3) with Z′ = R p∗(θ | x) 1 T dθ. Furthermore, p∗(θ) is the unique stationary distribution of (2). Proof: First, note that the first two terms in the drift term of Eq. (2) can be written as b(θi) ∂ ∂θi log pS(θ) + b(θi) ∂ ∂θi log pN (x|θ) = b(θi) ∂ ∂θi log p(θi|x, θ\i), where θ\i denotes the vector of parameters excluding parameter θi. Hence, the dynamics (2) can be written in terms of an Itˆo stochastic differential equations with drift Ai(θ) and diffusion Bi(θ): dθi = b(θi) ∂ ∂θi log p(θi|x, θ\i) + T b′(θi) | {z } drift: Ai(θ) dt + r 2 T b(θi) | {z } diffusion: Bi(θ) dWi . (4) This describes the stochastic dynamics of each parameter over time. For the stationary distribution we are interested in the dynamics of the distribution of parameters. Eq. (4) translate into the following Fokker-Planck equation, that determines the temporal dynamics of the distribution pFP(θ, t) over network parameters θ at time t (see [12]), d dtpFP(θ, t) = X i −∂ ∂θi Ai(θ) pFP(θ, t) + ∂2 ∂θ2 i 1 2Bi(θ) pFP(θ, t) . (5) Plugging in the presumed stationary distribution p∗(θ) on the right hand side of Eq. (5), one obtains d dtpFP(θ, t) = X i −∂ ∂θi (Ai(θ) p∗(θ)) + ∂2 ∂θ2 i (Bi(θ) p∗(θ)) = X i −∂ ∂θi b(θi) p∗(θ) ∂ ∂θi log p(θi|x, θ\i) + ∂ ∂θi T b(θi) p∗(θ) ∂ ∂θi log p∗(θ) , which by inserting for p∗(θ) the assumed stationary distribution (3) becomes d dtpFP(θ, t) = X i −∂ ∂θi b(θi) p∗(θ) ∂ ∂θi log p(θi|x, θ\i) + ∂ ∂θi b(θi) p∗(θ) ∂ ∂θi log p(θ\i|x) + log p(θi|x, θ\i) = X i 0 = 0 . This proves that p∗(θ) is a stationary distribution of the parameter sampling dynamics (4). Under the assumption that b(θi) is strictly positive, this stationary distribution is also unique. If the matrix of diffusion coefficients is invertible, and the potential conditions are satisfied (see Section 3.7.2 in [12] for details), the stationary distribution can be obtained (uniquely) by simple integration. Since the matrix of diffusion coefficients B is diagonal in our model (B = diag(Bi(θ), . . . , BM(θ))), B is trivially invertible since all elements, i.e. all Bi(θ), are positive. Convergence and uniqueness of the stationary distribution follows then for strictly positive b(θi) (see Section 5.3.3 in [12]). □ 3 2.1 Online synaptic sampling For sequences of N inputs x = (x1, . . . , xN), the weight update rule (2) depends on all inputs, such that synapses have to keep track of the whole set of all network inputs for the exact dynamics (batch learning). In an online scenario, we assume that only the current network input xn is available. According to the dynamics (2), synaptic plasticity rules have to compute the log likelihood derivative ∂ ∂θi log pN (x|θ). We assume that every τx time units a different input xn is presented to the network and that the inputs x1, . . . , xN are visited repeatedly in a fixed regular order. Under the assumption that the input patterns are statistically independent the likelihood pN (x|θ) becomes pN (x|θ) = pN (x1, . . . , xN|θ) = N Y n=1 pN (xn|θ) , (6) i.e., each network input xn can be explained as being drawn individually from pN (xn|θ), independently from other inputs. The derivative of the log likelihood in (2) is then given by ∂ ∂θi log pN (x|θ) = PN n=1 ∂ ∂θi log pN (xn|θ) . This “batch” dynamics does not map readily onto a network implementation because the weight update requires at any time knowledge of all inputs x1, . . . , xN. We provide here an online approximation for small sampling speeds. To obtain an online learning rule, we consider the parameter dynamics dθi = b(θi) ∂ ∂θi log pS(θ) + Nb(θi) ∂ ∂θi log pN (xn|θ) + Tb′(θi) dt + p 2Tb(θi) dWi. (7) As in the batch learning setting, we assume that each input xn is presented for a time interval of τx. Although convergence to the correct posterior distribution cannot be guaranteed theoretically for this online rule, we show that it is a reasonable approximation to the batch-rule. Integrating the parameter changes (7) over one full presentation of the data x, i.e., starting from t = 0 with some initial parameter values θ0 up to time t = Nτx, we obtain for slow sampling speeds (Nτxb(θi) ≪1) θNτx i −θ0 i ≈Nτx b(θ0 i ) ∂ ∂θi log pS(θ0) + b(θ0 i ) N X n=1 ∂ ∂θi log pN (xn|θ0) + T b′(θ0 i ) ! + q 2Tb(θ0 i ) (WNτx i −W0 i ). (8) This is also what one obtains when integrating the batch rule (2) for Nτx time units (for slow b(θi)). Hence, for slow enough b(θi), (7) is a good approximation of optimal weight sampling. In the presence of hidden variables z, maximum likelihood learning cannot be applied directly, since the state of the hidden variables is not known from the observed data. The expectation maximization algorithm [8] can be used to overcome this problem. We adopt this approach here. In the online setting, when pattern xn is applied to the network, it responds with network state zn according to pN (zn | xn, θ), where the current network parameters are used in this inference process. The parameters are updated in parallel according to the dynamics (8) for the given values of xn and zn. 3 Synaptic sampling for network rewiring In this section we present a simple model to describe permanent network rewiring using the dynamics (2). Experimental studies have provided a wealth of information about the stochastic rewiring in the brain (see e.g. [9, 10]). They demonstrate that the volume of a substantial fraction of dendritic spines varies continuously over time, and that all the time new spines and synaptic connections are formed and existing ones are eliminated. We show that these experimental data on spine motility can be understood as special cases of synaptic sampling. To arrive at a concrete model we use the following assumption about dynamic network rewiring: 1. In accordance with experimental studies [10], we require that spine sizes have a multiplicative dynamics, i.e., that the amount of change within some given time window is proportional to the current size of the spine. 2. We assume here for simplicity that there is a single parameter θi for each potential synaptic connection i. 4 The second requirement can be met by encoding the state of the synapse in an abstract form, that represents synaptic connectivity and synaptic efficacy in a single parameter θi. We define that negative values of θi represent a current disconnection and positive values represent a functional synaptic connection (we focus on excitatory connections). The distance of the current value of θi from zero indicates how likely it is that the synapse will soon reconnect (for negative values) or withdraw (for positive values). In addition the synaptic parameter θi encodes for positive values the synaptic efficacy wi, i.e., the resulting EPSP amplitudes, by a simple mapping wi = f(θi). The first assumption which requires multiplicative synaptic dynamics supports an exponential function f in our model, in accordance with previous models of spine motility [10]. Thus, we assume in the following that the efficacy wi of synapse i is given by wi = exp(θi −θ0) . (9) Note that for a large enough offset θ0, negative parameter values θi (which model a non-functional synaptic connection) are automatically mapped onto a tiny region close to zero in the w-space, so that retracted spines have essentially zero synaptic efficacy. In addition we use a Gaussian prior pS(θi) = NORMAL(θi | µ, σ), with mean µ and variance σ2 over synaptic parameters. In the simulations we used µ = 0.5, σ = 1 and θ0 = 3. A prior of this form allows to include a simple regularization mechanism in the learning scheme, which prefers sparse solutions (i.e. solutions with small parameters) [8]. Together with the exponential mapping (9) this prior induces a heavy-tailed prior distribution over synaptic weights wi. The network therefore learns solutions where only the most relevant synapses are much larger than zero. The general rule for online synaptic sampling (7) for the exponential mapping wi = exp(θi −θ0) and the Gaussian prior becomes (for constant small learning rate b ≪1 and unit temperature T = 1) dθi = b 1 σ2 (µ −θi) + Nwi ∂ ∂wi log pN (xn|w) dt + √ 2b dWi . (10) In Eq. (10) the multiplicative synaptic dynamics becomes explicit. The gradient ∂ ∂wi log pN (xn|w), i.e., the activity-dependent contribution to synaptic plasticity, is weighted by wi. Hence, for negative values of θi (non-functional synaptic connection), the activities of the pre- and post-synaptic neurons have negligible impact on the dynamics of the synapse. Assuming a large enough θ0, retracted synapses therefore evolve solely according to the prior pS(θ) and the random fluctuations dWi. For large values of θi the opposite is the case. The influence of the prior ∂ ∂θi log pS(θ) and the Wiener process dWi become negligible, and the dynamics is dominated by the activity-dependent likelihood term. If the activity-dependent second term in Eq. (10) (that tries to maximize the likelihood) is small (e.g., because θi is small or parameters are near a mode of the likelihood) then Eq. (10) implements an Ornstein-Uhlenbeck process. This prediction of our model is consistent with a previous analysis which showed that an Ornstein-Uhlenbeck process is a viable model for synaptic spine motility [10]. 3.1 Spiking network model Through the use of parameters θ which determine both synaptic connectivity and synaptic weights, the synaptic sampling framework provides a unified model for structural and synaptic plasticity. Eq. (10) describes the stochastic dynamics of the synaptic parameters θi. In this section we analyze the resulting rewiring dynamics and structural plasticity by applying the synaptic sampling framework to networks of spiking neurons. Here, we used winner-take-all (WTA) networks to learn a simple sensory integration task and show that learning with synaptic sampling in such networks is inherently robust to perturbations. For the WTA we adapted the model described in detail in [15]. Briefly, the WTA neurons were modeled as stochastic spike response neurons with a firing rate that depends exponentially on the membrane voltage [16, 17]. The membrane potential uk(t) of neuron k at time t is given by uk(t) = X i wki xi(t) + βk(t) , (11) where xi(t) denotes the (unweighted) input from input neuron i, wki denotes the efficacy of the synapse from input neuron i, and βk(t) denotes a homeostatic adaptation current (see below). The 5 input xi(t) models the (additive) excitatory postsynaptic current from neuron i. In our simulations we used a double-exponential kernel with time constants τm = 20ms and τs = 2ms [18]. The instantaneous firing rate ρk(t) of network neuron k depends exponentially on the membrane potential and is subject to divisive lateral inhibition Ilat(t) (described below): ρk(t) = ρnet Ilat(t) exp(uk(t)), where ρnet = 100Hz scales the firing rate of neurons [16]. Spike trains were then drawn from independent Poisson processes with instantaneous rate ρk(t) for each neuron. Divisive inhibition [19] between the K neurons in the WTA network was implemented in an idealized form [6], Ilat(t) = PK l=1 exp(ul(t)). In addition, each output spike caused a slow depressing current, giving rise to the adaptation current βk(t). This implements a slow homeostatic mechanism that regulates the output rate of individual neurons (see [20] for details). The WTA network defined above implicitly defines a generative model [21]. Inputs xn are assumed to be generated in dependence on the value of a hidden multinomial random variable hn that can take on K possible values 1, . . . , K. Each neuron k in the WTA circuit corresponds to one value k of this hidden variable. One obtains the probability of an input vector for a given hidden cause as pN (xn|hn = k, w) = Q i POISSON(xn i |αewki), with a scaling parameter α > 0. In other words, the synaptic weight wki encodes (in log-space) the firing rate of input neuron i, given that the hidden cause is k. The network implements inference in this generative model, i.e., for a given input xn, the firing rate of network neuron zk is proportional to the posterior probability p(hn = k|xn, w) of the corresponding hidden cause. Online maximum likelihood learning is realized through the synaptic update rule (see [21]), which realizes here the second term of Eq. (10) ∂ ∂wki log pN (xn | w) ≈Sk(t) (xi(t) −α ewki) , (12) where Sk(t) denotes the spike train of the kth neuron and xi(t) denotes the weight-normalized value of the sum of EPSPs from presynaptic neuron i at time t in response to pattern xn. 3.2 Simulation results Here, we consider a network that allows us to study the self-organization of connections between hidden neurons. Additional details to this experiment and further analyses of the synaptic sampling model can be found in [22]. The architecture of the network is illustrated in Fig. 2A. It consists of eight WTA circuits with arbitrary excitatory synaptic connections between neurons within the same or different ones of these WTA circuits. Two populations of “auditory” and “visual” input neurons xA and xV project onto corresponding populations zA and zV of hidden neurons (each consisting of four WTA circuits with K = 10 neurons, see lower panel of Fig. 2A). The hidden neuron populations receive exclusively auditory (zA, 770 neurons) or visual inputs (zV , 784 neurons) and in addition, arbitrary lateral excitatory connections between all hidden neurons are allowed. This network models multi-modal sensory integration and association in a simplified manner [15]. Biological neural networks are astonishingly robust against perturbations and lesions [11]. To investigate the inherent compensation capability of synaptic sampling we applied two lesions to the network within a learning session of 8 hours (of equivalent biological time). The network was trained by repeatedly drawing random instances of spoken and written digits of the same type (digit 1 or 2 taken from MNIST and 7 utterances of speaker 1 from TI 46) and simultaneously presenting Poisson spiking representations of these input patterns to the network. Fig. 2A shows example firing rates for one spoken/written input pair. Input spikes were randomly drawn according to these rates. Firing rates of visual input neurons were kept fixed throughout the duration of the auditory stimulus. In the first lesion we removed all neurons (16 out of 40) that became tuned for digit 2 in the preceding learning. The reconstruction performance of the network was measured through the capability of a linear readout neuron, which received input only from zV . During these test trials only the auditory stimulus was presented (the remaining 3 utterances of speaker 1 were used as test set) and visual input neurons were clamped to 1Hz background noise. The lesion significantly impaired the performance of the network in stimulus reconstruction, but it was able to recover from the lesion after about one hour of continuing network plasticity (see Fig. 2C). In the second lesion all synaptic connections between hidden neurons that were present after recovery from the first lesion were removed and not allowed to regrow (2936 synapses in total). After 6 Figure 2: Inherent compensation for network perturbations. A: Illustration of the network architecture: A recurrent spiking neural network received simultaneously spoken and handwritten spiking representations of the same digit. B: First three PCA components of the temporal evolution a subset of the network parameters θ. After each lesion the network parameters migrate to a new manifold. C: The generative reconstruction performance of the “visual” neurons zV for the test case when only an auditory stimulus is presented was tracked throughout the whole learning session (colors of learning phases as in (B)). After each lesion the performance strongly degrades, but reliably recovers. Learning with zero temperature (dashed yellow) or with approximate HMM learning [15] (dashed purple) performed significantly worse. Insets at the top show the synaptic weights of neurons in zV at 4 time points projected back into the input space. Network diagrams in the middle show ongoing network rewiring for synaptic connections between the hidden neurons. Each arrow indicates a functional connection between two neurons (only 1% randomly drawn subset shown). The neuron whose parameters are tracked in (C) is highlighted in red. Numbers under the network diagrams show the total number of functional connections between hidden neurons at the time point. about two hours of continuing synaptic sampling 294 new synaptic connections between hidden neurons emerged. These connections made it again possible to infer the auditory stimulus from the activity of the remaining 24 hidden neurons in the population zV (in the absence of input from the population xV ). The classification performance was around 75% (see bottom of Fig. 2C). In Fig. 2B we track the temporal evolution of a subset θ′ of network parameters (35 parameters θi associated with the potential synaptic connections of the neuron marked in red in the middle of Fig. 2C from or to other hidden neurons, excluding those that were removed at lesion 2 and not allowed to regrow). The first three PCA components of this 35-dimensional parameter vector are shown. The vector θ′ fluctuates first within one region of the parameter space while probing 7 different solutions to the learning problem, e.g., high probability regions of the posterior distribution (blue trace). Each lesions induced a fast switch to a different region (red,green), accompanied by a recovery of the visual stimulus reconstruction performance (see Fig. 2C). The network therefore compensates for perturbations by exploring new parameter spaces. Without the noise and the prior the same performance could not be reached for this experiment. Fig. 2C shows the result for the approximate HMM learning [15], which is a deterministic learning approach (without a prior). Using this approach the network was able to learn representations of the handwritten and spoken digits. However, these representation and the associations between them were not as distinctive as for synaptic sampling and the classification performance was significantly worse (only first learning phase shown). We also evaluated this experiment with a deterministic version of synaptic sampling (T = 0). Here, the stochasticity inherent to the WTA circuit was sufficient to overcome the first lesion. However, the performance was worse in the last learning phase (after removing all active lateral synapses). In this situation, the random exploration of the parameter space that is inherent to synaptic sampling significantly enhanced the speed of the recovery. 4 Discussion We have shown that stochasticity may provide an important function for network plasticity. It enables networks to sample parameters from the posterior distribution that represents attractive combinations of structural constraints and rules (such as sparse connectivity and heavy-tailed distributions of synaptic weights) and a good fit to empirical evidence (e.g., sensory inputs). The resulting rules for synaptic plasticity contain a prior distributions over parameters. Potential functional benefits of priors (on emergent selectivity of neurons) have recently been demonstrated in [23] for a restricted Boltzmann machine. The mathematical framework that we have presented provides a normative model for evaluating empirically found stochastic dynamics of network parameters, and for relating specific properties of this “noise” to functional aspects of network learning. Some systematic dependencies of changes in synaptic weights (for the same pairing of pre- and postsynaptic activity) on their current values had already been reported in [24, 25, 26]. These can be modeled as the impact of priors in our framework. Models of learning via sampling from a posterior distribution have been previously studied in machine learning [13, 14] and the underlying theoretical principles are well known in physics (see e.g. Section 5.3 of [27]). The theoretical framework provided in this paper extends these previous models for learning by introducing the temperature parameter T and by allowing to control the sampling speed in dependence of the current parameter setting through b(θi). Furthermore, our model combines for the first time automatic rewiring in neural networks with Bayesian inference via sampling. The functional consequences of these mechanism are further explored in [22]. The postulate that networks should learn posterior distributions of parameters, rather than maximum likelihood values, had been proposed for artificial neural networks [7, 8], since such organization of learning promises better generalization capability to new examples. The open problem of how such posterior distributions could be learned by networks of neurons in the brain, in a way that is consistent with experimental data, has been highlighted in [2] as a key challenge for computational neuroscience. We have presented here a model, whose primary innovation is to view experimentally found trial-to-trial variability and ongoing fluctuations of parameters no longer as a nuisance, but as a functionally important component of the organization of network learning. This model may lead to a better understanding of such noise and seeming imperfections in the brain. It might also provide an important step towards developing algorithms for upcoming new technologies implementing analog spiking hardware, which employ noise and variability as a computational resource [28, 29]. Acknowledgments Written under partial support of the European Union project #604102 The Human Brain Project (HBP) and CHIST-ERA ERA-Net (Project FWF #I753-N23, PNEUMA). We would like to thank Seth Grant, Christopher Harvey, Jason MacLean and Simon Rumpel for helpful comments. 8 References [1] Hatfield G. Perception as Unconscious Inference. In: Perception and the Physical World: Psychological and Philosophical Issues in Perception. Wiley; 2002. p. 115–143. [2] Pouget A, Beck JM, Ma WJ, Latham PE. Probabilistic brains: knowns and unknowns. Nature Neuroscience. 2013;16(9):1170–1178. [3] Winkler I, Denham S, Mill R, B¨ohm TM, Bendixen A. Multistability in auditory stream segregation: a predictive coding view. Phil Trans R Soc B: Biol Sci. 2012;367(1591):1001–1012. [4] Brea J, Senn W, Pfister JP. Sequence learning with hidden units in spiking neural networks. In: NIPS. vol. 24; 2011. p. 1422–1430. [5] Rezende DJ, Gerstner W. Stochastic variational learning in recurrent spiking networks. Front Comput Neur. 2014;8:38. [6] Nessler B, Pfeiffer M, Maass W. STDP enables spiking neurons to detect hidden causes of their inputs. In: NIPS. vol. 22; 2009. p. 1357–1365. [7] MacKay DJ. Bayesian interpolation. Neural Computation. 1992;4(3):415–447. [8] Bishop CM. Pattern Recognition and Machine Learning. New York: Springer; 2006. [9] Holtmaat AJ, Trachtenberg JT, Wilbrecht L, Shepherd GM, Zhang X, Knott GW, et al. Transient and Persistent Dendritic Spines in the Neocortex In Vivo. Neuron. 2005;45:279–291. [10] L¨owenstein Y, Kuras A, Rumpel S. Multiplicative dynamics underlie the emergence of the log-normal distribution of spine sizes in the neocortex in vivo. J Neurosci. 2011;31(26):9481–9488. [11] Marder E. Variability, compensation and modulation in neurons and circuits. PNAS. 2011;108(3):15542– 15548. [12] Gardiner CW. Handbook of Stochastic Methods. 3rd ed. Springer; 2004. [13] Welling M, Teh YW. Bayesian learning via stochastic gradient Langevin dynamics. In: Proceedings of the 28th International Conference on Machine Learning (ICML-11); 2011. p. 681–688. [14] Sato I, Nakagawa H. Approximation analysis of stochastic gradient langevin dynamics by using fokkerplanck equation and ito process. In: NIPS; 2014. p. 982–990. [15] Kappel D, Nessler B, Maass W. STDP installs in winner-take-all circuits an online approximation to hidden Markov model learning. PLoS Comp Biol. 2014;10(3):e1003511. [16] Jolivet R, Rauch A, L¨uscher H, Gerstner W. Predicting spike timing of neocortical pyramidal neurons by simple threshold models. J Comp Neurosci. 2006;21:35–49. [17] Mensi S, Naud R, Gerstner W. From stochastic nonlinear integrate-and-fire to generalized linear models. In: NIPS. vol. 24; 2011. p. 1377–1385. [18] Gerstner W, Kistler WM. Spiking Neuron Models. Cambridge University Press; 2002. [19] Carandini M. From circuits to behavior: a bridge too far? Nature Neurosci. 2012;15(4):507–509. [20] Habenschuss S, Bill J, Nessler B. Homeostatic plasticity in Bayesian spiking networks as Expectation Maximization with posterior constraints. In: NIPS. vol. 25; 2012. p. 782–790. [21] Habenschuss S, Puhr H, Maass W. Emergence of optimal decoding of population codes through STDP. Neural Computation. 2013;25:1–37. [22] Kappel D, Habenschuss S, Legenstein R, Maass W. Network Plasticity as Bayesian Inference. PLoS Comp Biol. 2015;in press. [23] Xiong H, Szedmak S, Rodrguez-Sanchez A, Piater J. Towards sparsity and selectivity: Bayesian learning of restricted Boltzmann machine for early visual features. In: ICANN; 2014. p. 419–426. [24] Bi GQ, Poo MM. Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. J Neurosci. 1998;18(24):10464–10472. [25] Sj¨ostr¨om PJ, Turrigiano GG, Nelson SB. Rate, timing, and cooperativity jointly determine cortical synaptic plasticity. Neuron. 2001;32(6):1149–1164. [26] Montgomery JM, Pavlidis P, Madison DV. Pair recordings reveal all-silent synaptic connections and the postsynaptic expression of long-term potentiation. Neuron. 2001;29(3):691–701. [27] Kennedy AD. The Hybrid Monte Carlo algorithm on parallel computers. Parallel Computing. 1999;25(10):1311–1339. [28] Johannes Schemmel KMEM Andreas Gruebl. Implementing Synaptic Plasticity in a VLSI Spiking Neural Network Model. In: IJCNN; 2006. p. 1–6. [29] Bill J, Legenstein R. A compound memristive synapse model for statistical learning through STDP in spiking neural networks. Frontiers in Neuroscience. 2014;8. 9 | 2015 | 276 |
5,787 | ß´¬»®²¿¬·²¹ Ó·²·³·¦¿¬·±² º±® λ¹®»·±² Ю±¾´»³ ©·¬¸ Ê»½¬±®óª¿´«»¼ Ñ«¬°«¬ Ю¿¬»»µ Ö¿·² Ó·½®±±º¬ λ»¿®½¸ô ×ÒÜ×ß °®¿¶¿·²à³·½®±±º¬ò½±³ ß³¾«¶ Ì»©¿®· ˲·ª»®·¬§ ±º Ó·½¸·¹¿²ô ß²² ß®¾±®ô ËÍß ¬»©¿®·¿à«³·½¸ò»¼« ß¾¬®¿½¬ ײ ®»¹®»·±² °®±¾´»³ ·²ª±´ª·²¹ ª»½¬±®óª¿´«»¼ ±«¬°«¬ ø±® »¯«·ª¿´»²¬´§ô ³«´¬·°´» ®»°±²»÷ô ·¬ · ©»´´ µ²±©² ¬¸¿¬ ¬¸» ³¿¨·³«³ ´·µ»´·¸±±¼ »¬·³¿¬±® øÓÔÛ÷ô ©¸·½¸ ¬¸¿² ¬¸» ±®¼·²¿®§ ´»¿¬ ¯«¿®» øÑÔÍ÷ »¬·³¿¬±®ò ر©»ª»®ô »¨·¬·²¹ ´·¬»®¿¬«®» ½±³ó Ó±®» ½®«½·¿´´§ô ½±³°«¬·²¹ ¬¸» ÓÔÛ ·² ¹»²»®¿´ ®»¯«·®» ±´ª·²¹ ¿ ²±²ó½±²ª»¨ ±°ó ²·¬» ¿³°´» «°°»® ¿²¼ ´±©»® ¾±«²¼ ±² ¬¸» »¬·³¿¬·±² »®®±® ±º ÑÔÍ ¿²¼ ÓÔÛô ·² ¬©± °±°«´¿® ³±¼»´æ ¿÷ б±´»¼ ³±¼»´ô ¾÷ Í»»³·²¹´§ ˲®»´¿¬»¼ λ¹®»·±² øÍËÎ÷ ½«®¿¬» ¬¸¿² ÑÔÍò Ú«®¬¸»®³±®»ô º±® ¾±¬¸ ³±¼»´ô ©» ¸±© ¬¸¿¬ ¬¸» ±«¬°«¬ ±º ¿ º±®³¿²½» ¹«¿®¿²¬»» ¿ ÓÔÛô «° ¬± «²·ª»®¿´ ½±²¬¿²¬ò Ú·²¿´´§ô ©» ¸±© ¬¸¿¬ º±® ¸·¹¸ó¼·³»²·±²¿´ »¬¬·²¹ ¿ ©»´´ô ¬¸» ¿´¬»®²¿¬·²¹ ³·²·³·¦¿¬·±² °®±½»¼«®» ´»¿¼ ©·¬¸ »®®±® ¾±«²¼ ¬¸¿¬ ¼»°»²¼ ±²´§ ´±¹¿®·¬¸³·½¿´´§ ±² ¬¸» ¼¿¬¿ ¼·³»²·±²¿´·¬§ò ï ײ¬®±¼«½¬·±² λ¹®»·±² °®±¾´»³ ©·¬¸ ª»½¬±®óª¿´«»¼ ø±®ô »¯«·ª¿´»²¬´§ô ³«´¬·°´»÷ ®»°±²» ª¿®·¿¾´» Š ©¸»®» ©» ©¿²¬ ¬± °®»¼·½¬ ³«´¬·°´» ®»°±²» ¾¿»¼ ±² ¿ »¬ ±º °®»¼·½¬±® ª¿®·¿¾´»Š · ¿ ½´¿·½¿´ °®±¾´»³ ¬¸¿¬ ·¬ · ²¿¬«®¿´ ¬± ¿«³» ¬¸¿¬ ¬¸» ²±·»ô ±® »®®±®ô ¬»®³ ·² ¬¸» «²¼»®´§·²¹ ´·²»¿® ®»¹®»·±² ³±¼»´ ¿®» ½±®®»´¿¬»¼ ¿½®± ¬¸» ®»°±²» ª¿®·¿¾´»ò Ú±® »¨¿³°´»ô ·² ³«´¬·ó¬¿µ ´»¿®²·²¹ô ¬¸» »®®±® ·² ¼·ºº»®»²¬ ¬¿µ ±«¬°«¬ ½¿² ¾» ¸»¿ª·´§ ½±®®»´¿¬»¼ ¼«» ¬± ·³·´¿®·¬§ ±º ¬¸» ¬¿µò λ¹®»·±² ©·¬¸ ³«´¬·°´» ®»°±²» · ¿ ½´¿·½¿´ ¬±°·½ò Ì»¨¬¾±±µ ·² ¬¿¬·¬·½ Åëô êà ¿²¼ »½±²±³»¬ó ®·½ Åéà ½±ª»® ·¬ ·² ¼»¬¿·´ ¿²¼ ·´´«¬®¿¬» °®¿½¬·½¿´ ¿°°´·½¿¬·±²ò Åîà ¿²¼ Åíà °®±ª·¼» ®»½»²¬ ±ª»®ª·»© ±º ¬¸» Í»»³·²¹´§ ˲®»´¿¬»¼ λ¹®»·±² øÍËÎ÷ ³±¼»´ ¿²¼ ¬¸» ¿±½·¿¬»¼ »¬·³¿¬·±² °®±½»¼«®»ò ׬ · ©»´´ µ²±©² ¬¸¿¬ º±® ÍËÎ ³±¼»´ô ¬¸» ¬¿²¼¿®¼ Ñ®¼·²¿®§ Ô»¿¬ ͯ«¿®» øÑÔÍ÷ »¬·³¿¬±® ³¿§ ²±¬ Åíà «½¸ ¿ ¬¸» Ó¿¨·³«³ Ô·µ»´·¸±±¼ Û¬·³¿¬±® øÓÔÛ÷ò ̸» ¬©± ©»´´óµ²±©² »¨½»°¬·±² ¬± ¬¸· «²ó ¼»®°»®º±®³¿²½» ±º ÑÔÍ ¿®»æ ©¸»² ¬¸» ²±·» ¿½®± ¬¿µ · «²½±®®»´¿¬»¼ ¿²¼ ©¸»² ¬¸» ®»¹®»±® ¿®» ¸¿®»¼ ¿½®± ¬¿µò ̸» ´¿¬»® · ¬¸» ©»´´óµ²±©² ³«´¬·ª¿®·¿¬» ®»¹®»·±² øÓÎ÷ »¬¬·²¹ ø»» Åëô ݸ¿°¬»® êÃ÷ò ر©»ª»®ô ¬¸»®» ¿®» ¿¬ ´»¿¬ ¬©± ´·³·¬¿¬·±² ±º ¬¸» »¨·¬·²¹ ÓÔÛ ´·¬»®¿¬«®» ·² ¬¸· ½±²¬»¨¬ò Ú·®¬ô ¼»°·¬» ¾»·²¹ ¿ ½´¿·½¿´ ¿²¼ ©·¼»´§ ¬«¼·»¼ °®±¾´»³ô ´·¬¬´» ¿¬¬»²¬·±² ¸¿ ¾»»² °¿·¼ ¬± ¬¸» º¿½¬ ¬¸¿¬ ÓÔÛ ·²ª±´ª» ±´ª·²¹ ¿ ²±²ó½±²ª»¨ ±°¬·³·¦¿¬·±² °®±¾´»³ ·² ¹»²»®¿´ ¿²¼ · ²±¬ µ²±©² ¬± ¾» ¼·½«·²¹ ¬¸» ÍËÎ ³±¼»´ô ¿§ô 8É» ²±¬»ô ¬¸· °®±½»¼«®» Å·ò»òô ß´¬Ó·²Ã °®±¼«½» ¬¸» ÓÔÛ ©¸»² ·¬ ½±²ª»®¹»ô ¾«¬ ·¬ · ²±¬ ¹«¿®¿²¬»»¼ ¬± ½±²ª»®¹»ô ²±® · ·¬ ¿«®»¼ ¬¸¿¬ ¬¸»®» · ¿ «²·¯«» ÓÔÛòŒ ̸» ï ¬»¨¬ ¿´± ½·¬» Åèà ¬± ½´¿·³ ¬¸¿¬ 8·º ¬¸» Åß´¬Ó·²Ã ·¬»®¿¬·±² ½±²ª»®¹»ô ·¬ ®»¿½¸» ¬¸» ÓÔÛŒ ¾«¬ ¬¸» ®»«´¬ Åèô ̸»±®»³ ïà ·¬»´º ±²´§ ½´¿·³ ¬¸¿¬ 8¬¸» ·¬»®¿¬·ª» °®±½»¼«®» ¿´©¿§ ½±²ª»®¹» ¬± ¿ ±´«¬·±² ±º ¬¸» Œ ¿²¼ ²±¬ ²»½»¿®·´§ ¬± 8¬¸» ¿¾±´«¬» ³¿¨·³«³ ±º ¬¸» ´·µ»´·¸±±¼ º«²½¬·±²Œ ø»³°¸¿· ±² ¬¸» ©±®¼ 8¿¾±´«¬»Œ · ·² ¬¸» ±®·¹·²¿´ ¬»¨¬÷ò Í»½±²¼ô ·³°®±ª»³»²¬ ½´¿·³ º±® ÓÔÛ ±ª»® ÑÔÍ ¿®» ¾¿»¼ ±² ¿§³°¬±¬·½ ¬± ½±²ª»®¹» »ª»² ¿º¬»® ïôððð ·¬»®¿¬·±²ô ¬¸» ¬»¨¬ Åéà ¿§ ¬¸¿¬ ¬¸» 8°®±¾´»³ ©·¬¸ ¬¸· ¿°°´·½¿¬·±² ³¿§ ¾» ¬¸» ª»®§ ³¿´´ ¿³°´» ·¦»ô ïé ±¾»®ª¿¬·±²Œò ̸· · ½±²·¬»²¬ ©·¬¸ ±«® ¬¸»±®»¬·½¿´ ®»«´¬ ¬¸¿¬ ̸» ³¿·² ½±²¬®·¾«¬·±² ±º ¬¸· °¿°»® · ¯«¿²¬·º§·²¹ô ª·¿ ô ¬¸» ·³°®±ª»³»²¬ ·² »ó ½±³°«¬¿¬·±² ¿²¼ «» ½±²½»²¬®¿¬·±² ·²»¯«¿´·¬·» «½¸ ¿ °®±½»¼«®» ³·¹¸¬ ´»¿¼ ¬± ´±½¿´ ±°¬·³¿ò ɸ»®»¿ °®¿½¬·¬·±²»® ¸¿ª» ´±²¹ ®»½±¹²·¦»¼ ¬¸¿¬ ß´¬ó Ó·² ©±®µ ©»´´ º±® «½¸ °®±¾´»³ Åïô ݸ¿°¬»® ëÃô ©» ¿®» ²±¬ ¿©¿®» ±º ¿²§ °®±ª¿¾´» ¹«¿®¿²¬»» º±® ·¬ ·² ¬¸» »¬¬·²¹ ±º ³«´¬·°´» ®»°±²» ®»¹®»·±²ò É» ½±²·¼»® ¬©± ©·¼»´§ó«»¼ ª»½¬±®ó±«¬°«¬ ³±¼»´ô ²¿³»´§ ¬¸» б±´»¼ ³±¼»´ øÍ»½¬·±² î÷ ¿²¼ ¬¸» Í»»³·²¹´§ ˲®»´¿¬»¼ λ¹®»·±² øÍËÎ÷ ³±¼»´ øÍ»½¬·±² í÷ò Ú±® ¾±¬¸ ³±¼»´ô ©» ¸±© ¬¸¿¬ ¬¸» »ó ¬·³¿¬·±² »®®±® ±º ß´¬Ó·² ³¿¬½¸» ¬¸» ÓÔÛ ±´«¬·±²ù »®®±® «° ¬± ´±¹ º¿½¬±®ò Ó±®»±ª»®ô ©» ¸±© ±®§ò Ú±® ß´¬Ó·²ô ±«® °®±±º »¨°´±·¬ ¿ ª·®¬«±« ½·®½´» ¸»´° ½±ª¿®·¿²½» »¬·³¿¬·±² ¿²¼ ª·½»óª»®¿ò ß ¿ ®»«´¬ô ©» ¿®» ¿¾´» ¬± ¸±© ¬¸¿¬ ¬¸» ¾±¬¸ °¿®¿³»¬»® »¬·³¿¬·±² »®®±® ®»¼«½» ¾§ ¿¬ ´»¿¬ ¿ ½±²¬¿²¬ º¿½¬±® ·² »¿½¸ ·¬»®¿¬·±² ±º ß´¬Ó·²ò ×´´«¬®¿¬·ª» Û¨¿³°´»ò ̱ ©¸»¬ ¬¸» ®»¿¼»®ù ¿°°»¬·¬» º±® ©¸¿¬ º±´´±©ô ©» ½±²·¼»® ¸»®» ¿ ·³°´» ®»¹®»·±² °®±¾´»³ ©·¬¸ ¬©± ®»°±²»æ § ï ã Èâ ï© õ å § î ã Èâ î© õ å ï · ²ô ©¸»®» È ïå È î î Î © · ¸¿®»¼ ¿½®± ¬¸» ¬©± °®±¾´»³ô ©¸·½¸ ¸±´¼ ¬®«» ·² ¬¸» °±±´»¼ ³±¼»´ ¬«¼·»¼ ·² Í»½¬·±² îò ¿½®± °®±¾´»³ò Ó±®» ·³°±®¬¿²¬´§ô ²±¬·½» ¬¸¿¬ ¬¸» ·ò·ò¼ò ²±·»ô ø¿§ô ·¬ · ¬¿²¼¿®¼ Ù¿«·¿²÷ · ¸¿®»¼ ¿½®± ¬¸» ¬©± °®±¾´»³ò ׺ ©» »¬·³¿¬» © «·²¹ ÑÔÍæ © ã ¿®¹ ³·² © ï ² ãï ø§ ï Èâ ï©÷î õ ï ² ãï ø§ ï Èâ î©÷î ¬¸»² ©» ©·´´ ¸¿ª» µ© © µî ã°²÷ò ر©»ª»®ô «¾¬®¿½¬·²¹ ¬¸» ¬©± »¯«¿¬·±² ¹·ª»æ § ï § î ã øÈ ï È î÷â© å ï · ²ò ̸¿¬ ·ô ¿ ±±² ¿ ©» ¸¿ª» ² ¼ ¿³°´»ô ©» ©·´´ ®»½±ª»® © »¨¿½¬´§ ¾§ ±´ª·²¹ ¬¸» ¿¾±ª» §¬»³ ±º ´·²»¿® »¯«¿¬·±²ÿ Ñ«® ¬±§ »¨¿³°´» ³±¬·ª¿¬» ¬¸» º«²¼¿³»²¬¿´ ¯«»¬·±² ¬¸¿¬ ¬¸· °¿°»® ¿²©»®æ ¸±© ³«½¸ ½¿² ©» ·³°®±ª» ÑÔÍ ¾§ »¨°´±·¬·²¹ ²±·» ½±®®»´¿¬·±²á Ô»¬ « ³¿µ» ¬¸» »¨¿³°´» ³±®» ®»¿´·¬·½ ¾§ ¿«³·²¹ ¬¸» ³±¼»´æ § ã È © õ å ï · ²ô ©¸»®» § î Î · ¿ ª»½¬±® ±º ³ ®»°±²»ô »¿½¸ »´»³»²¬ ±º È î Î · ¿³°´»¼ ·ò·ò¼ò º®±³ ¬¸» ¬¿²¼¿®¼ Ù¿«·¿² ¿²¼ ²±·» ª»½¬±® · ¼®¿©² º®±³ Òøðå ÷ò ß ½±®±´´¿®§ ±º ¬¸» ³¿·² ®»«´¬ ·² Í»½¬·±² î ¸±© ¬¸¿¬ ÓÔÛ ø»» øí÷÷ ·³°®±ª» «°±² ¬¸» ÑÔÍ °¿®¿³»¬»® »®®±® ¾±«²¼ ¾§ ¿ º¿½¬±® ±º Û®®±® ãÛ®®±® ï÷ã³îò ̸· º¿½¬±® ½¿² »¿·´§ ¾» »»² ¬± ¾» ´¿®¹»® ¬¸¿² ï ¾§ «·²¹ Ý¿«½¸§óͽ¸©¿®¦ ·²»¯«¿´·¬§æ ï÷ã³î ã ø ÷ø ï ÷ã³î ø ïã ÷îã³î ã ïô ©¸»®» ¾» ¬¸» ¶ó¬¸ ´¿®¹»¬ »·¹»²ª¿´«» ±º ò ̸» ·²»¯«¿´·¬§ · ¬·¹¸¬ ©¸»² 㠽㠺±® ±³» ½±²¬¿²¬ ½ò ̸¿¬ ·ô ©¸»² ã ½× ©¸·½¸ ¸±´¼ ¬®«» ·ºº ¬¸» ²±·» ·² »¿½¸ ®»°±²» · ³«¬«¿´´§ ·²¼»°»²¼»²¬ ¿²¼ ¸¿ ¿³» ª¿®·¿²½»ò ̸» ³±®» ¼»°¿®¬ º®±³ ¾»·²¹ ½ ×ô ¬¸» ´¿®¹»® ¬¸» ·³°®±ª»³»²¬ º¿½¬±®ò Ú±® »¨¿³°´»ô ½±²·¼»® ³ ã î ½¿» ¿¹¿·²ô ¾«¬ ®¿¬¸»® ¬¸¿² ï ã îô ©» ¸¿ª» ¸·¹¸´§ ½±®®»´¿¬»¼ Å ï îà ©·¬¸ ½±ª¿®·¿²½» ³¿¬®·¨ ã ï ï ï ï ò ͱô ï ã ï î î ï ï õ ï õ ï ò ̸» ·³°®±ª»³»²¬ º¿½¬±® ¾»½±³» î ï÷ã³î ã ïãøî î÷ ©¸·½¸ ¾´±© «° ¬± ï ¿ ÿ ðò ß ³»²¬·±²»¼ »¿®´·»®ô ©» ¸±© λ´¿¬»¼ ɱ®µò Ê»½¬±®ó±«¬°«¬ ®»¹®»·±² °®±¾´»³ ¿®» ¿´± ¬«¼·»¼ ·² ¬¸» ½±²¬»¨¬ ±º ³«´¬·ó¬¿µ ´»¿®²·²¹ò Ú±´´±©·²¹ ¬¸» ¬»®³·²±´±¹§ ·²¬®±¼«½»¼ ¾§ ÅçÃô ©» ½¿² ½´¿·º§ ¬¸· ´·¬»®¿¬«®» ¿ »¨°´±·¬ó ·²¹ ¬¿µ ¬®«½¬«®» ±«¬°«¬ ¬®«½¬«®» ø½±®®»´¿¬·±² ·² ²±·» ¿½®± ¬¿µ÷ ±® ¾±¬¸ò ̸» ´¿®¹» ¾±¼§ ±º ©±®µ Åïðô ïïô ïîà ±² ¬®«½¬«®»¼ °¿®·¬§ ®»¹«´¿®·¦¿¬·±² ¿²¼ ±² «·²¹ ø®»°®±¼«½·²¹÷ µ»®²»´ º±® ³«´¬·ó¬¿µ ´»¿®²·²¹ Åïíô ïìÃô º¿´´ ³±¬´§ ·²¬± ¬¸» º±®³»® ½¿¬ó »¨°´±·¬ ²±·» ½±®®»´¿¬·±²ò ο· »¬ ¿´ò Åçà «³³¿®·¦» ¬¸» ®»´»ª¿²¬ ³«´¬·¬¿µ ´·¬»®¿¬«®» ±² »¨°´±·¬·²¹ ±«¬°«¬ ¬®«½¬«®» ¿²¼ °®±ª·¼» ²±ª»´ ®»«´¬ ¾§ »¨°´±·¬·²¹ ¾±¬¸ ¬¿µ ¿²¼ ±«¬°«¬ ¬®«½¬«®» ·³«´¬¿²»ó °®±½»¼«®» »³°´±§»¼ò ̸» ¿³» ½±³³»²¬ ¿°°´·» ¬± ©±®µ ·² ¸·¹¸ó¼·³»²·±²¿´ »¬¬·²¹ ±² ´»¿®²·²¹ ²±·» ½±ª¿®·¿²½» ³¿¬®·¨ Åïëô ïêô ïéÃò É» ¸±°» ¬¸¿¬ ¬»½¸²·¯«» ¼»ª»´±°»¼ ·² ¬¸· °¿°»® °¿ª» ¬¸» ©¿§ º±® ¬«¼§·²¹ «½¸ ¶±·²¬ ®»¹«´¿®·¦¿¬·±² °®±¾´»³ ·²ª±´ª·²¹ ²±²ó½±²ª»¨ ±¾¶»½¬·ª»ò λ½»²¬ ®»«´¬ ¸¿ª» ¸±©² ¬¸¿¬ ¿´¬»®²¿¬·²¹ ³·²·³·¦¿¬·±² ´»¿¼ ¬± »¨¿½¬ °¿®¿³»¬»® ®»½±ª»®§ ·² ½»®¬¿·² ±¾»®ª¿¬·±² ³±¼»´ «½¸ ¿ ³¿¬®·¨ ½±³°´»¬·±² ÅïèÃô ¿²¼ ¼·½¬·±²¿®§ ´»¿®²·²¹ ÅïçÃò ر©»ª»®ô ³±¬ ±º ¬¸» »¨·¬·²¹ ®»«´¬ ¿®» ½±²½»®²»¼ ©·¬¸ »¨¿½¬ °¿®¿³»¬»® »¬·³¿¬·±² ¿²¼ ¬¸»·® ¬»½¸²·¯«» ¼± ²±¬ ¿°°´§ ¬± ±«® °®±¾´»³ò ײ ½±²¬®¿¬ô ©» °®±ª·¼» ¾»¬¬»® ¬¿¬·¬·½¿´ ®¿¬» ¾§ »¨°´±·¬·²¹ ¬¸» ¸·¼¼»² ²±·» »¬¬·²¹ ©¸»®» ß´¬Ó·² ´»¿¼ ¬± ¼®¿³¿¬·½ ·³°®±ª»³»²¬ ·² ¬¸» »®®±® ®¿¬»ò Ò±¬¿¬·±²ò Ê»½¬±® ¿®» ·² ¹»²»®¿´ ®»°®»»²¬»¼ «·²¹ ¾±´¼óº¿½» ´»¬¬»®ô »ò¹ò ©ò Ó¿¬®·½» ¿®» ®»°®»ó »²¬»¼ ¾§ ½¿°·¬¿´ ´»¬¬»®ô »ò¹ò Éò Ú±® ¼¿¬¿ ³¿¬®·¨ È î Î ô È î Îï ®»°®»»²¬ ¬¸» ¶ó¬¸ ®±© ±º Èò ̸®±«¹¸±«¬ ¬¸» °¿°»®ô ã Û ÅÈ Èà · ¬¸» ½±ª¿®·¿²½» ±º ¬¸» ¼¿¬¿ ³¿¬®·¨ ¿²¼ ¼»²±¬» ¬¸» ½±ª¿®·¿²½» ±º ¬¸» ²±·» ³¿¬®·¨ò ¼»²±¬» ¬¸» ¶ó´¿®¹»¬ »·¹»²ª¿´«» ±º î Î ò ̸¿¬ ·ô ³¿¨ ï î ³·² ¿®» ¬¸» »·¹»²ª¿´«» ±º ò ˲·ª»®¿´ ½±²¬¿²¬ ¼»²±¬»¼ ¾§ 8ÝŒ ½¿² ¬¿µ» ¼·ºº»®»²¬ ª¿´«» ·² ¼·ºº»®»²¬ ¬»°ò µßµî ã ³¿¨« µ«µîãï µß«µî ¼»²±¬» ¬¸» °»½¬®¿´ ²±®³ ±º ßô ©¸·´» µßµ ¼»²±¬» ¬¸» Ú®±¾»²·« ²±®³ ±º ßò Ú±´´±©·²¹ Ó¿¬´¿¾ ²±¬¿¬·±²ô ¼·¿¹øß÷ ®»°®»»²¬ ¬¸» ª»½¬±® ±º ¼·¿¹±²¿´ »²¬®·» ±º ßò î ̸» б±´»¼ Ó±¼»´ ¿²¼ ¬¿µ ø¸»²½» ¬¸» ²¿³» 8°±±´»¼Œ ÅéÃ÷ò ׬ ³¿§ »»³ ¬¸¿¬ ¬¸» ³±¼»´ · ª»®§ ®»¬®·½¬·ª» ½±³°¿®»¼ ¾±¬¸ ÓÎ ¿²¼ ÍËÎ ³±¼»´ ½¿² ¾» ¬¸±«¹¸¬ ±º ¿ °»½·¿´ ½¿» ±º ¬¸» °±±´»¼ ³±¼»´ò Ó±®»±ª»®ô ¬¸» °±±´»¼ ³±¼»´ · ·² ·¬»´º ·²¬»®»¬·²¹ º±® »ª»®¿´ ¿°°´·½¿¬·±²ô «½¸ ¿ ¯«»®§ó¼±½«³»²¬ ®¿²µ·²¹ò Ú±® »¨¿³°´»ô ¬¸» ®¿²µ·²¹ ³»¬¸±¼ ±º Åîðà · »¯«·ª¿´»²¬ ¬± ÑÔÍ »¬·³¿¬·±² «²¼»® ¬¸» °±±´»¼ ³±¼»´ò Ô»¬ Ü ã ºøÈïå §ï÷å æ æ æ å øÈ å § ÷¹ ©¸»®» ¬¸» ·ó¬¸ ¼¿¬¿ °±·²¬ È î Î ô ¿²¼ ·¬ ±«¬°«¬ § î Î ò ³ ¼»²±¬» ¬¸» ²«³¾»® ±º 8¬¿µŒ ¿²¼ ¼ · ¬¸» 8¼¿¬¿Œ ¼·³»²·±²¿´·¬§ò Ù·ª»² Üô ¬¸» ¹±¿´ · ¬± ´»¿®² ©»·¹¸¬ © î Î ò¬ò È© § º±® ¿ ²±ª»´ ¼¿¬¿ °±·²¬ È ¿²¼ ¬¸» ¬¿®¹»¬ ±«¬°«¬ §ò É» ¿«³» ¬¸¿¬ ¬¸» ¼¿¬¿ · ¹»²»®¿¬»¼ ¿½½±®¼·²¹ ¬± ¬¸» º±´´±©·²¹ ³±¼»´æ § ã È © õ å ï · ²å øï÷ ©¸»®» © î Î · ¬¸» ±°¬·³¿´ °¿®¿³»¬»® ª»½¬±® ©» ©·¸ ¬± ´»¿®²ô ¼¿¬¿ °±·²¬ È å ï · ² ¿²¼ ¬¸» ²±·» ª»½¬±® øðå ÷ ¿®» ¿³°´»¼ ·²¼»°»²¼»²¬ ±º È ùò ß ¬®¿·¹¸¬º±®©¿®¼ ¿°°®±¿½¸ ¬± »¬·³¿¬·²¹ © · ¬± ·¹²±®» ½±®®»´¿¬·±² ·² ¬¸» ²±·» ª»½¬±® ¿²¼ ¬®»¿¬ ¬¸» °®±¾´»³ ¿ ¿ ´¿®¹» ®»¹®»·±² °®±¾´»³ ©·¬¸ ³ ² »¨¿³°´»ò ̸¿¬ ·ô °»®º±®³ ¬¸» Ñ®¼·²¿®§ Ô»¿¬ ͯ«¿®» øÑÔÍ÷ °®±½»¼«®»æ © ã ¿®¹ ³·² © ï ² ãï µ§ È ©µî îæ øî÷ ׬ · »¿§ ¬± »» ¬¸¿¬ ¬¸» ¿¾±ª» ±´«¬·±² · 8½±²·¬»²¬Œò ̸¿¬ ·ô º±® ² ÿ ïô ©» ¸¿ª» Û Èŵȩ È© µî îà ÿ ðò ر©»ª»®ô ·²¬«·¬·ª»´§ô ¾§ «·²¹ ¬¸» ²±·» ½±®®»´¿¬·±²ô ±²» ¸±«´¼ ¾» ¿¾´» ¬± ±¾¬¿·² ²ò í ß´¹±®·¬¸³ ï ß´¬Ó·²óб±´»¼æ ß´¬»®²¿¬·²¹ Ó·²·³·¦¿¬·±² º±® ¬¸» б±´»¼ Ó±¼»´ λ¯«·®»æ Ü ã ºøÈïå §ï÷ æ æ æ øÈî å §î ÷¹ô Ò«³¾»® ±º ·¬»®¿¬·±²æ Ì ïæ Î¿²¼±³´§ °¿®¬·¬·±² Ü ã ºÜð å Ü© ð å Üï å Ü© ï å æ æ æ å Ü å Ü©¹ô ©¸»®» ¶Ü©¶ ã ¶Ü ¶ ã ²ô è¬ îæ ×²·¬·¿´·¦» ©ð ã ð íæ º±® ¬ ã ðå æ æ æ å Ì ï ¼± ìæ Ý±ª¿®·¿²½» Û¬·³¿¬·±²æ ã ï îܬ ø§ È © ÷ø§ È © ÷ ëæ Ô»¿¬ó¯«¿®» ͱ´«¬·±²æ © õï ã ¿®¹ ³·²© ï îÜ© ¬ µ ï î ø§ È ©÷µî î êæ »²¼ º±® éæ Ñ«¬°«¬æ © ×¼»¿´´§ô ·º ©¿ µ²±©²ô ©» ©±«´¼ ´·µ» ¬± »¬·³¿¬» © ¾§ ¼»½±®®»´¿¬·²¹ ¬¸» ²±·»ïò ̸¿¬ ·ô © ã ¿®¹ ³·² © ï ² ãï µ ï î ø§ È ©÷µî îæ øí÷ ر©»ª»®ô · ²±¬ µ²±©² ¿°®·±®· ¿²¼ ·² ¹»²»®¿´ ½¿² ±²´§ ¾» »¬·³¿¬»¼ ·º © · µ²±©²ò ̱ ¿ª±·¼ ¬¸· ½·®½«´¿® ®»¯«·®»³»²¬ô ©» ½¿² ¶±·²¬´§ »¬·³¿¬» ø© å ÷ ¾§ ³¿¨·³·¦·²¹ ¬¸» ¶±·²¬ ´·µ»´·¸±±¼ò ̸» ¶±·²¬ ³¿¨·³«³ ´·µ»´·¸±±¼ »¬·³¿¬·±² øÓÔÛ÷ °®±¾´»³ º±® ø©å · ¹·ª»² ¾§æ ø©å © ð ´±¹ ¶ ï ² ãï ø§ È ©÷ ïø§ È ©÷æ øì÷ ̸» °®±¾´»³ ¿¾±ª» · ²±²ó½±²ª»¨ ·² å ©÷ ¶±·²¬´§ô ¿²¼ ¸»²½» ¬¿²¼¿®¼ ½±²ª»¨ ±°¬·³·¦¿¬·±² ¬»½¸ó ²·¯«» ¼± ²±¬ ¿°°´§ ¬± ¬¸» °®±¾´»³ò ß ¬®¿·¹¸¬º±®©¿®¼ ¸»«®·¬·½ ¿°°®±¿½¸ · ¬± «» ¿´¬»®²¿¬·²¹ ³·²ó ·³·¦¿¬·±² øß´¬Ó·²÷ ©¸»®» ©» ¿´¬»®²¿¬»´§ ±´ª» º±® © ø¿²¼ ÷ ©¸·´» µ»»°·²¹ ø¿²¼ © ¬¸¿¬ô »¿½¸ ±º ¬¸» ¿¾±ª» ³»²¬·±²»¼ ·²¼·ª·¼«¿´ °®±¾´»³ ¿®» º¿·®´§ ¬®¿·¹¸¬º±®©¿®¼ ¿²¼ ½¿² ¾» ±´ª»¼ ¿¬ »¿½¸ ·¬»®¿¬·±²ô ß´¬Ó·² ²»»¼ ²±¬ ½±²ª»®¹» ¬± ¿ ¹´±¾¿´ ±°¬·³¿ ±º ¬¸» ¶±·²¬ °®±¾´»³ò Þ»´±©ô ©» ¸±© ¬¸¿¬ ¼»°·¬» ²±²ó½±²ª»¨·¬§ ±º øì÷ô ©» ½¿² ¬·´´ ¸±© ¬¸¿¬ ¬¸» ¬¸» ß´¬Ó·² °®±½»¼«®» ¸¿ ¿ ³¿¬½¸·²¹ »®®±® ¾±«²¼ ©¸»² ½±³°¿®»¼ ¬± ¬¸» ±°¬·³¿´ ÓÔÛ ±´«¬·±²ò °´» ø§å È÷ º±® »¿½¸ ±º ¬¸» ½±ª¿®·¿²½» »¬·³¿¬·±² ¿²¼ ¬¸» ´»¿¬ ¯«¿®» ¬»°ò Ю¿½¬·½¿´ §¬»³ ¼± ²±¬ °»®º±®³ «½¸ ®»ó¿³°´·²¹ô ¾«¬ º®»¸ ¿³°´» ¿¬ »ª»®§ ·¬»®¿¬·±² »²«®» ¬¸¿¬ »®®±® ¼± ²±¬ ¹»¬ ½±®ó ®»´¿¬»¼ ·² ¿¼ª»®¿®·¿´ º¿¸·±² ¿²¼ ¿´´±© « ¬± «» ¬¿²¼¿®¼ ½±²½»²¬®¿¬·±² ¾±«²¼ò Ó±®»±ª»®ô ·²½» ©» ¸±© ½±²ª»®¹»²½» ¿¬ ¿ ¹»±³»¬®·½ ®¿¬»ô ¬¸» ²«³¾»® ±º ·¬»®¿¬·±² · ²±¬ ´¿®¹» ¿²¼ ¸»²½» ¬¸» ¿³°´» ̱ °®±ª» ±«® ½±²ª»®¹»²½» ®»«´¬ô ©» ®»¯«·®» ¬¸» °®±¾¿¾·´·¬§ ¼·¬®·¾«¬·±² Ð ¬± ¾» ¿ «¾óÙ¿«·¿² ¼·¬®·¾«¬·±² ©·¬¸ ¬¸» «¾óÙ¿«·¿² ²±®³ øµÈµ î Ô»¬ È î Î ¾» ¿ ®¿²¼±³ ª¿®·¿¾´» øÎòÊò÷ ©·¬¸ ¼·¬®·¾«¬·±² Ð ò ̸»²ô ¬¸» «¾ó Ù¿«·¿² ²±®³ ±º È · ¹·ª»² ¾§æ µÈµ î ã ³¿¨ « µ«µîãï ª µªµîãï µª ï î È «µ îå ©¸»®»å ã Û È ÅÈ «« ÈÃæ Í«¾óÙ¿«·¿² ²±®³ ±º ¿ «²·ª¿®·¿¬» ª¿®·¿¾´» Ï µÏµ î ã ³¿¨ ï ï ° ÛŶ϶ Ã ï ° ò ׺ « µÈµ î ã ï É» °®»ó³«´¬·°´§ È « ¾§ ï î º±® ²±®³¿´·¦¿¬·±²ô ± ¬¸¿¬ º±® Ù¿«·¿² Èô µÈµ î ã ïò Ú±® ¾±«²¼»¼ ª¿®·¿¾´» Èô ò¬òô »¿½¸ »²¬®§ ¶È Óô ©» ¸¿ª»æ µÈµ î Ó ° ³¼ ³¿¨« µ«µîãï µ ï µîò ̸»±®»³ î øÎ»«´¬ º±® б±´»¼ Ó±¼»´÷ò Ô»¬ È å ï · ² ©·¬¸ «¾óÙ¿«·¿² ²±®³ µÈ µ î ä ï ¿²¼ øðå ÷ ¿®» ·²¼»°»²¼»²¬ ±º È ùò Ô»¬ © î Î ïÚ±® ·³°´·½·¬§ ±º »¨°±·¬·±²ô ¬¸®±«¹¸±«¬ ¬¸» ®»³¿·²·²¹ °¿°»®ô ©» ¿«³» ¬¸¿¬ · ·²ª»®¬·¾´»ò Ò±²ó ·²ª»®¬·¾´» · ²±¬ ·²ª»®¬·¾´» ì ² Ý ø³ õ ¼÷µÈµ îò ̸»²ô ¬¸» ±«¬°«¬ © ï ïð ÷æ Û ÐÈ µÈø© © ÷µî î ݼ ´±¹ ² ² ï ³·² õ ³¿¨ ³·² î å ©¸»®» ³·² ã ³·² ÷ô ³¿¨ ã ³¿¨ ÷ô ¿²¼ ã Û ÐÈ ï î È ïÈ ï î Ãò ß´±ô ã Û È ÅÈ Èà · ¬¸» ½±ª¿®·¿²½» ±º ¬¸» ®»¹®»±®ò λ³¿®µæ Ë·²¹ ̸»±®»³ ïëô ©» ¿´± ¸¿ª» ¬¸» º±´´±©·²¹ ¾±«²¼ º±® ¬¸» ÑÔÍ ±´«¬·±²æ Û ÐÈ µÈø© © ÷µî î Ý ¼ ´±¹ ² ² µîæ ̸» ¿¾±ª» ¾±«²¼ º±® ÑÔÍ ½¿² ¾» ¸±©² ¬± ¾» ¬·¹¸¬ ¿ ©»´´ ø«° ¬± ´±¹ ² º¿½¬±®÷ ¾§ »´»½¬·²¹ »¿½¸ È ã «³¿¨å «³¿¨ · ¬¸» »·¹»²ª»½¬±® ±º ½±®®»°±²¼·²¹ ¬± ³¿¨ ÷ò Ò±©ô ·¬ · »¿§ ¬± »» ¬¸¿¬æ ï ³·² µî ø»» Ý´¿·³ ïé÷ò Ø»²½»ô ±«® ¾±«²¼ º±® ß´¬Ó·² ø¿ ©»´´ ¿ ÓÔÛ÷ · ¬·¹¸¬»® ¬¸¿² ¬¸¿¬ ±º ÑÔÍò Í«¾ó»½¬·±² îòï ¿²¼ îòî ¼»³±²¬®¿¬» ¹¿·² ±ª»® ÑÔÍ ·² »ª»®¿´ ¬¿²¼¿®¼ »¬¬·²¹ò Ñ«® °®±±º ±º ¬¸» ¿¾±ª» ¬¸»±®»³ ½®·¬·½¿´´§ «» ¬¸» º±´´±©·²¹ ´»³³¿ ©¸·½¸ ¸±© ¬¸¿¬ ¿ °¿®¬·½«´¿® °±¬»²¬·¿´ º«²½¬·±² ¼®±° ø«° ¬± ÓÔÛ »®®±®÷ ¹»±³»¬®·½¿´´§ ¿¬ »¿½¸ ¬»° ±º ¬¸» ß´¬Ó·² °®±½»¼«®»ò Ô»³³¿ íò ß«³» ¬¸» ²±¬¿¬·±² ±º ̸»±®»³ îò Ô»¬ © õï ¾» ¬¸» ø¬ õ ï÷ó¬¸ ·¬»®¿¬» ±º ß´¹±®·¬¸³ ïò ̸»²ô ¬¸» º±´´±©·²¹ ¸±´¼ ©ò°ò ï ïã²ïðæ Û ÐÈ µ ï î Èø© õï © ÷µî î îÝ ¼ ´±¹ ² ² õ ï î Û ÐÈ µ ï î Èø© © ÷µî î æ Í»» ß°°»²¼·¨ Ý º±® ¼»¬¿·´»¼ °®±±º ±º ¾±¬¸ ±º ¬¸» ®»«´¬ ¹·ª»² ¿¾±ª»ò îòï Ù¿«·¿² Èæ ײ¼»°»²¼»²¬ α© È · ¿³°´»¼ ·ò·ò¼ò º®±³ ¿ Ù¿«·¿² ¼·¬®·¾«¬·±²ò ̸¿¬ ·ô È øðå å èï · ²å ï ¶ ³å ©¸»®» ð î Î · ¿ ½±ª¿®·¿²½» ³¿¬®·¨ ¿²¼ ã Û È ÅÈ Èà 㠳 ò Ô»¬ ã ãï ÷« « ¾» ¬¸» »·¹»²ª¿´«» ¼»½±³°±·¬·±² ±º ò ̸»²ô ã Û ÐÈ ï î È ïÈ ï î à ã Û È ï î È « « È ï î à ÷ ã ï÷ ³ × æ É» ²±© ½±³¾·²» ¬¸» ¿¾±ª» ¹·ª»² ±¾»®ª¿¬·±² ©·¬¸ ̸»±®»³ î ¬± ±¾¬¿·² ±«® »®®±® ¾±«²¼ º±® ß´¬Ó·² °®±½»¼«®»ò Ë·²¹ ¿ ´·¹¸¬´§ ¬®±²¹»® ª»®·±² ±º ̸»±®»³ ïëô ©» ½¿² ¿´± ±¾¬¿·² ¬¸» »®®±® ¾±«²¼ º±® ¬¸» ÑÔÍ øÑ®¼·²¿®§ Ô»¿¬ ͯ«¿®»÷ ±´«¬·±² ¿ ©»´´ ¬¸» ÓÔÛ ±´«¬·±²ò ݱ®±´´¿®§ ì øÎ»«´¬ º±® б±´»¼ Ó±¼»´ô Ù¿«·¿² Ü¿¬¿ô ײ¼»°»²¼»²¬ α©÷ò Ô»¬ È ¾» ¿³°´»¼ ò¬ò »¿½¸ ®±© È øðå ¿²¼ ðò ß´±ô ´»¬ § ã È © õ ô ©¸»®» øðå ÷ô ðò Ô»¬ ² Ýø³ õ ¼÷ ´±¹ø³ õ ¼÷ò ̸»²ô ¬¸» ÑÔÍ ±´«¬·±² øî÷ ¿²¼ ¬¸» ÓÔÛ ±´«¬·±² øí÷ ¸¿ ¬¸» º±´´±©·²¹ »®®±® ¾±«²¼ ø©ò°ò ï ïã²ïð÷æ Û ÅµÈø© © ÷µî îà ݼ ´±¹ ² ² ÷ ³ å Û ÅµÈø© © ÷µî îà ݼ ´±¹ ² ² ³ ï÷æ Ó±®»±ª»®ô ¬¸» ±«¬°«¬ © øÌ ã ´±¹ ï ï Ìã²ïð÷æ Û®®±® ã Û ÐÈ ÅµÈø© © ÷µî îà èݼ ´±¹ ² ² ³ ï÷ õ Ô±©»® Þ±«²¼ º±® ÑÔÍ ¿²¼ ÓÔÛæ É» ²±© ¸±© ¬¸¿¬ ¬¸» »®®±® ¾±«²¼ º±® ¾±¬¸ ¬¸» ÑÔÍ ¿ ©»´´ ¿ ¬¸» ÓÔÛ ±´«¬·±² ¬¿¬»¼ ¿¾±ª» ¿®» ·² º¿½¬ ¬·¹¸¬ «° ¬± ´±¹óº¿½¬±®ò Ô»³³¿ ëò Ô»¬ ¬¸» ¿«³°¬·±² ±º ݱ®±´´¿®§ ì ¸±´¼ò ̸»²ô ©» ¸¿ª» ø©ò°ò ï ïã²ï𠻨°ø ¼÷÷æ Û ÅµÈø© © ÷µî îà ݼ ² ÷ ³ å Û ÅµÈø© © ÷µî îà ݼ ² ³ ï÷å ©¸»®» Ý â ð · ¿ «²·ª»®¿´ ½±²¬¿²¬ò ë λ³¿®µæ ß ³»²¬·±²»¼ ·² ¬¸» ·²¬®±¼«½¬·±²ô ï÷ ÷ ¿²¼ ¬¸» ¹¿° ¾»½±³» ´¿®¹»® ¿ ³±ª» ¿©¿§ º®±³ ½ ×ò Ø»²½»ô ·² ¬¸» ´·¹¸¬ ±º ¬¸» ¿¾±ª» ¬©± ´±©»®ó¾±«²¼ ¿²¼ «°°»®ó¾±«²¼ ®»«´¬ô ¸·¹¸´§ ½±®®»´¿¬»¼ ²±·» ª»½¬±®ò ̸· ½´¿·³ · ¿´± ¾±®» ±«¬ º®±³ ±«® ·³«´¿¬·±² ®»«´¬ øÚ·¹«®» ì÷ò îòî Ù¿«·¿² Èæ Ü»°»²¼»²¬ α© É» ²±© ¹»²»®¿´·¦» ¬¸» ¿¾±ª» ¹·ª»² °»½·¿´ ½¿» ¾§ ®»³±ª·²¹ ¬¸» ®±©ó©·» ·²¼»°»²¼»²½» ¿«³°ó ¬·±²ò ̸¿¬ ·ô È ï î Æ ï î ô ©¸»®» Æ øðå ï÷ è ·å ¶ ¿²¼ î Î ô î Î ¿®» ¬¸» ®±© ¿²¼ ¬¸» ½±´«³² ½±®®»´¿¬·±² ³¿¬®·½»ô ®»°»½¬·ª»´§ò ׬ · »¿§ ¬± »» ¬¸¿¬ ø»» Ý´¿·³ ïè÷ô ã Û ÐÈ ï î È ïÈ ï î à ã ï÷ ÷ × å ©¸»®» ÷ æ Ë·²¹ ̸»±®»³ î ©·¬¸ ̸»±®»³ ïë ¿²¼ øíî÷ ø©·¬¸ ½»®¬¿·² ßô Þ÷ ©» ±¾¬¿·² ¬¸» º±´´±©·²¹ ½±®±´´¿®§ò ݱ®±´´¿®§ ê øÎ»«´¬ º±® б±´»¼ Ó±¼»´ô Ù¿«·¿² Ü¿¬¿ô Ü»°»²¼»²¬ α©÷ò Ô»¬ È ¿¾±ª»ò Ô»¬ ² Ýø³ õ ¼÷ ´±¹ø³ õ ¼÷ò ̸»² ¬¸» º±´´±©·²¹ ¸±´¼ ø©ò°ò ï Ìã²ïð÷æ Û ÐÈ ÅµÈø© © ÷µî îà èݼ ´±¹ ² ² ³ ï÷ õ ©¸»®» © · ¬¸» ±«¬°«¬ ±º ß´¹±®·¬¸³ ï ©·¬¸ Ì ã ´±¹ ïò Í·³·´¿®´§ô ¾±«²¼ º±® ÑÔÍ · ¹·ª»² ¾§æ Û ÐÈ ÅµÈø© © ÷µî îà ´±¹ Î ÷ Î÷î ò Ø»®» ¿´± °´¿§ ¿ ½®·¬·½¿´ ®±´» ¸»®»ò ײ º¿½¬ô ·º · ²»¿®´§ ±®¬¸±¹±²¿´ ¬± ïô ¬¸»² ¬¸» ¹¿·² ±ª»® ÑÔÍ · ²»¹´·¹·¾´»ò ̱ «²¼»®¬¿²¼ ¬¸· ¾»¬¬»®ô ½±²·¼»® ¬¸» º±´´±©·²¹ î󬿵 »¨¿³°´»æ §ï ã ¸¨ å © · õ å §î ã ¸¨ å © · õ æ Ò±¬» ¬¸¿¬ ¬¸» ²±·» · °»®º»½¬´§ ½±®®»´¿¬»¼ ¸»®»ò ر©»ª»®ô ¿ ®±© È ã ¨ ¿®» ¿´± ½±³°´»¬»´§ ½±®®»´¿¬»¼ò ͱô ¬¸» ¬©± »¯«¿¬·±² ¿®» ¶«¬ ¼«°´·½¿¬» ±º »¿½¸ ±¬¸»® ¿²¼ ¸»²½»ô ß´¬Ó·² ½¿²²±¬ ±¾¬¿·² ¿²§ ¹¿·² ±ª»® ÑÔÍ ø¿ °®»¼·½¬»¼ ¾§ ±«® ¾±«²¼ ¿ ©»´´÷ò í Í»»³·²¹´§ ˲®»´¿¬»¼ λ¹®»·±² Í»»³·²¹´§ó«²®»´¿¬»¼ ®»¹®»·±² øÍËÎ÷ ³±¼»´ Åîïô îîà · ¿ ¹»²»®¿´·¦¿¬·±² ±º ¬¸» ¾¿·½ ´·²»¿® ®»ó ¹®»·±² ³±¼»´ ¬± ¸¿²¼´» ª»½¬±® ª¿´«»¼ ±«¬°«¬ ¿²¼ ¸¿ ¿°°´·½¿¬·±² ·² »ª»®¿´ ¼±³¿·² ·²½´«¼·²¹ ³«´¬·ó¬¿µ ´»¿®²·²¹ô »½±²±³·½ô ¹»²±³·½ »¬½ò Þ»´±© ©» °®»»²¬ ¬¸» ÍËÎ ³±¼»´ ¿²¼ ±«® ³¿·² ®»«´¬ Ô»¬ È î Î å ï · ² Ð ò Ô»¬ É î Î ¾» ¿ È · ¹·ª»² ¾§æ § ã È É õ å øë÷ ©¸»®» È É ã ¼·¿¹øÈ É ÷ ¿²¼ øðå ÷ · ¬¸» ²±·» ª»½¬±® ©·¬¸ ½±ª¿®·¿²½» ò É ã ¿®¹ ³·² ï ² ãï µ§ È Éµî îå É ã ¿®¹ ³·² ï ² ãï ï î ø§ È É÷ î î æ øê÷ É ¾§ »¨°´±·¬·²¹ ²±·» ½±®®»´¿¬·±²ò ß · ²±¬ ¿ª¿·´¿¾´» ¿°®·±®·ô ¾±¬¸ ¿²¼ É ¿®» »¬·³¿¬»¼ ¾§ ±´ª·²¹ ¬¸» º±´´±©·²¹ ÓÔÛ °®±¾´»³æ øÉå ´±¹ ¶ ï ² ãï ï î ø§ È É÷ î î øé÷ Ø»®» ¿¹¿·²ô ¬¸» ÓÔÛ °®±¾´»³ · ²±²ó½±²ª»¨ ¿²¼ ¸»²½» ¬¿²¼¿®¼ ¿²¿´§· ¼±» ²±¬ °®±ª·¼» ¬®±²¹ ½±²ª»®¹»²½» ¹«¿®¿²¬»»ò ͬ·´´ô ¿´¬»®²¿¬·²¹ ³·²·³·¦¿¬·±² ø±º ²»¹¿¬·ª» ´±¹ó´·µ»´·¸±±¼÷ º±® Éå ´»¿¼ ê ß´¹±®·¬¸³ î ß´¬Ó·²óÍËÎæ ß´¬»®²¿¬·²¹ Ó·²·³·¦¿¬·±² º±® ÍËΠλ¯«·®»æ Ü ã ºøÈïå §ï÷ æ æ æ øÈî å §î ÷¹ô Ò«³¾»® ±º ·¬»®¿¬·±²æ Ì ïæ Î¿²¼±³´§ °¿®¬·¬·±² Ü ã ºÜð å Üð å Üï å Üï å æ æ æ å Ü å Ü ¹ô ©¸»®» ¶Ü©¶ ã ¶Ü ¶ ã ²ô è¬ îæ ×²·¬·¿´·¦» Éð ã ð íæ º±® ¬ ã ðå æ æ æ å Ì ï ¼± ìæ Ý±ª¿®·¿²½» Û¬·³¿¬·±²æ ã ï îܬ ø§ È É÷ø§ È É÷ ëæ Ô»¿¬ó¯«¿®» ͱ´«¬·±²æ É õï ã ¿®¹ ³·² ï îÜÉ ¬ µ ï î ø§ È É÷µî î êæ »²¼ º±® éæ Ñ«¬°«¬æ É ¬± ¿½½«®¿¬» ¿²©»® ·² °®¿½¬·½»ò Þ»´±©ô ©» ¿²¿´§¦» ¬¸» ß´¬Ó·² °®±½»¼«®» ø»» ß´¹±®·¬¸³ î÷ ¿²¼ ±º ¬¸» ÓÔÛ ±´«¬·±²ò Í·³·´¿® ¬± ¬¸» °®»ª·±« »½¬·±²ô ©» ³±¼·º§ ¬¸» ¬¿²¼¿®¼ ß´¬Ó·² °®±½»¼«®» ¬± ·²½´«¼» º®»¸ ¿³°´» ¿¬ »¿½¸ ¬»° ±º ¬¸» ¿´¹±®·¬¸³ò ̸»±®»³ é øÎ»«´¬ º±® ÍËÎ Ó±¼»´÷ò Ô»¬ È å ï · ²ô ©¸»®» µÈµ î · ¬¸» «¾óÙ¿«·¿² ²±®³ ±º »¿½¸ È ò Ô»¬ øðå ÷ô ðô ¿²¼ É î Î É ¾» ¬¸» Ìó¬¸ ·¬»®¿¬» ±º ß´¹±®·¬¸³ îò ß´±ô ´»¬ ² Ý ³¼µÈµ îô ©¸»®» Ý â ð · ¿ ¹´±¾¿´ ½±²¬¿²¬ò ̸»²ô ¬¸» º±´´±©·²¹ ¸±´¼ ø©ò°ò ï Ìã²ïð÷æ Û ÐÈ µ ï î øÈ É È É ÷µî î ìÝî¼ ´±¹ø²÷ ² ³ õ µ µî î î æ Ó±®»±ª»®ô ·º Ð · «½¸ ¬¸¿¬ »¿½¸ ®±© È · ¿³°´»¼ ·²¼»°»²¼»²¬´§ ¿²¼ ¸¿ ¦»®± ³»¿²ô ·ò»òô È á È å è°å ¯ ¿²¼ Û ÈÅÈà ã ðô ¬¸»² ¬¸» º±´´±©·²¹ ¸±´¼ ø©ò°ò ï Ìã²ïð÷æ ãï ï÷ Û ¶ ¶ È È å É É î ìÝî¼ ´±¹ø²÷ ² ³ õ µ µî î î æ λ³¿®µæ ׬ · »¿§ ¬± ±¾¬¿·² »®®±® ¾±«²¼ º±® ÑÔÍ ·² ¬¸· ½¿» ¿ ·¬ ±´ª» »¿½¸ »¯«¿¬·±² ·²¼»°»²ó ¼»²¬´§ò ײ °¿®¬·½«´¿®ô ¬¿²¼¿®¼ ·²¹´»ó±«¬°«¬ ´·²»¿® ®»¹®»·±² ¿²¿´§· Åîíà ¹·ª»æ Û Å ï ÷ ¸É É å È ·îà ݼ ² ³æ øè÷ ̸» ©»·¹¸¬ º±® »¿½¸ ·²¼·ª·¼«¿´ »®®±® ¬»®³ É É å È î ·² ¬¸» ß´¬Ó·² »®®±® ¾±«²¼ · ï÷ ©¸·´» ·¬ · ï ÷¶¶ º±® ÑÔÍò Ë·²¹ Ý´¿·³ îðô ï÷ ï ÷¶¶ ò Ø»²½»ô ¬¸» »®®±® ¬»®³ ±º ß´¬Ó·² »¨¿³°´» ¬± ¼»³±²¬®¿¬» °®»¼·½¬·±² ¿½½«®¿½§ ±º ß´¬Ó·² ø¿²¼ ÓÔÛ÷ ±´«¬·±² ªò ÑÔÍ ±´«¬·±²ò ×´´«¬®¿¬·ª» Û¨¿³°´»æ ݱ²·¼»® ¿ ¬©±óª¿´«»¼ ±«¬°«¬ ÍËÎ °®±¾´»³ô ©¸»®» Èï øðå × ÷ ¿²¼ Èî øðå × ÷ ¿®» ¿³°´»¼ ·²¼»°»²¼»²¬´§ ¿²¼ ¬¸» ²±·» ½±ª¿®·¿²½» ¾§æ ã ï ï ï ï å ï ã ï î ï øï ÷ øï ÷ ï å ©¸»®» ð ïæ É» ¿³°´» ² î¼ °±·²¬ º®±³ ¬¸· ³±¼»´ò ̸¿¬ ·ô § ã È É õ å ï · ²ò Ø»²½»ô ¬¸» »¬·³¿¬·±² »®®±® ±º ß´¬Ó·² ¿²¼ ÑÔÍ ¿®» ¹·ª»² ¾§æ µÉ É µî ìݼ ´±¹ ² ² µÉ É µî îݼ ² æ Ý´»¿®´§ô ¬¸» »®®±® ±º ß´¬Ó·² ¼»½®»¿» ¬± ð ¿ ÿ ð ø¿²¼ ² ݼ ´±¹ ¼÷ô ·ò»òô ¿ ²±·» · ¹»¬¬·²¹ ³±®» ½±®®»´¿¬»¼ò ײ ½±²¬®¿¬ô ¬¸» »®®±® ¾±«²¼ ±º ÑÔÍ · ·²¼»°»²¼»²¬ ±º ¿²¼ ®»³¿·² ¿ ´¿®¹» ½±²¬¿²¬ »ª»² º±® ã ð ¿²¼ ² ã Ñø¼÷ò Ó«´¬·ª¿®·¿¬» λ¹®»·±² Ó±¼»´ ³±¼»´ ø¿®·» ·² ³¿²§ ¿°°´·½¿¬·±² ·²½´«¼·²¹ ³«´¬·¬¿µ ´»¿®²·²¹ ©·¬¸ ¸¿®»¼ ®»¹®»±®÷ô ©¸»®» »¿½¸ ±«¬°«¬ § î Î · ³±¼»´»¼ ¿æ § ã É ¨ õ å øç÷ é î ì ê è ïð ¨ ïð óí ïð óí ïð óî ïð óï ïð ð » Ð±±´»¼ Ó±¼»´ ø³ãîô ¼ãïðô ²ãëð÷ ÑÔÍ ÓÔÛ ß´¬Ó·² î ì ê è ïð ïð óî ïð óï ïð ð ³ Ð±±´»¼ Ó±¼»´ ø»ãòððëô ¼ãîðô ²ãïðð÷ ÑÔÍ ÓÔÛ ß´¬Ó·² ìð êð èð ïðð ïð óî ïð óï ïð ð ² Ð±±´»¼ Ó±¼»´ ø»ãòððëô ¼ãîðô ³ãë÷ ÑÔÍ ÓÔÛ ß´¬Ó·² î ì ê è ïð ¨ ïð óí ïð óî ïð óï ïð ð » ÍËÎ Ó±¼»´ ø³ãîô ¼ãïðô ²ãëð÷ ÑÔÍ ÓÔÛ ß´¬Ó·² ø¿÷ ø¾÷ ø½÷ ø¼÷ Ú·¹«®» ïæ ø¿÷ô ø¾÷ô ø½÷æ б±´»¼ Ó±¼»´ò Û¬·³¿¬·±² »®®±® µ© © µî º±® ¼·ºº»®»²¬ ¿´¹±®·¬¸³ øÓÔÛô ÑÔÍô ß´¬Ó·²÷ ©·¬¸ ª¿®§·²¹ ²±·» ¼»°»²¼»²½·» ø ÷ô ³ô ²ô ø¼÷æ ÍËÎ Ó±¼»´ò ݱ³°¿®·±² ±º »¬·³¿ó ¬·±² »®®±® µÉ É µî ©·¬¸ ·²½®»¿·²¹ ò Ô±© ·³°´·» ¾¿¼´§ ½±²¼·¬·±²»¼ ²±·» ½±ª¿®·¿²½»ô ·ò»òô ï÷ ³îò ײ ø¿÷ô ø¾÷ô ÓÔÛ ¿²¼ ß´¬Ó·² ¸¿ª» ¿´³±¬ ±ª»®´¿°°·²¹ »®®±® ½«®ª»ò ©¸»®» ¨ î Î øðå ÷ · ¬¸» ²±·» ª»½¬±®ò É î Î øë÷ ©¸»®» »¿½¸ ®±© ±º È · ¹·ª»² ¾§ ¨ ò ̸¿¬ ·ô È ã Ũ ¶ ¨ ¶ æ æ æ ¶ ¨ Ã æ Ø±©»ª»®ô º±® ¬¸» ÓÎ ³±¼»´ô ·¬ · ©»´´ µ²±©² ¬¸¿¬ ¬¸» ±°¬·³¿´ ±´«¬·±² ¬± ÓÔÛ °®±¾´»³ · ¿³» ¿ ¬¸» ÑÔÍ ±´«¬·±² Åêô ݸ¿°¬»® éÃò Ò¿¬«®¿´´§ô ±«® ß´¬Ó·²ñÓÔÛ »®®±® ¾±«²¼ ¿´± ¼± ²±¬ °®±ª·¼» ¿² ¿¼ª¿²¬¿¹» ±ª»® ÑÔÍ ¾±«²¼ò Ú±® ¹»²»®¿´ É ·² ¬¸» ÓÎ ³±¼»´ô ¬¸» ÓÔÛ ±´«¬·±² · ·²¼»°»²¼»²¬ ±º ò Þ«¬ô ¾§ ·³°±·²¹ ½»®¬¿·² °»½·¿´ ¬®«½¬«®» ±² É ±´«¬·±²ò Ú±® »¨¿³°´»ô ¬¸» б±´»¼ ¿²¼ ¬¸» ÍËÎ ³±¼»´ ½¿² ¾» °±»¼ ¿ °»½·¿´ ½¿» ±º ¬¸» ÓÎ ³±¼»´ ¾«¬ ©·¬¸ °»½·¿´´§ ¬®«½¬«®»¼ É ò Í·³·´¿®´§ô ±¬¸»® ¬®«½¬«®» ´·µ» ®»¼«½»¼ ®¿²µ ®»¹®»·±² Åîìô îëà ¿´± ¿´´±© »¨°´±·¬¿¬·±² ±º ¬¸» ²±·» ½±®®»´¿¬·±²ò É» ´»¿ª» º«®¬¸»® ·²ª»¬·¹¿¬·±² ±º ±¬¸»® ¬§°» ±º ¬®«½¬«®¿´ ¿«³°¬·±² ±² É ¿ ¿ ¬±°·½ ±º º«¬«®» ®»»¿®½¸ò ì Û¨°»®·³»²¬ ײ ¬¸· »½¬·±²ô ©» °®»»²¬ ®»«´¬ º®±³ ·³«´¿¬·±² ©¸·½¸ ©»®» ½±²¼«½¬»¼ ©·¬¸ ¬¸» º±´´±©·²¹ ¬©±ó ¼»²½·»ô ¾÷ ¬«¼§ ½¿´·²¹ ¾»¸¿ª·±® ±º ¬¸» ¬¸®»» »¬·³¿¬±® øÑÔÍô ÓÔÛô ß´¬Ó·²÷ ©ò®ò¬ò ³å ²ò ·² ¬¸» ÓÔÛ ±°¬·³·¦¿¬·±² øøì÷ º±® б±´»¼ô øé÷ º±® ÍËÎ÷ô ©¸»®» · ¬¸» ¬®«» ²±·» ½±ª¿®·¿²½» ³¿¬®·¨ò ײ ¬¸· ½¿»ô ¬¸» »¬·³¿¬±® ®»¼«½» ¬± ¿ ´»¿¬ ¯«¿®» °®±¾´»³ò É» ·³°´»³»²¬»¼ ¿´´ ¬¸» ¬¸®»» »¬·³¿¬±® ·² Ó¿¬´¿¾ ¿²¼ °®±ª·¼» ®»«´¬ ¿ª»®¿¹»¼ ±ª»® îð ®«²ò É» ®«² ß´¬Ó·² º±® ¿¬ ³±¬ ëð ·¬»®¿¬·±²ò б±´»¼ Ó±¼»´ øÈ å § ÷ «·²¹ ¬¸» б±´»¼ Ó±¼»´ øÍ»½¬·±² î÷ò É» ¹»²»®¿¬»¼ È ù º®±³ °¸»®·½¿´ ³«´¬·óª¿®·¿¬» Ù¿«·¿² ¿²¼ »´»½¬»¼ © ¬± ¾» ³ ã î ¿²¼ »¬ ã ï ï ï ï ò Ë·²¹ ̸»±®»³ îô ß´¬Ó·² ¿ ©»´´ ¿ ÓÔÛ »¬·³¿¬±® ¸±«´¼ ¸¿ª» »®®±® µ© © µî î ø î÷ ©¸·´» º±® ÑÔÍ ·¬ · µ© © µî î ò Ú·¹«®» ì ø¿÷ ¸±© ¬¸¿¬ ±«® ·³«´¿¬·±² ¿´± »¨¸·¾·¬ »¨¿½¬´§ ¬¸» ¿³» ¬®»²¼ ¿ °®»¼·½¬»¼ ¾§ ±«® »®®±® ¾±«²¼ò Ó±®»±ª»®ô »®®±® ±º ¾±¬¸ ÓÔÛ ¿²¼ ß´¬Ó·² ¿®» »¨¿½¬´§ ¬¸» ¿³»ô ·²¼·½¿¬·²¹ ¬¸¿¬ ß´¬Ó·² ·²¼»»¼ ½±²ª»®¹»¼ ¬± ¬¸» ÓÔÛ »¬·³¿¬»ò Ò»¨¬ô ©» »¬ ¿æ ã ï ï ð ï ï ð ð ð × î î å øïð÷ ©·¬¸ ã ðæððë ¿²¼ ³»¿«®» ®»½±ª»®§ »®®±® øµ© © µî÷ ©¸·´» ª¿®§·²¹ ³ ¿²¼ ²ò Ò±¬» ¬¸¿¬ º±® ß´¬Ó·² ¿²¼ ÓÔÛô ¬¸» »®®±® ¾±«²¼ º±® «½¸ · µ© © µî î ø î÷ ø î÷ø î÷õï ¿²¼ ¸»²½» ³ò Þ«¬ º±® ÑÔÍ ¬¸» »®®±® ¹±» ¼±©² ©·¬¸ ³ ¿ µ© © µî î ï ©¸·½¸ ½¿² ¾» ±¾»®ª»¼ ·² ¬¸» Ú·¹«®» ìø¾÷ ¿ ©»´´ò Ú·²¿´´§ô Ú·¹«®» ìø½÷ ½´»¿®´§ ·²¼·½¿¬» ¬¸¿¬ µ© © µ ã Ñø ï ° ÷ º±® ¿´´ ¬¸» ¬¸®»» ³»¬¸±¼ô ¸»²½» ³¿¬½¸·²¹ ±«® ¬¸»±®»¬·½¿´ ¾±«²¼ò ÍËÎ Ó±¼»´æ Ø»®» ©» ¹»²»®¿¬»¼ ¼¿¬¿ øÈ å § ÷ «·²¹ ¬¸» ÍËÎ ³±¼»´ øÍ»½¬·±² í÷ ¾«¬ ©·¬¸ È ¿³°´»¼ º®±³ °¸»®·½¿´ Ù¿«·¿²ò É ©¿ »´»½¬»¼ ¬± ¾» ¿ ®¿²¼±³ Ù¿«·¿² ³¿¬®·¨ò · ¹·ª»² ¾§ øïð÷ò ß ·´´«¬®¿¬»¼ ·² Í»½¬·±² íô ¬¸» »®®±® ±º ÓÔÛñß´¬Ó·² · ¿¬ ³±¬ Ñø ÷ ©¸·´» ¬¸» »®®±® ±º ÑÔÍ · ·²¼»°»²¼»²¬ ±º ò Ú·¹«®» ì ø¼÷ ½´»¿®´§ ¼»³±²¬®¿¬» ¬¸» ¿¾±ª» ³»²¬·±²»¼ »®®±® ¬®»²¼ò è λº»®»²½» Åïà ʷ®»²¼»®¿ Õò Í®·ª¿¬¿ª¿ ¿²¼ Ü¿ª·¼ Ûò ßò Ù·´»ò Í»»³·²¹´§ «²®»´¿¬»¼ ®»¹®»·±² »¯«¿¬·±² ³±¼»´æ »¬·ó ³¿¬·±² ¿²¼ ·²º»®»²½»ò ÝÎÝ Ð®»ô ïçèéò Åîà ܻ²¦·´ Ùò Ú·»¾·¹ò Í»»³·²¹´§ «²®»´¿¬»¼ ®»¹®»·±²ò ײ Þò Þ¿´¬¿¹·ô »¼·¬±®ô ß ½±³°¿²·±² ¬± ¬¸»±®»¬·½¿´ »½±²±³»¬®·½ò Þ´¿½µ©»´´ô îððïò Åíà ا«²¹·µ α¹»® Ó±±² ¿²¼ Þ»²±·¬ л®®±²ò Í»»³·²¹´§ «²®»´¿¬»¼ ®»¹®»·±²ò ײ ̸» Ò»© п´¹®¿ª» Ü·½ó ¬·±²¿®§ ±º Û½±²±³·½ò п´¹®¿ª» Ó¿½³·´´¿²ô »½±²¼ »¼·¬·±²ô îððèò Åìà ͻ§±«²¹ Õ·³ô Õ§«²¹ó߸ ͱ¸²ô ¿²¼ Û®·½ Ðò È·²¹ò ß ³«´¬·ª¿®·¿¬» ®»¹®»·±² ¿°°®±¿½¸ ¬± ¿±½·¿¬·±² ¿²¿´§· ±º ¿ ¯«¿²¬·¬¿¬·ª» ¬®¿·¬ ²»¬©±®µò Þ·±·²º±®³¿¬·½ô îëøïî÷æ·îð슷îïîô îððçò Åëà ߴ¿² Öò צ»²³¿²ò Ó±¼»®² ³«´¬·ª¿®·¿¬» ¬¿¬·¬·½¿´ ¬»½¸²·¯«»ò Ͱ®·²¹»®ô îððèò Åêà ӱ¸»² б«®¿¸³¿¼·ò Ø·¹¸óÜ·³»²·±²¿´ ݱª¿®·¿²½» Û¬·³¿¬·±²ò É·´»§ô îðïíò Åéà ɷ´´·¿³ Øò Ù®»»²»ò Û½±²±³»¬®·½ ß²¿´§·ò Ю»²¬·½» Ø¿´´ô »ª»²¬¸ »¼·¬·±²ô îðïïò Åèà ɿ´¬»® Ѿ»®¸±º»® ¿²¼ Ö¿² Õ³»²¬¿ò ß ¹»²»®¿´ °®±½»¼«®» º±® ±¾¬¿·²·²¹ ³¿¨·³«³ ´·µ»´·¸±±¼ »¬·³¿¬» ·² ¹»²»®¿´·¦»¼ ®»¹®»·±² ³±¼»´ò Û½±²±³»¬®·½¿æ Ö±«®²¿´ ±º ¬¸» Û½±²±³»¬®·½ ͱ½·»¬§ô ìîøí÷æëéçŠëçðô ïçéìò Åçà з§«¸ ο·ô ß¾¸·¸»µ Õ«³¿®ô ¿²¼ Ø¿´ Ü¿«³»ò Í·³«´¬¿²»±«´§ ´»ª»®¿¹·²¹ ±«¬°«¬ ¿²¼ ¬¿µ ¬®«½¬«®» º±® ³«´¬·°´»ó±«¬°«¬ ®»¹®»·±²ò ײ Ò×ÐÍô °¿¹» íïèëŠíïçíô îðïîò Åïðà տ®·³ Ô±«²·½·ô ß´»¨¿²¼®» Þò ̧¾¿µ±ªô Ó¿·³·´·¿²± б²¬·´ô ¿²¼ Í¿®¿ ßò ª¿² ¼» Ù»»®ò Ì¿µ·²¹ ¿¼ª¿²¬¿¹» ±º °¿®·¬§ ·² ³«´¬·ó¬¿µ ´»¿®²·²¹ò ײ ÝÑÔÌô îððçò Åïïà ٫·´´¿«³» Ѿ±¦·²µ·ô Ó¿®¬·² Öò É¿·²©®·¹¸¬ô ¿²¼ Ó·½¸¿»´ ×ò Ö±®¼¿²ò Í«°°±®¬ «²·±² ®»½±ª»®§ ·² ¸·¹¸ó ¼·³»²·±²¿´ ³«´¬·ª¿®·¿¬» ®»¹®»·±²ò ̸» ß²²¿´ ±º ͬ¿¬·¬·½ô íçøï÷æïŠìéô îðïïò Åïîà Ϳ¸¿²¼ Òò Ò»¹¿¸¾¿² ¿²¼ Ó¿®¬·² Öò É¿·²©®·¹¸¬ò Í·³«´¬¿²»±« «°°±®¬ ®»½±ª»®§ ·² ¸·¹¸ ¼·³»²·±²æ ×ÛÛÛ Ì®¿²ò ±² ײº±®³¿¬·±² ̸»±®§ô ëéøê÷æíèìïŠíèêíô îðïïò Åïíà ̸»±¼±®± Ûª¹»²·±«ô ݸ¿®´» ßò Ó·½½¸»´´·ô ¿²¼ Ó¿·³·´·¿²± б²¬·´ò Ô»¿®²·²¹ ³«´¬·°´» ¬¿µ ©·¬¸ µ»®²»´ ³»¬¸±¼ò ײ Ö±«®²¿´ ±º Ó¿½¸·²» Ô»¿®²·²¹ λ»¿®½¸ô °¿¹» êïëŠêíéô îððëò Åïìà ߲¼®»¿ ß®¹§®·±«ô ̸»±¼±®± Ûª¹»²·±«ô ¿²¼ Ó¿·³·´·¿²± б²¬·´ò ݱ²ª»¨ ³«´¬·ó¬¿µ º»¿¬«®» ´»¿®²·²¹ò Ó¿½¸·²» Ô»¿®²·²¹ô éíøí÷æîìíŠîéîô îððèò Åïëà ߼¿³ Öò α¬¸³¿²ô Û´·¦¿ª»¬¿ Ô»ª·²¿ô ¿²¼ Ö· Ƹ«ò Ͱ¿®» ³«´¬·ª¿®·¿¬» ®»¹®»·±² ©·¬¸ ½±ª¿®·¿²½» »¬·³¿ó ¬·±²ò Ö±«®²¿´ ±º ݱ³°«¬¿¬·±²¿´ ¿²¼ Ù®¿°¸·½¿´ ͬ¿¬·¬·½ô ïçøì÷æçìéŠçêîô îðïðò Åïêà է«²¹ó߸ ͱ¸² ¿²¼ Í»§±«²¹ Õ·³ò Ö±·²¬ »¬·³¿¬·±² ±º ¬®«½¬«®»¼ °¿®·¬§ ¿²¼ ±«¬°«¬ ¬®«½¬«®» ·² ³«´¬·°´»ó±«¬°«¬ ®»¹®»·±² ª·¿ ·²ª»®»ó½±ª¿®·¿²½» ®»¹«´¿®·¦¿¬·±²ò ײ ß×ÍÌßÌÍô îðïîò Åïéà ɱ²§«´ Ô»» ¿²¼ Ç«º»²¹ Ô·«ò Í·³«´¬¿²»±« ³«´¬·°´» ®»°±²» ®»¹®»·±² ¿²¼ ·²ª»®» ½±ª¿®·¿²½» ³¿¬®·¨ »¬·³¿¬·±² ª·¿ °»²¿´·¦»¼ ¹¿«·¿² ³¿¨·³«³ ´·µ»´·¸±±¼ò Öò ±º ³«´¬·ª¿®·¿¬» ¿²¿´§·ô ïïïæîìïŠîëëô îðïîò Åïèà Ю¿¬»»µ Ö¿·²ô Ю¿²»»¬¸ Ò»¬®¿°¿´´·ô ¿²¼ Í«¶¿§ Í¿²¹¸¿ª·ò Ô±©ó®¿²µ ³¿¬®·¨ ½±³°´»¬·±² «·²¹ ¿´¬»®²¿¬·²¹ ³·²·³·¦¿¬·±²ò ײ ÍÌÑÝô °¿¹» êêëŠêéìô îðïíò Åïçà Ϳ²¶»»ª ß®±®¿ô α²¹ Ù»ô ¿²¼ ß²µ«® Ó±·¬®¿ò Ò»© ¿´¹±®·¬¸³ º±® ´»¿®²·²¹ ·²½±¸»®»²¬ ¿²¼ ±ª»®½±³°´»¬» ¼·½¬·±²¿®·»ò ײ ÝÑÔÌô °¿¹» ééçŠèðêô îðïìò Åîðà ܿª·¼ ݱ±½µ ¿²¼ ̱²¹ Ƹ¿²¹ò ͬ¿¬·¬·½¿´ ¿²¿´§· ±º Þ¿§» ±°¬·³¿´ «¾»¬ ®¿²µ·²¹ò ×ÛÛÛ Ì®¿²ò ±² ײº±®³¿¬·±² ̸»±®§ô ëìøïï÷æëïìðŠëïëìô îððèò Åîïà ¬·±² ¾·¿ò Ö±«®²¿´ ±º ¬¸» ß³»®·½¿² ¬¿¬·¬·½¿´ ß±½·¿¬·±²ô ëéøîçè÷æíìèŠíêèô ïçêîò Åîîà ߮²±´¼ Æ»´´²»® ¿²¼ ̱³±¸·®± ß²¼±ò ß ¼·®»½¬ Ó±²¬» Ý¿®´± ¿°°®±¿½¸ º±® Þ¿§»·¿² ¿²¿´§· ±º ¬¸» »»³ó ·²¹´§ «²®»´¿¬»¼ ®»¹®»·±² ³±¼»´ò Ö±«®²¿´ ±º Û½±²±³»¬®·½ô ïëçøï÷æííŠìëô îðïðò Åîíà ܿ²·»´ Ø«ô ͸¿³ Óò Õ¿µ¿¼»ô ¿²¼ ̱²¹ Ƹ¿²¹ò ο²¼±³ ¼»·¹² ¿²¿´§· ±º ®·¼¹» ®»¹®»·±²ò Ú±«²¼¿¬·±² ±º ݱ³°«¬¿¬·±²¿´ Ó¿¬¸»³¿¬·½ô ïìøí÷æëêçŠêððô îðïìò Åîìà ߴ¿² Öò צ»²³¿²ò λ¼«½»¼ó®¿²µ ®»¹®»·±² º±® ¬¸» ³«´¬·ª¿®·¿¬» ´·²»¿® ³±¼»´ò Öò ±º ³«´¬·ª¿®·¿¬» ¿²¿´§·ô ëøî÷æîìèŠîêìô ïçéëò Åîëà ٮ»¹±®§ λ·²»´ò λ¼«½»¼ó®¿²µ ®»¹®»·±²ò ײ Û²½§½´±°»¼·¿ ±º ͬ¿¬·¬·½¿´ ͽ·»²½»ò Ö±¸² É·´»§ ú ͱ²ô ײ½òô îððìò Åîêà Ю¿¬»»µ Ö¿·²ô ß³¾«¶ Ì»©¿®·ô ¿²¼ Ы®«¸±¬¬¿³ Õ¿®ò Ѳ ·¬»®¿¬·ª» ¸¿®¼ ¬¸®»¸±´¼·²¹ ³»¬¸±¼ º±® ¸·¹¸ó ¼·³»²·±²¿´ ³ó»¬·³¿¬·±²ò ײ Ò×ÐÍô °¿¹» êèëŠêçíô îðïìò Åîéà ǫ½¸»² Ƹ¿²¹ô Ó¿®¬·² Öò É¿·²©®·¹¸¬ô ¿²¼ Ó·½¸¿»´ ×ò Ö±®¼¿²ò Ô±©»® ¾±«²¼ ±² ¬¸» °»®º±®³¿²½» ±º °±´§²±³·¿´ó¬·³» ¿´¹±®·¬¸³ º±® °¿®» ´·²»¿® ®»¹®»·±²ò ײ ÝÑÔÌô °¿¹» çîïŠçìèô îðïìò Åîèà α³¿² Ê»®¸§²·²ò ײ¬®±¼«½¬·±² ¬± ¬¸» ²±²ó¿§³°¬±¬·½ ¿²¿´§· ±º ®¿²¼±³ ³¿¬®·½»ò ݱÎÎô ¿¾ñïðïïòíðîéô îðïðò ç | 2015 | 277 |
5,788 | Anytime Influence Bounds and the Explosive Behavior of Continuous-Time Diffusion Networks Kevin Scaman1 R´emi Lemonnier1,2 Nicolas Vayatis1 1CMLA, ENS Cachan, CNRS, Universit´e Paris- Saclay, France, 21000mercis, Paris, France {scaman, lemonnier, vayatis}@cmla.ens-cachan.fr Abstract The paper studies transition phenomena in information cascades observed along a diffusion process over some graph. We introduce the Laplace Hazard matrix and show that its spectral radius fully characterizes the dynamics of the contagion both in terms of influence and of explosion time. Using this concept, we prove tight non-asymptotic bounds for the influence of a set of nodes, and we also provide an in-depth analysis of the critical time after which the contagion becomes super-critical. Our contributions include formal definitions and tight lower bounds of critical explosion time. We illustrate the relevance of our theoretical results through several examples of information cascades used in epidemiology and viral marketing models. Finally, we provide a series of numerical experiments for various types of networks which confirm the tightness of the theoretical bounds. 1 Introduction Diffusion networks capture the underlying mechanism of how events propagate throughout a complex network. In marketing, social graph dynamics have caused large transformations in business models, forcing companies to re-imagine their customers not as a mass of isolated economic agents, but as customer networks [1]. In epidemiology, a precise understanding of spreading phenomena is heavily needed when trying to break the chain of infection in populations during outbreaks of viral diseases. But whether the subject is a virus spreading across a computer network, an innovative product among early adopters, or a rumor propagating on a network of people, the questions of interest are the same: how many people will it infect? How fast will it spread? And, even more critically for decision makers: how can we modify its course in order to meet specific goals? Several papers tackled these issues by studying the influence maximization problem. Given a known diffusion process on a graph, it consists in finding the top-k subset of initial seeds with the highest expected number of infected nodes at a certain time distance T. This problem being NP-hard [2], various heuristics have been proposed in order to obtain scalable suboptimal approximations. While the first algorithms focused on discrete-time models and the special case T = +∞[3, 4], subsequent papers [5, 6] brought empirical evidences of the key role played by temporal behavior. Existing models of continuous-time stochastic processes include multivariate Hawkes processes [7] where recent progress in inference methods [8, 9] made available the tools for the study of activity shaping [10], which is closely related to influence maximization. However, in the most studied case in which each node of the network can only be infected once, the most widely used model remains the Continuous-Time Information Cascade (CTIC) model [5]. Under this framework, successful inference [5] as well as influence maximization algorithms have been developed [11, 12]. However, if recent works [13, 14] provided theoretical foundations for the inference problem, assessing the quality of influence maximization remains a challenging task, as few theoretical results exist for general graphs. In the infinite-time setting, studies of the SIR diffusion process in epidemiology [15] or percolation for specific graphs [16] provided a more accurate understanding of these processes. More recently, it was shown in [17] that the spectral radius of a given Hazard matrix 1 played a key role in influence of information cascades. This allowed the authors to derive closedform tight bounds for the influence in general graphs and characterize epidemic thresholds under which the influence of any set of nodes is at most O(√n). In this paper, we extend their approach in order to deal with the problem of anytime influence bounds for continuous-time information cascades. More specifically, we define the Laplace Hazard matrices and show that the influence at time T of any set of nodes heavily depends on their spectral radii. Moreover, we reveal the existence and characterize the behavior of critical times at which supercritical processes explode. We show that before these times, super-critical processes will behave sub-critically and infect at most o(n) nodes. These results can be used in various ways. First, they provide a way to evaluate influence maximization algorithms without having to test all possible set of influencers, which is intractable for large graphs. Secondly, critical times allow decision makers to know how long a contagion will remain in its early phase before becoming a large-scale event, in fields where knowing when to act is nearly as important as knowing where to act. Finally, they can be seen as the first closed-form formula for anytime influence estimation for continuous-time information cascades. Indeed, we provide empirical evidence that our bounds are tight for a large family of graphs at the beginning and the end of the infection process. The rest of the paper is organized as follows. In Section 2, we recall the definition of Information Cascades Model and introduce useful notations. In Section 3, we derive theoretical bounds for the influence. In Section 4, we illustrate our results by applying them on specific cascade models. In Section 5, we perform experiments in order to show that our bounds are sharp for a family of graphs and sets of initial nodes. All proof details are provided in the supplementary material. 2 Continuous-Time Information Cascades 2.1 Information propagation and influence in diffusion networks We describe here the propagation dynamics introduced in [5]. Let G = (V, E) be a directed network of n nodes. We equip each directed edge (i, j) ∈E with a time-varying probability distribution pij(t) over R+ ∪{+∞} (pij is thus a sub-probability measure on R+) and define the cascade behavior as follows. At time t = 0, only a subset A ⊂V of influencers is infected. Each node i infected at time τi may transmit the infection at time τi + τij along its outgoing edge (i, j) ∈E with probability density pij(τij), and independently of other transmission events. The process ends for a given T > 0. For each node v ∈V, we will denote as τv the (possibly infinite) time at which it is reached by the infection. The influence of A at time T, denoted as σA(T), is defined as the expected number of nodes reached by the contagion at time T originating from A, i.e. σA(T) = E[ X v∈V 1{τv≤T }], (1) where the expectation is taken over cascades originating from A (i.e. τv = 0 ⇔1{v∈A}). Following the percolation literature, we will differentiate between sub-critical cascades whose size is o(n) and super-critical cascades whose size is proportional to n, where n denotes the size of the network. This work focuses on upper bounding the influence σA(T) for any given time T and characterizing the critical times at which phase transitions occur between sub-critical and supercritical behaviors. 2.2 The Laplace Hazard Matrix We extend here the concept of hazard matrix first introduced in [17] (different from the homonym notion of [13]), which plays a key role in the influence of the information cascade. Definition 1. Let G = (V, E) be a directed graph, and pij be integrable edge transmission probabilities such that R +∞ 0 pij(t)dt < 1. For s ≥0, let LH(s) be the n × n matrix, denoted as the Laplace hazard matrix, whose coefficients are LHij(s) = ( −ˆpij(s) R +∞ 0 pij(t)dt −1 ln 1 − R +∞ 0 pij(t)dt if (i, j) ∈E 0 otherwise . (2) 2 where ˆpij(s) denotes the Laplace transform of pij defined for every s ≥0 by ˆpij(s) = R +∞ 0 pij(t)e−stdt. Note that the long term behavior of the cascade is retrieved when s = 0 and coincides with the concept of hazard matrix used in [17]. We recall that for any square matrix M of size n, its spectral radius ρ(M) is the maximum of the absolute values of its eigenvalues. If M is moreover real and positive, we also have ρ( M+M ⊤ 2 ) = supx∈Rn x⊤Mx x⊤x . 2.3 Existence of a critical time of a contagion In the following, we will derive critical times before which the contagion is sub-critical, and above which the contagion is super-critical. We now formalize this notion of critical time via limits of contagions on networks. Theorem 1. Let (Gn)n∈N be a sequence of networks of size n, and (pn ij)n∈N be transmission probability functions along the edges of Gn. Let also σn(t) be the maximum influence in Gn at time t from a single influencer. Then there exists a critical time T c ∈R+ ∪{+∞} such that, for every sequence of times (Tn)n∈N: • If lim supn→+∞Tn < T c, then σn(Tn) = o(n), • If σn(Tn) = o(n), then lim infn→+∞Tn ≤T c. Moreover, such a critical time is unique. In other words, the critical time is a time before which the regime is sub-critical and after which no contagion can be sub-critical. The next proposition shows that, after the critical time, the contagion is super-critical. Proposition 1. If (Tn)n∈N is such that lim infn→+∞Tn > T c, then lim infn→+∞ σn(Tn) n > 0 and the contagion is super-critical. Conversely, if (Tn)n∈N is such that lim infn→+∞ σn(Tn) n > 0, then lim supn→+∞Tn ≥T c. In order to simplify notations, we will omit in the following the dependence in n of all the variables whenever stating results holding in the limit n →+∞. 3 Theoretical bounds for the influence of a set of nodes We now present our upper bounds on the influence at time T and derive a lower bound on the critical time of a contagion. 3.1 Upper bounds on the maximum influence at time T The next proposition provides an upper bound on the influence at time T for any set of influencers A such that |A| = n0. This result may be valuable for assessing the quality of influence maximization algorithms in a given network. Proposition 2. Define ρ(s) = ρ( LH(s)+LH(s)⊤ 2 ). Then, for any A such that |A| = n0 < n, denoting by σA(T) the expected number of nodes reached by the cascade starting from A at time T: σA(T) ≤n0 + (n −n0) min s≥0 γ(s)esT . (3) where γ(s) is the smallest solution in [0, 1] of the following equation: γ(s) −1 + exp −ρ(s)γ(s) − ρ(s)n0 γ(s)(n −n0) = 0. (4) 3 Corollary 1. Under the same assumptions: σA(T) ≤n0 + p n0(n −n0) min {s≥0|ρ(s)<1} s ρ(s) 1 −ρ(s)esT ! , (5) Note that the long-term upper bound in [17] is a corollary of Proposition 2 using s = 0. When ρ(0) < 1, Corollary 1 with s = 0 implies that the regime is sub-critical for all T ≥0. When ρ(0) ≥1, the long-term behavior may be super-critical and the influence may reach linear values in n. However, at a cost growing exponentially with T, it is always possible to choose a s such that ρ(s) < 1 and retrieve a O(√n) behavior. While the exact optimal parameter s is in general not explicit, two choices of s derive relevant results: either simplifying esT by choosing s = 1/T, or keeping γ(s) sub-critical by choosing s s.t. ρ(s) < 1. In particular, the following corollary shows that the contagion explodes at most as eρ−1(1−ϵ)T for any ϵ ∈[0, 1]. Corollary 2. Let ϵ ∈[0, 1] and ρ(0) ≥1. Under the same assumptions: σA(T) ≤n0 + r n0(n −n0) ϵ eρ−1(1−ϵ)T . (6) Remark. Since this section focuses on bounding σA(T) for a given T ≥0, all the aforementioned results also hold for pT ij(t) = pij(t)1{t≤T }. This is equivalent to integrating everything on [0, T] instead of R+, i.e. LHij(s) = −ln(1 − R T 0 pij(t)dt)( R T 0 pij(t)dt)−1 R T 0 pij(t)e−stdt. This choice of LH is particularly useful when some edges are transmitting the contagion with probability 1, see for instance the SI epidemic model in Section 4.3). 3.2 Lower bound on the critical time of a contagion The previous section presents results about how explosive a contagion is. These findings suggest that the speed at which a contagion explodes is bounded by a certain quantity, and thus that the process needs a certain amount of time to become super-critical. This intuition is made formal in the following corollary: Corollary 3. Assume ∀n ≥0, ρn(0) ≥1 and limn→+∞ ρ−1 n (1− 1 ln n ) ρ−1 n (1) = 1. If the sequence (Tn)n∈N is such that lim sup n→+∞ 2ρ−1 n (1)Tn ln n < 1. (7) Then, σA(Tn) = o(n). (8) In other words, the regime of the contagion is sub-critical before ln n 2ρ−1 n (1) and T c ≥lim inf n→+∞ ln n 2ρ−1 n (1). (9) The technical condition limn→+∞ ρ−1 n (1− 1 ln n ) ρ−1 n (1) = 1 imposes that, for large n, limϵ→0 ρ−1 n (1−ϵ) ρ−1 n (1) converges sufficiently fast to 1 so that ρ−1 n (1 − 1 ln n) has the same behavior than ρ−1 n (1). This condition is not very restrictive, and is met for the different case studies considered in Section 4. This result may be valuable for decision makers since it provides a safe time region in which the contagion has not reached a macroscopic scale. It thus provides insights into how long do decision makers have to prepare control measures. After T c, the process can explode and immediate action is required. 4 Application to particular contagion models In this section, we provide several examples of cascade models that show that our theoretical bounds are applicable in a wide range of scenarios and provide the first results of this type in many areas, including two widely used epidemic models. 4 4.1 Fixed transmission pattern When the transmission probabilities are of the form pij(t) = αijp(t) s.t. R +∞ 0 p(t) = 1 and αij < 1, LHij(s) = −ln(1 −αij)ˆp(s), (10) and ρ(s) = ραˆp(s), (11) where ρα = ρ(0) = ρ(−ln(1−αij)+ln(1−αji) 2 ) is the long-term hazard matrix defined in [17]. In these networks, the temporal and structural behaviors are clearly separated. While ρα summarizes the structure of the network and how connected the nodes are to one another, ˆp(s) captures how fast the transmission probabilities are fading through time. When ρα ≥1, the long-term behavior is super-critical and the bound on the critical times is given by inverting ˆp(s) T c ≥lim inf n→+∞ ln n 2ˆp−1(1/ρα), (12) where ˆp−1(1/ρα) exists and is unique since ˆp(s) is decreasing from 1 to 0. In general, it is not possible to give a more explicit version of the critical time of Corollary 3, or of the anytime influence bound of Proposition 2. However, we investigate in the rest of this section specific p(t) which lead to explicit results. 4.2 Exponential transmission probabilities A notable example of fixed transmission pattern is the case of exponential probabilities pij(t) = αijλe−λt for λ > 0 and αij ∈[0, 1[. Influence maximization algorithms under this specific choice of transmission functions have been for instance developed in [11]. In such a case, we can calculate the spectral radii explicitly: ρ(s) = λ s + λρα, (13) where ρα = ρ(−ln(1−αij)+ln(1−αji) 2 ) is again the long-term hazard matrix. When ρα > 1, this leads to a critical time lower bounded by T c ≥lim inf n→+∞ ln n 2λ(ρα −1). (14) The influence bound of Corollary 1 can also be reformulated in the following way: Corollary 4. Assume ρα ≥1, or else λT(1 −ρα) < 1 2. Then the minimum in Eq. 5 is met for s = 1 2T + λ(ρα −1) and Corollary 1 rewrites: σA(T) ≤n0 + p n0(n −n0) p 2eTλραeλT (ρα−1). (15) If ρα < 1 and λT(1 −ρα) ≥1 2, the minimum in Eq. 5 is met for s = 0 and Corollary 1 rewrites: σA(T) ≤n0 + p n0(n −n0) r ρα 1 −ρα . (16) Note that, in particular, the condition of Corollary 4 is always met in the super-critical case where ρα > 1. Moreover, we retrieve the O(√n) behavior when T < 1 λ(ρα−1). Concerning the behavior in T, the bound matches exactly the infinite-time bound when T is very large in the sub-critical case. However, for sufficiently small T, we obtain a greatly improved result with a very instructive growth in O( √ T). 4.3 SI and SIR epidemic models Both epidemic models SI and SIR are particular cases of exponential transmission probabilities. SIR model ([18]) is a widely used epidemic model that uses three states to describe the spread of an infection. Each node of the network can be either : susceptible (S), infected (I), or removed (R). At 5 t = 0, a subset A of n0 nodes is infected. Then, each node i infected at time τi is removed at an exponentially-distributed time θi of parameter δ. Transmission along its outgoing edge (i, j) ∈E occurs at time τi + τij with conditional probability density β exp(−βτij), given that node i has not been removed at that time. When the removing events are not observed, SIR is equivalent to CTIC, except that transmission along outgoing edges of one node are positively correlated. However, our results still hold in case of such a correlation, as shown in the following result. Proposition 3. Assume the propagation follow a SIR model of transmission parameter β and removal parameter δ. Define pij(t) = β exp(−(δ + β)t) for (i, j) ∈E. Let A = 1{(i,j)∈E} ij be the adjacency matrix of the underlying undirected network. Then, results of Proposition 2 and subsequent corollaries still hold with ρ(s) given by: ρ(s) = ρ LH(s) + LH(s)⊤ 2 = ln 1 + β δ δ + β s + δ + β ρ(A) (17) From this proposition, the same analysis than in the independent transmission events case can be derived, and the critical time for the SIR model is T c ≥lim inf n→+∞ ln n 2(δ + β)(ln(1 + β δ )ρ(A) −1) . (18) Proposition 4. Consider the SIR model with transmission rate β, recovery rate δ and adjacency matrix An. Assume lim infn→+∞ln(1 + β δ )ρ(An) > 1, and the sequence (Tn)n∈N is such that lim sup n→+∞ 2(δ + β)(ln(1 + β δ )ρ(An) −1)Tn ln n < 1. (19) Then, σA(Tn) = o(n). (20) This is a direct corollary of Corollary 3 with ρ−1(1) = (δ + β)(ln(1 + β δ )ρ(An) −1). The SI model is a simpler model in which individuals of the network remain infected and contagious through time (i.e. δ = 0). Thus, the network is totally infected at the end of the contagion and limn→+∞σA(T) = n. For this reason, the previous critical time for the more general SIR model is of no use here, and a more precise analysis is required. Following the remark of Section 3.1, we can integrate pij on [0, T] instead of R+, which leads to the following result: Proposition 5. Consider the SI model with transmission rate β and adjacency matrix An. Assume lim infn→+∞ρ(An) > 0 and the sequence (Tn)n∈N is such that lim sup n→+∞ βTn q ln n 2ρ(An)(1 −e − q ln n 2ρ(An) ) < 1. (21) Then, σA(Tn) = o(n). (22) In other words, the critical time for the SI model is lower bounded by T c ≥lim inf n→+∞ 1 β s ln n 2ρ(An)(1 −e − q ln n 2ρ(An) ). (23) If ρ(An) = o(ln n) (e.g. for sparse networks with a maximum degree in O(1)), the critical time resumes to Tc ≥lim infn→+∞1 β q ln n 2ρ(An). However, when the graph is denser and ρ(An)/ ln n → +∞, then Tc ≥lim infn→+∞ ln n 2βρ(An). 4.4 Discrete-time Information Cascade A final example is the discrete-time contagion in which a node infected at time t makes a unique attempt to infect its neighbors at a time t + T0. This defines the Information Cascade model, the 6 2 4 6 8 10 0 20 40 60 80 spectral radius (ρα) influence (σA(T)) totally connected erdos renyi preferential attachment small world contact network upper bound (a) T = 0.1 0 2 4 6 8 10 0 200 400 600 800 1000 spectral radius (ρα) influence (σA(T)) (b) T = 1 0 2 4 6 8 10 0 200 400 600 800 1000 spectral radius (ρα) influence (σA(T)) (c) T = 5 0 2 4 6 8 10 0 200 400 600 800 1000 spectral radius (ρα) influence (σA(T)) (d) T = 100 Figure 1: Empirical maximum influence w.r.t. the spectral radius ρα defined in Section 4.2 for various network types. Simulation parameters: n = 1000, n0 = 1 and λ = 1. discrete-time diffusion model studied by the first works on influence maximization [2, 19, 3, 4]. In this setting, pij(t) = αijδT0(t) where δT0 is the Dirac distribution centered at T0. The spectral radii are given by ρ(s) = ραe−sT0, (24) and the influence bound of Corollary 1 simplifies to: Corollary 5. Let ρα ≥1, or else T ≤ T0 2(1−ρα). If T < T0, then σA(T) = n0. Otherwise, σA(T) ≤n0 + p n0(n −n0) r 2eT T0 ρ T T0 α . (25) Moreover, the critical time is lower bounded by T c ≥lim inf n→+∞ ln n 2 ln ρα T0. (26) A notable difference from the exponential transmission probabilities is that T c is here inversely proportional to ln ρα, instead of ρα in Eq. 4.2, which implies that, for the same long-term influence, a discrete-time contagion will explode much slower than one with a constant infection rate. This is probably due to the existence of very small infection times for contagions with exponential transmission probabilities. 5 Experimental results This section provides an experimental validation of our bounds, by comparing them to the empirical influence simulated on several network types. In all our experiments, we simulate a contagion with exponential transmission probabilities (see Section 4.2) on networks of size n = 1000 and generated random networks of 5 different types (for more information on the respective random generators, see e.g [20]): Erd¨os-R´enyi networks, preferential attachment networks, small-world networks, geometric random networks ([21]) and totally connected networks with fixed weight b ∈ [0, 1] except for the ingoing and outgoing edges of a single node having, respectively, weight 0 and a > b. The reason for simulating on such totally connected networks is that the influence over these networks tend to match our upper bounds more closely, and plays the role of a best case 7 0 200 400 600 800 1000 0 10 20 30 40 50 60 70 number of nodes (n) influence (σA(T)) totally connected erdos renyi preferential attachment small world contact network upper bound (a) T = 0.2T c∗ 0 200 400 600 800 1000 0 200 400 600 800 1000 number of nodes (n) influence (σA(T)) (b) T = 2T c∗ 0 200 400 600 800 1000 0 200 400 600 800 1000 number of nodes (n) influence (σA(T)) (c) T = 5T c∗ Figure 2: Empirical maximum influence w.r.t. the network size for various network types. Simulation parameters: n0 = 1, λ = 1 and ρα = 4. In such a setting, T c∗= ln n 2(ρα−1)λ = 1.15. Note the sub-linear (a) versus linear behavior (b and c). scenario. More precisely, the transmission probabilities are of the form pij(t) = αe−t for each edge (i, j) ∈E, where α ∈[0, 1[ (and λ = 1 in the formulas of Section 4.2). We first investigate the tightness of the upper bound on the maximum influence given in Proposition 2. Figure 1 presents the empirical influence w.r.t. ρα = −ln(1 −α)ρ(A) (where A is the adjacency matrix of the network) for a large set of network types, as well as the upper bound in Proposition 2. Each point in the figure corresponds to the maximum influence on one network. The influence was averaged over 100 cascade simulations, and the best influencer (i.e. whose influence was maximal) was found by performing an exhaustive search. Our bounds are tight for all values of T ∈{0.1, 1, 5, 100} for totally connected networks in the sub-critical regime (ρα < 1). For the super-critical regime (ρα > 1), the behavior in T is very instructive. For T ∈{0.1, 5, 100}, we are tight for most network types when ρα is high. For T = 1 (the average transmission time for the (τij)(i,j)∈E), the maximum influence varies a lot across different graphs. This follows the intuition that this is one of the times where, for a given final number of infected node, the local structure of the networks will play the largest role through precise temporal evolution of the infection. Because ρα explains quite well the final size of the infection, this discrepancy appears on our graphs at ρα fixed. While our bound does not seem tight for this particular time, the order of magnitude of the explosion time is retrieved and our bounds are close to optimal values as soon as T = 5. In order to further validate that our bounds give meaningful insights on the critical time of explosion for super-critical graphs, Figure 2 presents the empirical influence with respect to the size of the network n for different network types and values of T, with ρα fixed to ρα = 4. In this setting, the critical time of Corollary 3 is given by T c∗= ln n 2(ρα−1)λ = 1.15. We see that our bounds are tight for totally connected networks for all values of T ∈{0.2, 2, 5}. Moreover, the accuracy of critical time estimation is proved by the drastic change of behavior around T = T c∗, with phase transitions having occurred for most network types as soon as T = 5T c∗. 6 Conclusion In this paper, we characterize the phase transition in continuous-time information cascades between their sub-critical and super-critical behavior. We provide for the first time general influence bounds that apply for any time horizon, graph and set of influencers. We show that the key quantities governing this phenomenon are the spectral radii of given Laplace Hazard matrices. We prove the pertinence of our bounds by deriving the first results of this type in several application fields. Finally, we provide experimental evidence that our bounds are tight for a large family of networks. Acknowledgments This research is part of the SODATECH project funded by the French Government within the program of “Investments for the Future – Big Data”. 8 References [1] Michael Trusov, Randolph E Bucklin, and Koen Pauwels. Effects of word-of-mouth versus traditional marketing: Findings from an internet social networking site. Journal of marketing, 73(5):90–102, 2009. [2] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In Proceedings of the 9th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 137–146. ACM, 2003. [3] Wei Chen, Yajun Wang, and Siyu Yang. Efficient influence maximization in social networks. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 199–208. ACM, 2009. [4] Wei Chen, Chi Wang, and Yajun Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1029–1038. ACM, 2010. [5] Manuel Gomez-Rodriguez, David Balduzzi, and Bernhard Sch¨olkopf. Uncovering the temporal dynamics of diffusion networks. In Proceedings of the 28th International Conference on Machine Learning, pages 561–568, 2011. [6] Nan Du, Le Song, Hyenkyun Woo, and Hongyuan Zha. Uncover topic-sensitive information diffusion networks. In Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics, pages 229–237, 2013. [7] Alan G Hawkes and David Oakes. A cluster process representation of a self-exciting process. Journal of Applied Probability, pages 493–503, 1974. [8] Ke Zhou, Hongyuan Zha, and Le Song. Learning triggering kernels for multi-dimensional hawkes processes. In Proceedings of the 30th International Conference on Machine Learning, pages 1301–1309, 2013. [9] Remi Lemonnier and Nicolas Vayatis. Nonparametric markovian learning of triggering kernels for mutually exciting and mutually inhibiting multivariate hawkes processes. In Machine Learning and Knowledge Discovery in Databases, pages 161–176. Springer, 2014. [10] Mehrdad Farajtabar, Nan Du, Manuel Gomez-Rodriguez, Isabel Valera, Hongyuan Zha, and Le Song. Shaping social activity by incentivizing users. In Advances in Neural Information Processing Systems, pages 2474–2482, 2014. [11] Manuel Gomez-Rodriguez and Bernhard Sch¨olkopf. Influence maximization in continuous time diffusion networks. In Proceedings of the 29th International Conference on Machine Learning, pages 313–320, 2012. [12] Nan Du, Le Song, Manuel Gomez-Rodriguez, and Hongyuan Zha. Scalable influence estimation in continuous-time diffusion networks. In Advances in Neural Information Processing Systems, pages 3147– 3155, 2013. [13] Manuel Gomez-Rodriguez, Le Song, Hadi Daneshmand, and B. Schoelkopf. Estimating diffusion networks: Recovery conditions, sample complexity & soft-thresholding algorithm. Journal of Machine Learning Research, 2015. [14] Jean Pouget-Abadie and Thibaut Horel. Inferring graphs from cascades: A sparse recovery framework. In Proceedings of the 32nd International Conference on Machine Learning, pages 977–986, 2015. [15] Moez Draief, Ayalvadi Ganesh, and Laurent Massouli´e. Thresholds for virus spread on networks. Annals of Applied Probability, 18(2):359–378, 2008. [16] B´ela Bollob´as, Svante Janson, and Oliver Riordan. The phase transition in inhomogeneous random graphs. Random Structures & Algorithms, 31(1):3–122, 2007. [17] Remi Lemonnier, Kevin Scaman, and Nicolas Vayatis. Tight bounds for influence in diffusion networks and application to bond percolation and epidemiology. In Advances in Neural Information Processing Systems, pages 846–854, 2014. [18] William O Kermack and Anderson G McKendrick. Contributions to the mathematical theory of epidemics. ii. the problem of endemicity. Proceedings of the Royal society of London. Series A, 138(834):55– 83, 1932. [19] Jure Leskovec, Andreas Krause, Carlos Guestrin, Christos Faloutsos, Jeanne VanBriesen, and Natalie Glance. Cost-effective outbreak detection in networks. In Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 420–429. ACM, 2007. [20] Mark Newman. Networks: An Introduction. Oxford University Press, Inc., New York, NY, USA, 2010. [21] Mathew Penrose. Random geometric graphs, volume 5. Oxford University Press Oxford, 2003. 9 | 2015 | 278 |
5,789 | Rapidly Mixing Gibbs Sampling for a Class of Factor Graphs Using Hierarchy Width Christopher De Sa, Ce Zhang, Kunle Olukotun, and Christopher R´e cdesa@stanford.edu, czhang@cs.wisc.edu, kunle@stanford.edu, chrismre@stanford.edu Departments of Electrical Engineering and Computer Science Stanford University, Stanford, CA 94309 Abstract Gibbs sampling on factor graphs is a widely used inference technique, which often produces good empirical results. Theoretical guarantees for its performance are weak: even for tree structured graphs, the mixing time of Gibbs may be exponential in the number of variables. To help understand the behavior of Gibbs sampling, we introduce a new (hyper)graph property, called hierarchy width. We show that under suitable conditions on the weights, bounded hierarchy width ensures polynomial mixing time. Our study of hierarchy width is in part motivated by a class of factor graph templates, hierarchical templates, which have bounded hierarchy width—regardless of the data used to instantiate them. We demonstrate a rich application from natural language processing in which Gibbs sampling provably mixes rapidly and achieves accuracy that exceeds human volunteers. 1 Introduction We study inference on factor graphs using Gibbs sampling, the de facto Markov Chain Monte Carlo (MCMC) method [8, p. 505]. Specifically, our goal is to compute the marginal distribution of some query variables using Gibbs sampling, given evidence about some other variables and a set of factor weights. We focus on the case where all variables are discrete. In this situation, a Gibbs sampler randomly updates a single variable at each iteration by sampling from its conditional distribution given the values of all the other variables in the model. Many systems—such as Factorie [14], OpenBugs [12], PGibbs [5], DimmWitted [28], and others [15, 22, 25]—use Gibbs sampling for inference because it is fast to run, simple to implement, and often produces high quality empirical results. However, theoretical guarantees about Gibbs are lacking. The aim of the technical result of this paper is to provide new cases in which one can guarantee that Gibbs gives accurate results. For an MCMC sampler like Gibbs sampling, the standard measure of efficiency is the mixing time of the underlying Markov chain. We say that a Gibbs sampler mixes rapidly over a class of models if its mixing time is at most polynomial in the number of variables in the model. Gibbs sampling is known to mix rapidly for some models. For example, Gibbs sampling on the Ising model on a graph with bounded degree is known to mix in quasilinear time for high temperatures [10, p. 201]. Recent work has outlined conditions under which Gibbs sampling of Markov Random Fields mixes rapidly [11]. Continuous-valued Gibbs sampling over models with exponential-family distributions is also known to mix rapidly [2, 3]. Each of these celebrated results still leaves a gap: there are many classes of factor graphs on which Gibbs sampling seems to work very well—including as part of systems that have won quality competitions [24]—for which there are no theoretical guarantees of rapid mixing. Many graph algorithms that take exponential time in general can be shown to run in polynomial time as long as some graph property is bounded. For inference on factor graphs, the most commonly 1 used property is hypertree width, which bounds the complexity of dynamic programming algorithms on the graph. Many problems, including variable elimination for exact inference, can be solved in polynomial time on graphs with bounded hypertree width [8, p. 1000]. In some sense, bounded hypertree width is a necessary and sufficient condition for tractability of inference in graphical models [1, 9]. Unfortunately, it is not hard to construct examples of factor graphs with bounded weights and hypertree width 1 for which Gibbs sampling takes exponential time to mix. Therefore, bounding hypertree width is insufficient to ensure rapid mixing of Gibbs sampling. To analyze the behavior of Gibbs sampling, we define a new graph property, called the hierarchy width. This is a stronger condition than hypertree width; the hierarchy width of a graph will always be larger than its hypertree width. We show that for graphs with bounded hierarchy width and bounded weights, Gibbs sampling mixes rapidly. Our interest in hierarchy width is motivated by so-called factor graph templates, which are common in practice [8, p. 213]. Several types of models, such as Markov Logic Networks (MLN) and Relational Markov Networks (RMN) can be represented as factor graph templates. Many state-of-the-art systems use Gibbs sampling on factor graph templates and achieve better results than competitors using other algorithms [14, 27]. We exhibit a class of factor graph templates, called hierarchical templates, which, when instantiated, have a hierarchy width that is bounded independently of the dataset used; Gibbs sampling on models instantiated from these factor graph templates will mix in polynomial time. This is a kind of sampling analog to tractable Markov logic [4] or so-called “safe plans” in probabilistic databases [23]. We exhibit a real-world templated program that outperforms human annotators at a complex text extraction task—and provably mixes in polynomial time. In summary, this work makes the following contributions: • We introduce a new notion of width, hierarchy width, and show that Gibbs sampling mixes in polynomial time for all factor graphs with bounded hierarchy width and factor weight. • We describe a new class of factor graph templates, hierarchical factor graph templates, such that Gibbs sampling on instantiations of these templates mixes in polynomial time. • We validate our results experimentally and exhibit factor graph templates that achieve high quality on tasks but for which our new theory is able to provide mixing time guarantees. 1.1 Related Work Gibbs sampling is just one of several algorithms proposed for use in factor graph inference. The variable elimination algorithm [8] is an exact inference method that runs in polynomial time for graphs of bounded hypertree width. Belief propagation is another widely-used inference algorithm that produces an exact result for trees and, although it does not converge in all cases, converges to a good approximation under known conditions [7]. Lifted inference [18] is one way to take advantage of the structural symmetry of factor graphs that are instantiated from a template; there are lifted versions of many common algorithms, such as variable elimination [16], belief propagation [21], and Gibbs sampling [26]. It is also possible to leverage a template for fast computation: Venugopal et al. [27] achieve orders of magnitude of speedup of Gibbs sampling on MLNs. Compared with Gibbs sampling, these inference algorithms typically have better theoretical results; despite this, Gibbs sampling is a ubiquitous algorithm that performs practically well—far outstripping its guarantees. Our approach of characterizing runtime in terms of a graph property is typical for the analysis of graph algorithms. Many algorithms are known to run in polynomial time on graphs of bounded treewidth [19], despite being otherwise NP-hard. Sometimes, using a stronger or weaker property than treewidth will produce a better result; for example, the submodular width used for constraint satisfaction problems [13]. 2 Main Result In this section, we describe our main contribution. We analyze some simple example graphs, and use them to show that bounded hypertree width is not sufficient to guarantee rapid mixing of Gibbs sampling. Drawing intuition from this, we define the hierarchy width graph property, and prove that Gibbs sampling mixes in polynomial time for graphs with bounded hierarchy width. 2 Q T1 T2 · · · Tn F1 F2 · · · Fn (a) linear semantics Q φT φF T1 T2 · · · Tn F1 F2 · · · Fn (b) logical/ratio semantics Figure 1: Factor graph diagrams for the voting model; single-variable prior factors are omitted. First, we state some basic definitions. A factor graph G is a graphical model that consists of a set of variables V and factors Φ, and determines a distribution over those variables. If I is a world for G (an assignment of a value to each variable in V ), then ϵ, the energy of the world, is defined as ϵ(I) = P φ∈Φ φ(I). (1) The probability of world I is π(I) = 1 Z exp(ϵ(I)), where Z is the normalization constant necessary for this to be a distribution. Typically, each φ depends only on a subset of the variables; we can draw G as a bipartite graph where a variable v ∈V is connected to a factor φ ∈Φ if φ depends on v. Definition 1 (Mixing Time). The mixing time of a Markov chain is the first time t at which the estimated distribution µt is within statistical distance 1 4 of the true distribution [10, p. 55]. That is, tmix = min t : maxA⊂Ω|µt(A) −π(A)| ≤1 4 . 2.1 Voting Example We start by considering a simple example model [20], called the voting model, that models the sign of a particular “query” variable Q ∈{−1, 1} in the presence of other “voter” variables Ti ∈{0, 1} and Fi ∈{0, 1}, for i ∈{1, . . . , n}, that suggest that Q is positive and negative (true and false), respectively. We consider three versions of this model. The first, the voting model with linear semantics, has energy function ϵ(Q, T, F) = wQ Pn i=1 Ti −wQ Pn i=1 Fi + Pn i=1 wTiTi + Pn i=1 wFiFi, where wTi, wFi, and w > 0 are constant weights. This model has a factor connecting each voter variable to the query, which represents the value of that vote, and an additional factor that gives a prior for each voter. It corresponds to the factor graph in Figure 1(a). The second version, the voting model with logical semantics, has energy function ϵ(Q, T, F) = wQ maxi Ti −wQ maxi Fi + Pn i=1 wTiTi + Pn i=1 wFiFi. Here, in addition to the prior factors, there are only two other factors, one of which (which we call φT ) connects all the true-voters to the query, and the other of which (φF ) connects all the false-voters to the query. The third version, the voting model with ratio semantics, is an intermediate between these two models, and has energy function ϵ(Q, T, F) = wQ log (1 + Pn i=1 Ti) −wQ log (1 + Pn i=1 Fi) + Pn i=1 wTiTi + Pn i=1 wFiFi. With either logical or ratio semantics, this model can be drawn as the factor graph in Figure 1(b). These three cases model different distributions and therefore different ways of representing the power of a vote; the choice of names is motivated by considering the marginal odds of Q given the other variables. For linear semantics, the odds of Q depend linearly on the difference between the number of nonzero positive-voters Ti and nonzero negative-voters Fi. For ratio semantics, the odds of Q depend roughly on their ratio. For logical semantics, only the presence of nonzero voters matters, not the number of voters. We instantiated this model with random weights wTi and wFi, ran Gibbs sampling on it, and computed the variance of the estimated marginal probability of Q for the different models (Figure 2). The results show that the models with logical and ratio semantics produce much lower-variance estimates than the model with linear semantics. This experiment motivates us to try to prove a bound on the mixing time of Gibbs sampling on this model. Theorem 1. Fix any constant ω > 0, and run Gibbs sampling on the voting model with bounded factor weights {wTi, wFi, w} ⊂[−ω, ω]. For the voting model with linear semantics, the largest 3 0.0001 0.001 0.01 0.1 1 0 10 20 30 40 50 60 70 80 90 100 variance of marginal estimate for Q iterations (thousands) Convergence of Voting Model (n = 50) linear ratio logical 0.0001 0.001 0.01 0.1 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 variance of marginal estimate for Q iterations (millions) Convergence of Voting Model (n = 500) linear ratio logical Figure 2: Convergence for the voting model with w = 0.5, and random prior weights in (−1, 0). possible mixing time tmix of any such model is tmix = 2Θ(n). For the voting model with either logical or ratio semantics, the largest possible mixing time is tmix = Θ(n log n). This result validates our observation that linear semantics mix poorly compared to logical and ratio semantics. Intuitively, the reason why linear semantics performs worse is that the Gibbs sampler will switch the state of Q only very infrequently—in fact exponentially so. This is because the energy roughly depends linearly on the number of voters n, and therefore the probability of switching Q depends exponentially on n. This does not happen in either the logical or ratio models. 2.2 Hypertree Width In this section, we describe the commonly-used graph property of hypertree width, and show using the voting example that bounding it is insufficient to ensure rapid Gibbs sampling. Hypertree width is typically used to bound the complexity of dynamic programming algorithms on a graph; in particular, variable elimination for exact inference runs in polynomial time on factor graphs with bounded hypertree width [8, p. 1000]. The hypertree width of a hypergraph, which we denote tw(G), is a generalization of the notion of acyclicity; since the definition of hypertree width is technical, we instead state the definition of an acyclic hypergraph, which is sufficient for our analysis. In order to apply these notions to factor graphs, we can represent a factor graph as a hypergraph that has one vertex for each node of the factor graph, and one hyperedge for each factor, where that hyperedge contains all variables the factor depends on. Definition 2 (Acyclic Factor Graph [6]). A join tree, also called a junction tree, of a factor graph G is a tree T such that the nodes of T are the factors of G and, if two factors φ and ρ both depend on the same variable x in G, then every factor on the unique path between φ and ρ in T also depends on x. A factor graph is acyclic if it has a join tree. All acyclic graphs have hypertree width tw(G) = 1. Note that all trees are acyclic; in particular the voting model (with any semantics) has hypertree width 1. Since the voting model with linear semantics and bounded weights mixes in exponential time (Theorem 1), this means that bounding the hypertree width and the factor weights is insufficient to ensure rapid mixing of Gibbs sampling. 2.3 Hierarchy Width Since the hypertree width is insufficient, we define a new graph property, the hierarchy width, which, when bounded, ensures rapid mixing of Gibbs sampling. This result is our main contribution. Definition 3 (Hierarchy Width). The hierarchy width hw(G) of a factor graph G is defined recursively such that, for any connected factor graph G = ⟨V, Φ⟩, hw(G) = 1 + min φ∗∈Φ hw(⟨V, Φ −{φ∗}⟩), (2) and for any disconnected factor graph G with connected components G1, G2, . . ., hw(G) = max i hw(Gi). (3) 4 As a base case, all factor graphs G with no factors have hw(⟨V, ∅⟩) = 0. (4) To develop some intuition about how to use the definition of hierarchy width, we derive the hierarchy width of the path graph drawn in Figure 3. v1 φ1 v2 φ2 v3 φ3 v4 φ4 v5 φ5 v6 φ6 v7 · · · vn Figure 3: Factor graph diagram for an n-variable path graph. Lemma 1. The path graph model has hierarchy width hw(G) = ⌈log2 n⌉. Proof. Let Gn denote the path graph with n variables. For n = 1, the lemma follows from (4). For n > 1, Gn is connected, so we must compute its hierarchy width by applying (2). It turns out that the factor that minimizes this expression is the factor in the middle, and so applying (2) followed by (3) shows that hw(Gn) = 1 + hw(G⌈n 2 ⌉). Applying this inductively proves the lemma. Similarly, we are able to compute the hierarchy width of the voting model factor graphs. Lemma 2. The voting model with logical or ratio semantics has hierarchy width hw(G) = 3. Lemma 3. The voting model with linear semantics has hierarchy width hw(G) = 2n + 1. These results are promising, since they separate our polynomially-mixing examples from our exponentially-mixing examples. However, the hierarchy width of a factor graph says nothing about the factors themselves and the functions they compute. This means that it, alone, tells us nothing about the model; for example, any distribution can be represented by a trivial factor graph with a single factor that contains all the variables. Therefore, in order to use hierarchy width to produce a result about the mixing time of Gibbs sampling, we constrain the maximum weight of the factors. Definition 4 (Maximum Factor Weight). A factor graph has maximum factor weight M, where M = max φ∈Φ max I φ(I) −min I φ(I) . For example, the maximum factor weight of the voting example with linear semantics is M = 2w; with logical semantics, it is M = 2w; and with ratio semantics, it is M = 2w log(n + 1). We now show that graphs with bounded hierarchy width and maximum factor weight mix rapidly. Theorem 2 (Polynomial Mixing Time). If G is a factor graph with n variables, at most s states per variable, e factors, maximum factor weight M, and hierarchy width h, then tmix ≤(log(4) + n log(s) + eM) n exp(3hM). In particular, if e is polynomial in n, the number of values for each variable is bounded, and hM = O(log n), then tmix(ϵ) = O(nO(1)). To show why bounding the hierarchy width is necessary for this result, we outline the proof of Theorem 2. Our technique involves bounding the absolute spectral gap γ(G) of the transition matrix of Gibbs sampling on graph G; there are standard results that use the absolute spectral gap to bound the mixing time of a process [10, p. 155]. Our proof proceeds via induction using the definition of hierarchy width and the following three lemmas. Lemma 4 (Connected Case). Let G and ¯G be two factor graphs with maximum factor weight M, which differ only inasmuch as G contains a single additional factor φ∗. Then, γ(G) ≥γ( ¯G) exp (−3M) . Lemma 5 (Disconnected Case). Let G be a disconnected factor graph with n variables and m connected components G1, G2, . . . , Gm with n1, n2, . . . nm variables, respectively. Then, γ(G) ≥min i≤m ni n γ(Gi). 5 Lemma 6 (Base Case). Let G be a factor graph with one variable and no factors. The absolute spectral gap of Gibbs sampling running on G will be γ(G) = 1. Using these Lemmas inductively, it is not hard to show that, under the conditions of Theorem 2, γ(G) ≥1 n exp (−3hM) ; converting this to a bound on the mixing time produces the result of Theorem 2. To gain more intuition about the hierarchy width, we compare its properties to those of the hypertree width. First, we note that, when the hierarchy width is bounded, the hypertree width is also bounded. Statement 1. For any factor graph G, tw(G) ≤hw(G). One of the useful properties of the hypertree width is that, for any fixed k, computing whether a graph G has hypertree width tw(G) ≤k can be done in polynomial time in the size of G. We show the same is true for the hierarchy width. Statement 2. For any fixed k, computing whether hw(G) ≤k can be done in time polynomial in the number of factors of G. Finally, we note that we can also bound the hierarchy width using the degree of the factor graph. Notice that a graph with unbounded node degree contains the voting program with linear semantics as a subgraph. This statement shows that bounding the hierarchy width disallows such graphs. Statement 3. Let d be the maximum degree of a variable in factor graph G. Then, hw(G) ≥d. 3 Factor Graph Templates Our study of hierarchy width is in part motivated by the desire to analyze the behavior of Gibbs sampling on factor graph templates, which are common in practice and used by many state-of-theart systems. A factor graph template is an abstract model that can be instantiated on a dataset to produce a factor graph. The dataset consists of objects, each of which represents a thing we want to reason about, which are divided into classes. For example, the object Bart could have class Person and the object Twilight could have class Movie. (There are many ways to define templates; here, we follow the formulation in Koller and Friedman [8, p. 213].) A factor graph template consists of a set of template variables and template factors. A template variable represents a property of a tuple of zero or more objects of particular classes. For example, we could have an IsPopular(x) template, which takes a single argument of class Movie. In the instantiated graph, this would take the form of multiple variables like IsPopular(Twilight) or IsPopular(Avengers). Template factors are replicated similarly to produce multiple factors in the instantiated graph. For example, we can have a template factor φ (TweetedAbout(x, y), IsPopular(x)) for some factor function φ. This would be instantiated to factors like φ (TweetedAbout(Avengers, Bart), IsPopular(Avengers)) . We call the x and y in a template factor object symbols. For an instantiated factor graph with template factors Φ, if we let Aφ denote the set of possible assignments to the object symbols in a template factor φ, and let φ(a, I) denote the value of its factor function in world I under the object symbol assignment a, then the standard way to define the energy function is with ϵ(I) = P φ∈Φ P a∈Aφ wφφ(a, I), (5) where wφ is the weight of template factor φ. This energy function results from the creation of a single factor φa(I) = φ(a, I) for each object symbol assignment a of φ. Unfortunately, this standard energy definition is not suitable for all applications. To deal with this, Shin et al. [20] introduce the notion of a semantic function g, which counts the of energy of instances of the factor template in a non-standard way. In order to do this, they first divide the object symbols of each template factor into two groups, the head symbols and the body symbols. When writing out factor templates, we distinguish head symbols by writing them with a hat (like ˆx). If we let Hφ denote the set of possible assignments to the head symbols, let Bφ denote the set of possible assignments 6 bounded factor weight bounded hypertree width voting (linear) polynomial mixing time bounded hierarchy width hierarchical templates voting (logical) voting (ratio) Figure 4: Subset relationships among classes of factor graphs, and locations of examples. to the body symbols, and let φ(h, b, I) denote the value of its factor function in world I under the assignment (h, b), then the energy of a world is defined as ϵ(I) = P φ∈Φ P h∈Hφ wφ(h) g P b∈Bφ φ(h, b, I) . (6) This results in the creation of a single factor φh(I) = g (P b φ(h, b, I)) for each assignment of the template’s head symbols. We focus on three semantic functions in particular [20]. For the first, linear semantics, g(x) = x. This is identical to the standard semantics in (5). For the second, logical semantics, g(x) = sgn(x). For the third, ratio semantics, g(x) = sgn(x) log(1+|x|). These semantics are analogous to the different semantics used in our voting example. Shin et al. [20] exhibit several classification problems where using logical or ratio semantics gives better F1 scores. 3.1 Hierarchical Factor Graphs In this section, we outline a class of templates, hierarchical templates, that have bounded hierarchy width. We focus on models that have hierarchical structure in their template factors; for example, φ(A(ˆx, ˆy, z), B(ˆx, ˆy), Q(ˆx, ˆy)) (7) should have hierarchical structure, while φ(A(z), B(ˆx), Q(ˆx, y)) (8) should not. Armed with this intuition, we give the following definitions. Definition 5 (Hierarchy Depth). A template factor φ has hierarchy depth d if the first d object symbols that appear in each of its terms are the same. We call these symbols hierarchical symbols. For example, (7) has hierarchy depth 2, and ˆx and ˆy are hierarchical symbols; also, (8) has hierarchy depth 0, and no hierarchical symbols. Definition 6 (Hierarchical). We say that a template factor is hierarchical if all of its head symbols are hierarchical symbols. For example, (7) is hierarchical, while (8) is not. We say that a factor graph template is hierarchical if all its template factors are hierarchical. We can explicitly bound the hierarchy width of instances of hierarchical factor graphs. Lemma 7. If G is an instance of a hierarchical template with E template factors, then hw(G) ≤E. We would now like to use Theorem 2 to prove a bound on the mixing time; this requires us to bound the maximum factor weight of the graph. Unfortunately, for linear semantics, the maximum factor weight of a graph is potentially O(n), so applying Theorem 2 won’t get us useful results. Fortunately, for logical or ratio semantics, hierarchical factor graphs do mix in polynomial time. Statement 4. For any fixed hierarchical factor graph template G, if G is an instance of G with bounded weights using either logical or ratio semantics, then the mixing time of Gibbs sampling on G is polynomial in the number of objects n in its dataset. That is, tmix = O nO(1) . So, if we want to construct models with Gibbs samplers that mix rapidly, one way to do it is with hierarchical factor graph templates using logical or ratio semantics. 4 Experiments Synthetic Data We constructed a synthetic dataset by using an ensemble of Ising model graphs each with 360 nodes, 359 edges, and treewidth 1, but with different hierarchy widths. These graphs 7 0.001 0.01 0.1 1 10 100 square error hierarchy width Errors of Marginal Estimates for Synthetic Ising Model w = 0.5 w = 0.7 w = 0.9 (a) Error of marginal estimates for synthetic Ising model after 105 samples. 0 0.05 0.1 0.15 0.2 0.25 0 20 40 60 80 100 mean square error iterations per variable Max Error of Marginal Estimate for KBP Dataset linear ratio logical (b) Maximum error marginal estimates for KBP dataset after some number of samples. Figure 5: Experiments illustrate how convergence is affected by hierarchy width and semantics. ranged from the star graph (like in Figure 1(a)) to the path graph; and each had different hierarchy width. For each graph, we were able to calculate the exact true marginal of each variable because of the small tree-width. We then ran Gibbs sampling on each graph, and calculated the error of the marginal estimate of a single arbitrarily-chosen query variable. Figure 5(a) shows the result with different weights and hierarchy width. It shows that, even for tree graphs with the same number of nodes and edges, the mixing time can still vary depending on the hierarchy width of the model. Real-World Applications We observed that the hierarchical templates that we focus on in this work appear frequently in real applications. For example, all five knowledge base population (KBP) systems illustrated by Shin et al. [20] contain subgraphs that are grounded by hierarchical templates. Moreover, sometimes a factor graph is solely grounded by hierarchical templates, and thus provably mixes rapidly by our theorem while achieving high quality. To validate this, we constructed a hierarchical template for the Paleontology application used by Shanan et al. [17]. We found that when using the ratio semantic, we were able to get an F1 score of 0.86 with precision of 0.96. On the same task, this quality is actually higher than professional human volunteers [17]. For comparison, the linear semantic achieved an F1 score of 0.76 and the logical achieved 0.73. The factor graph we used in this Paleontology application is large enough that it is intractable, using exact inference, to estimate the true marginal to investigate the mixing behavior. Therefore, we chose a subgraph of a KBP system used by Shin et al. [20] that can be grounded by a hierarchical template and chose a setting of the weight such that the true marginal was 0.5 for all variables. We then ran Gibbs sampling on this subgraph and report the average error of the marginal estimation in Figure 5(b). Our results illustrate the effect of changing the semantic on a more complicated model from a real application, and show similar behavior to our simple voting example. 5 Conclusion This paper showed that for a class of factor graph templates, hierarchical templates, Gibbs sampling mixes in polynomial time. It also introduced the graph property hierarchy width, and showed that for graphs of bounded factor weight and hierarchy width, Gibbs sampling converges rapidly. These results may aid in better understanding the behavior of Gibbs sampling for both template and general factor graphs. Acknowledgments Thanks to Stefano Ermon and Percy Liang for helpful conversations. The authors acknowledge the support of: DARPA FA8750-12-2-0335; NSF IIS-1247701; NSF CCF-1111943; DOE 108845; NSF CCF-1337375; DARPA FA8750-13-2-0039; NSF IIS-1353606; ONR N000141210041 and N000141310129; NIH U54EB020405; Oracle; NVIDIA; Huawei; SAP Labs; Sloan Research Fellowship; Moore Foundation; American Family Insurance; Google; and Toshiba. 8 References [1] Venkat Chandrasekaran, Nathan Srebro, and Prahladh Harsha. Complexity of inference in graphical models. arXiv preprint arXiv:1206.3240, 2012. [2] Persi Diaconis, Kshitij Khare, and Laurent Saloff-Coste. Gibbs sampling, exponential families and orthogonal polynomials. Statist. Sci., 23(2):151–178, May 2008. [3] Persi Diaconis, Kshitij Khare, and Laurent Saloff-Coste. Gibbs sampling, conjugate priors and coupling. Sankhya A, (1):136–169, 2010. [4] Pedro Domingos and William Austin Webb. A tractable first-order probabilistic logic. In AAAI, 2012. [5] Joseph Gonzalez, Yucheng Low, Arthur Gretton, and Carlos Guestrin. Parallel gibbs sampling: From colored fields to thin junction trees. In AISTATS, pages 324–332, 2011. [6] Georg Gottlob, Gianluigi Greco, and Francesco Scarcello. Treewidth and hypertree width. Tractability: Practical Approaches to Hard Problems, page 1, 2014. [7] Alexander T Ihler, John Iii, and Alan S Willsky. Loopy belief propagation: Convergence and effects of message errors. In Journal of Machine Learning Research, pages 905–936, 2005. [8] Daphne Koller and Nir Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. [9] Johan Kwisthout, Hans L Bodlaender, and Linda C van der Gaag. The necessity of bounded treewidth for efficient inference in bayesian networks. In ECAI, pages 237–242, 2010. [10] David Asher Levin, Yuval Peres, and Elizabeth Lee Wilmer. Markov chains and mixing times. American Mathematical Soc., 2009. [11] Xianghang Liu and Justin Domke. Projecting markov random field parameters for fast mixing. In Z. Ghahramani, M. Welling, C. Cortes, N.D. Lawrence, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 1377–1385. Curran Associates, Inc., 2014. [12] David Lunn, David Spiegelhalter, Andrew Thomas, and Nicky Best. The BUGS project: evolution, critique and future directions. Statistics in medicine, (25):3049–3067, 2009. [13] D´aniel Marx. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. Journal of the ACM (JACM), (6):42, 2013. [14] Andrew McCallum, Karl Schultz, and Sameer Singh. Factorie: Probabilistic programming via imperatively defined factor graphs. In NIPS, pages 1249–1257, 2009. [15] David Newman, Padhraic Smyth, Max Welling, and Arthur U Asuncion. Distributed inference for latent dirichlet allocation. In NIPS, pages 1081–1088, 2007. [16] Kee Siong Ng, John W Lloyd, and William TB Uther. Probabilistic modelling, inference and learning using logical theories. Annals of Mathematics and Artificial Intelligence, (1-3):159–205, 2008. [17] Shanan E Peters, Ce Zhang, Miron Livny, and Christopher R´e. A machine reading system for assembling synthetic Paleontological databases. PloS ONE, 2014. [18] David Poole. First-order probabilistic inference. In IJCAI, pages 985–991. Citeseer, 2003. [19] Neil Robertson and Paul D. Seymour. Graph minors. ii. algorithmic aspects of tree-width. Journal of algorithms, (3):309–322, 1986. [20] Jaeho Shin, Sen Wu, Feiran Wang, Christopher De Sa, Ce Zhang, Feiran Wang, and Christopher R´e. Incremental knowledge base construction using deepdive. PVLDB, 2015. [21] Parag Singla and Pedro Domingos. Lifted first-order belief propagation. In AAAI, pages 1094–1099, 2008. [22] Alexander Smola and Shravan Narayanamurthy. An architecture for parallel topic models. PVLDB, 2010. [23] Dan Suciu, Dan Olteanu, Christopher R´e, and Christoph Koch. Probabilistic databases. Synthesis Lectures on Data Management, (2):1–180, 2011. [24] Mihai Surdeanu and Heng Ji. Overview of the english slot filling track at the TAC2014 knowledge base population evaluation. [25] Lucas Theis, Jascha Sohl-dickstein, and Matthias Bethge. Training sparse natural image models with a fast gibbs sampler of an extended state space. In NIPS, pages 1124–1132. 2012. [26] Deepak Venugopal and Vibhav Gogate. On lifting the gibbs sampling algorithm. In F. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, NIPS, pages 1655–1663. Curran Associates, Inc., 2012. [27] Deepak Venugopal, Somdeb Sarkhel, and Vibhav Gogate. Just count the satisfied groundings: Scalable local-search and sampling based inference in mlns. In AAAI Conference on Artificial Intelligence, 2015. [28] Ce Zhang and Christopher R´e. DimmWitted: A study of main-memory statistical analytics. PVLDB, 2014. 9 | 2015 | 279 |
5,790 | Statistical Model Criticism using Kernel Two Sample Tests James Robert Lloyd Department of Engineering University of Cambridge Zoubin Ghahramani Department of Engineering University of Cambridge Abstract We propose an exploratory approach to statistical model criticism using maximum mean discrepancy (MMD) two sample tests. Typical approaches to model criticism require a practitioner to select a statistic by which to measure discrepancies between data and a statistical model. MMD two sample tests are instead constructed as an analytic maximisation over a large space of possible statistics and therefore automatically select the statistic which most shows any discrepancy. We demonstrate on synthetic data that the selected statistic, called the witness function, can be used to identify where a statistical model most misrepresents the data it was trained on. We then apply the procedure to real data where the models being assessed are restricted Boltzmann machines, deep belief networks and Gaussian process regression and demonstrate the ways in which these models fail to capture the properties of the data they are trained on. 1 Introduction Statistical model criticism or checking1 is an important part of a complete statistical analysis. When one fits a linear model to a data set a complete analysis includes computing e.g. Cook’s distances [3] to identify influential points or plotting residuals against fitted values to identify non-linearity or heteroscedasticity. Similarly, modern approaches to Bayesian statistics view model criticism as in important component of a cycle of model construction, inference and criticism [4]. As statistical models become more complex and diverse in response to the challenges of modern data sets there will be an increasing need for a greater range of model criticism procedures that are either automatic or widely applicable. This will be especially true as automatic modelling methods [e.g. 5, 6, 7] and probabilistic programming [e.g. 8, 9, 10, 11] mature. Model criticism typically proceeds by choosing a statistic of interest, computing it on data and comparing this to a suitable null distribution. Ideally these statistics are chosen to assess the utility of the statistical model under consideration (see applied examples [e.g. 4]) but this can require considerable expertise on the part of the modeller. We propose an alternative to this manual approach by using a statistic defined as a supremum over a broad class of measures of discrepancy between two distributions, the maximum mean discrepancy (MMD) [e.g. 12]). The advantage of this approach is that the discrepancy measure attaining the supremum automatically identifies regions of the data which are most poorly represented by the statistical model fit to the data. We demonstrate MMD model criticism on toy examples, restricted Boltzmann machines and deep belief networks trained on MNIST digits and Gaussian process regression models trained on several time series. Our proposed method identifies discrepancies between the data and fitted models that would not be apparent from predictive performance focused metrics. It is our belief that more effort should be expended on attempting to falsify models fitted to data, using model criticism techniques or otherwise. Not only would this aid research in targeting areas for improvement but it would give greater confidence in any conclusions drawn from a model. 1We follow Box [1] using the term ‘model criticism’ for similar reasons to O’Hagan [2]. 1 2 Model criticism Suppose we observe data Y obs = (yobs i )i=1...n and we attempt to fit a model M with parameters θ. After performing a statistical analysis we will have either an estimate, ˆθ, or an (approximate) posterior, p(θ | Y obs, M), for the parameters. How can we check whether any aspects of the data were poorly modelled? Criticising prior assumptions The classical approach to model criticism is to attempt to falsify the null hypothesis that the data could have been generated by the model M for some value of the parameters θ i.e. Y obs ∼p(Y | θ, M). This is typically achieved by constructing a statistic T of the data whose distribution does not depend on the parameters θ i.e. a pivotal quantity. The extent to which the observed data Y obs differs from expectations under the model M can then be quantified with a tail-area based p-value pfreq(Y obs) = P(T(Y ) ≥T(Y obs)) where Y ∼p(Y | θ, M) for any θ. (2.1) Analogous quantities in a Bayesian analysis are the prior predictive p-values of Box [1]. The null hypothesis is replaced with the claim that the data could have been generated from the prior predictive distribution Y obs ∼ R p(Y | θ, M)p(θ | M)dθ. A tail-area p-value can then be constructed for any statistic T of the data pprior(Y obs) = P(T(Y ) ≥T(Y obs)) where Y ∼ Z p(Y | θ, M)p(θ | M)dθ. (2.2) Both of these procedures construct a function of the data p(Y obs) whose distribution under a suitable null hypothesis is uniform i.e. a p-value. The p-value quantifies how surprising it would be for the data Y obs to have been generated by the model. The different null hypotheses reflect the different uses of the word ‘model’ in frequentist and Bayesian analyses. A frequentist model is a class of probability distributions over data indexed by parameters whereas a Bayesian model is a joint probability distribution over data and parameters. Criticising estimated models or posterior distributions A constrasting method of Bayesian model criticism is the calculation of posterior predictive p-values ppost [e.g. 13, 14] where the prior predictive distribution in (2.2) is replaced with the posterior predictive distribution Y ∼ R p(Y | θ, M)p(θ | Y obs, M)dθ. The corresponding test for an analysis resulting in a point estimate of the parameters ˆθ would use the plug-in predictive distribution Y ∼p(Y | ˆθ, M) to form the plug-in p-value pplug. These p-values quantify how surprising the data Y obs is even after having observed it. A simple variant of this method of model criticism is to use held out data Y ∗, generated from the same distribution as Y obs, to compute a p-value i.e. p(Y ∗) = P(T(Y ) ≥T(Y ∗)). This quantifies how surprising the held out data is after having observed Y obs. Which type of model criticism should be used? Different forms of model criticism are appropriate in different contexts, but we believe that posterior predictive and plug-in p-values will be most often useful for highly flexible models. For example, suppose one is fitting a deep belief network to data. Classical p-values would assume a null hypothesis that the data could have been generated from some deep belief network. Since the space of all possible deep belief networks is very large it will be difficult to ever falsify this hypothesis. A more interesting null hypothesis to test in this example is whether or not our particular deep belief network can faithfully mimick the distribution of the sample it was trained on. This is the null hypothesis of posterior or plug-in p-values. 3 Model criticism using maximum mean discrepancy two sample tests We assume that our data Y obs are i.i.d. samples from some distribution (yobs i )i=1...n ∼iid p(y | θ, M). After performing inference resulting in a point estimate of the parameters ˆθ, the null hypothesis associated with a plug-in p-value is (yobs i )i=1...n ∼iid p(y | ˆθ, M). We can test this null hypothesis using a two sample test [e.g. 15, 16]. In particular, we have samples of data (yobs i )i=1...n and we can generate samples from the plug-in predictive distribution (yrep i )i=1...m ∼iid p(y | ˆθ, M) and then test whether or not these samples could have been generated 2 from the same distribution. For consistency with two sample testing literature we now switch notation; suppose we have samples X = (xi)i=1...m and Y = (yi)i=1...n drawn i.i.d. from distributions p and q respectively. The two sample problem asks if p = q. A way of answering the two sample problem is to consider maximum mean discrepancy (MMD) [e.g. 12] statistics MMD(F, p, q) = sup f∈F (Ex∼p[f(x)] −Ey∼q[f(y)]) (3.1) where F is a set of functions. When F is a reproducing kernel Hilbert space (RKHS) the function attaining the supremum can be derived analytically and is called the witness function f(x) = Ex′∼p[k(x, x′)] −Ex′∼q[k(x, x′)] (3.2) where k is the kernel of the RKHS. Substituting (3.2) into (3.1) and squaring yields MMD2(F, p, q) = Ex,x′∼p[k(x, x′)] + 2Ex∼p,y∼q[k(x, y)] + Ey,y′∼q[k(y, y′)]. (3.3) This expression only involves expectations of the kernel k which can be estimated empirically by MMD2 b(F, X, Y ) = 1 m2 m X i,j=1 k(xi, xj) − 2 mn m,n X i,j=1 k(xi, yj) + 1 n2 n X i,j=1 k(yi, yj). (3.4) One can also estimate the witness function from finite samples ˆf(x) = 1 m m X i=1 k(x, xi) −1 n n X i=1 k(x, yi) (3.5) i.e. the empirical witness function is the difference of two kernel density estimates [e.g. 17, 18]. This means that we can interpret the witness function as showing where the estimated densities of p and q are most different. While MMD two sample tests are well known in the literature the main contribution of this work is to show that this interpretability of the witness function makes them a useful tool as an exploratory form of statistical model criticism. 4 Examples on toy data To illustrate the use of the MMD two sample test as a tool for model criticism we demonstrate its properties on two simple datasets and models. Newcomb’s speed of light data A histogram of Simon Newcomb’s 66 measurements used to determine the speed of light [19] is shown on the left of figure 1. We fit a normal distribution to this data by maximum likelihood and ask whether this model is a faithful representation of the data. −50 −40 −30 −20 −10 0 10 20 30 40 0 2 4 6 8 10 12 14 16 18 Deviations from 24,800 nanoseconds Count −60 −40 −20 0 20 40 60 0 0.05 0.1 Density estimate Deviations from 24,800 nansoeconds −60 −40 −20 0 20 40 60 −0.2 0 0.2 Witness function −60 −40 −20 0 20 40 60 0 0.05 0.1 Density estimate Deviations from 24,800 nansoeconds −60 −40 −20 0 20 40 60 −0.05 0 0.05 0.1 Witness function Figure 1: Left: Histogram of Simon Newcomb’s speed of light measurements. Middle: Histogram together with density estimate (red solid line) and MMD witness function (green dashed line). Right: Histogram together with updated density estimate and witness function. We sampled 1000 points from the fitted distribution and performed an MMD two sample test using a radial basis function kernel2. The estimated p-value of the test was less than 0.001 i.e. a clear disparity between the model and data. The data, fitted density estimate (normal distribution) and witness function are shown in the middle of figure 1. The witness function has a trough at the centre of the data and peaks either side indicating that the fitted model has placed too little mass in its centre and too much mass outside its centre. 2 Throughout this paper we estimate the null distribution of the MMD statistic using the bootstrap method described in [12] using 1000 replicates. We use a radial basis function kernel and select the lengthscale by 5 fold cross validation using predictive likelihood of the kernel density estimate as the selection criterion. 3 This suggests that we should modify our model by either using a distribution with heavy tails or explicitly modelling the possibility of outliers. However, to demonstrate some of the properties of the MMD two sample test we make an unusual choice of fitting a Gaussian by maximum likelihood, but ignoring the two outliers in the data. The new fitted density estimate (the normal distribution) and witness function of an MMD test are shown on the right of figure 1. The estimated p-value associated with the MMD two sample test is roughly 0.5 despite the fitted model being a very poor explanation of the outliers. The nature of an MMD test depends on the kernel defining the RKHS in equation (3.1). In this paper we use the radial basis function kernel which encodes for smooth functions with a typical lengthscale [e.g. 20]. Consequently the test identifies ‘dense’ discrepancies, only identifying outliers if the model and inference method are not robust to them. This is not a failure; a test that can identify too many types of discrepancy would have low statistical power (see [12] for discussion of the power of the MMD test and alternatives). High dimensional data The interpretability of the witness functions comes from being equal to the difference of two kernel density estimates. In high dimensional spaces, kernel density estimation is a very high variance procedure that can result in poor density estimates which destroy the interpretability of the method. In response, we consider using dimensionality reduction techniques before performing two sample tests. We generated synthetic data from a mixture of 4 Gaussians and a t-distribution in 10 dimensions3. We then fit a mixture of 5 Gaussians and performed an MMD two sample test. We reduced the dimensionality of the data using principal component analysis (PCA), selecting the first two principal components. To ensure that the MMD test remains well calibrated we include the PCA dimensionality reduction within the bootstrap estimation of the null distribution. The data and plug-in predictive samples are plotted on the left of figure 2. While we can see that one cluster is different from the rest, it is difficult to assess by eye if these distributions are different — due in part to the difficulty of plotting two sets of samples on top of each other. −8 −6 −4 −2 0 2 4 6 −4 −3 −2 −1 0 1 2 3 4 5 6 −0.035 −0.03 −0.025 −0.02 −0.015 −0.01 −0.005 0 0.005 0.01 Figure 2: Left: PCA projection of synthetic high dimensional cluster data (green circles) and projection of samples from fitted model (red circles). Right: Witness function of MMD model criticism. The poorly fit cluster is clearly identified. The MMD test returns a p-value of 0.05 and the witness function (right of figure 2) clearly identifies the cluster that has been incorrectly modelled. Presented with this discrepancy a statistical modeller might try a more flexible clustering model [e.g. 21, 22]. The p-value of the MMD statistic can also be made non-significant by fitting a mixture of 10 Gaussians; this is a sufficient approximation to the t-distribution such that no discrepancy can be detected with the amount of data available. 5 What exactly do neural networks dream about? “To recognize shapes, first learn to generate images” quoth Hinton [23]. Restricted Boltzmann Machine (RBM) pretraining of neural networks was shown by [24] to learn a deep belief network (DBN) for the data i.e. a generative model. In agreement with this observation, as well as computing estimates of marginal likelihoods and testing errors, it is standard to demonstrate the effectiveness of a generative neural network by generating samples from the distribution it has learned. 3For details see code at [redacted] 4 When trained on the MNIST handwritten digit data, samples from RBMs (see figure 3a for random samples4) and DBNs certainly look like digits, but it is hard to detect any systematic anomalies purely by visual inspection. We now use MMD model criticism to investigate how faithfully RBMs and DBNs can capture the distribution over handwritten digits. RBMs can consistently mistake the identity of digits We trained an RBM with architecture (784) ↔(500) ↔(10)5 using 15 epochs of persistent contrastive divergence (PCD-15), a batch size of 20 and a learning rate of 0.1 (i.e. we used the same settings as the code available at the deep learning tutorial [25]). We generated 3000 independent samples from the learned generative model by initialising the network with a random training image and performing 1000 gibbs updates with the digit labels clamped6 to generate each image (as in e.g. [23]). Since we generated digits from the class conditional distributions we compare each class separately. Rather than show plots of the witness function for each digit we summarise the witness function by examples of digits closest to the peaks and troughs of the witness function (the witness function estimate is differentiable so we can find the peaks and troughs by gradient based optimisation). We apply MMD model criticism to each class conditional distribution, using PCA to reduce to 2 dimensions as in section 4. a) b) c) d) e) f) Figure 3: a) Random samples from an RBM. b) Peaks of the witness function for the RBM (digits that are over-represented by the model). c) Peaks of the witness function for samples from 1500 RBMs (with differently initialised pseudo random number generators during training). d) Peaks of the witness function for the DBN. e) Troughs (digits that are under-represented by the model) of the witness function for samples from 1500 RBMs. f) Troughs of the witness function for the DBN. Figure 3b shows the digits closest to the two most extreme peaks of the witness function for each class; the peaks indicate where the fitted distribution over-represents the distribution of true digits. The estimated p-value for all tests was less than 0.001. The most obvious problem with these digits is that the first 2 and 3 look quite similar. To test that this was not just an single unlucky RBM, we trained 1500 RBMs (with differently initialised pseudo random number generators) and generated one sample from each and performed the same tests. The estimated p-values were again all less than 0.001 and the summaries of the peaks of the witness function are shown in figure 3c. On the first toy data example we observed that the MMD statistic does not highlight outliers and therefore we can conclude that RBMs are making consistent mistakes e.g. generating a 0 from the 7 distribution or a 5 when it should have been generating an 8. DBNs have nightmares about ghosts We now test the effectiveness of deep learning to represent the distribution of MNIST digits. In particular, we fit a DBN with architecture (784) ←(500) ← (500) ↔(2000) ↔(10) using RBM pre-training and a generative fine tuning algorithm described in [24]. Performing the same tests with 3000 samples results in estimated p-values of less than 0.001 except for the digit 4 (0.150) and digit 7 (0.010). Summaries of the witness function peaks are shown in figure 3d. 4 Specifically these are the activations of the visible units before sampling sampling binary values. This procedure is an attempt to be consistent with the grayscale input distribution of the images. Analogous discrepancies would be discovered if we had instead sampled binary pixel values. 5That is, 784 input pixels and 10 indicators of the class label are connected to 500 hidden neurons. 6Without clamping the label neurons, the generative distribution is heavily biased towards certain digits. 5 The witness function no longer shows any class label mistakes (except perhaps for the digit 1 which looks very peculiar) but the 2, 3, 7 and 8 appear ‘ghosted’ — the digits fade in and out. For comparison, figure 3f shows digits closest to the troughs of the witness function; there is no trace of ghosting. This discrepancy could be due to errors in the autoassociative memory of a DBN propogating down the hidden layers resulting in spurious features in several visible neurons. 6 An extension to non i.i.d. data We now describe how the MMD statistic can be used for model criticism of non i.i.d. predictive distributions. In particular we construct a model criticism procedure for regression models. We assume that our data consists of pairs of inputs and outputs (xobs i , yobs i )i=1...n. A typical formulation of the problem of regression is to estimate the conditional distribution of the outputs given the inputs p(y | x, θ). Ignoring that our data are not i.i.d. we can generate data from the plug-in conditional distribution yrep i ∼p(y | xobs i , ˆθ) and compute the empirical MMD estimate (3.4) between (xobs i , yobs i )i=1...n and (xobs i , yrep i )i=1...n. The only difference between this test and the MMD two sample test is that our data is generated from a conditional distribution, rather than being i.i.d. . The null distribution of this statistic can be trivially estimated by sampling several sets of replicate data from the plug-in predictive distribution. Dataset Lin SE SP ABCD Airline 0.34 0.36 0.07 0.15 Solar 0.00 0.00 0.00 0.05 Mauna 0.00 0.99 0.34 0.21 Wheat 0.00 0.00 0.00 0.19 Temperature 0.44 0.54 0.68 0.75 Internet 0.00 0.00 0.05 0.01 Call centre 0.00 0.02 0.00 0.07 Radio 0.00 0.00 0.00 0.00 Gas production 0.00 0.00 0.01 0.11 Sulphuric 0.00 0.29 0.34 0.52 Unemployment 0.00 0.00 0.00 0.01 Births 0.00 0.00 0.00 0.12 Wages 0.00 0.00 0.01 0.00 Table 1: Two sample test p-values applied to 13 time series and 4 regression algorithms. Bold values indicate a positive discovery using a Benjamini–Hochberg procedure with a false discovery rate of 0.05 for each method. To demonstrate this test we apply it to 4 regression algorithms and 13 time series analysed in [7]. In this work the authors compare several methods for constructing Gaussian process [e.g. 20] regression models. Example data sets are shown in figures 4 and 5. While it is clear that simple methods will fail to capture all of the structure in this data, it is not clear a priori how much better the more advanced methods will fair. To construct p-values we use held out data using the same split of training and testing data as the interpolation experiment in [7]7. Table 1 shows a table of p-values for 13 data sets and 4 regression methods. The four methods are linear regression (Lin), Gaussian process regression using a squared exponential kernel (SE), spectral mixture kernels [26] (SP) and the method proposed in [7] (ABCD). Values in bold indicate a positive discovery after a Benjamini– Hochberg [27] procedure with a false discovery rate of 0.05 applied to each model construction method. We now investigate the type of discrepancies found by this test by looking at the witness function (which can still be interpreted as the difference of kernel density estimates). Figure 4 shows the solar and gas production data sets, the posterior distribution of the SE fits to this data and the witness functions for the SE fit. The solar witness function has a clear narrow trough, indicating that the data is more dense than expected by the fitted model in this region. We can see that this has identified a region of low variability in the data i.e. it has identified local heteroscedasticity not captured by the model. Similar conclusions can be drawn about the gas production data and witness function. Of the four methods compared here, only ABCD is able to model heteroscedasticity, explaining why it is the only method with a substantially different set of significant p-values. However, the procedure is still potentially failing to capture structure on four of the datasets. 7Gaussian processes when applied to regression problems learn a joint distribution of all output values. However this joint distribution information is rarely used; typically only the pointwise conditional distributions p(y | xobs i , ˆθ) are used as we have done here. 6 x y Solar 1650 1700 1750 1800 1850 1900 1950 2000 1360.2 1360.4 1360.6 1360.8 1361 1361.2 1361.4 1361.6 1361.8 50 100 150 200 20 40 60 80 100 120 140 160 180 200 −0.08 −0.07 −0.06 −0.05 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 x y Gas production 1960 1965 1970 1975 1980 1985 1990 1995 1 2 3 4 5 6 x 10 4 50 100 150 200 20 40 60 80 100 120 140 160 180 200 −0.04 −0.03 −0.02 −0.01 0 0.01 0.02 Figure 4: From left to right: Solar data with SE posterior. Witness function of SE fit to solar. Gas production data with SE posterior. Witness function of SE fit to gas production. Figure 5 shows the unemployment and Internet data sets, the posterior distribution for the ABCD fits to the data and the witness functions of the ABCD fits. The ABCD method has captured much of the structure in these data sets, making it difficult to visually identify discrepancies between model and data. The witness function for unemployment shows peaks and troughs at similar values of the input x. Comparing to the raw data we see that at these input values there are consistent outliers. Since ABCD is based on Gaussianity assumptions these consistent outliers have caused the method to estimate a large variance in this region, when the true data is non-Gaussian. There is also a similar pattern of peaks and troughs on the Internet data suggesting that non-normality has again been detected. Indeed, the data appears to have a hard lower bound which is inconsistent with Gaussianity. x y Unemployment 1950 1955 1960 1965 1970 1975 1980 200 300 400 500 600 700 800 900 1000 1100 1200 50 100 150 200 20 40 60 80 100 120 140 160 180 200 −0.02 −0.015 −0.01 −0.005 0 0.005 0.01 0.015 0.02 x y Internet 2004.9 2004.92 2004.94 2004.96 2004.98 2005 2005.02 2005.04 2005.06 2 3 4 5 6 7 8 9 10 11 x 10 4 50 100 150 200 20 40 60 80 100 120 140 160 180 200 −0.01 −0.008 −0.006 −0.004 −0.002 0 0.002 0.004 0.006 0.008 0.01 Figure 5: From left to right: Unemployment data with ABCD posterior. Witness function of ABCD fit to unemployment. Internet data with ABCD posterior. Witness function of ABCD fit to Internet. 7 Discussion of model criticism and related work Are we criticising a particular model, or class of models? In section 2 we interpreted the differences between classical, Bayesian prior/posterior and plug-in p-values as corresponding to different null hypotheses and interpretations of the word ‘model’. In particular classical p-values test a null hypothesis that the data could have been generated by a class of distributions (e.g. all normal distributions) whereas all other p-values test a particular probability distribution. Robins, van der Vaart & Ventura [28] demonstrated that Bayesian and plug-in p-values are not classical p-values (frequentist p-values in their terminology) i.e. they do not have a uniform distribution under the relevant null hypothesis. However, this was presented as a failure of these methods; in particular they demonstrated that methods proposed by Bayarri & Berger [29] based on posterior predictive p-values are asymptotically classical p-values. This claimed inadequacy of posterior predictive p-values was rebutted [30] and while their usefulness is becoming more accepted (see e.g. introduction of [31]) it would appear there is still confusion on the subject [32]. We hope that our interpretation of the differences between these methods as different null hypotheses — appropriate in different circumstances — sheds further light on the matter. Should we worry about using the same data for traning and criticism? Plug-in and posterior predictive p-values test the null hypothesis that the observed data could have been generated by the fitted model or posterior predictive distribution. In some situations it may be more appropriate to attempt to falsify the null hypothesis that future data will be generated by the plug-in or posterior predictive distribution. As mentioned in section 2 this can be achieved by reserving a portion of the data to be used for model criticism alone, rather than fitting a model or updating a posterior on the full data. Cross validation methods have also been investigated in this context [e.g. 33, 34]. 7 Other methods for evaluating statistical models Other typical methods of model evaluation include estimating the predictive performance of the model, analyses of sensitivities to modelling parameters / priors, graphical tests, and estimates of model utility. For a recent survey of Bayesian methods for model assessment, selection and comparison see [35] which phrases many techniques as estimates of the utility of a model. For some discussion of sensitivity analysis and graphical model comparison see [e.g. 4]. In this manuscript we have focused on methods that compare statistics of data with predictive distributions, ignoring parameters of the model. The discrepancy measures of [36] compute statistics of data and parameters; examples can be found in [4]. O’Hagan [2] also proposes a method and selectively reviews techniques for model criticism that also take model parameters into account. In the spirit of scientific falsification [e.g. 37], ideally all methods of assessing a model should be performed to gain confidence in any conclusions made. Of course, when performing multiple hypothesis tests care must be taken in the intrepetation of individual p-values. 8 Conclusions and future work In this paper we have demonstrated an exploratory form of model criticism based on two sample tests using kernel maximum mean discrepancy. In contrast to other methods for model criticism, the test analytically maximises over a broad class of statistics, automatically identifying the statistic which most demonstrates the discrepancy between the model and data. We demonstrated how this method of model criticism can be applied to neural networks and Gaussian process regression and demonstrated the ways in which these models were misrepresenting the data they were trained on. We have demonstrated an application of MMD two sample tests to model criticism, but they can also be applied to any aspect of statistical modelling where two sample tests are appropriate. This includes for example, Geweke’s tests of markov chain posterior sampler validity [38] and tests of markov chain convergence [e.g. 39]. The two sample tests proposed in this paper naturally apply to i.i.d. data and models, but model criticism techniques should of course apply to models with other symmetries (e.g. exchangeable data, logitudinal data / time series, graphs, and many others). We have demonstrated an adaptation of the MMD test to regression models but investigating extensions to a greater number of model classes would be a profitable area for future study. We conclude with a question. Do you know how the model you are currently working with most misrepresents the data it is attempting to model? In proposing a new method of model criticism we hope we have also exposed the reader unfamiliar with model criticism to its utility in diagnosing potential inadequacies of a model. References [1] George E P Box. Sampling and Bayes’ inference in scientific modelling and robustness. J. R. Stat. Soc. Ser. A, 143(4):383–430, 1980. [2] A O’Hagan. HSSS model criticism. Highly Structured Stochastic Systems, pages 423–444, 2003. [3] Dennis Cook and Sanford Weisberg. Residuals and inuence in regression. Mon. on Stat. and App. Prob., 1982. [4] A Gelman, J B Carlin, H S Stern, D B Dunson, A Vehtari, and D B Rubin. Bayesian Data Analysis, Third Edition. Chapman & Hall/CRC Texts in Statistical Science. Taylor & Francis, 2013. [5] Roger B Grosse, Ruslan Salakhutdinov, William T Freeman, and Joshua B Tenenbaum. Exploiting compositionality to explore a large space of model structures. In Conf. on Unc. in Art. Int. (UAI), 2012. [6] Chris Thornton, Frank Hutter, Holger H Hoos, and Kevin Leyton-Brown. Auto-WEKA: Combined selection and hyperparameter optimization of classification algorithms. In Proc. Int. Conf. on Knowledge Discovery and Data Mining, KDD ’13, pages 847–855, New York, NY, USA, 2013. ACM. [7] James Robert Lloyd, David Duvenaud, Roger Grosse, Joshua B Tenenbaum, and Zoubin Ghahramani. Automatic construction and Natural-Language description of nonparametric regression models. In Association for the Advancement of Artificial Intelligence (AAAI), July 2014. [8] D Koller, D McAllester, and A Pfeffer. Effective bayesian inference for stochastic programs. Association for the Advancement of Artificial Intelligence (AAAI), 1997. 8 [9] B Milch, B Marthi, S Russel, D Sontag, D L Ong, and A Kolobov. BLOG: Probabilistic models with unknown objects. In Proc. Int. Joint Conf. on Artificial Intelligence, 2005. [10] Noah D Goodman, Vikash K Mansinghka, Daniel M Roy, Keith Bonawitz, and Joshua B Tenenbaum. Church : a language for generative models. In Conf. on Unc. in Art. Int. (UAI), 2008. [11] Stan Development Team. Stan: A C++ library for probability and sampling, version 2.2, 2014. [12] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Berhard Sch¨olkopf, and Alexander Smola. A kernel method for the two-sample problem. Journal of Machine Learning Research, 1:1–10, 2008. [13] Irwin Guttman. The use of the concept of a future observation in goodness-of-fit problems. J. R. Stat. Soc. Series B Stat. Methodol., 29(1):83–100, 1967. [14] Donald B Rubin. Bayesianly justifiable and relevant frequency calculations for the applied statistician. Ann. Stat., 12(4):1151–1172, 1984. [15] Harold Hotelling. A generalized t-test and measure of multivariate dispersion. In Proc. 2nd Berkeley Symp. Math. Stat. and Prob. The Regents of the University of California, 1951. [16] P J Bickel. A distribution free version of the smirnov two sample test in the p-variate case. Ann. Math. Stat., 40(1):1–23, 1 February 1969. [17] Murray Rosenblatt. Remarks on some nonparametric estimates of a density function. Ann. Math. Stat., 27(3):832–837, September 1956. [18] E Parzen. On estimation of a probability density function and mode. Ann. Math. Stat., 1962. [19] Stephen M Stigler. Do robust estimators work with real data? Ann. Stat., 5(6):1055–1098, November 1977. [20] C E Rasmussen and C K Williams. Gaussian Processes for Machine Learning. The MIT Press, Cambridge, MA, USA, 2006. [21] D Peel and G J McLachlan. Robust mixture modelling using the t distribution. Stat. Comput., 10(4):339– 348, 1 October 2000. [22] Tomoharu Iwata, David Duvenaud, and Zoubin Ghahramani. Warped mixtures for nonparametric cluster shapes. In Conf. on Unc. in Art. Int. (UAI). arxiv.org, 2013. [23] Geoffrey E Hinton. To recognize shapes, first learn to generate images. Prog. Brain Res., 165:535–547, 2007. [24] Geoffrey E Hinton, Simon Osindero, and Yee Whye Teh. A fast learning algorithm for deep belief nets. Neural Comput., 18(7):1527–1554, 2006. [25] Deep learning tutorial - http://www.deeplearning.net/tutorial/, 2014. [26] Andrew Gordon Wilson and Ryan Prescott Adams. Gaussian process covariance kernels for pattern discovery and extrapolation. In Proc. Int. Conf. Machine Learn., 2013. [27] Yoav Benjamini and Yosef Hochberg. Controlling the false discovery rate: A practical and powerful approach to multiple testing. J. R. Stat. Soc. Series B Stat. Methodol., 1995. [28] James M Robins, Aad van der Vaart, and Valerie Venture. Asymptotic distribution of p-values in composite null models. J. Am. Stat. Assoc., 95(452):1143–1156, 2000. [29] M J Bayarri and J O Berger. Quantifying surprise in the data and model verification. Bayes. Stat., 1999. [30] Andrew Gelman. A Bayesian formulation of exploratory data analysis and goodness-of-fit testing. Int. Stat. Rev., 2003. [31] M J Bayarri and M E Castellanos. Bayesian checking of the second levels of hierarchical models. Stat. Sci., 22(3):322–343, August 2007. [32] Andrew Gelman. Understanding posterior p-values. Elec. J. Stat., 2013. [33] A E Gelfand, D K Dey, and H Chang. Model determination using predictive distributions with implementation via sampling-based methods. Technical Report 462, Stanford Uni CA Dept Stat, 1992. [34] E C Marshall and D J Spiegelhalter. Identifying outliers in bayesian hierarchical models: a simulationbased approach. Bayesian Anal., 2(2):409–444, June 2007. [35] Aki Vehtari and Janne Ojanen. A survey of Bayesian predictive methods for model assessment, selection and comparison. Stat. Surv., 6:142–228, 2012. [36] Andrew Gelman, Xiao-Li Meng, and Hal Stern. Posterior predictive assessment of model fitness via realized discrepancies. Stat. Sin., 6:733–807, 1996. [37] K Popper. The logic of scientific discovery. Routledge, 2005. [38] John Geweke. Getting it right. J. Am. Stat. Assoc., 99(467):799–804, September 2004. [39] Mary Kathryn Cowles and Bradley P Carlin. Markov chain monte carlo convergence diagnostics: A comparative review. J. Am. Stat. Assoc., 91(434):883–904, 1 June 1996. 9 | 2015 | 28 |
5,791 | A Reduced-Dimension fMRI Shared Response Model Po-Hsuan Chen1, Janice Chen2, Yaara Yeshurun2, Uri Hasson2, James V. Haxby3, Peter J. Ramadge1 1Department of Electrical Engineering, Princeton University 2Princeton Neuroscience Institute and Department of Psychology, Princeton University 3Department of Psychological and Brain Sciences and Center for Cognitive Neuroscience, Dartmouth College Abstract Multi-subject fMRI data is critical for evaluating the generality and validity of findings across subjects, and its effective utilization helps improve analysis sensitivity. We develop a shared response model for aggregating multi-subject fMRI data that accounts for different functional topographies among anatomically aligned datasets. Our model demonstrates improved sensitivity in identifying a shared response for a variety of datasets and anatomical brain regions of interest. Furthermore, by removing the identified shared response, it allows improved detection of group differences. The ability to identify what is shared and what is not shared opens the model to a wide range of multi-subject fMRI studies. 1 Introduction Many modern fMRI studies of the human brain use data from multiple subjects. The use of multiple subjects is critical for assessing the generality and validity of the findings across subjects. It is also increasingly important since from one subject one can gather at most a few thousand noisy instances of functional response patterns. To increase the power of multivariate statistical analysis, one therefore needs to aggregate response data across multiple subjects. However, the successful aggregation of fMRI brain imaging data across subjects requires resolving the major problem that both anatomical structure and functional topography vary across subjects [1, 2, 3, 4]. Moreover, it is well known that standard methods of anatomical alignment [1, 4, 5] do not adequately align functional topography [4, 6, 7, 8, 9]. Hence anatomical alignment is often followed by spatial smoothing of the data to blur functional topographies. Recently, functional spatial registration methods have appeared that use cortical warping to maximize inter-subject correlation of time series [7] or inter-subject correlation of functional connectivity [8, 9]. A more radical approach learns a latent multivariate feature that models the shared component of each subject’s response [10, 11, 12]. Multivariate statistical analysis often begins by identifying a set of features that capture the informative aspects of the data. For example, in fMRI analysis one might select a subset of voxels within an anatomical region of interest (ROI), or select a subset of principal components of the ROI, then use these features for subsequent analysis. In a similar way, one can think of the fMRI data aggregation problem as a two step process. First use training data to learn a mapping of each subject’s measured data to a shared feature space in a way that captures the across-subject shared response. Then use these learned mappings to project held out data for each subject into the shared feature space and perform a statistical analysis. To make this more precise, let {Xi ∈Rv×d}m i=1 denote matrices of training data (v voxels in the ROI, over d TRs) for m subjects. We propose using this data to learn subject specific bases Wi ∈Rv×k, where k is to be selected, and a shared matrix S ∈Rk×d of feature responses such that Xi = WiS + Ei where Ei is an error term corresponding to unmodeled aspects of the subject’s response. One can think of the bases Wi as representing the individual functional topographies and S as a latent feature that captures the component of the response shared across subjects. We don’t claim that S is a sufficient statistic, but that is a useful analogy. 1 0 2 4 6 8 10 0.4 0.5 0.6 0.7 0 2 4 6 8 10 0.4 0.5 0.6 0.7 0 2 4 6 8 10 0.4 0.5 0.6 0.7 0 2 4 6 8 10 0.4 0.5 0 2 4 6 8 10 0.4 0.6 0 2 4 6 8 10 0.5 0.6 0.7 1 problem(1) k=50 1 problem(1) k=100 1 problem(1) k=500 1 problem(2) k=50 1 problem(2) k=100 1 problem(2) k=500 Iterations Test Accuracy Train Objective Figure 1: Comparison of training objective value and testing accuracy for problem (1) and (2) over various k on raider dataset with 500 voxels of ventral temporal cortex (VT) in image stimulus classficiation experiment (details in Sec.4). In all cases, error bars show ±1 standard error. The contribution of the paper is twofold: First, we propose a probabilistic generative framework for modeling and estimating the subject specific bases Wi and the shared response latent variable S. A critical aspect of the model is that it directly estimates k ≪v shared features. This is in contrast to methods where the number of features equals the number of voxels [10, 11]. Moreover, the Bayesian nature of the approach provides a natural means of incorporating prior domain knowledge. Second, we give a demonstration of the robustness and effectiveness of our data aggregation model using a variety of fMRI datasets captured on different MRI machines, employing distinct analysis pathways, and based on various brain ROIs. 2 Preliminaries fMRI time-series data Xi ∈Rv×d, i = 1 : m, is collected for m subjects as they are presented with identical, time synchronized stimuli. Here d is the number of time samples in TRs (Time of Repetition), and v is the number of voxels. Our objective is to model each subject’s response as Xi = WiS +Ei where Wi ∈Rv×k is a basis of topographies for subject i, k is a parameter selected by the experimenter, S ∈Rk×d is a corresponding time series of shared response coordinates, and Ei is an error term, i = 1:m. To ensure uniqueness of coordinates it is necessary that Wi has linearly independent columns. We make the stronger assumption that each Wi has orthonormal columns, W T i Wi = Ik. Two approaches for estimating the bases Wi and the shared response S are illustrated below: minWi,S P i ∥Xi −WiS∥2 F s.t. W T i Wi = Ik, (1) minWi,S P i ∥W T i Xi −S∥2 F s.t. W T i Wi = Ik, (2) where ∥· ∥F denotes the Frobenius norm. For k ≤v, (1) can be solved iteratively by first selecting initial conditions for Wi, i = 1:m, and optimizing (1) with respect to S by setting S = 1/m P i W T i Xi. With S fixed, (1) becomes m separate subproblems of the form min ∥Xi −WiS∥2 F with solution Wi = ˜Ui ˜V T i , where ˜Ui ˜Σi ˜V T i is an SVD of XiST [13]. These two steps can be iterated until a stopping criterion is satisfied. Similarly, for k ≤v, (2) can also be solved iteratively. However, for k < v, there is no known fast update of Wi given S. Hence this must be done using local gradient decent on the Stiefel manifold [14]. Both approaches yield the same solution when k = v, but are not equivalent in the more interesting situation k ≪v (Sup. Mat.). What is most important, however, is that problem (2) with k < v, often learns an uninformative shared response S. This is illustrated in Fig. 1 which plots of the value of the training objective and the test accuracy for a stimulus classification experiment versus iteration count (image classification using the raider fMRI dataset, see Sec.4). For problem (1), test accuracy increases with decreasing training error, Whereas for problem (2), test accuracy decreases with decreasing training error (This can be explained analytically, see Sup. Mat.). We therefore base our approach on a generalization of problem (1). We call the resulting S and {Wi}m i=1 a shared response model (SRM). Before extending this simple model, we note a few important properties. First, a solution of (1) is not unique. If S, {Wi}m i=1 is a solution, then so is QS, {WiQT }m i=1, for any k × k orthogonal matrix Q. This is not a problem as long as we only learn one template and one set of subject bases. Any new subjects or new data will be referenced to the original SRM. However, if we independently learn two SRMs, the group shared responses S1, S2, may not be registered (use the same Q). We register S1 to S2 by finding a k × k orthogonal matrix Q to minimize ∥S2 −QS1∥2 F ; then use QS1 in place of S1 and WjQT in place of Wj for subjects in the first SRM. Next, when projected onto the span of its basis, each subject’s training data Xi has coordinates Si = W T i Xi and the learning phase ensures S = 1/m Pm i Si. The projection to k shared features 2 and the averaging across subjects in feature space both contribute to across-subject denoising during the learning phase. By mapping S back into voxel space we obtain the voxel space manifestation WiS of the denoised, shared component of each subject’s training data. The training data of subject j can also be mapped through the shared response model to the functional topography and anatomy of subject i by the mapping ˆXi,j = WiW T j Xj. New subjects are easily added to an existing SRM S, {Wi}m i=1. We refer to S as the training template. To introduce a new subject j = m + 1 with training data Xj, form its orthonormal basis by minimizing the mean squared modeling error minWj,W T j Wj=Ik ∥Xj −WjS∥2 F . We solve this for the least norm solution. Note that S, and the existing W1:m do not change; we simply add a new subject by using its training data for the same stimulus and the template S to determine its basis of functional topographies. We can also add new data to an SRM. Let X′ i, i = 1:m, denote new data collected under a distinct stimulus from the same subjects. This is added to the study by forming S′ i = W T i X′ i, then averaging these projections to form the shared response for the new data: S′ = 1/m Pm i=1 W T i X′ i. This assumes the learned subject specific topographies Wi generalize to the new data. This usually requires a sufficiently rich stimulus in the learning phase. 3 Probabilistic Shared Response Model We now extend our simple shared response model to a probabilistic setting. Let xit ∈Rv denote the observed pattern of voxel responses of the i-th subject at time t. For the moment, assume these observations are centered over time. Let st ∈Rk be a hyperparameter modeling the shared response at time t = 1:d, and model the observation at time t for dataset i as the outcome of a random vector: xit ∼N(Wist, ρ2I), with W T i Wi = Ik, (3) where, xit takes values in Rv, Wi ∈Rv×k, i = 1:m, and ρ2 is a subject independent hyperparameter. The negative log-likelihood of this model is L = P t P i v 2 log 2π + v 2 log ρ2 + ρ−2 2 (xit − Wist)T (xit−Wist). Noting that xit is the t-th column of Xi, we see that minimizing L with respect to Wi and S = [s1, . . . , sd], requires the solution of: min P t P i(xit −Wist)T (xit −Wist) = min P i ∥Xi −WiS∥2 F . Thus maximum likelihood estimation for this model matches (1). In our fMRI datasets, and most multi-subject fMRI datasets available today, d ≫m. Since st is time specific but shared across the m subjects, we see that there is palpable value in regularizing its estimation. In contrast, subject specific variables such as Wi are shared across time, a dimension in which data is relatively plentiful. Hence, a natural extension of (3) is to make st a shared latent random vector st ∼N(0, Σs) taking values in Rk. The observation for dataset i at time t then has the conditional density p(xit|st) = N(Wist + µi, ρ2 i I), where the subject specific mean µi allows for a non-zero mean and we assume subject dependent isotropic noise covariance ρ2 i I. This is an extended multi-subject form of factor analysis, but in factor analysis one normally assumes Σs = I. To form a joint model, let xT t = [x1tT . . . xmtT ], W T = [W T 1 . . . W T m], µT = [µT 1 . . . µT m], Ψ = diag(ρ2 1I, . . . , ρ2 mI), ϵ ∼N(0, Ψ), and Σx = WΣsW T + Ψ. Then xt = Wst + µ + ϵ, (4) with xt ∼N(µ, Σx) taking values in Rmv. For this joint model, we formulate SRM as: st ∼N(0, Σs), xit|st ∼N(Wist + µi, ρ2 i I), (5) W T i Wi = Ik, st xit m d ⌃s Wi, µi, ⇢i Figure 2: Graphical model for SRM. Shaded nodes: observations, unshaded nodes: latent variables, and black squares: hyperparameters. where st takes values in Rk, xit takes values in Rv, and the hyperparameters Wi are matrices in Rv×k, i = 1:m. The latent variable st, with covariance Σs, models a shared elicited response across the subjects at time t. By applying the same orthogonal transform to each of the Wi, we can assume, without loss of generality, that Σs is diagonal. The SRM graphical model is displayed in Fig. 2. 3 3.1 Parameter Estimation for SRM To estimate the parameters of the SRM model we apply a constrained EM algorithm to find maximum likelihood solutions. Let θ denote the vector of all parameters. In the E-step, given initial value or estimated value θold from the previous M-step, we calculate the sufficient statistics by taking expectation with respect to p(st|xt, θold): Es|x[st] = (WΣs)T (WΣsW T + Ψ)−1(xt −µ), (6) Es|x[stsT t ] = Vars|x[st] + Es|x[st]Es|x[st]T = Σs −ΣT s W T (WΣsW T + Ψ)−1WΣs + Es|x[st]Es|x[st]T . (7) In the M-step, we update the parameter estimate to θnew by maximizing Q with respect to Wi, µi, ρ2 i , i = 1:m, and Σs. This is given by θnew = arg maxθ Q(θ, θold), where Q(θ, θold) = 1 d Pd t=1 R p(st|xt, θold) log p(xt, st|θ)dst. Due to the model structure, Q can be maximized with respect to each parameter separately. To enforce the orthogonality of Wi, we bring a symmetric matrix Λi of Lagrange multipliers and add the constraint term tr(Λi(W T i Wi −I)) to the objective function. Setting the derivatives of the modified objective to zero, we obtain the following update equations: µnew i = 1 d P t xit, (8) W new i = Ai(AT i Ai)−1/2, Ai = 1 2 P t(xit −µnew i )Es|x[st]T , (9) ρ2 i new = 1 dv P t ∥xit −µnew i ∥2 −2(xit −µnew i )T W new i Es|x[st] + tr(Es|x[stsT t ]) , (10) Σnew s = 1 d P t(Es|x[stsT t ]). (11) The orthonormal constraint W T i Wi = Ik in SRM is similar to that of PCA. In general, there is no reason to believe that key brain response patterns are orthogonal. So, the orthonormal bases found via SRM are a computational tool to aid statistical analysis within an ROI. From a computational viewpoint, orthogonality has the advantage of robustness and preserving temporal geometry. 3.2 Connections with related methods For one subject, SRM is similar to a variant of pPCA [15] that imposes an orthogonality constraint on the loading matrix. pPCA yields an orthogonal loading matrix. However, due to the increase in model complexity to handle multiple datasets, SRM has an explicit constraint of orthogonal loading matrices. Topographic Factor Analysis (TFA) [16] is a factor model using a topographic basis composed of spherical Gaussians with different centers and widths. This choice of basis is constraining but since each factor is an “blob” in the brain it has the advantage of providing a simple spatial interpretation. Hyperalignment (HA) [10], learns a shared representational by rotating subjects’ time series responses to maximize inter-subject time series correlation. The formulation in [10] is based on problem (2) with k = v and Wi a v × v orthogonal matrix (Sup. Mat.). So this method does not directly reduce the dimension of the feature space, nor does it directly extend to this case (see Fig. 1). Although dimensionality reduction can be done posthoc using PCA, [10] shows that this doesn’t lead to performance improvement. In contrast, we show in §4 that selecting k ≪v can improve the performance of SRM beyond that attained by HA. The GICA, IVA algorithms [17] do not assume time-synchronized stimulus and hence concatenate data along the time dimension (implying spatial consistency) and learn spatial independent components. We use the assumption of a time-synchronized stimulus for anchoring the shared response to overcome a spatial mismatch in functional topographies. Finally, SRM can be regarded as a refinement of the concept of hyperalignment [10] cast into a probabilistic framework. The HA approach has connections with regularized CCA [18]. Additional details of these connections and connections with Canonical Correlation Analysis (CCA) [19], ridge regression, Independent Component Analysis (ICA) [20], regularized Hyperalignment [18] are discussed in the supplementary material. 4 Experiments We assess the performance and robustness of SRM using fMRI datasets (Table 1) collected using different MRI machines, subjects, and preprocessing pipelines. The sherlock dataset was collected 4 Dataset Subjs TRs (s/TR) Region of interest (ROI) Voxels sherlock (audio-visual movie) [21] 16 1976 (2) posterior medial cortex (PMC) [22] 813 raider (audio-visual movie) [10] 10 2203 (3) ventral temporal cortex (VT) [23] 500/H forrest (audio movie) [24] 18 3599 (2) planum temporale (PT) [25] 1300/H audiobook (narrated story) [26] 40 449 (2) default mode network (DMN) [27] 2500/H Table 1: fMRI datasets are shown in the left four columns, and the ROIs are shown in right two columns. The ROIs vary in functional from visual, language, memory, to mental states. H stands for hemisphere. while subjects watched an episode of the BBC TV series “Sherlock” (66 mins).The raider dataset was collected while subjects viewed the movie “Raiders of the Lost Ark” (110 mins) and a series of still images (7 categories, 8 runs). The forrest dataset was collected while subjects listened to an auditory version of the film “Forrest Gump” (120 mins). The audiobook dataset was collected while subjects listened to a narrated story (15 mins) with two possible interpretations. Half of the subjects had a prior context favoring one interpretation, the other half had a prior context favoring the other interpretation. Post scanning questionnaires showed no difference in comprehension but a significant difference in interpretations between groups. Experiment 1: SRM and spatial smoothing. We first use spatial smoothing to determine if we can detect a shared response in PMC for the sherlock dataset. The subjects are randomly partitioned into two equal sized groups, the data for each group is averaged, we calculate the Pearson correlation over voxels between these averaged responses for each time, then average these correlations over time. This is a measure of similarity of the sequence of brain maps in the two average responses. We repeat this for five random subject divisions and average the results. If there is a shared response, we expect a positive average correlation between the groups, but if functional topographies differ significantly across subjects, this correlation may be small. If the result not distinct from zero, a shared response is not detected. The computation yields the benchmark value 0.26 ± 0.006 shown as the purple bar in the right plot in Fig. 3. This is support for a shared response in PMC, but we posit that the subject’s functional topographies in PMC are misaligned. To test this, we use a Gaussian filter, with width at half height of 3, 4, 5 and 6mm, to spatially smooth each subject’s fMRI data, then recalculate the average Pearson correlation as described above. The results, shown as blue bars in Fig. 3, indicate higher correlations with greater spatial smoothing. This indicates greater average correlation of the responses at lower spatial frequencies, suggesting a fine scale mismatch of functional topographies across subjects. We now test the robustness of SRM using the unsmoothed data. The subjects are randomly partitioned into two equal sized groups. The data in each group is divided in time into two halves, and the same half in each group is used to learn a shared response model for the group. The independently obtained group templates S1, S2, are then registered using a k × k orthogonal matrix Q (method outlined in §2). For each group, the second half of the data is projected to feature space using the subject-specific bases and averaged. Then the Pearson correlation over features is calculated between the group averaged shared responses, and averaged over time. This is repeated using the other the halves of the subject’s data for training and the results are averaged. The average results over 5 random subject divisions are report as the green bars in Fig. 3. With k = 813 there is no reduction of dimension and SRM achieves a correlation equivalent to 6mm spatial smoothing. This strong average correlation between groups, suggests some form of shared response. As expected, if the dimension of the feature space k is reduced, the correlation increases. A smaller value of k, forces subject
1
subject m
…
subject
1
subject m
…
half
movie
data
half
movie
data
R
Computing Correlation between Groups
subject
1
subject m
…
subject
1
subject m
…
half
movie
data
project
to bases
learn
bases
learn
bases
Group 2
shared
response
Group 1
shared
response
Group 1
shared
response
Group 2
shared
response
Wm Wm Wm W1 W1 W1 W1QT WmQT Q Learning Subject Specific Bases
Figure 3: Experiment 1. Left: Learn using half of the data, then compute between group correlation on other half. Right: Pearson correlation after spatial smoothing, and SRM with various k. Error bars: ±1 stand. error. 5 Learning Subject Specific Bases
movie
data
learn bases
subject m
subject 1
subject m-1
image data/
movie data
project to
bases
subject m
subject 1
subject m-1
projected
data
classifier
test
Testing on Held-out Subject
…
…
…
shared response
(template)
output
train
subject m
subject m-1
subject 1
W1 Wm−1 Wm W1 Wm−1 Wm …
10
9
…
2
1
t
-1
t
t
+1
…
t
+8
t
+9
…
segment 1
segment 2
Segment t-9
overlapping segment
Segment t+9
testing segment
overlapping segment
…
…
movie
TR
seg t
testing
subject’s
projected
response
shared
response
seg
t-9
seg
2
seg 1
seg
t
Seg
t+9
…
…
overlapping
seg. excluded
overlapping
seg. excluded
seg
t-9
seg
2
seg 1
Seg
t+9
…
…
…
…
Figure 4: Left: Experiment 2. Learn subject specific bases. Test on held out subject and data. Right: Experiment 2. Time segment matching by correlating with 9 TR segments in the shared response. Figure 5: Experiment 2. Top: Comparison of 18s time segment classification on three datasets using distinct ROIs. Bottom: (Left) SRM time segment classification accuracy vs k. (Right) Learn bases from movie response, classify stimulus category using still image response. For raider and forrest, we conduct experiment on ROI in each hemisphere separately and then average the results. For sherlock, we conduct experiment over whole PMC. The TAL results for the raider dataset are from [10]. Error bars: ±1 stand. error. SRM to focus on shared features yielding the best data representation and gives greater noise rejection. Learning 50 features achieves a 33% higher average correlation in feature space than is achieved by 6mm spatial smoothing in voxel space. A commensurate improvement occurs when SRM is applied to the spatially smoothed data. Experiment 2 : Time segment matching and image classification. We test if the shared response estimated by SRM generalizes to new subjects and new data using versions of two experiments from [10] (unlike in [10], here the held out subject is not included in learning phase). The first experiment tests if an 18s time segment from a held-out subject’s new data can be located in the corresponding new data of the training subjects. A shared response and subject specific bases are learned using half of the data, and the held out subject’s basis is estimated using the shared response as a template. Then a random 18s test segment from the unused half of the held out subject’s data is projected onto the subject’s basis, and we locate the 18s segment in the averaged shared response of the other subject’s new data that is maximally correlated with the test segment (see Fig. 4). The held out subject’s test segment is correctly located (matched) if its correlation with the average shared response at the same time point is the highest; segments overlapping with the test segment are excluded. We record the average accuracy and standard error by two-fold cross-validation over the data halves and leave-one-out over subjects. The results using three different fMRI datasets with distinct ROIs are shown in the top plot of Fig. 5. The accuracy is compared using: anatomical alignment (MNI [4], Talairach (TAL) [1]); standard PCA, and ICA feature selection (FastICA implementation [20]); the Hyperalignment (HA) method [10]; and SRM. PCA and ICA are directly applied on joint data matrix XT = [XT 1 . . . XT m] for learning W and S, where X ≈WS and W T = [W T 1 . . . W T m]. SRM demonstrates the best matching of the estimated shared temporal features of the methods tested. This suggests that the learned shared response is more informative of the shared brain state trajectory at an 18s time scale. Moreover, the experiment verifies generalization of the estimated shared features to subjects not included in the training phase and new (but similar) data collected during the other half of the movie stimulus. Since we expect accuracy to improve as the time segment is lengthened, 6 (b)! (c)! Group 1! subj 1! Group 2! original data! TR! voxel! …! subj m! subj 1! …! subj m! train! train! train! train! shared response within group! in voxel space (k2)! test! test! shared response across all subjects! in voxel space (k1)! residual! shared response within group! in voxel space (k2)! voxel! voxel! voxel! TR! TR! TR! (d)! (a)! Fig. 6.1 (d)! shared ! by all! within group! individual! group classification! accuracy with SRM! (a)! 0.72±0.06! (b)! 0.54±0.06! k1 = 3 (c)! 0.70±0.04! k1 = 3 group 1! group 2! k1 = 0 0.72±0.04! k2 = 100 group 1! group 2! 0.82±0.04! k1 = 10 k2 = 100 Fig. 6.2 Fig. 6.3 Figure 6: Experiment 3. Fig. 6.1: Experimental procedure. Fig 6.2: Data components (left) and group classification performance with SRM (right) in different steps of the procedure. Fig. 6.3: Group classification on audiobook dataset in DMN before and after removing an estimated shared response for various values of k1 and k2 with SRM, PCA and ICA. Error bars: ±1 stand. error. what is important is the relative accuracy of the compared methods. The method in (1) can be viewed as non-probabilistic SRM. In this experiment, it performs worse than SRM but better than the other compared methods. The effect of the number of features used in SRM is shown in Fig. 5, lower left. This can be used to select k. A similar test on the number of features used in PCA and ICA indicates lower performance than SRM (results not shown). We now use the image viewing data and the movie data from the raider dataset to test the generalizability of a learned shared response to a held-out subject and new data under a very distinct stimulus. The raider movie data is used to learn a shared response model, while excluding a held-out subject. The held-out subject’s basis is estimated by matching its movie response data to the estimated shared response. The effectiveness of the learned bases is then tested using the image viewing dataset [10]. After projecting the image data using the subject bases to feature space, an SVM classifier is trained and the average classifier accuracy and standard error is recorded by leave-one-out across subject testing. The results, lower right plot in Fig. 5, support the effectiveness of SRM in generalizing to a new subject and a distinct new stimulus. Under SRM, the image stimuli can be slightly more accurately identified using other subjects’ data for training than using a subject’s own data, indicating that the learned shared response is informative of image category. Experiment 3: Differentiating between groups. Now consider the audiobook dataset and the DMN ROI. If subjects are given group labels according to the two prior contexts, a linear SVM classifier trained on labeled voxel space data and tested on the voxel space data of held out subjects, can distinguish the two groups at an above chance level. This is shown as the leftmost bar in the bottom figure of Fig. 6.3. This is consistent with previous similar studies [28]. We test if SRM can distinguish the two subject groups with a higher rate of success. To do so we use the procedure outlined in rows of Fig. 6.1. We first use the original data Xg1 1:m, Xg2 1:m of all subjects (Fig. 6.1 (a)) to learn a k1-dimensional shared response Sall and subject bases W all gj,1:m. This shared response is then mapped to voxel space using each subject’s learned topography (Fig. 6.1 (b)) and subtracted from the subject’s data to form the residual response Xgj i −W all gj,iSall for subject i in group j (Fig. 6.1 (c)). Leaving out one subject from each group, we use two within-group applications of SRM to find k2-dimensional within-group shared responses Sg1, Sg2, and subject bases W g1 1:m, W g2 1:m 7 for the residual response. These are mapped into voxel space W gj i Sgj for each subject (Fig. 6.1 (d)). The first application of SRM yields an estimate of the response shared by all subjects. This is used to form the residual response. The subsequent within-group applications of SRM to the residual give estimates of the within-group shared residual response. Both applications of SRM seek to remove components of the original response that are uninformative of group membership. Finally, a linear SVM classifier is trained using the voxel space group-labeled data, and tested on the voxel space data of held out subjects. The results are shown as the red bars in Fig. 6.3. When using k1 = 10 and k2 = 100, we observe significant improvement in distinguishing the groups. One can visualize why this works using the cartoon in Fig. 6.2 showing the data for one subject modeled as the sum of three components: the response shared by all subjects, the response shared by subjects in the same group after the response shared by all subjects is removed, and a final residual term called the individual response (Fig. 6.2(a)). We first identify the response shared by all subjects (Fig. 6.2(b)); subtracting this from the subject response gives the residual (Fig. 6.2(c)). The second within-group application of SRM removes the individual response (Fig. 6.2(d)). By tuning k1 in the first application of SRM and tuning k2 in the second application of SRM, we estimate and remove the uninformative components while keeping the informative component. Classification using the estimated shared response (k1 ≤10) results in accuracy around chance (Fig. 6.2(b)), indicating that it is uninformative for distinguishing the groups. The classification accuracy using the residual response is statistically equivalent to using the original data (Fig. 6.2(c)), indicating that only removing the response shared by all subjects is insufficient for improvement. The classification accuracy that results by not removing the shared response (k1 = 0) and only applying within-group SRM (Fig. 6.2(d)), is also statistically equivalent to using the original data. This indicates that only removing the individual response is also insufficient for improvement. By combining both applications of SRM we remove both the response shared by all subjects and the individual responses, keeping only the responses shared within groups. For k1 =10, k2 = 100, this leads to significant improvement in performance (Fig. 6.2(d) and Fig. 6.3). We performed the same experiment using PCA and ICA (Fig. 6.3). In this case, after removing the estimated shared response (k1 ≥1) group identification quickly drops to chance since the shared response is informative of group difference (around 70% accuracy for distinguishing the groups (Sup. Mat.)). A detailed comparison of all three methods on the different steps of the procedure is given in the supplementary material. 5 Discussion and Conclusion The vast majority of fMRI studies require aggregation of data across individuals. By identifying shared responses between the brains of different individuals, our model enhances fMRI analyses that use aggregated data to evaluate cognitive states. A key attribute of SRM is its built-in dimensionality reduction leading to a reduced-dimension shared feature space. We have shown that by tuning this dimensionality, the data-driven aggregation achieved by SRM demonstrates higher sensitivity in distinguishing multivariate functional responses across cognitive states. This was shown across a variety of datasets and anatomical brain regions of interest. This also opens the door for the identification of shared and individual responses. The identification of shared responses after SRM is of great interest, as it allows us to assess the degree to which functional topography is shared across subjects. Furthermore, the SRM allows the detection of group specific responses. This was demonstrated by removing an estimated shared response to increase sensitivity in detecting group differences. We posit that this technique can be adapted to examine an array of situations where group differences are the key experimental variable. The method can facilitate studies of how neural representations are influenced by cognitive manipulations or by factors such as genetics, clinical disorders, and development. Successful decoding of a particular cognitive state (such as a stimulus category) in a given brain area provides evidence that information relevant to that cognitive state is present in the neural activity of that brain area. Conducting such analyses in locations spanning the brain, e.g., using a searchlight approach, can facilitate the discovery of information pathways. In addition, comparison of decoding accuracies between searchlights can suggest what kind of information is present and where it is concentrated in the brain. SRM provides a more sensitive method for conducting such investigations. This may also have direct application in designing better noninvasive brain-computer interfaces [29]. 8 References [1] J. Talairach and P. Tournoux. Co-planar stereotaxic atlas of the human brain. 3-Dimensional proportional system: an approach to cerebral imaging. Thieme, 1988. [2] J.D.G. Watson, R. Myers, et al. Area V5 of the human brain: evidence from a combined study using positron emission tomography and magnetic resonance imaging. Cereb. Cortex, 3:79–94, 1993. [3] R. B. H. Tootell, J. B. Reppas, et al. Visual motion aftereffect in human cortical area MT revealed by functional magnetic resonance imaging. Nature, 375(6527):139–141, 05 1995. [4] J. Mazziotta, A. Toga, et al. A probabilistic atlas and reference system for the human brain. Philosophical Transactions of the Royal Society B: Biological Sciences, 356(1412):1293–1322, 2001. [5] B. Fischl, M. I. Sereno, R.B.H. Tootell, and A. M. Dale. High-resolution intersubject averaging and a coordinate system for the cortical surface. Human brain mapping, 8(4):272–284, 1999. [6] M. Brett, I. S. Johnsrude, and A. M. Owen. The problem of functional localization in the human brain. Nat Rev Neurosci, 3(3):243–249, 03 2002. [7] M. R. Sabuncu, B. D. Singer, B. Conroy, R. E. Bryan, P. J. Ramadge, and J. V. Haxby. Function-based intersubject alignment of human cortical anatomy. Cerebral Cortex, 20(1):130–140, 2010. [8] B. R. Conroy, B. D. Singer, J. V. Haxby, and P. J. Ramadge. fMRI-based inter-subject cortical alignment using functional connectivity. In Advances in Neural Information Processing Systems, 2009. [9] B. R. Conroy, B. D. Singer, J. S. Guntupalli, P. J. Ramadge, and J. V. Haxby. Inter-subject alignment of human cortical anatomy using functional connectivity. NeuroImage, 2013. [10] J. V. Haxby, J. S. Guntupalli, et al. A common, high-dimensional model of the representational space in human ventral temporal cortex. Neuron, 72(2):404–416, 2011. [11] A. Lorbert and P. J. Ramadge. Kernel hyperalignment. In Adv. in Neural Inform. Proc. Systems, 2012. [12] A. G. Huth, T. L. Griffiths, F. E. Theunissen, and J. L. Gallant. PrAGMATiC: a Probabilistic and Generative Model of Areas Tiling the Cortex. ArXiv 1504.03622, 2015. [13] R. A. Horn and C. R. Johnson. Matrix analysis. Cambridge university press, 2012. [14] A. Edelman, T. A. Arias, and S. T Smith. The geometry of algorithms with orthogonality constraints. SIAM journal on Matrix Analysis and Applications, 20(2):303–353, 1998. [15] J.-H. Ahn and J.-H. Oh. A constrained EM algorithm for principal component analysis. Neural Computation, 15(1):57–65, 2003. [16] J. R. Manning, R. Ranganath, K. A. Norman, and D. M. Blei. Topographic factor analysis: a bayesian model for inferring brain networks from neural data. PLoS One, 9(5):e94914, 2014. [17] A. M. Michael, M. Anderson, et al. Preserving subject variability in group fMRI analysis: performance evaluation of GICA vs. IVA. Frontiers in systems neuroscience, 8, 2014. [18] H. Xu, A. Lorbert, P. J. Ramadge, J. S. Guntupalli, and J. V. Haxby. Regularized hyperalignment of multi-set fMRI data. In Proc. Statistical Signal Processing Workshop, pages 229–232. IEEE, 2012. [19] H. Hotelling. Relations between two sets of variates. Biometrika, 28(3-4):321–377, 1936. [20] A. Hyvärinen, J. Karhunen, and E. Oja. Independent component analysis. John Wiley & Sons, 2004. [21] J. Chen, Y. C. Leong, K. A. Norman, and U. Hasson. Reinstatement of neural patterns during narrative free recall. Abstracts of the Cognitive Neuroscience Society, 2014. [22] D. S. Margulies, J. L. Vincent, and et al. Precuneus shares intrinsic functional architecture in humans and monkeys. Proceedings of the National Academy of Sciences, 106(47):20069–20074, 2009. [23] J. V. Haxby, M. I. Gobbini, M. L. Furey, A. Ishai, J. L. Schouten, and P. Pietrini. Distributed and overlapping representations of faces and objects in ventral temporal cortex. Science, 293(5539), 2001. [24] M. Hanke, F. J. Baumgartner, et al. A high-resolution 7-Tesla fMRI dataset from complex natural stimulation with an audio movie. Scientific Data, 1, 2014. [25] T. D. Griffiths and J. D. Warren. The planum temporale as a computational hub. Trends in neurosciences, 25(7):348–353, 2002. [26] Y. Yeshurun, S. Swanson, J. Chen, E. Simony, C. Honey, P. C. Lazaridi, and U. Hasson. How does the brain represent different ways of understanding the same story? Society for Neuroscience Abstracts, 2014. [27] M. E. Raichle. The brain’s default mode network. Annual Review of Neuroscience, 38(1), 2015. [28] D. L. Ames, C. J. Honey, M. Chow, A. Todorov, and U. Hasson. Contextual alignment of cognitive and neural dynamics. Journal of cognitive neuroscience, 2014. [29] M.T. deBettencourt, J. D. Cohen, R. F. Lee, K. A. Norman, and N. B. Turk-Browne. Closed-loop training of attention with real-time brain imaging. Nature neuroscience, 18(3):470–475, 2015. 9 | 2015 | 280 |
5,792 | Semi-Proximal Mirror-Prox for Nonsmooth Composite Minimization Niao He Georgia Institute of Technology nhe6@gatech.edu Zaid Harchaoui NYU, Inria firstname.lastname@nyu.edu Abstract We propose a new first-order optimization algorithm to solve high-dimensional non-smooth composite minimization problems. Typical examples of such problems have an objective that decomposes into a non-smooth empirical risk part and a non-smooth regularization penalty. The proposed algorithm, called SemiProximal Mirror-Prox, leverages the saddle point representation of one part of the objective while handling the other part of the objective via linear minimization over the domain. The algorithm stands in contrast with more classical proximal gradient algorithms with smoothing, which require the computation of proximal operators at each iteration and can therefore be impractical for high-dimensional problems. We establish the theoretical convergence rate of Semi-Proximal MirrorProx, which exhibits the optimal complexity bounds, i.e. O(1/ǫ2), for the number of calls to linear minimization oracle. We present promising experimental results showing the interest of the approach in comparison to competing methods. 1 Introduction A wide range of machine learning and signal processing problems can be formulated as the minimization of a composite objective: min x∈X F(x) := f(x) + ∥Bx∥ (1) where X is closed and convex, f is convex and can be either smooth, or nonsmooth yet enjoys a particular structure. The term ∥Bx∥defines a regularization penalty through a norm ∥· ∥, and x 7→Bx a linear mapping on a closed convex set X. In many situations, the objective function F of interest enjoys a favorable structure, namely a socalled saddle point representation [6, 11, 13]: f(x) = max z∈Z {⟨x, Az⟩−ψ(z)} (2) where Z is convex compact subset of a Euclidean space, and ψ(·) is a convex function. Sec. 4 will give several examples of such situations. Saddle point representations can then be leveraged to use first-order optimization algorithms. The simple first option to minimize F is using the so-called Nesterov smoothing technique [19] along with a proximal gradient algorithm [23], assuming that the proximal operator associated with X is computationally tractable and cheap to compute. However, this is certainly not the case when considering problems with norms acting in the spectral domain of high-dimensional matrices, such as the matrix nuclear-norm [12] and structured extensions thereof [5, 2]. In the latter situation, another option is to use a smoothing technique now with a conditional gradient or Frank-Wolfe algorithm to minimize F, assuming that a a linear minimization oracle associated with X is cheaper to compute than the proximal operator [6, 14, 24]. Neither option takes advantage of the composite structure of the objective (1) or handles the case when the linear mapping B is nontrivial. 1 Contributions Our goal is to propose a new first-order optimization algorithm, called SemiProximal Mirror-Prox, designed to solve the difficult non-smooth composite optimization problem (1), which does not require the exact computation of proximal operators. Instead, the SemiProximal Mirror-Prox relies upon i) Saddle point representability of f (a less restricted role than Fenchel-type representation); ii) Linear minimization oracle associated with ∥· ∥in the domain X. While the saddle point representability of f allows to cure the non-smoothness of f, the linear minimization over the domain X allows to tackle the non-smooth regularization penalty ∥· ∥. We establish the theoretical convergence rate of Semi-Proximal Mirror-Prox, which exhibits the optimal complexity bounds, i.e. O(1/ǫ2), for the number of calls to linear minimization oracle. Furthermore, Semi-Proximal Mirror-Prox generalizes previously proposed approaches and improves upon them in special cases: 1. Case B ≡0: Semi-Proximal Mirror-Prox does not require assumptions on favorable geometry of dual domain Z or simplicity of ψ(·) in (2). 2. Case B = I: Semi-Proximal Mirror-Prox is competitive with previously proposed approaches [15, 24] based on smoothing techniques. 3. Case of non-trivial B: Semi-Proximal Mirror-Prox is the first proximal-free or conditionalgradient-type optimization algorithm for (1). Related work The Semi-Proximal Mirror-Prox algorithm belongs to the family of conditional gradient algorithms, whose most basic instance is the Frank-Wolfe algorithm for constrained smooth optimization using a linear minimization oracle; see [12, 1, 4]. Recently, in [6, 13], the authors consider constrained non-smooth optimization when the domain Z has a “favorable geometry”, i.e. the domain is amenable to proximal setups (favorable geometry), and establish a complexity bound with O(1/ǫ2) calls to the linear minimization oracle. Recently, in [15], a method called conditional gradient sliding is proposed to solve similar problems, using a smoothing technique, with a complexity bound in O(1/ǫ2) for the calls to the linear minimization oracle (LMO) and additionally a O(1/ǫ) bound for the linear operator evaluations. Actually, this O(1/ǫ2) bound for the LMO complexity can be shown to be indeed optimal for conditional-gradient-type or LMObased algorithms, when solving general1 non-smooth convex problems [14]. However, these previous approaches are appropriate for objective with a non-composite structure. When applied to our problem (1), the smoothing would be applied to the objective taken as a whole, ignoring its composite structure. Conditional-gradient-type algorithms were recently proposed for composite objectives [7, 9, 26, 24, 16], but cannot be applied for our problem. In [9], f is smooth and B is identity matrix, whereas in [24], f is non-smooth and B is also the identity matrix. The proposed Semi-Proximal Mirror-Prox can be seen as a blend of the successful components resp. of the Composite Conditional Gradient algorithm [9] and the Composite Mirror-Prox [11], that enjoys the optimal complexity bound O(1/ǫ2) on the total number of LMO calls, yet solves a broader class of convex problems than previously considered. 2 Framework and assumptions We present here our theoretical framework, which hinges upon a smooth convex-concave saddle point reformulation of the norm-regularized non-smooth minimization (3). We shall use the following notations throughout the paper. For a given norm ∥· ∥, we define the dual norm as ∥s∥∗= max∥x∥≤1⟨s, x⟩. For any x ∈Rm×n, ∥x∥2 = ∥x∥F = (Pm i=1 Pn j=1 |xij|2)1/2. Problem We consider the composite minimization problem Opt = min x∈X f(x) + ∥Bx∥ (3) where X is a closed convex set in the Euclidean space Ex; x 7→Bx is a linear mapping from X to Y (⊃BX), where Y is a closed convex set in the Euclidean space Ey. We make two important assumptions on the function f and the norm ∥·∥defining the regularization penalty, explained below. 1Related research extended such approaches to stochastic or online settings [10, 8, 15]; such settings are beyond the scope of this work. 2 Saddle Point Representation The non-smoothness of f can be challenging to tackle. However, in many cases of interest, the function f enjoys a favorable structure that allows to tackle it with smoothing techniques. We assume that f(x) is a non-smooth convex function given by f(x) = max z∈Z Φ(x, z) (4) where Φ(x, z) is a smooth convex-concave function and Z is a convex and compact set in the Euclidean space Ez. Such representation was introduced and developed in [6, 11, 13], for the purpose of non-smooth optimization. Saddle point representability can be interpreted as a general form of the smoothing-favorable structure of non-smooth functions used in the Nesterov smoothing technique [19]. Representations of this type are readily available for a wide family of “well-structured” nonsmooth functions f (see Sec. 4 for examples ), and actually for all empirical risk functions with convex loss in machine learning, up to our knowledge. Composite Linear Minimization Oracle Proximal-gradient-type algorithms require the computation of a proximal operator at each iteration, i.e. miny∈Y 1 2∥y∥2 2 + ⟨η, y⟩+ α∥y∥ . For several cases of interest, described below, the computation of the proximal operator can be expensive or intractable. A classical example is the nuclear norm, whose proximal operator boils down to singular value thresholding, therefore requiring a full singular value decomposition. In contrast to the proximal operator, the linear minimization oracle can be much cheaper. The linear minimization oracle (LMO) is a routine which, given an input α > 0 and η ∈Ey, returns a point LMO(η, α) := argmin y∈Y {⟨η, y⟩+ α∥y∥} (5) In the case of nuclear-norm, the LMO only requires the computation of the leading pair of singular vectors, which is an order of magnitude faster in time-complexity. Saddle Point Reformulation. The crux of our approach is a smooth convex-concave saddle point reformulation of (3). After massaging the saddle-point reformulation, we consider the associated variational inequality, which provides the sufficient and necessary condition for an optimal solution to the saddle point problem [3, 4]. For any optimization problem with convex structure (including convex minimization, convex-concave saddle point problem, convex Nash equilibrium), the corresponding variational inequality is directly related to the accuracy certificate used to guarantee the accuracy of a solution to the optimization problem; see Sec. 2.1 in [11] and [18]. We shall present then an algorithm to solve the variational inequality established below, that exploits its particular structure. Assuming that f admits a saddle point representation (4), we write (3) in epigraph form Opt = min x∈X,y∈Y,τ≥∥y∥max z∈Z {Φ(x, z) + τ : y = Bx} . where Y (⊃BX) is a convex set. We can approximate Opt by d Opt = min x∈X,y∈Y,τ≥∥y∥ max z∈Z,∥w∥2≤1 {Φ(x, z) + τ + ρ⟨y −Bx, w⟩} . (6) For properly selected ρ > 0, one has d Opt = Opt (see details in [11]). By introducing the variables u := [x, y; z, w] and v := τ, the variational inequality associated with the above saddle point problem is fully described by the domain X+ = {x+ = [u; v] : x ∈X, y ∈Y, z ∈Z, ∥w∥2 ≤1, τ ≥∥y∥} and the monotone vector field F(x+ = [u; v]) = [Fu(u); Fv] , where Fu u = x y z w = ∇xΦ(x, z) −ρBT w ρw −∇zΦ(x, z) ρ(Bx −y) , Fv(v = τ) = 1. In the next section, we present an efficient algorithm to solve this type of variational inequality, which enjoys a particular structure; we call such an inequality semi-structured. 3 3 Semi-Proximal Mirror-Prox for Semi-structured Variational Inequalities Semi-structured variational inequalities (Semi-VI) enjoy a particular mixed structure, that allows to get the best of two worlds, namely the proximal setup (where the proximal operator can be computed) and the LMO setup (where the linear minimization oracle can be computed). Basically, the domain X is decomposed as a Cartesian product over two sets X = X1 × X2, such that X1 admits a proximal-mapping while X2 admits a linear minimization oracle. We now describe the main theoretical and algorithmic components of the Semi-Proximal Mirror-Prox algorithm, resp. in Sec. 3.1 and in Sec. 3.2, and finally describe the overall algorithm in Sec. 3.3. 3.1 Composite Mirror-Prox with Inexact Prox-mappings We first present a new algorithm, which can be seen as an extension of the Composite Mirror Prox algorithm, denoted CMP for brevity, that allows inexact computation of prox-mappings and can solve a broad class of variational inequalites. The original Mirror Prox algorithm was introduced in [17] and was extended to composite settings in [11] assuming exact computations of prox-mappings. Structured Variational Inequalities. We consider the variational inequality VI(X, F): Find x∗∈X : ⟨F(x), x −x∗⟩≥0, ∀x ∈X with domain X and operator F that satisfy the assumptions (A.1)–(A.4) below. (A.1) Set X ⊂Eu × Ev is closed convex and its projection PX = {u : x = [u; v] ∈X} ⊂U, where U is convex and closed, Eu, Ev are Euclidean spaces; (A.2) The function ω(·) : U →R is continuously differentiable and also 1-strongly convex w.r.t. some norm2 ∥· ∥. This defines the Bregman distance Vu(u′) = ω(u′) −ω(u) −⟨ω′(u), u′ − u⟩≥1 2∥u′ −u∥2. (A.3) The operator F(x = [u, v]) : X →Eu × Ev is monotone and of form F(u, v) = [Fu(u); Fv] with Fv ∈Ev being a constant and Fu(u) ∈Eu satisfying the condition ∀u, u′ ∈U : ∥Fu(u) −Fu(u′)∥∗≤L∥u −u′∥+ M for some L < ∞, M < ∞; (A.4) The linear form ⟨Fv, v⟩of [u; v] ∈Eu × Ev is bounded from below on X and is coercive on X w.r.t. v: whenever [ut; vt] ∈X, t = 1, 2, ... is a sequence such that {ut}∞ t=1 is bounded and ∥vt∥2 →∞as t →∞, we have ⟨Fv, vt⟩→∞, t →∞. The quality of an iterate, in the course of the algorithm, is measured through the so-called dual gap function ǫVI(x X, F) = sup y∈X ⟨F(y), x −y⟩. We give in Appendix A a refresher on dual gap functions, for the reader’s convenience. We shall establish the complexity bounds in terms of this dual gap function for our algorithm, which directly provides an accuracy certificate along the iterations. However, we first need to define what we mean by an inexact prox-mapping. ǫ-Prox-mapping Inexact proximal mappings were recently considered in the context of accelerated proximal gradient algorithms [25]. The definition we give below is more general, allowing for non-Euclidean proximal-mappings. We introduce here the notion of ǫ-prox-mapping for ǫ ≥0. For ξ = [η; ζ] ∈Eu × Ev and x = [u; v] ∈X, let us define the subset P ǫ x(ξ) of X as P ǫ x(ξ) = {bx = [bu; bv] ∈X : ⟨η + ω′(bu) −ω′(u), bu −s⟩+ ⟨ζ, bv −w⟩≤ǫ ∀[s; w] ∈X}. When ǫ = 0, this reduces to the exact prox-mapping, in the usual setting, that is Px(ξ) = Argmin [s;w]∈X {⟨η, s⟩+ ⟨ζ, w⟩+ Vu(s)} . 2There is a slight abuse of notation here. The norm here is not the same as the one in problem (3) 4 When ǫ > 0, this yields our definition of an inexact prox-mapping, with inexactness parameter ǫ. Note that for any ǫ ≥0, the set P ǫ x(ξ = [η; γFv]) is well defined whenever γ > 0. The Composite Mirror Prox with inexact prox-mappings is outlined in Algorithm 1. Algorithm 1 Composite Mirror Prox Algorithm (CMP) for VI(X, F) Input: stepsizes γt > 0, inexactness ǫt ≥0, t = 1, 2, . . . Initialize x1 = [u1; v1] ∈X for t = 1, 2, . . . , T do yt := [but; bvt] ∈ P ǫt xt(γtF(xt)) = P ǫt xt(γt[Fu(ut); Fv]) xt+1 := [ut+1; vt+1] ∈ P ǫt xt(γtF(yt)) = P ǫt xt(γt[Fu(but); Fv]) (7) end for Output: xT := [¯uT ; ¯vT ] = (PT t=1 γt) −1PT t=1 γtyt The proposed algorithm is a non-trivial extension of the Composite Mirror Prox with exact proxmappings, both from a theoretical and algorithmic point of views. We establish below the theoretical convergence rate; see Appendix B for the proof. Theorem 3.1. Assume that the sequence of step-sizes (γt) in the CMP algorithm satisfy σt := γt⟨Fu(but) −Fu(ut), but −ut+1⟩−Vbut(ut+1) −Vut(but) ≤γ2 t M 2 , t = 1, 2, . . . , T . (8) Then, denoting Θ[X] = sup[u;v]∈X Vu1(u), for a sequence of inexact prox-mappings with inexactness ǫt ≥0, we have ǫVI(¯xT X, F) := sup x∈X ⟨F(x), ¯xT −x⟩≤Θ[X] + M 2PT t=1γ2 t + 2PT t=1ǫt PT t=1 γt . (9) Remarks. Note that the assumption on the sequence of step-sizes (γt) is clearly satisfied when γt ≤( √ 2L)−1. When M = 0 (which is essentially the case for the problem described in Section 2), it suffices as long as γt ≤L−1. When (ǫt) is summable, we achieve the same O(1/T) convergence rate as when there is no error. If (ǫt) decays with a rate of O(1/t), then the overall convergence is only affected by a log(T) factor. Convergence results on the sequence of projections of (¯xT ) onto X1 when F stems from saddle point problem minx1∈X1 supx2∈X2 Φ(x1, x2) is established in Appendix B. The theoretical convergence rate established in Theorem 3.1 and Corollary B.1 generalizes the previous result established in Corollary 3.1 in [11] for CMP with exact prox-mappings. Indeed, when exact prox-mappings are used, we recover the result of [11]. When inexact prox-mappings are used, the errors due to the inexactness of the prox-mappings accumulate and is reflected in (9) and (37). 3.2 Composite Conditional Gradient We now turn to a variant of the composite conditional gradient algorithm, denoted CCG, tailored for a particular class of problems, which we call smooth semi-linear problems. The composite conditional gradient algorithm was first introduced in [9] and also developed in [21]. We present an extension here which turns to be well-suited for sub-problems that will be solved in Sec. 3.3. Minimizing Smooth Semi-linear Functions. We consider the smooth semi-linear problem min x=[u;v]∈X φ+(u, v) = φ(u) + ⟨θ, v⟩ (10) represented by the pair (X; φ+) such that the following assumptions are satisfied. We assume that i) X ⊂Eu × Ev is closed convex and its projection PX on Eu belongs to U, where U is convex and compact; ii) φ(u) : U →R is a convex continuously differentiable function, and there exist 1 < κ ≤2 and L0 < ∞such that φ(u′) ≤φ(u) + ⟨∇φ(u), u′ −u⟩+ L0 κ ∥u′ −u∥κ ∀u, u′ ∈U; (11) 5 iii) θ ∈Ev is such that every linear function on Eu × Ev of the form [u; v] 7→⟨η, u⟩+ ⟨θ, v⟩ (12) with η ∈Eu attains its minimum on X at some point x[η] = [u[η]; v[η]]; we have at our disposal a Composite Linear Minimization Oracle (LMO) which, given on input η ∈Eu, returns x[η]. Algorithm 2 Composite Conditional Gradient Algorithm CCG(X, φ(·), θ; ǫ) Input: accuracy ǫ > 0 and γt = 2/(t + 1), t = 1, 2, . . . Initialize x1 = [u1; v1] ∈X for t = 1, 2, . . . do Compute δt = ⟨gt, ut −ut[gt]⟩+ ⟨θ, vt −vt[gt]⟩, where gt = ∇φ(ut); if δt ≤ǫ then Return xt = [ut; vt] else Find xt+1 = [ut+1; vt+1] ∈X such that φ+(xt+1) ≤φ+ (xt + γt(xt[gt] −xt)) end if end for The algorithm is outlined in Algorithm 2. Note that CCG works essentially as if there were no vcomponent at all. The CCG algorithm enjoys a convergence rate in O(t−(κ−1)) in the evaluations of the function φ+, and the accuracy certificates (δt) enjoy the same rate O(t−(κ−1)) as well. Proposition 3.1. Denote D the ∥·∥-diameter of U. When solving problems of type (10), the sequence of iterates (xt) of CCG satisfies φ+(xt) −min x∈X φ+(x) ≤2L0Dκ κ(3 −κ) 2 t + 1 κ−1 , t ≥2 (13) In addition, the accuracy certificates (δt) satisfy min 1≤s≤t δs ≤O(1)L0Dκ 2 t + 1 κ−1 , t ≥2 (14) 3.3 Semi-Proximal Mirror-Prox for Semi-structured Variational Inequality We now give the full description of a special class of variational inequalities, called semi-structured variational inequalities. This family of problems encompasses both cases that we discussed so far in Section 3.1 and 3.2. But most importantly, it also covers many other problems that do not fall into these two regimes and in particular, our essential problem of interest (3). Semi-structured Variational Inequalities. The class of semi-structured variational inequalities allows to go beyond Assumptions (A.1)−(A.4), by assuming more structure. This structure is consistent with what we call a semi-proximal setup, which encompasses both the regular proximal setup and the regular linear minimization setup as special cases. Indeed, we consider variational inequality VI(X, F) that satisfies, in addition to Assumptions (A.1) −(A.4), the following assumptions: (S.1) Proximal setup for X: we assume that Eu = Eu1 × Eu2, Ev = Ev1 × Ev2, and U ⊂ U1 × U2, X = X1 × X2 with Xi ∈Eui × Evi and PiX = {ui : [ui; vi] ∈Xi} ⊂Ui for i = 1, 2, where U1 is convex and closed, U2 is convex and compact. We also assume that ω(u) = ω1(u1)+ω2(u2) and ∥u∥= ∥u1∥Eu1 +∥u2∥Eu2 , with ω2(·) : U2 →R continuously differentiable such that ω2(u′ 2) ≤ω2(u2) + ⟨∇ω2(u2), u′ 2 −u2⟩+ L0 κ ∥u′ 2 −u2∥κ Eu2 , ∀u2, u′ 2 ∈U2; for a particular 1 < κ ≤2 and L0 < ∞. Furthermore, we assume that the ∥· ∥Eu2 -diameter of U2 is bounded by some D > 0. (S.2) Partition of F: the operator F induced by the above partition of X1 and X2 can be written as F(x) = [Fu(u); Fv] with Fu(u) = [Fu1(u1, u2); Fu2(u1, u2)], Fv = [Fv1; Fv2]. 6 (S.3) Proximal mapping on X1: we assume that for any η1 ∈Eu1 and α > 0, we have at our disposal easy-to-compute prox-mappings of the form, Proxω1(η1, α) := argmin x1=[u1;v1]∈X1 {ω1(u1) + ⟨η1, u1⟩+ α⟨Fv1, v1⟩} . (S.4) Linear minimization oracle for X2: we assume that we we have at our disposal Composite Linear Minimization Oracle (LMO), which given any input η2 ∈Eu2 and α > 0, returns an optimal solution to the minimization problem with linear form, that is, LMO(η2, α) := argmin x2=[u2;v2]∈X2 {⟨η2, u2⟩+ α⟨Fv2, v2⟩} . Semi-proximal setup We denote such problems as Semi-VI(X, F). On the one hand, when U2 is a singleton, we get the full-proximal setup. On the other hand, when U1 is a singleton, we get the full linear-minimization-oracle setup (full LMO setup). The semi-proximal setup allows to cover both setups and all the ones in between as well. The Semi-Proximal Mirror-Prox algorithm. We finally present here our main contribution, the Semi-Proximal Mirror-Prox algorithm, which solves the semi-structured variational inequality under (A.1) −(A.4) and (S.1) −(S.4). The Semi-Proximal Mirror-Prox algorithm blends both CMP and CCG. Basically, for sub-domain X2 given by LMO, instead of computing exactly the prox-mapping, we mimick inexactly the prox-mapping via a conditional gradient algorithm in the Composite Mirror Prox algorithm. For the sub-domain X1, we compute the prox-mapping as it is. Algorithm 3 Semi-Proximal Mirror-Prox Algorithm for Semi-VI(X, F) Input: stepsizes γt > 0, accuracies ǫt ≥0, t = 1, 2, . . . [1] Initialize x1 = [x1 1; x1 2] ∈X, where x1 1 = [u1 1; v1 1]; x1 2 = [u1 2, ; v1 2]. for t = 1, 2, . . . , T do [2] Compute yt = [yt 1; yt 2] that yt 1 := [but 1; bvt 1] = Proxω1(γtFu1(ut 1, ut 2) −ω′ 1(ut 1), γt) yt 2 := [but 2; bvt 2] = CCG(X2, ω2(·) + ⟨γtFu2(ut 1, ut 2) −ω′ 2(ut 2), ·⟩, γtFv2; ǫt) [3] Compute xt+1 = [xt+1 1 ; xt+1 2 ] that xt+1 1 := [ut+1 1 ; vt+1 1 ] = Proxω1(γtFu1(but 1, but 2) −ω′ 1(ut 1), γt) xt+1 2 := [ut+1 2 ; vt+1 2 ] = CCG(X2, ω2(·) + ⟨γtFu2(but 1, but 2) −ω′ 2(ut 2), ·⟩, γtFv2; ǫt) end for Output: xT := [¯uT ; ¯vT ] = (PT t=1 γt) −1PT t=1 γtyt At step t, we first update yt 1 = [but 1; bvt 1] by computing the exact prox-mapping and build yt 2 = [but 2; bvt 2] by running the composite conditional gradient algorithm to problem (10) specifically with X = X2, φ(·) = ω2(·) + ⟨γtFu2(ut 1, ut 2) −ω′ 2(ut 2), ·⟩, and θ = γtFv2, until δ(yt 2) = maxy2∈X2⟨∇φ+(yt 2), yt 2 −y2⟩≤ǫt. We then build xt+1 1 = [ut+1 1 ; vt+1 1 ] and xt+1 2 = [ut+1 2 ; vt+1 2 ] similarly except this time taking the value of the operator at point yt. Combining the results in Theorem 3.1 and Proposition 3.1, we arrive at the following complexity bound. Proposition 3.2. Under the assumption (A.1)−(A.4) and (S.1)−(S.4) with M = 0, and choice of stepsize γt = L−1, t = 1, . . . , T, for the outlined algorithm to return an ǫ-solution to the variational inequality V I(X, F), the total number of Mirror Prox steps required does not exceed Total number of steps = O(1)LΘ[X] ǫ and the total number of calls to the Linear Minimization Oracle does not exceed N = O(1) L0LκDκ ǫκ 1 κ−1 Θ[X]. In particular, if we use Euclidean proximal setup on U2 with ω2(·) = 1 2∥x2∥2, which leads to κ = 2 and L0 = 1, then the number of LMO calls does not exceed N = O(1) L2D2(Θ[X1] + D2) /ǫ2. 7 0 1000 2000 3000 4000 10 −2 10 −1 10 0 Elapsed time (sec) Objective valule Semi−MP(eps=10/t) Semi−MP(fixed=96) Smooth−CG(γ=0.01) Semi−SPG(eps=5/t) Semi−SPG(fixed=96) 0 500 1000 1500 2000 2500 3000 10 −1 10 0 Elapsed time (sec) Objective valule Semi−MP(eps=5/t) Semi−MP(fixed=24) Smooth−CG(γ=1) Semi−SPG(eps=10/t) Semi−SPG(fixed=24) 0 1000 2000 3000 4000 5000 0.3 0.4 0.5 0.6 0.7 0.8 0.9 number of LMO calls objective value Semi−MP(eps=1e2/t) Semi−MP(eps=1e1/t) Semi−MP(eps=1e0/t) Semi−LPADMM(eps=1e−3/t) Semi−LPADMM(eps=1e−4/t) Semi−LPADMM(eps=1e−5/t) 0 200 400 600 800 1000 0.3 0.4 0.5 0.6 0.7 0.8 0.9 number of LMO calls objective value Semi−MP(eps=1e1/t) Semi−LPADMM(eps=1e−5/t) Figure 1: Robust collaborative filtering and link prediction: objective function vs elapsed time. From left to right: (a) MovieLens100K; (b) MovieLens1M; (c) Wikivote (1024); (d) Wikivote (full) Discussion The proposed Semi-Proximal Mirror-Prox algorithm enjoys the optimal complexity bounds, i.e. O(1/ǫ2), in the number of calls to LMO; see [14] for the optimal complexity bounds for general non-smooth optimization with LMO. Consequently, when applying the algorithm to the variational reformulation of the problem of interest (3), we are able to get an ǫ-optimal solution within at most O(1/ǫ2) LMO calls. Thus, Semi-Proximal Mirror-Prox generalizes previously proposed approaches and improves upon them in special cases of problem (3); see Appendix D.2. 4 Experiments We report the experimental results obtained with the proposed Semi-Proximal Mirror-Prox, denoted Semi-MP here, and competing algorithms. We consider two different applications: i) robust collaborative filtering for movie recommendation; ii) link prediction for social network analysis. For i), we compare to two competing approaches: a) smoothing conditional gradient proposed in [24] (denoted Smooth-CG); b) smoothing proximal gradient [20, 5] equipped with semi-proximal setup (Semi-SPG). For ii), we compare to Semi-LPADMM, using [22] equipped with semi-proximal setup. Additional experiments and implementation details are given in Appendix E. Robust collaborative filtering We consider the collaborative filtering problem, with a nuclearnorm regularization penalty and an ℓ1-loss function. We run the above three algorithms on the the small and medium MovieLens datasets. The small-size dataset consists of 943 users and 1682 movies with about 100K ratings, while the medium-size dataset consists of 3952 users and 6040 movies with about 1M ratings. We follow [24] to set the regularization parameters. In Fig. 1, we can see that Semi-MP clearly outperforms Smooth-CG, while it is competitive with Semi-SPG. Link prediction We consider now the link prediction problem, where the objective consists a hinge-loss for the empirical risk part and multiple regularization penalties, namely the ℓ1-norm and the nuclear-norm. For this example, applying the Smooth-CG or Semi-SPG would require two smooth approximations, one for hinge loss term and one for ℓ1 norm term. Therefore, we consider an alternative approach, Semi-LPADMM, where we apply the linearized preconditioned ADMM algorithm [22] by solving proximal mapping through conditional gradient routines. Up to our knowledge, ADMM with early stopping is not fully theoretically analyzed in literature. However, intuitively, as long as the error is controlled sufficiently, such variant of ADMM should converge. We conduct experiments on a binary social graph data set called Wikivote, which consists of 7118 nodes and 103747 edges. Since the computation cost of these two algorithms mainly come from the LMO calls, we present in below the performance in terms of number of LMO calls. For the first set of experiments, we select top 1024 highest degree users from Wikivote and run the two algorithms on this small dataset with different strategies for the inner LMO calls. In Fig. 1, we observe that the Semi-MP is less sensitive to the inner accuracies of prox-mappings compared to the ADMM variant, which sometimes stops progressing if the prox-mappings of early iterations are not solved with sufficient accuracy. The results on the full dataset corroborate the fact that Semi-MP outperforms the semi-proximal variant of the ADMM algorithm. Acknowledgments The authors would like to thank A. Juditsky and A. Nemirovski for fruitful discussions. This work was supported by NSF Grant CMMI-1232623, LabEx Persyval-Lab (ANR-11-LABX-0025), project “Titan” (CNRS-Mastodons), project “Macaron” (ANR-14-CE23-0003-01), the MSR-Inria joint centre, and the Moore-Sloan Data Science Environment at NYU. 8 References [1] Francis Bach. Duality between subgradient and conditional gradient methods. SIAM Journal on Optimization, 2015. [2] Francis Bach, Rodolphe Jenatton, Julien Mairal, and Guillaume Obozinski. Optimization with sparsityinducing penalties. Found. Trends Mach. Learn., 4(1):1–106, 2012. [3] Heinz H. Bauschke and Patrick L. Combettes. Convex Analysis and Monotone Operator Theory in Hilbert Spaces. Springer, 2011. [4] D. P. Bertsekas. Convex Optimization Algorithms. Athena Scientific, 2015. [5] Xi Chen, Qihang Lin, Seyoung Kim, Jaime G Carbonell, and Eric P Xing. Smoothing proximal gradient method for general structured sparse regression. The Annals of Applied Statistics, 6(2):719–752, 2012. [6] Bruce Cox, Anatoli Juditsky, and Arkadi Nemirovski. Dual subgradient algorithms for large-scale nonsmooth learning problems. Mathematical Programming, pages 1–38, 2013. [7] M. Dudik, Z. Harchaoui, and J. Malick. Lifted coordinate descent for learning with trace-norm regularization. Proceedings of the 15th International Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [8] Dan Garber and Elad Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. arXiv preprint arXiv:1301.4666, 2013. [9] Zaid Harchaoui, Anatoli Juditsky, and Arkadi Nemirovski. Conditional gradient algorithms for normregularized smooth convex optimization. Mathematical Programming, pages 1–38, 2013. [10] E. Hazan and S. Kale. Projection-free online learning. In ICML, 2012. [11] Niao He, Anatoli Juditsky, and Arkadi Nemirovski. Mirror prox algorithm for multi-term composite minimization and semi-separable problems. arXiv preprint arXiv:1311.1098, 2013. [12] Martin Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, pages 427– 435, 2013. [13] Anatoli Juditsky and Arkadi Nemirovski. Solving variational inequalities with monotone operators on domains given by linear minimization oracles. arXiv preprint arXiv:1312.107, 2013. [14] Guanghui Lan. The complexity of large-scale convex programming under a linear optimization oracle. arXiv, 2013. [15] Guanghui Lan and Yi Zhou. Conditional gradient sliding for convex optimization. arXiv, 2014. [16] Cun Mu, Yuqian Zhang, John Wright, and Donald Goldfarb. Scalable robust matrix recovery: Frankwolfe meets proximal methods. arXiv preprint arXiv:1403.7588, 2014. [17] Arkadi Nemirovski. Prox-method with rate of convergence o(1/t) for variational inequalities with lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM Journal on Optimization, 15(1):229–251, 2004. [18] Arkadi Nemirovski, Shmuel Onn, and Uriel G Rothblum. Accuracy certificates for computational problems with convex structure. Mathematics of Operations Research, 35(1):52–78, 2010. [19] Yurii Nesterov. Smooth minimization of non-smooth functions. Mathematical programming, 103(1):127– 152, 2005. [20] Yurii Nesterov. Smoothing technique and its applications in semidefinite optimization. Math. Program., 110(2):245–259, 2007. [21] Yurii Nesterov. Complexity bounds for primal-dual methods minimizing the model of objective function. Technical report, Universit´e catholique de Louvain, Center for Operations Research and Econometrics (CORE), 2015. [22] Yuyuan Ouyang, Yunmei Chen, Guanghui Lan, and Eduardo Pasiliao Jr. An accelerated linearized alternating direction method of multipliers, 2014. http://arxiv.org/abs/1401.6607. [23] Neal Parikh and Stephen Boyd. Proximal algorithms. Foundations and Trends in Optimization, pages 1–96, 2013. [24] Federico Pierucci, Zaid Harchaoui, and J´erˆome Malick. A smoothing approach for composite conditional gradient with nonsmooth loss. In Conf´erence dApprentissage Automatique–Actes CAP14, 2014. [25] Mark Schmidt, Nicolas L. Roux, and Francis R. Bach. Convergence rates of inexact proximal-gradient methods for convex optimization. In Adv. NIPS. 2011. [26] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In NIPS, 2012. 9 | 2015 | 281 |
5,793 | Subset Selection by Pareto Optimization Chao Qian Yang Yu Zhi-Hua Zhou National Key Laboratory for Novel Software Technology, Nanjing University Collaborative Innovation Center of Novel Software Technology and Industrialization Nanjing 210023, China {qianc,yuy,zhouzh}@lamda.nju.edu.cn Abstract Selecting the optimal subset from a large set of variables is a fundamental problem in various learning tasks such as feature selection, sparse regression, dictionary learning, etc. In this paper, we propose the POSS approach which employs evolutionary Pareto optimization to find a small-sized subset with good performance. We prove that for sparse regression, POSS is able to achieve the best-so-far theoretically guaranteed approximation performance efficiently. Particularly, for the Exponential Decay subclass, POSS is proven to achieve an optimal solution. Empirical study verifies the theoretical results, and exhibits the superior performance of POSS to greedy and convex relaxation methods. 1 Introduction Subset selection is to select a subset of size k from a total set of n variables for optimizing some criterion. This problem arises in many applications, e.g., feature selection, sparse learning and compressed sensing. The subset selection problem is, however, generally NP-hard [13, 4]. Previous employed techniques can be mainly categorized into two branches, greedy algorithms and convex relaxation methods. Greedy algorithms iteratively select or abandon one variable that makes the criterion currently optimized [9, 19], which are however limited due to its greedy behavior. Convex relaxation methods usually replace the set size constraint (i.e., the ℓ0-norm) with convex constraints, e.g., the ℓ1-norm constraint [18] and the elastic net penalty [29]; then find the optimal solutions to the relaxed problem, which however could be distant to the true optimum. Pareto optimization solves a problem by reformulating it as a bi-objective optimization problem and employing a bi-objective evolutionary algorithm, which has significantly developed recently in theoretical foundation [22, 15] and applications [16]. This paper proposes the POSS (Pareto Optimization for Subset Selection) method, which treats subset selection as a bi-objective optimization problem that optimizes some given criterion and the subset size simultaneously. To investigate the performance of POSS, we study a representative example of subset selection, the sparse regression. The subset selection problem in sparse regression is to best estimate a predictor variable by linear regression [12], where the quality of estimation is usually measured by the mean squared error, or equivalently, the squared multiple correlation R2 [6, 11]. Gilbert et al. [9] studied the two-phased approach with orthogonal matching pursuit (OMP), and proved the multiplicative approximation guarantee 1 + Θ(µk2) for the mean squared error, when the coherence µ (i.e., the maximum correlation between any pair of observation variables) is O(1/k). This approximation bound was later improved by [20, 19]. Under the same small coherence condition, Das and Kempe [2] analyzed the forward regression (FR) algorithm [12] and obtained an approximation guarantee 1−Θ(µk) for R2. These results however will break down when µ ∈w(1/k). By introducing the submodularity ratio γ, Das and Kempe [3] proved the approximation guarantee 1 −e−γ on R2 by the FR algorithm; this guarantee is considered to be the strongest since it can be applied with any coherence. Note that sparse regression is similar to the problem of sparse recovery [7, 25, 21, 17], but they are for 1 different purposes. Assuming that the predictor variable has a sparse representation, sparse recovery is to recover the exact coefficients of the truly sparse solution. We theoretically prove that, for sparse regression, POSS using polynomial time achieves a multiplicative approximation guarantee 1 −e−γ for squared multiple correlation R2, the best-so-far guarantee obtained by the FR algorithm [3]. For the Exponential Decay subclass, which has clear applications in sensor networks [2], POSS can provably find an optimal solution, while FR cannot. The experimental results verify the theoretical results and exhibit the superior performance of POSS. We start the rest of the paper by introducing the subset selection problem. We then present in three subsequent sections the POSS method, its theoretical analysis for sparse regression, and the empirical studies. The final section concludes this paper. 2 Subset Selection The subset selection problem originally aims at selecting a few columns from a matrix, so that the matrix is most represented by the selected columns [1]. In this paper, we present the generalized subset selection problem that can be applied to arbitrary criterion evaluating the selection. 2.1 The General Problem Given a set of observation variables V = {X1, . . . , Xn}, a criterion f and a positive integer k, the subset selection problem is to select a subset S ⊆V such that f is optimized with the constraint |S| ≤k, where | · | denotes the size of a set. For notational convenience, we will not distinguish between S and its index set IS = {i | Xi ∈S}. Subset selection is formally stated as follows. Definition 1 (Subset Selection). Given all variables V = {X1, . . . , Xn}, a criterion f and a positive integer k, the subset selection problem is to find the solution of the optimization problem: arg minS⊆V f(S) s.t. |S| ≤k. (1) The subset selection problem is NP-hard in general [13, 4], except for some extremely simple criteria. In this paper, we take sparse regression as the representative case. 2.2 Sparse Regression Sparse regression [12] finds a sparse approximation solution to the regression problem, where the solution vector can only have a few non-zero elements. Definition 2 (Sparse Regression). Given all observation variables V = {X1, . . . , Xn}, a predictor variable Z and a positive integer k, define the mean squared error of a subset S ⊆V as MSEZ,S = minα∈R|S| E h (Z − X i∈S αiXi)2i . Sparse regression is to find a set of at most k variables minimizing the mean squared error, i.e., arg minS⊆V MSEZ,S s.t. |S| ≤k. For the ease of theoretical treatment, the squared multiple correlation R2 Z,S = (V ar(Z) −MSEZ,S)/V ar(Z) is used to replace MSEZ,S [6, 11] so that the sparse regression is equivalently arg maxS⊆V R2 Z,S s.t. |S| ≤k. (2) Sparse regression is a representative example of subset selection [12]. Note that we will study Eq. (2) in this paper. Without loss of generality, we assume that all random variables are normalized to have expectation 0 and variance 1. Thus, R2 Z,S is simplified to be 1 −MSEZ,S. For sparse regression, Das and Kempe [3] proved that the forward regression (FR) algorithm, presented in Algorithm 1, can produce a solution SF R with |SF R|=k and R2 Z,SF R ≥(1−e−γSF R,k) · OPT (where OPT denotes the optimal function value of Eq. (2)), which is the best currently known approximation guarantee. The FR algorithm is a greedy approach, which iteratively selects a variable with the largest R2 improvement. 2 Algorithm 1 Forward Regression Input: all variables V = {X1, . . . , Xn}, a predictor variable Z and an integer parameter k ∈[1, n] Output: a subset of V with k variables Process: 1: Let t = 0 and St = ∅. 2: repeat 3: Let X∗be a variable maximizing R2 Z,St∪{X}, i.e., X∗= arg maxX∈V \St R2 Z,St∪{X}. 4: Let St+1 = St ∪{X∗}, and t = t + 1. 5: until t = k 6: return Sk 3 The POSS Method The subset selection in Eq. (1) can be separated into two objectives, one optimizes the criterion, i.e., minS⊆V f(S), meanwhile the other keeps the size small, i.e., minS⊆V max{|S| −k, 0}. Usually the two objectives are conflicting, that is, a subset with a better criterion value could have a larger size. The POSS method solves the two objectives simultaneously, which is described as follows. Let us use the binary vector representation for subsets membership indication, i.e., s ∈{0, 1}n represents a subset S of V by assigning si = 1 if the i-th element of V is in S and si = 0 otherwise. We assign two properties for a solution s: o1 is the criterion value and o2 is the sparsity, s.o1 = +∞, s = {0}n, or |s| ≥2k f(s), otherwise , s.o2 = |s|. where the set of o1 to +∞is to exclude trivial or overly bad solutions. We further introduce the isolation function I : {0, 1}n →R as in [22], which determines if two solutions are allowed to be compared: they are comparable only if they have the same isolation function value. The implementation of I is left as a parameter of the method, while its effect will be clear in the analysis. As will be introduced later, we need to compare solutions. For solutions s and s′, we first judge if they have the same isolation function value. If not, we say that they are incomparable. If they have the same isolation function value, s is worse than s′ if s′ has a smaller or equal value on both the properties; s is strictly worse if s′ has a strictly smaller value in one property, and meanwhile has a smaller or equal value in the other property. But if both s is not worse than s′ and s′ is not worse than s, we still say that they are incomparable. POSS is described in Algorithm 2. Starting from the solution representing an empty set and the archive P containing only the empty set (line 1), POSS generates new solutions by randomly flipping bits of an archived solution (in the binary vector representation), as lines 4 and 5. Newly generated solutions are compared with the previously archived solutions (line 6). If the newly generated solution is not strictly worse than any previously archived solution, it will be archived. Before archiving the newly generated solution in line 8, the archive set P is cleaned by removing solutions in Q, which are previously archived solutions but are worse than the newly generated solution. The iteration of POSS repeats for T times. Note that T is a parameter, which could depend on the available resource of the user. We will analyze the relationship between the solution quality and T in later sections, and will use the theoretically derived T value in the experiments. After the iterations, we select the final solution from the archived solutions according to Eq. (1), i.e., select the solution with the smallest f value while the constraint on the set size is kept (line 12). 4 POSS for Sparse Regression In this section, we examine the theoretical performance of the POSS method for sparse regression. For sparse regression, the criterion f is implemented as f(s) = −R2 Z,s. Note that minimizing −R2 Z,s is equivalent to the original objective that maximizes R2 Z,s in Eq. (2). We need some notations for the analysis. Let Cov(·, ·) be the covariance between two random variables, C be the covariance matrix between all observation variables, i.e., Ci,j = Cov(Xi, Xj), 3 Algorithm 2 POSS Input: all variables V = {X1, . . . , Xn}, a given criterion f and an integer parameter k ∈[1, n] Parameter: the number of iterations T and an isolation function I : {0, 1}n →R Output: a subset of V with at most k variables Process: 1: Let s = {0}n and P = {s}. 2: Let t = 0. 3: while t < T do 4: Select s from P uniformly at random. 5: Generate s′ from s by flipping each bit of s with probability 1/n. 6: if ∄z ∈P such that I(z) = I(s′) and (z.o1 < s′.o1 ∧z.o2 ≤s′.o2) or (z.o1 ≤s′.o1 ∧ z.o2 < s′.o2) then 7: Q = {z ∈P | I(z) = I(s′) ∧s′.o1 ≤z.o1 ∧s′.o2 ≤z.o2}. 8: P = (P \ Q) ∪{s′}. 9: end if 10: t = t + 1. 11: end while 12: return arg mins∈P,|s|≤k f(s) and b be the covariance vector between Z and observation variables, i.e., bi = Cov(Z, Xi). Let CS denote the submatrix of C with row and column set S, and bS denote the subvector of b, containing elements bi with i ∈S. Let Res(Z, S) = Z −P i∈S αiXi denote the residual of Z with respect to S, where α ∈R|S| is the least square solution to MSEZ,S [6]. The submodularity ratio presented in Definition 3 is a measure characterizing how close a set function f is to submodularity. It is easy to see that f is submodular iff γU,k(f) ≥1 for any U and k. For f being the objective function R2, we will use γU,k shortly in the paper. Definition 3 (Submodularity Ratio [3]). Let f be a non-negative set function. The submodularity ratio of f with respect to a set U and a parameter k ≥1 is γU,k(f) = min L⊆U,S:|S|≤k,S∩L=∅ P x∈S(f(L ∪{x}) −f(L)) f(L ∪S) −f(L) . 4.1 On General Sparse Regression Our first result is the theoretical approximation bound of POSS for sparse regression in Theorem 1. Let OPT denote the optimal function value of Eq. (2). The expected running time of POSS is the average number of objective function (i.e., R2) evaluations, the most time-consuming step, which is also the average number of iterations T (denoted by E[T]) since it only needs to perform one objective evaluation for the newly generated solution s′ in each iteration. Theorem 1. For sparse regression, POSS with E[T] ≤2ek2n and I(·) = 0 (i.e., a constant function) finds a set S of variables with |S| ≤k and R2 Z,S ≥(1 −e−γ∅,k) · OPT. The proof relies on the property of R2 in Lemma 1, that for any subset of variables, there always exists another variable, the inclusion of which can bring an improvement on R2 proportional to the current distance to the optimum. Lemma 1 is extracted from the proof of Theorem 3.2 in [3]. Lemma 1. For any S ⊆V , there exists one variable ˆX ∈V −S such that R2 Z,S∪{ ˆ X} −R2 Z,S ≥γ∅,k k (OPT −R2 Z,S). Proof. Let S∗ k be the optimal set of variables of Eq. (2), i.e., R2 Z,S∗ k = OPT. Let ¯S = S∗ k −S and S′ = {Res(X, S) | X ∈¯S}. Using Lemmas 2.3 and 2.4 in [2], we can easily derive that R2 Z,S∪¯S = R2 Z,S + R2 Z,S′. Because R2 Z,S increases with S and S∗ k ⊆S ∪¯S, we have R2 Z,S∪¯S ≥ R2 Z,S∗ k = OPT. Thus, R2 Z,S′ ≥OPT −R2 Z,S. By Definition 3, |S′| = | ¯S| ≤k and R2 Z,∅= 0, we get P X′∈S′ R2 Z,X′ ≥γ∅,kR2 Z,S′ ≥γ∅,k(OPT −R2 Z,S). Let ˆX′ = arg maxX′∈S′ R2 Z,X′. Then, R2 Z, ˆ X′ ≥γ∅,k |S′| (OPT −R2 Z,S) ≥γ∅,k k (OPT −R2 Z,S). Let ˆX ∈¯S correspond to ˆX′, i.e., Res( ˆX, S) = ˆX′. Thus, R2 Z,S∪{ ˆ X}−R2 Z,S = R2 Z, ˆ X′ ≥γ∅,k k (OPT −R2 Z,S). The lemma holds. 4 Proof of Theorem 1. Since the isolation function is a constant function, all solutions are allowed to be compared and we can ignore it. Let Jmax denote the maximum value of j ∈[0, k] such that in the archive set P, there exists a solution s with |s| ≤j and R2 Z,s ≥(1 −(1 −γ∅,k k )j) · OPT. That is, Jmax = max{j ∈[0, k] | ∃s ∈P, |s| ≤j ∧R2 Z,s ≥(1 −(1 −γ∅,k k )j) · OPT}. We then analyze the expected iterations until Jmax = k, which implies that there exists one solution s in P satisfying that |s| ≤k and R2 Z,s ≥(1 −(1 −γ∅,k k )k) · OPT ≥(1 −e−γ∅,k) · OPT. The initial value of Jmax is 0, since POSS starts from {0}n. Assume that currently Jmax = i < k. Let s be a corresponding solution with the value i, i.e., |s| ≤i and R2 Z,s ≥(1−(1−γ∅,k k )i)·OPT. It is easy to see that Jmax cannot decrease because cleaning s from P (lines 7 and 8 of Algorithm 2) implies that s is “worse” than a newly generated solution s′, which must have a smaller size and a larger R2 value. By Lemma 1, we know that flipping one specific 0 bit of s (i.e., adding a specific variable into S) can generate a new solution s′, which satisfies that R2 Z,s′ −R2 Z,s ≥γ∅,k k (OPT − R2 Z,s). Then, we have R2 Z,s′ ≥(1 −γ∅,k k )R2 Z,s + γ∅,k k · OPT ≥(1 −(1 −γ∅,k k )i+1) · OPT. Since |s′| = |s| + 1 ≤i + 1, s′ will be included into P; otherwise, from line 6 of Algorithm 2, s′ must be “strictly worse” than one solution in P, and this implies that Jmax has already been larger than i, which contradicts with the assumption Jmax = i. After including s′, Jmax ≥i+1. Let Pmax denote the largest size of P. Thus, Jmax can increase by at least 1 in one iteration with probability at least 1 Pmax · 1 n(1−1 n)n−1 ≥ 1 enPmax , where 1 Pmax is a lower bound on the probability of selecting s in line 4 of Algorithm 2 and 1 n(1 −1 n)n−1 is the probability of flipping a specific bit of s and keeping other bits unchanged in line 5. Then, it needs at most enPmax expected iterations to increase Jmax. Thus, after k · enPmax expected iterations, Jmax must have reached k. By the procedure of POSS, we know that the solutions maintained in P must be incomparable. Thus, each value of one property can correspond to at most one solution in P. Because the solutions with |s| ≥2k have +∞value on the first property, they must be excluded from P. Thus, |s| ∈ {0, 1, . . . , 2k −1}, which implies that Pmax ≤2k. Hence, the expected number of iterations E[T] for finding the desired solution is at most 2ek2n. □ Comparing with the approximation guarantee of FR, (1 −e−γSF R,k) · OPT [3], it is easy to see that γ∅,k ≥γSF R,k from Definition 3. Thus, POSS with the simplest configuration of the isolation function can do at least as well as FR on any sparse regression problem, and achieves the best previous approximation guarantee. We next investigate if POSS can be strictly better than FR. 4.2 On The Exponential Decay Subclass Our second result is on a subclass of sparse regression, called Exponential Decay as in Definition 4. In this subclass, the observation variables can be ordered in a line such that their covariances are decreasing exponentially with the distance. Definition 4 (Exponential Decay [2]). The variables Xi are associated with points y1 ≤y2 ≤. . . ≤ yn, and Ci,j = a|yi−yj| for some constant a ∈(0, 1). Since we have shown that POSS with a constant isolation function is generally good, we prove below that POSS with a proper isolation function can be even better: it is strictly better than FR on the Exponential Decay subclass, as POSS finds an optimal solution (i.e., Theorem 2) while FR cannot (i.e., Proposition 1). The isolation function I(s ∈{0, 1}n) = min{i | si = 1} implies that two solutions are comparable only if they have the same minimum index for bit 1. Theorem 2. For the Exponential Decay subclass of sparse regression, POSS with E[T] ∈O(k2(n− k)n log n) and I(s ∈{0, 1}n) = min{i | si = 1} finds an optimal solution. The proof of Theorem 2 utilizes the dynamic programming property of the problem, as in Lemma 2. Lemma 2. [2] Let R2(v, j) denote the maximum R2 Z,S value by choosing v variables, including necessarily Xj, from Xj, . . . , Xn. That is, R2(v, j) = max{R2 Z,S | S ⊆{Xj, . . . , Xn}, Xj ∈ S, |S| = v}. Then, the following recursive relation holds: R2(v + 1, j) = maxj+1≤i≤n R2(v, i) + b2 j + (bj −bi)2 a2|yi−yj| 1 −a2|yi−yj| −2bjbi a|yi−yj| 1 + a|yi−yj| , where the term in is the R2 value by adding Xj into the variable subset corresponding to R2(v, i). 5 Proof of Theorem 2. We divide the optimization process into k + 1 phases, where the i-th (1 ≤ i ≤k) phase starts after the (i−1)-th phase has finished. We define that the i-th phase finishes when for each solution corresponding to R2(i, j) (1 ≤j ≤n −i + 1), there exists one solution in the archive P which is “better” than it. Here, a solution s is “better” than s′ is equivalent to that s′ is “worse” than s. Let ξi denote the iterations since phase i−1 has finished, until phase i is completed. Starting from the solution {0}n, the 0-th phase has finished. Then, we consider ξi (i ≥1). In this phase, from Lemma 2, we know that a solution “better” than a corresponding solution of R2(i, j) can be generated by selecting a specific one from the solutions “better” than R2(i−1, j+1), . . . , R2(i− 1, n) and flipping its j-th bit, which happens with probability at least 1 Pmax · 1 n(1−1 n)n−1 ≥ 1 enPmax . Thus, if we have found L desired solutions in the i-th phase, the probability of finding a new desired solution in the next iteration is at least (n−i+1−L)· 1 enPmax , where n−i+1 is the total number of desired solutions to find in the i-th phase. Then, E[ξi] ≤Pn−i L=0 enPmax n−i+1−L ∈O(n log nPmax). Therefore, the expected number of iterations E[T] is O(kn log nPmax) until the k-th phase finishes, which implies that an optimal solution corresponding to max1≤j≤n R2(k, j) has been found. Note that Pmax ≤2k(n−k), because the incomparable property of the maintained solutions by POSS ensures that there exists at most one solution in P for each possible combination of |s| ∈{0, 1, . . . , 2k −1} and I(s) ∈{0, 1, . . . , n}. Thus, E[T] for finding an optimal solution is O(k2(n −k)n log n). □ Then, we analyze FR (i.e., Algorithm 1) for this special class. We show below that FR can be blocked from finding an optimal solution by giving a simple example. Example 1. X1 = Y1, Xi = riXi−1 + Yi, where ri ∈(0, 1), and Yi are independent random variables with expectation 0 such that each Xi has variance 1. For i < j, Cov(Xi, Xj) = Qj k=i+1 rk. Then, it is easy to verify that Example 1 belongs to the Exponential Decay class by letting y1 = 0 and yi = Pi k=2 loga rk for i ≥2. Proposition 1. For Example 1 with n = 3, r2 = 0.03, r3 = 0.5, Cov(Y1, Z) = Cov(Y2, Z) = δ and Cov(Y3, Z) = 0.505δ, FR cannot find the optimal solution for k = 2. Proof. The covariances between Xi and Z are b1 = δ, b2 = 0.03b1 + δ = 1.03δ and b3 = 0.5b2 + 0.505δ = 1.02δ. Since Xi and Z have expectation 0 and variance 1, R2 Z,S can be simply represented as bT SC−1 S bS [11]. We then calculate the R2 value as follows: R2 Z,X1 = δ2, R2 Z,X2 = 1.0609δ2, R2 Z,X3 = 1.0404δ2; R2 Z,{X1,X2} = 2.0009δ2, R2 Z,{X1,X3} = 2.0103δ2, R2 Z,{X2,X3} = 1.4009δ2. The optimal solution for k = 2 is {X1, X3}. FR first selects X2 since R2 Z,X2 is the largest, then selects X1 since R2 Z,{X2,X1} > R2 Z,{X2,X3}; thus produces a local optimal solution {X1, X2}. It is also easy to verify that other two previous methods OMP [19] and FoBa [26] cannot find the optimal solution for this example, due to their greedy nature. 5 Empirical Study We conducted experiments on 12 data sets1 in Table 1 to compare POSS with the following methods: • FR [12] iteratively adds one variable with the largest improvement on R2. • OMP [19] iteratively adds one variable that mostly correlates with the predictor variable residual. • FoBa [26] is based on OMP but deletes one variable adaptively when beneficial. Set parameter ν = 0.5, the solution path length is five times as long as the maximum sparsity level (i.e., 5 × k), and the last active set containing k variables is used as the final selection [26]. • RFE [10] iteratively deletes one variable with the smallest weight by linear regression. • Lasso [18], SCAD [8] and MCP [24] replaces the ℓ0 norm constraint with the ℓ1 norm penalty, the smoothly clipped absolute deviation penalty and the mimimax concave penalty, respectively. For implementing these methods, we use the SparseReg toolbox developed in [28, 27]. For POSS, we use I(·) = 0 since it is generally good, and the number of iterations T is set to be ⌊2ek2n⌋as suggested by Theorem 1. To evaluate how far these methods are from the optimum, we also compute the optimal subset by exhaustive enumeration, denoted as OPT. 1The data sets are from http://archive.ics.uci.edu/ml/ and http://www.csie.ntu. edu.tw/˜cjlin/libsvmtools/datasets/. Some binary classification data are used for regression. All variables are normalized to have mean 0 and variance 1. 6 Table 1: The data sets. data set #inst #feat data set #inst #feat data set #inst #feat housing 506 13 sonar 208 60 clean1 476 166 eunite2001 367 16 triazines 186 60 w5a 9888 300 svmguide3 1284 21 coil2000 9000 86 gisette 7000 5000 ionosphere 351 34 mushrooms 8124 112 farm-ads 4143 54877 Table 2: The training R2 value (mean±std.) of the compared methods on 12 data sets for k = 8. In each data set, ‘•/◦’ denote respectively that POSS is significantly better/worse than the corresponding method by the t-test [5] with confidence level 0.05. ‘-’ means that no results were obtained after running several days. Data set OPT POSS FR FoBa OMP RFE MCP housing .7437±.0297 .7437±.0297 .7429±.0300• .7423±.0301• .7415±.0300• .7388±.0304• .7354±.0297• eunite2001 .8484±.0132 .8482±.0132 .8348±.0143• .8442±.0144• .8349±.0150• .8424±.0153• .8320±.0150• svmguide3 .2705±.0255 .2701±.0257 .2615±.0260• .2601±.0279• .2557±.0270• .2136±.0325• .2397±.0237• ionosphere .5995±.0326 .5990±.0329 .5920±.0352• .5929±.0346• .5921±.0353• .5832±.0415• .5740±.0348• sonar – .5365±.0410 .5171±.0440• .5138±.0432• .5112±.0425• .4321±.0636• .4496±.0482• triazines – .4301±.0603 .4150±.0592• .4107±.0600• .4073±.0591• .3615±.0712• .3793±.0584• coil2000 – .0627±.0076 .0624±.0076• .0619±.0075• .0619±.0075• .0363±.0141• .0570±.0075• mushrooms – .9912±.0020 .9909±.0021• .9909±.0022• .9909±.0022• .6813±.1294• .8652±.0474• clean1 – .4368±.0300 .4169±.0299• .4145±.0309• .4132±.0315• .1596±.0562• .3563±.0364• w5a – .3376±.0267 .3319±.0247• .3341±.0258• .3313±.0246• .3342±.0276• .2694±.0385• gisette – .7265±.0098 .7001±.0116• .6747±.0145• .6731±.0134• .5360±.0318• .5709±.0123• farm-ads – .4217±.0100 .4196±.0101• .4170±.0113• .4170±.0113• – .3771±.0110• POSS: win/tie/loss – 12/0/0 12/0/0 12/0/0 11/0/0 12/0/0 To assess each method on each data set, we repeat the following process 100 times. The data set is randomly and evenly split into a training set and a test set. Sparse regression is built on the training set, and evaluated on the test set. We report the average training and test R2 values. 5.1 On Optimization Performance Table 2 lists the training R2 for k = 8, which reveals the optimization quality of the methods. Note that the results of Lasso, SCAD and MCP are very close, and we only report that of MCP due to the page limit. By the t-test [5] with significance level 0.05, POSS is shown significantly better than all the compared methods on all data sets. We plot the performance curves on two data sets for k ≤8 in Figure 1. For sonar, OPT is calculated only for k ≤5. We can observe that POSS tightly follows OPT, and has a clear advantage over the rest methods. FR, FoBa and OMP have close performances, while are much better than MCP, SCAD and Lasso. The bad performance of Lasso is consistent with the previous results in [3, 26]. We notice that, although the ℓ1 norm constraint is a tight convex relaxation of the ℓ0 norm constraint and can have good results in sparse recovery tasks, the performance of Lasso is not as good as POSS and greedy methods on most data sets. This is due to that, unlike assumed in sparse recovery tasks, there may not exist a sparse structure in the data sets. In this case, ℓ1 norm constraint can be a bad approximation of ℓ0 norm constraint. Meanwhile, ℓ1 norm constraint also shifts the optimization problem, making it hard to well optimize the original R2 criterion. Considering the running time (in the number of objective function evaluations), OPT does exhaustive search, thus needs n k ≥nk kk time, which could be unacceptable for a slightly large data set. FR, FoBa and OMP are greedy-like approaches, thus are efficient and their running time are all in the order of kn. POSS finds the solutions closest to those of OPT, taking 2ek2n time. Although POSS is slower by a factor of k, the difference would be small when k is a small constant. Since the 2ek2n time is a theoretical upper bound for POSS being as good as FR, we empirically examine how tight this bound is. By selecting FR as the baseline, we plot the curve of the R2 value over the running time for POSS on the two largest data sets gisette and farm-ads, as shown in Figure 2. We do not split the training and test set, and the curve for POSS is the average of 30 independent runs. The x-axis is in kn, the running time of FR. We can observe that POSS takes about only 14% and 23% of the theoretical time to achieve a better performance, respectively on the two data sets. This implies that POSS can be more efficient in practice than in theoretical analysis. 7 3 4 5 6 7 k OPT POSS FR FoBa OMP RFE MCP SCAD Lasso 3 4 5 6 7 8 0.18 0.2 0.22 0.24 0.26 k R2 (a) on svmguide3 3 4 5 6 7 8 0.25 0.3 0.35 0.4 0.45 0.5 0.55 k R2 (b) on sonar Figure 1: Training R2 (the larger the better). 10 20 30 40 0.64 0.66 0.68 0.7 0.72 Running time in kn R2 POSS FR 6kn 2ek2n = 43kn (a) on gisette 10 20 30 40 0.39 0.4 0.41 0.42 Running time in kn R2 POSS FR 10kn 2ek2n = 43kn (b) on farm-ads Figure 2: Performance v.s. running time of POSS. 3 4 5 6 7 8 0.16 0.18 0.2 0.22 k R2 (a) on svmguide3 3 4 5 6 7 8 0.05 0.1 0.15 0.2 k R2 (b) on sonar Figure 3: Test R2 (the larger the better). 5 6 7 8 0.7 0.71 0.72 0.73 0.74 k RSS (a) on training set (RSS) 5 6 7 8 0.23 0.235 0.24 0.245 0.25 0.255 0.26 k R2 (b) on test set Figure 4: Sparse regression with ℓ2 regularization on sonar. RSS: the smaller the better. 5.2 On Generalization Performance When testing sparse regression on the test data, it has been known that the sparsity alone may be not a good complexity measure [26], since it only restricts the number of variables, but the range of the variables is unrestricted. Thus better optimization does not always lead to better generalization performance. We also observe this in Figure 3. On svmguide3, test R2 is consistent with training R2 in Figure 1(a), however on sonar, better training R2 (as in Figure 1(b)) leads to worse test R2 (as in Figure 3(b)), which may be due to the small number of instances making it prone to overfitting. As suggested in [26], other regularization terms may be necessary. We add the ℓ2 norm regularization into the objective function, i.e., RSSZ,S = minα∈R|S| E (Z −P i∈S αiXi)2 + λ|α|2 2. The optimization is now arg minS⊆V RSSZ,S s.t. |S| ≤k . We then test all the compared methods to solve this optimization problem with λ = 0.9615 on sonar. As plotted in Figure 4, we can observe that POSS still does the best optimization on the training RSS, and by introducing the ℓ2 norm, it leads to the best generalization performance in R2. 6 Conclusion In this paper, we study the problem of subset selection, which has many applications ranging from machine learning to signal processing. The general goal is to select a subset of size k from a large set of variables such that a given criterion is optimized. We propose the POSS approach that solves the two objectives of the subset selection problem simultaneously, i.e., optimizing the criterion and reducing the subset size. On sparse regression, a representative of subset selection, we theoretically prove that a simple POSS (i.e., using a constant isolation function) can generally achieve the best previous approximation guarantee, using time 2ek2n. Moreover, we prove that, with a proper isolation function, it finds an optimal solution for an important subclass Exponential Decay using time O(k2(n−k)n log n), while other greedy-like methods may not find an optimal solution. We verify the superior performance of POSS by experiments, which also show that POSS can be more efficient than its theoretical time. We will further study Pareto optimization from the aspects of using potential heuristic operators [14] and utilizing infeasible solutions [23]; and try to apply it to more machine learning tasks. Acknowledgements We want to thank Lijun Zhang and Jianxin Wu for their helpful comments. This research was supported by 973 Program (2014CB340501) and NSFC (61333014, 61375061). 8 References [1] C. Boutsidis, M. W. Mahoney, and P. Drineas. An improved approximation algorithm for the column subset selection problem. In SODA, pages 968–977, New York, NY, 2009. [2] A. Das and D. Kempe. Algorithms for subset selection in linear regression. In STOC, pages 45–54, Victoria, Canada, 2008. [3] A. Das and D. Kempe. Submodular meets spectral: Greedy algorithms for subset selection, sparse approximation and dictionary selection. In ICML, pages 1057–1064, Bellevue, WA, 2011. [4] G. Davis, S. Mallat, and M. Avellaneda. Adaptive greedy approximations. Constructive Approximation, 13(1):57–98, 1997. [5] J. Demˇsar. Statistical comparisons of classifiers over multiple data sets. Journal of Machine Learning Research, 7:1–30, 2006. [6] G. Diekhoff. Statistics for the Social and Behavioral Sciences: Univariate, Bivariate, Multivariate. William C Brown Pub, 1992. [7] D. L. Donoho, M. Elad, and V. N. Temlyakov. Stable recovery of sparse overcomplete representations in the presence of noise. IEEE Transactions on Information Theory, 52(1):6–18, 2006. [8] J. Fan and R. Li. Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American Statistical Association, 96(456):1348–1360, 2001. [9] A. C. Gilbert, S. Muthukrishnan, and M. J. Strauss. Approximation of functions over redundant dictionaries using coherence. In SODA, pages 243–252, Baltimore, MD, 2003. [10] I. Guyon, J. Weston, S. Barnhill, and V. Vapnik. Gene selection for cancer classification using support vector machines. Machine Learning, 46(1-3):389–422, 2002. [11] R. A. Johnson and D. W. Wichern. Applied Multivariate Statistical Analysis. Pearson, 6th edition, 2007. [12] A. Miller. Subset Selection in Regression. Chapman and Hall/CRC, 2nd edition, 2002. [13] B. K. Natarajan. Sparse approximate solutions to linear systems. SIAM Journal on Computing, 24(2):227– 234, 1995. [14] C. Qian, Y. Yu, and Z.-H. Zhou. An analysis on recombination in multi-objective evolutionary optimization. Artificial Intelligence, 204:99–119, 2013. [15] C. Qian, Y. Yu, and Z.-H. Zhou. On constrained Boolean Pareto optimization. In IJCAI, pages 389–395, Buenos Aires, Argentina, 2015. [16] C. Qian, Y. Yu, and Z.-H. Zhou. Pareto ensemble pruning. In AAAI, pages 2935–2941, Austin, TX, 2015. [17] M. Tan, I. Tsang, and L. Wang. Matching pursuit LASSO Part I: Sparse recovery over big dictionary. IEEE Transactions on Signal Processing, 63(3):727–741, 2015. [18] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B (Methodological), 58(1):267–288, 1996. [19] J. A. Tropp. Greed is good: Algorithmic results for sparse approximation. IEEE Transactions on Information Theory, 50(10):2231–2242, 2004. [20] J. A. Tropp, A. C. Gilbert, S. Muthukrishnan, and M. J. Strauss. Improved sparse approximation over quasiincoherent dictionaries. In ICIP, pages 37–40, Barcelona, Spain, 2003. [21] L. Xiao and T. Zhang. A proximal-gradient homotopy method for the sparse least-squares problem. SIAM Journal on Optimization, 23(2):1062–1091, 2013. [22] Y. Yu, X. Yao, and Z.-H. Zhou. On the approximation ability of evolutionary optimization with application to minimum set cover. Artificial Intelligence, 180-181:20–33, 2012. [23] Y. Yu and Z.-H. Zhou. On the usefulness of infeasible solutions in evolutionary search: A theoretical study. In IEEE CEC, pages 835–840, Hong Kong, China, 2008. [24] C.-H. Zhang. Nearly unbiased variable selection under minimax concave penalty. The Annals of Statistics, 38(2):894–942, 2010. [25] T. Zhang. On the consistency of feature selection using greedy least squares regression. Journal of Machine Learning Research, 10:555–568, 2009. [26] T. Zhang. Adaptive forward-backward greedy algorithm for learning sparse representations. IEEE Transactions on Information Theory, 57(7):4689–4708, 2011. [27] H. Zhou. Matlab SparseReg Toolbox Version 0.0.1. Available Online, 2013. [28] H. Zhou, A. Armagan, and D. Dunson. Path following and empirical Bayes model selection for sparse regression. arXiv:1201.3528, 2012. [29] H. Zou and T. 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 | 2015 | 282 |
5,794 | Parallel Correlation Clustering on Big Graphs Xinghao Pan↵,✏, Dimitris Papailiopoulos↵,✏, Samet Oymak↵,✏, Benjamin Recht↵,✏,σ, Kannan Ramchandran✏, and Michael I. Jordan↵,✏,σ ↵AMPLab, ✏EECS at UC Berkeley, σStatistics at UC Berkeley Abstract Given a similarity graph between items, correlation clustering (CC) groups similar items together and dissimilar ones apart. One of the most popular CC algorithms is KwikCluster: an algorithm that serially clusters neighborhoods of vertices, and obtains a 3-approximation ratio. Unfortunately, in practice KwikCluster requires a large number of clustering rounds, a potential bottleneck for large graphs. We present C4 and ClusterWild!, two algorithms for parallel correlation clustering that run in a polylogarithmic number of rounds, and provably achieve nearly linear speedups. C4 uses concurrency control to enforce serializability of a parallel clustering process, and guarantees a 3-approximation ratio. ClusterWild! is a coordination free algorithm that abandons consistency for the benefit of better scaling; this leads to a provably small loss in the 3 approximation ratio. We demonstrate experimentally that both algorithms outperform the state of the art, both in terms of clustering accuracy and running time. We show that our algorithms can cluster billion-edge graphs in under 5 seconds on 32 cores, while achieving a 15⇥speedup. 1 Introduction Clustering items according to some notion of similarity is a major primitive in machine learning. Correlation clustering serves as a basic means to achieve this goal: given a similarity measure between items, the goal is to group similar items together and dissimilar items apart. In contrast to other clustering approaches, the number of clusters is not determined a priori, and good solutions aim to balance the tension between grouping all items together versus isolating them. cluster 1 cluster 2 cost = (#“−” edges inside clusters) + (#“+” edges across clusters) = 2 Figure 1: In the above graph, solid edges denote similarity and dashed dissimilarity. The number of disagreeing edges in the above clustering clustering is 2; we color the bad edges with red. The simplest CC variant can be described on a complete signed graph. Our input is a graph G on n vertices, with +1 weights on edges between similar items, and −1 edges between dissimilar ones. Our goal is to generate a partition of vertices into disjoint sets that minimizes the number of disagreeing edges: this equals the number of “+” edges cut by the clusters plus the number of “−” edges inside the clusters. This metric is commonly called the number of disagreements. In Figure 1, we give a toy example of a CC instance. Entity deduplication is the archetypal motivating example for correlation clustering, with applications in chat disentanglement, co-reference resolution, and spam detection [1, 2, 3, 4, 5, 6]. The input is a set of entities (say, results of a keyword search), and a pairwise classifier that indicates— with some error—similarities between entities. Two results of a keyword search might refer to the same item, but might look different if they come from different sources. By building a similarity 1 graph between entities and then applying CC, the hope is to cluster duplicate entities in the same group; in the context of keyword search, this implies a more meaningful and compact list of results. CC has been further applied to finding communities in signed networks, classifying missing edges in opinion or trust networks [7, 8], gene clustering [9], and consensus clustering [3]. KwikCluster is the simplest CC algorithm that achieves a provable 3-approximation ratio [10], and works in the following way: pick a vertex v at random (a cluster center), create a cluster for v and its positive neighborhood N(v) (i.e., vertices connected to v with positive edges), peel these vertices and their associated edges from the graph, and repeat until all vertices are clustered. Beyond its theoretical guarantees, experimentally KwikCluster performs well when combined with local heuristics [3]. KwikCluster seems like an inherently sequential algorithm, and in most cases of interest it requires many peeling rounds. This happens because a small number of vertices are clustered per round. This can be a bottleneck for large graphs. Recently, there have been efforts to develop scalable variants of KwikCluster [5, 6]. In [6] a distributed peeling algorithm was presented in the context of MapReduce. Using an elegant analysis, the authors establish a (3 + ✏)-approximation in a polylogarithmic number of rounds. The algorithm employs a simple step that rejects vertices that are executed in parallel but are “conflicting”; however, we see in our experiments, this seemingly minor coordination step hinders scale-ups in a parallel core setting. In [5], a sketch of a distributed algorithm was presented. This algorithm achieves the same approximation as KwikCluster, in a logarithmic number of rounds, in expectation. However, it performs significant redundant work, per iteration, in its effort to detect in parallel which vertices should become cluster centers. Our contributions We present C4 and ClusterWild!, two parallel CC algorithms with provable performance guarantees, that in practice outperform the state of the art, both in terms of running time and clustering accuracy. C4 is a parallel version of KwikCluster that uses concurrency control to establish a 3-approximation ratio. ClusterWild! is a simple to implement, coordination-free algorithm that abandons consistency for the benefit of better scaling, while having a provably small loss in the 3 approximation ratio. C4 achieves a 3 approximation ratio, in a poly-logarithmic number of rounds, by enforcing consistency between concurrently running peeling threads. Consistency is enforced using concurrency control, a notion extensively studied for databases transactions, that was recently used to parallelize inherently sequential machine learning algorithms [11]. ClusterWild! is a coordination-free parallel CC algorithm that waives consistency in favor of speed. The cost we pay is an arbitrarily small loss in ClusterWild!’s accuracy. We show that ClusterWild! achieves a (3 + ✏)OPT + O(✏· n · log2 n) approximation, in a poly-logarithmic number of rounds, with provable nearly linear speedups. Our main theoretical innovation for ClusterWild! is analyzing the coordination-free algorithm as a serial variant of KwikCluster that runs on a “noisy” graph. In our experimental evaluation, we demonstrate that both algorithms gracefully scale up to graphs with billions of edges. In these large graphs, our algorithms output a valid clustering in less than 5 seconds, on 32 threads, up to an order of magnitude faster than KwikCluster. We observe how, not unexpectedly, ClusterWild! is faster than C4, and quite surprisingly, abandoning coordination in this parallel setting, only amounts to a 1% of relative loss in the clustering accuracy. Furthermore, we compare against state of the art parallel CC algorithms, showing that we consistently outperform these algorithms in terms of both running time and clustering accuracy. Notation G denotes a graph with n vertices and m edges. G is complete and only has ±1 edges. We denote by dv the positive degree of a vertex, i.e., the number of vertices connected to v with positive edges. ∆denotes the positive maximum degree of G, and N(v) denotes the positive neighborhood of v; moreover, let Cv = {v, N(v)}. Two vertices u, v are termed as “friends” if u 2 N(v) and vice versa. We denote by ⇡a permutation of {1, . . . , n}. 2 2 Two Parallel Algorithms for Correlation Clustering The formal definition of correlation clustering is given below. Correlation Clustering. Given a graph G on n vertices, partition the vertices into an arbitrary number k of disjoint subsets C1, . . . , Ck such that the sum of negative edges within the subsets plus the sum of positive edges across the subsets is minimized: OPT = min 1kn min Ci\Cj =0,8i6=j [k i=1Ci={1,...,n} k X i=1 E−(Ci, Ci) + k X i=1 k X j=i+1 E+(Ci, Cj) where E+ and E−are the sets of positive and negative edges in G. KwikCluster is a remarkably simple algorithm that approximately solves the above combinatorial problem, and operates as follows. A random vertex v is picked, a cluster Cv is created with v and its positive neighborhood, then the vertices in Cv are peeled from the graph, and this process is repeated until all vertices are clustered KwikCluster can be equivalently executed, as noted by [5], if we substitute the random choice of a vertex per peeling round, with a random order ⇡preassigned to vertices, (see Alg. 1). That is, select a random permutation on vertices, then peel the vertex indexed by ⇡(1), and its friends. Remove from ⇡the vertices in Cv and repeat this process. Having an order among vertices makes the discussion of parallel algorithms more convenient. Algorithm 1 KwikCluster with ⇡ 1: ⇡= a random permutation of {1, . . . , n} 2: while V 6= ; do 3: select the vertex v indexed by ⇡(1) 4: Cv = {v, N(v)} 5: Remove clustered vertices from G and ⇡ 6: end while C4: Parallel CC using Concurency Control. Suppose we now wish to run a parallel version of KwikCluster, say on two threads: one thread picks vertex v indexed by ⇡(1) and the other thread picks u indexed by ⇡(2), concurrently. Can both vertices be cluster centers? They can, iff they are not friends in G. If v and u are connected with a positive edge, then the vertex with the smallest order wins. This is our concurency rule no. 1. Now, assume that v and u are not friends in G, and both v and u become cluster centers. Moreover, assume that v and u have a common, unclustered friend, say w: should w be clustered with v, or u? We need to follow what would happen with KwikCluster in Alg. 1: w will go with the vertex that has the smallest permutation number, in this case v. This is concurency rule no. 2. Following the above simple rules, we develop C4, our serializable parallel CC algorithm. Since, C4 constructs the same clusters as KwikCluster (for a given ordering ⇡), it inherits its 3 approximation. The above idea of identifying the cluster centers in rounds was first used in [12] to obtain a parallel algorithm for maximal independent set (MIS). C4, shown as Alg. 2, starts by assigning a random permutation ⇡to the vertices, it then samples an active set A of n ∆unclustered vertices; this sample is taken from the prefix of ⇡. After sampling A, each of the P threads picks a vertex with the smallest order in A, then checks if that vertex can become a cluster center. We first enforce concurrency rule no. 1: adjacent vertices cannot be cluster centers at the same time. C4 enforces it by making each thread check the friends of the vertex, say v, that is picked from A. A thread will check in attemptCluster whether its vertex v has any preceding friends that are cluster centers. If there are none, it will go ahead and label v as cluster center, and proceed with creating a cluster. If a preceding friend of v is a cluster center, then v is labeled as not being a cluster center. If a preceding friend of v, call it u, has not yet received a label (i.e., u is currently being processed and is not yet labeled as cluster center or not), then the thread processing v, will wait on u to receive a label. The major technical detail is in showing that this wait time is bounded; we show that no more than O(log n) threads can be in conflict at the same time, using a new subgraph sampling lemma [13]. Since C4 is serializable, it has to respect concurrency rule no. 2: if a vertex u is adjacency to two cluster centers, then it gets assigned to the one with smaller permutation order. This is accomplished in createCluster. After processing all vertices in A, all threads are synchronized in bulk, the clustered vertices are removed, a new active set is sampled, and the same process is repeated until everything has been clustered. In the following section, we present the theoretical guarantees for C4. 3 Algorithm 2 C4 & ClusterWild! 1: Input: G, ✏ 2: clusterID(1) = . . . = clusterID(n) = 1 3: ⇡= a random permutation of {1, . . . , n} 4: while V 6= ; do 5: ∆= maximum vertex degree in G(V ) 6: A = the first ✏· n ∆vertices in V [⇡]. 7: while A 6= ; do in parallel 8: v = first element in A 9: A = A −{v} 10: if C4 then // concurrency control 11: attemptCluster(v) 12: else if ClusterWild! then // coordination free 13: createCluster(v) 14: end if 15: end while 16: Remove clustered vertices from V and ⇡ 17: end while 18: Output: {clusterID(1), . . . , clusterID(n)}. createCluster(v): clusterID(v) = ⇡(v) for u 2 Γ(v) \ A do clusterID(u) = min(clusterID(u), ⇡(v)) end for attemptCluster(v): if clusterID(u) = 1 and isCenter(v) then createCluster(v) end if isCenter(v): for u 2 Γ(v) do // check friends (in order of ⇡) if ⇡(u) < ⇡(v) then // if they precede you, wait wait until clusterID(u) 6= 1 // till clustered if isCenter(u) then return 0 //a friend is center, so you can’t be end if end if end for return 1 // no earlier friends are centers, so you are ClusterWild!: Coordination-free Correlation Clustering. ClusterWild! speeds up computation by ignoring the first concurrency rule. It uniformly samples unclustered vertices, and builds clusters around all of them, without respecting the rule that cluster centers cannot be friends in G. In ClusterWild!, threads bypass the attemptCluster routine; this eliminates the “waiting” part of C4. ClusterWild! samples a set A of vertices from the prefix of ⇡. Each thread picks the first ordered vertex remaining in A, and using that vertex as a cluster center, it creates a cluster around it. It peels away the clustered vertices and repeats the same process, on the next remaining vertex in A. At the end of processing all vertices in A, all threads are synchronized in bulk, the clustered vertices are removed, a new active set is sampled, and the parallel clustering is repeated. A careful analysis along the lines of [6] shows that the number of rounds (i.e., bulk synchronization steps) is only poly-logarithmic. Quite unsurprisingly, ClusterWild! is faster than C4. Interestingly, abandoning consistency does not incur much loss in the approximation ratio. We show how the error introduced in the accuracy of the solution can be bounded. We characterize this error theoretically, and show that in practice it only translates to only a relative 1% loss in the objective. The main intuition of why ClusterWild! does not introduce too much error is that the chance of two randomly selected vertices being friends is small, hence the concurrency rules are infrequently broken. 3 Theoretical Guarantees In this section, we bound the number of rounds required for each algorithms, and establish the theoretical speedup one can obtain with P parallel threads. We proceed to present our approximation guarantees. We would like to remind the reader that—as in relevant literature—we consider graphs that are complete, signed, and unweighted. The omitted proofs can be found in the Appendix. 3.1 Number of rounds and running time Our analysis follows those of [12] and [6]. The main idea is to track how fast the maximum degree decreases in the remaining graph at the end of each round. Lemma 1. C4 and ClusterWild! terminate after O ! 1 ✏log n · log ∆ " rounds w.h.p. We now analyze the running time of both algorithms under a simplified BSP model. The main idea is that the the running time of each “super step” (i.e., round) is determined by the “straggling” thread (i.e., the one that gets assigned the most amount of work), plus the time needed for synchronization at the end of each round. Assumption 1. We assume that threads operate asynchronously within a round and synchronize at the end of a round. A memory cell can be written/read concurrently by multiple threads. The time 4 spent per round of the algorithm is proportional to the time of the slowest thread. The cost of thread synchronization at the end of each batch takes time O(P), where P is the number of threads. The total computation cost is proportional to the sum of the time spent for all rounds, plus the time spent during the bulk synchronization step. Under this simplified model, we show that both algorithms obtain nearly linear speedup, with ClusterWild! being faster than C4, precisely due to lack of coordination. Our main tool for analyzing C4 is a recent graph-theoretic result from [13] (Theorem 1), which guarantees that if one samples an O(n/∆) subset of vertices in a graph, the sampled subgraph has a connected component of size at most O(log n). Combining the above, in the appendix we show the following result. Theorem 2. The theoretical running time of C4 on P cores is upper bounded by O ⇣⇣ m+n log n P + P ⌘ log n · log ∆ ⌘ as long as the number of cores P is smaller than mini ni ∆i , where ni ∆i is the size of the batch in the i-th round of each algorithm. The running time of ClusterWild! on P cores is upper bounded by O ## m+n P + P $ log n · log ∆ $ . 3.2 Approximation ratio We now proceed with establishing the approximation ratios of C4 and ClusterWild!. C4 is serializable. It is straightforward that C4 obtains precisely the same approximation ratio as KwikCluster. One has to simply show that for any permutation ⇡, KwikCluster and C4 will output the same clustering. This is indeed true, as the two simple concurrency rules mentioned in the previous section are sufficient for C4 to be equivalent to KwikCluster. Theorem 3. C4 achieves a 3 approximation ratio, in expectation. ClusterWild! as a serial procedure on a noisy graph. Analyzing ClusterWild! is a bit more involved. Our guarantees are based on the fact that ClusterWild! can be treated as if one was running a peeling algorithm on a “noisy” graph. Since adjacent active vertices can still become cluster centers in ClusterWild!, one can view the edges between them as “deleted,” by a somewhat unconventional adversary. We analyze this new, noisy graph and establish our theoretical result. Theorem 4. ClusterWild! achieves a (3 + ✏)·OPT+O(✏·n·log2 n) approximation, in expectation. We provide a sketch of the proof, and delegate the details to the appendix. Since ClusterWild! ignores the edges among active vertices, we treat these edges as deleted. In our main result, we quantify the loss of clustering accuracy that is caused by ignoring these edges. Before we proceed, we define bad triangles, a combinatorial structure that is used to measure the clustering quality of a peeling algorithm. Definition 1. A bad triangle in G is a set of three vertices, such that two pairs are joined with a positive edge, and one pair is joined with a negative edge. Let Tb denote the set of bad triangles in G. To quantify the cost of ClusterWild!, we make the below observation. Lemma 5. The cost of any greedy algorithm that picks a vertex v (irrespective of the sampling order), creates Cv, peels it away and repeats, is equal to the number of bad triangles adjacent to each cluster center v. Lemma 6. Let ˆG denote the random graph induced by deleting all edges between active vertices per round, for a given run of ClusterWild!, and let ⌧new denote the number of additional bad triangles that ˆG has compared to G. Then, the expected cost of ClusterWild! can be upper bounded as E %P t2Tb 1Pt + ⌧new , where Pt is the event that triangle t, with end points i, j, k, is bad, and at least one of its end points becomes active, while t is still part of the original unclustered graph. Proof. We begin by bounding the second term E{⌧new}, by considering the number of new bad triangles ⌧new,i created at each round i: E {⌧new,i} X (u,v)2E P(u, v 2 Ai)·|N(u)[N(v)| X (u,v)2E ✓✏ ∆i ◆2 ·2·∆i 2·✏2· E ∆i 2·✏2·n. 5 Using the result that ClusterWild! terminates after at most O( 1 ✏log n log ∆) rounds, we get that1 E {⌧new} O(✏· n · log2 n). We are left to bound E !P t2Tb 1Pt = P t2Tb pt. To do that we use the following lemma. Lemma 7. If pt satisfies 8e, P t:e⇢t2Tb pt ↵1, then, P t2Tb pt ↵· OPT. Proof. Let B⇤be one (of the possibly many) sets of edges that attribute a +1 in the cost of an optimal algorithm. Then, OPT = P e2B⇤1 ≥P e2B⇤ P t:e⇢t2Tb pt ↵= P t2Tb |B⇤\ t| | {z } ≥1 pt ↵≥P t2Tb pt ↵. Now, as with [6], we will simply have to bound the expectation of the bad triangles, adjacent to an edge (u, v): P t:{u,v}⇢t2Tb 1Pt. Let Su,v = S {u,v}⇢t2Tb t be the union of the sets of nodes of the bad triangles that contain both vertices u and v. Observe that if some w 2 S\{u, v} becomes active before u and v, then a cost of 1 (i.e., the cost of the bad triangle {u, v, w}) is incurred. On the other hand, if either u or v, or both, are selected as pivots in some round, then Cu,v can be as high as |S| −2, i.e., at most equal to all bad triangles containing the edge {u, v}. Let Auv = {u or v are activated before any other vertices in Su,v}. Then, E [Cu,v] = E [Cu,v| Au,v] · P(Au,v) + E ⇥ Cu,v| AC u,v ⇤ · P(AC u,v) 1 + (|S| −2) · P({u, v} \ A 6= ;|S \ A 6= ;) 1 + 2|S| · P(v \ A 6= ;|S \ A 6= ;) where the last inequality is obtained by a union bound over u and v. We now bound the following probability: P {v 2 A| S \ A 6= ;} = P {v 2 A} · P {S \ A 6= ; |v 2 A} P {S \ A 6= ;} = P {v 2 A} P {S \ A 6= ;} = P {v 2 A} 1 −P {S \ A = ;}. Observe that P {v 2 A} = ✏ ∆, hence we need to upper bound P {S \ A = ;}. The probability, per round, that no positive neighbors in S become activated is upper bounded by 'n−|S| P ( 'n P ( = |S| Y t=1 ✓ 1 − P n −|S| + t ◆ ✓ 1 −P n ◆|S| = "✓ 1 −P n ◆n/P #|S|n/P ✓1 e ◆|S|n/P . Hence, the probability can be upper bounded as |S|P {v \ A 6= ;| S \ A 6= ;} ✏· |S|/∆ 1 −e−✏·|S|/∆. We know that |S| 2 · ∆+ 2 and also ✏1. Then, 0 ✏· |S| ∆✏· ' 2 + 2 ∆ ( 4 Hence, we have E(Cu,v) 1 + 2 · 4✏ 1−exp{−4✏}. The overall expectation is then bounded by E nP t2Tb 1Pt + ⌧new o ⇣ 1 + 2 · 4·✏ 1−e−4·✏ ⌘ · OPT + ✏· n · ln(n/δ) · log ∆(3 + ✏) · OPT + O(✏· n · log2 n) which establishes our approximation ratio for ClusterWild!. 3.3 BSP Algorithms as a Proxy for Asynchronous Algorithms We would like to note that the analysis under the BSP model can be a useful proxy for the performance of completely asynchronous variants of our algorithms. Specifically, see Alg. 3, where we remove the synchronization barriers. The only difference between the asynchronous execution in Alg. 3, compared to Alg. 2, is the complete lack of bulk synchronization, at the end of the processing of each active set A. Although the analysis of the BSP variants of the algorithms is tractable, unfortunately analyzing precisely the speedup of the asynchronous C4 and the approximation guarantees for the asynchronous ClusterWild! is challenging. However, in our experimental section we test the completely asynchronous algorithms against the BSP algorithms of the previous section, and observe that they perform quite similarly both in terms of accuracy of clustering, and running times. 1We skip the constants to simplify the presentation; however they are all smaller than 10. 6 4 Related Work Algorithm 3 C4 & ClusterWild! (asynchronous execution) 1: Input: G 2: clusterID(1) = . . . = clusterID(n) = 1 3: ⇡= a random permutation of {1, . . . , n} 4: while V 6= ; do 5: v = first element in V 6: V = V −{v} 7: if C4 then // concurrency control 8: attemptCluster(v) 9: else if ClusterWild! then // coordination free 10: createCluster(v) 11: end if 12: Remove clustered vertices from V and ⇡ 13: end while 14: Output: {clusterID(1), . . . , clusterID(n)}. Correlation clustering was formally introduced by Bansal et al. [14]. In the general case, minimizing disagreements is NP-hard and hard to approximate within an arbitrarily small constant (APX-hard) [14, 15]. There are two variations of the problem: i) CC on complete graphs where all edges are present and all weights are ±1, and ii) CC on general graphs with arbitrary edge weights. Both problems are hard, however the general graph setup seems fundamentally harder. The best known approximation ratio for the latter is O(log n), and a reduction to the minimum multicut problem indicates that any improvement to that requires fundamental breakthroughs in theoretical algorithms [16]. In the case of complete unweighted graphs, a long series of results establishes a 2.5 approximation via a rounded linear program (LP) [10]. A recent result establishes a 2.06 approximation using an elegant rounding to the same LP relaxation [17]. By avoiding the expensive LP, and by just using the rounding procedure of [10] as a basis for a greedy algorithm yields KwikCluster: a 3 approximation for CC on complete unweighted graphs. Variations of the cost metric for CC change the algorithmic landscape: maximizing agreements (the dual measure of disagreements) [14, 18, 19], or maximizing the difference between the number of agreements and disagreements [20, 21], come with different hardness and approximation results. There are also several variants: chromatic CC [22], overlapping CC [23], small number of clusters CC with added constraints that are suitable for some biology applications [24]. The way C4 finds the cluster centers can be seen as a variation of the MIS algorithm of [12]; the main difference is that in our case, we “passively” detect the MIS, by locking on memory variables, and by waiting on preceding ordered threads. This means, that a vertex only “pushes” its cluster ID and status (cluster center/clustered/unclustered) to its friends, versus “pulling” (or asking) for its friends’ cluster status. This saves a substantial amount of computational effort. 5 Experiments Our parallel algorithms were all implemented2 in Scala—we defer a full discussion of the implementation details to Appendix C. We ran all our experiments on Amazon EC2’s r3.8xlarge (32 vCPUs, 244Gb memory) instances, using 1-32 threads. The real graphs listed in Table 1 were each Graph # vertices # edges Description DBLP-2011 986,324 6,707,236 2011 DBLP co-authorship network [25, 26, 27]. ENWiki-2013 4,206,785 101,355,853 2013 link graph of English part of Wikipedia [25, 26, 27]. UK-2005 39,459,925 921,345,078 2005 crawl of the .uk domain [25, 26, 27]. IT-2004 41,291,594 1,135,718,909 2004 crawl of the .it domain [25, 26, 27]. WebBase-2001 118,142,155 1,019,903,190 2001 crawl by WebBase crawler [25, 26, 27]. Table 1: Graphs used in the evaluation of our parallel algorithms. tested with 100 different random ⇡orderings. We measured the runtimes, speedups (ratio of runtime on 1 thread to runtime on p threads), and objective values obtained by our parallel algorithms. For comparison, we also implemented the algorithm presented in [6], which we denote as CDK for short3. Values of ✏= 0.1, 0.5, 0.9 were used for C4 BSP, ClusterWild! BSP and CDK. In the interest of space, we present only representative plots of our results; full results are given in our appendix. 2Code available at https://github.com/pxinghao/ParallelCorrelationClustering. 3CDK was only tested on the smaller graphs of DBLP-2011 and ENWiki-2013, because CDK was prohibitively slow, often 2-3 orders of magnitude slower than C4, ClusterWild!, and even KwikCluster. 7 1 2 4 8 16 32 10 3 10 4 10 5 Number of threads Mean runtime / ms Mean Runtime, UK−2005 Serial C4 As C4 BSP ε=0.1 CW As CW BSP ε=0.1 (a) Mean runtimes, UK-2005, ✏= 0.1 1 2 4 8 16 32 10 3 10 4 10 5 Number of threads Mean runtime / ms Mean Runtime, IT−2004 Serial C4 As C4 BSP ε=0.5 CW As CW BSP ε=0.5 (b) Mean runtimes, IT-2004, ✏= 0.5 0 5 10 15 20 25 30 35 0 2 4 6 8 10 12 14 16 Number of threads Speedup Mean Speedup, Webbase−2001 Ideal C4 As C4 BSP ε=0.9 CW As CW BSP ε=0.9 (c) Mean speedup, WebBase, ✏= 0.9 0 0.2 0.4 0.6 0.8 1 0 2000 4000 6000 8000 10000 ε Number of rounds Mean Number of Rounds C4/CW BSP, UK−2005 C4/CW BSP, IT−2004 C4/CW BSP, Webbase−2001 C4/CW BSP, DBLP−2011 CDK, DBLP−2011 C4/CW BSP, ENWiki−2013 CDK, ENWiki−2013 (d) Mean number of synchronization rounds for BSP algorithms 0 5 10 15 20 25 30 35 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Number of threads % of blocked vertices % of Blocked Vertices, ENWiki−2013 C4 BSP ε=0.9 Min C4 BSP ε=0.9 Mean C4 BSP ε=0.9 Max C4 BSP Min C4 BSP Mean C4 BSP Max (e) Percent of blocked vertices for C4, ENWiki-2013. BSP run with ✏= 0.9. 0 5 10 15 20 25 30 35 1 1.02 1.04 1.06 1.08 1.1 1.12 Number of threads Algo obj value : Serial obj value Objective Value Relative to Serial, DBLP−2011 CW BSP ε=0.9 mean CW BSP ε=0.9 median CW As mean CW As median CDK ε=0.9 mean CDK ε=0.9 median (f) Median objective values, DBLP-2011. CW BSP and CDK run with ✏= 0.9 Figure 2: In the above figures, ‘CW’ is short for ClusterWild!, ‘BSP’ is short for the bulk-synchronous variants of the parallel algorithms, and ‘As’ is short for the asynchronous variants. Runtimes & Speedups: C4 and ClusterWild! are initially slower than serial, due to the overheads required for atomic operations in the parallel setting. However, all our parallel algorithms outperform KwikCluster with 3-4 threads. As more threads are added, the asychronous variants become faster than their BSP counterparts as there are no synchronization barrriers. The difference between BSP and asychronous variants is greater for smaller ✏. ClusterWild! is also always faster than C4 since there are no coordination overheads. The asynchronous algorithms are able to achieve a speedup of 13-15x on 32 threads. The BSP algorithms have a poorer speedup ratio, but nevertheless achieve 10x speedup with ✏= 0.9. Synchronization rounds: The main overhead of the BSP algorithms lies in the need for synchronization rounds. As ✏increases, the amount of synchronization decreases, and with ✏= 0.9, our algorithms have less than 1000 synchronization rounds, which is small considering the size of the graphs and our multicore setting. Blocked vertices: Additionally, C4 incurs an overhead in the number of vertices that are blocked waiting for earlier vertices to complete. We note that this overhead is extremely small in practice— on all graphs, less than 0.2% of vertices are blocked. On the larger and sparser graphs, this drops to less than 0.02% (i.e., 1 in 5000) of vertices. Objective value: By design, the C4 algorithms also return the same output (and thus objective value) as KwikCluster. We find that ClusterWild! BSP is at most 1% worse than serial across all graphs and values of ✏. The behavior of asynchronous ClusterWild! worsens as threads are added, reaching 15% worse than serial for one of the graphs. Finally, on the smaller graphs we were able to test CDK on, CDK returns a worse median objective value than both ClusterWild! variants. 6 Conclusions and Future Directions In this paper, we have presented two parallel algorithms for correlation clustering with nearly linear speedups and provable approximation ratios. Overall, the two approaches support each other—when C4 is relatively fast relative to ClusterWild!, we may prefer C4 for its guarantees of accuracy, and when ClusterWild! is accurate relative to C4, we may prefer ClusterWild! for its speed. In the future, we intend to implement our algorithms in the distributed environment, where synchronization and communication often account for the highest cost. Both C4 and ClusterWild! are well-suited for the distributed environment, since they have polylogarithmic number of rounds. 8 References [1] Ahmed K Elmagarmid, Panagiotis G Ipeirotis, and Vassilios S Verykios. Duplicate record detection: A survey. Knowledge and Data Engineering, IEEE Transactions on, 19(1):1–16, 2007. [2] Arvind Arasu, Christopher R´e, and Dan Suciu. Large-scale deduplication with constraints using dedupalog. In Data Engineering, 2009. ICDE’09. IEEE 25th International Conference on, pages 952–963. IEEE, 2009. [3] Micha Elsner and Warren Schudy. Bounding and comparing methods for correlation clustering beyond ilp. In Proceedings of the Workshop on Integer Linear Programming for Natural Langauge Processing, pages 19–27. Association for Computational Linguistics, 2009. [4] Bilal Hussain, Oktie Hassanzadeh, Fei Chiang, Hyun Chul Lee, and Ren´ee J Miller. An evaluation of clustering algorithms in duplicate detection. Technical report, 2013. [5] Francesco Bonchi, David Garcia-Soriano, and Edo Liberty. Correlation clustering: from theory to practice. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1972–1972. ACM, 2014. [6] Flavio Chierichetti, Nilesh Dalvi, and Ravi Kumar. Correlation clustering in mapreduce. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 641–650. ACM, 2014. [7] Bo Yang, William K Cheung, and Jiming Liu. Community mining from signed social networks. Knowledge and Data Engineering, IEEE Transactions on, 19(10):1333–1348, 2007. [8] N Cesa-Bianchi, C Gentile, F Vitale, G Zappella, et al. A correlation clustering approach to link classification in signed networks. In Annual Conference on Learning Theory, pages 34–1. Microtome, 2012. [9] Amir Ben-Dor, Ron Shamir, and Zohar Yakhini. Clustering gene expression patterns. Journal of computational biology, 6(3-4):281–297, 1999. [10] Nir Ailon, Moses Charikar, and Alantha Newman. Aggregating inconsistent information: ranking and clustering. Journal of the ACM (JACM), 55(5):23, 2008. [11] Xinghao Pan, Joseph E Gonzalez, Stefanie Jegelka, Tamara Broderick, and Michael Jordan. Optimistic concurrency control for distributed unsupervised learning. In Advances in Neural Information Processing Systems, pages 1403–1411, 2013. [12] Guy E Blelloch, Jeremy T Fineman, and Julian Shun. Greedy sequential maximal independent set and matching are parallel on average. In Proceedings of the twenty-fourth annual ACM symposium on Parallelism in algorithms and architectures, pages 308–317. ACM, 2012. [13] Michael Krivelevich. The phase transition in site percolation on pseudo-random graphs. arXiv preprint arXiv:1404.5731, 2014. [14] Nikhil Bansal, Avrim Blum, and Shuchi Chawla. Correlation clustering. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pages 238–238. IEEE Computer Society, 2002. [15] Moses Charikar, Venkatesan Guruswami, and Anthony Wirth. Clustering with qualitative information. In Foundations of Computer Science, 2003. Proceedings. 44th Annual IEEE Symposium on, pages 524–533. IEEE, 2003. [16] Erik D Demaine, Dotan Emanuel, Amos Fiat, and Nicole Immorlica. Correlation clustering in general weighted graphs. Theoretical Computer Science, 361(2):172–187, 2006. [17] Shuchi Chawla, Konstantin Makarychev, Tselil Schramm, and Grigory Yaroslavtsev. Near optimal LP rounding algorithm for correlation clustering on complete and complete k-partite graphs. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC ’15, pages 219–228, 2015. [18] Chaitanya Swamy. Correlation clustering: maximizing agreements via semidefinite programming. In Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, pages 526–527. Society for Industrial and Applied Mathematics, 2004. [19] Ioannis Giotis and Venkatesan Guruswami. Correlation clustering with a fixed number of clusters. In Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm, pages 1167–1176. ACM, 2006. [20] Moses Charikar and Anthony Wirth. Maximizing quadratic programs: extending grothendieck’s inequality. In Foundations of Computer Science, 2004. Proceedings. 45th Annual IEEE Symposium on, pages 54–60. IEEE, 2004. [21] Noga Alon, Konstantin Makarychev, Yury Makarychev, and Assaf Naor. Quadratic forms on graphs. Inventiones mathematicae, 163(3): 499–522, 2006. [22] Francesco Bonchi, Aristides Gionis, Francesco Gullo, and Antti Ukkonen. Chromatic correlation clustering. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1321–1329. ACM, 2012. [23] Francesco Bonchi, Aristides Gionis, and Antti Ukkonen. Overlapping correlation clustering. In Data Mining (ICDM), 2011 IEEE 11th International Conference on, pages 51–60. IEEE, 2011. [24] Gregory J Puleo and Olgica Milenkovic. Correlation clustering with constrained cluster sizes and extended weights bounds. arXiv preprint arXiv:1411.0547, 2014. [25] P. Boldi and S. Vigna. The WebGraph framework I: Compression techniques. In WWW, 2004. [26] P. Boldi, M. Rosa, M. Santini, and S. Vigna. Layered label propagation: A multiresolution coordinate-free ordering for compressing social networks. In WWW. ACM Press, 2011. [27] P. Boldi, B. Codenotti, M. Santini, and S. Vigna. Ubicrawler: A scalable fully distributed web crawler. Software: Practice & Experience, 34(8):711–726, 2004. 9 | 2015 | 283 |
5,795 | Fast Two-Sample Testing with Analytic Representations of Probability Measures Kacper Chwialkowski Gatsby Computational Neuroscience Unit, UCL kacper.chwialkowski@gmail.com Aaditya Ramdas Dept. of EECS and Statistics, UC Berkeley aramdas@cs.berkeley.edu Dino Sejdinovic Dept of Statistics, University of Oxford dino.sejdinovic@gmail.com Arthur Gretton Gatsby Computational Neuroscience Unit, UCL arthur.gretton@gmail.com Abstract We propose a class of nonparametric two-sample tests with a cost linear in the sample size. Two tests are given, both based on an ensemble of distances between analytic functions representing each of the distributions. The first test uses smoothed empirical characteristic functions to represent the distributions, the second uses distribution embeddings in a reproducing kernel Hilbert space. Analyticity implies that differences in the distributions may be detected almost surely at a finite number of randomly chosen locations/frequencies. The new tests are consistent against a larger class of alternatives than the previous linear-time tests based on the (non-smoothed) empirical characteristic functions, while being much faster than the current state-of-the-art quadratic-time kernel-based or energy distancebased tests. Experiments on artificial benchmarks and on challenging real-world testing problems demonstrate that our tests give a better power/time tradeoff than competing approaches, and in some cases, better outright power than even the most expensive quadratic-time tests. This performance advantage is retained even in high dimensions, and in cases where the difference in distributions is not observable with low order statistics. 1 Introduction Testing whether two random variables are identically distributed without imposing any parametric assumptions on their distributions is important in a variety of scientific applications. These include data integration in bioinformatics [6], benchmarking for steganography [20] and automated model checking [19]. Such problems are addressed in the statistics literature via two-sample tests (also known as homogeneity tests). Traditional approaches to two-sample testing are based on distances between representations of the distributions, such as density functions, cumulative distribution functions, characteristic functions or mean embeddings in a reproducing kernel Hilbert space (RKHS) [27, 26]. These representations are infinite dimensional objects, which poses challenges when defining a distance between distributions. Examples of such distances include the classical Kolmogorov-Smirnov distance (sup-norm between cumulative distribution functions); the Maximum Mean Discrepancy (MMD) [9], an RKHS norm of the difference between mean embeddings, and the N-distance (also known as energy distance) [34, 31, 4], which is an MMD-based test for a particular family of kernels [25] . Tests may also be based on quantities other than distances, an example being the Kernel Fisher Discriminant (KFD) [12], the estimation of which still requires calculating the RKHS norm of a difference of mean embeddings, with normalization by an inverse covariance operator. 1 In contrast to consistent two-sample tests, heuristics based on pseudo-distances, such as the difference between characteristic functions evaluated at a single frequency, have been studied in the context of goodness-of-fit tests [13, 14]. It was shown that the power of such tests can be maximized against fully specified alternative hypotheses, where test power is the probability of correctly rejecting the null hypothesis that the distributions are the same. In other words, if the class of distributions being distinguished is known in advance, then the tests can focus only at those particular frequencies where the characteristic functions differ most. This approach was generalized to evaluating the empirical characteristic functions at multiple distinct frequencies by [8], thus improving on tests that need to know the single “best” frequency in advance (the cost remains linear in the sample size, albeit with a larger constant). This approach still fails to solve the consistency problem, however: two distinct characteristic functions can agree on an interval, and if the tested frequencies fall in that interval, the distributions will be indistinguishable. In Section 2 of the present work, we introduce two novel distances between distributions, which both use a parsimonious representation of the probability measures. The first distance builds on the notion of differences in characteristic functions with the introduction of smooth characteristic functions, which can be though of as the analytic analogues of the characteristics functions. A distance between smooth characteristic functions evaluated at a single random frequency is almost surely a distance (Definition 1 formalizes this concept) between these two distributions. In other words, there is no need to calculate the whole infinite dimensional representation - it is almost surely sufficient to evaluate it at a single random frequency (although checking more frequencies will generally result in more powerful tests). The second distance is based on analytic mean embeddings of two distributions in a characteristic RKHS; again, it is sufficient to evaluate the distance between mean embeddings at a single randomly chosen point to obtain almost surely a distance. To our knowledge, this representation is the first mapping of the space of probability measures into a finite dimensional Euclidean space (in the simplest case, the real line) that is almost surely an injection, and as a result almost surely a metrization. This metrization is very appealing from a computational viewpoint, since the statistics based on it have linear time complexity (in the number of samples) and constant memory requirements. We construct statistical tests in Section 3, based on empirical estimates of differences in the analytic representations of the two distributions. Our tests have a number of theoretical and computational advantages over previous approaches. The test based on differences between analytic mean embeddings is a.s. consistent for all distributions, and the test based on differences between smoothed characteristic functions is a.s. consistent for all distributions with integrable characteristic functions (contrast with [8], which is only consistent under much more onerous conditions, as discussed above). This same weakness was used by [1] in justifying a test that integrates over the entire frequency domain (albeit at cost quadratic in the sample size), for which the quadratic-time MMD is a generalization [9]. Compared with such quadratic time tests, our tests can be conducted in linear time – hence, we expect their power/computation tradeoff to be superior. We provide several experimental benchmarks (Section 4) for our tests. First, we compare test power as a function of computation time for two real-life testing settings: amplitude modulated audio samples, and the Higgs dataset, which are both challenging multivariate testing problems. Our tests give a better power/computation tradeoff than the characteristic function-based tests of [8], the previous sub-quadratic-time MMD tests [11, 32], and the quadratic-time MMD test. In terms of power when unlimited computation time is available, we might expect worse performance for the new tests, in line with findings for linear- and sub-quadratic-time MMD-based tests [15, 9, 11, 32]. Remarkably, such a loss of power is not the rule: for instance, when distinguishing signatures of the Higgs boson from background noise [3] (’Higgs dataset’), we observe that a test based on differences in smoothed empirical characteristic functions outperforms the quadratic-time MMD. This is in contrast to linear- and sub-quadratic-time MMD-based tests, which by construction are less powerful than the quadratic-time MMD. Next, for challenging artificial data (both high-dimensional distributions, and distributions for which the difference is very subtle), our tests again give a better power/computation tradeoff than competing methods. 2 Analytic embeddings and distances In this section we consider mappings from the space of probability measures into a sub-space of real valued analytic functions. We will show that evaluating these maps at J randomly selected 2 points is almost surely injective for any J > 0. Using this result, we obtain a simple (randomized) metrization of the space of probability measures. This metrization is used in the next section to construct linear-time nonparametric two-sample tests. To motivate our approach, we begin by recalling an integral family of distances between distributions, denoted Maximum Mean Discrepancies (MMD) [9]. The MMD is defined as MMD(P, Q) = sup f2Bk Z E fdP − Z E fdQ # , (1) where P and Q are probability measures on E, and Bk is the unit ball in the RKHS Hk associated with a positive definite kernel k : E ⇥E ! R. A popular choice of k is the Gaussian kernel k(x, y) = exp(−kx−yk2/γ2) with bandwidth parameter γ. It can be shown that the MMD is equal to the RKHS distance between so called mean embeddings, MMD(P, Q) = kµP −µQkHk, (2) where µP is an embedding of the probability measure P to Hk, µP (t) = Z E k(x, t)dP(x), (3) and k · kHk denotes the norm in the RKHS Hk. When k is translation invariant, i.e., k (x, y) = (x −y), the squared MMD can be written [27, Corollary 4] MMD2(P, Q) = Z Rd |'P (t) −'Q(t)|2 F −1(t)dt, (4) where F denotes the Fourier transform, F −1 is the inverse Fourier transform, and 'P , 'Q are the characteristic functions of P, Q, respectively. From [27, Theorem 9], a kernel k is called characteristic when the MMD for Hk satisfies MMD(P, Q) = 0 iff P = Q. (5) Any bounded, continuous, translation-invariant kernel whose inverse Fourier transform is almost everywhere non-zero is characteristic [27]. By representation (2), it is clear that the MMD with a characteristic kernel is a metric. Pseudometrics based on characteristic functions. A practical limitation when using the MMD in testing is that an empirical estimate is expensive to compute, this being the sum of two U-statistics and an empirical average, with cost quadratic in the sample size [9, Lemma 6]. We might instead consider a finite dimensional approximation to the MMD, achieved by estimating the integral (4), with the random variable d2 ',J(P, Q) = 1 J J X j=1 |'P (Tj) −'Q(Tj)|2, (6) where {Tj}J j=1 are sampled independently from the distribution with a density function F −1. This type of approximation is applied to various kernel algorithms under the name of random Fourier features [21, 17]. In the statistical testing literature, the quantity d',J(P, Q) predates the MMD by a considerable time, and was studied in [13, 14, 8], and more recently revisited in [33]. Our first proposition is that d2 ',J(P, Q) can be a poor choice of distance between probability measures, as it fails to distinguish a large class of measures. The following result is proved in the Appendix. Proposition 1. Let J 2 N and let {Tj}J j=1 be a sequence of real valued i.i.d. random variables with a distribution which is absolutely continuous with respect to the Lebesgue measure. For any 0 < ✏< 1, there exists an uncountable set A of mutually distinct probability measures (on the real line) such that for any P, Q 2 A, P % d2 ',J(P, Q) = 0 & ≥1 −✏. We are therefore motivated to find distances of the form (6) that can distinguish larger classes of distributions, yet remain efficient to compute. These distances are characterized as follows: Definition 1 (Random Metric). A random process d with values in R, indexed with pairs from the set of probability measures M, i.e., d = {d(P, Q) : P, Q 2 M}, is said to be a random metric if it satisfies all the conditions for a metric with qualification ‘almost surely’. Formally, for all P, Q, R 2 M, random variables d(P, Q), d(P, R), d(R, Q) must satisfy 3 1. d(P, Q) ≥0 a.s. 2. if P = Q, then d(P, Q) = 0 a.s, if P 6= Q then d(P, Q) 6= 0 a.s. 3. d(P, Q) = d(Q, P) a.s. 4. d(P, Q) d(P, R) + d(R, Q) a.s. 1 From the statistical testing point of view, the coincidence axiom of a metric d, d(P, Q) = 0 if and only if P = Q, is key, as it ensures consistency against all alternatives. The quantity d',J(P, Q) in (6) violates the coincidence axiom, so it is only a random pseudometric (other axioms are trivially satisfied). We remedy this problem by replacing the characteristic functions by smooth characteristic functions: Definition 2. A smooth characteristic function φP (t) of a measure P is a characteristic function of P convolved with an analytic smoothing kernel l, i.e. φP (t) = Z Rd 'P (w)l(t −w)dw, t 2 Rd. (7) Proposition 3 shows that smooth characteristic function can be estimated in a linear time. The analogue of d',J(P, Q) for smooth characteristic functions is simply d2 φ,J(P, Q) = 1 J J X j=1 |φP (Tj) −φQ(Tj)|2, (8) where {Tj}J j=1 are sampled independently from the absolutely continuous distribution (returning to our earlier example, this might be F −1(t) if we believe this to be an informative choice). The following theorem, proved in the Appendix, demonstrates that the smoothing greatly increases the class of distributions we can distinguish. Theorem 1. Let l be an analytic, integrable kernel with an inverse Fourier transform that is nonzero almost everywhere. Then, for any J > 0, dφ,J is a random metric on the space of probability measures with integrable characteristic functions, and φP is an analytic function. This result is primarily a consequence of analyticity of smooth characteristic functions and the fact that analytic functions are ’well behaved’. There is an additional, practical advantage to smoothing: when the variability in the difference of the characteristic functions is high, and these differences are local, smoothing distributes the difference in CFs more broadly in the frequency domain (a simple illustration is in Fig. A.1, Appendix), making it easier to find by measurement at a small number of randomly chosen points. This accounts for the observed improvements in test power in Section 4, over differences in unsmoothed CFs. Metrics based on mean embeddings. The key step which leads us to the construction of a random metric dφ,J is the convolution of the original characteristic functions with an analytic smoothing kernel. This idea need not be restricted to the representations of probability measures in the frequency domain. We may instead directly convolve the probability measure with a positive definite kernel k (that need not be translation invariant), yielding its mean embedding into the associated RKHS, µP (t) = Z E k(x, t)dP(x). (9) We say that a positive definite kernel k : RD ⇥RD ! R is analytic on its domain if for all x 2 RD, the feature map k(x, ·) is an analytic function on RD. By using embeddings with characteristic and analytic kernels, we obtain particularly useful representations of distributions. As for the smoothed CF case, we define d2 µ,J(P, Q) = 1 J J X j=1 (µP (Tj) −µQ(Tj))2. (10) The following theorem ensures that dµ,J(P, Q) is also a random metric. 1 Note that this does not imply that realizations of d are distances on M, but it does imply that they are almost surely distances for all arbitrary finite subsets of M. 4 Theorem 2. Let k be an analytic, integrable and characteristic kernel. Then for any J > 0, dµ,J is a random metric on the space of probability measures (and µP is an analytic function). Note that this result is stronger than the one presented in Theorem 1, since it is not restricted to the class of probability measures with integrable characteristic functions. Indeed, the assumption that the characteristic function is integrable implies the existence and boundedness of a density. Recalling the representation of MMD in (2), we have proved that it is almost always sufficient to measure difference between µP and µQ at a finite number of points, provided our kernel is characteristic and analytic. In the next section, we will see that metrization of the space of probability measures using random metrics dµ,J, dφ,J is very appealing from the computational point of view. It turns out that the statistical tests that arise from these metrics have linear time complexity (in the number of samples) and constant memory requirements. 3 Hypothesis Tests Based on Distances Between Analytic Functions In this section, we provide two linear-time two-sample tests: first, a test based on analytic mean embeddings, and next a test based on smooth characteristic functions. We further describe the relation with competing alternatives. Proofs of all propositions are in Appendix B. Difference in analytic functions In the previous section we described the random metric based on a difference in analytic mean embeddings, d2 µ,J(P, Q) = 1 J PJ j=1(µP (Tj) −µQ(Tj))2. If we replace µP with the empirical mean embedding ˆµP = 1 n Pn i=1 k(Xi, ·) it can be shown that for any sequence of unique {tj}J j=1, under the null hypothesis, as n ! 1, pn J X j=1 (ˆµP (tj) −ˆµQ(tj))2 (11) converges in distribution to a sum of correlated chi-squared variables. Even for fixed {tj}J j=1, it is very computationally costly to obtain quantiles of this distribution, since this requires a bootstrap or permutation procedure. We will follow a different approach based on Hotelling’s T 2-statistic [16]. The Hotelling’s T 2-squared statistic of a normally distributed, zero mean, Gaussian vector W = (W1, · · · , WJ), with a covariance matrix ⌃, is T 2 = W⌃−1W. The compelling property of the statistic is that it is distributed as a χ2-random variable with J degrees of freedom. To see a link between T 2 and equation (11), consider a random variable PJ i=j W 2 j : this is also distributed as a sum of correlated chi-squared variables. In our case W is replaced with a difference of normalized empirical mean embeddings, and ⌃is replaced with the empirical covariance of the difference of mean embeddings. Formally, let Zi denote the vector of differences between kernels at tests points Tj, Zi = (k(Xi, T1) −k(Yi, T1), · · · , k(Xi, TJ) −k(Yi, TJ)) 2 RJ. (12) We define the vector of mean empirical differences Wn = 1 n Pn i=1 Zi, and its covariance matrix ⌃n = 1 n P i(Zi −Wn)(Zi −Wn)T . The test statistic is Sn = nWn⌃−1 n Wn. (13) The computation of Sn requires inversion of a J ⇥J matrix ⌃n, but this is fast and numerically stable: J will typically be small, and is less than 10 in our experiments. The next proposition demonstrates the use of Sn as a two-sample test statistic. Proposition 2 (Asymptotic behavior of Sn). Let d2 µ,J(P, Q) = 0 a.s. and let {Xi}n i=1 and {Yi}n i=1 be i.i.d. samples from P and Q respectively. If ⌃−1 n exists for n large enough, then the statistic Sn is a.s. asymptotically distributed as a χ2-random variable with J degrees of freedom (as n ! 1 with d fixed). If d2 µ,J(P, Q) > 0 a.s., then a.s. for any fixed r, P(Sn > r) ! 1 as n ! 1 . We now apply the above proposition to obtain a statistical test. Test 1 (Analytic mean embedding ). Calculate Sn. Choose a threshold r↵corresponding to the 1−↵ quantile of a χ2 distribution with J degrees of freedom, and reject the null hypothesis whenever Sn is larger than r↵. 5 There are a number of valid sampling schemes for the test points {Tj}J j=1 to evaluate the differences in mean embeddings: see Section 4 for a discussion. Difference in smooth characteristic functions From the convolution definition of a smooth characteristic function (7) it is not immediately obvious how to calculate its estimator in linear time. In the next proposition, however, we show that a smooth characteristic function is an expected value of some function (with respect to the given measure), which can be estimated in a linear time. Proposition 3. Let k be an integrable translation-invariant kernel and f its inverse Fourier transform. Then the smooth characteristic function of P can be written as φP (t) = R Rd eit>xf(x)dP(x). It is now clear that a test based on the smooth characteristic functions is similar to the test based on mean embeddings. The main difference is in the definition of the vector of differences Zi: Zi = (f(Xi) sin(XiT1)−f(Yi) sin(YiT1), f(Xi) cos(XiT1)−f(Yi) cos(YiT1), · · · ) 2 R2J (14) The imaginary and real part of the e p−1T > j Xif(Xi)−e p−1T > j Yif(Yi) are stacked together, in order to ensure that Wn, ⌃n and Sn as all real-valued quantities. Proposition 4. Let d2 φ,J(P, Q) = 0 and let {Xi}n i=1 and {Yi}n i=1 be i.i.d. samples from P and Q respectively. Then the statistic Sn is almost surely asymptotically distributed as a χ2-random variable with 2J degrees of freedom (as n ! 1 with J fixed). If d2 φ,J(P, Q) > 0 , then almost surely for any fixed r, P(Sn > r) ! 1 as n ! 1. Other tests. The test [8] based on empirical characteristic functions was constructed originally for one test point and then generalized to many points - it is quite similar to our second test, but does not perform smoothing (it is also based on a T 2-Hotelling statistic). The block MMD [32] is a sub-quadratic test, which can be trivially linearized by fixing the block size, as presented in the Appendix. Finally, another alternative is the MMD, an inherently quadratic time test. We scale MMD to linear time by sub-sampling our data set, and choosing only pn points, so that the MMD complexity becomes O(n). Note, however, that the true complexity of MMD involves a permutation calculation of the null distribution at cost O(bnn), where the number of permutations bn grows with n. See Appendix C for a detailed description of alternative tests. 4 Experiments In this section we compare two-sample tests on both artificial benchmark data and on real-world data. We denote the smooth characteristic function test as ‘Smooth CF’, and the test based on the analytic mean embeddings as ‘Mean Embedding’. We compare against several alternative testing approaches: block MMD (‘Block MMD’), a characteristic functions based test (‘CF’), a sub-sampling MMD test (‘MMD(pn)’), and the quadratic-time MMD test (‘MMD(n)’). Experimental setup. For all the experiments, D is the dimensionality of samples in a dataset, n is a number of samples in the dataset (sample size) and J is number of test frequencies. Parameter selection is required for all the tests. The table summarizes the main choices of the parameters made for the experiments. The first parameter is the test function, used to calculate the particular statistic. The scalar γ represents the length-scale of the observed data. Notice that for the kernel tests we recover the standard parameterization exp(−k x γ −y γ k2) = exp(−kx−yk2 γ2 ). The original CF test was proposed without any parameters, hence we added γ to ensure a fair comparison - for this test varying γ is equivalent to adjusting the variance of the distribution of frequencies Tj. For all tests, the value of the scaling parameter γ was chosen so as to minimize a p-value estimate on a held-out training set: details are described in Appendix D. We chose not to optimize the sampling scheme for the Mean Embedding and Smooth CF tests, since this would give them an unfair advantage over the Block MMD, MMD(pn) and CF tests. The block size in the Block MMD test and the number of test frequencies in the Mean Embedding, Smooth CF, and CF tests, were always set to the same value (not greater than 10) to maintain exactly the same time complexity. Note that we did not use the popular median heuristic for kernel bandwidth choice (MMD and B-test), since it gives poor results for the Blobs and AM Audio datasets [11]. We do not run MMD(n) test for ’Simulation 1’ or ’Amplitude Modulated Music’, since the sample size is 10000, and too large for a quadratic-time test with permutation sampling for the test critical value. 6 Figure 1: Higgs dataset. Left: Test power vs. sample size. Right: Test power vs. execution time. It is important to verify that Type I error is indeed at the design level, set at ↵= 0.05 in this paper. This is verified in the Appendix, Figure A.2. Also shown in the plots is the 95% percent confidence intervals for the results, as averaged over 4000 runs. Test Test Function Sampling scheme Other parameters Mean Embedding exp(−kγ−1(x −t)k2) Tj ⇠N(0D, ID) J - no. of test frequencies Smooth CF exp(it>γ−1x −kγ−1x −tk2) Tj ⇠N(0D, ID) J - no. of test frequencies MMD(n),MMD(pn) exp(−kγ−1(x −t)k2) not applicable b -bootstraps Block MMD exp(−kγ−1(x −t)k2) not applicable B-block size CF exp(it>γ−1x) Tj ⇠N(0D, ID) J - no. of test frequencies Real Data 1: Higgs dataset, D = 4, n varies, J = 10. The first experiment we consider is on the UCI Higgs dataset [18] described in [3] - the task is to distinguish signatures of processes that produce Higgs bosons from background processes that do not. We consider a two-sample test on certain extremely low-level features in the dataset - kinematic properties measured by the particle detectors, i.e., the joint distributions of the azimuthal angular momenta ' for four particle jets. We denote by P the jet '-momenta distribution of the background process (no Higgs bosons), and by Q the corresponding distribution for the process that produces Higgs bosons (both are distributions on R4). As discussed in [3, Fig. 2], '-momenta, unlike transverse momenta pT , carry very little discriminating information for recognizing whether Higgs bosons were produced. Therefore, we would like to test the null hypothesis that the distributions of angular momenta P (no Higgs boson observed) and Q (Higgs boson observed) might yet be rejected. The results for different algorithms are presented in the Figure 1. We observe that the joint distribution of the angular momenta is in fact discriminative. Sample size varies from 1000 to 12000. The Smooth CF test has significantly higher power than the other tests, including the quadratic-time MMD, which we could only run on up to 5100 samples due to computational limitations. The leading performance of the Smooth CF test is especially remarkable given it is several orders of magnitude faster than the quadratictime MMD(n), even though we used the fastest quadratic-time MMD implementation, where the asymptotic distribution is approximated by a Gamma density . Real Data 2: Amplitude Modulated Music, D = 1000, n = 10000, J = 10. Amplitude modulation is the earliest technique used to transmit voice over the radio. In the following experiment observations were one thousand dimensional samples of carrier signals that were modulated with two different input audio signals from the same album, song P and song Q (further details of these data are described in [11, Section 5]). To increase the difficulty of the testing problem, independent Gaussian noise of increasing variance (in the range 1 to 4.0) was added to the signals. The results are presented in the Figure 2. Compared to the other tests, the Mean Embedding and Smooth CF tests are more robust to the moderate noise contamination. Simulation 1: High Dimensions, D varies, n = 10000, J = 3. It has recently been shown, in theory and in practice, that the two-sample problem gets more difficult for an increasing number of dimensions increases on which the distributions do not differ [22, 23]. In the following experiment, we study the power of the two-sample tests as a function of dimension of the samples. We run twosample tests on two datasets of Gaussian random vectors which differ only in the first dimension, Dataset I: P = N(0D, ID) vs. Q = N ((1, 0, · · · , 0), ID) Dataset II: P = N(0D, ID) vs. Q = N (0D, diag((2, 1, · · · , 1))) , 7 Figure 2: Music Dataset.Left: Test power vs. added noise. Right: four samples from P and Q. Figure 3: Power vs. redundant dimensions comparison for tests on high dimensional data. where 0d is a D-dimensional vector of zeros, ID is a D-dimensional identity matrix, and diag(v) is a diagonal matrix with v on the diagonal. The number of dimensions (D) varies from 50 to 2500 (Dataset I) and from 50 to 1200 (Dataset II). The power of the different two-sample tests is presented in Figure 3. The Mean Embedding test yields best performance for both datasets, where the advantage is especially large for differences in variance. Simulation 2: Blobs, D = 2, n varies, J = 5. The Blobs dataset is a grid of two dimensional Gaussian distributions (see Figure 4), which is known to be a challenging two-sample testing task. The difficulty arises from the fact that the difference in distributions is encoded at a much smaller lengthscale than the overall data. In this experiment both P and Q are four by four grids of Gaussians, where P has unit covariance matrix in each mixture component, while each component of Q has direction of the largest variance rotated by ⇡/4 and amplified to 4. It was demonstrated by [11] that a good choice of kernel is crucial for this task. Figure 4 presents the results of two-sample tests on the Blobs dataset. The number of samples varies from 50 to 14000 ( MMD(n) reached test power one with n = 1400). We found that the MMD(n) test has the best power as function of the sample size, but the worst power/computation tradeoff. By contrast, random distance based tests have the best power/computation tradeoff. Acknowledgment. We would like thank Bharath Sriperumbudur and Wittawat Jitkrittum for insightful comments. Figure 4: Blobs Dataset. Left: test power vs. sample size. Center: test power vs. execution time. Right: illustration of the blob dataset. 8 References [1] V. Alba Fern´andez, M. Jim´enez-Gamero, and J. Mu˜noz Garcia. A test for the two-sample problem based on empirical characteristic functions. Computational Statistics and Data Analysis, 52:3730–3748, 2008. [2] T. W. Anderson. An Introduction to Multivariate Statistical Analysis. Wiley, July 2003. [3] P. Baldi, P. Sadowski, and D. Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature Communications, 5, 2014. [4] L Baringhaus and C Franz. On a new multivariate two-sample test. J mult anal, 88(1):190–206, 2004. [5] Alain Berlinet and Christine Thomas-Agnan. Reproducing kernel Hilbert spaces in probability and statistics, volume 3. Kluwer Academic Boston, 2004. [6] K.M. Borgwardt, A. Gretton, M.J. Rasch, H.-P. Kriegel, B. Sch¨olkopf, and A. Smola. Integrating structured biological data by kernel maximum mean discrepancy. Bioinformatics, 22(14):e49–e57, 2006. [7] K. R. Davidson. Pointwise limits of analytic functions. Am math mon, pages 391–394, 1983. [8] T.W. Epps and K.J. Singleton. An omnibus test for the two-sample problem using the empirical characteristic function. Journal of Statistical Computation and Simulation., 26(3-4):177–203, 1986. [9] A. Gretton, K. Borgwardt, M. Rasch, B. Sch¨olkopf, and A. Smola. A kernel two-sample test. JMLR, 13:723–773, 2012. [10] A. Gretton, K. Fukumizu, Z. Harchaoui, and B. Sriperumbudur. A fast, consistent kernel two-sample test. In NIPS, 2009. [11] A. Gretton, B. Sriperumbudur, D. Sejdinovic, H. Strathmann, S. Balakrishnan, M. Pontil, and K. Fukumizu. Optimal kernel choice for large-scale two-sample tests. In NIPS, 2012. [12] Z. Harchaoui, F.R. Bach, and E. Moulines. Testing for Homogeneity with Kernel Fisher Discriminant Analysis. In NIPS. 2008. [13] CE Heathcote. A test of goodness of fit for symmetric random variables. Aust J stat, 14(2):172–181, 1972. [14] CR Heathcote. The integrated squared error estimation of parameters. Biometrika, 64(2):255–264, 1977. [15] H.-C. Ho and G. Shieh. Two-stage U-statistics for hypothesis testing. Scandinavian Journal of Statistics, 33(4):861–873, 2006. [16] H. Hotelling. The generalization of student’s ratio. Ann. Math. Statist., 2(3):360–378, 1931. [17] Q. Le, T. Sarlos, and A. Smola. Fastfood - computing Hilbert space expansions in loglinear time. In ICML, volume 28, pages 244–252, 2013. [18] M. Lichman. UCI machine learning repository, 2013. [19] J.R. Lloyd and Z. Ghahramani. Statistical model criticism using kernel two sample tests. Technical report, 2014. [20] Tom´aˇs Pevn`y and Jessica Fridrich. Benchmarking for steganography. In Information Hiding, pages 251– 267. Springer, 2008. [21] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [22] A. Ramdas, S. Reddi, B. P´oczos, A. Singh, and L. Wasserman. On the decreasing power of kernel- and distance-based nonparametric hypothesis tests in high dimensions. AAAI, 2015. [23] S. Reddi, A. Ramdas, B. P´oczos, A. Singh, and L. Wasserman. On the high-dimensional power of lineartime kernel two-sample testing under mean-difference alternatives. AISTATS, 2015. [24] Walter Rudin. Real and complex analysis. Tata McGraw-Hill Education, 1987. [25] D. Sejdinovic, B. Sriperumbudur, A. Gretton, and K. Fukumizu. Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Annals of Statistics, 41(5):2263–2291, 2013. [26] B. Sriperumbudur, K. Fukumizu, and G. Lanckriet. Universality, characteristic kernels and RKHS embedding of measures. JMLR, 12:2389–2410, 2011. [27] B. Sriperumbudur, A. Gretton, K. Fukumizu, G. Lanckriet, and B. Sch¨olkopf. Hilbert space embeddings and metrics on probability measures. JMLR, 11:1517–1561, 2010. [28] I. Steinwart and A. Christmann. Support vector machines. Springer Science & Business Media, 2008. [29] I. Steinwart, D. Hush, and C. Scovel. An explicit description of the reproducing kernel hilbert spaces of gaussian rbf kernels. Information Theory, IEEE Transactions on, 52(10):4635–4643, 2006. [30] Hong-Wei Sun and Ding-Xuan Zhou. Reproducing kernel hilbert spaces associated with analytic translation-invariant mercer kernels. Journal of Fourier Analysis and Applications, 14(1):89–101, 2008. [31] GJ Sz´ekely. E-statistics: The energy of statistical samples. Technical report, 2003. [32] W. Zaremba, A. Gretton, and M. Blaschko. B-test: A non-parametric, low variance kernel two-sample test. In NIPS, 2013. [33] Ji Zhao and Deyu Meng. FastMMD: Ensemble of circular discrepancy for efficient two-sample test. Neural computation, (27):1345–1372, 2015. [34] AA Zinger, AV Kakosyan, and LB Klebanov. A characterization of distributions by mean values of statistics and certain probabilistic metrics. Journal of Mathematical Sciences, 59(4):914–920, 1992. 9 | 2015 | 284 |
5,796 | A Recurrent Latent Variable Model for Sequential Data Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron Courville, Yoshua Bengio∗ Department of Computer Science and Operations Research Universit´e de Montr´eal ∗CIFAR Senior Fellow {firstname.lastname}@umontreal.ca Abstract In this paper, we explore the inclusion of latent random variables into the hidden state of a recurrent neural network (RNN) by combining the elements of the variational autoencoder. We argue that through the use of high-level latent random variables, the variational RNN (VRNN)1 can model the kind of variability observed in highly structured sequential data such as natural speech. We empirically evaluate the proposed model against other related sequential models on four speech datasets and one handwriting dataset. Our results show the important roles that latent random variables can play in the RNN dynamics. 1 Introduction Learning generative models of sequences is a long-standing machine learning challenge and historically the domain of dynamic Bayesian networks (DBNs) such as hidden Markov models (HMMs) and Kalman filters. The dominance of DBN-based approaches has been recently overturned by a resurgence of interest in recurrent neural network (RNN) based approaches. An RNN is a special type of neural network that is able to handle both variable-length input and output. By training an RNN to predict the next output in a sequence, given all previous outputs, it can be used to model joint probability distribution over sequences. Both RNNs and DBNs consist of two parts: (1) a transition function that determines the evolution of the internal hidden state, and (2) a mapping from the state to the output. There are, however, a few important differences between RNNs and DBNs. DBNs have typically been limited either to relatively simple state transition structures (e.g., linear models in the case of the Kalman filter) or to relatively simple internal state structure (e.g., the HMM state space consists of a single set of mutually exclusive states). RNNs, on the other hand, typically possess both a richly distributed internal state representation and flexible non-linear transition functions. These differences give RNNs extra expressive power in comparison to DBNs. This expressive power and the ability to train via error backpropagation are the key reasons why RNNs have gained popularity as generative models for highly structured sequential data. In this paper, we focus on another important difference between DBNs and RNNs. While the hidden state in DBNs is expressed in terms of random variables, the internal transition structure of the standard RNN is entirely deterministic. The only source of randomness or variability in the RNN is found in the conditional output probability model. We suggest that this can be an inappropriate way to model the kind of variability observed in highly structured data, such as natural speech, which is characterized by strong and complex dependencies among the output variables at different 1Code is available at http://www.github.com/jych/nips2015_vrnn 1 timesteps. We argue, as have others [4, 2], that these complex dependencies cannot be modelled efficiently by the output probability models used in standard RNNs, which include either a simple unimodal distribution or a mixture of unimodal distributions. We propose the use of high-level latent random variables to model the variability observed in the data. In the context of standard neural network models for non-sequential data, the variational autoencoder (VAE) [11, 17] offers an interesting combination of highly flexible non-linear mapping between the latent random state and the observed output and effective approximate inference. In this paper, we propose to extend the VAE into a recurrent framework for modelling high-dimensional sequences. The VAE can model complex multimodal distributions, which will help when the underlying true data distribution consists of multimodal conditional distributions. We call this model a variational RNN (VRNN). A natural question to ask is: how do we encode observed variability via latent random variables? The answer to this question depends on the nature of the data itself. In this work, we are mainly interested in highly structured data that often arises in AI applications. By highly structured, we mean that the data is characterized by two properties. Firstly, there is a relatively high signal-tonoise ratio, meaning that the vast majority of the variability observed in the data is due to the signal itself and cannot reasonably be considered as noise. Secondly, there exists a complex relationship between the underlying factors of variation and the observed data. For example, in speech, the vocal qualities of the speaker have a strong but complicated influence on the audio waveform, affecting the waveform in a consistent manner across frames. With these considerations in mind, we suggest that our model variability should induce temporal dependencies across timesteps. Thus, like DBN models such as HMMs and Kalman filters, we model the dependencies between the latent random variables across timesteps. While we are not the first to propose integrating random variables into the RNN hidden state [4, 2, 6, 8], we believe we are the first to integrate the dependencies between the latent random variables at neighboring timesteps. We evaluate the proposed VRNN model against other RNN-based models – including a VRNN model without introducing temporal dependencies between the latent random variables – on two challenging sequential data types: natural speech and handwriting. We demonstrate that for the speech modelling tasks, the VRNN-based models significantly outperform the RNN-based models and the VRNN model that does not integrate temporal dependencies between latent random variables. 2 Background 2.1 Sequence modelling with Recurrent Neural Networks An RNN can take as input a variable-length sequence x = (x1, x2, . . . , xT ) by recursively processing each symbol while maintaining its internal hidden state h. At each timestep t, the RNN reads the symbol xt ∈Rd and updates its hidden state ht ∈Rp by: ht =fθ (xt, ht−1) , (1) where f is a deterministic non-linear transition function, and θ is the parameter set of f. The transition function f can be implemented with gated activation functions such as long short-term memory [LSTM, 9] or gated recurrent unit [GRU, 5]. RNNs model sequences by parameterizing a factorization of the joint sequence probability distribution as a product of conditional probabilities such that: p(x1, x2, . . . , xT ) = T Y t=1 p(xt | x<t), p(xt | x<t) = gτ(ht−1), (2) where g is a function that maps the RNN hidden state ht−1 to a probability distribution over possible outputs, and τ is the parameter set of g. One of the main factors that determines the representational power of an RNN is the output function g in Eq. (2). With a deterministic transition function f, the choice of g effectively defines the family of joint probability distributions p(x1, . . . , xT ) that can be expressed by the RNN. 2 We can express the output function g in Eq. (2) as being composed of two parts. The first part ϕτ is a function that returns the parameter set φt given the hidden state ht−1, i.e., φt = ϕτ(ht−1), while the second part of g returns the density of xt, i.e., pφt(xt | x<t). When modelling high-dimensional and real-valued sequences, a reasonable choice of an observation model is a Gaussian mixture model (GMM) as used in [7]. For GMM, ϕτ returns a set of mixture coefficients αt, means µ·,t and covariances Σ·,t of the corresponding mixture components. The probability of xt under the mixture distribution is: pαt,µ·,t,Σ·,t(xt | x<t) = X j αj,tN xt; µj,t, Σj,t . With the notable exception of [7], there has been little work investigating the structured output density model for RNNs with real-valued sequences. There is potentially a significant issue in the way the RNN models output variability. Given a deterministic transition function, the only source of variability is in the conditional output probability density. This can present problems when modelling sequences that are at once highly variable and highly structured (i.e., with a high signal-to-noise ratio). To effectively model these types of sequences, the RNN must be capable of mapping very small variations in xt (i.e., the only source of randomness) to potentially very large variations in the hidden state ht. Limiting the capacity of the network, as must be done to guard against overfitting, will force a compromise between the generation of a clean signal and encoding sufficient input variability to capture the high-level variability both within a single observed sequence and across data examples. The need for highly structured output functions in an RNN has been previously noted. Boulangerlewandowski et al. [4] extensively tested NADE and RBM-based output densities for modelling sequences of binary vector representations of music. Bayer and Osendorfer [2] introduced a sequence of independent latent variables corresponding to the states of the RNN. Their model, called STORN, first generates a sequence of samples z = (z1, . . . , zT ) from the sequence of independent latent random variables. At each timestep, the transition function f from Eq. (1) computes the next hidden state ht based on the previous state ht−1, the previous output xt−1 and the sampled latent random variables zt. They proposed to train this model based on the VAE principle (see Sec. 2.2). Similarly, Pachitariu and Sahani [16] earlier proposed both a sequence of independent latent random variables and a stochastic hidden state for the RNN. These approaches are closely related to the approach proposed in this paper. However, there is a major difference in how the prior distribution over the latent random variable is modelled. Unlike the aforementioned approaches, our approach makes the prior distribution of the latent random variable at timestep t dependent on all the preceding inputs via the RNN hidden state ht−1 (see Eq. (5)). The introduction of temporal structure into the prior distribution is expected to improve the representational power of the model, which we empirically observe in the experiments (See Table 1). However, it is important to note that any approach based on having stochastic latent state is orthogonal to having a structured output function, and that these two can be used together to form a single model. 2.2 Variational Autoencoder For non-sequential data, VAEs [11, 17] have recently been shown to be an effective modelling paradigm to recover complex multimodal distributions over the data space. A VAE introduces a set of latent random variables z, designed to capture the variations in the observed variables x. As an example of a directed graphical model, the joint distribution is defined as: p(x, z) = p(x | z)p(z). (3) The prior over the latent random variables, p(z), is generally chosen to be a simple Gaussian distribution and the conditional p(x | z) is an arbitrary observation model whose parameters are computed by a parametric function of z. Importantly, the VAE typically parameterizes p(x | z) with a highly flexible function approximator such as a neural network. While latent random variable models of the form given in Eq. (3) are not uncommon, endowing the conditional p(x | z) as a potentially highly non-linear mapping from z to x is a rather unique feature of the VAE. However, introducing a highly non-linear mapping from z to x results in intractable inference of the posterior p(z | x). Instead, the VAE uses a variational approximation q(z | x) of the posterior that 3 enables the use of the lower bound: log p(x) ≥−KL(q(z | x)∥p(z)) + Eq(z|x) [log p(x | z)] , (4) where KL(Q∥P) is Kullback-Leibler divergence between two distributions Q and P. In [11], the approximate posterior q(z | x) is a Gaussian N(µ, diag(σ2)) whose mean µ and variance σ2 are the output of a highly non-linear function of x, once again typically a neural network. The generative model p(x | z) and inference model q(z | x) are then trained jointly by maximizing the variational lower bound with respect to their parameters, where the integral with respect to q(z | x) is approximated stochastically. The gradient of this estimate can have a low variance estimate, by reparameterizing z = µ + σ ⊙ϵ and rewriting: Eq(z|x) [log p(x | z)] = Ep(ϵ) [log p(x | z = µ + σ ⊙ϵ)] , where ϵ is a vector of standard Gaussian variables. The inference model can then be trained through standard backpropagation technique for stochastic gradient descent. 3 Variational Recurrent Neural Network In this section, we introduce a recurrent version of the VAE for the purpose of modelling sequences. Drawing inspiration from simpler dynamic Bayesian networks (DBNs) such as HMMs and Kalman filters, the proposed variational recurrent neural network (VRNN) explicitly models the dependencies between latent random variables across subsequent timesteps. However, unlike these simpler DBN models, the VRNN retains the flexibility to model highly non-linear dynamics. Generation The VRNN contains a VAE at every timestep. However, these VAEs are conditioned on the state variable ht−1 of an RNN. This addition will help the VAE to take into account the temporal structure of the sequential data. Unlike a standard VAE, the prior on the latent random variable is no longer a standard Gaussian distribution, but follows the distribution: zt ∼N(µ0,t, diag(σ2 0,t)) , where [µ0,t, σ0,t] = ϕprior τ (ht−1), (5) where µ0,t and σ0,t denote the parameters of the conditional prior distribution. Moreover, the generating distribution will not only be conditioned on zt but also on ht−1 such that: xt | zt ∼N(µx,t, diag(σ2 x,t)) , where [µx,t, σx,t] = ϕdec τ (ϕz τ(zt), ht−1), (6) where µx,t and σx,t denote the parameters of the generating distribution, ϕprior τ and ϕdec τ can be any highly flexible function such as neural networks. ϕx τ and ϕz τ can also be neural networks, which extract features from xt and zt, respectively. We found that these feature extractors are crucial for learning complex sequences. The RNN updates its hidden state using the recurrence equation: ht =fθ (ϕx τ (xt), ϕz τ(zt), ht−1) , (7) where f was originally the transition function from Eq. (1). From Eq. (7), we find that ht is a function of x≤t and z≤t. Therefore, Eq. (5) and Eq. (6) define the distributions p(zt | x<t, z<t) and p(xt | z≤t, x<t), respectively. The parameterization of the generative model results in and – was motivated by – the factorization: p(x≤T , z≤T ) = T Y t=1 p(xt | z≤t, x<t)p(zt | x<t, z<t). (8) Inference In a similar fashion, the approximate posterior will not only be a function of xt but also of ht−1 following the equation: zt | xt ∼N(µz,t, diag(σ2 z,t)) , where [µz,t, σz,t] = ϕenc τ (ϕx τ (xt), ht−1), (9) similarly µz,t and σz,t denote the parameters of the approximate posterior. We note that the encoding of the approximate posterior and the decoding for generation are tied through the RNN hidden state ht−1. We also observe that this conditioning on ht−1 results in the factorization: q(z≤T | x≤T ) = T Y t=1 q(zt | x≤t, z<t). (10) 4 (a) Prior (b) Generation (c) Recurrence (d) Inference (e) Overall Figure 1: Graphical illustrations of each operation of the VRNN: (a) computing the conditional prior using Eq. (5); (b) generating function using Eq. (6); (c) updating the RNN hidden state using Eq. (7); (d) inference of the approximate posterior using Eq. (9); (e) overall computational paths of the VRNN. Learning The objective function becomes a timestep-wise variational lower bound using Eq. (8) and Eq. (10): Eq(z≤T |x≤T ) " T X t=1 (−KL(q(zt | x≤t, z<t)∥p(zt | x<t, z<t)) + log p(xt | z≤t, x<t)) # . (11) As in the standard VAE, we learn the generative and inference models jointly by maximizing the variational lower bound with respect to their parameters. The schematic view of the VRNN is shown in Fig. 1, operations (a)–(d) correspond to Eqs. (5)–(7), (9), respectively. The VRNN applies the operation (a) when computing the conditional prior (see Eq. (5)). If the variant of the VRNN (VRNN-I) does not apply the operation (a), then the prior becomes independent across timesteps. STORN [2] can be considered as an instance of the VRNN-I model family. In fact, STORN puts further restrictions on the dependency structure of the approximate inference model. We include this version of the model (VRNN-I) in our experimental evaluation in order to directly study the impact of including the temporal dependency structure in the prior (i.e., conditional prior) over the latent random variables. 4 Experiment Settings We evaluate the proposed VRNN model on two tasks: (1) modelling natural speech directly from the raw audio waveforms; (2) modelling handwriting generation. Speech modelling We train the models to directly model raw audio signals, represented as a sequence of 200-dimensional frames. Each frame corresponds to the real-valued amplitudes of 200 consecutive raw acoustic samples. Note that this is unlike the conventional approach for modelling speech, often used in speech synthesis where models are expressed over representations such as spectral features [see, e.g., 18, 3, 13]. We evaluate the models on the following four speech datasets: 1. Blizzard: This text-to-speech dataset made available by the Blizzard Challenge 2013 contains 300 hours of English, spoken by a single female speaker [10]. 2. TIMIT: This widely used dataset for benchmarking speech recognition systems contains 6, 300 English sentences, read by 630 speakers. 3. Onomatopoeia2: This is a set of 6, 738 non-linguistic human-made sounds such as coughing, screaming, laughing and shouting, recorded from 51 voice actors. 4. Accent: This dataset contains English paragraphs read by 2, 046 different native and nonnative English speakers [19]. 2 This dataset has been provided by Ubisoft. 5 Table 1: Average log-likelihood on the test (or validation) set of each task. Speech modelling Handwriting Models Blizzard TIMIT Onomatopoeia Accent IAM-OnDB RNN-Gauss 3539 -1900 -984 -1293 1016 RNN-GMM 7413 26643 18865 3453 1358 VRNN-I-Gauss ≥8933 ≥28340 ≥19053 ≥3843 ≥1332 ≈9188 ≈29639 ≈19638 ≈4180 ≈1353 VRNN-Gauss ≥9223 ≥28805 ≥20721 ≥3952 ≥1337 ≈9516 ≈30235 ≈21332 ≈4223 ≈1354 VRNN-GMM ≥9107 ≥28982 ≥20849 ≥4140 ≥1384 ≈9392 ≈29604 ≈21219 ≈4319 ≈1384 For the Blizzard and Accent datasets, we process the data so that each sample duration is 0.5s (the sampling frequency used is 16kHz). Except the TIMIT dataset, the rest of the datasets do not have predefined train/test splits. We shuffle and divide the data into train/validation/test splits using a ratio of 0.9/0.05/0.05. Handwriting generation We let each model learn a sequence of (x, y) coordinates together with binary indicators of pen-up/pen-down, using the IAM-OnDB dataset, which consists of 13, 040 handwritten lines written by 500 writers [14]. We preprocess and split the dataset as done in [7]. Preprocessing and training The only preprocessing used in our experiments is normalizing each sequence using the global mean and standard deviation computed from the entire training set. We train each model with stochastic gradient descent on the negative log-likelihood using the Adam optimizer [12], with a learning rate of 0.001 for TIMIT and Accent and 0.0003 for the rest. We use a minibatch size of 128 for Blizzard and Accent and 64 for the rest. The final model was chosen with early-stopping based on the validation performance. Models We compare the VRNN models with the standard RNN models using two different output functions: a simple Gaussian distribution (Gauss) and a Gaussian mixture model (GMM). For each dataset, we conduct an additional set of experiments for a VRNN model without the conditional prior (VRNN-I). We fix each model to have a single recurrent hidden layer with 2000 LSTM units (in the case of Blizzard, 4000 and for IAM-OnDB, 1200). All of ϕτ shown in Eqs. (5)–(7), (9) have four hidden layers using rectified linear units [15] (for IAM-OnDB, we use a single hidden layer). The standard RNN models only have ϕx τ and ϕdec τ , while the VRNN models also have ϕz τ, ϕenc τ and ϕprior τ . For the standard RNN models, ϕx τ is the feature extractor, and ϕdec τ is the generating function. For the RNNGMM and VRNN models, we match the total number of parameters of the deep neural networks (DNNs), ϕx,z,enc,dec,prior τ , as close to the RNN-Gauss model having 600 hidden units for every layer that belongs to either ϕx τ or ϕdec τ (we consider 800 hidden units in the case of Blizzard). Note that we use 20 mixture components for models using a GMM as the output function. For qualitative analysis of speech generation, we train larger models to generate audio sequences. We stack three recurrent hidden layers, each layer contains 3000 LSTM units. Again for the RNNGMM and VRNN models, we match the total number of parameters of the DNNs to be equal to the RNN-Gauss model having 3200 hidden units for each layer that belongs to either ϕx τ or ϕdec τ . 5 Results and Analysis We report the average log-likelihood of test examples assigned by each model in Table 1. For RNN-Gauss and RNN-GMM, we report the exact log-likelihood, while in the case of VRNNs, we report the variational lower bound (given with ≥sign, see Eq. (4)) and approximated marginal log-likelihood (given with ≈sign) based on importance sampling using 40 samples as in [17]. In general, higher numbers are better. Our results show that the VRNN models have higher loglikelihood, which support our claim that latent random variables are helpful when modelling com6 Figure 2: The top row represents the difference δt between µz,t and µz,t−1. The middle row shows the dominant KL divergence values in temporal order. The bottom row shows the input waveforms. plex sequences. The VRNN models perform well even with a unimodal output function (VRNNGauss), which is not the case for the standard RNN models. Latent space analysis In Fig. 2, we show an analysis of the latent random variables. We let a VRNN model read some unseen examples and observe the transitions in the latent space. We compute δt = P j(µj z,t −µj z,t−1)2 at every timestep and plot the results on the top row of Fig. 2. The middle row shows the KL divergence computed between the approximate posterior and the conditional prior. When there is a transition in the waveform, the KL divergence tends to grow (white is high), and we can clearly observe a peak in δt that can affect the RNN dynamics to change modality. (a) Ground Truth (b) RNN-GMM (c) VRNN-Gauss Figure 3: Examples from the training set and generated samples from RNN-GMM and VRNNGauss. Top three rows show the global waveforms while the bottom three rows show more zoomedin waveforms. Samples from (b) RNN-GMM contain high-frequency noise, and samples from (c) VRNN-Gauss have less noise. We exclude RNN-Gauss, because the samples are almost close to pure noise. 7 Speech generation We generate waveforms with 2.0s duration from the models that were trained on Blizzard. From Fig. 3, we can clearly see that the waveforms from the VRNN-Gauss are much less noisy and have less spurious peaks than those from the RNN-GMM. We suggest that the large amount of noise apparent in the waveforms from the RNN-GMM model is a consequence of the compromise these models must make between representing a clean signal consistent with the training data and encoding sufficient input variability to capture the variations across data examples. The latent random variable models can avoid this compromise by adding variability in the latent space, which can always be mapped to a point close to a relatively clean sample. Handwriting generation Visual inspection of the generated handwriting (as shown in Fig. 4) from the trained models reveals that the VRNN model is able to generate more diverse writing style while maintaining consistency within samples. (a) Ground Truth (b) RNN-Gauss (c) RNN-GMM (d) VRNN-GMM Figure 4: Handwriting samples: (a) training examples and unconditionally generated handwriting from (b) RNN-Gauss, (c) RNN-GMM and (d) VRNN-GMM. The VRNN-GMM retains the writing style from beginning to end while RNN-Gauss and RNN-GMM tend to change the writing style during the generation process. This is possibly because the sequential latent random variables can guide the model to generate each sample with a consistent writing style. 6 Conclusion We propose a novel model that can address sequence modelling problems by incorporating latent random variables into a recurrent neural network (RNN). Our experiments focus on unconditional natural speech generation as well as handwriting generation. We show that the introduction of latent random variables can provide significant improvements in modelling highly structured sequences such as natural speech sequences. We empirically show that the inclusion of randomness into high-level latent space can enable the VRNN to model natural speech sequences with a simple Gaussian distribution as the output function. However, the standard RNN model using the same output function fails to generate reasonable samples. An RNN-based model using more powerful output function such as a GMM can generate much better samples, but they contain a large amount of high-frequency noise compared to the samples generated by the VRNN-based models. We also show the importance of temporal conditioning of the latent random variables by reporting higher log-likelihood numbers on modelling natural speech sequences. In handwriting generation, the VRNN model is able to model the diversity across examples while maintaining consistent writing style over the course of generation. Acknowledgments The authors would like to thank the developers of Theano [1]. Also, the authors thank Kyunghyun Cho, Kelvin Xu and Sungjin Ahn for insightful comments and discussion. We acknowledge the support of the following agencies for research funding and computing support: Ubisoft, NSERC, Calcul Qu´ebec, Compute Canada, the Canada Research Chairs and CIFAR. 8 References [1] F. Bastien, P. Lamblin, R. Pascanu, J. Bergstra, I. J. Goodfellow, A. Bergeron, N. Bouchard, and Y. Bengio. Theano: new features and speed improvements. Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop, 2012. [2] J. Bayer and C. Osendorfer. Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610, 2014. [3] A. Bertrand, K. Demuynck, V. Stouten, and H. V. Hamme. Unsupervised learning of auditory filter banks using non-negative matrix factorisation. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4713–4716. IEEE, 2008. [4] N. Boulanger-lewandowski, Y. Bengio, and P. Vincent. Modeling temporal dependencies in highdimensional sequences: Application to polyphonic music generation and transcription. In Proceedings of the 29th International Conference on Machine Learning (ICML), pages 1159–1166, 2012. [5] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724– 1734, 2014. [6] O. Fabius, J. R. van Amersfoort, and D. P. Kingma. Variational recurrent auto-encoders. arXiv preprint arXiv:1412.6581, 2014. [7] A. Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. [8] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. Draw: A recurrent neural network for image generation. In Proceedings of The 32nd International Conference on Machine Learning (ICML), 2015. [9] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. [10] S. King and V. Karaiskos. The blizzard challenge 2013. In The Ninth annual Blizzard Challenge, 2013. [11] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations (ICLR), 2014. [12] D. P. Kingma and M. Welling. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. [13] 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 (NIPS), pages 1096–1104, 2009. [14] M. Liwicki and H. Bunke. Iam-ondb-an on-line english sentence database acquired from handwritten text on a whiteboard. In Proceedings of Eighth International Conference on Document Analysis and Recognition, pages 956–961. IEEE, 2005. [15] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML), pages 807–814, 2010. [16] M. Pachitariu and M. Sahani. Learning visual motion in recurrent neural networks. In Advances in Neural Information Processing Systems (NIPS), pages 1322–1330, 2012. [17] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of The 31st International Conference on Machine Learning (ICML), pages 1278–1286, 2014. [18] K. Tokuda, Y. Nankaku, T. Toda, H. Zen, J. Yamagishi, and K. Oura. Speech synthesis based on hidden markov models. Proceedings of the IEEE, 101(5):1234–1252, 2013. [19] S. Weinberger. The speech accent archieve. http://accent.gmu.edu/, 2015. 9 | 2015 | 285 |
5,797 | Unsupervised Learning by Program Synthesis Kevin Ellis Department of Brain and Cognitive Sciences Massachusetts Institute of Technology ellisk@mit.edu Armando Solar-Lezama MIT CSAIL Massachusetts Institute of Technology asolar@csail.mit.edu Joshua B. Tenenbaum Department of Brain and Cognitive Sciences Massachusetts Institute of Technology jbt@mit.edu Abstract We introduce an unsupervised learning algorithm that combines probabilistic modeling with solver-based techniques for program synthesis. We apply our techniques to both a visual learning domain and a language learning problem, showing that our algorithm can learn many visual concepts from only a few examples and that it can recover some English inflectional morphology. Taken together, these results give both a new approach to unsupervised learning of symbolic compositional structures, and a technique for applying program synthesis tools to noisy data. 1 Introduction Unsupervised learning seeks to induce good latent representations of a data set. Nonparametric statistical approaches such as deep autoencoder networks, mixture-model density estimators, or nonlinear manifold learning algorithms have been very successful at learning representations of high-dimensional perceptual input. However, it is unclear how they would represent more abstract structures such as spatial relations in vision (e.g., inside of or all in a line) [2], or morphological rules in language (e.g., the different inflections of verbs) [1, 13]. Here we give an unsupervised learning algorithm that synthesizes programs from data, with the goal of learning such concepts. Our approach generalizes from small amounts of data, and produces interpretable symbolic representations parameterized by a human-readable programming language. Programs (deterministic or probabilistic) are a natural knowledge representation for many domains [3], and the idea that inductive learning should be thought of as probabilistic inference over programs is at least 50 years old [6]. Recent work in learning programs has focused on supervised learning from noiseless input/output pairs, or from formal specifications [4]. Our goal here is to learn programs from noisy observations without explicit input/output examples. A central idea in unsupervised learning is compression: finding data representations that require the fewest bits to write down. We realize this by treating observed data as the output of an unknown program applied to unknown inputs. By doing joint inference over the program and the inputs, we recover compressive encodings of the observed data. The induced program gives a generative model for the data, and the induced inputs give an embedding for each data point. Although a completely domain general method for program synthesis would be desirable, we believe this will remain intractable for the foreseeable future. Accordingly, our approach factors out the domain-specific components of problems in the form of a grammar for program hypotheses, and we show how this allows the same general-purpose tools to be used for unsupervised program synthesis in two very different domains. In a domain of visual concepts [5] designed to be natural for 1 humans but difficult for machines to learn, we show that our methods can synthesize simple graphics programs representing these visual concepts from only a few example images. These programs outperform both previous machine-learning baselines and several new baselines we introduce. We also study the domain of learning morphological rules in language, treating rules as programs and inflected verb forms as outputs. We show how to encode prior linguistic knowledge as a grammar over programs and recover human-readable linguistic rules, useful for both simple stemming tasks and for predicting the phonological form of new words. 2 The unsupervised program synthesis algorithm The space of all programs is vast and often unamenable to the optimization methods used in much of machine learning. We extend two ideas from the program synthesis community to make search over programs tractable: Sketching: In the sketching approach to program synthesis, one manually provides a sketch of the program to be induced, which specifies a rough outline of its structure [7]. Our sketches take the form of a probabilistic context-free grammar and make explicit the domain specific prior knowledge. Symbolic search: Much progress has been made in the engineering of general-purpose symbolic solvers for Satisfiability Modulo Theories (SMT) problems [8]. We show how to translate our sketches into SMT problems. Program synthesis is then reduced to solving an SMT problem. These are intractable in general, but often solved efficiently in practice due to the highly constrained nature of program synthesis which these solvers can exploit. Prior work on symbolic search from sketches has not had to cope with noisy observations or probabilities over the space of programs and inputs. Demonstrating how to do this efficiently is our main technical contribution. 2.1 Formalization as probabilistic inference We formalize unsupervised program synthesis as Bayesian inference within the following generative model: Draw a program f(·) from a description length prior over programs, which depends upon the sketch. Draw N inputs {Ii}N i=1 to the program f(·) from a domain-dependent description length prior PI(·). These inputs are passed to the program to yield {zi}N i=1 with zi ≜f(Ii) (zi “defined as” f(Ii)). Last, we compute the observed data {xi}N i=1 by drawing from a noise model Px|z(·|zi). Our objective is to estimate the unobserved f(·) and {Ii}N i=1 from the observed dataset {xi}N i=1. We use this probabilistic model to define the description length below, which we seek to minimize: −log Pf(f) | {z } program length + N X i=1 −log Px|z(xi|f(Ii)) | {z } data reconstruction error −log PI(Ii) | {z } data encoding length (1) 2.2 Defining a program space We sketch a space of allowed programs by writing down a context free grammar G, and write L to mean the set of all programs generated by G. Placing uniform production probabilities over each non-terminal symbol in G gives a PCFG that serves as a prior over programs: the Pf(·) of Eq. 1. For example, a grammar over arithmetic expressions might contain rules that say: “expressions are either the sum of two expressions, or a real number, or an input variable x” which we write as E →E + E | R | x (2) Having specified a space of programs, we define the meaning of a program in terms of SMT primitives, which can include objects like tuples, real numbers, conditionals, booleans, etc [8]. We write τ to mean the set of expressions built of SMT primitives. Formally, we assume G comes equipped with a denotation for each rule, which we write as J·K : L →τ →τ. The denotation of a rule in G is always written as a function of the denotations of that rule’s children. For example, a denotation for the grammar in Eq. 2 is (where I is a program input): JE1 + E2K(I) = JE1K(I) + JE2K(I) Jr ∈RK(I) = r JxK(I) = I (3) 2 Defining the denotations for a grammar is straightforward and analogous to writing a “wrapper library” around the core primitives of the SMT solver. Our formalization factors out the grammar and the denotation, but they are tightly coupled and, in other synthesis tools, written down together [7, 9]. The denotation shows how to construct an SMT expression from a single program in L, and we use it to build an SMT expression that represents the space of all programs such that its solution tells which program in the space solves the synthesis problem. The SMT solver then solves jointly for the program and its inputs, subject to an upper bound upon the total description length. This builds upon prior work in program synthesis, such as [9], but departs in the quantitative aspect of the constraints and in not knowing the program inputs. Due to space constraints, we only briefly describe the synthesis algorithm, leaving a detailed discussion to the Supplement. We use Algorithm 1 to generate an SMT formula that (1) defines the space of programs L; (2) computes the description length of a program; and (3) computes the output of a program on a given input. In Algorithm 1 the returned description length l corresponds to the −log Pf(f) term of Eq. 1 while the returned evaluator f(·) gives us the f(Ii) terms. The returned constraints A ensure that the program computed by f(·) is a member of L. Algorithm 1 SMT encoding of programs generated by production P of grammar G function Generate(G,J·K,P): Input: Grammar G, denotation J·K, non-terminal P Output: Description length l : τ, evaluator f : τ →τ, assertions A : 2τ choices ←{P →K(P ′, P ′′, . . .) ∈G} n ←|choices| for r = 1 to n do let K(P 1 r , . . . , P k r ) = choices(r) for j = 1 to k do lj r, f j r , Aj r ←Generate(G,J·K,P j r ) end for lr ←P j lj r // Denotation is a function of child denotations // Let gr be that function for choices(r) // Q1, · · · , Qk : L are arguments to constructor K let gr(JQ1K(I), · · · , JQkK(I)) = JK(Q1, . . . , Qk)K(I) fr(I) ←gr(f 1 r (I), · · · , f k r (I)) end for // Indicator variables specifying which rule is used // Fresh variables unused in any existing formula c1, · · · , cn = FreshBooleanVariable() A1 ←W j cj A2 ←∀j ̸= k : ¬(cj ∧ck) A ←A1 ∪A2 ∪S r,j Aj r l = log n + if(c1, l1, if(c2, l2, · · · )) f(I) = if(c1, f1(I), if(c2, f2(I), · · · )) return l, f, A The SMT formula generated by Algorithm 1 must be supplemented with constraints that compute the data reconstruction error and data encoding length of Eq. 1. We handle infinitely recursive grammars by bounding the depth of recursive calls to the Generate procedure, as in [7]. SMT solvers are not designed to minimize loss functions, but to verify the satisfiability of a set of constraints. We minimize Eq. 1 by first asking the solver for any solution, then adding a constraint saying its solution must have smaller description length than the one found previously, etc. until it can find no better solution. 3 Experiments 3.1 Visual concept learning Humans quickly learn new visual concepts, often from only a few examples [2, 5, 10]. In this section, we present evidence that an unsupervised program synthesis approach can also learn visual concepts from a small number of examples. Our approach is as follows: given a set of example images, we automatically parse them into a symbolic form. Then, we synthesize a program that maximally compresses these parses. Intuitively, this program encodes the common structure needed to draw each of the example images. We take our visual concepts from the Synthetic Visual Reasoning Test (SVRT), a set of visual classification problems which are easily parsed into distinct shapes. Fig. 1 shows three examples of SVRT concepts. Fig. 2 diagrams the parsing procedure for another visual concept: two arbitrary shapes bordering each other. We defined a space of simple graphics programs that control a turtle [11] and whose primitives include rotations, forward movement, rescaling of shapes, etc.; see Table 1. Both the learner’s observations and the graphics program outputs are image parses, which have three sections: (1) A list of shapes. Each shape is a tuple of a unique ID, a scale from 0 to 1, and x, y coordinates: 3 ⟨id, scale, x, y⟩. (2) A list of containment relations contains(i, j) where i, j range from one to the number of shapes in the parse. (3) A list of reflexive borders relations borders(i, j) where i, j range from one to the number of shapes in the parse. The algorithm in Section 2.2 describes purely functional programs (programs without state), but the grammar in Table 1 contains imperative commands that modify a turtle’s state. We can think of imperative programs as syntactic sugar for purely functional programs that pass around a state variable, as is common in the programming languages literature [7]. The grammar of Table 1 leaves unspecified the number of program inputs. When synthesizing a program from example images, we perform a grid search over the number of inputs. Given images with N shapes and maximum shape ID D, the grid search considers D input shapes, 1 to N input positions, 0 to 2 input lengths and angles, and 0 to 1 input scales. We set the number of imperative draw commands (resp. borders, contains) to N (resp. number of topological relations). We now define a noise model Px|z(·|·) that specifies how a program output z produces a parse x, by defining a procedure for sampling x given z. First, the x and y coordinates of each shape are perturbed by additive noise drawn uniformly from −δ to δ; in our experiments, we put δ = 3. Then, optional borders and contains relations (see Table 1) are erased with probability 1/2. Last, because the order of the shapes is unidentifiable, both the list of shapes and the indices of the borders/containment relations are randomly permuted. The Supplement has the SMT encoding of the noise model and priors over program inputs, which are uniform. teleport(position[0], initialOrientation) draw(shape[0], scale = 1) move(distance[0], 0deg) draw(shape[0], scale = scale[0]) move(distance[0], 0deg) draw(shape[0], scale = scale[0]) Figure 1: Left: Pairs of examples of three SVRT concepts taken from [5]. Right: the program we synthesize from the leftmost pair. This is a turtle program capable of drawing this pair of pictures and is parameterized by a set of latent variables: shape, distance, scale, initial position, initial orientation. s1 = Shape(id = 1, scale = 1, x = 10, y = 15) s2 = Shape(id = 2, scale = 1, x = 27, y = 54) borders(s1, s2) Figure 2: The parser segments shapes and identifies their topological relations (contains, borders), emmitting their coordinates, topological relations, and scales. To encourage translational and rotational invariance, the first turtle command is constrained to always be a teleport to a new location, and the initial orientation of the turtle, which we write as θ0, is made an input to the synthesized graphics program. We are introducing an unsupervised learning algorithm, but the SVRT consists of supervised binary classification problems. So we chose to evaluate our visual concept learner by having it solve these classification problems. Given a test image t and a set of examples E1 (resp. E2) from class C1 (resp. C2), we use the decision rule P(t|E1) ⋛ C1 C2 P(t|E2), or equivalently Px({t} ∪E1)Px(E2) ⋛ C1 C2 Px(E1)Px({t} ∪E2). Each term in this decision rule is written as a marginal probability, and we approximate each marginal by lower bounding it by the largest term in its corresponding sum. This gives −l({t} ∪E1) | {z } ≈log Px({t}∪E1) −l(E2) | {z } ≈log Px(E2) C1 ⋛ C2 −l(E1) | {z } ≈log Px(E1) −l({t} ∪E2) | {z } ≈log Px({t}∪E2) (4) 4 Grammar rule English description E →(M; D)+; C+; B+ Alternate move/draw; containment relations; borders relations M →teleport(R, θ0) Move turtle to new location R, reset orientation to θ0 M →move(L, A) Rotate by angle A, go forward by distance L M →flipX()|flipY() Flip turtle over X/Y axis M →jitter() Small perturbation to turtle position D →draw(S, Z) Draw shape S at scale Z Z →1|z1|z2| · · · Scale is either 1 (no rescaling) or program input zj A →0◦| ± 90◦|θ1|θ2| · · · Angle is either 0◦, ±90◦, or a program input θj R →r1|r2| · · · Positions are program inputs rj S →s1|s2| · · · Shapes are program inputs sj L →ℓ1|ℓ2| · · · Lengths are program inputs ℓj C →contains(Z, Z) Containment between integer indices into drawn shapes C →contains?(Z, Z) Optional containment between integer indices into drawn shapes B →borders(Z, Z) Bordering between integer indices into drawn shapes B →borders?(Z, Z) Optional bordering between integer indices into drawn shapes Table 1: Grammar for the vision domain. The non-terminal E is the start symbol for the grammar. The token ; indicates sequencing of imperative commands. Optional bordering/containment holds with probability 1/2. See the Supplement for denotations of each grammar rule. where l(·) is l(E) ≜ min f,{Ie}e∈E −log Pf(f) − X e∈E log PI(Ie) + log Px|z(Ee|f(Ie)) ! (5) So, we induce 4 programs that maximally compress a different set of image parses: E1, E2, E1 ∪ {t}, E2 ∪{t}. The maximally compressive program is found by minimizing Eq. 5, putting the observations {xi} as the image parses, putting the inputs {Ie} as the parameters of the graphics program, and generating the program f(·) by passing the grammar of Table 1 to Algorithm 1. We evaluated the classification accuracy across each of the 23 SVRT problems by sampling three positive and negative examples from each class, and then evaluating the accuracy on a held out test example. 20 such estimates were made for each problem. We compare with three baselines, as shown in Fig. 3. (1) To control for the effect of our parser, we consider how well discriminative classification on the image parses performs. For each image parse, we extracted the following features: number of distinct shapes, number of rescaled shapes, and number of containment/bordering relations, for 4 integer valued features. Following [5] we used Adaboost with decision stumps on these parse features. (2) We trained two convolutional network architectures for each SVRT problem, and found that a variant of LeNet5 [12] did best; we report those results here. The Supplement has the network parameters and results for both architectures. (3) In [5] several discriminative baselines are introduced. These models are trained on low-level image features; we compare with their bestperforming model, which fed 10000 examples to Adaboost with decision stumps. Unsupervised program synthesis does best in terms of average classification accuracy, number of SVRT problems solved at ≥90% accuracy,1 and correlation with the human data. We do not claim to have solved the SVRT. For example, our representation does not model some geometric transformations needed for some of the concepts, such as rotations of shapes. Additionally, our parsing procedure occasionally makes mistakes, which accounts for the many tasks we solve at accuracies between 90% and 100%. 3.2 Morphological rule learning How might a language learner discover the rules that inflect verbs? We focus on English inflectional morphology, a system with a long history of computational modeling [13]. Viewed as an unsupervised learning problem, our objective is to find a compressive representation of English verbs. 1Humans “learn the task” after seven consecutive correct classifications [5]. Seven correct classifications are likely to occur when classification accuracy is ≥0.51/7 ≈0.9 5 Figure 3: Comparing human performance on the SVRT with classification accuracy for machine learning approaches. Human accuracy is the fraction of humans that learned the concept: 0% is chance level. Machine accuracy is the fraction of correctly classified held out examples: 50% is chance level. Area of circles is proportional to the number of observations at that point. Dashed line is average accuracy. Program synthesis: this work trained on 6 examples. ConvNet: A variant of LeNet5 trained on 2000 examples. Parse (Image) features: discriminative learners on features of parse (pixels) trained on 6 (10000) examples. Humans given an average of 6.27 examples and solve an average of 19.85 problems [5]. We make the following simplification: our learner is presented with triples of ⟨lexeme, tense, word⟩2. This ignores many of the difficulties involved in language acquisition, but see [14] for a unsupervised approach to extracting similar information from corpora. We can think of these triples as the entries of a matrix whose columns correspond to different tenses and whose rows correspond to different lexemes; see Table 3. We regard each row of this matrix as an observation (the {xi} of Eq. 1) and identify stems with the inputs to the program we are to synthesize (the {Ii} of Eq. 1). Thus, our objective is to synthesize a program that maps a stem to a tuple of inflections. We put a description length prior over the stem and detail its SMT encoding in the the Supplement. We represent words as sequences of phonemes, and define a space of programs that operate upon words, given in Table 2. English inflectional verb morphology has a set of regular rules that apply for almost all words, as well as a small set of words whose inflections do not follow a regular rule: the “irregular” forms. We roll these irregular forms into the noise model: with some small probability ϵ, an inflected form is produced not by applying a rule to the stem, but by drawing a sequence of phonemes from a description length prior. In our experiments, we put ϵ = 0.1. This corresponds to a simple “rules plus lexicon” model of morphology, which is oversimplified in many respects but has been proposed in the past as a crude approximation to the actual system of English morphology [13]. See the Supplement for the SMT encoding of our noise model. In conclusion, the learning problem is as follows: given triples of ⟨lexeme, tense, word⟩, jointly infer the regular rules, the stems, and which words are irregular exceptions. We took five inflected forms of the top 5000 lexemes as measured by token frequency in the CELEX lexical inventory [15]. We split this in half to give 2500 lexemes for training and testing, and trained our model using Random Sample Consensus (RANSAC) [16]. Concretely, we sampled many subsets of the data, each with 4, 5, 6, or 7 lexemes (thus 20, 25, 30, or 35 words), and synthesized the program for each subset minimizing Eq. 1. We then took the program whose likelihood on the training set was highest. Fig. 4 plots the likelihood on the testing set as a function of the number of subsets (RANSAC iterations) and the size of the subsets (# of lexemes). Fig. 5 shows the program that assigned the highest likelihood to the training data; it also had the highest likelihood on the testing data. With 7 lexemes, the learner consistently recovers the regular linguistic rule, but with less data, it recovers rules that are almost as good, degrading more as it receives less data. Most prior work on morphological rule learning falls into two regimes: (1) supervised learning of the phonological form of morphological rules; and (2) unsupervised learning of morphemes from corpora. Because we learn from the lexicon, our model is intermediate in terms of supervision. We compare with representative systems from both regimes as follows: 2The lexeme is the meaning of the stem or root; for example, run, ran, runs all share the same lexeme 6 Grammar rule English description E →⟨C, · · · , C⟩ Programs are tuples of conditionals, one for each tense C →R|if (G) R else C Conditionals have return value R, guard G, else condition C R →stem + phoneme∗ Return values append a suffix to a stem G →[VPMS] Guards condition upon voicing, manner, place, sibilancy V →V′|? Voicing specifies of voice V′ or doesn’t care V′ →VOICED|UNVOICED Voicing options P →P′|? Place specifies a place of articulation P′ or doesn’t care P′ →LABIAL| · · · Place of articulation features M →M′|? Manner specifies a manner of articulation M′ or doesn’t care M′ →FRICATIVE| · · · Manner of articulation features S →S′|? Sibilancy specifies a sibilancy S′ or doesn’t care S′ →SIBILANT|NOTSIBIL Sibilancy is a binary feature Table 2: Grammar for the morphology domain. The non-terminal E is the start symbol for the grammar. Each guard G conditions on phonological properties of the end of the stem: voicing, place, manner, and sibilancy. Sequences of phonemes are encoded as tuples of ⟨length, phoneme1, phoneme2, · · · ⟩. See the Supplement for denotations of each grammar rule. Lexeme Present Past 3rd Sing. Pres. Past Part. Prog. style staIl staIld staIlz staIld staIlIN run r2n ræn r2nz r2n r2nIN subscribe s@bskraIb s@bskraIbd s@bskraIbz s@bskraIbd s@bskraIbIN rack ræk rækt ræks rækt rækIN Table 3: Example input to the morphological rule learner The Morfessor system [17] induces morphemes from corpora which it then uses for segmentation. We used Morfessor to segment phonetic forms of the inflections of our 5000 lexemes; compared to the ground truth inflection transforms provided by CELEX, it has an error rate of 16.43%. Our model segments the same verbs with an error rate of 3.16%. This experiment is best seen as a sanity check: because our system knows a priori to expect only suffixes and knows which words must share the same stem, we expect better performance due to our restricted hypothesis space. To be clear, we are not claiming that we have introduced a stemmer that exceeds or even meets the state-of-the-art. In [1] Albright and Hayes introduce a supervised morphological rule learner that induces phonological rules from examples of a stem being transformed into its inflected form. Because our model learns a joint distribution over all of the inflected forms of a lexeme, we can use it to predict inflections conditioned upon their present tense. Our model recovers the regular inflections, but does not recover the so-called “islands of reliability” modeled in [1]; e.g., our model predicts that the past tense of the nonce word glee is gleed, but does not predict that a plausible alternative past tense is gled, which the model of Albright and Hayes does. This deficiency is because the space of programs in Table 2 lacks the ability to express this class of rules. 4 Discussion 4.1 Related Work Inductive programming systems have a long and rich history [4]. Often these systems use stochastic search algorithms, such as genetic programming [18] or MCMC [19]. Others sufficiently constrain the hypothesis space to enable fast exact inference [20]. The inductive logic programming community has had some success inducing Prolog programs using heuristic search [4]. Our work is motivated by the recent successes of systems that put program synthesis in a probabilistic framework [21, 22]. The program synthesis community introduced solver-based methods for learning programs [7, 23, 9], and our work builds upon their techniques. 7 Figure 4: Learning curves for our morphology model trained using RANSAC. At each iteration, we sample 4, 5, 6, or 7 lexemes from the training data, fit a model using their inflections, and keep the model if it has higher likelihood on the training data than other models found so far. Each line was run on a different permutation of the samples. PRESENT = stem PAST = i f [ CORONAL STOP ] stem + Id i f [ VOICED ] stem + d e l s e stem + t PROG. = stem + IN 3 rdSing = i f [ SIBILANT ] stem + Iz i f [ VOICED ] stem + z e l s e stem + s Figure 5: Program synthesized by morphology learner. Past Participle program was the same as past tense program. There is a vast literature on computational models of morphology. These include systems that learn the phonological form of morphological rules [1, 13, 24], systems that induce morphemes from corpora [17, 25], and systems that learn the productivity of different rules [26]. In using a general framework, our model is similar in spirit to the early connectionist accounts [24], but our use of symbolic representations is more in line with accounts proposed by linguists, like [1]. Our model of visual concept learning is similar to inverse graphics, but the emphasis upon synthesizing programs is more closely aligned with [2].We acknowledge that convolutional networks are engineered to solve classification problems qualitatively different from the SVRT, and that one could design better neural network architectures for these problems. For example, it would be interesting to see how the very recent DRAW network [27] performs on the SVRT. 4.2 A limitation of the approach: Large datasets Synthesizing programs from large datasets is difficult, and complete symbolic solvers often do not degrade gracefully as the problem size increases. Our morphology learner uses RANSAC to sidestep this limitation, but we anticipate domains for which this technique will be insufficient. Prior work in program synthesis introduced Counter Example Guided Inductive Synthesis (CEGIS) [7] for learning from a large or possibly infinite family of examples, but it cannot accomodate noise in the data. We suspect that a hypothetical RANSAC/CEGIS hybrid would scale to large, noisy training sets. 4.3 Future Work The two key ideas in this work are (1) the encoding of soft probabilistic constraints as hard constraints for symbolic search, and (2) crafting a domain specific grammar that serves both to guide the symbolic search and to provide a good inductive bias. Without a strong inductive bias, one cannot possibly generalize from a small number of examples. Yet humans can, and AI systems should, learn over time what constitutes a good prior, hypothesis space, or sketch. Learning a good inductive bias, as done in [22], and then providing that inductive bias to a solver, may be a way of advancing program synthesis as a technology for artificial intelligence. Acknowledgments We are grateful for discussions with Timothy O’Donnell on morphological rule learners, for advice from Brendan Lake and Tejas Kulkarni on the convolutional network baselines, and for the suggestions of our anonymous reviewers. This material is based upon work supported by funding from NSF award SHF-1161775, from the Center for Minds, Brains and Machines (CBMM) funded by NSF STC award CCF-1231216, and from ARO MURI contract W911NF-08-1-0242. 8 References [1] Adam Albright and Bruce Hayes. Rules vs. analogy in english past tenses: A computational/experimental study. Cognition, 90:119–161, 2003. [2] Brenden M Lake, Ruslan R Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In Advances in neural information processing systems, pages 2526–2534, 2013. [3] Noah D. Goodman, Vikash K. Mansinghka, Daniel M. Roy, Keith Bonawitz, and Joshua B. Tenenbaum. Church: a language for generative models. In UAI, pages 220–229, 2008. [4] Sumit Gulwani, Jose Hernandez-Orallo, Emanuel Kitzelmann, Stephen Muggleton, Ute Schmid, and Ben Zorn. Inductive programming meets the real world. Commun. ACM, 2015. [5] Franc¸ois Fleuret, Ting Li, Charles Dubout, Emma K Wampler, Steven Yantis, and Donald Geman. Comparing machines and humans on a visual categorization test. PNAS, 108(43):17621–17625, 2011. [6] Ray J Solomonoff. A formal theory of inductive inference. Information and control, 7(1):1–22, 1964. [7] Armando Solar Lezama. Program Synthesis By Sketching. PhD thesis, EECS Department, University of California, Berkeley, Dec 2008. [8] Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient smt solver. In Tools and Algorithms for the Construction and Analysis of Systems, pages 337–340. Springer, 2008. [9] Emina Torlak and Rastislav Bodik. Growing solver-aided languages with rosette. In Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming & software, pages 135–152. ACM, 2013. [10] Stanislas Dehaene, V´eronique Izard, Pierre Pica, and Elizabeth Spelke. Core knowledge of geometry in an amazonian indigene group. Science, 311(5759):381–384, 2006. [11] David D. Thornburg. Friends of the turtle. Compute!, March 1983. [12] 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. [13] Mark S Seidenberg and David C Plaut. Quasiregularity and its discontents: the legacy of the past tense debate. Cognitive science, 38(6):1190–1228, 2014. [14] Erwin Chan and Constantine Lignos. Investigating the relationship between linguistic representation and computation through an unsupervised model of human morphology learning. Research on Language and Computation, 8(2-3):209–238, 2010. [15] R Piepenbrock Baayen, R and L Gulikers. CELEX2 LDC96L14. Philadelphia: Linguistic Data Consortium, 1995. Web download. [16] Martin A. Fischler and Robert C. Bolles. Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography. Commun. ACM, 24(6):381–395, June 1981. [17] Sami Virpioja, Peter Smit, Stig-Arne Grnroos, and Mikko Kurimo. Morfessor 2.0: Python implementation and extensions for morfessor baseline. Technical report, Aalto University, Helsinki, 2013. [18] John R. Koza. Genetic programming - on the programming of computers by means of natural selection. Complex adaptive systems. MIT Press, 1993. [19] Eric Schkufza, Rahul Sharma, and Alex Aiken. Stochastic superoptimization. In ACM SIGARCH Computer Architecture News, volume 41, pages 305–316. ACM, 2013. [20] Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, pages 317–330, New York, NY, USA, 2011. ACM. [21] Yarden Katz, Noah D. Goodman, Kristian Kersting, Charles Kemp, and Joshua B. Tenenbaum. Modeling semantic cognition as logical dimensionality reduction. In CogSci, pages 71–76, 2008. [22] Percy Liang, Michael I. Jordan, and Dan Klein. Learning programs: A hierarchical bayesian approach. In Johannes F¨urnkranz and Thorsten Joachims, editors, ICML, pages 639–646. Omnipress, 2010. [23] Sumit Gulwani, Susmit Jha, Ashish Tiwari, and Ramarathnam Venkatesan. Synthesis of loop-free programs. In PLDI, pages 62–73, New York, NY, USA, 2011. ACM. [24] D. E. Rumelhart and J. L. McClelland. On learning the past tenses of english verbs. In Parallel distributed processing: Explorations in the microstructure of cognition, pages Volume 2, 216–271. Bradford Books/MIT Press, 1986. [25] John Goldsmith. Unsupervised learning of the morphology of a natural language. Comput. Linguist., 27(2):153–198, June 2001. [26] Timothy J. O’Donnell. Productivity and Reuse in Language: A Theory of Linguistic Computation and Storage. The MIT Press, 2015. [27] Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. DRAW: A recurrent neural network for image generation. CoRR, abs/1502.04623, 2015. 9 | 2015 | 286 |
5,798 | Learning Causal Graphs with Small Interventions Karthikeyan Shanmugam1, Murat Kocaoglu2, Alexandros G. Dimakis3, Sriram Vishwanath4 Department of Electrical and Computer Engineering The University of Texas at Austin, USA 1karthiksh@utexas.edu,2mkocaoglu@utexas.edu, 3dimakis@austin.utexas.edu,4sriram@ece.utexas.edu Abstract We consider the problem of learning causal networks with interventions, when each intervention is limited in size under Pearl’s Structural Equation Model with independent errors (SEM-IE). The objective is to minimize the number of experiments to discover the causal directions of all the edges in a causal graph. Previous work has focused on the use of separating systems for complete graphs for this task. We prove that any deterministic adaptive algorithm needs to be a separating system in order to learn complete graphs in the worst case. In addition, we present a novel separating system construction, whose size is close to optimal and is arguably simpler than previous work in combinatorics. We also develop a novel information theoretic lower bound on the number of interventions that applies in full generality, including for randomized adaptive learning algorithms. For general chordal graphs, we derive worst case lower bounds on the number of interventions. Building on observations about induced trees, we give a new deterministic adaptive algorithm to learn directions on any chordal skeleton completely. In the worst case, our achievable scheme is an ↵-approximation algorithm where ↵is the independence number of the graph. We also show that there exist graph classes for which the sufficient number of experiments is close to the lower bound. In the other extreme, there are graph classes for which the required number of experiments is multiplicatively ↵away from our lower bound. In simulations, our algorithm almost always performs very close to the lower bound, while the approach based on separating systems for complete graphs is significantly worse for random chordal graphs. 1 Introduction Causality is a fundamental concept in sciences and philosophy. The mathematical formulation of a theory of causality in a probabilistic sense has received significant attention recently (e.g. [1–5]). A formulation advocated by Pearl considers the structural equation models: In this framework, X is a cause of Y , if Y can be written as f(X, E), for some deterministic function f and some latent random variable E. Given two causally related variables X and Y , it is not possible to infer whether X causes Y or Y causes X from random samples, unless certain assumptions are made on the distribution of E and/or on f [6, 7]. For more than two random variables, directed acyclic graphs (DAGs) are the most common tool used for representing causal relations. For a given DAG D = (V, E), the directed edge (X, Y ) 2 E shows that X is a cause of Y . If we make no assumptions on the data generating process, the standard way of inferring the causal directions is by performing experiments, the so-called interventions. An intervention requires modifying the process that generates the random variables: The experimenter has to enforce values on the random variables. This process is different than conditioning as explained in detail in [1]. 1 The natural problem to consider is therefore minimizing the number of interventions required to learn a causal DAG. Hauser et al. [2] developed an efficient algorithm that minimizes this number in the worst case. The algorithm is based on optimal coloring of chordal graphs and requires at most log χ interventions to learn any causal graph where χ is the chromatic number of the chordal skeleton. However, one important open problem appears when one also considers the size of the used interventions: Each intervention is an experiment where the scientist must force a set of variables to take random values. Unfortunately, the interventions obtained in [2] can involve up to n/2 variables. The simultaneous enforcing of many variables can be quite challenging in many applications: for example in biology, some variables may not be enforceable at all or may require complicated genomic interventions for each parameter. In this paper, we consider the problem of learning a causal graph when intervention sizes are bounded by some parameter k. The first work we are aware of for this problem is by Eberhardt et al. [3], where he provided an achievable scheme. Furthermore [8] shows that the set of interventions to fully identify a causal DAG must satisfy a specific set of combinatorial conditions called a separating system1, when the intervention size is not constrained or is 1. In [4], with the assumption that the same holds true for any intervention size, Hyttinen et al. draw connections between causality and known separating system constructions. One open problem is: If the learning algorithm is adaptive after each intervention, is a separating system still needed or can one do better? It was believed that adaptivity does not help in the worst case [8] and that one still needs a separating system. Our Contributions: We obtain several novel results for learning causal graphs with interventions bounded by size k. The problem can be separated for the special case where the underlying undirected graph (the skeleton) is the complete graph and the more general case where the underlying undirected graph is chordal. 1. For complete graph skeletons, we show that any adaptive deterministic algorithm needs a (n, k) separating system. This implies that lower bounds for separating systems also hold for adaptive algorithms and resolves the previously mentioned open problem. 2. We present a novel combinatorial construction of a separating system that is close to the previous lower bound. This simple construction may be of more general interest in combinatorics. 3. Recently [5] showed that randomized adaptive algorithms need only log log n interventions with high probability for the unbounded case. We extend this result and show that O ! n k log log k " interventions of size bounded by k suffice with high probability. 4. We present a more general information theoretic lower bound of n 2k to capture the performance of such randomized algorithms. 5. We extend the lower bound for adaptive algorithms for general chordal graphs. We show that over all orientations, the number of experiments from a (χ(G), k) separating system is needed where χ(G) is the chromatic number of the skeleton graph. 6. We show two extremal classes of graphs. For one of them, the interventions through (χ, k) separating system is sufficient. For the other class, we need ↵(χ−1) 2k ⇡ n 2k experiments in the worst case. 7. We exploit the structural properties of chordal graphs to design a new deterministic adaptive algorithm that uses the idea of separating systems together with adaptability to Meek rules. We simulate our new algorithm and empirically observe that it performs quite close to the (χ, k) separating system. Our algorithm requires much fewer interventions compared to (n, k) separating systems. 2 Background and Terminology 2.1 Essential graphs A causal DAG D = (V, E) is a directed acyclic graph where V = {x1, x2 . . . xn} is a set of random variables and (x, y) 2 E is a directed edge if and only if x is a direct cause of y. We adopt Pearl’s structural equation model with independent errors (SEM-IE) in this work (see [1] for more details). 1A separating system is a 0-1 matrix with n distinct columns and each row has at most k ones. 2 Variables in S ✓V cause xi, if xi = f({xj}j2S, ey) where ey is a random variable independent of all other variables. The causal relations of D imply a set of conditional independence (CI) relations between the variables. A conditional independence relation is of the following form: Given Z, the set X and the set Y are conditionally independent for some disjoint subsets of variables X, Y, Z. Due to this, causal DAGs are also called causal Bayesian networks. A set V of variables is Bayesian with respect to a DAG D if the joint probability distribution of V can be factorized as a product of marginals of every variable conditioned on its parents. All the CI relations that are learned statistically through observations can also be inferred from the Bayesian network using a graphical criterion called the d-separation [9] assuming that the distribution is faithful to the graph 2. Two causal DAGs are said to be Markov equivalent if they encode the same set of CIs. Two causal DAGs are Markov equivalent if and only if they have the same skeleton3 and the same immoralities4. The class of causal DAGs that encode the same set of CIs is called the Markov equivalence class. We denote the Markov equivalence class of a DAG D by [D]. The graph union5 of all DAGs in [D] is called the essential graph of D. It is denoted E(D). E(D) is always a chain graph with chordal6 chain components 7 [11]. The d-separation criterion can be used to identify the skeleton and all the immoralities of the underlying causal DAG [9]. Additional edges can be identified using the fact that the underlying DAG is acyclic and there are no more immoralities. Meek derived 3 local rules (Meek rules), introduced in [12], to be recursively applied to identify every such additional edge (see Theorem 3 of [13]). The repeated application of Meek rules on this partially directed graph with identified immoralities until they can no longer be used yields the essential graph. 2.2 Interventions and Active Learning Given a set of variables V = {x1, ..., xn}, an intervention on a set S ⇢X of the variables is an experiment where the performer forces each variable s 2 S to take the value of another independent (from other variables) variable u, i.e., s = u. This operation, and how it affects the joint distribution is formalized by the do operator by Pearl [1]. An intervention modifies the causal DAG D as follows: The post intervention DAG D{S} is obtained by removing the connections of nodes in S to their parents. The size of an intervention S is the number of intervened variables, i.e., |S|. Let Sc denote the complement of the set S. CI-based learning algorithms can be applied to D{S} to identify the set of removed edges, i.e. parents of S [9], and the remaining adjacent edges in the original skeleton are declared to be the children. Hence, (R0) The orientations of the edges of the cut between S and Sc in the original DAG D can be inferred. Then, 4 local Meek rules (introduced in [12]) are repeatedly applied to the original DAG D with the new directions learnt from the cut to learn more till no more directed edges can be identified. Further application of CI-based algorithms on D will reveal no more information. The Meek rules are given below: (R1) (a −b) is oriented as (a ! b) if 9c s.t. (c ! a) and (c, b) /2 E. (R2) (a −b) is oriented as (a ! b) if 9c s.t. (a ! c) and (c ! b). (R3) (a −b) is oriented as (a ! b) if 9c, d s.t. (a −c),(a −d),(c ! b),(d ! b) and (c, d) /2 E. 2Given Bayesian network, any CI relation implied by d-separation holds true. All the CIs implied by the distribution can be found using d-separation if the distribution is faithful. Faithfulness is a widely accepted assumption, since it is known that only a measure zero set of distributions are not faithful [10]. 3Skeleton of a DAG is the undirected graph obtained when directed edges are converted to undirected edges. 4An induced subgraph on X, Y, Z is an immorality if X and Y are disconnected, X ! Z and Z Y . 5Graph union of two DAGs D1 = (V, E1) and D2 = (V, E2) with the same skeleton is a partially directed graph D = (V, E), where (va, vb) 2 E is undirected if the edges (va, vb) in E1 and E2 have different directions, and directed as va ! vb if the edges (va, vb) in E1 and E2 are both directed as va ! vb. 6An undirected graph is chordal if it has no induced cycle of length greater than 3. 7This means that E(D) can be decomposed as a sequence of undirected chordal graphs G1, G2 . . . Gm (chain components) such that there is a directed edge from a vertex in Gi to a vertex in Gj only if i < j 3 (R4) (a −c) is oriented as (a ! c) if 9b, d s.t. (b ! c),(a −d),(a −b),(d ! b) and (c, d) /2 E. The concepts of essential graphs and Markov equivalence classes are extended in [14] to incorporate the role of interventions: Let I = {I1, I2, ..., Im}, be a set of interventions and let the above process be followed after each intervention. Interventional Markov equivalence class (I equivalence) of a DAG is the set of DAGs that represent the same set of probability distributions obtained when the above process is applied after every intervention in I. It is denoted by [D]I. Similar to the observational case, I essential graph of a DAG D is the graph union of all DAGs in the same I equivalence class; it is denoted by EI(D). We have the following sequence: D ! CI learning ! Meek rules ! E(D) ! I1 a! learn by R0 b! Meek rules ! E{I1}(D) ! I2 . . . ! E{I1,I2}(D) . . . (1) Therefore, after a set of interventions I has been performed, the essential graph EI(D) is a graph with some oriented edges that captures all the causal relations we have discovered so far, using I. Before any interventions happened E(D) captures the initially known causal directions. It is known that EI(D) is a chain graph with chordal chain components. Therefore when all the directed edges are removed, the graph becomes a set of disjoint chordal graphs. 2.3 Problem Definition We are interested in the following question: Problem 1. Given that all interventions in I are of size at most k < n/2 variables, i.e., for each intervention I, |I| k, 8I 2 I, minimize the number of interventions |I| such that the partially directed graph with all directions learned so far EI(D) = D. The question is the design of an algorithm that computes the small set of interventions I given E(D). Note, of course, that the unknown directions of the edges D are not available to the algorithm. One can view the design of I as an active learning process to find D from the essential graph E(D). E(D) is a chain graph with undirected chordal components and it is known that interventions on one chain components do not affect the discovery process of directed edges in the other components [15]. So we will assume that E(D) is undirected and a chordal graph to start with. Our notion of algorithm does not consider the time complexity (of statistical algorithms involved) of steps a and b in (1). Given m interventions, we only consider efficiently computing Im+1 using (possibly) the graph E{I1,...Im}. We consider the following three classes of algorithms: 1. Non-adaptive algorithm: The choice of I is fixed prior to the discovery process. 2. Adaptive algorithm: At every step m, the choice of Im+1 is a deterministic function of E{I1,...Im}(D). 3. Randomized adaptive algorithm: At every step m, the choice of Im+1 is a random function of E{I1,...Im}(D). The problem is different for complete graphs versus more general chordal graphs since rule R1 becomes applicable when the graph is not complete. Thus we give a separate treatment for each case. First, we provide algorithms for all three cases for learning the directions of complete graphs E(D) = Kn (undirected complete graph) on n vertices. Then, we generalize to chordal graph skeletons and provide a novel adaptive algorithm with upper and lower bounds on its performance. The missing proofs of the results that follow can be found in the Appendix. 3 Complete Graphs In this section, we consider the case where the skeleton we start with, i.e. E(D), is an undirected complete graph (denoted Kn). It is known that at any stage in (1) starting from E(D), rules R1, R3 and R4 do not apply. Further, the underlying DAG D is a directed clique. The directed clique is characterized by an ordering σ on [1 : n] such that, in the subgraph induced by σ(i), σ(i + 1) . . . σ(n), σ(i) has no incoming edges. Let D be denoted by ~Kn(σ) for some ordering σ. Let [1 : n] denote the set {1, 2 . . . n}. We need the following results on a separating system for our first result regarding adaptive and non-adaptive algorithms for a complete graph. 4 3.1 Separating System Definition 1. [16, 17] An (n, k)-separating system on an n element set [1 : n] is a set of subsets S = {S1, S2 . . . Sm} such that |Si| k and for every pair i, j there is a subset S 2 S such that either i 2 S, j /2 S or j 2 S, i /2 S. If a pair i, j satisfies the above condition with respect to S, then S is said to separate the pair i, j. Here, we consider the case when k < n/2 In [16], Katona gave an (n, k)-separating system together with a lower bound on |S|. In [17], Wegener gave a simpler argument for the lower bound and also provided a tighter upper bound than the one in [16]. In this work, we give a different construction below where the separating system size is at mostdlogdn/ke ne larger than the construction of Wegener. However, our construction has a simpler description. Lemma 1. There is a labeling procedure that produces distinct ` length labels for all elements in [1 : n] using letters from the integer alphabet {0, 1 . . . a} where ` = dloga ne. Further, in every digit (or position), any integer letter is used at most dn/ae times. Once we have a set of n string labels as in Lemma 1, our separating system construction is straightforward. Theorem 1. Consider an alphabet A = [0 : d n k e] of size d n k e + 1 where k < n/2. Label every element of an n element set using a distinct string of letters from A of length ` = dlogd n k e ne using the procedure in Lemma 1 with a = d n k e. For every 1 i ` and 1 j d n k e, choose the subset Si,j of vertices whose string’s i-th letter is j. The set of all such subsets S = {Si,j} is a k-separating system on n elements and |S| (d n k e)dlogd n k e ne. 3.2 Adaptive algorithms: Equivalence to a Separating System Consider any non-adaptive algorithm that designs a set of interventions I, each of size at most k, to discover ~Kn(σ). I has to be a separating system in the worst case over all σ. This is already known. Now, we prove the necessity of a separating system for deterministic adaptive algorithms in the worst case. Theorem 2. Let there be an adaptive deterministic algorithm A that designs the set of interventions I such that the final graph learnt EI(D) = ~Kn(σ) for any ground truth ordering σ starting from the initial skeleton E(D) = Kn. Then, there exists a σ such that A designs an I which is a separating system. The theorem above is independent of the individual intervention sizes. Therefore, we have the following theorem, which is a direct corollary of Theorem 2: Theorem 3. In the worst case over σ, any adaptive or a non-adaptive deterministic algorithm on the DAG ~Kn(σ) has to be such that n k log ne k n |I|. There is a feasible I with |I| d( n k e − 1)dlogd n k e ne Proof. By Theorem 2, we need a separating system in the worst case and the lower and upper bounds are from [16,17]. 3.3 Randomized Adaptive Algorithms In this section, we show that that total number of variable accesses to fully identify the complete causal DAG is ⌦(n). Theorem 4. To fully identify a complete causal DAG ~Kn(σ) on n variables using size-k interventions, n 2k interventions are necessary. Also, the total number of variables accessed is at least n 2 . The lower bound in Theorem 4 is information theoretic. We now give a randomized algorithm that requires O( n k log log k) experiments in expectation. We provide a straightforward generalization of [5], where the authors gave a randomized algorithm for unbounded intervention size. Theorem 5. Let E(D) be Kn and the experiment size k = nr for some 0 < r < 1. Then there exists a randomized adaptive algorithm which designs an I such that EI(D) = D with probability polynomial in n, and |I| = O( n k log log(k)) in expectation. 5 4 General Chordal Graphs In this section, we turn to interventions on a general DAG G. After the initial stages in (1), E(G) is a chain graph with chordal chain components. There are no further immoralities throughout the graph. In this work, we focus on one of the chordal chain components. Thus the DAG D we work on is assumed to be a directed graph with no immoralities and whose skeleton E(D) is chordal. We are interested in recovering D from E(D) using interventions of size at most k following (1). 4.1 Bounds for Chordal skeletons We provide a lower bound for both adaptive and non-adaptive deterministic schemes for a chordal skeleton E(D). Let χ (E(D)) be the coloring number of the given chordal graph. Since, chordal graphs are perfect, it is the same as the clique number. Theorem 6. Given a chordal E(D), in the worst case over all DAGs D (which has skeleton E(D) and no immoralities), if every intervention is of size at most k, then |I| ≥ χ(E(D)) k log χ(E(D))e k χ (E(D)) for any adaptive and non-adaptive algorithm with EI(D) = D. Upper bound: Clearly, the separating system based algorithm of Section 3 can be applied to the vertices in the chordal skeleton E(D) and it is possible to find all the directions. Thus, |I| n k logd n k e n ↵(E(D))χ(E(D)) k logd n k e n. This with the lower bound implies an ↵approximation algorithm (since logd n k e n log χ(E(D))e k χ (E(D)) , under a mild assumption χ(E(D)) n e ). Remark: The separating system on n nodes gives an ↵approximation. However, the new algorithm in Section 4.3 exploits chordality and performs much better empirically. It is possible to show that our heuristic also has an ↵approximation guarantee but we skip that. 4.2 Two extreme counter examples We provide two classes of chordal skeletons G: One for which the number of interventions close to the lower bound is sufficient and the other for which the number of interventions needed is very close to the upper bound. Theorem 7. There exists chordal skeletons such that for any algorithm with intervention size constraint k, the number of interventions |I| required is at least ↵(χ−1) 2k where ↵and χ are the independence number and chromatic numbers respectively. There exists chordal graph classes such that |I| = d χ k edlogd χ k e χe is sufficient. 4.3 An Improved Algorithm using Meek Rules In this section, we design an adaptive deterministic algorithm that anticipates Meek rule R1 usage along with the idea of a separating system. We evaluate this experimentally on random chordal graphs. First, we make a few observations on learning connected directed trees T from the skeleton E(T) (undirected trees are chordal) that do not have immoralities using Meek rule R1 where every intervention is of size k = 1. Because the tree has no cycle, Meek rules R2-R4 do not apply. Lemma 2. Every node in a directed tree with no immoralities has at most one incoming edge. There is a root node with no incoming edges and intervening on that node alone identifies the whole tree using repeated application of rule R1. Lemma 3. If every intervention in I is of size at most 1, learning all directions on a directed tree T with no immoralities can be done adaptively with at most |I| O(log2 n) where n is the number of vertices in the tree. The algorithm runs in time poly(n). Lemma 4. Given any chordal graph and a valid coloring, the graph induced by any two color classes is a forest. In the next section, we combine the above single intervention adaptive algorithm on directed trees which uses Meek rules, with that of the non-adaptive separating system approach. 6 4.3.1 Description of the algorithm The key motivation behind the algorithm is that, a pair of color classes is a forest (Lemma 4). Choosing the right node to intervene leaves only a small subtree unlearnt as in the proof of Lemma 3. In subsequent steps, suitable nodes in the remaining subtrees could be chosen until all edges are learnt. We give a brief description of the algorithm below. Let G denote the initial undirected chordal skeleton E(D) and let χ be its coloring number. Consider a (χ, k) separating system S = {Si}. To intervene on the actual graph, an intervention set Ii corresponding to Si is chosen. We would like to intervene on a node of color c 2 Si. Consider a node v of color c. Now, we attach a score P(v, c) as follows. For any color c0 /2 Si, consider the induced forest F(c, c0) on the color classes c and c0 in G. Consider the tree T(v, c, c0) containing node v in F. Let d(v) be the degree of v in T. Let T1, T2, . . . Td(v) be the resulting disjoint trees after node v is removed from T. If v is intervened on, according to the proof of Lemma 3: a) All edge directions in all trees Ti except one of them would be learnt when applying Meek Rules and rule R0. b) All the directions from v to all its neighbors would be found. The score is taken to be the total number of edge directions guaranteed to be learnt in the worst case. Therefore, the score P(v) is: P(v) = P c0:|c,c0 T|=1 ✓ |T(c, c0)| − max 1jd(v)|Tj| ◆ . The node with the highest score among the color class c is used for the intervention Ii. After intervening on Ii, all the edges whose directions are known through Meek Rules (by repeated application till nothing more can be learnt) and R0 are deleted from G. Once S is processed, we recolor the sparser graph G. We find a new S with the new chromatic number on G and the above procedure is repeated. The exact hybrid algorithm is described in Algorithm 1. Theorem 8. Given an undirected choral skeleton G of an underlying directed graph with no immoralities, Algorithm 1 ends in finite time and it returns the correct underlying directed graph. The algorithm has runtime complexity polynomial in n. Algorithm 1 Hybrid Algorithm using Meek rules with separating system 1: Input: Chordal Graph skeleton G = (V, E) with no Immoralities. 2: Initialize ~G(V, Ed = ;) with n nodes and no directed edges. Initialize time t = 1. 3: while E 6= ; do 4: Color the chordal graph G with χ colors. . Standard algorithms exist to do it in linear time 5: Initialize color set C = {1, 2 . . . χ}. Form a (χ, min(k, dχ/2e)) separating system S such that |S| k, 8S 2 S. 6: for i = 1 until |S| do 7: Initialize Intervention It = ;. 8: for c 2 Si and every node v in color class c do 9: Consider F(c, c0), T(c, c0, v) and {Tj}d(i) 1 (as per definitions in Sec. 4.3.1). 10: Compute: P(v, c) = P c02C T Sc i |T(c, c0, v)| − max 1jd(i)|Tj|. 11: end for 12: if k χ/2 then 13: It = It S c2Si { argmax v:P (v,c)6=0 P(v, c)}. 14: else 15: It = It [c2Si{First k dχ/2e nodes v with largest nonzero P(v, c)}. 16: end if 17: t = t + 1 18: Apply R0 and Meek rules using Ed and E after intervention It. Add newly learnt directed edges to Ed and delete them from E. 19: end for 20: Remove all nodes which have degree 0 in G. 21: end while 22: return ~G. 7 5 Simulations 20 40 60 80 100 120 0 20 40 60 80 100 120 140 160 180 200 Chromatic Number, χ Number of Experiments Information Theoretic LB Max. Clique Sep. Sys. Entropic LB Max. Clique Sep. Sys. Achievable LB Our Construction Clique Sep. Sys. LB Our Heuristic Algorithm Naive (n,k) Sep. Sys. based Algorithm Seperating System UB (a) n = 1000, k = 10 20 40 60 80 100 120 0 50 100 150 200 250 300 350 400 Chromatic Number, χ Number of Experiments Information Theoretic LB Max. Clique Sep. Sys. Entropic LB Max. Clique Sep. Sys. Achievable LB Our Construction Clique Sep. Sys. LB Our Heuristic Algorithm Naive (n,k) Sep. Sys. based Algorithm Seperating System UB (b) n = 2000, k = 10 Figure 1: n: no. of vertices, k: Intervention size bound. The number of experiments is compared between our heuristic and the naive algorithm based on the (n, k) separating system on random chordal graphs. The red markers represent the sizes of (χ, k) separating system. Green circle markers and the cyan square markers for the same χ value correspond to the number of experiments required by our heuristic and the algorithm based on an (n, k) separating system(Theorem 1), respectively, on the same set of chordal graphs. Note that, when n = 1000 and n = 2000, the naive algorithm requires on average about 130 and 260 (close to n/k) experiments respectively, while our algorithm requires at most ⇠40 (orderwise close to χ/k = 10) when χ = 100. We simulate our new heuristic, namely Algorithm 1, on randomly generated chordal graphs and compare it with a naive algorithm that follows the intervention sets given by our (n, k) separating system as in Theorem 1. Both algorithms apply R0 and Meek rules after each intervention according to (1). We plot the following lower bounds: a) Information Theoretic LB of χ 2k b) Max. Clique Sep. Sys. Entropic LB which is the chromatic number based lower bound of Theorem 6. Moreover, we use two known (χ, k) separating system constructions for the maximum clique size as “references”: The best known (χ, k) separating system is shown by the label Max. Clique Sep. Sys. Achievable LB and our new simpler separating system construction (Theorem 1) is shown by Our Construction Clique Sep. Sys. LB. As an upper bound, we use the size of the best known (n, k) separating system (without any Meek rules) and is denoted Separating System UB. Random generation of chordal graphs: Start with a random ordering σ on the vertices. Consider every vertex starting from σ(n). For each vertex i, (j, i) 2 E with probability inversely proportional to σ(i) for every j 2 Si where Si = {v : σ−1(v) < σ−1(i)}. The proportionality constant is changed to adjust sparsity of the graph. After all such j are considered, make Si \ ne(i) a clique by adding edges respecting the ordering σ, where ne(i) is the neighborhood of i. The resultant graph is a DAG and the corresponding skeleton is chordal. Also, σ is a perfect elimination ordering. Results: We are interested in comparing our algorithm and the naive one which depends on the (n, k) separating system to the size of the (χ, k) separating system. The size of the (χ, k) separating system is roughly ˜O(χ/k). Consider values around χ = 100 on the x-axis for the plots with n = 1000, k = 10 and n = 2000, k = 10. Note that, our algorithm performs very close to the size of the (χ, k) separating system, i.e. ˜O(χ/k). In fact, it is always < 40 in both cases while the average performance of naive algorithm goes from 130 (close to n/k = 100) to 260 (close to n/k = 200). The result points to this: For random chordal graphs, the structured tree search allows us to learn the edges in a number of experiments quite close to the lower bound based only on the maximum clique size and not n. The plots for (n, k) = (500, 10) and (n, k) = (2000, 20) are given in Appendix. Acknowledgments Authors acknowledge the support from grants: NSF CCF 1344179, 1344364, 1407278, 1422549 and a ARO YIP award (W911NF-14-1-0258). We also thank Frederick Eberhardt for helpful discussions. 8 References [1] J. Pearl, Causality: Models, Reasoning and Inference. Cambridge University Press, 2009. [2] A. Hauser and P. B¨uhlmann, “Two optimal strategies for active learning of causal models from interventional data,” International Journal of Approximate Reasoning, vol. 55, no. 4, pp. 926– 939, 2014. [3] F. Eberhardt, C. Glymour, and R. Scheines, “On the number of experiments sufficient and in the worst case necessary to identify all causal relations among n variables,” in Proceedings of the 21st Conference on Uncertainty in Artificial Intelligence (UAI), pp. 178–184. [4] A. Hyttinen, F. Eberhardt, and P. Hoyer, “Experiment selection for causal discovery,” Journal of Machine Learning Research, vol. 14, pp. 3041–3071, 2013. [5] H. Hu, Z. Li, and A. Vetta, “Randomized experimental design for causal graph discovery,” in Proceedings of NIPS 2014, Montreal, CA, December 2014. [6] S. Shimizu, P. O. Hoyer, A. Hyvarinen, and A. J. Kerminen, “A linear non-gaussian acyclic model for causal discovery,” Journal of Machine Learning Research, vol. 7, pp. 2003–2030, 2006. [7] P. O. Hoyer, D. Janzing, J. Mooij, J. Peters, and B. Sch¨olkopf, “Nonlinear causal discovery with additive noise models,” in Proceedings of NIPS 2008, 2008. [8] F. Eberhardt, Causation and Intervention (Ph.D. Thesis), 2007. [9] P. Spirtes, C. Glymour, and R. Scheines, Causation, Prediction, and Search. A Bradford Book, 2001. [10] C. Meek, “Strong completeness and faithfulness in bayesian networks,” in Proceedings of the eleventh international conference on uncertainty in artificial intelligence, 1995. [11] S. A. Andersson, D. Madigan, and M. D. Perlman, “A characterization of markov equivalence classes for acyclic digraphs,” The Annals of Statistics, vol. 25, no. 2, pp. 505–541, 1997. [12] T. Verma and J. Pearl, “An algorithm for deciding if a set of observed independencies has a causal explanation,” in Proceedings of the Eighth international conference on uncertainty in artificial intelligence, 1992. [13] C. Meek, “Causal inference and causal explanation with background knowledge,” in Proceedings of the eleventh international conference on uncertainty in artificial intelligence, 1995. [14] A. Hauser and P. B¨uhlmann, “Characterization and greedy learning of interventional markov equivalence classes of directed acyclic graphs,” Journal of Machine Learning Research, vol. 13, no. 1, pp. 2409–2464, 2012. [15] ——, “Two optimal strategies for active learning of causal networks from interventional data,” in Proceedings of Sixth European Workshop on Probabilistic Graphical Models, 2012. [16] G. Katona, “On separating systems of a finite set,” Journal of Combinatorial Theory, vol. 1(2), pp. 174–194, 1966. [17] I. Wegener, “On separating systems whose elements are sets of at most k elements,” Discrete Mathematics, vol. 28(2), pp. 219–222, 1979. [18] R. J. Lipton and R. E. Tarjan, “A separator theorem for planar graphs,” SIAM Journal on Applied Mathematics, vol. 36, no. 2, pp. 177–189, 1979. 9 | 2015 | 287 |
5,799 | Learning to Transduce with Unbounded Memory Edward Grefenstette Google DeepMind etg@google.com Karl Moritz Hermann Google DeepMind kmh@google.com Mustafa Suleyman Google DeepMind mustafasul@google.com Phil Blunsom Google DeepMind and Oxford University pblunsom@google.com Abstract Recently, strong results have been demonstrated by Deep Recurrent Neural Networks on natural language transduction problems. In this paper we explore the representational power of these models using synthetic grammars designed to exhibit phenomena similar to those found in real transduction problems such as machine translation. These experiments lead us to propose new memory-based recurrent networks that implement continuously differentiable analogues of traditional data structures such as Stacks, Queues, and DeQues. We show that these architectures exhibit superior generalisation performance to Deep RNNs and are often able to learn the underlying generating algorithms in our transduction experiments. 1 Introduction Recurrent neural networks (RNNs) offer a compelling tool for processing natural language input in a straightforward sequential manner. Many natural language processing (NLP) tasks can be viewed as transduction problems, that is learning to convert one string into another. Machine translation is a prototypical example of transduction and recent results indicate that Deep RNNs have the ability to encode long source strings and produce coherent translations [1, 2]. While elegant, the application of RNNs to transduction tasks requires hidden layers large enough to store representations of the longest strings likely to be encountered, implying wastage on shorter strings and a strong dependency between the number of parameters in the model and its memory. In this paper we use a number of linguistically-inspired synthetic transduction tasks to explore the ability of RNNs to learn long-range reorderings and substitutions. Further, inspired by prior work on neural network implementations of stack data structures [3], we propose and evaluate transduction models based on Neural Stacks, Queues, and DeQues (double ended queues). Stack algorithms are well-suited to processing the hierarchical structures observed in natural language and we hypothesise that their neural analogues will provide an effective and learnable transduction tool. Our models provide a middle ground between simple RNNs and the recently proposed Neural Turing Machine (NTM) [4] which implements a powerful random access memory with read and write operations. Neural Stacks, Queues, and DeQues also provide a logically unbounded memory while permitting efficient constant time push and pop operations. Our results indicate that the models proposed in this work, and in particular the Neural DeQue, are able to consistently learn a range of challenging transductions. While Deep RNNs based on long short-term memory (LSTM) cells [1, 5] can learn some transductions when tested on inputs of the same length as seen in training, they fail to consistently generalise to longer strings. In contrast, our sequential memory-based algorithms are able to learn to reproduce the generating transduction algorithms, often generalising perfectly to inputs well beyond those encountered in training. 1 2 Related Work String transduction is central to many applications in NLP, from name transliteration and spelling correction, to inflectional morphology and machine translation. The most common approach leverages symbolic finite state transducers [6, 7], with approaches based on context free representations also being popular [8]. RNNs offer an attractive alternative to symbolic transducers due to their simple algorithms and expressive representations [9]. However, as we show in this work, such models are limited in their ability to generalise beyond their training data and have a memory capacity that scales with the number of their trainable parameters. Previous work has touched on the topic of rendering discrete data structures such as stacks continuous, especially within the context of modelling pushdown automata with neural networks [10, 11, 3]. We were inspired by the continuous pop and push operations of these architectures and the idea of an RNN controlling the data structure when developing our own models. The key difference is that our work adapts these operations to work within a recurrent continuous Stack/Queue/DeQue-like structure, the dynamics of which are fully decoupled from those of the RNN controlling it. In our models, the backwards dynamics are easily analysable in order to obtain the exact partial derivatives for use in error propagation, rather than having to approximate them as done in previous work. In a parallel effort to ours, researchers are exploring the addition of memory to recurrent networks. The NTM and Memory Networks [4, 12, 13] provide powerful random access memory operations, whereas we focus on a more efficient and restricted class of models which we believe are sufficient for natural language transduction tasks. More closely related to our work, [14] have sought to develop a continuous stack controlled by an RNN. Note that this model—unlike the work proposed here—renders discrete push and pop operations continuous by “mixing” information across levels of the stack at each time step according to scalar push/pop action values. This means the model ends up compressing information in the stack, thereby limiting its use, as it effectively loses the unbounded memory nature of traditional symbolic models. 3 Models In this section, we present an extensible memory enhancement to recurrent layers which can be set up to act as a continuous version of a classical Stack, Queue, or DeQue (double-ended queue). We begin by describing the operations and dynamics of a neural Stack, before showing how to modify it to act as a Queue, and extend it to act as a DeQue. 3.1 Neural Stack Let a Neural Stack be a differentiable structure onto and from which continuous vectors are pushed and popped. Inspired by the neural pushdown automaton of [3], we render these traditionally discrete operations continuous by letting push and pop operations be real values in the interval (0, 1). Intuitively, we can interpret these values as the degree of certainty with which some controller wishes to push a vector v onto the stack, or pop the top of the stack. Vt[i] = ⇢ Vt−1[i] if 1 i < t vt if i = t (Note that Vt[i] = vi for all i t) (1) st[i] = 8 < : max(0, st−1[i] −max(0, ut − t−1 P j=i+1 st−1[j])) if 1 i < t dt if i = t (2) rt = t X i=1 (min(st[i], max(0, 1 − t X j=i+1 st[j]))) · Vt[i] (3) Formally, a Neural Stack, fully parametrised by an embedding size m, is described at some timestep t by a t ⇥m value matrix Vt and a strength vector st 2 Rt. These form the core of a recurrent layer which is acted upon by a controller by receiving, from the controller, a value vt 2 Rm, a pop signal ut 2 (0, 1), and a push signal dt 2 (0, 1). It outputs a read vector rt 2 Rm. The recurrence of this 2 layer comes from the fact that it will receive as previous state of the stack the pair (Vt−1, st−1), and produce as next state the pair (Vt, st) following the dynamics described below. Here, Vt[i] represents the ith row (an m-dimensional vector) of Vt and st[i] represents the ith value of st. Equation 1 shows the update of the value component of the recurrent layer state represented as a matrix, the number of rows of which grows with time, maintaining a record of the values pushed to the stack at each timestep (whether or not they are still logically on the stack). Values are appended to the bottom of the matrix (top of the stack) and never changed. Equation 2 shows the effect of the push and pop signal in updating the strength vector st−1 to produce st. First, the pop operation removes objects from the stack. We can think of the pop value ut as the initial deletion quantity for the operation. We traverse the strength vector st−1 from the highest index to the lowest. If the next strength scalar is less than the remaining deletion quantity, it is subtracted from the remaining quantity and its value is set to 0. If the remaining deletion quantity is less than the next strength scalar, the remaining deletion quantity is subtracted from that scalar and deletion stops. Next, the push value is set as the strength for the value added in the current timestep. Equation 3 shows the dynamics of the read operation, which are similar to the pop operation. A fixed initial read quantity of 1 is set at the top of a temporary copy of the strength vector st which is traversed from the highest index to the lowest. If the next strength scalar is smaller than the remaining read quantity, its value is preserved for this operation and subtracted from the remaining read quantity. If not, it is temporarily set to the remaining read quantity, and the strength scalars of all lower indices are temporarily set to 0. The output rt of the read operation is the weighted sum of the rows of Vt, scaled by the temporary scalar values created during the traversal. An example of the stack read calculations across three timesteps, after pushes and pops as described above, is illustrated in Figure 1a. The third step shows how setting the strength s3[2] to 0 for V3[2] logically removes v2 from the stack, and how it is ignored during the read. This completes the description of the forward dynamics of a neural Stack, cast as a recurrent layer, as illustrated in Figure 1b. All operations described in this section are differentiable1. The equations describing the backwards dynamics are provided in Appendix A of the supplementary materials. v1 0.8 v1 0.7 v2 0.5 v1 0.3 v2 0 v3 0.9 r1 = 0.8 ∙ v1 r2 = 0.5 ∙ v2 + 0.5 ∙ v1 r3 = 0.9 ∙ v3 + 0 ∙ v2 + 0.1 ∙ v1 t = 1 u1 = 0 d1 = 0.8 t = 2 u2 = 0.1 d2 = 0.5 t = 3 u3 = 0.9 d3 = 0.9 row 1 row 2 row 3 stack grows upwards v2 removed from stack (a) Example Operation of a Continuous Neural Stack pop (ut) prev. strengths (st-1) value (vt) previous state push (dt) prev. values (Vt-1) next values (Vt) next strengths (st) next state output (rt) Neural Stack input Split Join (b) Neural Stack as a Recurrent Layer (it, rt-1) previous state input next state output Vt Vt-1 (Vt, st) st (Vt-1, st-1) rt-1 ht-1 ht (ot, …) ot … dt ut vt it st-1 rt R N N Ht-1 Ht ot Neural Stack (c) RNN Controlling a Stack Figure 1: Illustrating a Neural Stack’s Operations, Recurrent Structure, and Control 3.2 Neural Queue A neural Queue operates the same way as a neural Stack, with the exception that the pop operation reads the lowest index of the strength vector st, rather than the highest. This represents popping and 1The max(x, y) and min(x, y) functions are technically not differentiable for x = y. Following the work on rectified linear units [15], we arbitrarily take the partial differentiation of the left argument in these cases. 3 reading from the front of the Queue rather than the top of the stack. These operations are described in Equations 4–5. st[i] = 8 < : max(0, st−1[i] −max(0, ut − i−1 P j=1 st−1[j])) if 1 i < t dt if i = t (4) rt = t X i=1 (min(st[i], max(0, 1 − i−1 X j=1 st[j]))) · Vt[i] (5) 3.3 Neural DeQue A neural DeQue operates likes a neural Stack, except it takes a push, pop, and value as input for both “ends” of the structure (which we call top and bot), and outputs a read for both ends. We write utop t and ubot t instead of ut, vtop t and vbot t instead of vt, and so on. The state, Vt and st are now a 2t ⇥m-dimensional matrix and a 2t-dimensional vector, respectively. At each timestep, a pop from the top is followed by a pop from the bottom of the DeQue, followed by the pushes and reads. The dynamics of a DeQue, which unlike a neural Stack or Queue “grows” in two directions, are described in Equations 6–11, below. Equations 7–9 decompose the strength vector update into three steps purely for notational clarity. Vt[i] = 8 < : vbot t if i = 1 vtop t if i = 2t Vt−1[i −1] if 1 < i < 2t (6) stop t [i] = max(0, st−1[i] −max(0, utop t − 2(t−1)−1 X j=i+1 st−1[j])) if 1 i < 2(t −1) (7) sboth t [i] = max(0, stop t [i] −max(0, ubot t − i−1 X j=1 stop t [j])) if 1 i < 2(t −1) (8) st[i] = 8 < : sboth t [i −1] if 1 < i < 2t dbot t if i = 1 dtop t if i = 2t (9) rtop t = 2t X i=1 (min(st[i], max(0, 1 − 2t X j=i+1 st[j]))) · Vt[i] (10) rbot t = 2t X i=1 (min(st[i], max(0, 1 − i−1 X j=1 st[j]))) · Vt[i] (11) To summarise, a neural DeQue acts like two neural Stacks operated on in tandem, except that the pushes and pops from one end may eventually affect pops and reads on the other, and vice versa. 3.4 Interaction with a Controller While the three memory modules described can be seen as recurrent layers, with the operations being used to produce the next state and output from the input and previous state being fully differentiable, they contain no tunable parameters to optimise during training. As such, they need to be attached to a controller in order to be used for any practical purposes. In exchange, they offer an extensible memory, the logical size of which is unbounded and decoupled from both the nature and parameters of the controller, and from the size of the problem they are applied to. Here, we describe how any RNN controller may be enhanced by a neural Stack, Queue or DeQue. We begin by giving the case where the memory is a neural Stack, as illustrated in Figure 1c. Here we wish to replicate the overall ‘interface’ of a recurrent layer—as seen from outside the dotted 4 lines—which takes the previous recurrent state Ht−1 and an input vector it, and transforms them to return the next recurrent state Ht and an output vector ot. In our setup, the previous state Ht−1 of the recurrent layer will be the tuple (ht−1, rt−1, (Vt−1, st−1)), where ht−1 is the previous state of the RNN, rt−1 is the previous stack read, and (Vt−1, st−1) is the previous state of the stack as described above. With the exception of h0, which is initialised randomly and optimised during training, all other initial states, r0 and (V0, s0), are set to 0-valued vectors/matrices and not updated during training. The overall input it is concatenated with previous read rt−1 and passed to the RNN controller as input along with the previous controller state ht−1. The controller outputs its next state ht and a controller output o0 t, from which we obtain the push and pop scalars dt and ut and the value vector vt, which are passed to the stack, as well as the network output ot: dt = sigmoid(Wdo0 t + bd) ut = sigmoid(Wuo0 t + bu) vt = tanh(Wvo0 t + bv) ot = tanh(Woo0 t + bo) where Wd and Wu are vector-to-scalar projection matrices, and bd and bu are their scalar biases; Wv and Wo are vector-to-vector projections, and bd and bu are their vector biases, all randomly intialised and then tuned during training. Along with the previous stack state (Vt−1, st−1), the stack operations dt and ut and the value vt are passed to the neural stack to obtain the next read rt and next stack state (Vt, st), which are packed into a tuple with the controller state ht to form the next state Ht of the overall recurrent layer. The output vector ot serves as the overall output of the recurrent layer. The structure described here can be adapted to control a neural Queue instead of a stack by substituting one memory module for the other. The only additional trainable parameters in either configuration, relative to a non-enhanced RNN, are the projections for the input concatenated with the previous read into the RNN controller, and the projections from the controller output into the various Stack/Queue inputs, described above. In the case of a DeQue, both the top read rtop and bottom read rbot must be preserved in the overall state. They are both concatenated with the input to form the input to the RNN controller. The output of the controller must have additional projections to output push/pop operations and values for the bottom of the DeQue. This roughly doubles the number of additional tunable parameters “wrapping” the RNN controller, compared to the Stack/Queue case. 4 Experiments In every experiment, integer-encoded source and target sequence pairs are presented to the candidate model as a batch of single joint sequences. The joint sequence starts with a start-of-sequence (SOS) symbol, and ends with an end-of-sequence (EOS) symbol, with a separator symbol separating the source and target sequences. Integer-encoded symbols are converted to 64-dimensional embeddings via an embedding matrix, which is randomly initialised and tuned during training. Separate wordto-index mappings are used for source and target vocabularies. Separate embedding matrices are used to encode input and output (predicted) embeddings. 4.1 Synthetic Transduction Tasks The aim of each of the following tasks is to read an input sequence, and generate as target sequence a transformed version of the source sequence, followed by an EOS symbol. Source sequences are randomly generated from a vocabulary of 128 meaningless symbols. The length of each training source sequence is uniformly sampled from unif {8, 64}, and each symbol in the sequence is drawn with replacement from a uniform distribution over the source vocabulary (ignoring SOS, and separator). A deterministic task-specific transformation, described for each task below, is applied to the source sequence to yield the target sequence. As the training sequences are entirely determined by the source sequence, there are close to 10135 training sequences for each task, and training examples are sampled from this space due to the random generation of source sequences. The following steps are followed before each training and test sequence are presented to the models, the SOS symbol (hsi) is prepended to the source sequence, which is concatenated with a separator symbol (|||) and the target sequences, to which the EOS symbol (h/si) is appended. 5 Sequence Copying The source sequence is copied to form the target sequence. Sequences have the form: hsia1 . . . ak|||a1 . . . akh/si Sequence Reversal The source sequence is deterministically reversed to produce the target sequence. Sequences have the form: hsia1a2 . . . ak|||ak . . . a2a1h/si Bigram flipping The source side is restricted to even-length sequences. The target is produced by swapping, for all odd source sequence indices i 2 [1, |seq|] ^ odd(i), the ith symbol with the (i + 1)th symbol. Sequences have the form: hsia1a2a3a4 . . . ak−1ak|||a2a1a4a3 . . . akak−1h/si 4.2 ITG Transduction Tasks The following tasks examine how well models can approach sequence transduction problems where the source and target sequence are jointly generated by Inversion Transduction Grammars (ITG) [8], a subclass of Synchronous Context-Free Grammars [16] often used in machine translation [17]. We present two simple ITG-based datasets with interesting linguistic properties and their underlying grammars. We show these grammars in Table 1, in Appendix C of the supplementary materials. For each synchronised non-terminal, an expansion is chosen according to the probability distribution specified by the rule probability p at the beginning of each rule. For each grammar, ‘A’ is always the root of the ITG tree. We tuned the generative probabilities for recursive rules by hand so that the grammars generate left and right sequences of lengths 8 to 128 with relatively uniform distribution. We generate training data by rejecting samples that are outside of the range [8, 64], and testing data by rejecting samples outside of the range [65, 128]. For terminal symbol-generating rules, we balance the classes so that for k terminal-generating symbols in the grammar, each terminal-generating non-terminal ‘X’ generates a vocabulary of approximately 128/k, and each each vocabulary word under that class is equiprobable. These design choices were made to maximise the similarity between the experimental settings of the ITG tasks described here and the synthetic tasks described above. Subj–Verb–Obj to Subj–Obj–Verb A persistent challenge in machine translation is to learn to faithfully reproduce high-level syntactic divergences between languages. For instance, when translating an English sentence with a non-finite verb into German, a transducer must locate and move the verb over the object to the final position. We simulate this phenomena with a synchronous grammar which generates strings exhibiting verb movements. To add an extra challenge, we also simulate simple relative clause embeddings to test the models’ ability to transduce in the presence of unbounded recursive structures. A sample output of the grammar is presented here, with spaces between words being included for stylistic purposes, and where s, o, and v indicate subject, object, and verb terminals respectively, i and o mark input and output, and rp indicates a relative pronoun: si1 vi28 oi5 oi7 si15 rpi si19 vi16 oi10 oi24 ||| so1 oo5 oo7 so15 rpo so19 vo16 oo10 oo24 vo28 Genderless to gendered grammar We design a small grammar to simulate translations from a language with gender-free articles to one with gender-specific definite and indefinite articles. A real world example of such a translation would be from English (the, a) to German (der/die/das, ein/eine/ein). The grammar simulates sentences in (NP/(V/NP)) or (NP/V ) form, where every noun phrase can become an infinite sequence of nouns joined by a conjunction. Each noun in the source language has a neutral definite or indefinite article. The matching word in the target language then needs to be preceeded by its appropriate article. A sample output of the grammar is presented here, with spaces between words being included for stylistic purposes: we11 the en19 and the em17 ||| wg11 das gn19 und der gm17 6 4.3 Evaluation For each task, test data is generated through the same procedure as training data, with the key difference that the length of the source sequence is sampled from unif {65, 128}. As a result of this change, we not only are assured that the models cannot observe any test sequences during training, but are also measuring how well the sequence transduction capabilities of the evaluated models generalise beyond the sequence lengths observed during training. To control for generalisation ability, we also report accuracy scores on sequences separately sampled from the training set, which given the size of the sample space are unlikely to have ever been observed during actual model training. For each round of testing, we sample 1000 sequences from the appropriate test set. For each sequence, the model reads in the source sequence and separator symbol, and begins generating the next symbol by taking the maximally likely symbol from the softmax distribution over target symbols produced by the model at each step. Based on this process, we give each model a coarse accuracy score, corresponding to the proportion of test sequences correctly predicted from beginning until end (EOS symbol) without error, as well as a fine accuracy score, corresponding to the average proportion of each sequence correctly generated before the first error. Formally, we have: coarse = #correct #seqs fine = 1 #seqs #seqs X i=1 #correcti |targeti| where #correct and #seqs are the number of correctly predicted sequences (end-to-end) and the total number of sequences in the test batch (1000 in this experiment), respectively; #correcti is the number of correctly predicted symbols before the first error in the ith sequence of the test batch, and |targeti| is the length of the target segment that sequence (including EOS symbol). 4.4 Models Compared and Experimental Setup For each task, we use as benchmarks the Deep LSTMs described in [1], with 1, 2, 4, and 8 layers. Against these benchmarks, we evaluate neural Stack-, Queue-, and DeQue-enhanced LSTMs. When running experiments, we trained and tested a version of each model where all LSTMs in each model have a hidden layer size of 256, and one for a hidden layer size of 512. The Stack/Queue/DeQue embedding size was arbitrarily set to 256, half the maximum hidden size. The number of parameters for each model are reported for each architecture in Table 2 of the appendix. Concretely, the neural Stack-, Queue-, and DeQue-enhanced LSTMs have the same number of trainable parameters as a two-layer Deep LSTM. These all come from the extra connections to and from the memory module, which itself has no trainable parameters, regardless of its logical size. Models are trained with minibatch RMSProp [18], with a batch size of 10. We grid-searched learning rates across the set {5⇥10−3, 1⇥10−3, 5⇥10−4, 1⇥10−4, 5⇥10−5}. We used gradient clipping [19], clipping all gradients above 1. Average training perplexity was calculated every 100 batches. Training and test set accuracies were recorded every 1000 batches. 5 Results and Discussion Because of the impossibility of overfitting the datasets, we let the models train an unbounded number of steps, and report results at convergence. We present in Figure 2a the coarse- and fine-grained accuracies, for each task, of the best model of each architecture described in this paper alongside the best performing Deep LSTM benchmark. The best models were automatically selected based on average training perplexity. The LSTM benchmarks performed similarly across the range of random initialisations, so the effect of this procedure is primarily to try and select the better performing Stack/Queue/DeQue-enhanced LSTM. In most cases, this procedure does not yield the actual bestperforming model, and in practice a more sophisticated procedure such as ensembling [20] should produce better results. For all experiments, the Neural Stack or Queue outperforms the Deep LSTM benchmarks, often by a significant margin. For most experiments, if a Neural Stack- or Queue-enhanced LSTM learns to partially or consistently solve the problem, then so does the Neural DeQue. For experiments where the enhanced LSTMs solve the problem completely (consistent accuracy of 1) in training, the accuracy persists in longer sequences in the test set, whereas benchmark accuracies drop for 7 Training Testing Experiment Model Coarse Fine Coarse Fine Sequence Copying 4-layer LSTM 0.98 0.98 0.01 0.50 Stack-LSTM 0.89 0.94 0.00 0.22 Queue-LSTM 1.00 1.00 1.00 1.00 DeQue-LSTM 1.00 1.00 1.00 1.00 Sequence Reversal 8-layer LSTM 0.95 0.98 0.04 0.13 Stack-LSTM 1.00 1.00 1.00 1.00 Queue-LSTM 0.44 0.61 0.00 0.01 DeQue-LSTM 1.00 1.00 1.00 1.00 Bigram Flipping 2-layer LSTM 0.54 0.93 0.02 0.52 Stack-LSTM 0.44 0.90 0.00 0.48 Queue-LSTM 0.55 0.94 0.55 0.98 DeQue-LSTM 0.55 0.94 0.53 0.98 SVO to SOV 8-layer LSTM 0.98 0.99 0.98 0.99 Stack-LSTM 1.00 1.00 1.00 1.00 Queue-LSTM 1.00 1.00 1.00 1.00 DeQue-LSTM 1.00 1.00 1.00 1.00 Gender Conjugation 8-layer LSTM 0.98 0.99 0.99 0.99 Stack-LSTM 0.93 0.97 0.93 0.97 Queue-LSTM 1.00 1.00 1.00 1.00 DeQue-LSTM 1.00 1.00 1.00 1.00 (a) Comparing Enhanced LSTMs to Best Benchmarks (b) Comparison of Model Convergence during Training Figure 2: Results on the transduction tasks and convergence properties all experiments except the SVO to SOV and Gender Conjugation ITG transduction tasks. Across all tasks which the enhanced LSTMs solve, the convergence on the top accuracy happens orders of magnitude earlier for enhanced LSTMs than for benchmark LSTMs, as exemplified in Figure 2b. The results for the sequence inversion and copying tasks serve as unit tests for our models, as the controller mainly needs to learn to push the appropriate number of times and then pop continuously. Nonetheless, the failure of Deep LSTMs to learn such a regular pattern and generalise is itself indicative of the limitations of the benchmarks presented here, and of the relative expressive power of our models. Their ability to generalise perfectly to sequences up to twice as long as those attested during training is also notable, and also attested in the other experiments. Finally, this pair of experiments illustrates how while the neural Queue solves copying and the Stack solves reversal, a simple LSTM controller can learn to operate a DeQue as either structure, and solve both tasks. The results of the Bigram Flipping task for all models are consistent with the failure to consistently correctly generate the last two symbols of the sequence. We hypothesise that both Deep LSTMs and our models economically learn to pairwise flip the sequence tokens, and attempt to do so half the time when reaching the EOS token. For the two ITG tasks, the success of Deep LSTM benchmarks relative to their performance in other tasks can be explained by their ability to exploit short local dependencies dominating the longer dependencies in these particular grammars. Overall, the rapid convergence, where possible, on a general solution to a transduction problem in a manner which propagates to longer sequences without loss of accuracy is indicative that an unbounded memory-enhanced controller can learn to solve these problems procedurally, rather than memorising the underlying distribution of the data. 6 Conclusions The experiments performed in this paper demonstrate that single-layer LSTMs enhanced by an unbounded differentiable memory capable of acting, in the limit, like a classical Stack, Queue, or DeQue, are capable of solving sequence-to-sequence transduction tasks for which Deep LSTMs falter. Even in tasks for which benchmarks obtain high accuracies, the memory-enhanced LSTMs converge earlier, and to higher accuracies, while requiring considerably fewer parameters than all but the simplest of Deep LSTMs. We therefore believe these constitute a crucial addition to our neural network toolbox, and that more complex linguistic transduction tasks such as machine translation or parsing will be rendered more tractable by their inclusion. 8 References [1] Ilya Sutskever, Oriol Vinyals, and Quoc V. V Le. Sequence to sequence learning with neural networks. In Z. Ghahramani, M. Welling, C. Cortes, N.D. Lawrence, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 3104–3112. Curran Associates, Inc., 2014. [2] Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [3] GZ Sun, C Lee Giles, HH Chen, and YC Lee. The neural network pushdown automaton: Model, stack and learning simulations. 1998. [4] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. [5] Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks, volume 385 of Studies in Computational Intelligence. Springer, 2012. [6] Markus Dreyer, Jason R. Smith, and Jason Eisner. Latent-variable modeling of string transductions with finite-state methods. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, EMNLP ’08, pages 1080–1089, Stroudsburg, PA, USA, 2008. Association for Computational Linguistics. [7] Cyril Allauzen, Michael Riley, Johan Schalkwyk, Wojciech Skut, and Mehryar Mohri. OpenFST: A general and efficient weighted finite-state transducer library. In Implementation and Application of Automata, volume 4783 of Lecture Notes in Computer Science, pages 11–23. Springer Berlin Heidelberg, 2007. [8] Dekai Wu. Stochastic inversion transduction grammars and bilingual parsing of parallel corpora. Computational linguistics, 23(3):377–403, 1997. [9] Alex Graves. Sequence transduction with recurrent neural networks. In Representation Learning Worksop, ICML. 2012. [10] Sreerupa Das, C Lee Giles, and Guo-Zheng Sun. Learning context-free grammars: Capabilities and limitations of a recurrent neural network with an external stack memory. In Proceedings of The Fourteenth Annual Conference of Cognitive Science Society. Indiana University, 1992. [11] Sreerupa Das, C Lee Giles, and Guo-Zheng Sun. Using prior knowledge in a {NNPDA} to learn context-free languages. Advances in neural information processing systems, 1993. [12] Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. Weakly supervised memory networks. CoRR, abs/1503.08895, 2015. [13] Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. arXiv preprint arXiv:1505.00521, 2015. [14] Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. arXiv preprint arXiv:1503.01007, 2015. [15] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 807–814, 2010. [16] Alfred V Aho and Jeffrey D Ullman. The theory of parsing, translation, and compiling. Prentice-Hall, Inc., 1972. [17] Dekai Wu and Hongsing Wong. Machine translation with a stochastic grammatical channel. In Proceedings of the 17th international conference on Computational linguistics-Volume 2, pages 1408–1415. Association for Computational Linguistics, 1998. [18] Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4, 2012. [19] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. Understanding the exploding gradient problem. Computing Research Repository (CoRR) abs/1211.5063, 2012. [20] Zhi-Hua Zhou, Jianxin Wu, and Wei Tang. Ensembling neural networks: many could be better than all. Artificial intelligence, 137(1):239–263, 2002. 9 | 2015 | 288 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.