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,800 | Submodular Hamming Metrics Jennifer Gillenwater†, Rishabh Iyer†, Bethany Lusch∗, Rahul Kidambi†, Jeff Bilmes† † University of Washington, Dept. of EE, Seattle, U.S.A. ∗University of Washington, Dept. of Applied Math, Seattle, U.S.A. {jengi, rkiyer, herwaldt, rkidambi, bilmes}@uw.edu Abstract We show that there is a largely unexplored class of functions (positive polymatroids) that can define proper discrete metrics over pairs of binary vectors and that are fairly tractable to optimize over. By exploiting submodularity, we are able to give hardness results and approximation algorithms for optimizing over such metrics. Additionally, we demonstrate empirically the effectiveness of these metrics and associated algorithms on both a metric minimization task (a form of clustering) and also a metric maximization task (generating diverse k-best lists). 1 Introduction A good distance metric is often the key to an effective machine learning algorithm. For instance, when clustering, the distance metric largely defines which points end up in which clusters. Similarly, in large-margin learning, the distance between different labelings can contribute as much to the definition of the margin as the objective function itself. Likewise, when constructing diverse k-best lists, the measure of diversity is key to ensuring meaningful differences between list elements. We consider distance metrics d : {0, 1}n × {0, 1}n →R+ over binary vectors, x ∈{0, 1}n. If we define the set V = {1, . . . , n}, then each x = 1A can seen as the characteristic vector of a set A ⊆V , where 1A(v) = 1 if v ∈A, and 1A(v) = 0 otherwise. For sets A, B ⊆V , with △representing the symmetric difference, A△B ≜(A \ B) ∪(B \ A), the Hamming distance is then: dH(A, B) = |A△B| = Pn i=1 1A△B(i) = Pn i=1 1(1A(i) ̸= 1B(i)). A Hamming distance between two vectors assumes that each entry difference contributes value one. Weighted Hamming distance generalizes this slightly, allowing each entry a unique weight. The Mahalanobis distance further extends this. For many practical applications, however, it is desirable to have entries interact with each other in more complex and higher-order ways than Hamming or Mahalanobis allow. Yet, arbitrary interactions would result in non-metric functions whose optimization would be intractable. In this work, therefore, we consider an alternative class of functions that goes beyond pairwise interactions, yet is computationally feasible, is natural for many applications, and preserves metricity. Given a set function f : 2V →R, we can define a distortion between two binary vectors as follows: df(A, B) = f(A△B). By asking f to satisfy certain properties, we will arrive at a class of discrete metrics that is feasible to optimize and preserves metricity. We say that f is positive if f(A) > 0 whenever A ̸= ∅; f is normalized if f(∅) = 0; f is monotone if f(A) ≤f(B) for all A ⊆B ⊆V ; f is subadditive if f(A) + f(B) ≥f(A ∪B) for all A, B ⊆V ; f is modular if f(A) + f(B) = f(A ∪B) + f(B ∩A) for all A, B ⊆V ; and f is submodular if f(A) + f(B) ≥f(A ∪B) + f(B ∩A) for all A, B ⊆V . If we assume that f is positive, normalized, monotone, and subadditive then df(A, B) is a metric (see Theorem 3.1), but without useful computational properties. If f is positive, normalized, monotone, and modular, then we recover the weighted Hamming distance. In this paper, we assume that f is positive, normalized, monotone, and submodular (and hence also subadditive). These conditions are sufficient to ensure the metricity of df, but allow for a significant generalization over the weighted Hamming distance. Also, thanks to the properties of submodularity, this class yields efficient optimization algorithms with guarantees 1 Table 1: Hardness for SH-min and SH-max. UC stands for unconstrained, and Card stands for cardinality-constrained. The entry “open” implies that the problem is potentially poly-time solvable. SH-min SH-max homogeneous heterogeneous homogeneous heterogeneous UC Open 4/3 3/4 3/4 Card Ω √n 1+(√n−1)(1−κf ) Ω √n 1+(√n−1)(1−κf ) 1 −1/e 1 −1/e Table 2: Approximation guarantees of algorithms for SH-min and SH-max. ’-’ implies that no guarantee holds for the corresponding pair. BEST-B only works for the homogeneous case, while all other algorithms work in both cases. UNION-SPLIT BEST-B MAJOR-MIN RAND-SET UC Card UC Card UC SH-min 2 2 −2/m n 1+(n−1)(1−κf ) SH-max 1/4 1/2e 1/8 for practical machine learning problems. In what follows, we will refer to normalized monotone submodular functions as polymatroid functions; all of our results will be concerned with positive polymatroids. We note here that despite the restrictions described above, the polymatroid class is in fact quite broad; it contains a number of natural choices of diversity and coverage functions, such as set cover, facility location, saturated coverage, and concave-over-modular functions. Given a positive polymatroid function f, we refer to df(A, B) = f(A△B) as a submodular Hamming (SH) distance. We study two optimization problems involving these metrics (each fi is a positive polymatroid, each Bi ⊆V , and C denotes a combinatorial constraint): SH-min: min A∈C m X i=1 fi(A△Bi), and SH-max: max A∈C m X i=1 fi(A△Bi). (1) We will use F as shorthand for the sequence (f1, . . . , fm), B for the sequence (B1, . . . , Bm), and F(A) for the objective function Pm i=1 fi(A△Bi). We will also make a distinction between the homogeneous case where all fi are the same function, and the more general heterogeneous case where each fi may be distinct. In terms of constraints, in this paper’s theory we consider only the unconstrained (C = 2V ) and the cardinality-constrained (e.g., |A| ≥k, |A| ≤k) settings. In general though, C could express more complex concepts such as knapsack constraints, or that solutions must be an independent set of a matroid, or a cut (or spanning tree, path, or matching) in a graph. Intuitively, the SH-min problem can be thought of as a centroid-finding problem; the minimizing A should be as similar to the Bi’s as possible, since a penalty of fi(A△Bi) is paid for each difference. Analogously, the SH-max problem can be thought of as a diversification problem; the maximizing A should be as distinct from all Bi’s as possible, as fi(A△B) is awarded for each difference. Given modular fi (the weighted Hamming distance case), these optimization problems can be solved exactly and efficiently for many constraint types. For the more general case of submodular fi, we establish several hardness results and offer new approximation algorithms, as summarized in Tables 1 and 2. Our main contribution is to provide (to our knowledge), the first systematic study of the properties of submodular Hamming (SH) metrics, by showing metricity, describing potential machine learning applications, and providing optimization algorithms for SH-min and SH-max. The outline of this paper is as follows. In Section 2, we offer further motivation by describing several applications of SH-min and SH-max to machine learning. In Section 3, we prove that for a positive polymatroid function f, the distance df(A, B) = f(A△B) is a metric. Then, in Sections 4 and 5 we give hardness results and approximation algorithms, and in Section 6 we demonstrate the practical advantage that submodular metrics have over modular metrics for several real-world applications. 2 Applications We motivate SH-min and SH-max by showing how they occur naturally in several applications. 2 Clustering: Many clustering algorithms, including for example k-means [1], use distance functions in their optimization. If each item i to be clustered is represented by a binary feature vector bi ∈{0, 1}n, then counting the disagreements between bi and bj is one natural distance function. Defining sets Bi = {v : bi(v) = 1}, this count is equivalent to the Hamming distance |Bi△Bj|. Consider a document clustering application where V is the set of all features (e.g., n-grams) and Bi is the set of features for document i. Hamming distance has value 2 both when Bi△Bj = {“submodular”, “synapse”} and when Bi△Bj = {“submodular”, “modular”}. Intuitively, however, a smaller distance seems warranted in the latter case since the difference is only in one rather than two distinct concepts. The submodular Hamming distances we propose in this work can easily capture this type of behavior. Given feature clusters W, one can define a submodular function as: f(Y ) = P W ∈W p |Y ∩W|. Applying this with Y = Bi△Bj, if the documents’ differences are confined to one cluster, the distance is smaller than if the differences occur across several word clusters. In the case discussed above, the distances are 2 and √ 2. If this submodular Hamming distance is used for k-means clustering, then the mean-finding step becomes an instance of the SHmin problem. That is, if cluster j contains documents Cj, then its mean takes exactly the following SH-min form: µj ∈argminA⊆V P i∈Cj f(A△Bi). Structured prediction: Structured support vector machines (SVMs) typically rely on Hamming distance to compare candidate structures to the true one. The margin required between the correct structure score and a candidate score is then proportional to their Hamming distance. Consider the problem of segmenting an image into foreground and background. Let Bi be image i’s true set of foreground pixels. Then Hamming distance between Bi and a candidate segmentation with foreground pixels A counts the number of mis-labeled pixels. However, both [2] and [3] observe poor performance with Hamming distance and recent work by [4] shows improved performance with richer distances that are supermodular functions of A. One potential direction for further enriching image segmentation distance functions is thus to consider non-modular functions from within our submodular Hamming metrics class. These functions have the ability to correct for the over-penalization that the current distance functions may suffer from when the same kind of difference happens repeatedly. For instance, if Bi differs from A only in the pixels local to a particular block of the image, then current distance functions could be seen as over-estimating the difference. Using a submodular Hamming function, the “loss-augmented inference” step in SVM optimization becomes an SH-max problem. More concretely, if the segmentation model is defined by a submodular graph cut g(A), then we have: maxA⊆V g(A) + f(A△Bi). (Note that g(A) = g(A△∅).) In fact, [5] observes superior results with this type of loss-augmented inference using a special case of a submodular Hamming metric for the task of multi-label image classification. Diverse k-best: For some machine learning tasks, rather than finding a model’s single highestscoring prediction, it is helpful to find a diverse set of high-quality predictions. For instance, [6] showed that for image segmentation and pose tracking a diverse set of k solutions tended to contain a better predictor than the top k highest-scoring solutions. Additionally, finding diverse solutions can be beneficial for accommodating user interaction. For example, consider the task of selecting 10 photos to summarize the 100 photos that a person took while on vacation. If the model’s best prediction (a set of 10 images) is rejected by the user, then the system should probably present a substantially different prediction on its second try. Submodular functions are a natural model for several summarization problems [7, 8]. Thus, given a submodular summarization model g, and a set of existing diverse summaries A1, A2, . . . , Ak−1, one could find a kth summary to present to the user by solving: Ak = argmaxA⊆V,|A|=ℓg(A) + Pk−1 i=1 f(A△Ai). If f and g are both positive polymatroids, then this constitutes an instance of the SH-max problem. 3 Properties of the submodular Hamming metric We next show several interesting properties of the submodular Hamming distance. Proofs for all theorems and lemmas can be found in the supplementary material. We begin by showing that any positive polymatroid function of A△B is a metric. In fact, we show the more general result that any positive normalized monotone subadditive function of A△B is a metric. This result is known (see for instance Chapter 8 of [9]), but we provide a proof (in the supplementary material) for completeness. Theorem 3.1. Let f : 2V →R be a positive normalized monotone subadditive function. Then df(A, B) = f(A△B) is a metric on A, B ⊆V . 3 While these subadditive functions are metrics, their optimization is known to be very difficult. The simple subadditive function example in the introduction of [10] shows that subadditive minimization is inapproximable, and Theorem 17 of [11] states that no algorithm exists for subadditive maximization that has an approximation factor better than ˜O(√n). By contrast, submodular minimization is poly-time in the unconstrained setting [12], and a simple greedy algorithm from [13] gives a 1 −1/eapproximation for maximization of positive polymatroids subject to a cardinality constraint. Many other approximation results are also known for submodular function optimization subject to various other types of constraints. Thus, in this work we restrict ourselves to positive polymatroids. Corollary 3.1.1. Let f : 2V →R+ be a positive polymatroid function. Then df(A, B) = f(A△B) is a metric on A, B ⊆V . This restriction does not entirely resolve the question of optimization hardness though. Recall that the optimization in SH-min and SH-max is with respect to A, but that the fi are applied to the sets A△Bi. Unfortunately, the function gB(A) = f(A△B), for a fixed set B, is neither necessarily submodular nor supermodular in A. The next example demonstrates this violation of submodularity. Example 3.1.1. To be submodular, the function gB(A) = f(A△B) must satisfy the following condition for all sets A1, A2 ⊆V : gB(A1) + gB(A2) ≥gB(A1 ∪A2) + gB(A1 ∩A2). Consider the positive polymatroid function f(Y ) = p |Y | and let B consist of two elements: B = {b1, b2}. Then for A1 = {b1} and A2 = {c} (with c /∈B): gB(A1) + gB(A2) = √ 1 + √ 3 < 2 √ 2 = gB(A1 ∪A2) + gB(A1 ∩A2). Although gB(A) = f(A△B) can be non-submodular, we are interestingly still able to make use of the fact that f is submodular in A△B to develop approximation algorithms for SH-min and SH-max. 4 Minimization of the submodular Hamming metric In this section, we focus on SH-min (the centroid-finding problem). We consider the four cases from Table 1: the constrained (A ∈C ⊂2V ) and unconstrained (A ∈C = 2V ) settings, as well as the homogeneous case (where all fi are the same function) and the heterogeneous case. Before diving in, we note that in all cases we assume not only the natural oracle access to the objective function F(A) = Pm i=1 fi(A△Bi) (i.e., the ability to evaluate F(A) for any A ⊆V ), but also knowledge of the Bi (the B sequence). Theorem 4.1 shows that without knowledge of B, SH-min is inapproximable. In practice, requiring knowledge of B is not a significant limitation; for all of the applications described in Section 2, B is naturally known. Theorem 4.1. Let f be a positive polymatroid function. Suppose that the subset B ⊆V is fixed but unknown and gB(A) = f(A△B). If we only have an oracle for gB, then there is no poly-time approximation algorithm for minimizing gB, up to any polynomial approximation factor. 4.1 Unconstrained setting Submodular minimization is poly-time in the unconstrained setting [12]. Since a sum of submodular functions is itself submodular, at first glance it might then seem that the sum of fi in SH-min can be minimized in poly-time. However, recall from Example 3.1.1 that the fi’s are not necessarily submodular in the optimization variable, A. This means that the question of SH-min’s hardness, even in the unconstrained setting, is an open question. Theorem 4.2 resolves this question for the heterogeneous case, showing that it is NP-hard and that no algorithm can do better than a 4/3-approximation guarantee. The question of hardness in the homogeneous case remains open. Theorem 4.2. The unconstrained and heterogeneous version of SH-min is NP-hard. Moreover, no poly-time algorithm can achieve an approximation factor better than 4/3. Since unconstrained SH-min is NP-hard, it makes sense to consider approximation algorithms for this problem. We first provide a simple 2-approximation, UNION-SPLIT (see Algorithm 1). This algorithm splits f(A△B) = f((A \ B) ∪(B \ A)) into f(A \ B) + f(B \ A), then applies standard submodular minimization (see e.g. [14]) to the split function. Theorem 4.3 shows that this algorithm is a 2-approximation for SH-min. It relies on Lemma 4.2.1, which we state first. Lemma 4.2.1. Let f be a positive monotone subadditive function. Then, for any A, B ⊆V : f(A△B) ≤f(A \ B) + f(B \ A) ≤2f(A△B). (2) 4 Algorithm 1 UNION-SPLIT Input: F, B Define f ′ i(Y ) = fi(Y \ Bi) + fi(Bi \ Y ) Define F ′(Y ) = Pm i=1 f ′ i(Y ) Output: SUBMODULAR-OPT (F ′) Algorithm 2 BEST-B Input: F, B A ←B1 for i = 2, . . . , m do if F(Bi) < F(A): A ←Bi Output: A Algorithm 3 MAJOR-MIN Input: F, B, C A ←∅ repeat c ←F(A) Set w ˆ F as in Equation 3 A ←MODULAR-MIN (w ˆ F , C) until F(A) = c Output: A Theorem 4.3. UNION-SPLIT is a 2-approximation for unconstrained SH-min. Restricting to the homogeneous setting, we can provide a different algorithm that has a better approximation guarantee than UNION-SPLIT. This algorithm simply checks the value of F(A) = Pm i=1 f(A△Bi) for each Bi and returns the minimizing Bi. We call this algorithm BEST-B (Algorithm 2). Theorem 4.4 gives the approximation guarantee for BEST-B. This result is known [15], as the proof of the guarantee only makes use of metricity and homogeneity (not submodularity), and these properties are common to much other work. We provide the proof in our notation for completeness though. Theorem 4.4. For m = 1, BEST-B exactly solves unconstrained SH-min. For m > 1, BEST-B is a 2 −2 m -approximation for unconstrained homogeneous SH-min. 4.2 Constrained setting In the constrained setting, the SH-min problem becomes more difficult. Essentially, all of the hardness results established in existing work on constrained submodular minimization applies to the constrained SH-min problem as well. Theorem 4.5 shows that, even for a simple cardinality constraint and identical fi (homogeneous setting), not only is SH-min NP-hard, but also it is hard to approximate with a factor better than Ω(√n). Theorem 4.5. Homogeneous SH-min is NP-hard under cardinality constraints. Moreover, no algorithm can achieve an approximation factor better than Ω √n 1+(√n−1)(1−κf ) , where κf = 1 −minj∈V f(j|V \j) f(j) denotes the curvature of f. This holds even when m = 1. We can also show similar hardness results for several other combinatorial constraints including matroid constraints, shortest paths, spanning trees, cuts, etc. [16, 17]. Note that the hardness established in Theorem 4.5 depends on a quantity κf, which is also called the curvature of a submodular function [18, 16]. Intuitively, this factor measures how close a submodular function is to a modular function. The result suggests that the closer the function is being modular, the easier it is to optimize. This makes sense, since with a modular function, SH-min can be exactly minimized under several combinatorial constraints. To see this for the cardinality-constrained case, first note that for modular fi, the corresponding F-function is also modular. Lemma 4.5.1 formalizes this. Lemma 4.5.1. If the fi in SH-min are modular, then F(A) = Pm i=1 fi(A△Bi) is also modular. Given Lemma 4.5.1, from the definition of modularity we know that there exists some constant C and vector wF ∈Rn, such that F(A) = C + P j∈A wF (j). From this representation it is clear that F can be minimized subject to the constraint |A| ≥k by choosing as the set A the items corresponding to the k smallest entries in wF . Thus, for modular fi, or fi with small curvature κfi, such constrained minimization is relatively easy. Having established the hardness of constrained SH-min, we now turn to considering approximation algorithms for this problem. Unfortunately, the UNION-SPLIT algorithm from the previous section 5 requires an efficient algorithm for submodular function minimization, and no such algorithm exists in the constrained setting; submodular minimization is NP-hard even under simple cardinality constraints [19]. Similarly, the BEST-B algorithm breaks down in the constrained setting; its guarantees carry over only if all the Bi are within the constraint set C. Thus, for the constrained SH-min problem we instead propose a majorization-minimization algorithm. Theorem 4.6 shows that this algorithm has an O(n) approximation guarantee, and Algorithm 3 formally defines the algorithm. Essentially, MAJOR-MIN proceeds by iterating the following two steps: constructing ˆF, a modular upper bound for F at the current solution A, then minimizing ˆF to get a new A. ˆF consists of superdifferentials [20, 21] of F’s component submodular functions. We use the superdifferentials defined as “grow” and “shrink” in [22]. Defining sets S, T as S = V \ j, T = A△Bi for “grow”, and S = (A△Bi) \ j, T = ∅for “shrink”, the w ˆ F vector that represents the modular ˆF can be written: w ˆ F (j) = m X i=1 fi(j | S) if j ∈A△Bi fi(j | T) otherwise, (3) where f(Y | X) = f(Y ∪X) −f(X) is the gain in f-value when adding Y to X. We now state the main theorem characterizing algorithm MAJOR-MIN’s performance on SH-min. Theorem 4.6. MAJOR-MIN is guaranteed to improve the objective value, F(A) = Pm i=1 fi(A△Bi), at every iteration. Moreover, for any constraint over which a modular function can be exactly optimized, it has a maxi |A∗△Bi| 1+(|A∗△Bi|−1)(1−κfi(A∗△Bi)) approximation guarantee, where A∗is the optimal solution of SH-min. While MAJOR-MIN does not have a constant-factor guarantee (which is possible only in the unconstrained setting), the bounds are not too far from the hardness of the constrained setting. For example, in the cardinality case, the guarantee of MAJOR-MIN is n 1+(n−1)(1−κf ), while the hardness shown in Theorem 4.5 is Ω √n 1+(n−1)(1−κf ) . 5 Maximization of the submodular Hamming metric We next characterize the hardness of SH-max (the diversification problem) and describe approximation algorithms for it. We first show that all versions of SH-max, even the unconstrained homogeneous one, are NP-hard. Note that this is a non-trivial result. Maximization of a monotone function such as a polymatroid is not NP-hard; the maximizer is always the full set V . But, for SH-max, despite the fact that the fi are monotone with respect to their argument A△Bi, they are not monotone with respect to A itself. This makes SH-max significantly harder. After establishing that SH-max is NP-hard, we show that no poly-time algorithm can obtain an approximation factor better 3/4 in the unconstrained setting, and a factor of (1 −1/e) in the constrained setting. Finally, we provide a simple approximation algorithm which achieves a factor of 1/4 for all settings. Theorem 5.1. All versions of SH-max (constrained or unconstrained, heterogeneous or homogeneous) are NP-hard. Moreover, no poly-time algorithm can obtain a factor better than 3/4 for the unconstrained versions, or better than 1 −1/e for the cardinality-constrained versions. We turn now to approximation algorithms. For the unconstrained setting, Lemma 5.1.1 shows that simply choosing a random subset, A ⊆V provides a 1/8-approximation in expectation. Lemma 5.1.1. A random subset is a 1/8-approximation for SH-max in the unconstrained (homogeneous or heterogeneous) setting. An improved approximation guarantee of 1/4 can be shown for a variant of UNION-SPLIT (Algorithm 1), if the call to SUBMODULAR-OPT is a call to a SUBMODULAR-MAX algorithm. Theorem 5.2 makes this precise for both the unconstrained case and a cardinality-constrained case. It might also be of interest to consider more complex constraints, such as matroid independence and base constraints, but we leave the investigation of such settings to future work. Theorem 5.2. Maximizing ¯F(A) = Pm i=1 (fi(A \ Bi) + fi(Bi \ A)) with a bi-directional greedy algorithm [23, Algorithm 2] is a linear-time 1/4-approximation for maximizing F(A) = Pm i=1 fi(A△Bi), in the unconstrained setting. Under the cardinality constraint |A| ≤k, using the randomized greedy algorithm [24, Algorithm 1] provides a 1 2e-approximation. 6 Table 3: mV-ROUGE averaged over the 14 datasets (± standard deviation). HM SP TP 0.38 ± 0.14 0.43 ± 0.20 0.50 ± 0.26 Table 4: # of wins (out of 14 datasets). HM SP TP 3 1 10 6 Experiments To demonstrate the effectiveness of the submodular Hamming metrics proposed here, we apply them to a metric minimization task (clustering) and a metric maximization task (diverse k-best). 6.1 SH-min application: clustering We explore the document clustering problem described in Section 2, where the groundset V is all unigram features and Bi contains the unigrams of document i. We run k-means clustering and each iteration find the mean for cluster Cj by solving: µj ∈argminA:|A|≥ℓ P i∈Cj f(A△Bi). The constraint |A| ≥ℓrequires the mean to contain at least ℓunigrams, which helps k-means to create richer and more meaningful cluster centers. We compare using the submodular function f(Y ) = P W ∈W p |Y ∩W| (SM), to using Hamming distance (HM). The problem of finding µj above can be solved exactly for HM, since it is a modular function. In the SM case, we apply MAJORMIN (Algorithm 3). As an initial test, we generate synthetic data consisting of 100 “documents” assigned to 10 “true” clusters. We set the number of “word” features to n = 1000, and partition the features into 100 word classes (the W in the submodular function). Ten word classes are associated with each true document cluster, and each document contains one word from each of these word classes. That is, each word is contained in only one document, but documents in the same true cluster have words from the same word classes. We set the minimum cluster center size to ℓ= 100. We use k-means++ initialization [25] and average over 10 trials. Within the k-means optimization, we enforce that all clusters are of equal size by assigning a document to the closest center whose current size is < 10. With this setup, the average accuracy of HM is 28.4% (±2.4), while SM is 69.4% (±10.5). The HM accuracy is essentially the accuracy of a random assignment of documents to clusters; this makes sense, as no documents share words, rendering the Hamming distance useless. In real-world data there would likely be some word overlap though; to better model this, we let each document contain a random sampling of 10 words from the word clusters associated with its document cluster. In this case, the average accuracy of HM is 57.0% (±6.8), while SM is 88.5% (±8.4). The results for SM are even better if randomization is removed from the initialization (we simply choose the next center to be one with greatest distance from the current centers). In this case, the average accuracy of HM is 56.7% (±7.1), while SM is 100% (±0.0). This indicates that as long as the starting point for SM contains one document from each cluster, the SM optimization will recover the true clusters. Moving beyond synthetic data, we applied the same method to the problem of clustering NIPS papers. The initial set of documents that we consider consists of all NIPS papers1 from 1987 to 2014. We filter the words of a given paper by first removing stopwords and any words that don’t appear at least 3 times in the paper. We further filter by removing words that have small tf-idf value (< 0.001) and words that occur in only one paper or in more than 10% of papers. We then filter the papers themselves, discarding any that have fewer than 25 remaining words and for each other paper retaining only its top (by tf-idf score) 25 words. Each of the 5,522 remaining papers defines a Bi set. Among the Bi there are 12,262 unique words. To get the word clusters W, we first run the WORD2VEC code of [26], which generates a 100-dimensional real-valued vector of features for each word, and then run k-means clustering with Euclidean distance on these vectors to define 100 word clusters. We set the center size cardinality constraint to ℓ= 100 and set the number of document clusters to k = 10. To initialize, we again use k-means++ [25], with k = 10. Results are averaged over 10 trials. While we do not have groundtruth labels for NIPS paper clusters, we can use within-cluster distances as a proxy for cluster goodness (lower values, indicating tighter clusters, are better). Specifically, we compute: k-means-score = Pk j=1 P i∈Cj g(µj△Bi). With Hamming for g, the average ratio of HM’s k-means-score to SM’s is 0.916 ± 0.003. This indicates that, as expected, HM does a better job of optimizing the Hamming loss. However, with the submodular function for g, the average ratio of HM’s k-means-score to SM’s is 1.635 ± 0.038. Thus, SM does a significantly better job optimizing the submodular loss. 1Papers were downloaded from http://papers.nips.cc/. 7 6.2 SH-max application: diverse k-best In this section, we explore a diverse k-best image collection summarization problem, as described in Section 2. For this problem, our goal is to obtain k summaries, each of size l, by selecting from a set consisting of n ≫l images. The idea is that either: (a) the user could choose from among these k summaries the one that they find most appealing, or (b) a (more computationally expensive) model could be applied to re-rank these k summaries and choose the best. As is described in Section 2, we obtain the kth summary Ak, given the first k −1 summaries A1:k−1 via: Ak = argmaxA⊆V,|A|=ℓg(A) + Pk−1 i=1 f(A△Ai). Figure 1: An example photo montage (zoom in to see detail) showing 15 summaries of size 10 (one per row) from the HM approach (left) and the TP approach (right), for image collection #6. For g we use the facility location function: g(A) = P i∈V maxj∈A Sij, where Sij is a similarity score for images i and j. We compute Sij by taking the dot product of the ith and jth feature vectors, which are the same as those used by [8]. For f we compare two different functions: (1) f(A△Ai) = |A△Ai|, the Hamming distance (HM), and (2) f(A△Ai) = g(A△Ai), the submodular facility location distance (SM). For HM we optimize via the standard greedy algorithm [13]; since the facility location function g is monotone submodular, this implies an approximation guarantee of (1 −1/e). For SM, we experiment with two algorithms: (1) standard greedy [13], and (2) UNION-SPLIT (Algorithm 1) with standard greedy as the SUBMODULAR-OPT function. We will refer to these two cases as “single part” (SP) and “two part” (TP). Note that neither of these optimization techniques has a formal approximation guarantee, though the latter would if instead of standard greedy we used the bi-directional greedy algorithm of [23]. We opt to use standard greedy though, as it typically performs much better in practice. We employ the image summarization dataset from [8], which consists of 14 image collections, each of which contains n = 100 images. For each image collection, we seek k = 15 summaries of size ℓ= 10. For evaluation, we employ the V-ROUGE score developed by [8]; the mean V-ROUGE (mV-ROUGE) of the k summaries provides a quantitative measure of their goodness. V-ROUGE scores are normalized such that a score of 0 corresponds to randomly generated summaries, while a score of 1 is on par with human-generated summaries. Table 3 shows that SP and TP outperform HM in terms of mean mV-ROUGE, providing support for the idea of using submodular Hamming distances in place of (modular) Hamming for diverse k-best applications. TP also outperforms SP, suggesting that the objective-splitting used in UNION-SPLIT is of practical significance. Table 4 provides additional evidence of TP’s superiority, indicating that for 10 out of the 14 image collections, TP has the best mV-ROUGE score of the three approaches. Figure 1 provides some qualitative evidence of TP’s goodness. Notice that the images in the green rectangle tend to be more redundant with images from the previous summaries in the HM case than in the TP case; the HM solution contains many images with a “sky” theme, while TP contains more images with other themes. This shows that the HM solution lacks diversity across summaries. The quality of the individual summaries also tends to become poorer for the later HM sets; considering the images in the red rectangles overlaid on the montage, the HM sets contain many images of tree branches here. By contrast, the TP summary quality remains good even for the last few summaries. 7 Conclusion In this work we defined a new class of distance functions: submodular Hamming metrics. We established hardness results for the associated SH-min and SH-max problems, and provided approximation algorithms. Further, we demonstrated the practicality of these metrics for several applications. There remain several open theoretical questions (e.g., the tightness of the hardness results and the NP-hardness of SH-min), as well as many opportunities for applying submodular Hamming metrics to other machine learning problems (e.g., the prediction application from Section 2). 8 References [1] S. Lloyd. Least Squares Quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982. [2] T. Hazan, S. Maji, J. Keshet, and T. Jaakkola. Learning Efficient Random Maximum A-Posteriori Predictors with Non-Decomposable Loss Functions. In NIPS, 2013. [3] M. Szummer, P. Kohli, and D. Hoiem. Learning CRFs Using Graph Cuts. In ECCV, 2008. [4] A. Osokin and P. Kohli. Perceptually Inspired Layout-Aware Losses for Image Segmentation. In ECCV, 2014. [5] J. Yu and M. Blaschko. Learning Submodular Losses with the Lovasz Hinge. In ICML, 2015. [6] D. Batra, P. Yadollahpour, A. Guzman, and G. Shakhnarovich. Diverse M-Best Solutions in Markov Random Fields. In ECCV, 2012. [7] H. Lin and J. Bilmes. A Class of Submodular Functions for Document Summarization. In ACL. [8] S. Tschiatschek, R. Iyer, H. Wei, and J. Bilmes. Learning Mixtures of Submodular Functions for Image Collection Summarization. In NIPS, 2014. [9] P. Halmos. Measure Theory. Springer, 1974. [10] S. Jegelka and J. Bilmes. Approximation Bounds for Inference using Cooperative Cuts. In ICML, 2011. [11] M. Bateni, M. Hajiaghayi, and M. Zadimoghaddam. Submodular Secretary Problem and Extensions. Technical report, MIT, 2010. [12] W. H. Cunningham. On Submodular Function Minimization. Combinatorica, 3:185 – 192, 1985. [13] G. Nemhauser, L. Wolsey, and M. Fisher. An Analysis of Approximations for Maximizing Submodular Set Functions I. 14(1), 1978. [14] Satoru Fujishige. Submodular Functions and Optimization. Elsevier, 2 edition, 2005. [15] D. Gusfield. Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. Cambridge University Press, 1997. [16] R. Iyer, S. Jegelka, and J. Bilmes. Curvature and Efficient Approximation Algorithms for Approximation and Minimization of Submodular Functions. In NIPS, 2013. [17] G. Goel, C. Karande, P. Tripathi, and L. Wang. Approximability of combinatorial problems with multi-agent submodular cost functions. In FOCS, 2009. [18] J. Vondr´ak. Submodularity and Curvature: The Optimal Algorithm. RIMS Kokyuroku Bessatsu, 23, 2010. [19] Z. Svitkina and L. Fleischer. Submodular Approximation: Sampling-Based Algorithms and Lower Bounds. In FOCS, 2008. [20] S. Jegelka and J. Bilmes. Submodularity Beyond Submodular Energies: Coupling Edges in Graph Cuts. In CVPR, 2011. [21] R. Iyer and J. Bilmes. The Submodular Bregman and Lov´asz-Bregman Divergences with Applications. In NIPS, 2012. [22] R. Iyer, S. Jegelka, and J. Bilmes. Fast Semidifferential-Based Submodular Function Optimization. In ICML, 2013. [23] N. Buchbinder, M. Feldman, J. Naor, and R. Schwartz. A Tight Linear Time (1/2)-Approximation for Unconstrained Submodular Maximization. In FOCS, 2012. [24] N. Buchbinder, M. Feldman, J. Naor, and R. Schwartz. Submodular maximization with cardinality constraints. In SODA, 2014. [25] D. Arthur and S. Vassilvitskii. k-means++: The Advantages of Careful Seeding. In SODA, 2007. [26] T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean. Distributed Representations of Words and Phrases and their Compositionality. In NIPS, 2013. 9 | 2015 | 289 |
5,801 | Attention-Based Models for Speech Recognition Jan Chorowski University of Wrocław, Poland jan.chorowski@ii.uni.wroc.pl Dzmitry Bahdanau Jacobs University Bremen, Germany Dmitriy Serdyuk Universit´e de Montr´eal Kyunghyun Cho Universit´e de Montr´eal Yoshua Bengio Universit´e de Montr´eal CIFAR Senior Fellow Abstract Recurrent sequence generators conditioned on input data through an attention mechanism have recently shown very good performance on a range of tasks including machine translation, handwriting synthesis [1, 2] and image caption generation [3]. We extend the attention-mechanism with features needed for speech recognition. We show that while an adaptation of the model used for machine translation in [2] reaches a competitive 18.7% phoneme error rate (PER) on the TIMIT phoneme recognition task, it can only be applied to utterances which are roughly as long as the ones it was trained on. We offer a qualitative explanation of this failure and propose a novel and generic method of adding location-awareness to the attention mechanism to alleviate this issue. The new method yields a model that is robust to long inputs and achieves 18% PER in single utterances and 20% in 10-times longer (repeated) utterances. Finally, we propose a change to the attention mechanism that prevents it from concentrating too much on single frames, which further reduces PER to 17.6% level. 1 Introduction Recently, attention-based recurrent networks have been successfully applied to a wide variety of tasks, such as handwriting synthesis [1], machine translation [2], image caption generation [3] and visual object classification [4].1 Such models iteratively process their input by selecting relevant content at every step. This basic idea significantly extends the applicability range of end-to-end training methods, for instance, making it possible to construct networks with external memory [6, 7]. We introduce extensions to attention-based recurrent networks that make them applicable to speech recognition. Learning to recognize speech can be viewed as learning to generate a sequence (transcription) given another sequence (speech). From this perspective it is similar to machine translation and handwriting synthesis tasks, for which attention-based methods have been found suitable [2, 1]. However, compared to machine translation, speech recognition principally differs by requesting much longer input sequences (thousands of frames instead of dozens of words), which introduces a challenge of distinguishing similar speech fragments2 in a single utterance. It is also different from handwriting synthesis, since the input sequence is much noisier and does not have as clear structure. For these reasons speech recognition is an interesting testbed for developing new attention-based architectures capable of processing long and noisy inputs. Application of attention-based models to speech recognition is also an important step toward building fully end-to-end trainable speech recognition systems, which is an active area of research. The 1An early version of this work was presented at the NIPS 2014 Deep Learning Workshop [5]. 2Explained in more detail in Sec. 2.1. 1 dominant approach is still based on hybrid systems consisting of a deep neural acoustic model, a triphone HMM model and an n-gram language model [8, 9]. This requires dictionaries of hand-crafted pronunciation and phoneme lexicons, and a multi-stage training procedure to make the components work together. Excellent results by an HMM-less recognizer have recently been reported, with the system consisting of a CTC-trained neural network and a language model [10]. Still, the language model was added only at the last stage in that work, thus leaving open a question of how much an acoustic model can benefit from being aware of a language model during training. In this paper, we evaluate attention-based models on the widely-used TIMIT phoneme recognition task. For each generated phoneme, an attention mechanism selects or weighs the signals produced by a trained feature extraction mechanism at potentially all of the time steps in the input sequence (speech frames). The weighted feature vector then helps to condition the generation of the next element of the output sequence. Since the utterances in this dataset are rather short (mostly under 5 seconds), we measure the ability of the considered models in recognizing much longer utterances which were created by artificially concatenating the existing utterances. We start with a model proposed in [2] for the machine translation task as the baseline. This model seems entirely vulnerable to the issue of similar speech fragments but despite our expectations it was competitive on the original test set, reaching 18.7% phoneme error rate (PER). However, its performance degraded quickly with longer, concatenated utterances. We provide evidence that this model adapted to track the absolute location in the input sequence of the content it is recognizing, a strategy feasible for short utterances from the original test set but inherently unscalable. In order to circumvent this undesired behavior, in this paper, we propose to modify the attention mechanism such that it explicitly takes into account both (a) the location of the focus from the previous step, as in [6] and (b) the features of the input sequence, as in [2]. This is achieved by adding as inputs to the attention mechanism auxiliary convolutional features which are extracted by convolving the attention weights from the previous step with trainable filters. We show that a model with such convolutional features performs significantly better on the considered task (18.0% PER). More importantly, the model with convolutional features robustly recognized utterances many times longer than the ones from the training set, always staying below 20% PER. Therefore, the contribution of this work is three-fold. For one, we present a novel purely neural speech recognition architecture based on an attention mechanism, whose performance is comparable to that of the conventional approaches on the TIMIT dataset. Moreover, we propose a generic method of adding location awareness to the attention mechanism. Finally, we introduce a modification of the attention mechanism to avoid concentrating the attention on a single frame, and thus avoid obtaining less “effective training examples”, bringing the PER down to 17.6%. 2 Attention-Based Model for Speech Recognition 2.1 General Framework An attention-based recurrent sequence generator (ARSG) is a recurrent neural network that stochastically generates an output sequence (y1, . . . , yT ) from an input x. In practice, x is often processed by an encoder which outputs a sequential input representation h = (h1, . . . , hL) more suitable for the attention mechanism to work with. In the context of this work, the output y is a sequence of phonemes, and the input x = (x1, . . . , xL′) is a sequence of feature vectors. Each feature vector is extracted from a small overlapping window of audio frames. The encoder is implemented as a deep bidirectional recurrent network (BiRNN), to form a sequential representation h of length L = L′. At the i-th step an ARSG generates an output yi by focusing on the relevant elements of h: αi = Attend(si−1, αi−1, h) (1) gi = L X j=1 αi,jhj (2) yi ∼Generate(si−1, gi), (3) 2 yi gi hj-1 hj hj+1 gi+1 yi+1 si+1 ×αi-1,j-1 ×αi-1,j ×αi-1,j+1 si-1 si ×αi,j-1 ×αi,j ×αi,j+1 αi Figure 1: Two steps of the proposed attention-based recurrent sequence generator (ARSG) with a hybrid attention mechanism (computing α), based on both content (h) and location (previous α) information. The dotted lines correspond to Eq. (1), thick solid lines to Eq. (2) and dashed lines to Eqs. (3)–(4). where si−1 is the (i −1)-th state of the recurrent neural network to which we refer as the generator, αi ∈RL is a vector of the attention weights, also often called the alignment [2]. Using the terminology from [4], we call gi a glimpse. The step is completed by computing a new generator state: si = Recurrency(si−1, gi, yi) (4) Long short-term memory units (LSTM, [11]) and gated recurrent units (GRU, [12]) are typically used as a recurrent activation, to which we refer as a recurrency. The process is graphically illustrated in Fig. 1. Inspired by [6] we distinguish between location-based, content-based and hybrid attention mechanisms. Attend in Eq. (1) describes the most generic, hybrid attention. If the term αi−1 is dropped from Attend arguments, i.e., αi = Attend(si−1, h), we call it content-based (see, e.g., [2] or [3]). In this case, Attend is often implemented by scoring each element in h separately and normalizing the scores: ei,j = Score(si−1, hj), (5) αi,j = exp(ei,j) , L X j=1 exp(ei,j) . (6) The main limitation of such scheme is that identical or very similar elements of h are scored equally regardless of their position in the sequence. This is the issue of “similar speech fragments” raised above. Often this issue is partially alleviated by an encoder such as e.g. a BiRNN [2] or a deep convolutional network [3] that encode contextual information into every element of h . However, capacity of h elements is always limited, and thus disambiguation by context is only possible to a limited extent. Alternatively, a location-based attention mechanism computes the alignment from the generator state and the previous alignment only such that αi = Attend(si−1, αi−1). For instance, Graves [1] used the location-based attention mechanism using a Gaussian mixture model in his handwriting synthesis model. In the case of speech recognition, this type of location-based attention mechanism would have to predict the distance between consequent phonemes using si−1 only, which we expect to be hard due to large variance of this quantity. For these limitations associated with both content-based and location-based mechanisms, we argue that a hybrid attention mechanism is a natural candidate for speech recognition. Informally, we would like an attention model that uses the previous alignment αi−1 to select a short list of elements from h, from which the content-based attention, in Eqs. (5)–(6), will select the relevant ones without confusion. 2.2 Proposed Model: ARSG with Convolutional Features We start from the ARSG-based model with the content-based attention mechanism proposed in [2]. This model can be described by Eqs. (5)–(6), where ei,j = w⊤tanh(Wsi−1 + V hj + b). (7) w and b are vectors, W and V are matrices. 3 We extend this content-based attention mechanism of the original model to be location-aware by making it take into account the alignment produced at the previous step. First, we extract k vectors fi,j ∈Rk for every position j of the previous alignment αi−1 by convolving it with a matrix F ∈Rk×r: fi = F ∗αi−1. (8) These additional vectors fi,j are then used by the scoring mechanism ei,j: ei,j = w⊤tanh(Wsi−1 + V hj + Ufi,j + b) (9) 2.3 Score Normalization: Sharpening and Smoothing There are three potential issues with the normalization in Eq. (6). First, when the input sequence h is long, the glimpse gi is likely to contain noisy information from many irrelevant feature vectors hj, as the normalized scores αi,j are all positive and sum to 1. This makes it difficult for the proposed ARSG to focus clearly on a few relevant frames at each time i. Second, the attention mechanism is required to consider all the L frames each time it decodes a single output yi while decoding the output of length T, leading to a computational complexity of O(LT). This may easily become prohibitively expensive, when input utterances are long (and issue that is less serious for machine translation, because in that case the input sequence is made of words, not of 20ms acoustic frames). The other side of the coin is that the use of softmax normalization in Eq. (6) prefers to mostly focus on only a single feature vector hj. This prevents the model from aggregating multiple top-scored frames to form a glimpse gi. Sharpening There is a straightforward way to address the first issue of a noisy glimpse by “sharpening” the scores αi,j. One way to sharpen the weights is to introduce an inverse temperature β > 1 to the softmax function such that ai,j = exp(βei,j) .PL j=1 exp(βei,j), or to keep only the top-k frames according to the scores and re-normalize them. These sharpening methods, however, still requires us to compute the score of every frame each time (O(LT)), and they worsen the second issue, of overly narrow focus. We also propose and investigate a windowing technique. At each time i, the attention mechanism considers only a subsequence ˜h = (hpi−w, . . . , hpi+w−1) of the whole sequence h, where w ≪L is the predefined window width and pi is the median of the alignment αi−1. The scores for hj /∈˜h are not computed, resulting in a lower complexity of O(L + T). This windowing technique is similar to taking the top-k frames, and similarly, has the effect of sharpening. The proposed sharpening based on windowing can be used both during training and evaluation. Later, in the experiments, we only consider the case where it is used during evaluation. Smoothing We observed that the proposed sharpening methods indeed helped with long utterances. However, all of them, and especially selecting the frame with the highest score, negatively affected the model’s performance on the standard development set which mostly consists of short utterances. This observations let us hypothesize that it is helpful for the model to aggregate selections from multiple top-scored frames. In a sense this brings more diversity, i.e., more effective training examples, to the output part of the model, as more input locations are considered. To facilitate this effect, we replace the unbounded exponential function of the softmax function in Eq. (6) with the bounded logistic sigmoid σ such that ai,j = σ(ei,j) .PL j=1 σ(ei,j). This has the effect of smoothing the focus found by the attention mechanism. 3 Related Work Speech recognizers based on the connectionist temporal classification (CTC, [13]) and its extension, RNN Transducer [14], are the closest to the ARSG model considered in this paper. They follow earlier work on end-to-end trainable deep learning over sequences with gradient signals flowing 4 G G G G G G G G G G G G G G G G G G G G G Baseline Conv Feats Smooth Focus 16 17 18 19 1 2 5 10 20 50 100 1 2 5 10 20 50 100 1 2 5 10 20 50 100 Beam width Phoneme Error Rate [%] Dataset G dev test Dependency of error rate on beam search width. Figure 2: Decoding performance w.r.t. the beam size. For rigorous comparison, if decoding failed to generate ⟨eos⟩, we considered it wrongly recognized without retrying with a larger beams size. The models, especially with smooth focus, perform well even with a beam width as small as 1. through the alignment process [15]. They have been shown to perform well on the phoneme recognition task [16]. Furthermore, the CTC was recently found to be able to directly transcribe text from speech without any intermediate phonetic representation [17]. The considered ARSG is different from both the CTC and RNN Transducer in two ways. First, whereas the attention mechanism deterministically aligns the input and the output sequences, the CTC and RNN Transducer treat the alignment as a latent random variable over which MAP (maximum a posteriori) inference is performed. This deterministic nature of the ARSG’s alignment mechanism allows beam search procedure to be simpler. Furthermore, we empirically observe that a much smaller beam width can be used with the deterministic mechanism, which allows faster decoding (see Sec. 4 and Fig. 2). Second, the alignment mechanism of both the CTC and RNN Transducer is constrained to be “monotonic” to keep marginalization of the alignment tractable. On the other hand, the proposed attention mechanism can result in non-monotonic alignment, which makes it suitable for a larger variety of tasks other than speech recognition. A hybrid attention model using a convolution operation was also proposed in [6] for neural Turing machines (NTM). At each time step, the NTM computes content-based attention weights which are then convolved with a predicted shifting distribution. Unlike the NTM’s approach, the hybrid mechanism proposed here lets learning figure out how the content-based and location-based addressing be combined by a deep, parametric function (see Eq. (9).) Sukhbaatar et al. [18] describes a similar hybrid attention mechanism, where location embeddings are used as input to the attention model. This approach has an important disadvantage that the model cannot work with an input sequence longer than those seen during training. Our approach, on the other hand, works well on sequences many times longer than those seen during training (see Sec. 5.) 4 Experimental Setup We closely followed the procedure in [16]. All experiments were performed on the TIMIT corpus [19]. We used the train-dev-test split from the Kaldi [20] TIMIT s5 recipe. We trained on the standard 462 speaker set with all SA utterances removed and used the 50 speaker dev set for early stopping. We tested on the 24 speaker core test set. All networks were trained on 40 mel-scale filterbank features together with the energy in each frame, and first and second temporal differences, yielding in total 123 features per frame. Each feature was rescaled to have zero mean and unit variance over the training set. Networks were trained on the full 61-phone set extended with an extra “end-of-sequence” token that was appended to each target sequence. Similarly, we appended an all-zero frame at the end of each input sequence to indicate the end of the utterance. Decoding was performed using the 61+1 phoneme set, while scoring was done on the 39 phoneme set. Training Procedure One property of ARSG models is that different subsets of parameters are reused different number of times; L times for those of the encoder, LT for the attention weights and T times for all the other parameters of the ARSG. This makes the scales of derivatives w.r.t. parameters vary significantly. We used an adaptive learning rate algorithm, AdaDelta [21] which has two hyperparameters ϵ and ρ. All the weight matrices were initialized from a normal Gaussian distribution with its standard deviation set to 0.01. Recurrent weights were orthogonalized. As TIMIT is a relatively small dataset, proper regularization is crucial. We used the adaptive weight noise as a main regularizer [22]. We first trained our models with a column norm constraint [23] with 5 h# m ay kcl k el kcl k ah l er dcl dhix bcl b eh dcld r ux m w ao l w ix th kcl k r ey aa n s h# FDHC0_SX209: Michael colored the bedroom wall with crayons. Figure 3: Alignments produced by the baseline model. The vertical bars indicate ground truth phone location from TIMIT. Each row of the upper image indicates frames selected by the attention mechanism to emit a phone symbol. The network has clearly learned to produce a left-to-right alignment with a tendency to look slightly ahead, and does not confuse between the repeated “kclk” phrase. Best viewed in color. the maximum norm 1 until the lowest development negative log-likelihood is achieved.3 During this time, ϵ and ρ are set to 10−8 and 0.95, respectively. At this point, we began using the adaptive weight noise, with the model complexity cost LC divided by 10, while disabling the column norm constraints. Once the new lowest development log-likelihood was reached, we fine-tuned the model with a smaller ϵ = 10−10, until we did not observe the improvement in the development phoneme error rate (PER) for 100K weight updates. Batch size 1 was used throughout the training. Evaluated Models We evaluated the ARSGs with different attention mechanisms. The encoder was a 3-layer BiRNN with 256 GRU units in each direction, and the activations of the 512 top-layer units were used as the representation h. The generator had a single recurrent layer of 256 GRU units. Generate in Eq. (3) had a hidden layer of 64 maxout units. The initial states of both the encoder and generator were treated as additional parameters. Our baseline model is the one with a purely content-based attention mechanism (See Eqs. (5)–(7).) The scoring network in Eq. (7) had 512 hidden units. The other two models use the convolutional features in Eq. (8) with k = 10 and r = 201. One of them uses the smoothing from Sec. 2.3. Decoding Procedure A left-to-right beam search over phoneme sequences was used during decoding [24]. Beam search was stopped when the “end-of-sequence” token ⟨eos⟩was emitted. We started with a beam width of 10, increasing it up to 40 when the network failed to produce ⟨eos⟩with the narrower beam. As shown in Fig. 2, decoding with a wider beam gives little-to-none benefit. 5 Results Table 1: Phoneme error rates (PER). The bold-faced PER corresponds to the best error rate with an attention-based recurrent sequence generator (ARSG) incorporating convolutional attention features and a smooth focus. Model Dev Test Baseline Model 15.9% 18.7% Baseline + Conv. Features 16.1% 18.0% Baseline + Conv. Features + Smooth Focus 15.8% 17.6% RNN Transducer [16] N/A 17.7% HMM over Time and Frequency Convolutional Net [25] 13.9% 16.7% All the models achieved competitive PERs (see Table 1). With the convolutional features, we see 3.7% relative improvement over the baseline and further 5.9% with the smoothing. To our surprise (see Sec. 2.1.), the baseline model learned to align properly. An alignment produced by the baseline model on a sequence with repeated phonemes (utterance FDHC0 SX209) is presented in Fig. 3 which demonstrates that the baseline model is not confused by short-range repetitions. We can also see from the figure that it prefers to select frames that are near the beginning or 3 Applying the weight noise from the beginning of training caused severe underfitting. 6 Figure 4: Results of force-aligning the concatenated utterances. Each dot represents a single utterance created by either concatenating multiple copies of the same utterance, or of different, randomly chosen utterances. We clearly see that the highest robustness is achieved when the hybrid attention mechanism is combined with the proposed sharpening technique (see the bottom-right plot.) even slightly before the phoneme location provided as a part of the dataset. The alignments produced by the other models were very similar visually. 5.1 Forced Alignment of Long Utterances The good performance of the baseline model led us to the question of how it distinguishes between repetitions of similar phoneme sequences and how reliably it decodes longer sequences with more repetitions. We created two datasets of long utterances; one by repeating each test utterance, and the other by concatenating randomly chosen utterances. In both cases, the waveforms were cross-faded with a 0.05s silence inserted as the “pau” phone. We concatenated up to 15 utterances. First, we checked the forced alignment with these longer utterances by forcing the generator to emit the correct phonemes. Each alignment was considered correct if 90% of the alignment weight lies inside the ground-truth phoneme window extended by 20 frames on each side. Under this definition, all phones but the ⟨eos⟩shown in Fig. 3 are properly aligned. The first column of Fig. 4 shows the number of correctly aligned frames w.r.t. the utterance length (in frames) for some of the considered models. One can see that the baseline model was able to decode sequences up to about 120 phones when a single utterance was repeated, and up to about 150 phones when different utterances were concatenated. Even when it failed, it correctly aligned about 50 phones. On the other hand, the model with the hybrid attention mechanism with convolutional features was able to align sequences up to 200 phones long. However, once it began to fail, the model was not able to align almost all phones. The model with the smoothing behaved similarly to the one with convolutional features only. We examined failed alignments to understand these two different modes of failure. Some of the examples are shown in the Supplementary Materials. We found that the baseline model properly aligns about 40 first phones, then makes a jump to the end of the recording and cycles over the last 10 phones. This behavior suggests that it learned to track its approximate location in the source sequence. However, the tracking capability is limited to the lengths observed during training. Once the tracker saturates, it jumps to the end of the recording. In contrast, when the location-aware network failed it just stopped aligning – no particular frames were selected for each phone. We attribute this behavior to the issue of noisy glimpse discussed in Sec. 2.3. With a long utterance there are many irrelevant frames negatively affecting the weight assigned to the correct frames. In line with this conjecture, the location-aware network works slightly better on the repetition of the same utterance, where all frames are somehow relevant, than on the concatenation of different utterances, where each misaligned frame is irrelevant. To gain more insight we applied the alignment sharpening schemes described in Sec. 2.3. In the remaining columns of Fig. 4, we see that the sharpening methods help the location-aware network to find proper alignments, while they show little effect on the baseline network. The windowing 7 Baseline Conv Feats Smooth Focus G G G GG G G G GG 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 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 18 20 22 24 3 6 9 3 6 9 3 6 9 Number of repetitions Phoneme error rate [%] Decoding algorithm G G Keep 20 Keep 50 Win ± 75 Win ± 150 Dataset Mixed Utt. Same Utt. Phoneme error rates on long utterances Figure 5: Phoneme error rates obtained on decoding long sequences. Each network was decoded with alignment sharpening techniques that produced proper forced alignments. The proposed ARSG’s are clearly more robust to the length of the utterances than the baseline one is. technique helps both the baseline and location-aware networks, with the location-aware network properly aligning nearly all sequences. During visual inspection, we noticed that in the middle of very long utterances the baseline model was confused by repetitions of similar content within the window, and that such confusions did not happen in the beginning. This supports our conjecture above. 5.2 Decoding Long Utterances We evaluated the models on long sequences. Each model was decoded using the alignment sharpening techniques that helped to obtain proper forced alignments. The results are presented in Fig. 5. The baseline model fails to decode long utterances, even when a narrow window is used to constrain the alignments it produces. The two other location-aware networks are able to decode utterances formed by concatenating up to 11 test utterances. Better results were obtained with a wider window, presumably because it resembles more the training conditions when at each step the attention mechanism was seeing the whole input sequence. With the wide window, both of the networks scored about 20% PER on the long utterances, indicating that the proposed location-aware attention mechanism can scale to sequences much longer than those in the training set with only minor modifications required at the decoding stage. 6 Conclusions We proposed and evaluated a novel end-to-end trainable speech recognition architecture based on a hybrid attention mechanism which combines both content and location information in order to select the next position in the input sequence for decoding. One desirable property of the proposed model is that it can recognize utterances much longer than the ones it was trained on. In the future, we expect this model to be used to directly recognize text from speech [10, 17], in which case it may become important to incorporate a monolingual language model to the ARSG architecture [26]. This work has contributed two novel ideas for attention mechanisms: a better normalization approach yielding smoother alignments and a generic principle for extracting and using features from the previous alignments. Both of these can potentially be applied beyond speech recognition. For instance, the proposed attention can be used without modification in neural Turing machines, or by using 2–D convolution instead of 1–D, for improving image caption generation [3]. Acknowledgments All experiments were conducted using Theano [27, 28], PyLearn2 [29], and Blocks [30] libraries. The authors would like to acknowledge the support of the following agencies for research funding and computing support: National Science Center (Poland) grant Sonata 8 2014/15/D/ST6/04402, NSERC, Calcul Qu´ebec, Compute Canada, the Canada Research Chairs and CIFAR. D. Bahdanau also thanks Planet Intelligent Systems GmbH and Yandex. 8 References [1] A. Graves. Generating sequences with recurrent neural networks. arXiv:1308.0850, August 2013. [2] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of the 3rd ICLR, 2015. arXiv:1409.0473. [3] K. Xu, J. Ba, R. Kiros, et al. Show, attend and tell: Neural image caption generation with visual attention. In Proc. of the 32nd ICML, 2015. arXiv:1502.03044. [4] V. Mnih, N. Heess, A. Graves, et al. Recurrent models of visual attention. In Proc. of the 27th NIPS, 2014. arXiv:1406.6247. [5] J. Chorowski, D. Bahdanau, K. Cho, and Y. Bengio. End-to-end continuous speech recognition using attention-based recurrent NN: First results. arXiv:1412.1602 [cs, stat], December 2014. [6] A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. arXiv:1410.5401, 2014. [7] J. Weston, S. Chopra, and A. Bordes. Memory networks. arXiv:1410.3916, 2014. [8] M. Gales and S. Young. The application of hidden markov models in speech recognition. Found. Trends Signal Process., 1(3):195–304, January 2007. [9] G. Hinton, L. Deng, D. Yu, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, November 2012. [10] A. Hannun, C. Case, J. Casper, et al. Deepspeech: Scaling up end-to-end speech recognition. arXiv:1412.5567, 2014. [11] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural. Comput., 9(8):1735–1780, 1997. [12] K. Cho, B. van Merrienboer, C. Gulcehre, et al. Learning phrase representations using RNN encoderdecoder for statistical machine translation. In EMNLP, October 2014. to appear. [13] A. Graves, S. Fern´andez, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networks. In Proc. of the 23rd ICML-06, 2006. [14] A. Graves. Sequence transduction with recurrent neural networks. In Proc. of the 29th ICML, 2012. [15] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient based learning applied to document recognition. Proc. IEEE, 1998. [16] A. Graves, A.-r. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In ICASSP 2013, pages 6645–6649. IEEE, 2013. [17] A. Graves and N. Jaitly. Towards end-to-end speech recognition with recurrent neural networks. In Proc. of the 31st ICML, 2014. [18] S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. Weakly supervised memory networks. arXiv:1503.08895, 2015. [19] J. S. Garofolo, L. F. Lamel, W. M. Fisher, et al. DARPA TIMIT acoustic phonetic continuous speech corpus, 1993. [20] D. Povey, A. Ghoshal, G. Boulianne, et al. The kaldi speech recognition toolkit. In Proc. ASRU, 2011. [21] M. D. Zeiler. ADADELTA: An adaptive learning rate method. arXiv:1212.5701, 2012. [22] A. Graves. Practical variational inference for neural networks. In Proc of the 24th NIPS, 2011. [23] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012. [24] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In Proc. of the 27th NIPS, 2014. arXiv:1409.3215. [25] L. T´oth. Combining time-and frequency-domain convolution in convolutional neural network-based phone recognition. In Proc. ICASSP, 2014. [26] C. Gulcehre, O. Firat, K. Xu, et al. On using monolingual corpora in neural machine translation. arXiv:1503.03535, 2015. [27] J. Bergstra, O. Breuleux, F. Bastien, et al. Theano: a CPU and GPU math expression compiler. In Proc. SciPy, 2010. [28] F. Bastien, P. Lamblin, R. Pascanu, et al. Theano: new features and speed improvements. Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop, 2012. [29] I. J. Goodfellow, D. Warde-Farley, P. Lamblin, et al. Pylearn2: a machine learning research library. arXiv preprint arXiv:1308.4214, 2013. [30] B. van Merri¨enboer, D. Bahdanau, V. Dumoulin, et al. Blocks and fuel: Frameworks for deep learning. arXiv:1506.00619 [cs, stat], June 2015. 9 | 2015 | 29 |
5,802 | Frank-Wolfe Bayesian Quadrature: Probabilistic Integration with Theoretical Guarantees Franc¸ois-Xavier Briol Department of Statistics University of Warwick f-x.briol@warwick.ac.uk Chris J. Oates School of Mathematical and Physical Sciences University of Technology, Sydney christopher.oates@uts.edu.au Mark Girolami Department of Statistics University of Warwick m.girolami@warwick.ac.uk Michael A. Osborne Department of Engineering Science University of Oxford mosb@robots.ox.ac.uk Abstract There is renewed interest in formulating integration as a statistical inference problem, motivated by obtaining a full distribution over numerical error that can be propagated through subsequent computation. Current methods, such as Bayesian Quadrature, demonstrate impressive empirical performance but lack theoretical analysis. An important challenge is therefore to reconcile these probabilistic integrators with rigorous convergence guarantees. In this paper, we present the first probabilistic integrator that admits such theoretical treatment, called Frank-Wolfe Bayesian Quadrature (FWBQ). Under FWBQ, convergence to the true value of the integral is shown to be up to exponential and posterior contraction rates are proven to be up to super-exponential. In simulations, FWBQ is competitive with state-of-the-art methods and out-performs alternatives based on Frank-Wolfe optimisation. Our approach is applied to successfully quantify numerical error in the solution to a challenging Bayesian model choice problem in cellular biology. 1 Introduction Computing integrals is a core challenge in machine learning and numerical methods play a central role in this area. This can be problematic when a numerical integration routine is repeatedly called, maybe millions of times, within a larger computational pipeline. In such situations, the cumulative impact of numerical errors can be unclear, especially in cases where the error has a non-trivial structural component. One solution is to model the numerical error statistically and to propagate this source of uncertainty through subsequent computations. Conversely, an understanding of how errors arise and propagate can enable the efficient focusing of computational resources upon the most challenging numerical integrals in a pipeline. Classical numerical integration schemes do not account for prior information on the integrand and, as a consequence, can require an excessive number of function evaluations to obtain a prescribed level of accuracy [21]. Alternatives such as Quasi-Monte Carlo (QMC) can exploit knowledge on the smoothness of the integrand to obtain optimal convergence rates [7]. However these optimal rates can only hold on sub-sequences of sample sizes n, a consequence of the fact that all function evaluations are weighted equally in the estimator [24]. A modern approach that avoids this problem is to consider arbitrarily weighted combinations of function values; the so-called quadrature rules (also called cubature rules). Whilst quadrature rules with non-equal weights have received comparatively little theoretical attention, it is known that the extra flexibility given by arbitrary weights can 1 lead to extremely accurate approximations in many settings (see applications to image de-noising [3] and mental simulation in psychology [13]). Probabilistic numerics, introduced in the seminal paper of [6], aims at re-interpreting numerical tasks as inference tasks that are amenable to statistical analysis.1 Recent developments include probabilistic solvers for linear systems [14] and differential equations [5, 26]. For the task of computing integrals, Bayesian Quadrature (BQ) [22] and more recent work by [20] provide probabilistic numerics methods that produce a full posterior distribution on the output of numerical schemes. One advantage of this approach is that we can propagate uncertainty through all subsequent computations to explicitly model the impact of numerical error [15]. Contrast this with chaining together classical error bounds; the result in such cases will typically be a weak bound that provides no insight into the error structure. At present, a significant shortcoming of these methods is the absence of theoretical results relating to rates of posterior contraction. This is unsatisfying and has likely hindered the adoption of probabilistic approaches to integration, since it is not clear that the induced posteriors represent a sensible quantification of the numerical error (by classical, frequentist standards). This paper establishes convergence rates for a new probabilistic approach to integration. Our results thus overcome a key perceived weakness associated with probabilistic numerics in the quadrature setting. Our starting point is recent work by [2], who cast the design of quadrature rules as a problem in convex optimisation that can be solved using the Frank-Wolfe (FW) algorithm. We propose a hybrid approach of [2] with BQ, taking the form of a quadrature rule, that (i) carries a full probabilistic interpretation, (ii) is amenable to rigorous theoretical analysis, and (iii) converges orders-of-magnitude faster, empirically, compared with the original approaches in [2]. In particular, we prove that super-exponential rates hold for posterior contraction (concentration of the posterior probability mass on the true value of the integral), showing that the posterior distribution provides a sensible and effective quantification of the uncertainty arising from numerical error. The methodology is explored in simulations and also applied to a challenging model selection problem from cellular biology, where numerical error could lead to mis-allocation of expensive resources. 2 Background 2.1 Quadrature and Cubature Methods Let X ⊆Rd be a measurable space such that d ∈N+ and consider a probability density p(x) defined with respect to the Lebesgue measure on X. This paper focuses on computing integrals of the form R f(x)p(x)dx for a test function f : X →R where, for simplicity, we assume f is square-integrable with respect to p(x). A quadrature rule approximates such integrals as a weighted sum of function values at some design points {xi}n i=1 ⊂X: Z X f(x)p(x)dx ≈ n X i=1 wif(xi). (1) Viewing integrals as projections, we write p[f] for the left-hand side and ˆp[f] for the right-hand side, where ˆp = Pn i=1 wiδ(xi) and δ(xi) is a Dirac measure at xi. Note that ˆp may not be a probability distribution; in fact, weights {wi}n i=1 do not have to sum to one or be non-negative. Quadrature rules can be extended to multivariate functions f : X →Rd by taking each component in turn. There are many ways of choosing combinations {xi, wi}n i=1 in the literature. For example, taking weights to be wi = 1/n with points {xi}n i=1 drawn independently from the probability distribution p(x) recovers basic Monte Carlo integration. The case with weights wi = 1/n, but with points chosen with respect to some specific (possibly deterministic) schemes includes kernel herding [4] and Quasi-Monte Carlo (QMC) [7]. In Bayesian Quadrature, the points {xi}n i=1 are chosen to minimise a posterior variance, with weights {wi}n i=1 arising from a posterior probability distribution. Classical error analysis for quadrature rules is naturally couched in terms of minimising the worstcase estimation error. Let H be a Hilbert space of functions f : X →R, equipped with the inner 1A detailed discussion on probabilistic numerics and an extensive up-to-date bibliography can be found at http://www.probabilistic-numerics.org. 2 product ⟨·, ·⟩H and associated norm ∥· ∥H. We define the maximum mean discrepancy (MMD) as: MMD {xi, wi}n i=1 := sup f∈H:∥f∥H=1 p[f] −ˆp[f] . (2) The reader can refer to [27] for conditions on H that are needed for the existence of the MMD. The rate at which the MMD decreases with the number of samples n is referred to as the ‘convergence rate’ of the quadrature rule. For Monte Carlo, the MMD decreases with the slow rate of OP (n−1/2) (where the subscript P specifies that the convergence is in probability). Let H be a RKHS with reproducing kernel k : X ×X →R and denote the corresponding canonical feature map by Φ(x) = k(·, x), so that the mean element is given by µp(x) = p[Φ(x)] ∈H. Then, following [27] MMD {xi, wi}n i=1 = ∥µp −µˆp∥H. (3) This shows that to obtain low integration error in the RKHS H, one only needs to obtain a good approximation of its mean element µp (as ∀f ∈H: p[f] = ⟨f, µp⟩H). Establishing theoretical results for such quadrature rules is an active area of research [1]. 2.2 Bayesian Quadrature Bayesian Quadrature (BQ) was originally introduced in [22] and later revisited by [11, 12] and [23]. The main idea is to place a functional prior on the integrand f, then update this prior through Bayes’ theorem by conditioning on both samples {xi}n i=1 and function evaluations at those sample points {fi}n i=1 where fi = f(xi). This induces a full posterior distribution over functions f and hence over the value of the integral p[f]. The most common implementation assumes a Gaussian Process (GP) prior f ∼GP(0, k). A useful property motivating the use of GPs is that linear projection preserves normality, so that the posterior distribution for the integral p[f] is also a Gaussian, characterised by its mean and covariance. A natural estimate of the integral p[f] is given by the mean of this posterior distribution, which can be compactly written as ˆpBQ[f] = zT K−1f. (4) where zi = µp(xi) and Kij = k(xi, xj). Notice that this estimator takes the form of a quadrature rule with weights wBQ = zT K−1. Recently, [25] showed how specific choices of kernel and design points for BQ can recover classical quadrature rules. This begs the question of how to select design points {xi}n i=1. A particularly natural approach aims to minimise the posterior uncertainty over the integral p[f], which was shown in [16, Prop. 1] to equal: vBQ {xi}n i=1 = p[µp] −zT K−1z = MMD2 {xi, wBQ i }n i=1 . (5) Thus, in the RKHS setting, minimising the posterior variance corresponds to minimising the worst case error of the quadrature rule. Below we refer to Optimal BQ (OBQ) as BQ coupled with design points {xOBQ i }n i=1 chosen to globally minimise (5). We also call Sequential BQ (SBQ) the algorithm that greedily selects design points to give the greatest decrease in posterior variance at each iteration. OBQ will give improved results over SBQ, but cannot be implemented in general, whereas SBQ is comparatively straight-forward to implement. There are currently no theoretical results establishing the convergence of either BQ, OBQ or SBQ. Remark: (5) is independent of observed function values f. As such, no active learning is possible in SBQ (i.e. surprising function values never cause a revision of a planned sampling schedule). This is not always the case: For example [12] approximately encodes non-negativity of f into BQ which leads to a dependence on f in the posterior variance. In this case sequential selection becomes an active strategy that outperforms batch selection in general. 2.3 Deriving Quadrature Rules via the Frank-Wolfe Algorithm Despite the elegance of BQ, its convergence rates have not yet been rigorously established. In brief, this is because ˆpBQ[f] is an orthogonal projection of f onto the affine hull of {Φ(xi)}n i=1, rather than e.g. the convex hull. Standard results from the optimisation literature apply to bounded domains, but the affine hull is not bounded (i.e. the BQ weights can be arbitrarily large and possibly negative). Below we describe a solution to the problem of computing integrals recently proposed by [2], based on the FW algorithm, that restricts attention to the (bounded) convex hull of {Φ(xi)}n i=1. 3 Algorithm 1 The Frank-Wolfe (FW) and Frank-Wolfe with Line-Search (FWLS) Algorithms. Require: function J, initial state g1 = ¯g1 ∈G (and, for FW only: step-size sequence {ρi}n i=1). 1: for i = 2, . . . , n do 2: Compute ¯gi = argming∈G g, (DJ)(gi−1) × 3: [For FWLS only, line search: ρi = argminρ∈[0,1]J (1 −ρ)gi−1 + ρ ¯gi ] 4: Update gi = (1 −ρi)gi−1 + ρi¯gi 5: end for The Frank-Wolfe (FW) algorithm (Alg. 1), also called the conditional gradient algorithm, is a convex optimization method introduced in [9]. It considers problems of the form ming∈G J(g) where the function J : G →R is convex and continuously differentiable. A particular case of interest in this paper will be when the domain G is a compact and convex space of functions, as recently investigated in [17]. These assumptions imply the existence of a solution to the optimization problem. In order to define the algorithm rigorously in this case, we introduce the Fr´echet derivative of J, denoted DJ, such that for H∗being the dual space of H, we have the unique map DJ : H →H∗ such that for each g ∈H, (DJ)(g) is the function mapping h ∈H to (DJ)(g)(h) = g −µ, h H. We also introduce the bilinear map ⟨·, ·⟩× : H × H∗→R which, for F ∈H∗given by F(g) = ⟨g, f⟩H, is the rule giving ⟨h, F⟩× = ⟨h, f⟩H. At each iteration i, the FW algorithm computes a linearisation of the objective function J at the previous state gi−1 ∈G along its gradient (DJ)(gi−1) and selects an ‘atom’ ¯gi ∈G that minimises the inner product a state g and (DJ)(gi−1). The new state gi ∈G is then a convex combination of the previous state gi−1 and of the atom ¯gi. This convex combination depends on a step-size ρi which is pre-determined and different versions of the algorithm may have different step-size sequences. Our goal in quadrature is to approximate the mean element µp. Recently [2] proposed to frame integration as a FW optimisation problem. Here, the domain G ⊆H is a space of functions and taking the objective function to be: J(g) = 1 2
g −µp
2 H. (6) This gives an approximation of the mean element and J takes the form of half the posterior variance (or the MMD2). In this functional approximation setting, minimisation of J is carried out over G = M, the marginal polytope of the RKHS H. The marginal polytope M is defined as the closure of the convex hull of Φ(X), so that in particular µp ∈M. Assuming as in [18] that Φ(x) is uniformly bounded in feature space (i.e. ∃R > 0 : ∀x ∈X, ∥Φ(x)∥H ≤R), then M is a closed and bounded set and can be optimised over. A particular advantage of this method is that it leads to ‘sparse’ solutions which are linear combinations of the atoms {¯gi}n i=1 [2]. In particular this provides a weighted estimate for the mean element: ˆµFW := gn = n X i=1 n Y j=i+1 1 −ρj−1 ρi−1 ¯gi := n X i=1 wFW i ¯gi, (7) where by default ρ0 = 1 which leads to all wFW i ∈[0, 1] when ρi = 1/(i+1). A typical sequence of approximations to the mean element is shown in Fig. 1 (left), demonstrating that the approximation quickly converges to the ground truth (in black). Since minimisation of a linear function can be restricted to extreme points of the domain, the atoms will be of the form ¯gi = Φ(xFW i ) = k(·, xFW i ) for some xFW i ∈X. The minimisation in g over G from step 2 in Algorithm 1 therefore becomes a minimisation in x over X and this algorithm therefore provides us design points. In practice, at each iteration i, the FW algorithm hence selects a design point xFW i ∈X which induces an atom ¯gi and gives us an approximation of the mean element µp. We denote by ˆµFW this approximation after n iterations. Using the reproducing property, we can show that the FW estimate is a quadrature rule: ˆpFW[f] := f, ˆµFW H = D f, n X i=1 wFW i ¯gi E H = n X i=1 wFW i f, k(·, xFW i ) H = n X i=1 wFW i f(xFW i ). (8) The total computational cost for FW is O(n2). An extension known as FW with Line Search (FWLS) uses a line-search method to find the optimal step size ρi at each iteration (see Alg. 1). 4 ** * * * * * * * * * * * * * * * * * * * * * * ** * * ** * * * * * * * * * * * * * * * * * * **** ** * * * * * * * * * * * * * * * * * * −10 0 10 −10 0 10 x1 x2 Figure 1: Left: Approximations of the mean element µp using the FWLS algorithm, based on n = 1, 2, 5, 10, 50 design points (purple, blue, green, red and orange respectively). It is not possible to distinguish between approximation and ground truth when n = 50. Right: Density of a mixture of 20 Gaussian distributions, displaying the first n = 25 design points chosen by FW (red), FWLS (orange) and SBQ (green). Each method provides well-spaced design points in high-density regions. Most FW and FWLS design points overlap, partly explaining their similar performance in this case. Once again, the approximation obtained by FWLS has a sparse expression as a convex combination of all the previously visited states and we obtain an associated quadrature rule. FWLS has theoretical convergence rates that can be stronger than standard versions of FW but has computational cost in O(n3). The authors in [10] provide a survey of FW-based algorithms and their convergence rates under different regularity conditions on the objective function and domain of optimisation. Remark: The FW design points {xFW i }n i=1 are generally not available in closed-form. We follow mainstream literature by selecting, at each iteration, the point that minimises the MMD over a finite collection of M points, drawn i.i.d from p(x). The authors in [18] proved that this approximation adds a O(M −1/4) term to the MMD, so that theoretical results on FW convergence continue to apply provided that M(n) →∞sufficiently quickly. Appendix A provides full details. In practice, one may also make use of a numerical optimisation scheme in order to select the points. 3 A Hybrid Approach: Frank-Wolfe Bayesian Quadrature To combine the advantages of a probabilistic integrator with a formal convergence theory, we propose Frank-Wolfe Bayesian Quadrature (FWBQ). In FWBQ, we first select design points {xFW i }n i=1 using the FW algorithm. However, when computing the quadrature approximation, instead of using the usual FW weights {wFW i }n i=1 we use instead the weights {wBQ i }n i=1 provided by BQ. We denote this quadrature rule by ˆpFWBQ and also consider ˆpFWLSBQ, which uses FWLS in place of FW. As we show below, these hybrid estimators (i) carry the Bayesian interpretation of Sec. 2.2, (ii) permit a rigorous theoretical analysis, and (iii) out-perform existing FW quadrature rules by orders of magnitude in simulations. FWBQ is hence ideally suited to probabilistic numerics applications. For these theoretical results we assume that f belongs to a finite-dimensional RKHS H, in line with recent literature [2, 10, 17, 18]. We further assume that X is a compact subset of Rd, that p(x) > 0 ∀x ∈X and that k is continuous on X × X. Under these hypotheses, Theorem 1 establishes consistency of the posterior mean, while Theorem 2 establishes contraction for the posterior distribution. Theorem 1 (Consistency). The posterior mean ˆpFWBQ[f] converges to the true integral p[f] at the following rates: p[f] −ˆpFWBQ[f] ≤MMD {xi, wi}n i=1 ≤ ( 2D2 R n−1 for FWBQ √ 2D exp(−R2 2D2 n) for FWLSBQ (9) where the FWBQ uses step-size ρi = 1/(i+1), D ∈(0, ∞) is the diameter of the marginal polytope M and R ∈(0, ∞) gives the radius of the smallest ball of center µp included in M. 5 Note that all the proofs of this paper can be found in Appendix B. An immediate corollary of Theorem 1 is that FWLSBQ has an asymptotic error which is exponential in n and is therefore superior to that of any QMC estimator [7]. This is not a contradiction - recall that QMC restricts attention to uniform weights, while FWLSBQ is able to propose arbitrary weightings. In addition we highlight a robustness property: Even when the assumptions of this section do not hold, one still obtains atleast a rate OP (n−1/2) for the posterior mean using either FWBQ or FWLSBQ [8]. Remark: The choice of kernel affects the convergence of the FWBQ method [15]. Clearly, we expect faster convergence if the function we are integrating is ‘close’ to the space of functions induced by our kernel. Indeed, the kernel specifies the geometry of the marginal polytope M, that in turn directly influences the rate constant R and D associated with FW convex optimisation. Consistency is only a stepping stone towards our main contribution which establishes posterior contraction rates for FWBQ. Posterior contraction is important as these results justify, for the first time, the probabilistic numerics approach to integration; that is, we show that the full posterior distribution is a sensible quantification (at least asymptotically) of numerical error in the integration routine: Theorem 2 (Contraction). Let S ⊆R be an open neighbourhood of the true integral p[f] and let γ = infr∈SC |r −p[f]| > 0. Then the posterior probability mass on Sc = R \ S vanishes at a rate: prob(Sc) ≤ 2 √ 2D2 √πRγ n−1 exp −γ2R2 8D4 n2 for FWBQ 2D √πγ exp − R2 2D2 n − γ2 2 √ 2D exp R2 2D2 n for FWLSBQ (10) where the FWBQ uses step-size ρi = 1/(i+1), D ∈(0, ∞) is the diameter of the marginal polytope M and R ∈(0, ∞) gives the radius of the smallest ball of center µp included in M. The contraction rates are exponential for FWBQ and super-exponential for FWLBQ, and thus the two algorithms enjoy both a probabilistic interpretation and rigorous theoretical guarantees. A notable corollary is that OBQ enjoys the same rates as FWLSBQ, resolving a conjecture by Tony O’Hagan that OBQ converges exponentially [personal communication]: Corollary. The consistency and contraction rates obtained for FWLSBQ apply also to OBQ. 4 Experimental Results 4.1 Simulation Study To facilitate the experiments in this paper we followed [1, 2, 11, 18] and employed an exponentiatedquadratic (EQ) kernel k(x, x′) := λ2 exp(−1/2σ2∥x −x′∥2 2). This corresponds to an infinitedimensional RKHS, not covered by our theory; nevertheless, we note that all simulations are practically finite-dimensional due to rounding at machine precision. See Appendix E for a finitedimensional approximation using random Fourier features. EQ kernels are popular in the BQ literature as, when p is a mixture of Gaussians, the mean element µp is analytically tractable (see Appendix C). Some other (p, k) pairs that produce analytic mean elements are discussed in [1]. For this simulation study, we took p(x) to be a 20-component mixture of 2D-Gaussian distributions. Monte Carlo (MC) is often used for such distributions but has a slow convergence rate in OP (n−1/2). FW and FWLS are known to converge more quickly and are in this sense preferable to MC [2]. In our simulations (Fig. 2, left), both our novel methods FWBQ and FWLSBQ decreased the MMD much faster than the FW/FWLS methods of [2]. Here, the same kernel hyper-parameters (λ, σ) = (1, 0.8) were employed for all methods to have a fair comparison. This suggests that the best quadrature rules correspond to elements outside the convex hull of {Φ(xi)}n i=1. Examples of those, including BQ, often assign negative weights to features (Fig. S1 right, Appendix D). The principle advantage of our proposed methods is that they reconcile theoretical tractability with a fully probabilistic interpretation. For illustration, Fig. 2 (right) plots the posterior uncertainty due to numerical error for a typical integration problem based on this p(x). In-depth empirical studies of such posteriors exist already in the literature and the reader is referred to [3, 13, 22] for details. Beyond these theoretically tractable integrators, SBQ seems to give even better performance as n increases. An intuitive explanation is that SBQ picks {xi}n i=1 to minimise the MMD whereas 6 −0.1 0.0 0.1 100 200 300 number of design points Estimator FWLS FWLSBQ Figure 2: Simulation study. Left: Plot of the worst-case integration error squared (MMD2). Both FWBQ and FWLSBQ are seen to outperform FW and FWLS, with SBQ performing best overall. Right: Integral estimates for FWLS and FWLSBQ for a function f ∈H. FWLS converges more slowly and provides only a point estimate for a given number of design points. In contrast, FWLSBQ converges faster and provides a full probability distribution over numerical error shown shaded in orange (68% and 95% credible intervals). Ground truth corresponds to the dotted black line. FWBQ and FWLSBQ only minimise an approximation of the MMD (its linearisation along DJ). In addition, the SBQ weights are optimal at each iteration, which is not true for FWBQ and FWLSBQ. We conjecture that Theorem 1 and 2 provide upper bounds on the rates of SBQ. This conjecture is partly supported by Fig. 1 (right), which shows that SBQ selects similar design points to FW/FWLS (but weights them optimally). Note also that both FWBQ and FWLSBQ give very similar result. This is not surprising as FWLS has no guarantees over FW in infinite-dimensional RKHS [17]. 4.2 Quantifying Numerical Error in a Proteomic Model Selection Problem A topical bioinformatics application that extends recent work by [19] is presented. The objective is to select among a set of candidate models {Mi}m i=1 for protein regulation. This choice is based on a dataset D of protein expression levels, in order to determine a ‘most plausible’ biological hypothesis for further experimental investigation. Each Mi is specified by a vector of kinetic parameters θi (full details in Appendix D). Bayesian model selection requires that these parameters are integrated out against a prior p(θi) to obtain marginal likelihood terms L(Mi) = R p(D|θi)p(θi)dθi. Our focus here is on obtaining the maximum a posteriori (MAP) model Mj, defined as the maximiser of the posterior model probability L(Mj)/ Pm i=1 L(Mi) (where we have assumed a uniform prior over model space). Numerical error in the computation of each term L(Mi), if unaccounted for, could cause us to return a model Mk that is different from the true MAP estimate Mj and lead to the mis-allocation of valuable experimental resources. The problem is quickly exaggerated when the number m of models increases, as there are more opportunities for one of the L(Mi) terms to be ‘too large’ due to numerical error. In [19], the number m of models was combinatorial in the number of protein kinases measured in a high-throughput assay (currently ∼102 but in principle up to ∼104). This led [19] to deploy substantial computing resources to ensure that numerical error in each estimate of L(Mi) was individually controlled. Probabilistic numerics provides a more elegant and efficient solution: At any given stage, we have a fully probabilistic quantification of our uncertainty in each of the integrals L(Mi), shown to be sensible both theoretically and empirically. This induces a full posterior distribution over numerical uncertainty in the location of the MAP estimate (i.e. ‘Bayes all the way down’). As such we can determine, on-line, the precise point in the computational pipeline when numerical uncertainty near the MAP estimate becomes acceptably small, and cease further computation. The FWBQ methodology was applied to one of the model selection tasks in [19]. In Fig. 3 (left) we display posterior model probabilities for each of m = 352 candidates models, where a low number (n = 10) of samples were used for each integral. (For display clarity only the first 50 models are shown.) In this low-n regime, numerical error introduces a second level of uncertainty that we quantify by combining the FWBQ error models for all integrals in the computational pipeline; this is summarised by a box plot (rather than a single point) for each of the models (obtained by sampling - details in Appendix D). These box plots reveal that our estimated posterior model probabilities are 7 10 20 30 40 50... 0 0.01 0.02 0.03 Candidate Models Posterior Probability n = 10 10 20 30 40 50... 0 0.02 0.04 0.06 Candidate Models Posterior Probability n = 100 Figure 3: Quantifying numerical error in a model selection problem. FWBQ was used to model the numerical error of each integral L(Mi) explicitly. For integration based on n = 10 design points, FWBQ tells us that the computational estimate of the model posterior will be dominated by numerical error (left). When instead n = 100 design points are used (right), uncertainty due to numerical error becomes much smaller (but not yet small enough to determine the MAP estimate). completely dominated by numerical error. In contrast, when n is increased through 50, 100 and 200 (Fig. 3, right and Fig. S2), the uncertainty due to numerical error becomes negligible. At n = 200 we can conclude that model 26 is the true MAP estimate and further computations can be halted. Correctness of this result was confirmed using the more computationally intensive methods in [19]. In Appendix D we compared the relative performance of FWBQ, FWLSBQ and SBQ on this problem. Fig. S1 shows that the BQ weights reduced the MMD by orders of magnitude relative to FW and FWLS and that SBQ converged more quickly than both FWBQ and FWLSBQ. 5 Conclusions This paper provides the first theoretical results for probabilistic integration, in the form of posterior contraction rates for FWBQ and FWLSBQ. This is an important step in the probabilistic numerics research programme [15] as it establishes a theoretical justification for using the posterior distribution as a model for the numerical integration error (which was previously assumed [e.g. 11, 12, 20, 23, 25]). The practical advantages conferred by a fully probabilistic error model were demonstrated on a model selection problem from proteomics, where sensitivity of an evaluation of the MAP estimate was modelled in terms of the error arising from repeated numerical integration. The strengths and weaknesses of BQ (notably, including scalability in the dimension d of X) are well-known and are inherited by our FWBQ methodology. We do not review these here but refer the reader to [22] for an extended discussion. Convergence, in the classical sense, was proven here to occur exponentially quickly for FWLSBQ, which partially explains the excellent performance of BQ and related methods seen in applications [12, 23], as well as resolving an open conjecture. As a bonus, the hybrid quadrature rules that we developed turned out to converge much faster in simulations than those in [2], which originally motivated our work. A key open problem for kernel methods in probabilistic numerics is to establish protocols for the practical elicitation of kernel hyper-parameters. This is important as hyper-parameters directly affect the scale of the posterior over numerical error that we ultimately aim to interpret. Note that this problem applies equally to BQ, as well as related quadrature methods [2, 11, 12, 20] and more generally in probabilistic numerics [26]. Previous work, such as [13], optimised hyper-parameters on a perapplication basis. Our ongoing research seeks automatic and general methods for hyper-parameter elicitation that provide good frequentist coverage properties for posterior credible intervals, but we reserve the details for a future publication. Acknowledgments The authors are grateful for discussions with Simon Lacoste-Julien, Simo S¨arkk¨a, Arno Solin, Dino Sejdinovic, Tom Gunter and Mathias Cronj¨ager. FXB was supported by EPSRC [EP/L016710/1]. CJO was supported by EPSRC [EP/D002060/1]. MG was supported by EPSRC [EP/J016934/1], an EPSRC Established Career Fellowship, the EU grant [EU/259348] and a Royal Society Wolfson Research Merit Award. 8 References [1] F. Bach. On the Equivalence between Quadrature Rules and Random Features. arXiv:1502.06800, 2015. [2] F. Bach, S. Lacoste-Julien, and G. Obozinski. On the Equivalence between Herding and Conditional Gradient Algorithms. In Proceedings of the 29th International Conference on Machine Learning, pages 1359–1366, 2012. [3] Y. Chen, L. Bornn, N. de Freitas, M. Eskelin, J. Fang, and M. Welling. Herded Gibbs Sampling. Journal of Machine Learning Research, 2015. To appear. [4] Y. Chen, M. Welling, and A. Smola. Super-Samples from Kernel Herding. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, pages 109–116, 2010. [5] P. Conrad, M. Girolami, S. S¨arkk¨a, A. Stuart, and K. Zygalakis. Probability Measures for Numerical Solutions of Differential Equations. arXiv:1506.04592, 2015. [6] P. Diaconis. Bayesian Numerical Analysis. Statistical Decision Theory and Related Topics IV, pages 163–175, 1988. [7] J. Dick and F. Pillichshammer. Digital Nets and Sequences - Discrepancy Theory and Quasi-Monte Carlo Integration. Cambridge University Press, 2010. [8] J. C. Dunn. Convergence Rates for Conditional Gradient Sequences Generated by Implicit Step Length Rules. SIAM Journal on Control and Optimization, 18(5):473–487, 1980. [9] M. Frank and P. Wolfe. An Algorithm for Quadratic Programming. Naval Research Logistics Quarterly, 3:95–110, 1956. [10] D. Garber and E. Hazan. Faster Rates for the Frank-Wolfe Method over Strongly-Convex Sets. In Proceedings of the 32nd International Conference on Machine Learning, pages 541–549, 2015. [11] Z. Ghahramani and C. Rasmussen. Bayesian Monte Carlo. In Advances in Neural Information Processing Systems, pages 489–496, 2003. [12] T. Gunter, R. Garnett, M. Osborne, P. Hennig, and S. Roberts. Sampling for Inference in Probabilistic Models with Fast Bayesian Quadrature. In Advances in Neural Information Processing Systems, 2014. [13] J.B. Hamrick and T.L. Griffiths. Mental Rotation as Bayesian Quadrature. In NIPS 2013 Workshop on Bayesian Optimization in Theory and Practice, 2013. [14] P. Hennig. Probabilistic Interpretation of Linear Solvers. SIAM Journal on Optimization, 25:234–260, 2015. [15] P. Hennig, M. Osborne, and M. Girolami. Probabilistic Numerics and Uncertainty in Computations. Proceedings of the Royal Society A, 471(2179), 2015. [16] F. Huszar and D. Duvenaud. Optimally-Weighted Herding is Bayesian Quadrature. In Uncertainty in Artificial Intelligence, pages 377–385, 2012. [17] M. Jaggi. Revisiting Frank-Wolfe: Projection-Free Sparse Convex Optimization. In Proceedings of the 30th International Conference on Machine Learning, volume 28, pages 427–435, 2013. [18] S. Lacoste-Julien, F. Lindsten, and F. Bach. Sequential Kernel Herding : Frank-Wolfe Optimization for Particle Filtering. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, pages 544–552, 2015. [19] C.J. Oates, F. Dondelinger, N. Bayani, J. Korkola, J.W. Gray, and S. Mukherjee. Causal Network Inference using Biochemical Kinetics. Bioinformatics, 30(17):i468–i474, 2014. [20] C.J. Oates, M. Girolami, and N. Chopin. Control Functionals for Monte Carlo Integration. arXiv: 1410.2392, 2015. [21] A. O’Hagan. Monte Carlo is Fundamentally Unsound. Journal of the Royal Statistical Society, Series D, 36(2):247–249, 1984. [22] A. O’Hagan. Bayes-Hermite Quadrature. Journal of Statistical Planning and Inference, 29:245–260, 1991. [23] M. Osborne, R. Garnett, S. Roberts, C. Hart, S. Aigrain, and N. Gibson. Bayesian Quadrature for Ratios. In Proceedings of the 15th International Conference on Artificial Intelligence and Statistics, pages 832– 840, 2012. [24] A. B. Owen. A Constraint on Extensible Quadrature Rules. Numerische Mathematik, pages 1–8, 2015. [25] S. S¨arkk¨a, J. Hartikainen, L. Svensson, and F. Sandblom. On the Relation between Gaussian Process Quadratures and Sigma-Point Methods. arXiv:1504.05994, 2015. [26] M. Schober, D. Duvenaud, and P. Hennig. Probabilistic ODE solvers with Runge-Kutta means. In Advances in Neural Information Processing Systems 27, pages 739–747, 2014. [27] B. Sriperumbudur, A. Gretton, K. Fukumizu, B. Sch¨olkopf, and G. Lanckriet. Hilbert Space Embeddings and Metrics on Probability Measures. Journal of Machine Learning Research, 11:1517–1561, 2010. 9 | 2015 | 290 |
5,803 | Deep Knowledge Tracing Chris Piech∗, Jonathan Bassen∗, Jonathan Huang∗‡, Surya Ganguli∗, Mehran Sahami∗, Leonidas Guibas∗, Jascha Sohl-Dickstein∗† ∗Stanford University, †Khan Academy, ‡Google {piech,jbassen}@cs.stanford.edu, jascha@stanford.edu, Abstract Knowledge tracing—where a machine models the knowledge of a student as they interact with coursework—is a well established problem in computer supported education. Though effectively modeling student knowledge would have high educational impact, the task has many inherent challenges. In this paper we explore the utility of using Recurrent Neural Networks (RNNs) to model student learning. The RNN family of models have important advantages over previous methods in that they do not require the explicit encoding of human domain knowledge, and can capture more complex representations of student knowledge. Using neural networks results in substantial improvements in prediction performance on a range of knowledge tracing datasets. Moreover the learned model can be used for intelligent curriculum design and allows straightforward interpretation and discovery of structure in student tasks. These results suggest a promising new line of research for knowledge tracing and an exemplary application task for RNNs. 1 Introduction Computer-assisted education promises open access to world class instruction and a reduction in the growing cost of learning. We can develop on this promise by building models of large scale student trace data on popular educational platforms such as Khan Academy, Coursera, and EdX. Knowledge tracing is the task of modelling student knowledge over time so that we can accurately predict how students will perform on future interactions. Improvement on this task means that resources can be suggested to students based on their individual needs, and content which is predicted to be too easy or too hard can be skipped or delayed. Already, hand-tuned intelligent tutoring systems that attempt to tailor content show promising results [28]. One-on-one human tutoring can produce learning gains for the average student on the order of two standard deviations [5] and machine learning solutions could provide these benefits of high quality personalized teaching to anyone in the world for free. The knowledge tracing problem is inherently difficult as human learning is grounded in the complexity of both the human brain and human knowledge. Thus, the use of rich models seems appropriate. However most previous work in education relies on first order Markov models with restricted functional forms. In this paper we present a formulation that we call Deep Knowledge Tracing (DKT) in which we apply flexible recurrent neural networks that are ‘deep’ in time to the task of knowledge tracing. This family of models represents latent knowledge state, along with its temporal dynamics, using large vectors of artificial ‘neurons’, and allows the latent variable representation of student knowledge to be learned from data rather than hard-coded. The main contributions of this work are: 1. A novel way to encode student interactions as input to a recurrent neural network. 2. A 25% gain in AUC over the best previous result on a knowledge tracing benchmark. 3. Demonstration that our knowledge tracing model does not need expert annotations. 4. Discovery of exercise influence and generation of improved exercise curricula. 1 Exercise index 1.0 0.0 0.5 10 20 30 40 50 Line graph intuition Slope of a line Solving for y-intercept Solving for x-intercept Graphing linear equations Square roots Exercise attempted: correct, incorrect Predicted Probability E[p] Figure 1: A single student and her predicted responses as she solves 50 Khan Academy exercises. She seems to master finding x and y intercepts and then has trouble transferring knowledge to graphing linear equations. The task of knowledge tracing can be formalized as: given observations of interactions x0 . . . xt taken by a student on a particular learning task, predict aspects of their next interaction xt+1 [6]. In the most ubiquitous instantiation of knowledge tracing, interactions take the form of a tuple of xt = {qt, at} that combines a tag for the exercise being answered qt with whether or not the exercise was answered correctly at. When making a prediction, the model is provided the tag of the exercise being answered, qt and must predict whether the student will get the exercise correct, at. Figure 1 shows a visualization of tracing knowledge for a single student learning 8th grade math. The student first answers two square root problems correctly and then gets a single x-intercept exercise incorrect. In the subsequent 47 interactions the student solves a series of x-intercept, y-intercept and graphing exercises. Each time the student answers an exercise we can make a prediction as to whether or not she would answer an exercise of each type correctly on her next interaction. In the visualization we only show predictions over time for a relevant subset of exercise types. In most previous work, exercise tags denote the single “concept” that human experts assign to an exercise. Our model can leverage, but does not require, such expert annotation. We demonstrate that in the absence of annotations the model can autonomously learn content substructure. 2 Related Work The task of modelling and predicting how human beings learn is informed by fields as diverse as education, psychology, neuroscience and cognitive science. From a social science perspective learning has been understood to be influenced by complex macro level interactions including affect [21], motivation [10] and even identity [4]. The challenges present are further exposed on the micro level. Learning is fundamentally a reflection of human cognition which is a highly complex process. Two themes in the field of cognitive science that are particularly relevant are theories that the human mind, and its learning process, are recursive [12] and driven by analogy [13]. The problem of knowledge tracing was first posed, and has been heavily studied within the intelligent tutoring community. In the face of aforementioned challenges it has been a primary goal to build models which may not capture all cognitive processes, but are nevertheless useful. 2.1 Bayesian Knowledge Tracing Bayesian Knowledge Tracing (BKT) is the most popular approach for building temporal models of student learning. BKT models a learner’s latent knowledge state as a set of binary variables, each of which represents understanding or non-understanding of a single concept [6]. A Hidden Markov Model (HMM) is used to update the probabilities across each of these binary variables, as a learner answers exercises of a given concept correctly or incorrectly. The original model formulation assumed that once a skill is learned it is never forgotten. Recent extensions to this model include contextualization of guessing and slipping estimates [7], estimating prior knowledge for individual learners [33], and estimating problem difficulty [23]. With or without such extensions, Knowledge Tracing suffers from several difficulties. First, the binary representation of student understanding may be unrealistic. Second, the meaning of the hidden variables and their mappings onto exercises can be ambiguous, rarely meeting the model’s expectation of a single concept per exercise. Several techniques have been developed to create and refine concept categories and concept-exercise mappings. The current gold standard, Cognitive Task Analysis [31] is an arduous and iterative process where domain experts ask learners to talk through 2 their thought processes while solving problems. Finally, the binary response data used to model transitions imposes a limit on the kinds of exercises that can be modeled. 2.2 Other Dynamic Probabilistic Models Partially Observable Markov Decision Processes (POMDPs) have been used to model learner behavior over time, in cases where the learner follows an open-ended path to arrive at a solution [29]. Although POMDPs present an extremely flexible framework, they require exploration of an exponentially large state space. Current implementations are also restricted to a discrete state space, with hard-coded meanings for latent variables. This makes them intractable or inflexible in practice, though they have the potential to overcome both of those limitations. Simpler models from the Performance Factors Analysis (PFA) framework [24] and Learning Factors Analysis (LFA) framework [3] have shown predictive power comparable to BKT [14]. To obtain better predictive results than with any one model alone, various ensemble methods have been used to combine BKT and PFA [8]. Model combinations supported by AdaBoost, Random Forest, linear regression, logistic regression and a feed-forward neural network were all shown to deliver superior results to BKT and PFA on their own. But because of the learner models they rely on, these ensemble techniques grapple with the same limitations, including a requirement for accurate concept labeling. Recent work has explored combining Item Response Theory (IRT) models with switched nonlinear Kalman filters [20], as well as with Knowledge Tracing [19, 18]. Though these approaches are promising, at present they are both more restricted in functional form and more expensive (due to inference of latent variables) than the method we present here. 2.3 Recurrent Neural Networks Recurrent neural networks are a family of flexible dynamic models which connect artificial neurons over time. The propagation of information is recursive in that hidden neurons evolve based on both the input to the system and on their previous activation [32]. In contrast to hidden Markov models as they appear in education, which are also dynamic, RNNs have a high dimensional, continuous, representation of latent state. A notable advantage of the richer representation of RNNs is their ability to use information from an input in a prediction at a much later point in time. This is especially true for Long Short Term Memory (LSTM) networks—a popular type of RNN [16]. Recurrent neural networks are competitive or state-of-the-art for several time series tasks–for instance, speech to text [15], translation [22], and image captioning [17]–where large amounts of training data are available. These results suggest that we could be much more successful at tracing student knowledge if we formulated the task as a new application of temporal neural networks. 3 Deep Knowledge Tracing We believe that human learning is governed by many diverse properties – of the material, the context, the timecourse of presentation, and the individual involved – many of which are difficult to quantify relying only on first principles to assign attributes to exercises or structure a graphical model. Here we will apply two different types of RNNs – a vanilla RNN model with sigmoid units and a Long Short Term Memory (LSTM) model – to the problem of predicting student responses to exercises based upon their past activity. 3.1 Model Traditional Recurrent Neural Networks (RNNs) map an input sequence of vectors x1, . . . , xT , to an output sequence of vectors y1, . . . , yT . This is achieved by computing a sequence of ‘hidden’ states h1, . . . , hT which can be viewed as successive encodings of relevant information from past observations that will be useful for future predictions. See Figure 2 for a cartoon illustration. The variables are related using a simple network defined by the equations: ht = tanh (Whxxt + Whhht−1 + bh) , (1) yt = σ (Wyhht + by) , (2) 3 h0 h1 h2 h3 hT x1 x2 x3 xT y1 y2 y3 yT … Figure 2: The connection between variables in a simple recurrent neural network. The inputs (xt) to the dynamic network are either one-hot encodings or compressed representations of a student action, and the prediction (yt) is a vector representing the probability of getting each of the dataset exercises correct. where both tanh and the sigmoid function, σ (·), are applied elementwise. The model is parameterized by an input weight matrix Whx, recurrent weight matrix Whh, initial state h0, and readout weight matrix Wyh. Biases for latent and readout units are given by bh and by. Long Short Term Memory (LSTM) networks [16] are a more complex variant of RNNs that often prove more powerful. In LSTMs latent units retain their values until explicitly cleared by the action of a ‘forget gate’. They thus more naturally retain information for many time steps, which is believed to make them easier to train. Additionally, hidden units are updated using multiplicative interactions, and they can thus perform more complicated transformations for the same number of latent units. The update equations for an LSTM are significantly more complicated than for an RNN, and can be found in Appendix A. 3.2 Input and Output Time Series In order to train an RNN or LSTM on student interactions, it is necessary to convert those interactions into a sequence of fixed length input vectors xt. We do this using two methods depending on the nature of those interactions: For datasets with a small number M of unique exercises, we set xt to be a one-hot encoding of the student interaction tuple ht = {qt, at} that represents the combination of which exercise was answered and if the exercise was answered correctly, so xt ∈{0, 1}2M. We found that having separate representations for qt and at degraded performance. For large feature spaces, a one-hot encoding can quickly become impractically large. For datasets with a large number of unique exercises, we therefore instead assign a random vector nq,a ∼ N (0, I) to each input tuple, where nq,a ∈RN, and N ≪M. We then set each input vector xt to the corresponding random vector, xt = nqt,at. This random low-dimensional representation of a one-hot high-dimensional vector is motivated by compressed sensing. Compressed sensing states that a k-sparse signal in d dimensions can be recovered exactly from k log d random linear projections (up to scaling and additive constants) [2]. Since a one-hot encoding is a 1-sparse signal, the student interaction tuple can be exactly encoded by assigning it to a fixed random Gaussian input vector of length ∼log 2M. Although the current paper deals only with 1-hot vectors, this technique can be extended easily to capture aspects of more complex student interactions in a fixed length vector. The output yt is a vector of length equal to the number of problems, where each entry represents the predicted probability that the student would answer that particular problem correctly. Thus the prediction of at+1 can then be read from the entry in yt corresponding to qt+1. 3.3 Optimization The training objective is the negative log likelihood of the observed sequence of student responses under the model. Let δ(qt+1) be the one-hot encoding of which exercise is answered at time t + 1, and let ℓbe binary cross entropy. The loss for a given prediction is ℓ(yT δ (qt+1) , at+1), and the 4 loss for a single student is: L = X t ℓ(yT δ (qt+1) , at+1) (3) This objective was minimized using stochastic gradient descent on minibatches. To prevent overfitting during training, dropout was applied to ht when computing the readout yt, but not when computing the next hidden state ht+1. We prevent gradients from ‘exploding’ as we backpropagate through time by truncating the length of gradients whose norm is above a threshold. For all models in this paper we consistently used hidden dimensionality of 200 and a mini-batch size of 100. To facilitate research in DKTs we have published our code and relevant preprocessed data1. 4 Educational Applications The training objective for knowledge tracing is to predict a student’s future performance based on their past activity. This is directly useful – for instance formal testing is no longer necessary if a student’s ability undergoes continuous assessment. As explored experimentally in Section 6, the DKT model can also power a number of other advancements. 4.1 Improving Curricula One of the biggest potential impacts of our model is in choosing the best sequence of learning items to present to a student. Given a student with an estimated hidden knowledge state, we can query our RNN to calculate what their expected knowledge state would be if we were to assign them a particular exercise. For instance, in Figure 1 after the student has answered 50 exercises we can test every possible next exercise we could show her and compute her expected knowledge state given that choice. The predicted optimal next problem for this student is to revisit solving for the y-intercept. We use a trained DKT to test two classic curricula rules from education literature: mixing where exercises from different topics are intermixed, and blocking where students answer series of exercises of the same type [30]. Since choosing the entire sequence of next exercises so as to maximize predicted accuracy can be phrased as a Markov decision problem we can also evaluate the benefits of using the expectimax algorithm (see Appendix) to chose an optimal sequence of problems. 4.2 Discovering Exercise Relationships The DKT model can further be applied to the task of discovering latent structure or concepts in the data, a task that is typically performed by human experts. We approached this problem by assigning an influence Jij to every directed pair of exercises i and j, Jij = y (j|i) P k y (j|k), (4) where y (j|i) is the correctness probability assigned by the RNN to exercise j on the second timestep, given that a student answered exercise i correctly on the first. We show that this characterization of the dependencies captured by the RNN recovers the pre-requisites associated with exercises. 5 Datasets We test the ability to predict student performance on three datasets: simulated data, Khan Academy Data, and the Assistments benchmark dataset. On each dataset we measure area under the curve (AUC). For the non-simulated data we evaluate our results using 5-fold cross validation and in all cases hyper-parameters are learned on training data. We compare the results of Deep Knowledge Tracing to standard BKT and, when possible to optimal variations of BKT. Additionally we compare our results to predictions made by simply calculating the marginal probability of a student getting a particular exercise correct. 1https://github.com/chrispiech/DeepKnowledgeTracing 5 Overview AUC Dataset Students Exercise Tags Answers Marginal BKT BKT* DKT Simulated-5 4,000 50 200 K ? 0.54 0.75 Khan Math 47,495 69 1,435 K 0.63 0.68 0.85 Assistments 15,931 124 526 K 0.62 0.67 0.69 0.86 Table 1: AUC results for all datasets tested. BKT is the standard BKT. BKT* is the best reported result from the literature for Assistments. DKT is the result of using LSTM Deep Knowledge Tracing. Simulated Data: We simulate virtual students learning virtual concepts and test how well we can predict responses in this controlled setting. For each run of this experiment we generate two thousand students who answer 50 exercises drawn from k ∈1 . . . 5 concepts. For this dataset only, all students answer the same sequence of 50 exercises. Each student has a latent knowledge state “skill” for each concept, and each exercise has both a single concept and a difficulty. The probability of a student getting a exercise with difficulty β correct if the student had concept skill α is modelled using classic Item Response Theory [9] as: p(correct|α, β) = c + 1−c 1+eβ−α where c is the probability of a random guess (set to be 0.25). Students “learn” over time via an increase to the concept skill which corresponded to the exercise they answered. To understand how the different models can incorporate unlabelled data, we do not provide models with the hidden concept labels (instead the input is simply the exercise index and whether or not the exercise was answered correctly). We evaluate prediction performance on an additional two thousand simulated test students. For each number of concepts we repeat the experiment 20 times with different randomly generated data to evaluate accuracy mean and standard error. Khan Academy Data: We used a sample of anonymized student usage interactions from the eighth grade Common Core curriculum on Khan Academy. The dataset included 1.4 million exercises completed by 47,495 students across 69 different exercise types. It did not contain any personal information. Only the researchers working on this paper had access to this anonymized dataset, and its use was governed by an agreement designed to protect student privacy in accordance with Khan Academy’s privacy notice [1]. Khan Academy provides a particularly relevant source of learning data, since students often interact with the site for an extended period of time and for a variety of content, and because students are often self-directed in the topics they work on and in the trajectory they take through material. Benchmark Dataset: In order to understand how our model compared to other models we evaluated models on the Assistments 2009-2010 “skill builder” public benchmark dataset2 . Assistments is an online tutor that simultaneously teaches and assesses students in grade school mathematics. It is, to the best of our knowledge, the largest publicly available knowledge tracing dataset [11]. 6 Results On all three datasets Deep Knowledge Tracing substantially outperformed previous methods. On the Khan dataset using an LSTM neural network model led to an AUC of 0.85 which was a notable improvement over the performance of a standard BKT (AUC = 0.68), especially when compared to the small improvement BKT provided over the marginal baseline (AUC = 0.63). See Table 1 and Figure 3(b). On the Assistments dataset DKT produced a 25% gain over the previous best reported result (AUC = 0.86 and 0.69 respectively) [23]. The gain we report in AUC compared to the marginal baseline (0.24) is more than triple the largest gain achieved on the dataset to date (0.07). The prediction results from the synthetic dataset provide an interesting demonstration of the capacities of deep knowledge tracing. Both the LSTM and RNN models did as well at predicting student responses as an oracle which had perfect knowledge of all model parameters (and only had to fit the latent student knowledge variables). See Figure 3(a). In order to get accuracy on par with an oracle the models would have to mimic a function that incorporates: latent concepts, the difficulty of each exercise, the prior distributions of student knowledge and the increase in concept skill that happened 2https://sites.google.com/site/assistmentsdata/home/assistment-2009-2010-data 6 0.55 0.65 0.75 0.85 1 2 3 4 5 Test Accuracy Number of Hidden Concepts Oracle RNN LSTM BKT 0.55 0.65 0.75 0.85 1 2 3 4 5 Test Accuracy Number of Concepts Oracle RNN LSTM BKT 0.55 0.65 0.75 0.85 1 2 3 4 5 Test Accuracy Number of Concepts Oracle RNN LSTM BKT (a) 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 True Positive Rate False Positive Rate LSTM RNN BKT Marginal (b) 0.5 0.6 0.7 0 10 20 30 Average Predicted Probability Exercise Index MDP-8 MDP-1 Blocking Mixing (c) Figure 3: Left: Prediction results for (a) simulated data and (b) Khan Academy data. Right: (c) Predicted knowledge on Assistments data for different exercise curricula. Error bars are standard error of the mean. after each exercise. In contrast, the BKT prediction degraded substantially as the number of hidden concepts increased as it doesn’t have a mechanism to learn unlabelled concepts. We tested our ability to intelligently chose exercises on a subset of five concepts from the Assistment dataset. For each curricula method, we used our DKT model to simulate how a student would answer questions and evaluate how much a student knew after 30 exercises. We repeated student simulations 500 times and measured the average predicted probability of a student getting future questions correct. In the Assistment context the blocking strategy had a notable advantage over mixing. See Figure 3(c). While blocking performs on par with solving expectimax one exercise deep (MDP-1), if we look further into the future when choosing the next problem we come up with curricula where students have higher predicted knowledge after solving fewer problems (MDP-8). The prediction accuracy on the synthetic dataset suggest that it may be possible to use DKT models to extract the latent structure between the assessments in the dataset. The graph of our model’s conditional influences for the synthetic dataset reveals a perfect clustering of the five latent concepts (see Figure 4), with directed edges set using the influence function in Equation 4. An interesting observation is that some of the exercises from the same concept occurred far apart in time. For example, in the synthetic dataset, where node numbers depict sequence, the 5th exercise in the synthetic dataset was from hidden concept 1 and even though it wasn’t until the 22nd problem that another problem from the same concept was asked, we were able to learn a strong conditional dependency between the two. We analyzed the Khan dataset using the same technique. The resulting graph is a compelling articulation of how the concepts in the 8th grade Common Core are related to each other (see Figure 4. Node numbers depict exercise tags). We restricted the analysis to ordered pairs of exercises {A, B} such that after A appeared, B appeared more than 1% of the time in the remainder of the sequence). To determine if the resulting conditional relationships are a product of obvious underlying trends in the data we compared our results to two baseline measures (1) the transition probabilities of students answering B given they had just answered A and (2) the probability in the dataset (without using a DKT model) of answering B correctly given a student had earlier answered A correctly. Both baseline methods generated discordant graphs, which are shown in the Appendix. While many of the relationships we uncovered may be unsurprising to an education expert their discovery is affirmation that the DKT network learned a coherent model. 7 Discussion In this paper we apply RNNs to the problem of knowledge tracing in education, showing improvement over prior state-of-the-art performance on the Assistments benchmark and Khan dataset. Two particularly interesting novel properties of our new model are that (1) it does not need expert annotations (it can learn concept patterns on its own) and (2) it can operate on any student input that can be vectorized. One disadvantage of RNNs over simple hidden Markov methods is that they require large amounts of training data, and so are well suited to an online education environment, but not a small classroom environment. 7 1 8 38 58 60 2 14 3 51 4 23 30 49 54 5 13 31 46 57 68 69 6 7 26 43 22 50 9 11 44 10 25 35 15 12 64 33 41 16 20 17 19 56 42 24 27 59 28 29 36 32 34 39 37 48 55 65 52 63 53 62 66 67 1 Linear function intercepts 24 Interpreting function graphs 47 Constructing inconsistent system 2 Recognizing irrational numbers 25 Systems of equations w. Elim. 0 48 Pythagorean theorem proofs 3 Linear equations 3 26 Solutions to systems of equations 49 Scientific notation intuition 4 Multiplication in scientific notation 27 Views of a function 50 Line graph intuition 5 Parallel lines 2 28 Recog func 2 51 Multistep equations w. distribution 6 Systems of equations 29 Graphing proportional relationships 52 Fractions as repeating decimals 7 Equations word problems 30 Exponent rules 53 Cube roots 8 Slope of a line 31 Angles 2 54 Scientific notation 9 Linear models of bivariate data 32 Understand equations word problems 55 Pythagorean theorem 2 10 Systems of equations with elimination 33 Exponents 2 56 Functions 1 11 Plotting the line of best fit 34 Segment addition 57 Vertical angles 2 12 Integer sums 35 Systems of equations w. substitution 58 Solving for the x intercept 13 Congruent angles 36 Comparing proportional relationships 59 Recognizing functions 14 Exponents 1 37 Solutions to linear equations 60 Square roots 15 Interpreting scatter plots 38 Finding intercepts of linear functions 61 Slope and triangle similarity 16 Repeating decimals to fractions 2 39 Midpoint of a segment 62 Distance formula 17 Graphical solutions to systems 40 Volume word problems 63 Converting decimals to fractions 2 18 Linear non linear functions 41 Constructing scatter plots 64 Age word problems 19 Interpreting features of linear functions 42 Solving for the y intercept 65 Pythagorean theorem 1 20 Repeating decimals to fractions 1 43 Graphing systems of equations 66 Comparing features of functions 0 21 Constructing linear functions 44 Frequencies of bivariate data 67 Orders of magnitude 22 Graphing linear equations 45 Comparing features of functions 1 68 Angle addition postulate 23 Computing in scientific notation 46 Angles 1 69 Parallel lines 1 Scatter plots Pythagorean theorem Line graphs Systems of Equations Lines Functions Exponents Fractions Angles 1 2 4 5 6 7 8 9 10 12 14 16 22 23 24 26 28 30 31 32 34 35 36 37 38 39 41 42 44 48 49 3 18 19 11 13 17 20 21 25 27 29 33 40 43 45 46 47 15 1 2 4 5 6 7 8 9 10 12 14 16 22 23 24 26 28 30 31 32 34 35 36 37 38 39 41 42 44 48 49 3 18 19 11 13 17 20 21 25 27 29 33 40 43 45 46 47 15 1 2 4 5 6 7 8 9 10 12 14 16 22 23 24 26 28 30 31 32 34 35 36 37 38 39 41 42 44 48 49 3 18 19 11 13 17 20 21 25 27 29 33 40 43 45 46 47 15 1 2 4 5 6 7 8 9 10 12 14 16 22 23 24 26 28 30 31 32 34 35 36 37 38 39 41 42 44 48 49 3 18 19 11 13 17 20 21 25 27 29 33 40 43 45 46 47 15 1 2 4 5 6 7 8 9 10 12 14 16 22 23 24 26 28 30 31 32 34 35 36 37 38 39 41 42 44 48 49 3 18 19 11 13 17 20 21 25 27 29 33 40 43 45 46 47 15 Simulated Data Khan Data Hidden concept 1 Hidden concept 2 Hidden concept 3 Hidden concept 4 Hidden concept 5 Figure 4: Graphs of conditional influence between exercises in DKT models. Above: We observe a perfect clustering of latent concepts in the synthetic data. Below: A convincing depiction of how 8th grade math Common Core exercises influence one another. Arrow size indicates connection strength. Note that nodes may be connected in both directions. Edges with a magnitude smaller than 0.1 have been thresholded. Cluster labels are added by hand, but are fully consistent with the exercises in each cluster. The application of RNNs to knowledge tracing provides many directions for future research. Further investigations could incorporate other features as inputs (such as time taken), explore other educational impacts (such as hint generation, dropout prediction), and validate hypotheses posed in education literature (such as spaced repetition, modeling how students forget). Because DKTs take vector input it should be possible to track knowledge over more complex learning activities. An especially interesting extension is to trace student knowledge as they solve open-ended programming tasks [26, 27]. Using a recently developed method for vectorization of programs [25] we hope to be able to intelligently model student knowledge over time as they learn to program. In an ongoing collaboration with Khan Academy, we plan to test the efficacy of DKT for curriculum planning in a controlled experiment, by using it to propose exercises on the site. Acknowledgments Many thanks to John Mitchell for his guidance and Khan Academy for its support. Chris Piech is supported by NSF-GRFP grant number DGE-114747. References [1] Khan academy privacy notice https://www.khanacademy.org/about/privacy-policy, 2015. [2] BARANIUK, R. Compressive sensing. IEEE signal processing magazine 24, 4 (2007). [3] CEN, H., KOEDINGER, K., AND JUNKER, B. Learning factors analysis–a general method for cognitive model evaluation and improvement. In Intelligent tutoring systems (2006), Springer, pp. 164–175. [4] COHEN, G. L., AND GARCIA, J. Identity, belonging, and achievement a model, interventions, implications. Current Directions in Psychological Science 17, 6 (2008), 365–369. [5] CORBETT, A. Cognitive computer tutors: Solving the two-sigma problem. In User Modeling 2001. Springer, 2001, pp. 137–147. [6] CORBETT, A. T., AND ANDERSON, J. R. Knowledge tracing: Modeling the acquisition of procedural knowledge. User modeling and user-adapted interaction 4, 4 (1994), 253–278. [7] D BAKER, R. S. J., CORBETT, A. T., AND ALEVEN, V. More accurate student modeling through contextual estimation of slip and guess probabilities in bayesian knowledge tracing. In Intelligent Tutoring Systems (2008), Springer, pp. 406–415. 8 [8] D BAKER, R. S. J., PARDOS, Z. A., GOWDA, S. M., NOORAEI, B. B., AND HEFFERNAN, N. T. Ensembling predictions of student knowledge within intelligent tutoring systems. In User Modeling, Adaption and Personalization. Springer, 2011, pp. 13–24. [9] DRASGOW, F., AND HULIN, C. L. Item response theory. Handbook of industrial and organizational psychology 1 (1990), 577–636. [10] ELLIOT, A. J., AND DWECK, C. S. Handbook of competence and motivation. Guilford Publications, 2013. [11] FENG, M., HEFFERNAN, N., AND KOEDINGER, K. Addressing the assessment challenge with an online system that tutors as it assesses. User Modeling and User-Adapted Interaction 19, 3 (2009), 243–266. [12] FITCH, W. T., HAUSER, M. D., AND CHOMSKY, N. The evolution of the language faculty: clarifications and implications. Cognition 97, 2 (2005), 179–210. [13] GENTNER, D. Structure-mapping: A theoretical framework for analogy. Cognitive science 7, 2. [14] GONG, Y., BECK, J. E., AND HEFFERNAN, N. T. In Intelligent Tutoring Systems, Springer. [15] GRAVES, A., MOHAMED, A.-R., AND HINTON, G. Speech recognition with deep recurrent neural networks. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on (2013), IEEE, pp. 6645–6649. [16] HOCHREITER, S., AND SCHMIDHUBER, J. Long short-term memory. Neural computation 9, 8. [17] KARPATHY, A., AND FEI-FEI, L. Deep visual-semantic alignments for generating image descriptions. arXiv preprint arXiv:1412.2306 (2014). [18] KHAJAH, M., WING, R. M., LINDSEY, R. V., AND MOZER, M. C. Incorporating latent factors into knowledge tracing to predict individual differences in learning. Proceedings of the 7th International Conference on Educational Data Mining (2014). [19] KHAJAH, M. M., HUANG, Y., GONZ ´ALEZ-BRENES, J. P., MOZER, M. C., AND BRUSILOVSKY, P. Integrating knowledge tracing and item response theory: A tale of two frameworks. Proceedings of the 4th International Workshop on Personalization Approaches in Learning Environments (2014). [20] LAN, A. S., STUDER, C., AND BARANIUK, R. G. Time-varying learning and content analytics via sparse factor analysis. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining (2014), ACM, pp. 452–461. [21] LINNENBRINK, E. A., AND PINTRICH, P. R. Role of affect in cognitive processing in academic contexts. Motivation, emotion, and cognition: Integrative perspectives on intellectual functioning and development (2004), 57–87. [22] MIKOLOV, T., KARAFI ´AT, M., BURGET, L., CERNOCK `Y, J., AND KHUDANPUR, S. Recurrent neural network based language model. In INTERSPEECH 2010, 11th Annual Conference of the International Speech Communication Association, Makuhari, Chiba, Japan, 2010 (2010), pp. 1045–1048. [23] PARDOS, Z. A., AND HEFFERNAN, N. T. Kt-idem: Introducing item difficulty to the knowledge tracing model. In User Modeling, Adaption and Personalization. Springer, 2011, pp. 243–254. [24] PAVLIK JR, P. I., CEN, H., AND KOEDINGER, K. R. Performance Factors Analysis–A New Alternative to Knowledge Tracing. Online Submission (2009). [25] PIECH, C., HUANG, J., NGUYEN, A., PHULSUKSOMBATI, M., SAHAMI, M., AND GUIBAS, L. J. Learning program embeddings to propagate feedback on student code. CoRR abs/1505.05969 (2015). [26] PIECH, C., SAHAMI, M., HUANG, J., AND GUIBAS, L. Autonomously generating hints by inferring problem solving policies. In Proceedings of the Second (2015) ACM Conference on Learning @ Scale (New York, NY, USA, 2015), L@S ’15, ACM, pp. 195–204. [27] PIECH, C., SAHAMI, M., KOLLER, D., COOPER, S., AND BLIKSTEIN, P. Modeling how students learn to program. In Proceedings of the 43rd ACM symposium on Computer Science Education. [28] POLSON, M. C., AND RICHARDSON, J. J. Foundations of intelligent tutoring systems. Psychology Press, 2013. [29] RAFFERTY, A. N., BRUNSKILL, E., GRIFFITHS, T. L., AND SHAFTO, P. Faster teaching by POMDP planning. In Artificial intelligence in education (2011), Springer, pp. 280–287. [30] ROHRER, D. The effects of spacing and mixing practice problems. Journal for Research in Mathematics Education (2009), 4–17. [31] SCHRAAGEN, J. M., CHIPMAN, S. F., AND SHALIN, V. L. Cognitive task analysis. Psychology Press, 2000. [32] WILLIAMS, R. J., AND ZIPSER, D. A learning algorithm for continually running fully recurrent neural networks. Neural computation 1, 2 (1989), 270–280. [33] YUDELSON, M. V., KOEDINGER, K. R., AND GORDON, G. J. Individualized bayesian knowledge tracing models. In Artificial Intelligence in Education (2013), Springer, pp. 171–180. 9 | 2015 | 291 |
5,804 | Generalization in Adaptive Data Analysis and Holdout Reuse∗ Cynthia Dwork Microsoft Research Vitaly Feldman IBM Almaden Research Center† Moritz Hardt Google Research Toniann Pitassi University of Toronto Omer Reingold Samsung Research America Aaron Roth University of Pennsylvania Abstract Overfitting is the bane of data analysts, even when data are plentiful. Formal approaches to understanding this problem focus on statistical inference and generalization of individual analysis procedures. Yet the practice of data analysis is an inherently interactive and adaptive process: new analyses and hypotheses are proposed after seeing the results of previous ones, parameters are tuned on the basis of obtained results, and datasets are shared and reused. An investigation of this gap has recently been initiated by the authors in [7], where we focused on the problem of estimating expectations of adaptively chosen functions. In this paper, we give a simple and practical method for reusing a holdout (or testing) set to validate the accuracy of hypotheses produced by a learning algorithm operating on a training set. Reusing a holdout set adaptively multiple times can easily lead to overfitting to the holdout set itself. We give an algorithm that enables the validation of a large number of adaptively chosen hypotheses, while provably avoiding overfitting. We illustrate the advantages of our algorithm over the standard use of the holdout set via a simple synthetic experiment. We also formalize and address the general problem of data reuse in adaptive data analysis. We show how the differential-privacy based approach given in [7] is applicable much more broadly to adaptive data analysis. We then show that a simple approach based on description length can also be used to give guarantees of statistical validity in adaptive settings. Finally, we demonstrate that these incomparable approaches can be unified via the notion of approximate max-information that we introduce. This, in particular, allows the preservation of statistical validity guarantees even when an analyst adaptively composes algorithms which have guarantees based on either of the two approaches. 1 Introduction The goal of machine learning is to produce hypotheses or models that generalize well to the unseen instances of the problem. More generally, statistical data analysis is concerned with estimating properties of the underlying data distribution, rather than properties that are specific to the finite data set at hand. Indeed, a large body of theoretical and empirical research was developed for ensuring generalization in a variety of settings. In this work, it is commonly assumed that each analysis procedure (such as a learning algorithm) operates on a freshly sampled dataset – or if not, is validated on a freshly sampled holdout (or testing) set. ∗See [6] for the full version of this work. †Part of this work done while visiting the Simons Institute, UC Berkeley. 1 Unfortunately, learning and inference can be more difficult in practice, where data samples are often reused. For example, a common practice is to perform feature selection on a dataset, and then use the features for some supervised learning task. When these two steps are performed on the same dataset, it is no longer clear that the results obtained from the combined algorithm will generalize. Although not usually understood in these terms, “Freedman’s paradox" is an elegant demonstration of the powerful (negative) effect of adaptive analysis on the same data [10]. In Freedman’s simulation, variables with significant t-statistic are selected and linear regression is performed on this adaptively chosen subset of variables, with famously misleading results: when the relationship between the dependent and explanatory variables is non-existent, the procedure overfits, erroneously declaring significant relationships. Most of machine learning practice does not rely on formal guarantees of generalization for learning algorithms. Instead a dataset is split randomly into two (or sometimes more) parts: the training set and the testing, or holdout, set. The training set is used for learning a predictor, and then the holdout set is used to estimate the accuracy of the predictor on the true distribution (Additional averaging over different partitions is used in cross-validation.). Because the predictor is independent of the holdout dataset, such an estimate is a valid estimate of the true prediction accuracy (formally, this allows one to construct a confidence interval for the prediction accuracy on the data distribution). However, in practice the holdout dataset is rarely used only once, and as a result the predictor may not be independent of the holdout set, resulting in overfitting to the holdout set [17, 16, 4]. One well-known reason for such dependence is that the holdout data is used to test a large number of predictors and only the best one is reported. If the set of all tested hypotheses is known and independent of the holdout set, then it is easy to account for such multiple testing. However such static approaches do not apply if the estimates or hypotheses tested on the holdout are chosen adaptively: that is, if the choice of hypotheses depends on previous analyses performed on the dataset. One prominent example in which a holdout set is often adaptively reused is hyperparameter tuning (e.g.[5]). Similarly, the holdout set in a machine learning competition, such as the famous ImageNet competition, is typically reused many times adaptively. Other examples include using the holdout set for feature selection, generation of base learners (in aggregation techniques such as boosting and bagging), checking a stopping condition, and analyst-in-the-loop decisions. See [13] for a discussion of several subtle causes of overfitting. The concrete practical problem we address is how to ensure that the holdout set can be reused to perform validation in the adaptive setting. Towards addressing this problem we also ask the more general question of how one can ensure that the final output of adaptive data analysis generalizes to the underlying data distribution. This line of research was recently initiated by the authors in [7], where we focused on the case of estimating expectations of functions from i.i.d. samples (these are also referred to as statistical queries). . 1.1 Our Results We propose a simple and general formulation of the problem of preserving statistical validity in adaptive data analysis. We show that the connection between differentially private algorithms and generalization from [7] can be extended to this more general setting, and show that similar (but sometimes incomparable) guarantees can be obtained from algorithms whose outputs can be described by short strings. We then define a new notion, approximate max-information, that unifies these two basic techniques and gives a new perspective on the problem. In particular, we give an adaptive composition theorem for max-information, which gives a simple way to obtain generalization guarantees for analyses in which some of the procedures are differentially private and some have short description length outputs. We apply our techniques to the problem of reusing the holdout set for validation in the adaptive setting. A reusable holdout: We describe a simple and general method, together with two specific instantiations, for reusing a holdout set for validating results while provably avoiding overfitting to the holdout set. The analyst can perform any analysis on the training dataset, but can only access the holdout set via an algorithm that allows the analyst to validate her hypotheses against the holdout set. Crucially, our algorithm prevents overfitting to the holdout set even when the analyst’s hypotheses are chosen adaptively on the basis of the previous responses of our algorithm. 2 Our first algorithm, referred to as Thresholdout, derives its guarantees from differential privacy and the results in [7, 14]. For any function φ : X →[0, 1] given by the analyst, Thresholdout uses the holdout set to validate that φ does not overfit to the training set, that is, it checks that the mean value of φ evaluated on the training set is close to the mean value of φ evaluated on the distribution P from which the data was sampled. The standard approach to such validation would be to compute the mean value of φ on the holdout set. The use of the holdout set in Thresholdout differs from the standard use in that it exposes very little information about the mean of φ on the holdout set: if φ does not overfit to the training set, then the analyst receives only the confirmation of closeness, that is, just a single bit. On the other hand, if φ overfits then Thresholdout returns the mean value of φ on the training set perturbed by carefully calibrated noise. Using results from [7, 14] we show that for datasets consisting of i.i.d. samples these modifications provably prevent the analyst from constructing functions that overfit to the holdout set. This ensures correctness of Thresholdout’s responses. Naturally, the specific guarantees depend on the number of samples n in the holdout set. The number of queries that Thresholdout can answer is exponential in n as long as the number of times that the analyst overfits is at most quadratic in n. Our second algorithm SparseValidate is based on the idea that if most of the time the analystâ ˘A´Zs procedures generate results that do not overfit, then validating them against the holdout set does not reveal much information about the holdout set. Specifically, the generalization guarantees of this method follow from the observation that the transcript of the interaction between a data analyst and the holdout set can be described concisely. More formally, this method allows the analyst to pick any Boolean function of a dataset ψ (described by an algorithm) and receive back its value on the holdout set. A simple example of such a function would be whether the accuracy of a predictor on the holdout set is at least a certain value α. (Unlike in the case of Thresholdout, here there is no need to assume that the function that measures the accuracy has a bounded range or even Lipschitz, making it qualitatively different from the kinds of results achievable subject to differential privacy). A more involved example of validation would be to run an algorithm on the holdout dataset to select an hypothesis and check if the hypothesis is similar to that obtained on the training set (for any desired notion of similarity). Such validation can be applied to other results of analysis; for example one could check if the variables selected on the holdout set have large overlap with those selected on the training set. An instantiation of the SparseValidate algorithm has already been applied to the problem of answering statistical (and more general) queries in the adaptive setting [1]. We describe a simple experiment on synthetic data that illustrates the danger of reusing a standard holdout set, and how this issue can be resolved by our reusable holdout. The design of this experiment is inspired by Freedman’s classical experiment, which demonstrated the dangers of performing variable selection and regression on the same data [10]. Generalization in adaptive data analysis: We view adaptive analysis on the same dataset as an execution of a sequence of steps A1 →A2 →· · · →Am. Each step is described by an algorithm Ai that takes as input a fixed dataset S = (x1, . . . , xn) drawn from some distribution D over X n, which remains unchanged over the course of the analysis. Each algorithm Ai also takes as input the outputs of the previously run algorithms A1 through Ai−1 and produces a value in some range Yi. The dependence on previous outputs represents all the adaptive choices that are made at step i of data analysis. For example, depending on the previous outputs, Ai can run different types of analysis on S. We note that at this level of generality, the algorithms can represent the choices of the data analyst, and need not be explicitly specified. We assume that the analyst uses algorithms which individually are known to generalize when executed on a fresh dataset sampled independently from a distribution D. We formalize this by assuming that for every fixed value y1, . . . , yi−1 ∈Y1 × · · · × Yi−1, with probability at least 1 −βi over the choice of S according to distribution D, the output of Ai on inputs y1, . . . , yi−1 and S has a desired property relative to the data distribution D (for example has low generalization error). Note that in this assumption y1, . . . , yi−1 are fixed and independent of the choice of S, whereas the analyst will execute Ai on values Y1, . . . , Yi−1, where Yj = Aj(S, Y1, . . . , Yj−1). In other words, in the adaptive setup, the algorithm Ai can depend on the previous outputs, which depend on S, and thus the set S given to Ai is no longer an independently sampled dataset. Such dependence invalidates the generalization guarantees of individual procedures, potentially leading to overfitting. Differential privacy: First, we spell out how the differential privacy based approach from [7] can be applied to this more general setting. Specifically, a simple corollary of results in [7] is that for 3 a dataset consisting of i.i.d. samples any output of a differentially-private algorithm can be used in subsequent analysis while controlling the risk of overfitting, even beyond the setting of statistical queries studied in [7]. A key property of differential privacy in this context is that it composes adaptively: namely if each of the algorithms used by the analyst is differentially private, then the whole procedure will be differentially private (albeit with worse privacy parameters). Therefore, one way to avoid overfitting in the adaptive setting is to use algorithms that satisfy (sufficiently strong) guarantees of differential-privacy. Description length: We then show how description length bounds can be applied in the context of guaranteeing generalization in the presence of adaptivity. If the total length of the outputs of algorithms A1, . . . , Ai−1 can be described with k bits then there are at most 2k possible values of the input y1, . . . , yi−1 to Ai. For each of these individual inputs Ai generalizes with probability 1 −βi. Taking a union bound over failure probabilities implies generalization with probability at least 1 −2kβi. Occam’s Razor famously implies that shorter hypotheses have lower generalization error. Our observation is that shorter hypotheses (and the results of analysis more generally) are also better in the adaptive setting since they reveal less about the dataset and lead to better generalization of subsequent analyses. Note that this result makes no assumptions about the data distribution D. In the full versionwe also show that description length-based analysis suffices for obtaining an algorithm (albeit not an efficient one) that can answer an exponentially large number of adaptively chosen statistical queries. This provides an alternative proof for one of the results in [7]. Approximate max-information: Our main technical contribution is the introduction and analysis of a new information-theoretic measure, which unifies the generalization arguments that come from both differential privacy and description length, and that quantifies how much information has been learned about the data by the analyst. Formally, for jointly distributed random variables (S, Y ), the max-information is the maximum of the logarithm of the factor by which uncertainty about S is reduced given the value of Y , namely I∞(S, Y ) .= log max P[S=S | Y =y] P[S=S] , where the maximum is taken over all S in the support of S and y in the support Y . Approximate max-information is a relaxation of max-information. In our use, S denotes a dataset drawn randomly from the distribution D and Y denotes the output of a (possibly randomized) algorithm on S. We prove that approximate max-information has the following properties • An upper bound on (approximate) max-information gives generalization guarantees. • Differentially private algorithms have low max-information for any distribution D over datasets. A stronger bound holds for approximate max-information on i.i.d. datasets. These bounds apply only to so-called pure differential privacy (the δ = 0 case). • Bounds on the description length of the output of an algorithm give bounds on the approximate max-information of the algorithm for any D. • Approximate max-information composes adaptively. Composition properties of approximate max-information imply that one can easily obtain generalization guarantees for adaptive sequences of algorithms, some of which are differentially private, and others of which have outputs with short description length. These properties also imply that differential privacy can be used to control generalization for any distribution D over datasets, which extends its generalization guarantees beyond the restriction to datasets drawn i.i.d. from a fixed distribution, as in [7]. We remark that (pure) differential privacy and description length are otherwise incomparable. Bounds on max-information or differential privacy of an algorithm can, however, be translated to bounds on randomized description length for a different algorithm with statistically indistinguishable output. Here we say that a randomized algorithm has randomized description length of k if for every fixing of the algorithm’s random bits, it has description length of k. Details of these results and additional discussion appear in Section 2 and the full version. 1.2 Related Work This work complements [7] where we initiated the formal study of adaptivity in data analysis. The primary focus of [7] is the problem of answering adaptively chosen statistical queries. The main technique is a strong connection between differential privacy and generalization: differential privacy 4 guarantees that the distribution of outputs does not depend too much on any one of the data samples, and thus, differential privacy gives a strong stability guarantee that behaves well under adaptive data analysis. The link between generalization and approximate differential privacy made in [7] has been subsequently strengthened, both qualitatively — by [1], who make the connection for a broader range of queries — and quantitatively, by [14] and [1], who give tighter quantitative bounds. These papers, among other results, give methods for accurately answering exponentially (in the dataset size) many adaptively chosen queries, but the algorithms for this task are not efficient. It turns out this is for fundamental reasons – Hardt and Ullman [11] and Steinke and Ullman [19] prove that, under cryptographic assumptions, no efficient algorithm can answer more than quadratically many statistical queries chosen adaptively by an adversary who knows the true data distribution. The classical approach in theoretical machine learning to ensure that empirical estimates generalize to the underlying distribution is based on the various notions of complexity of the set of functions output by the algorithm, most notably the VC dimension. If one has a sample of data large enough to guarantee generalization for all functions in some class of bounded complexity, then it does not matter whether the data analyst chooses functions in this class adaptively or non-adaptively. Our goal, in contrast, is to prove generalization bounds without making any assumptions about the class from which the analyst can output functions. An important line of work [3, 15, 18] establishes connections between the stability of a learning algorithm and its ability to generalize. Stability is a measure of how much the output of a learning algorithm is perturbed by changes to its input. It is known that certain stability notions are necessary and sufficient for generalization. Unfortunately, the stability notions considered in these prior works do not compose in the sense that running multiple stable algorithms sequentially and adaptively may result in a procedure that is not stable. The measure we introduce in this work (max information), like differential privacy, has the strength that it enjoys adaptive composition guarantees. This makes it amenable to reasoning about the generalization properties of adaptively applied sequences of algorithms, while having to analyze only the individual components of these algorithms. Connections between stability, empirical risk minimization and differential privacy in the context of learnability have been recently explored in [21]. Numerous techniques have been developed by statisticians to address common special cases of adaptive data analysis. Most of them address a single round of adaptivity such as variable selection followed by regression on selected variables or model selection followed by testing and are optimized for specific inference procedures (the literature is too vast to adequately cover here, see Ch. 7 in [12] for a textbook introduction and [20] for a survey of some recent work). In contrast, our framework addresses multiple stages of adaptive decisions, possible lack of a predetermined analysis protocol and is not restricted to any specific procedures. Finally, inspired by our work, Blum and Hardt [2] showed how to reuse the holdout set to maintain an accurate leaderboard in a machine learning competition that allows the participants to submit adaptively chosen models in the process of the competition (such as those organized by Kaggle Inc.). Their analysis also relies on the description length-based technique we used to analyze SparseValidate. 2 Max-Information Preliminaries: In the discussion below log refers to binary logarithm and ln refers to the natural logarithm. For two random variables X and Y over the same domain X the max-divergence of X from Y is defined as D∞(X∥Y ) = log maxx∈X P[X=x] P[Y =x] . δ-approximate max-divergence is defined as Dδ ∞(X∥Y ) = log max O⊆X, P[X∈O]>δ P[X ∈O] −δ P[Y ∈O] . Definition 1. [9, 8] A randomized algorithm A with domain X n for n > 0 is (ε, δ)-differentially private if for all pairs of datasets that differ in a single element S, S′ ∈X n: Dδ ∞(A(S)∥A(S′)) ≤ log(eε). The case when δ = 0 is sometimes referred to as pure differential privacy, and in this case we may say simply that A is ε-differentially private. Consider two algorithms A : X n →Y and B : X n × Y →Y′ that are composed adaptively and assume that for every fixed input y ∈Y, B generalizes for all but fraction β of datasets. Here we are speaking of generalization informally: our definitions will support any property of input y ∈Y 5 and dataset S. Intuitively, to preserve generalization of B we want to make sure that the output of A does not reveal too much information about the dataset S. We demonstrate that this intuition can be captured via a notion of max-information and its relaxation approximate max-information. For two random variables X and Y we use X × Y to denote the random variable obtained by drawing X and Y independently from their probability distributions. Definition 2. Let X and Y be jointly distributed random variables. The max-information between X and Y is defined as I∞(X; Y ) = D∞((X, Y )∥X × Y ). The β-approximate max-information is defined as Iβ ∞(X; Y ) = Dβ ∞((X, Y )∥X × Y ). In our use (X, Y ) is going to be a joint distribution (S, A(S)), where S is a random n-element dataset and A is a (possibly randomized) algorithm taking a dataset as an input. Definition 3. We say that an algorithm A has β-approximate max-information of k if for every distribution S over n-element datasets, Iβ ∞(S; A(S)) ≤k, where S is a dataset chosen randomly according to S. We denote this by Iβ ∞(A, n) ≤k. An immediate corollary of our definition of approximate max-information is that it controls the probability of “bad events" that can happen as a result of the dependence of A(S) on S. Theorem 4. Let S be a random dataset in X n and A be an algorithm with range Y such that for some β ≥0, Iβ ∞(S; A(S)) = k. Then for any event O ⊆X n × Y, P[(S, A(S)) ∈O] ≤2k · P[S × A(S) ∈O] + β. In particular, P[(S, A(S)) ∈O] ≤2k · maxy∈Y P[(S, y) ∈O] + β. We remark that mutual information between S and A(S) would not suffice for ensuring that bad events happen with tiny probability. For example mutual information of k allows P[(S, A(S)) ∈O] to be as high as k/(2 log(1/δ)), where δ = P[S × A(S) ∈O]. Approximate max-information satisfies the following adaptive composition property: Lemma 5. Let A : X n →Y be an algorithm such that Iβ1 ∞(A, n) ≤k1, and let B : X n × Y →Z be an algorithm such that for every y ∈Y, B(·, y) has β2-approximate max-information k2. Let C : X n →Z be defined such that C(S) = B(S, A(S)). Then Iβ1+β2 ∞ (C, n) ≤k1 + k2. Bounds on Max-information: Description length k gives the following bound on max-information. Theorem 6. Let A be a randomized algorithm taking as an input an n-element dataset and outputting a value in a finite set Y. Then for every β > 0, Iβ ∞(A, n) ≤log(|Y|/β). Next we prove a simple bound on max-information of differentially private algorithms that applies to all distributions over datasets. Theorem 7. Let A be an ϵ-differentially private algorithm. Then I∞(A, n) ≤log e · ϵn. Finally, we prove a stronger bound on approximate max-information for datasets consisting of i.i.d. samples using the technique from [7]. Theorem 8. Let A be an ε-differentially private algorithm with range Y. For a distribution P over X, let S be a random variable drawn from Pn. Let Y = A(S) denote the random variable output by A on input S. Then for any β > 0, Iβ ∞(S; A(S)) ≤log e(ε2n/2 + ε p n ln(2/β)/2). One way to apply a bound on max-information is to start with a concentration of measure result which ensures that the estimate of predictor’s accuracy is correct with high probability when the predictor is chosen independently of the samples. For example for a loss function with range [0, 1], Hoeffding’s bound implies that for a dataset consisting of i.i.d. samples the empirical estimate is not within τ of the true accuracy with probability ≤2e−2τ 2n. Now, given a bound of log e · τ 2n on β-approximate information of the algorithm that produces the estimator, Thm. 4 implies that the produced estimate is not within τ of the true accuracy with probability ≤2log e·τ 2n · 2e−2τ 2n + β ≤2e−τ 2n + β. Thm. 7 implies that any τ 2-differentially private algorithm has max-information of at most log e · τ 2n. For a dataset consisting of i.i.d. samples Thm. 8 implies that a τ-differentially private algorithm has β-approximate max-information of 1.25 log e · τ 2n for β = 2e−τ 2n. 6 3 Reusable Holdout We describe two simple algorithms that enable validation of analyst’s queries in the adaptive setting. Thresholdout: Our first algorithm Thresholdout follows the approach in [7] where differentially private algorithms are used to answer adaptively chosen statistical queries. This approach can also be applied to any low-sensitivity functions of the dataset but for simplicity we present the results for statistical queries. Here we address an easier problem in which the analyst’s queries only need to be answered when they overfit. Also, unlike in [7], the analyst has full access to the training set and the holdout algorithm only prevents overfitting to holdout dataset. As a result, unlike in the general query answering setting, our algorithm can efficiently validate an exponential in n number of queries as long as a relatively small number of them overfit. For a function φ : X →R and a dataset S = (x1, . . . , xn), let ES[φ] .= 1 n Pn i=1 φ(xi). Thresholdout is given access to the training dataset St and holdout dataset Sh and a budget limit B. It allows any query of the form φ : X →[0, 1] and its goal is to provide an estimate of P[φ]. To achieve this the algorithm gives an estimate of ESh[φ] in a way that prevents overfitting of functions generated by the analyst to the holdout set. In other words, responses of Thresholdout are designed to ensure that, with high probability, ESh[φ] is close to P[φ] and hence an estimate of ESh[φ] gives an estimate of the true expectation P[φ]. Given a function φ, Thresholdout first checks if the difference between the average value of φ on the training set St (or ESt[φ]) and the average value of φ on the holdout set Sh (or ESh[φ]) is below a certain threshold T + η. Here, T is a fixed number such as 0.01 and η is a Laplace noise variable whose standard deviation needs to be chosen depending on the desired guarantees (The Laplace distribution is a symmetric exponential distribution.) If the difference is below the threshold, then the algorithm returns ESt[φ]. If the difference is above the threshold, then the algorithm returns ESh[φ] + ξ for another Laplacian noise variable ξ. Each time the difference is above threshold the “overfitting" budget B is reduced by one. Once it is exhausted, Thresholdout stops answering queries. We provide the pseudocode of Thresholdout below. Input: Training set St, holdout set Sh, threshold T, noise rate σ, budget B 1. sample γ ∼Lap(2 · σ); ˆT ←T + γ 2. For each query φ do (a) if B < 1 output “⊥” (b) else i. sample η ∼Lap(4 · σ) ii. if |ESh[φ] −ESt[φ]| > ˆT + η A. sample ξ ∼Lap(σ), γ ∼Lap(2 · σ) B. B ←B −1 and ˆT ←T + γ C. output ESh[φ] + ξ iii. else output ESt[φ]. We now establish the formal generalization guarantees that Thresholdout enjoys. Theorem 9. Let β, τ > 0 and m ≥B > 0. We set T = 3τ/4 and σ = τ/(96 ln(4m/β)). Let S denote a holdout dataset of size n drawn i.i.d. from a distribution P and St be any additional dataset over X. Consider an algorithm that is given access to St and adaptively chooses functions φ1, . . . , φm while interacting with Thresholdout which is given datasets S, St and values σ, B, T. For every i ∈[m], let ai denote the answer of Thresholdout on function φi : X →[0, 1]. Further, for every i ∈[m], we define the counter of overfitting Zi .= |{j ≤i : |P[φj] −ESt[φj]| > τ/2}| . Then P [∃i ∈[m], Zi < B & |ai −P[φi]| ≥τ] ≤β whenever n ≥n0 = O ln(m/β) τ 2 · min{B, p B ln(ln(m/β)/τ)}. SparseValidate: We now present a general algorithm for validation on the holdout set that can validate many arbitrary queries as long as few of them fail the validation. More formally, our 7 algorithm allows the analyst to pick any Boolean function of a dataset ψ (or even any algorithm that outputs a single bit) and provides back the value of ψ on the holdout set ψ(Sh). SparseValidate has a budget m for the total number of queries that can be asked and budget B for the number of queries that returned 1. Once either of the budgets is exhausted, no additional answers are given. We now give a general description of the guarantees of SparseValidate. Theorem 10. Let S denote a randomly chosen holdout set of size n. Let A be an algorithm that is given access to SparseValidate(m, B) and outputs queries ψ1, . . . , ψm such that each ψi is in some set Ψi of functions from X n to {0, 1}. Assume that for every i ∈[m] and ψi ∈Ψi, P[ψi(S) = 1] ≤βi. Let ψi be the random variable equal to the i’th query of A on S. Then P[ψi(S) = 1] ≤ℓi · βi, where ℓi = Pmin{i−1,B} j=0 i j ≤mB. In this general formulation it is the analyst’s responsibility to use the budgets economically and pick query functions that do not fail validation often. At the same time, SparseValidate ensures that (for the appropriate values of the parameters) the analyst can think of the holdout set as a fresh sample for the purposes of validation. Hence the analyst can pick queries in such a way that failing the validation reliably indicates overfitting. An example of the application of SparseValidate for answering statistical and low-sensitivity queries that is based on our analysis can be found in [1]. The analysis of generalization on the holdout set in [2] and the analysis of the Median Mechanism we give in the full version also rely on this sparsity-based technique. Experiments: In our experiment the analyst is given a d-dimensional labeled data set S of size 2n and splits it randomly into a training set St and a holdout set Sh of equal size. We denote an element of S by a tuple (x, y) where x is a d-dimensional vector and y ∈{−1, 1} is the corresponding class label. The analyst wishes to select variables to be included in her classifier. For various values of the number of variables to select k, she picks k variables with the largest absolute correlations with the label. However, she verifies the correlations (with the label) on the holdout set and uses only those variables whose correlation agrees in sign with the correlation on the training set and both correlations are larger than some threshold in absolute value. She then creates a simple linear threshold classifier on the selected variables using only the signs of the correlations of the selected variables. A final test evaluates the classification accuracy of the classifier on both the training set and the holdout set. In our first experiment, each attribute of x is drawn independently from the normal distribution N(0, 1) and we choose the class label y ∈{−1, 1} uniformly at random so that there is no correlation between the data point and its label. We chose n = 10, 000, d = 10, 000 and varied the number of selected variables k. In this scenario no classifier can achieve true accuracy better than 50%. Nevertheless, reusing a standard holdout results in reported accuracy of over 63% for k = 500 on both the training set and the holdout set (the standard deviation of the error is less than 0.5%). The average and standard deviation of results obtained from 100 independent executions of the experiment are plotted above. For comparison, the plot also includes the accuracy of the classifier on another fresh data set of size n drawn from the same distribution. We then executed the same algorithm with our reusable holdout. Thresholdout was invoked with T = 0.04 and τ = 0.01 explaining why the accuracy of the classifier reported by Thresholdout is off by up to 0.04 whenever the accuracy on the holdout set is within 0.04 of the accuracy on the training set. We also used Gaussian noise instead of Laplacian noise as it has stronger concentration properties. Thresholdout prevents the algorithm from overfitting to the holdout set and gives a valid estimate of classifier accuracy. Additional experiments and discussion are presented in the full version. 8 References [1] Raef Bassily, Adam Smith, Thomas Steinke, and Jonathan Ullman. More general queries and less generalization error in adaptive data analysis. CoRR, abs/1503.04843, 2015. [2] Avrim Blum and Moritz Hardt. The ladder: A reliable leaderboard for machine learning competitions. CoRR, abs/1502.04585, 2015. [3] Olivier Bousquet and André Elisseeff. Stability and generalization. JMLR, 2:499–526, 2002. [4] Gavin C. Cawley and Nicola L. C. Talbot. On over-fitting in model selection and subsequent selection bias in performance evaluation. Journal of Machine Learning Research, 11:2079–2107, 2010. [5] Chuong B. Do, Chuan-Sheng Foo, and Andrew Y. Ng. Efficient multiple hyperparameter learning for log-linear models. In NIPS, pages 377–384, 2007. [6] Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. Generalization in adaptive data analysis and holdout reuse. CoRR, abs/1506. Extended abstract to appear in NIPS 2015. [7] Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. Preserving statistical validity in adaptive data analysis. CoRR, abs/1411.2664, 2014. Extended abstract in STOC 2015. [8] Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In EUROCRYPT, pages 486–503, 2006. [9] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography, pages 265–284. Springer, 2006. [10] David A. Freedman. A note on screening regression equations. The American Statistician, 37(2):152–155, 1983. [11] Moritz Hardt and Jonathan Ullman. Preventing false discovery in interactive data analysis is hard. In FOCS, pages 454–463, 2014. [12] Trevor Hastie, Robert Tibshirani, and Jerome H. Friedman. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer series in statistics. Springer, 2009. [13] John Langford. Clever methods of overfitting. http://hunch.net/?p=22, 2005. [14] Kobbi Nissim and Uri Stemmer. On the generalization properties of differential privacy. CoRR, abs/1504.05800, 2015. [15] Tomaso Poggio, Ryan Rifkin, Sayan Mukherjee, and Partha Niyogi. General conditions for predictivity in learning theory. Nature, 428(6981):419–422, 2004. [16] R. Bharat Rao and Glenn Fung. On the dangers of cross-validation. an experimental evaluation. In International Conference on Data Mining, pages 588–596. SIAM, 2008. [17] Juha Reunanen. Overfitting in making comparisons between variable selection methods. Journal of Machine Learning Research, 3:1371–1382, 2003. [18] Shai Shalev-Shwartz, Ohad Shamir, Nathan Srebro, and Karthik Sridharan. Learnability, stability and uniform convergence. The Journal of Machine Learning Research, 11:2635–2670, 2010. [19] Thomas Steinke and Jonathan Ullman. Interactive fingerprinting codes and the hardness of preventing false discovery. arXiv preprint arXiv:1410.1228, 2014. [20] Jonathan Taylor and Robert J. Tibshirani. Statistical learning and selective inference. Proceedings of the National Academy of Sciences, 112(25):7629–7634, 2015. [21] Yu-Xiang Wang, Jing Lei, and Stephen E. Fienberg. Learning with differential privacy: Stability, learnability and the sufficiency and necessity of ERM principle. CoRR, abs/1502.06309, 2015. 9 | 2015 | 292 |
5,805 | Tractable Learning for Complex Probability Queries Jessa Bekker, Jesse Davis KU Leuven, Belgium {jessa.bekker,jesse.davis}@cs.kuleuven.be Arthur Choi, Adnan Darwiche, Guy Van den Broeck University of California, Los Angeles {aychoi,darwiche,guyvdb}@cs.ucla.edu Abstract Tractable learning aims to learn probabilistic models where inference is guaranteed to be efficient. However, the particular class of queries that is tractable depends on the model and underlying representation. Usually this class is MPE or conditional probabilities Pr(x|y) for joint assignments x, y. We propose a tractable learner that guarantees efficient inference for a broader class of queries. It simultaneously learns a Markov network and its tractable circuit representation, in order to guarantee and measure tractability. Our approach differs from earlier work by using Sentential Decision Diagrams (SDD) as the tractable language instead of Arithmetic Circuits (AC). SDDs have desirable properties, which more general representations such as ACs lack, that enable basic primitives for Boolean circuit compilation. This allows us to support a broader class of complex probability queries, including counting, threshold, and parity, in polytime. 1 Introduction Tractable learning [1] is a promising new machine learning paradigm that focuses on learning probability distributions that support efficient querying. It is motivated by the observation that while classical algorithms for learning Bayesian and Markov networks excel at fitting data, they ignore the cost of reasoning with the learned model. However, many applications, such as health-monitoring systems, require efficient and (guaranteed) accurate reasoning capabilities. Hence, new learning techniques are needed to support applications with these requirements. Initially, tractable learning focused on the first model class recognized to be tractable: low-treewidth graphical models [2–5]. Recent advances in probabilistic inference exploit other properties of a model, including local structure [6] and exchangeability [7], which even scale to models that have high treewidth. In particular, the discovery of local structure led to arithmetic circuits (ACs) [8], which are a much more powerful representation of tractable probability distributions. In turn, this led to new tractable learners that targeted ACs to guarantee efficient inference [9, 10]. In this context, ACs with latent variables are sometimes called sum-product networks (SPNs) [11, 12]. Other tractable learners target exchangeable models [13, 14] or determinantal point processes [15]. There is a trade-off in tractable learning that is poorly understood and often ignored: tractability is not absolute, and always relative to a class of queries that the user is interested in. Existing approaches define tractability as the ability to efficiently compute most-probable explanations (MPE) or conditional probabilities Pr(x|y) where x, y are joint assignments to subsets of random variables. While these queries are indeed efficient on ACs, many other queries of interest are not. For example, computing partial MAP remains NP-hard on low-treewidth and AC models [16]. Similarly, various 1 decision [17, 18], monotonicity [19], and utility [20] queries remain (co-)NP-hard.1 Perhaps the simplest query beyond the reach of tractable AC learners is for probabilities Pr(φ|ψ), where φ, ψ are complex properties, such as counts, thresholds, comparison, and parity of sets of random variables. These properties naturally appear throughout the machine learning literature, for example, in neural nets [21], and in exchangeable [13] and statistical relational models [22]. We believe they have not been used to their full potential in the graphical models’ world due to their intractability. We call these types of queries complex probability queries. This paper pushes the boundaries of tractable learning by supporting more queries efficiently. While we currently lack any representation tractable for partial MAP, we do have all the machinery available to learn tractable models for complex probability queries. Their tractability is enabled by the weighted model counting (WMC) [6] encoding of graphical models and recent advances in compilation of Boolean functions into Sentential Decision Diagrams (SDDs) [23]. SDDs can be seen as a syntactic subset of ACs with more desirable properties, including the ability to (1) incrementally compile a Markov network, via a conjoin operator, (2) dynamically minimize the size and complexity of the representation, and (3) efficiently perform complex probability queries. Our first contribution is a tractable learning algorithm for Markov networks with compact SDDs, following the outer loop of the successful ACMN learner [9] for ACs, that uses SDD primitives to modify the circuit during the Markov network structure search. Support for the complex queries listed above also means that these properties can be employed as features in the learned network. Second, we prove that complex symmetric probability queries over n variables, as well as their extensions, run in time polynomial in n and linear in the size of the learned SDD. Tighter complexity bounds are obtained for specific classes of queries. Finally, we illustrate these tractability properties in an empirical evaluation on four real-world data sets and four types of complex queries. 2 Background 2.1 Markov Networks A Markov network or Markov random field compactly represents the joint distribution over a set of variables X = (X1, X2, . . . , Xn) [24]. Markov networks are often represented as log-linear models, that is, an exponentiated weighted sum of features of the state x of variables X: Pr(X = x) = 1 Z exp P jwjfj(x). The fj(X) are real-valued functions of the state, wj is the weight associated with fj, and Z is the partition function. For discrete models, features are often Boolean functions; typically a conjunction of tests of the form (Xi = xi) ∧· · · ∧(Xj = xj). One is interested in performing certain inference tasks, such as computing the posterior marginals or most-likely state (MPE) given observations. In general, such tasks are intractable (#P- and NP-hard). Learning Markov networks from data require estimating the weights of the features (parameter learning), and the features themselves (structure learning). We can learn the parameters by optimizing some convex objective function, which is typically the log-likelihood. Evaluation of this function and its gradient is in general intractable (#P-complete). Therefore, it is common to optimize an approximate objective, such as the pseudo-log-likelihood. The classical structure learning approach [24] is a greedy, top-down search. It starts with features over individual variables, and greedily searches for new features to add to the model from a set of candidate features, found by conjoining pairs of existing features. Other approaches convert local models into a global one [25]. To prevent overfitting, one puts a penalty on the complexity of the model (e.g., number of features). 2.2 Tractable Circuit Representations and Tractable Learning Tractable circuit representations overcome the intractability of inference in Markov networks. Although we are not always guaranteed to find a compact tractable representation for every Markov network, in this paper we will guarantee their existence for the learned models. AC Arithmetic Circuits (ACs) [8] are directed acyclic graphs whose leafs are inputs representing either indicator variables (to assign values to random variables), parameters (weights wj) or constants. Figure 1c shows an example. ACs encode the partition function computation of a Markov network. 1The literature typically shows hardness for polytrees. Results carry over because these have compact ACs. 2 A B parameter weight feature variable w1 A ∧B P1 w2 ¬A ∧¬B P2 (a) Markov Network (b) Sentential Decision Diagram + IA I¬A + IB I¬B + I¬B IB + ew1 1 1 0 + 1 1 ew1 0 + 1 ew2 ew1 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ (c) Arithmetic Circuit Figure 1: A Markov network over variables A, B, and its tractable SDD and AC representations. By setting indicators to 1 and evaluating the AC bottom-up, the value of the partition function, Z, is obtained at the root. Other settings of the indicators encode arbitrary evidence. Moreover, a second, top-down pass yields all single-variable marginal probabilities; similar procedures exist for MPE. All these algorithms run in time linear in the size of the AC (number of edges). The tractable learning paradigm for Markov networks is best exemplified by ACMN [9], which concurrently learns a Markov network and its AC. It employs a complexity penalty based on the inference cost. Moreover, ACMN efficiently computes the exact log-likelihood (as opposed to pseudo-log-likelihood) and its gradient on the AC. ACMN uses the standard greedy top-down feature search outlined above. SDD Sentential Decision Diagrams (SDDs) are a tractable representation of sentences in propositional logic [23]. The supplement2 reviews SDDs in detail; a brief summary is next. SDDs are directed acyclic graphs, as depicted in Figure 1b. A circle node represents the disjunction of its children. A pair of boxes denotes the conjunction of the two boxes, and each box can be a (negated) Boolean variable or a reference to another SDD node. The detailed properties of SDDs yield two benefits. First, SDDs support an efficient conjoin operator that can incrementally construct new SDDs from smaller SDDs in linear time. Second, SDDs support dynamic minimization, which allows us to control the growth of an SDD during incremental construction. There is a close connection between SDDs for logic and ACs for graphical models, through an intermediate weighted model counting formulation [6], which is reviewed in the supplement. Given a graphical model M, one can construct a logical sentence ∆whose satisfying assignments are in one-to-one correspondence with the possible worlds of M. Moreover, each satisfying assignment of ∆encodes the weights wj that apply to its possible world in M. For each feature fj of M, this ∆ includes a constraint fj ⇔Pj, meaning that weight wj applies when “parameter” variable Pj is true; see Figure 1a. A consequence of this correspondence is that, given an SDD for ∆, we can efficiently construct an AC for the original Markov network M; see Figure 1. Hence, an SDD corresponding to M is a tractable representation of M. Different from ACs, SDDs have the following properties: support for efficient (linear) conjunction allows us to add new features fj and incrementally learn a Markov network. Moreover, dynamic minimization lets us systematically search for more compact circuits for the same Markov network, mitigating the increasing complexity of inference as we learn more features. Such operations are not available for ACs in general. 3 Learning Algorithm We propose LearnSDD, which employs a greedy, general-to-specific search that simultaneously learns a Markov network and its underlying SDD which is used for inference. The cost of inference in the learned model is dictated by the size of its SDD. Conceptually, our approach is similar to ACMN [9] with the key differences being our use of SDDs instead of ACs, which gives us more tractability and freedom in the types of features that are considered. 2https://dtai.cs.kuleuven.be/software/learnsdd 3 Algorithm 1 LearnSDD(T, e, α) initialize model M with variables as features Mbest ←M while number of edges |SDDM| < e and not timeout best score = −∞ F ←generateFeatures(M, T) for each feature f in F do M ′ ←M.add(f) if score(M ′, T, α) > best score best score = score(M ′, T, α) Mbest ←M ′ M ←Mbest LearnSDD, outlined in Algorithm 1, receives as input a training set T, a maximum number of edges e, and a parameter α to control the relative importance of fitting the data vs. the cost of inference. As is typical with top-down approaches to structure learning [24], the initial model has one feature Xi = true for each variable, which corresponds to a fully-factorized Markov network. Next, LearnSDD iteratively constructs a set of candidate features, where each feature is a logical formula. It scores each feature by compiling it into an SDD, conjoining the feature to the current model temporarily, and then evaluating the score of the model that includes the feature. The supplement shows how a features is added to an SDD. In each iteration, the highest scoring feature is selected and added to the model permanently. The process terminates when the maximum number of edges is reached or when it runs out of time. Inference time is dictated by the size of the learned SDD. To control this cost, we invoke dynamic SDD minimization each time a feature is evaluated, and when we permanently add a feature to the model. Performing structure learning with SDDs offers advantages over ACs. First, SDDs support a practical conjoin operation, which greatly simplifies the design of a top-down structure learning algorithm (ACMN instead relies on a complex special-purpose AC modification algorithm). Second, SDDs support dynamic minimization, allowing us to search for smaller SDDs, as needed. The following two sections discuss the score function and feature generation in greater detail. 3.1 Score Function and Weight Learning Score functions capture a trade-off between fitting the training data and the preference for simpler models, captured by a regularization term. In tractable learning, the regularization term reflects the cost of inference in the model. Therefore, we use the following score function: score(M ′, T) = [log Pr(T|M ′) −log Pr(T|M)] −α [|SDDM ′| −|SDDM|] /|SDDM| (1) where T is the training data, M ′ is the model extended with feature f, M is the old model, |SDD.| returns the number of edges in the SDD representation, and α is a user-defined parameter. The first term is the improvement in the model’s log-likelihood due to incorporating f. The second term measures the relative growth of the SDD representation after incorporating f. We use the relative growth because adding a feature to a larger model adds many more edges than adding a feature to a smaller model. Section 4 shows that any query’s inference complexity depends on the SDD size. Finally, α lets us control the trade-off between fitting the data and the cost of inference. Scoring a model requires learning the weights associated with each feature. Because we use SDDs, we can efficiently compute the exact log-likelihood and its gradient using only two passes over the SDD. Therefore, we learn maximum-likelihood estimates of the weights. 3.2 Generating Features In each iteration, LearnSDD constructs a set of candidate features using two different feature generators: conjunctive and mutex. The conjunctive generator considers each pair of features f1, f2 in the model and proposes four new candidates per pair: f1 ∧f2, ¬f1 ∧f2,f1 ∧¬f2 and ¬f1 ∧¬f2. The mutex generator automatically identifies mutually exclusive sets of variables in the data and proposes a feature to capture this relationship. Mutual exclusivity arises naturally in data. It occurs in tractable learning because existing approaches typically assume Boolean data. Hence, 4 any multi-valued attribute is converted into multiple binary variables. For all variable sets X = {X1, X2, · · · , Xn} that have exactly one “true” value in each training example, the exactly one feature Wn i=1(Xi ∧V j̸=i ¬Xj) is added to the candidate set. When at most one variable is “true”, the mutual exclusivity feature Wn i=1(Xi ∧V j̸=i ¬Xj) ∨Vn j=1 ¬Xj is added to the candidate set. 4 Complex Queries Tractable learning focuses on learning models that can efficiently compute the probability of a query given some evidence, where both the query and evidence are conjunctions of literals. However, many other important and interesting queries do not conform to this structure, including the following: • Consider the task of predicting the probability that a legislative bill will pass given that some lawmakers have already announced how they will vote. Answering this query requires estimating the probability that a count exceeds a given threshold. • Imagine only observing the first couple of sentences of a long review, and wanting to assess the probability that the entire document has more positive words than negative words in it, which could serve as proxy for how positive (negative) the review is. Answering this requires comparing two groups, in this case positive words and negative words. Table 1 lists these and other examples of what we call complex queries, which are logical functions that cannot be written as a conjunction of literals. Unfortunately, tractable models based on ACs are, in general, unable to answer these types of queries efficiently. We show that using a model with an SDD as the target tractable representation can permit efficient exact inference for certain classes of complex queries: symmetric queries and their generalizations. No known algorithm exists for efficiently answering these types of queries in ACs. For other classes of complex queries, the complexity is never worse than for ACs, and in many cases SDDs will be more efficient. Note that SPNs have the same complexity for answering queries as ACs since they are interchangeable [12]. We first discuss how to answer complex queries using ACs and SDDs. We then discuss some classes of complex queries and when we can guarantee tractable inference in SDDs. 4.1 Answering Complex Queries Currently, it is only known how to solve conjunctive queries in ACs. Therefore, we will answer complex queries by asking multiple conjunctive queries. We convert the query into DNF format W C consisting of n mutually exclusive clauses C = {C1, . . . , Cn}. Now, the probability of the query is the sum of the probabilities of the clauses: Pr (W C) = Pn i=1 Pr(Ci). In the worst case, this construction requires 2m clauses for queries over m variables. The inference complexity for each clause on the AC is O(|AC|). Hence, the total inference complexity is O(2m · |AC|). SDDs can answer complex queries without transforming them into mutually exclusive clauses. Instead, the query Q can directly be conjoined with the weighted model counting formulation ∆of the Markov network M. Given an SDD Sm for the Markov network and an SDD Sq for Q, we can efficiently compile an SDD Sa for Q ∧∆. From Sa, we can compute the partition function of the Markov network after asserting Q, which gives us the probability of Q. This computation is performed efficiently on the AC that corresponds to Sa (cf. Section 2.2). The supplement explains the protocol for answering a query. The size of the SDD Sa is at most |Sq|·|Sm| [23], and inference is linear in the circuit size, therefore it is O(|Sq| · |Sm|). When converting an arbitrary query into SDD, the size may grow as large as 2m, with m the number of variables in the query. But often it will be much smaller (see Section 4.2). Thus, the overall complexity is O(2m · |Sm|), but often much better, depending on the query class. 4.2 Classes of Complex Queries A first class of tractable queries are symmetric Boolean functions. These queries do not depend on the exact input values, but only on how many of them are true. Definition 1. A Boolean function f(X1, . . . , Xn) : {0, 1}n →{0, 1} is a symmetric query precisely when f(X1, . . . , Xn) = f(Xπ(1), . . . , Xπ(n)) for every permutation π of the n indexes. 5 Table 1: Examples of complex queries, with m the SDD size and n the number of query variables. Query class Query Type Inference Complexity Example Symmetric Parity O(mn) #(A, B, C)%2 = 0 Query k-Threshold O(mnk2) #(A, B, C) > 1 Exactly-k O(mnk2) #(A, B, C) = 2 Modulo-k O(mnk) #(A, B, C)%3 = 0 Asymmetric Exactly-k O(mnk2) #(A, B, ¬C) = 2 Tractable Hamming distance k O(mnk2) #(A, B, ¬C) ≤2 Query Group comparison O(mn3) #(A, B, ¬C) > #(D, ¬E) Table 1 lists examples of functions that can always be answered in polytime because they have a compact SDD. Note that the features generated by the mutex generator are types of exactly-k queries where k = 1, and therefore have a compact SDD. We have the following result. Theorem 1. Markov networks with compact SDDs support tractable querying of symmetric functions. More specifically, let M be a Markov network with an SDD of size m, and let Q be any symmetric function of n variables. Then, PrM(Q) can be computed in O(mn3) time. Moreover, when Q is a parity function, querying takes O(mn) time, and when Q is a k-threshold or exactly-k function, querying takes O(mnk2) time. The proof shows that any SDD can be conjoined with these queries without increasing the SDD size by more than a factor polynomial in n. The proof of Theorem 1 is given in the supplement. This tractability result can be extended to certain non-symmetric functions. For example, negating the inputs to a symmetric functions still yields a tractable complex query. This allows queries for the probability that the state is within a given Hamming distance from a desired state. Moreover, Boolean combinations of a bounded number of tractable function also admit efficient querying. This allows queries that compare symmetric properties of different groups of variables. We cannot guarantee tractability for other classes of complex queries, because some queries do not have a compact SDD representation. An example of such a query is the weighed k−threshold where each literal has a corresponding weight and the total weight of true literals must be bigger than some threshold. While the worst-case complexity of using SDDs and ACs to answer such queries is the same, we show in the supplement that SDDs can still be more efficient in practice. 5 Empirical Evaluation The goal of this section is to evaluate the merits of using SDDs as a target representation in tractable learning for complex queries. Specifically, we want to address the following questions: Q1 Does capturing mutual exclusivity allow LearnSDD to learn more accurate models than ACMN? Q2 Do SDDs produced by LearnSDD answer complex queries faster than ACs learned by ACMN? To resolve these questions, we run LearnSDD and ACMN on real-world data and compare their performance. Our LearnSDD implementation builds on the publicly available SDD package.3 5.1 Data Table 2 describes the characteristics of each data set. Table 2: Data Set Characteristics Data Set Train Set Size Tune Set Size Test Set Size Num. Vars. Traffic 3,311 441 662 128 Temperature 13,541 1,805 2,708 216 Voting 1,214 200 350 1,359 Movies 1,600 150 250 1000 3http://reasoning.cs.ucla.edu/sdd/ 6 Mutex features We used the Traffic and Temperature data sets [5] to evaluate the benefit of detecting mutual exclusivity. In the initial version of these data sets, each variable had four values, which were binarized using a 1-of-n encoding. Complex queries To evaluate complex queries, we used voting data from GovTrac.us and Pang and Lee’s Movie Review data set.4 The voting data contains all 1764 votes in the House of Representatives from the 110th Congress. Each bill is an example and the variables are the votes of the 453 congressmen, which can be yes, no, or present. The movie review data contains 1000 positive and 1000 negative movie reviews. We first applied the Porter stemmer and then used the Scikit Learn CountVectorizer,5 which counts all 1- and 2-grams, while omitting the standard Scikit Learn stop words. We selected the 1000 most frequent n-grams in the training data to serve as the features. 5.2 Methodology For all data sets, we divided the data into a single train, tune, and test partition. All experiments were run on identically configured machines with 128GB RAM and twelve 2.4GHz cores. Mutex features Using the training set, we learned models with both LearnSDD and ACMN. For LearnSDD, we tried setting α to 1.0, 0.1, 0.01 and 0.001. For ACMN, we did a grid search for the hyper-parameters (per-split penalty ps and the L1 and L2-norm weights l1 and l2) with ps ∈ {2, 5, 10}, l1 ∈{0.1, 1, 5} and l2 ∈{0.1, 0.5, 1}. For both methods, we stopped learning if the circuit exceeded two million edges or the algorithm ran for 72 hours. For each approach, we picked the best learned model according to the tuning set log-likelihood. We evaluated the quality of the selected model using the log-likelihood on the test set. Complex queries In this experiment, the goal is to compare the time needed to answer a query in models learned by LearnSDD and ACMN. In both SDDs and ACs, inference time depends linearly on the number of edges in the circuit. Therefore, to ensure a fair comparison, the learned models should have approximately the same number of edges. Hence, we first learned an SDD and then used the number of edges in the learned SDD to limit the size of the model learned by ACMN. In the voting data set, we evaluated the threshold query: what is the probability that at least 50% of the congressmen vote “yes” on a bill, given as evidence that some lawmakers have already announced their vote? We vary the percentage of unknown votes from 1 to 100% in intervals of 1% point. We evaluated several queries on the movie data set. The first two queries mimic an active sensing setting to predict features of the review without reading it entirely. The evidence for each query are the features that appear in the first 750 characters of the stemmed review. On average, the stemmed reviews have approximately 3,600 characters. The first query is Pr(#(positive ngrams) > 5) and second is Pr(#(positive ngrams) > #(negative ngrams)), which correspond to a threshold query and a group comparison query, respectively. For both queries, we varied the size of the positive and negative ngram sets from 5 to 100 ngrams with an increment size of 1. We randomly selected which ngrams are positive and negative as we are only interested in a query’s evaluation time. The third query is the probability that a parity function over a set of features is even. We vary the number of variables considered by the parity function from 5 to 100. For each query, we report the average per example inference time for each learned model on the test set. We impose a 10 minute average time limit and 100 minutes individual time limit for each query. For completeness, the supplement reports run times for queries that are guaranteed to (not) be tractable for both ACs and SDDs as well as the conditional log-likelihoods of all queries. 5.3 Results and Discussion Mutex features Figure 2 shows the test set log-likelihoods as a function of the size of the learned model. In both data sets, LearnSDD produces smaller models that have the same accuracy as AC. This is because it can add mutex features without the need to add other features that are needed as building blocks but are redundant afterwards. These results allow us to affirmatively answer (Q1). Complex queries Figure 3 shows the inference times for complex queries that are extensions of symmetric queries. For all queries, we see that LearnSDD’s model results in significantly faster inference times than ACMN’s model. In fact, ACMN’s model exceeds the ten minute time limit on 4http://www.cs.cornell.edu/people/pabo/movie-review-data/ 5http://tartarus.org/martin/PorterStemmer/ and http://scikit-learn.org/ 7 -80 -70 -60 -50 -40 0 500000 Log-likelihood Size LearnSDD ACMN (a) Temperature -40 -35 -30 -25 -20 0 500000 1e+06 Log-likelihood Size LearnSDD ACMN (b) Traffic Figure 2: The size and log-likelihood of the models learned by LearnSDD and ACMN. Ideally, the model is small with high accuracy (upper left corner), which is best approached by the LearnSDD models. 334 out of 388 of the query settings whereas this only happens in 25 settings for LearnSDD. The SDD can answer all parity questions and positive word queries in less than three hundred milliseconds and the group comparison in less than three seconds. It can answer the voting query with up to 75% of the votes unknown in less than ten minutes. These results demonstrate LearnSDD’s superior ability to answer complex queries compared to ACMN and allow us to positively answer (Q2). 0 100 200 300 400 500 600 0 20 40 60 80 100 Time (s) % Unknown votes Timeout SDD AC (a) Threshold query (Voting) 0 100 200 300 400 500 600 0 20 40 60 80 100 Time (s) #positive words ≥5 Timeout SDD AC (b) Threshold query (Movie) 0 100 200 300 400 500 600 0 20 40 60 80 100 Time (s) #positive words ≥#negative words Timeout SDD AC (c) Group comparison (Movie) 0 100 200 300 400 500 600 0 20 40 60 80 100 Time (s) # variables Timeout SDD AC (d) Parity (Movie) Figure 3: The time for SDDs vs. ACs to answer complex queries, varying the number of query variables. SDDs need less time in all settings, answering nearly all queries. ACs timeout in more than 85% of the cases. 6 Conclusions This paper highlighted the fact that tractable learning approaches learn models for only a restricted classes of queries, primarily focusing on the efficient computation of conditional probabilities. We focused on enabling efficient inference for complex queries. To achieve this, we proposed using SDDs as the target representation for tractable learning. We provided an algorithm for simultaneously learning a Markov network and its SDD representation. We proved that SDDs support polytime inference for complex symmetric probability queries. Empirically, SDDs enable significantly faster inference times than ACs for multiple complex queries. Probabilistic SDDs are a closely related representation: they also support complex queries (in structured probability spaces) [26, 27], but they lack general-purpose structure learning algorithms (a subject of future work). Acknowledgments We thank Songbai Yan for prior collaborations on related projects. JB is supported by IWT (SB/141744). JD is partially supported by the Research Fund KU Leuven (OT/11/051, C22/15/015), EU FP7 Marie Curie CIG (#294068), IWT (SBO-HYMOP) and FWO-Vlaanderen (G.0356.12). AC and AD are partially supported by NSF (#IIS-1514253) and ONR (#N00014-12-1-0423). 8 References [1] P. Domingos, M. Niepert, and D. Lowd (Eds.). In ICML Workshop on Learning Tractable Probabilistic Models, 2014. [2] F. R.. Bach and M. I. Jordan. Thin junction trees. In Proceedings of NIPS, pages 569–576, 2001. [3] N. L. Zhang. Hierarchical latent class models for cluster analysis. JMLR, 5:697–723, 2004. [4] M. Narasimhan and J. Bilmes. PAC-learning bounded tree-width graphical models. In Proc. UAI, 2004. [5] A. Chechetka and C. Guestrin. Efficient principled learning of thin junction trees. In Proceedings of NIPS, pages 273–280, 2007. [6] M. Chavira and A. Darwiche. On probabilistic inference by weighted model counting. AIJ, 172(6–7): 772–799, 2008. [7] M. Niepert and G. Van den Broeck. Tractability through exchangeability: A new perspective on efficient probabilistic inference. In Proceedings of AAAI, 2014. [8] A. Darwiche. A differential approach to inference in Bayesian networks. JACM, 50(3):280–305, 2003. [9] D. Lowd and A. Rooshenas. Learning Markov networks with arithmetic circuits. In Proc. AISTATS, pages 406–414, 2013. [10] T. Rahman, P. Kothalkar, and V. Gogate. Cutset networks: A simple, tractable, and scalable approach for improving the accuracy of Chow-Liu trees. In Proceedings of ECML PKDD, pages 630–645, 2014. [11] R. Gens and P. Domingos. Learning the structure of sum-product networks. In Proceedings of ICLM, pages 873–880, 2013. [12] A. Rooshenas and D. Lowd. Learning sum-product networks with direct and indirect variable interactions. In Proceedings ICML, pages 710–718, 2014. [13] M. Niepert and P. Domingos. Exchangeable variable models. In Proceedings of ICML, 2014. [14] J. Van Haaren, G. Van den Broeck, W. Meert, and J. Davis. Lifted generative learning of markov logic networks. Machine Learning, 2015. (to appear). [15] A. Kulesza and B. Taskar. Determinantal point processes for machine learning. Foundations and Trends in Machine Learning, 2012. [16] J. D. Park. Map complexity results and approximation methods. In Proceedings of UAI, 2002. [17] S. J. Chen, A. Choi, and A. Darwiche. Algorithms and applications for the same-decision probability. JAIR, pages 601–633, 2014. [18] C. Krause, A.and Guestrin. Optimal nonmyopic value of information in graphical models - efficient algorithms and theoretical limits. In Proceedings of IJCAI, 2005. [19] L. C. van der Gaag, H. L. Bodlaender, and A. Feelders. Monotonicity in bayesian networks. In Proceedings of UAI, pages 569–576, 2004. [20] D. D. Mau´a, C. P. De Campos, and M. Zaffalon. On the complexity of solving polytree-shaped limited memory influence diagrams with binary variables. AIJ, 205:30–38, 2013. [21] I. Parberry and G. Schnitger. Relating Boltzmann machines to conventional models of computation. Neural Networks, 2(1):59–67, 1989. [22] D. Buchman and D. Poole. Representing aggregators in relational probabilistic models. In Proceedings of AAAI, 2015. [23] A. Darwiche. SDD: A new canonical representation of propositional knowledge bases. In Proceedings of IJCAI, pages 819–826, 2011. [24] S. Della Pietra, V. Della Pietra, and J. Lafferty. Inducing Features of Random Fields. IEEE TPAMI, 19: 380–392, 1997. [25] Daniel Lowd and Jesse Davis. Improving Markov network structure learning using decision trees. The Journal of Machine Learning Research, 15(1):501532, 2014. [26] D. Kisa, G. Van den Broeck, A. Choi, and A. Darwiche. Probabilistic sentential decision diagrams. In KR, 2014. [27] A. Choi, G. Van den Broeck, and A. Darwiche. Tractable learning for structured probability spaces: A case study in learning preference distributions. In Proceedings of IJCAI, 2015. 9 | 2015 | 293 |
5,806 | Variational Dropout and the Local Reparameterization Trick Diederik P. Kingma⇤, Tim Salimans⇥and Max Welling⇤† ⇤Machine Learning Group, University of Amsterdam ⇥Algoritmica † University of California, Irvine, and the Canadian Institute for Advanced Research (CIFAR) D.P.Kingma@uva.nl, salimans.tim@gmail.com, M.Welling@uva.nl Abstract We investigate a local reparameterizaton technique for greatly reducing the variance of stochastic gradients for variational Bayesian inference (SGVB) of a posterior over model parameters, while retaining parallelizability. This local reparameterization translates uncertainty about global parameters into local noise that is independent across datapoints in the minibatch. Such parameterizations can be trivially parallelized and have variance that is inversely proportional to the minibatch size, generally leading to much faster convergence. Additionally, we explore a connection with dropout: Gaussian dropout objectives correspond to SGVB with local reparameterization, a scale-invariant prior and proportionally fixed posterior variance. Our method allows inference of more flexibly parameterized posteriors; specifically, we propose variational dropout, a generalization of Gaussian dropout where the dropout rates are learned, often leading to better models. The method is demonstrated through several experiments. 1 Introduction Deep neural networks are a flexible family of models that easily scale to millions of parameters and datapoints, but are still tractable to optimize using minibatch-based stochastic gradient ascent. Due to their high flexibility, neural networks have the capacity to fit a wide diversity of nonlinear patterns in the data. This flexbility often leads to overfitting when left unchecked: spurious patterns are found that happen to fit well to the training data, but are not predictive for new data. Various regularization techniques for controlling this overfitting are used in practice; a currently popular and empirically effective technique being dropout [10]. In [22] it was shown that regular (binary) dropout has a Gaussian approximation called Gaussian dropout with virtually identical regularization performance but much faster convergence. In section 5 of [22] it is shown that Gaussian dropout optimizes a lower bound on the marginal likelihood of the data. In this paper we show that a relationship between dropout and Bayesian inference can be extended and exploited to greatly improve the efficiency of variational Bayesian inference on the model parameters. This work has a direct interpretation as a generalization of Gaussian dropout, with the same fast convergence but now with the freedom to specify more flexibly parameterized posterior distributions. Bayesian posterior inference over the neural network parameters is a theoretically attractive method for controlling overfitting; exact inference is computationally intractable, but efficient approximate schemes can be designed. Markov Chain Monte Carlo (MCMC) is a class of approximate inference methods with asymptotic guarantees, pioneered by [16] for the application of regularizing neural networks. Later useful refinements include [23] and [1]. An alternative to MCMC is variational inference [11] or the equivalent minimum description length (MDL) framework. Modern variants of stochastic variational inference have been applied to neural 1 networks with some succes [8], but have been limited by high variance in the gradients. Despite their theoretical attractiveness, Bayesian methods for inferring a posterior distribution over neural network weights have not yet been shown to outperform simpler methods such as dropout. Even a new crop of efficient variational inference algorithms based on stochastic gradients with minibatches of data [14, 17, 19] have not yet been shown to significantly improve upon simpler dropout-based regularization. In section 2 we explore an as yet unexploited trick for improving the efficiency of stochastic gradientbased variational inference with minibatches of data, by translating uncertainty about global parameters into local noise that is independent across datapoints in the minibatch. The resulting method has an optimization speed on the same level as fast dropout [22], and indeed has the original Gaussian dropout method as a special case. An advantage of our method is that it allows for full Bayesian analysis of the model, and that it’s significantly more flexible than standard dropout. The approach presented here is closely related to several popular methods in the literature that regularize by adding random noise; these relationships are discussed in section 4. 2 Efficient and Practical Bayesian Inference We consider Bayesian analysis of a dataset D, containing a set of N i.i.d. observations of tuples (x, y), where the goal is to learn a model with parameters or weights w of the conditional probability p(y|x, w) (standard classification or regression)1. Bayesian inference in such a model consists of updating some initial belief over parameters w in the form of a prior distribution p(w), after observing data D, into an updated belief over these parameters in the form of (an approximation to) the posterior distribution p(w|D). Computing the true posterior distribution through Bayes’ rule p(w|D) = p(w)p(D|w)/p(D) involves computationally intractable integrals, so good approximations are necessary. In variational inference, inference is cast as an optimization problem where we optimize the parameters φ of some parameterized model qφ(w) such that qφ(w) is a close approximation to p(w|D) as measured by the Kullback-Leibler divergence DKL(qφ(w)||p(w|D)). This divergence of our posterior qφ(w) to the true posterior is minimized in practice by maximizing the so-called variational lower bound L(φ) of the marginal likelihood of the data: L(φ) = −DKL(qφ(w)||p(w)) + LD(φ) (1) where LD(φ) = X (x,y)2D Eqφ(w) [log p(y|x, w)] (2) We’ll call LD(φ) the expected log-likelihood. The bound L(φ) plus DKL(qφ(w)||p(w|D)) equals the (conditional) marginal log-likelihood P (x,y)2D log p(y|x). Since this marginal log-likelihood is constant w.r.t. φ, maximizing the bound w.r.t. φ will minimize DKL(qφ(w)||p(w|D)). 2.1 Stochastic Gradient Variational Bayes (SGVB) Various algorithms for gradient-based optimization of the variational bound (eq. (1)) with differentiable q and p exist. See section 4 for an overview. A recently proposed efficient method for minibatch-based optimization with differentiable models is the stochastic gradient variational Bayes (SGVB) method introduced in [14] (especially appendix F) and [17]. The basic trick in SGVB is to parameterize the random parameters w ⇠qφ(w) as: w = f(✏, φ) where f(.) is a differentiable function and ✏⇠p(✏) is a random noise variable. In this new parameterisation, an unbiased differentiable minibatch-based Monte Carlo estimator of the expected log-likelihood can be formed: LD(φ) ' LSGVB D (φ) = N M M X i=1 log p(yi|xi, w = f(✏, φ)), (3) where (xi, yi)M i=1 is a minibatch of data with M random datapoints (xi, yi) ⇠D, and ✏is a noise vector drawn from the noise distribution p(✏). We’ll assume that the remaining term in the variational lower bound, DKL(qφ(w)||p(w)), can be computed deterministically, but otherwise it may be approximated similarly. The estimator (3) is differentiable w.r.t. φ and unbiased, so its gradient 1Note that the described method is not limited to classification or regression and is straightforward to apply to other modeling settings like unsupervised models and temporal models. 2 is also unbiased: rφLD(φ) ' rφLSGVB D (φ). We can proceed with variational Bayesian inference by randomly initializing φ and performing stochastic gradient ascent on L(φ) (1). 2.2 Variance of the SGVB estimator The theory of stochastic approximation tells us that stochastic gradient ascent using (3) will asymptotically converge to a local optimum for an appropriately declining step size and sufficient weight updates [18], but in practice the performance of stochastic gradient ascent crucially depends on the variance of the gradients. If this variance is too large, stochastic gradient descent will fail to make much progress in any reasonable amount of time. Our objective function consists of an expected log likelihood term that we approximate using Monte Carlo, and a KL divergence term DKL(qφ(w)||p(w)) that we assume can be calculated analytically and otherwise be approximated with Monte Carlo with similar reparameterization. Assume that we draw minibatches of datapoints with replacement; see appendix F for a similar analysis for minibatches without replacement. Using Li as shorthand for log p(yi|xi, w = f(✏i, φ)), the contribution to the likelihood for the i-th datapoint in the minibatch, the Monte Carlo estimator (3) may be rewritten as LSGVB D (φ) = N M PM i=1 Li, whose variance is given by Var ⇥ LSGVB D (φ) ⇤ = N 2 M 2 ⇣M X i=1 Var [Li] + 2 M X i=1 M X j=i+1 Cov [Li, Lj] ⌘ (4) =N 2⇣1 M Var [Li] + M −1 M Cov [Li, Lj] ⌘ , (5) where the variances and covariances are w.r.t. both the data distribution and ✏distribution, i.e. Var [Li] = Var✏,xi,yi ⇥ log p(yi|xi, w = f(✏, φ)) ⇤ , with xi, yi drawn from the empirical distribution defined by the training set. As can be seen from (5), the total contribution to the variance by Var [Li] is inversely proportional to the minibatch size M. However, the total contribution by the covariances does not decrease with M. In practice, this means that the variance of LSGVB D (φ) can be dominated by the covariances for even moderately large M. 2.3 Local Reparameterization Trick We therefore propose an alternative estimator for which we have Cov [Li, Lj] = 0, so that the variance of our stochastic gradients scales as 1/M. We then make this new estimator computationally efficient by not sampling ✏directly, but only sampling the intermediate variables f(✏) through which ✏influences LSGVB D (φ). By doing so, the global uncertainty in the weights is translated into a form of local uncertainty that is independent across examples and easier to sample. We refer to such a reparameterization from global noise to local noise as the local reparameterization trick. Whenever a source of global noise can be translated to local noise in the intermediate states of computation (✏! f(✏)), a local reparameterization can be applied to yield a computationally and statistically efficient gradient estimator. Such local reparameterization applies to a fairly large family of models, but is best explained through a simple example: Consider a standard fully connected neural network containing a hidden layer consisting of 1000 neurons. This layer receives an M ⇥1000 input feature matrix A from the layer below, which is multiplied by a 1000 ⇥1000 weight matrix W, before a nonlinearity is applied, i.e. B = AW. We then specify the posterior approximation on the weights to be a fully factorized Gaussian, i.e. qφ(wi,j) = N(µi,j, σ2 i,j) 8wi,j 2 W, which means the weights are sampled as wi,j = µi,j + σi,j✏i,j, with ✏i,j ⇠N(0, 1). In this case we could make sure that Cov [Li, Lj] = 0 by sampling a separate weight matrix W for each example in the minibatch, but this is not computationally efficient: we would need to sample M million random numbers for just a single layer of the neural network. Even if this could be done efficiently, the computation following this step would become much harder: Where we originally performed a simple matrix-matrix product of the form B = AW, this now turns into M separate local vector-matrix products. The theoretical complexity of this computation is higher, but, more importantly, such a computation can usually not be performed in parallel using fast device-optimized BLAS (Basic Linear Algebra Subprograms). This also happens with other neural network architectures such as convolutional neural networks, where optimized libraries for convolution cannot deal with separate filter matrices per example. 3 Fortunately, the weights (and therefore ✏) only influence the expected log likelihood through the neuron activations B, which are of much lower dimension. If we can therefore sample the random activations B directly, without sampling W or ✏, we may obtain an efficient Monte Carlo estimator at a much lower cost. For a factorized Gaussian posterior on the weights, the posterior for the activations (conditional on the input A) is also factorized Gaussian: qφ(wi,j) = N(µi,j, σ2 i,j) 8wi,j 2 W =) qφ(bm,j|A) = N(γm,j, δm,j), with γm,j = 1000 X i=1 am,iµi,j, and δm,j = 1000 X i=1 a2 m,iσ2 i,j. (6) Rather than sampling the Gaussian weights and then computing the resulting activations, we may thus sample the activations from their implied Gaussian distribution directly, using bm,j = γm,j + p δm,j⇣m,j, with ⇣m,j ⇠N(0, 1). Here, ⇣is an M ⇥1000 matrix, so we only need to sample M thousand random variables instead of M million: a thousand fold savings. In addition to yielding a gradient estimator that is more computationally efficient than drawing separate weight matrices for each training example, the local reparameterization trick also leads to an estimator that has lower variance. To see why, consider the stochastic gradient estimate with respect to the posterior parameter σ2 i,j for a minibatch of size M = 1. Drawing random weights W, we get @LSGVB D @σ2 i,j = @LSGVB D @bm,j ✏i,jam,i 2σi,j . (7) If, on the other hand, we form the same gradient using the local reparameterization trick, we get @LSGVB D @σ2 i,j = @LSGVB D @bm,j ⇣m,ja2 m,i 2 p δm,j . (8) Here, there are two stochastic terms: The first is the backpropagated gradient @LSGVB D /@bm,j, and the second is the sampled random noise (✏i,j or ⇣m,j). Estimating the gradient with respect to σ2 i,j then basically comes down to estimating the covariance between these two terms. This is much easier to do for ⇣m,j as there are much fewer of these: individually they have higher correlation with the backpropagated gradient @LSGVB D /@bm,j, so the covariance is easier to estimate. In other words, measuring the effect of ⇣m,j on @LSGVB D /@bm,j is easy as ⇣m,j is the only random variable directly influencing this gradient via bm,j. On the other hand, when sampling random weights, there are a thousand ✏i,j influencing each gradient term, so their individual effects get lost in the noise. In appendix D we make this argument more rigorous, and in section 5 we show that it holds experimentally. 3 Variational Dropout Dropout is a technique for regularization of neural network parameters, which works by adding multiplicative noise to the input of each layer of the neural network during optimization. Using the notation of section 2.3, for a fully connected neural network dropout corresponds to: B = (A ◦⇠)✓, with ⇠i,j ⇠p(⇠i,j) (9) where A is the M ⇥K matrix of input features for the current minibatch, ✓is a K ⇥L weight matrix, and B is the M ⇥L output matrix for the current layer (before a nonlinearity is applied). The ◦symbol denotes the elementwise (Hadamard) product of the input matrix with a M ⇥K matrix of independent noise variables ⇠. By adding noise to the input during training, the weight parameters ✓are less likely to overfit to the training data, as shown empirically by previous publications. Originally, [10] proposed drawing the elements of ⇠from a Bernoulli distribution with probability 1 −p, with p the dropout rate. Later it was shown that using a continuous distribution with the same relative mean and variance, such as a Gaussian N(1, ↵) with ↵= p/(1 −p), works as well or better [20]. Here, we re-interpret dropout with continuous noise as a variational method, and propose a generalization that we call variational dropout. In developing variational dropout we provide a firm Bayesian justification for dropout training by deriving its implicit prior distribution and variational objective. This new interpretation allows us to propose several useful extensions to dropout, such as a principled way of making the normally fixed dropout rates p adaptive to the data. 4 3.1 Variational dropout with independent weight noise If the elements of the noise matrix ⇠are drawn independently from a Gaussian N(1, ↵), the marginal distributions of the activations bm,j 2 B are Gaussian as well: qφ(bm,j|A) = N(γm,j, δm,j), with γm,j = K X i=1 am,i✓i,j, and δm,j = ↵ K X i=1 a2 m,i✓2 i,j. (10) Making use of this fact, [22] proposed Gaussian dropout, a regularization method where, instead of applying (9), the activations are directly drawn from their (approximate or exact) marginal distributions as given by (10). [22] argued that these marginal distributions are exact for Gaussian noise ⇠, and for Bernoulli noise still approximately Gaussian because of the central limit theorem. This ignores the dependencies between the different elements of B, as present using (9), but [22] report good results nonetheless. As noted by [22], and explained in appendix B, this Gaussian dropout noise can also be interpreted as arising from a Bayesian treatment of a neural network with weights W that multiply the input to give B = AW, where the posterior distribution of the weights is given by a factorized Gaussian with qφ(wi,j) = N(✓i,j, ↵✓2 i,j). From this perspective, the marginal distributions (10) then arise through the application of the local reparameterization trick, as introduced in section 2.3. The variational objective corresponding to this interpretation is discussed in section 3.3. 3.2 Variational dropout with correlated weight noise Instead of ignoring the dependencies of the activation noise, as in section 3.1, we may retain the dependencies by interpreting dropout (9) as a form of correlated weight noise: B = (A ◦⇠)✓, ⇠i,j ⇠N(1, ↵) () bm = amW, with W = (w0 1, w0 2, . . . , w0 K)0, and wi = si✓i, with qφ(si) = N(1, ↵), (11) where am is a row of the input matrix and bm a row of the output. The wi are the rows of the weight matrix, each of which is constructed by multiplying a non-stochastic parameter vector ✓i by a stochastic scale variable si. The distribution on these scale variables we interpret as a Bayesian posterior distribution. The weight parameters ✓i (and the biases) are estimated using maximum likelihood. The original Gaussian dropout sampling procedure (9) can then be interpreted as arising from a local reparameterization of our posterior on the weights W. 3.3 Dropout’s scale-invariant prior and variational objective The posterior distributions qφ(W) proposed in sections 3.1 and 3.2 have in common that they can be decomposed into a parameter vector ✓that captures the mean, and a multiplicative noise term determined by parameters ↵. Any posterior distribution on W for which the noise enters this multiplicative way, we will call a dropout posterior. Note that many common distributions, such as univariate Gaussians (with nonzero mean), can be reparameterized to meet this requirement. During dropout training, ✓is adapted to maximize the expected log likelihood Eq↵[LD(✓)]. For this to be consistent with the optimization of a variational lower bound of the form in (2), the prior on the weights p(w) has to be such that DKL(qφ(w)||p(w)) does not depend on ✓. In appendix C we show that the only prior that meets this requirement is the scale invariant log-uniform prior: p(log(|wi,j|)) / c, i.e. a prior that is uniform on the log-scale of the weights (or the weight-scales si for section 3.2). As explained in appendix A, this prior has an interesting connection with the floating point format for storing numbers: From an MDL perspective, the floating point format is optimal for communicating numbers drawn from this prior. Conversely, the KL divergence DKL(qφ(w)||p(w)) with this prior has a natural interpretation as regularizing the number of significant digits our posterior qφ stores for the weights wi,j in the floating-point format. Putting the expected log likelihood and KL-divergence penalty together, we see that dropout training maximizes the following variatonal lower bound w.r.t. ✓: Eq↵[LD(✓)] −DKL(q↵(w)||p(w)), (12) 5 where we have made the dependence on the ✓and ↵parameters explicit. The noise parameters ↵ (e.g. the dropout rates) are commonly treated as hyperparameters that are kept fixed during training. For the log-uniform prior this then corresponds to a fixed limit on the number of significant digits we can learn for each of the weights wi,j. In section 3.4 we discuss the possibility of making this limit adaptive by also maximizing the lower bound with respect to ↵. For the choice of a factorized Gaussian approximate posterior with qφ(wi,j) = N(✓i,j, ↵✓2 i,j), as discussed in section 3.1, the lower bound (12) is analyzed in detail in appendix C. There, it is shown that for this particular choice of posterior the negative KL-divergence −DKL(q↵(w)||p(w)) is not analytically tractable, but can be approximated extremely accurately using −DKL[qφ(wi)|p(wi)] ⇡constant + 0.5 log(↵) + c1↵+ c2↵2 + c3↵3, with c1 = 1.16145124, c2 = −1.50204118, c3 = 0.58629921. The same expression may be used to calculate the corresponding term −DKL(q↵(s)||p(s)) for the posterior approximation of section 3.2. 3.4 Adaptive regularization through optimizing the dropout rate The noise parameters ↵used in dropout training (e.g. the dropout rates) are usually treated as fixed hyperparameters, but now that we have derived dropout’s variational objective (12), making these parameters adaptive is trivial: simply maximize the variational lower bound with respect to ↵. We can use this to learn a separate dropout rate per layer, per neuron, of even per separate weight. In section 5 we look at the predictive performance obtained by making ↵adaptive. We found that very large values of ↵correspond to local optima from which it is hard to escape due to large-variance gradients. To avoid such local optima, we found it beneficial to set a constraint ↵1 during training, i.e. we maximize the posterior variance at the square of the posterior mean, which corresponds to a dropout rate of 0.5. 4 Related Work Pioneering work in practical variational inference for neural networks was done in [8], where a (biased) variational lower bound estimator was introduced with good results on recurrent neural network models. In later work [14, 17] it was shown that even more practical estimators can be formed for most types of continuous latent variables or parameters using a (non-local) reparameterization trick, leading to efficient and unbiased stochastic gradient-based variational inference. These works focused on an application to latent-variable inference; extensive empirical results on inference of global model parameters were reported in [6], including succesful application to reinforcement learning. These earlier works used the relatively high-variance estimator (3), upon which we improve. Variable reparameterizations have a long history in the statistics literature, but have only recently found use for efficient gradient-based machine learning and inference [4, 13, 19]. Related is also probabilistic backpropagation [9], an algorithm for inferring marginal posterior probabilities; however, it requires certain tractabilities in the network making it insuitable for the type of models under consideration in this paper. As we show here, regularization by dropout [20, 22] can be interpreted as variational inference. DropConnect [21] is similar to dropout, but with binary noise on the weights rather than hidden units. DropConnect thus has a similar interpretation as variational inference, with a uniform prior over the weights, and a mixture of two Dirac peaks as posterior. In [2], standout was introduced, a variation of dropout where a binary belief network is learned for producing dropout rates. Recently, [15] proposed another Bayesian perspective on dropout. In recent work [3], a similar reparameterization is described and used for variational inference; their focus is on closed-form approximations of the variational bound, rather than unbiased Monte Carlo estimators. [15] and [7] also investigate a Bayesian perspective on dropout, but focus on the binary variant. [7] reports various encouraging results on the utility of dropout’s implied prediction uncertainty. 6 5 Experiments We compare our method to standard binary dropout and two popular versions of Gaussian dropout, which we’ll denote with type A and type B. With Gaussian dropout type A we denote the pre-linear Gaussian dropout from [20]; type B denotes the post-linear Gaussian dropout from [22]. This way, the method names correspond to the matrix names in section 2 (A or B) where noise is injected. Models were implemented in Theano [5], and optimization was performed using Adam [12] with default hyper-parameters and temporal averaging. Two types of variational dropout were included. Type A is correlated weight noise as introduced in section 3.2: an adaptive version of Gaussian dropout type A. Variational dropout type B has independent weight uncertainty as introduced in section 3.1, and corresponds to Gaussian dropout type B. A de facto standard benchmark for regularization methods is the task of MNIST hand-written digit classification. We choose the same architecture as [20]: a fully connected neural network with 3 hidden layers and rectified linear units (ReLUs). We follow the dropout hyper-parameter recommendations from these earlier publications, which is a dropout rate of p = 0.5 for the hidden layers and p = 0.2 for the input layer. We used early stopping with all methods, where the amount of epochs to run was determined based on performance on a validation set. Variance. We start out by empirically comparing the variance of the different available stochastic estimators of the gradient of our variational objective. To do this we train the neural network described above for either 10 epochs (test error 3%) or 100 epochs (test error 1.3%), using variational dropout with independent weight noise. After training, we calculate the gradients for the weights of the top and bottom level of our network on the full training set, and compare against the gradient estimates per batch of M = 1000 training examples. Appendix E contains the same analysis for the case of variational dropout with correlated weight noise. Table 1 shows that the local reparameterization trick yields the lowest variance among all variational dropout estimators for all conditions, although it is still substantially higher compared to not having any dropout regularization. The 1/M variance scaling achieved by our estimator is especially important early on in the optimization when it makes the largest difference (compare weight sample per minibatch and weight sample per data point). The additional variance reduction obtained by our estimator through drawing fewer random numbers (section 2.3) is about a factor of 2, and this remains relatively stable as training progresses (compare local reparameterization and weight sample per data point). top layer top layer bottom layer bottom layer stochastic gradient estimator 10 epochs 100 epochs 10 epochs 100 epochs local reparameterization (ours) 7.8 ⇥103 1.2 ⇥103 1.9 ⇥102 1.1 ⇥102 weight sample per data point (slow) 1.4 ⇥104 2.6 ⇥103 4.3 ⇥102 2.5 ⇥102 weight sample per minibatch (standard) 4.9 ⇥104 4.3 ⇥103 8.5 ⇥102 3.3 ⇥102 no dropout noise (minimal var.) 2.8 ⇥103 5.9 ⇥101 1.3 ⇥102 9.0 ⇥100 Table 1: Average empirical variance of minibatch stochastic gradient estimates (1000 examples) for a fully connected neural network, regularized by variational dropout with independent weight noise. Speed. We compared the regular SGVB estimator, with separate weight samples per datapoint with the efficient estimator based on local reparameterization, in terms of wall-clock time efficiency. With our implementation on a modern GPU, optimization with the na¨ıve estimator took 1635 seconds per epoch, while the efficient estimator took 7.4 seconds: an over 200 fold speedup. Classification error. Figure 1 shows test-set classification error for the tested regularization methods, for various choices of number of hidden units. Our adaptive variational versions of Gaussian dropout perform equal or better than their non-adaptive counterparts and standard dropout under all tested conditions. The difference is especially noticable for the smaller networks. In these smaller networks, we observe that variational dropout infers dropout rates that are on average far lower than the dropout rates for larger networks. This adaptivity comes at negligable computational cost. 7 (a) Classification error on the MNIST dataset (b) Classification error on the CIFAR-10 dataset Figure 1: Best viewed in color. (a) Comparison of various dropout methods, when applied to fullyconnected neural networks for classification on the MNIST dataset. Shown is the classification error of networks with 3 hidden layers, averaged over 5 runs. he variational versions of Gaussian dropout perform equal or better than their non-adaptive counterparts; the difference is especially large with smaller models, where regular dropout often results in severe underfitting. (b) Comparison of dropout methods when applied to convolutional net a trained on the CIFAR-10 dataset, for different settings of network size k. The network has two convolutional layers with each 32k and 64k feature maps, respectively, each with stride 2 and followed by a softplus nonlinearity. This is followed by two fully connected layers with each 128k hidden units. We found that slightly downscaling the KL divergence part of the variational objective can be beneficial. Variational (A2) in figure 1 denotes performance of type A variational dropout but with a KL-divergence downscaled with a factor of 3; this small modification seems to prevent underfitting, and beats all other dropout methods in the tested models. 6 Conclusion Efficiency of posterior inference using stochastic gradient-based variational Bayes (SGVB) can often be significantly improved through a local reparameterization where global parameter uncertainty is translated into local uncertainty per datapoint. By injecting noise locally, instead of globally at the model parameters, we obtain an efficient estimator that has low computational complexity, can be trivially parallelized and has low variance. We show how dropout is a special case of SGVB with local reparameterization, and suggest variational dropout, a straightforward extension of regular dropout where optimal dropout rates are inferred from the data, rather than fixed in advance. We report encouraging empirical results. Acknowledgments We thank the reviewers and Yarin Gal for valuable feedback. Diederik Kingma is supported by the Google European Fellowship in Deep Learning, Max Welling is supported by research grants from Google and Facebook, and the NWO project in Natural AI (NAI.14.108). References [1] Ahn, S., Korattikara, A., and Welling, M. (2012). Bayesian posterior sampling via stochastic gradient Fisher scoring. arXiv preprint arXiv:1206.6380. [2] Ba, J. and Frey, B. (2013). Adaptive dropout for training deep neural networks. In Advances in Neural Information Processing Systems, pages 3084–3092. [3] Bayer, J., Karol, M., Korhammer, D., and Van der Smagt, P. (2015). Fast adaptive weight noise. arXiv preprint arXiv:1507.05331. [4] Bengio, Y. (2013). Estimating or propagating gradients through stochastic neurons. arXiv preprint arXiv:1305.2982. 8 [5] Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D., and Bengio, Y. (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy), volume 4. [6] Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. (2015). Weight uncertainty in neural networks. arXiv preprint arXiv:1505.05424. [7] Gal, Y. and Ghahramani, Z. (2015). Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. arXiv preprint arXiv:1506.02142. [8] Graves, A. (2011). Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348–2356. [9] Hern´andez-Lobato, J. M. and Adams, R. P. (2015). Probabilistic backpropagation for scalable learning of Bayesian neural networks. arXiv preprint arXiv:1502.05336. [10] Hinton, G. E., Srivastava, N., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. R. (2012). Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580. [11] Hinton, G. E. and Van Camp, D. (1993). Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, pages 5–13. ACM. [12] Kingma, D. and Ba, J. (2015). Adam: A method for stochastic optimization. Proceedings of the International Conference on Learning Representations 2015. [13] Kingma, D. P. (2013). Fast gradient-based inference with continuous latent variable models in auxiliary form. arXiv preprint arXiv:1306.0733. [14] Kingma, D. P. and Welling, M. (2014). Auto-encoding variational Bayes. Proceedings of the 2nd International Conference on Learning Representations. [15] Maeda, S.-i. (2014). A Bayesian encourages dropout. arXiv preprint arXiv:1412.7003. [16] Neal, R. M. (1995). Bayesian learning for neural networks. PhD thesis, University of Toronto. [17] Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1278–1286. [18] Robbins, H. and Monro, S. (1951). A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407. [19] Salimans, T. and Knowles, D. A. (2013). Fixed-form variational posterior approximation through stochastic linear regression. Bayesian Analysis, 8(4). [20] Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. (2014). Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929– 1958. [21] Wan, L., Zeiler, M., Zhang, S., Cun, Y. L., and Fergus, R. (2013). Regularization of neural networks using dropconnect. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 1058–1066. [22] Wang, S. and Manning, C. (2013). Fast dropout training. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 118–126. [23] Welling, M. and Teh, Y. W. (2011). Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 681–688. 9 | 2015 | 294 |
5,807 | Fast, Provable Algorithms for Isotonic Regression in all ℓp-norms ∗ Rasmus Kyng Dept. of Computer Science Yale University rasmus.kyng@yale.edu Anup Rao† School of Computer Science Georgia Tech arao89@gatech.edu Sushant Sachdeva Dept. of Computer Science Yale University sachdeva@cs.yale.edu Abstract Given a directed acyclic graph G, and a set of values y on the vertices, the Isotonic Regression of y is a vector x that respects the partial order described by G, and minimizes ∥x −y∥, for a specified norm. This paper gives improved algorithms for computing the Isotonic Regression for all weighted ℓp-norms with rigorous performance guarantees. Our algorithms are quite practical, and variants of them can be implemented to run fast in practice. 1 Introduction A directed acyclic graph (DAG) G(V, E) defines a partial order on V where u precedes v if there is a directed path from u to v. We say that a vector x ∈RV is isotonic (with respect to G) if it is a weakly order-preserving mapping of V into R. Let IG denote the set of all x that are isotonic with respect to G. It is immediate that IG can be equivalently defined as follows: IG = {x ∈RV | xu ≤xv for all (u, v) ∈E}. (1) Given a DAG G, and a norm ∥·∥on RV , the Isotonic Regression of observations y ∈RV , is given by x ∈IG that minimizes ∥x −y∥. Such monotonic relationships are fairly common in data. They allow one to impose only weak assumptions on the data, e.g. the typical height of a young girl child is an increasing function of her age, and the heights of her parents, rather than a more constrained parametric model. Isotonic Regression is an important shape-constrained nonparametric regression method that has been studied since the 1950’s [1, 2, 3]. It has applications in diverse fields such as Operations Research [4, 5] and Signal Processing [6]. In Statistics, it has several applications (e.g. [7, 8]), and the statistical properties of Isotonic Regression under the ℓ2-norm have been well studied, particularly over linear orderings (see [9] and references therein). More recently, Isotonic regression has found several applications in Learning [10, 11, 12, 13, 14]. It was used by Kalai and Sastry [10] to provably learn Generalized Linear Models and Single Index Models; and by Zadrozny and Elkan [13], and Narasimhan and Agarwal [14] towards constructing binary Class Probability Estimation models. The most common norms of interest are weighted ℓp-norms, defined as ∥z∥w,p = ( P v∈V wp v · |zv|p1/p , p ∈[1, ∞), maxv∈V wv · |zv|, p = ∞, where wv > 0 is the weight of a vertex v ∈V. In this paper, we focus on algorithms for Isotonic Regression under weighted ℓp-norms. Such algorithms have been applied to large data-sets from Microarrays [15], and from the web [16, 17]. ∗Code from this work is available at https://github.com/sachdevasushant/Isotonic †Part of this work was done when this author was a graduate student at Yale University. 1 Given a DAG G, and observations y ∈RV , our regression problem can be expressed as the following convex program: min ∥x −y∥w,p such that xu ≤xv for all (u, v) ∈E. (2) 1.1 Our Results Let |V | = n, and |E| = m. We’ll assume that G is connected, and hence m ≥n −1. ℓp-norms, p < ∞. We give a unified, optimization-based framework for algorithms that provably solve the Isotonic Regression problem for p ∈[1, ∞). The following is an informal statement of our main theorem (Theorem 3.1) in this regard (assuming wv are bounded by poly(n)). Theorem 1.1 (Informal). There is an algorithm that, given a DAG G, observations y, and δ > 0, runs in time O(m1.5 log2 n log n/δ), and computes an isotonic xALG ∈IG such that ∥xALG −y∥p w,p ≤min x∈IG ∥x −y∥p w,p + δ. The previous best time bounds were O(nm log n2 m ) for p ∈(1, ∞) [18] and O(nm + n2 log n) for p = 1 [19]. ℓ∞-norms. For ℓ∞-norms, unlike ℓp-norms for p ∈(1, ∞), the Isotonic Regression problem need not have a unique solution. There are several specific solutions that have been studied in the literature (see [20] for a detailed discussion). In this paper, we show that some of them (MAX, MIN, and AVG to be precise) can be computed in time linear in the size of G. Theorem 1.2. There is an algorithm that, given a DAG G(V, E), a set of observations y ∈RV , and weights w, runs in expected time O(m), and computes an isotonic xINF ∈IG such that ∥xINF −y∥w,∞= min x∈IG ∥x −y∥w,∞. Our algorithm achieves the best possible running time. This was not known even for linear or tree orders. The previous best running time was O(m log n) [20]. Strict Isotonic Regression. We also give improved algorithms for Strict Isotonic Regression. Given observations y, and weights w, its Strict Isotonic Regression xSTRICT is defined to be the limit of ˆxp as p goes to ∞, where ˆxp is the Isotonic Regression for y under the norm ∥·∥w,p . It is immediate that xStrict is an ℓ∞Isotonic Regression for y. In addition, it is unique and satisfies several desirable properties (see [21]). Theorem 1.3. There is an algorithm that, given a DAG G(V, E), a set of observation y ∈RV , and weights w, runs in expected time O(mn), and computes xSTRICT, the strict Isotonic Regression of y. The previous best running time was O(min(mn, nω) + n2 log n) [21]. 1.2 Detailed Comparison to Previous Results ℓp-norms, p < ∞. There has been a lot of work for fast algorithms for special graph families, mostly for p = 1, 2 (see [22] for references). For some cases where G is very simple, e.g. a directed path (corresponding to linear orders), or a rooted, directed tree (corresponding to tree orders), several works give algorithms with running times of O(n) or O(n log n) (see [22] for references). Theorem 1.1 not only improves on the previously best known algorithms for general DAGs, but also on several algorithms for special graph families (see Table 1). One such setting is where V is a point set in d-dimensions, and (u, v) ∈E whenever ui ≤vi for all i ∈[d]. This setting has applications to data analysis, as in the example given earlier, and has been studied extensively (see [23] for references). For this case, it was proved by Stout (see Prop. 2, [23]) that these partial orders can be embedded in a DAG with O(n logd−1 n) vertices and edges, and that this DAG can be computed in time linear in its size. The bounds then follow by combining this result with our theorem above. We obtain improved running times for all ℓp norms for DAGs with m = o(n2/ log6 n), and for d-dim point sets for d ≥3. For d = 2, Stout [19] gives an O(n log2 n) time algorithm. 2 Table 1: Comparison to previous best results for ℓp-norms, p ̸= ∞ Previous best This paper ℓ1 ℓp, 1 < p < ∞ ℓp, p < ∞ d-dim vertex set, d ≥3 n2 logd n [19] n2 logd+1 n [19] n1.5 log1.5(d+1) n arbitrary DAG nm + n2 log n [15] nm log n2 m [18] m1.5 log3 n For sake of brevity, we have ignored the O(·) notation implicit in the bounds, and o(log n) terms. The results are reported assuming an error parameter δ = n−Ω(1), and that wv are bounded by poly(n). ℓ∞-norms. For weighted ℓ∞-norms on arbitrary DAGs, the previous best result was O(m log n + n log2 n) due to Kaufman and Tamir [24]. A manuscript by Stout [20] improves it to O(m log n). These algorithms are based on parametric search, and are impractical. Our algorithm is simple, achieves the best possible running time, and only requires random sampling and topological sort. In a parallel independent work, Stout [25] gives O(n)-time algorithms for linear order, trees, and d-grids, and an O(n logd−1 n) algorithm for point sets in d-dimensions. Theorem 1.2 implies the linear-time algorithms immediately. The result for d-dimensional point sets follows after embedding the point sets into DAGs of size O(n logd−1 n), as for ℓp-norms. Strict Isotonic Regression. Strict Isotonic regression was introduced and studied in [21]. It also gave the only previous algorithm for computing it, that runs in time O(min(mn, nω) + n2 log n). Theorem 1.3 is an improvement when m = o(n log n). 1.3 Overview of the Techniques and Contribution ℓp-norms, p < ∞. It is immediate that Isotonic Regression, as formulated in Equation (2), is a convex programming problem. For weighted ℓp-norms with p < ∞, applying generic convexprogramming algorithms such as Interior Point methods to this formulation leads to algorithms that are quite slow. We obtain faster algorithms for Isotonic Regression by replacing the computationally intensive component of Interior Point methods, solving systems of linear equations, with approximate solves. This approach has been used to design fast algorithms for generalized flow problems [26, 27, 28]. We present a complete proof of an Interior Point method for a large class of convex programs that only requires approximate solves. Daitch and Spielman [26] had proved such a result for linear programs. We extend this to ℓp-objectives, and provide an improved analysis that only requires linear solvers with a constant factor relative error bound, whereas the method from Daitch and Spielman required polynomially small error bounds. The linear systems in [27, 28] are Symmetric Diagonally Dominant (SDD) matrices. The seminal work of Spielman and Teng [29] gives near-linear time approximate solvers for such systems, and later research has improved these solvers further [30, 31]. Daitch and Spielman [26] extended these solvers to M-matrices (generalizations of SDD). The systems we need to solve are neither SDD, nor M-matrices. We develop fast solvers for this new class of matrices using fast SDD solvers. We stress that standard techniques for approximate inverse computation, e.g. Conjugate Gradient, are not sufficient for approximately solving our systems in near-linear time. These methods have at least a square root dependence on the condition number, which inevitably becomes huge in IPMs. ℓ∞-norms and Strict Isotonic Regression. Algorithms for ℓ∞-norms and Strict Isotonic Regression are based on techniques presented in a recent paper of Kyng et al. [32]. We reduce ℓ∞-norm Isotonic Regression to the following problem, referred to as Lipschitz learning on directed graphs in [32] (see Section 4 for details) : We have a directed graph H, with edge lengths given by len. Given x ∈RV (H), for every (u, v) ∈E(H), define grad+ G[x](u, v) = max n x(u)−x(v) len(u,v) , 0 o . Now, given y that assigns real values to a subset of V (H), the goal is to determine x ∈RV (H) that agrees with y and minimizes max(u,v)∈E(H) grad+ G[x](u, v). 3 The above problem is solved in O(m + n log n) time for general directed graphs in [32]. We give a simple linear-time reduction to the above problem with the additional property that H is a DAG. For DAGs, their algorithm can be implemented to run in O(m + n) time. It is proved in [21] that computing the Strict Isotonic Regression is equivalent to computing the isotonic vector that minimizes the error under the lexicographic ordering (see Section 4). Under the same reduction as in the ℓ∞-case, we show that this is equivalent to minimizing grad+ under the lexicographic ordering. It is proved in [32] that the lex-minimizer can be computed with basically n calls to ℓ∞-minimization, immediately implying our result. 1.4 Further Applications The IPM framework that we introduce to design our algorithm for Isotonic Regression (IR), and the associated results, are very general, and can be applied as-is to other problems. As a concrete application, the algorithm of Kakade et al. [12] for provably learning Generalized Linear Models and Single Index Models learns 1-Lipschitz monotone functions on linear orders in O(n2) time (procedure LPAV). The structure of the associated convex program resembles IR. Our IPM results and solvers immediately imply an n1.5 time algorithm (up to log factors). Improved algorithms for IR (or for learning Lipschitz functions) on d-dimensional point sets could be applied towards learning d-dim multi-index models where the link-function is nondecreasing w.r.t. the natural ordering on d-variables, extending [10, 12]. They could also be applied towards constructing Class Probability Estimation (CPE) models from multiple classifiers, by finding a mapping from multiple classifier scores to a probabilistic estimate, extending [13, 14]. Organization. We report experimental results in Section 2. An outline of the algorithms and analysis for ℓp-norms, p < ∞, are presented in Section 3. In Section 4, we define the Lipschitz regression problem on DAGs, and give the reduction from ℓ∞-norm Isotonic Regression. We defer a detailed description of the algorithms, and most proofs to the accompanying supplementary material. 2 Experiments An important advantage of our algorithms is that they can be implemented quite efficiently. Our algorithms are based on what is known as a short-step method (see Chapter 11, [33]), that leads to an O(√m) bound on the number of iterations. Each iteration corresponds to one linear solve in the Hessian matrix. A variant, known as the long-step method (see [33]) typically require much fewer iterations, about log m, even though the only provable bound known is O(m). 0 2 4 6 8 10 x 10 4 0 10 20 30 40 50 60 70 80 Number of Vertices Time in Secs Running Time in Practice Grid−1 Grid−10 RandReg−1 RandReg−10 For the important special case of ℓ2-Isotonic Regression, we have implemented our algorithm in Matlab, with long step barrier method, combined with our approximate solver for the linear systems involved. A number of heuristics recommended in [33] that greatly improve the running time in practice have also been incorporated. Despite the changes, our implementation is theoretically correct and also outputs an upper bound on the error by giving a feasible point to the dual program. Our implementation is available at https://github.com/ sachdevasushant/Isotonic. In the figure, we plot average running times (with error bars denoting standard deviation) for ℓ2-Isotonic Regression on DAGs, where the underlying graphs are 2-d grid graphs and random regular graphs (of constant degree). The edges for 2-d grid graphs are all oriented towards one of the corners. For random regular graphs, the edges are oriented according to a random permutation. The vector of initial observations y is chosen to be a random permutation of 1 to n obeying the partial order, perturbed by adding i.i.d. Gaussian noise to each coordinate. For each graph size, and two different noise levels (standard deviation for the noise on each coordinate being 1 or 10), the experiment is repeated multiple time. The relative error in the objective was ascertained to be less than 1%. 4 3 Algorithms for ℓp-norms, p < ∞ Without loss of generality, we assume y ∈[0, 1]n. Given p ∈[1, ∞), let p-ISO denote the following ℓp-norm Isotonic Regression problem, and OPTp-ISO denote its optimum: min x∈IG ∥x −y∥p w,p . (3) Let w p denote the entry-wise pth power of w. We assume the minimum entry of w p is 1, and the maximum entry is w p max ≤exp(n). We also assume the additive error parameter δ is lower bounded by exp(−n), and that p ≤exp(n). We use the eO notation to hide poly log log n factors. Theorem 3.1. Given a DAG G(V, E), a set of observations y ∈[0, 1]V , weights w, and an error parameter δ > 0, the algorithm ISOTONICIPM runs in time eO m1.5 log2 n log (npw p max/δ) , and with probability at least 1 −1/n, outputs a vector xALG ∈IG with ∥xALG −y∥p w,p ≤OPTp-ISO + δ. The algorithm ISOTONICIPM is obtained by an appropriate instantiation of a general Interior Point Method (IPM) framework which we call APPROXIPM. To state the general IPM result, we need to introduce two important concepts. These concepts are defined formally in Supplementary Material Section A.1. The first concept is self-concordant barrier functions; we denote the class of these functions by SCB. A self-concordant barrier function f is a special convex function defined on some convex domain set S. The function approaches infinity at the boundary of S. We associate with each f a complexity parameter θ(f) which measures how well-behaved f is. The second important concept is the symmetry of a point z w.r.t. S: A nonnegative scalar quantity sym(z, S). A large symmetry value guarantees that a point is not too close to the boundary of the set. For our algorithms to work, we need a starting point whose symmetry is not too small. We later show that such a starting point can be constructed for the p-ISO problem. APPROXIPM is a primal path following IPM: Given a vector c, a domain D and a barrier function f ∈SCB for D, we seek to compute minx∈D ⟨c, x⟩. To find a minimizer, we consider a function fc,γ(x) = f(x) + γ ⟨c, x⟩, and attempt to minimize fc,γ for changing values of γ by alternately updating x and γ. As x approaches the boundary of D the f(x) term grows to infinity and with some care, we can use this to ensure we never move to a point x outside the feasible domain D. As we increase γ, the objective term ⟨c, x⟩contributes more to fc,γ. Eventually, for large enough γ, the objective value ⟨c, x⟩of the current point x will be close to the optimum of the program. To stay near the optimum x for each new value of γ, we use a second-order method (Newton steps) to update x when γ is changed. This means that we minimize a local quadratic approximation to our objective. This requires solving a linear system Hz = g, where g and H are the gradient and Hessian of f at x respectively. Solving this system to find z is the most computationally intensive aspect of the algorithm. Crucially we ensure that crude approximate solutions to the linear system suffices, allowing the algorithm to use fast approximate solvers for this step. APPROXIPM is described in detail in Supplementary Material Section A.5, and in this section we prove the following theorem. Theorem 3.2. Given a convex bounded domain D ⊆IRn and vector c ∈IRn, consider the program min x∈D ⟨c, x⟩. (4) Let OPT denote the optimum of the program. Let f ∈SCB be a self-concordant barrier function for D. Given a initial point x0 ∈D, a value upper bound K ≥sup{⟨c, x⟩: x ∈D}, a symmetry lower bound s ≤sym(x0, D), and an error parameter 0 < ϵ < 1, the algorithm APPROXIPM runs for Tapx = O p θ(f) log (θ(f)/ϵ·s) iterations and returns a point xapx, which satisfies ⟨c,xapx⟩−OPT K−OPT ≤ϵ. The algorithm requires O(Tapx) multiplications of vectors by a matrix M(x) satisfying 9/10 · H(x)−1 ⪯M(x) ⪯11/10 · H(x)−1, where H(x) is the Hessian of f at various points x ∈D specified by the algorithm. 5 We now reformulate the p-ISO program to state a version which can be solved using the APPROXIPM framework. Consider points (x, t) ∈IRn × IRn, and define a set DG = {(x, t) : for all v ∈V . |x(v) −y(v)|p −t(v) ≤0} . To ensure boundedness, as required by APPROXIPM, we add the constraint ⟨w p, t⟩≤K. Definition 3.3. We define the domain DK = (IG × IRn) ∩DG ∩{(x, t) : ⟨w p, t⟩≤K} . The domain DK is convex, and allows us to reformulate program (3) with a linear objective: min x,t ⟨w p, t⟩ such that (x, t) ∈DK. (5) Our next lemma determines a choice of K which suffices to ensure that programs (3) and (5) have the same optimum. The lemma is proven in Supplementary Material Section A.4. Lemma 3.4. For all K ≥3nw p max, DK is non-empty and bounded, and the optimum of program (5) is OPTp-ISO. The following result shows that for program (5) we can compute a good starting point for the path following IPM efficiently. The algorithm GOODSTART computes a starting point in linear time by running a topological sort on the vertices of the DAG G and assigning values to x according to the vertex order of the sort. Combined with an appropriate choice of t, this suffices to give a starting point with good symmetry. The algorithm GOODSTART is specified in more detail in Supplementary Material Section A.4, together with a proof of the following lemma. Lemma 3.5. The algorithm GOODSTART runs in time O(m) and returns an initial point (x0, t0) that is feasible, and for K = 3nw p max, satisfies sym((x0, t0), DK) ≥ 1 18n2pw p max . Combining standard results on self-concordant barrier functions with a barrier for p-norms developed by Hertog et al. [34], we can show the following properties of a function FK whose exact definition is given in Supplementary Material Section A.2. Corollary 3.6. The function FK is a self-concordant barrier for DK and it has complexity parameter θ(FK) = O(m). Its gradient gFK is computable in O(m) time, and an implicit representation of the Hessian HFK can be computed in O(m) time as well. The key reason we can use APPROXIPM to give a fast algorithm for Isotonic Regression is that we develop an efficient solver for linear equations in the Hessian of FK. The algorithm HESSIANSOLVE solves linear systems in Hessian matrices of the barrier function FK. The Hessian is composed of a structured main component plus a rank one matrix. We develop a solver for the main component by doing a change of variables to simplify its structure, and then factoring the matrix by a blockwise LDL⊤-decomposition. We can solve straightforwardly in the L and L⊤, and we show that the D factor consists of blocks that are either diagonal or SDD, so we can solve in this factor approximately using a nearly-linear time SDD solver. The algorithm HESSIANSOLVE is given in full in Supplementary Material Section A.3, along with a proof of the following result. Theorem 3.7. For any instance of program (5) given by some (G, y), at any point z ∈DK, for any vector a, HESSIANSOLVE((G, y), z, µ, a) returns a vector b = Ma for a symmetric linear operator M satisfying 9/10 · HFK(z)−1 ⪯M ⪯11/10 · HFK(z)−1. The algorithm fails with probability < µ. HESSIANSOLVE runs in time eO(m log n log(1/µ)). These are the ingredients we need to prove our main result on solving p-ISO. The algorithm ISOTONICIPM is simply APPROXIPM instantiated to solve program (5), with an appropriate choice of parameters. We state ISOTONICIPM informally as Algorithm 1 below. ISOTONICIPM is given in full as Algorithm 6 in Supplementary Material Section A.5. Proof of Theorem 3.1: ISOTONICIPM uses the symmetry lower bound s = 1 18n2pw p max , the value upper bound K = 3nw p max, and the error parameter ϵ = δ K when calling APPROXIPM. By Corollary 3.6, the barrier function FK used by ISOTONICIPM has complexity parameter θ(FK) ≤O(m). By Lemma 3.5 the starting point (x0, t0) computed by GOODSTART and used by ISOTONICIPM is feasible and has symmetry sym(x0, DK) ≥ 1 18n2pw p max . By Theorem 3.2 the point (xapx, tapx) output by ISOTONICIPM satisfies ⟨w p,tapx⟩−OPT K−OPT ≤ϵ, where OPT is the optimum of program (5), and K = 3nw p max is the value used by ISOTONICIPM for the 6 constraint ⟨w p, t⟩≤K, which is an upper bound on the supremum of objective values of feasible points of program (5). By Lemma 3.4, OPT = OPTp-ISO. Hence, ∥y −xapx∥p p ≤⟨w p, tapx⟩≤ OPT + ϵK = OPTp-ISO + δ. Again, by Theorem 3.2, the number of calls to HESSIANSOLVE by ISOTONICIPM is bounded by O(T) ≤O p θ(FK) log (θ(FK)/ϵ·s) ≤O √m log (npw p max/δ) . Each call to HESSIANSOLVE fails with probability < n−3. Thus, by a union bound, the probability that some call to HESSIANSOLVE fails is upper bounded by O(√m log(npw p max/δ))/n3 = O(1/n). The algorithm uses O (√m log (npw p max/δ)) calls to HESSIANSOLVE that each take time eO(m log2 n), as µ = n3. Thus the total running time is eO m1.5 log2 n log (npw p max/δ) . □ Algorithm 1: Sketch of Algorithm ISOTONICIPM 1. Pick a starting point (x, t) using the GOODSTART algorithm 2. for r = 1, 2 3. if r = 1 then γ ←−1; ρ ←1; c = −gradient of f at (x, t) 4. else γ ←1; ρ ←1/poly(n); c = (0, w p) 5. for i ←1, . . . , C1m0.5 log m : 6. ρ ←ρ · (1 + γC2m−0.5) 7. Let H, g be the Hessian and gradient of fc,ρ at x 8. Call HESSIANSOLVE to compute z ≈H−1g 9. Update x ←x −z 10. Return x. 4 Algorithms for ℓ∞and Strict Isotonic Regression We now reduce ℓ∞Isotonic Regression and Strict Isotonic Regression to the Lipschitz Learning problem, as defined in [32]. Let G = (V, E, len) be any DAG with non-negative edge lengths len : E →R≥0, and y : V →R ∪{∗} a partial labeling. We think of a partial labeling as a function that assigns real values to a subset of the vertex set V . We call such a pair (G, y) a partially-labeled DAG. For a complete labeling x : V →R, define the gradient on an edge (u, v) ∈E due to x to be grad+ G[x](u, v) = max n x(u)−x(v) len(u,v) , 0 o . If len(u, v) = 0, then grad+ G[x](u, v) = 0 unless x(u) > x(v), in which case it is defined as +∞. Given a partially-labelled DAG (G, y), we say that a complete assignment x is an inf-minimizer if it extends y, and for all other complete assignments x′ that extends y we have max (u,v)∈E grad+ G[x](u, v) ≤ max (u,v)∈E grad+ G[x′](u, v). Note that when len = 0, then max(u,v)∈E grad+ G[x](u, v) < ∞if and only if x is isotonic on G. Suppose we are interested in Isotonic Regression on a DAG G(V, E) under ∥·∥w,∞. To reduce this problem to that of finding an inf-minimizer, we add some auxiliary nodes and edges to G. Let VL, VR be two copies of V . That is, for every vertex u ∈V , add a vertex uL to VL and a vertex uR to VR. Let EL = {(uL, u)}u∈V and ER = {(u, uR)}u∈V . We then let len′(uL, u) = 1/w(u) and len′(u, uR) = 1/w(u). All other edge lengths are set to 0. Finally, let G′ = (V ∪VL ∪VR, E ∪EL ∪ER, len′). The partial assignment y′ takes real values only on the the vertices in VL ∪VR. For all u ∈V , y′(uL) := y(u), y′(uR) := y(u) and y′(u) := ∗. (G′, y′) is our partially-labeled DAG. Observe that G′ has n′ = 3n vertices and m′ = m + 2n edges. Lemma 4.1. Given a DAG G(V, E), a set of observations y ∈RV , and weights w, construct G′ and y′ as above. Let x be an inf-minimizer for the partially-labeled DAG (G′, y′). Then, x |V is the Isotonic Regression of y with respect to G under the norm ∥·∥w,∞. Proof. We note that since the vertices corresponding to V in (G′, y′) are connected to each other by zero length edges, max(u,v)∈E grad+ G[x](u, v) < ∞iff x is isotonic on those edges. Since G is a DAG, we know that there are isotonic labelings on G. When x is isotonic on vertices corresponding to V , gradient is zero on all the edges going in between vertices in V . Also, note that every vertex 7 x corresponding to V in G′ is attached to two auxiliary nodes xL ∈VL, xR ∈VR. We also have y′(xL) = y′(xR) = y(x). Thus, for any x that extends y and is Isotonic on G′, the only non-zero entries in grad+ correspond to edges in ER and EL, and thus max (u,v)∈E′ grad+ G′[x](u, v) = max u∈V wu · |y(u) −x(u)| = ∥x −y∥w,∞. Algorithm COMPINFMIN from [32] is proved to compute the inf-minimizer, and is claimed to work for directed graphs (Section 5, [32]). We exploit the fact that Dijkstra’s algorithm in COMPINFMIN can be implemented in O(m) time on DAGs using a topological sorting of the vertices, giving a linear time algorithm for computing the inf-minimizer. Combining it with the reduction given by the lemma above, and observing that the size of G′ is O(m+n), we obtain Theorem 1.2. A complete description of the modified COMPINFMIN is given in Section B.2. We remark that the solution to the ℓ∞-Isotonic Regression that we obtain has been referred to as AVG ℓ∞Isotonic Regression in the literature [20]. It is easy to modify the algorithm to compute the MAX, MIN ℓ∞Isotonic Regressions. Details are given in Section B. For Strict Isotonic Regression, we define the lexicographic ordering. Given r ∈Rm, let πr denote a permutation that sorts r in non-increasing order by absolute value, i.e., ∀i ∈[m −1], |r(πr(i))| ≥ |r(πr(i + 1))|. Given two vectors r, s ∈Rm, we write r ⪯lex s to indicate that r is smaller than s in the lexicographic ordering on sorted absolute values, i.e. ∃j ∈[m], |r(πr(j))| < |s(πs(j))| and ∀i ∈[j −1], |r(πr(i))| = |s(πs(i))| or ∀i ∈[m], |r(πr(i))| = |s(πs(i))| . Note that it is possible that r ⪯lex s and s ⪯lex r while r ̸= s. It is a total relation: for every r and s at least one of r ⪯lex s or s ⪯lex r is true. Given a partially-labelled DAG (G, y), we say that a complete assignment x is a lex-minimizer if it extends y and for all other complete assignments x′ that extend y we have grad+ G[x] ⪯lex grad+ G[x′]. Stout [21] proves that computing the Strict Isotonic Regression is equivalent to finding an Isotonic x that minimizes zu = wu · (xu −yu) in the lexicographic ordering. With the same reduction as above, it is immediate that this is equivalent to minimizing grad+ G′ in the lex-ordering. Lemma 4.2. Given a DAG G(V, E), a set of observations y ∈RV , and weights w, construct G′ and y′ as above. Let x be the lex-minimizer for the partially-labeled DAG (G′, y′). Then, x |V is the Strict Isotonic Regression of y with respect to G with weights w. As for inf-minimization, we give a modification of the algorithm COMPLEXMIN from [32] that computes the lex-minimizer in O(mn) time. The algorithm is described in Section B.2. Combining this algorithm with the reduction from Lemma 4.2, we can compute the Strict Isotonic Regression in O(m′n′) = O(mn) time, thus proving Theorem 1.3. Acknowledgements. We thank Sabyasachi Chatterjee for introducing the problem to us, and Daniel Spielman for his advice and comments. We would also like to thank Quentin Stout and anonymous reviewers for their suggestions. This research was partially supported by AFOSR Award FA955012-1-0175, NSF grant CCF-1111257, and a Simons Investigator Award to Daniel Spielman. References [1] M. Ayer, H. D. Brunk, G. M. Ewing, W. T. Reid, and E. Silverman. An empirical distribution function for sampling with incomplete information. The Annals of Mathematical Statistics, 26(4):pp. 641–647, 1955. [2] D. J. Barlow, R. E .and Bartholomew, J.M. Bremner, and H. D. Brunk. Statistical inference under order restrictions: the theory and application of Isotonic Regression. Wiley New York, 1972. [3] F. Gebhardt. An algorithm for monotone Regression with one or more independent variables. Biometrika, 57(2):263–271, 1970. [4] W. L. Maxwell and J. A. Muckstadt. Establishing consistent and realistic reorder intervals in productiondistribution systems. Operations Research, 33(6):1316–1341, 1985. [5] R. Roundy. A 98%-effective lot-sizing rule for a multi-product, multi-stage production / inventory system. Mathematics of Operations Research, 11(4):pp. 699–727, 1986. [6] S.T. Acton and A.C. Bovik. Nonlinear image estimation using piecewise and local image models. Image Processing, IEEE Transactions on, 7(7):979–991, Jul 1998. 8 [7] C.I.C. Lee. The Min-Max algorithm and Isotonic Regression. The Annals of Statistics, 11(2):pp. 467–477, 1983. [8] R. L. Dykstra and T. Robertson. An algorithm for Isotonic Regression for two or more independent variables. The Annals of Statistics, 10(3):pp. 708–716, 1982. [9] S. Chatterjee, A. Guntuboyina, and B. Sen. On Risk Bounds in Isotonic and Other Shape Restricted Regression Problems. The Annals of Statistics, to appear. [10] A. T. Kalai and R. Sastry. The isotron algorithm: High-dimensional Isotonic Regression. In COLT, 2009. [11] T. Moon, A. Smola, Y. Chang, and Z. Zheng. Intervalrank: Isotonic Regression with listwise and pairwise constraints. In WSDM, pages 151–160. ACM, 2010. [12] S. M Kakade, V. Kanade, O. Shamir, and A. Kalai. Efficient learning of generalized linear and single index models with Isotonic Regression. In NIPS. 2011. [13] B. Zadrozny and C. Elkan. Transforming classifier scores into accurate multiclass probability estimates. KDD, pages 694–699, 2002. [14] H. Narasimhan and S. Agarwal. On the relationship between binary classification, bipartite ranking, and binary class probability estimation. In NIPS. 2013. [15] S. Angelov, B. Harb, S. Kannan, and L. Wang. Weighted Isotonic Regression under the l1 norm. In SODA, 2006. [16] K. Punera and J. Ghosh. Enhanced hierarchical classification via Isotonic smoothing. In WWW, 2008. [17] Z. Zheng, H. Zha, and G. Sun. Query-level learning to rank using Isotonic Regression. In Communication, Control, and Computing, Allerton Conference on, 2008. [18] D.S. Hochbaum and M. Queyranne. Minimizing a convex cost closure set. SIAM Journal on Discrete Mathematics, 16(2):192–207, 2003. [19] Q. F. Stout. Isotonic Regression via partitioning. Algorithmica, 66(1):93–112, 2013. [20] Q. F. Stout. Weighted l∞Isotonic Regression. Manuscript, 2011. [21] Q. F. Stout. Strict l∞Isotonic Regression. Journal of Optimization Theory and Applications, 152(1):121– 135, 2012. [22] Q. F Stout. Fastest Isotonic Regression algorithms. http://web.eecs.umich.edu/˜qstout/ IsoRegAlg_140812.pdf. [23] Q. F. Stout. Isotonic Regression for multiple independent variables. Algorithmica, 71(2):450–470, 2015. [24] Y. Kaufman and A. Tamir. Locating service centers with precedence constraints. Discrete Applied Mathematics, 47(3):251 – 261, 1993. [25] Q. F. Stout. L infinity Isotonic Regression for linear, multidimensional, and tree orders. CoRR, 2015. [26] S. I. Daitch and D. A. Spielman. Faster approximate lossy generalized flow via interior point algorithms. STOC ’08, pages 451–460. ACM, 2008. [27] A. Madry. Navigating central path with electrical flows. In FOCS, 2013. [28] Y. T. Lee and A. Sidford. Path finding methods for linear programming: Solving linear programs in ˜O( √ rank) iterations and faster algorithms for maximum flow. In FOCS, 2014. [29] D. A. Spielman and S. Teng. Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. STOC ’04, pages 81–90. ACM, 2004. [30] I. Koutis, G. L. Miller, and R. Peng. A nearly-m log n time solver for SDD linear systems. FOCS ’11, pages 590–598, Washington, DC, USA, 2011. IEEE Computer Society. [31] M. B. Cohen, R. Kyng, G. L. Miller, J. W. Pachocki, R. Peng, A. B. Rao, and S. C. Xu. Solving SDD linear systems in nearly m log1/2 n time. STOC ’14, 2014. [32] R. Kyng, A. Rao, S. Sachdeva, and D. A. Spielman. Algorithms for Lipschitz learning on graphs. In Proceedings of COLT 2015, pages 1190–1223, 2015. [33] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [34] D. den Hertog, F. Jarre, C. Roos, and T. Terlaky. A sufficient condition for self-concordance. Math. Program., 69(1):75–88, July 1995. [35] J. Renegar. A mathematical view of interior-point methods in convex optimization. SIAM, 2001. [36] A. Nemirovski. Lecure notes: Interior point polynomial time methods in convex programming, 2004. [37] E. J. McShane. Extension of range of functions. Bull. Amer. Math. Soc., 40(12):837–842, 12 1934. [38] H. Whitney. Analytic extensions of differentiable functions defined in closed sets. Transactions of the American Mathematical Society, 36(1):pp. 63–89, 1934. 9 | 2015 | 295 |
5,808 | On the Global Linear Convergence of Frank-Wolfe Optimization Variants Simon Lacoste-Julien INRIA - SIERRA project-team ´Ecole Normale Sup´erieure, Paris, France Martin Jaggi Dept. of Computer Science ETH Z¨urich, Switzerland Abstract The Frank-Wolfe (FW) optimization algorithm has lately re-gained popularity thanks in particular to its ability to nicely handle the structured constraints appearing in machine learning applications. However, its convergence rate is known to be slow (sublinear) when the solution lies at the boundary. A simple lessknown fix is to add the possibility to take ‘away steps’ during optimization, an operation that importantly does not require a feasibility oracle. In this paper, we highlight and clarify several variants of the Frank-Wolfe optimization algorithm that have been successfully applied in practice: away-steps FW, pairwise FW, fully-corrective FW and Wolfe’s minimum norm point algorithm, and prove for the first time that they all enjoy global linear convergence, under a weaker condition than strong convexity of the objective. The constant in the convergence rate has an elegant interpretation as the product of the (classical) condition number of the function with a novel geometric quantity that plays the role of a ‘condition number’ of the constraint set. We provide pointers to where these algorithms have made a difference in practice, in particular with the flow polytope, the marginal polytope and the base polytope for submodular optimization. The Frank-Wolfe algorithm [9] (also known as conditional gradient) is one of the earliest existing methods for constrained convex optimization, and has seen an impressive revival recently due to its nice properties compared to projected or proximal gradient methods, in particular for sparse optimization and machine learning applications. On the other hand, the classical projected gradient and proximal methods have been known to exhibit a very nice adaptive acceleration property, namely that the the convergence rate becomes linear for strongly convex objective, i.e. that the optimization error of the same algorithm after t iterations will decrease geometrically with O((1 −ρ)t) instead of the usual O(1/t) for general convex objective functions. It has become an active research topic recently whether such an acceleration is also possible for Frank-Wolfe type methods. Contributions. We clarify several variants of the Frank-Wolfe algorithm and show that they all converge linearly for any strongly convex function optimized over a polytope domain, with a constant bounded away from zero that only depends on the geometry of the polytope. Our analysis does not depend on the location of the true optimum with respect to the domain, which was a disadvantage of earlier existing results such as [34, 12, 5], and the newer work of [28], as well as the line of work of [1, 19, 26] which rely on Robinson’s condition [30]. Our analysis yields a weaker sufficient condition than Robinson’s condition; in particular we can have linear convergence even in some cases when the function has more than one global minima, and is not globally strongly convex. The constant also naturally separates as the product of the condition number of the function with a novel notion of condition number of a polytope, which might have applications in complexity theory. Related Work. For the classical Frank-Wolfe algorithm, [5] showed a linear rate for the special case of quadratic objectives when the optimum is in the strict interior of the domain, a result already subsumed by the more general [12]. The early work of [23] showed linear convergence for strongly 1 convex constraint sets, under the strong requirement that the gradient norm is not too small (see [11] for a discussion). The away-steps variant of the Frank-Wolfe algorithm, that can also remove weight from ‘bad’ atoms in the current active set, was proposed in [34], and later also analyzed in [12]. The precise method is stated below in Algorithm 1. [12] showed a (local) linear convergence rate on polytopes, but the constant unfortunately depends on the distance between the solution and its relative boundary, a quantity that can be arbitrarily small. More recently, [1, 19, 26] have obtained linear convergence results in the case that the optimum solution satisfies Robinson’s condition [30]. In a different recent line of work, [10, 22] have studied a variation of FW that repeatedly moves mass from the worst vertices to the standard FW vertex until a specific condition is satisfied, yielding a linear rate on strongly convex functions. Their algorithm requires the knowledge of several constants though, and moreover is not adaptive to the best-case scenario, unlike the Frank-Wolfe algorithm with away steps and line-search. None of these previous works was shown to be affine invariant, and most require additional knowledge about problem specific parameters. Setup. We consider general constrained convex optimization problems of the form: min x∈M f(x) , M = conv(A), with only access to: LMOA(r) ∈arg min x∈A ⟨r, x⟩, (1) where A ⊆Rd is a finite set of vectors that we call atoms.1 We assume that the function f is µstrongly convex with L-Lipschitz continuous gradient over M. We also consider weaker conditions than strong convexity for f in Section 4. As A is finite, M is a (convex and bounded) polytope. The methods that we consider in this paper only require access to a linear minimization oracle LMOA(.) associated with the domain M through a generating set of atoms A. This oracle is defined as to return a minimizer of a linear subproblem over M = conv(A), for any given direction r ∈Rd.2 Examples. Optimization problems of the form (1) appear widely in machine learning and signal processing applications. The set of atoms A can represent combinatorial objects of arbitrary type. Efficient linear minimization oracles often exist in the form of dynamic programs or other combinatorial optimization approaches. As an example from tracking in computer vision, A could be the set of integer flows on a graph [16, 7], where LMOA can be efficiently implemented by a minimum cost network flow algorithm. In this case, M can also be described with a polynomial number of linear inequalities. But in other examples, M might not have a polynomial description in terms of linear inequalities, and testing membership in M might be much more expensive than running the linear oracle. This is the case when optimizing over the base polytope, an object appearing in submodular function optimization [3]. There, the LMOA oracle is a simple greedy algorithm. Another example is when A represents the possible consistent value assignments on cliques of a Markov random field (MRF); M is the marginal polytope [32], where testing membership is NP-hard in general, though efficient linear oracles exist for some special cases [17]. Optimization over the marginal polytope appears for example in structured SVM learning [21] and variational inference [18]. The Original Frank-Wolfe Algorithm. The Frank-Wolfe (FW) optimization algorithm [9], also known as conditional gradient [23], is particularly suited for the setup (1) where M is only accessed through the linear minimization oracle. It works as follows: At a current iterate x(t), the algorithm finds a feasible search atom st to move towards by minimizing the linearization of the objective function f over M (line 3 in Algorithm 1) – this is where the linear minimization oracle LMOA is used. The next iterate x(t+1) is then obtained by doing a line-search on f between x(t) and st (line 11 in Algorithm 1). One reason for the recent increased popularity of Frank-Wolfe-type algorithms is the sparsity of their iterates: in iteration t of the algorithm, the iterate can be represented as a sparse convex combination of at most t + 1 atoms S(t) ⊆A of the domain M, which we write as x(t) = P v∈S(t) α(t) v v. We write S(t) for the active set, containing the previously discovered search atoms sr for r < t that have non-zero weight α(t) sr > 0 in the expansion (potentially also including the starting point x(0)). While tracking the active set S(t) is not necessary for the original FW algorithm, the improved variants of FW that we discuss will require that S(t) is maintained. Zig-Zagging Phenomenon. When the optimal solution lies at the boundary of M, the convergence rate of the iterates is slow, i.e. sublinear: f(x(t))−f(x∗) ≤O 1/t , for x∗being an optimal solution [9, 6, 8, 15]. This is because the iterates of the classical FW algorithm start to zig-zag 1The atoms do not have to be extreme points (vertices) of M. 2All our convergence results can be carefully extended to approximate linear minimization oracles with multiplicative approximation guarantees; we state them for exact oracles in this paper for simplicity. 2 x⇤ x(t) x(0) x(t+1) st x⇤ x(t) x(0) vt st x(t+1) x⇤ x(t) x(0) vt st // x(t+1) // Figure 1: (left) The FW algorithm zig-zags when the solution x∗lies on the boundary. (middle) Adding the possibility of an away step attenuates this problem. (right) As an alternative, a pairwise FW step. between the vertices defining the face containing the solution x∗(see left of Figure 1). In fact, the 1/t rate is tight for a large class of functions: Canon and Cullum [6], Wolfe [34] showed (roughly) that f(x(t))−f(x∗) ≥Ω 1/t1+δ for any δ > 0 when x∗lies on a face of M with some additional regularity assumptions. Note that this lower bound is different than the Ω 1/t one presented in [15, Lemma 3] which holds for all one-atom-per-step algorithms but assumes high dimensionality d ≥t. 1 Improved Variants of the Frank-Wolfe Algorithm Algorithm 1 Away-steps Frank-Wolfe algorithm: AFW(x(0), A, ϵ) 1: Let x(0) ∈A, and S(0) := {x(0)} (so that α(0) v = 1 for v = x(0) and 0 otherwise) 2: for t = 0 . . . T do 3: Let st := LMOA ∇f(x(t)) and dFW t := st −x(t) (the FW direction) 4: Let vt ∈arg max v∈S(t) ∇f(x(t)), v and dA t := x(t) −vt (the away direction) 5: if gFW t := −∇f(x(t)), dFW t ≤ϵ then return x(t) (FW gap is small enough, so return) 6: if −∇f(x(t)), dFW t ≥ −∇f(x(t)), dA t then 7: dt := dFW t , and γmax := 1 (choose the FW direction) 8: else 9: dt := dA t , and γmax := αvt/(1 −αvt) (choose away direction; maximum feasible step-size) 10: end if 11: Line-search: γt ∈arg min γ∈[0,γmax] f x(t) + γdt 12: Update x(t+1) := x(t) + γtdt (and accordingly for the weights α(t+1), see text) 13: Update S(t+1) := {v ∈A s.t. α(t+1) v > 0} 14: end for Algorithm 2 Pairwise Frank-Wolfe algorithm: PFW(x(0), A, ϵ) 1: . . . as in Algorithm 1, except replacing lines 6 to 10 by: dt = dPFW t := st−vt, and γmax := αvt. Away-Steps Frank-Wolfe. To address the zig-zagging problem of FW, Wolfe [34] proposed to add the possibility to move away from an active atom in S(t) (see middle of Figure 1); this simple modification is sufficient to make the algorithm linearly convergent for strongly convex functions. We describe the away-steps variant of Frank-Wolfe in Algorithm 1.3 The away direction dA t is defined in line 4 by finding the atom vt in S(t) that maximizes the potential of descent given by gA t := −∇f(x(t)), x(t) −vt . Note that this search is over the (typically small) active set S(t), and is fundamentally easier than the linear oracle LMOA. The maximum step-size γmax as defined on line 9 ensures that the new iterate x(t) + γdA t stays in M. In fact, this guarantees that the convex representation is maintained, and we stay inside conv(S(t)) ⊆M. When M is a simplex, then the barycentric coordinates are unique and x(t) +γmaxdA t truly lies on the boundary of M. On the other hand, if |A| > dim(M) + 1 (e.g. for the cube), then it could hypothetically be possible to have a step-size bigger than γmax which is still feasible. Computing the true maximum feasible step-size would require the ability to know when we cross the boundary of M along a specific line, which is not possible for general M. Using the conservative maximum step-size of line 9 ensures that we 3The original algorithm presented in [34] was not convergent; this was corrected by Gu´elat and Marcotte [12], assuming a tractable representation of M with linear inequalities and called it the modified Frank-Wolfe (MFW) algorithm. Our description in Algorithm 1 extends it to the more general setup of (1). 3 do not need this more powerful oracle. This is why Algorithm 1 requires to maintain S(t) (unlike standard FW). Finally, as in classical FW, the FW gap gFW t is an upper bound on the unknown suboptimality, and can be used as a stopping criterion: gFW t := D −∇f(x(t)), dFW t E ≥ D −∇f(x(t)), x∗−x(t)E ≥f(x(t)) −f(x∗) (by convexity). If γt = γmax, then we call this step a drop step, as it fully removes the atom vt from the currently active set of atoms S(t) (by settings its weight to zero). The weight updates for lines 12 and 13 are of the following form: For a FW step, we have S(t+1) = {st} if γt = 1; otherwise S(t+1) = S(t)∪{st}. Also, we have α(t+1) st := (1−γt)α(t) st +γt and α(t+1) v := (1−γt)α(t) v for v ∈S(t)\{st}. For an away step, we have S(t+1) = S(t) \{vt} if γt = γmax (a drop step); otherwise S(t+1) = S(t). Also, we have α(t+1) vt := (1 + γt)α(t) vt −γt and α(t+1) v := (1 + γt)α(t) v for v ∈S(t) \ {vt}. Pairwise Frank-Wolfe. The next variant that we present is inspired by an early algorithm by Mitchell et al. [25], called the MDM algorithm, originally invented for the polytope distance problem. Here the idea is to only move weight mass between two atoms in each step. More precisely, the generalized method as presented in Algorithm 2 moves weight from the away atom vt to the FW atom st, and keeps all other α weights un-changed. We call such a swap of mass between the two atoms a pairwise FW step, i.e. α(t+1) vt = α(t) vt −γ and α(t+1) st = α(t) st + γ for some step-size γ ≤γmax := α(t) vt . In contrast, classical FW shrinks all active weights at every iteration. The pairwise FW direction will also be central to our proof technique to provide the first global linear convergence rate for away-steps FW, as well as the fully-corrective variant and Wolfe’s minnorm-point algorithm. As we will see in Section 2.2, the rate guarantee for the pairwise FW variant is more loose than for the other variants, because we cannot provide a satisfactory bound on the number of the problematic swap steps (defined just before Theorem 1). Nevertheless, the algorithm seems to perform quite well in practice, often outperforming away-steps FW, especially in the important case of sparse solutions, that is if the optimal solution x∗lies on a low-dimensional face of M (and thus one wants to keep the active set S(t) small). The pairwise FW step is arguably more efficient at pruning the coordinates in S(t). In contrast to the away step which moves the mass back uniformly onto all other active elements S(t) (and might require more corrections later), the pairwise FW step only moves the mass onto the (good) FW atom st. A slightly different version than Algorithm 2 was also proposed by ˜Nanculef et al. [26], though their convergence proofs were incomplete (see Appendix A.3). The algorithm is related to classical working set algorithms, such as the SMO algorithm used to train SVMs [29]. We refer to [26] for an empirical comparison for SVMs, as well as their Section 5 for more related work. See also Appendix A.3 for a link between pairwise FW and [10]. Fully-Corrective Frank-Wolfe, and Wolfe’s Min-Norm Point Algorithm. When the linear oracle is expensive, it might be worthwhile to do more work to optimize over the active set S(t) in between each call to the linear oracle, rather than just performing an away or pairwise step. We give in Algorithm 3 the fully-corrective Frank-Wolfe (FCFW) variant, that maintains a correction polytope defined by a set of atoms A(t) (potentially larger than the active set S(t)). Rather than obtaining the next iterate by line-search, x(t+1) is obtained by re-optimizing f over conv(A(t)). Depending on how the correction is implemented, and how the correction atoms A(t) are maintained, several variants can be obtained. These variants are known under many names, such as the extended FW method by Holloway [14] or the simplicial decomposition method [31, 13]. Wolfe’s min-norm point (MNP) algorithm [35] for polytope distance problems is often confused with FCFW for quadratic objectives. The major difference is that standard FCFW optimizes f over conv(A(t)), whereas MNP implements the correction as a sequence of affine projections that potentially yield a different update, but can be computed more efficiently in several practical applications [35]. We describe precisely in Appendix A.1 a generalization of the MNP algorithm as a specific case of the correction subroutine from step 7 of the generic Algorithm 3. The original convergence analysis of the FCFW algorithm [14] (and also MNP algorithm [35]) only showed that they were finitely convergent, with a bound on the number of iterations in terms of the cardinality of A (unfortunately an exponential number in general). Holloway [14] also argued that FCFW had an asymptotic linear convergence based on the flawed argument of Wolfe [34]. As far as we know, our work is the first to provide global linear convergence rates for FCFW and MNP for 4 Algorithm 3 Fully-corrective Frank-Wolfe with approximate correction: FCFW(x(0), A, ϵ) 1: Input: Set of atoms A, active set S(0), starting point x(0) = X v∈S(0) α(0) v v, stopping criterion ϵ. 2: Let A(0) := S(0) (optionally, a bigger A(0) could be passed as argument for a warm start) 3: for t = 0 . . . T do 4: Let st := LMOA ∇f(x(t)) (the FW atom) 5: Let dFW t := st −x(t) and gFW t = −∇f(x(t)), dFW t (FW gap) 6: if gFW t ≤ϵ then return x(t) 7: (x(t+1), A(t+1)) := Correction(x(t), A(t), st, ϵ) (approximate correction step) 8: end for Algorithm 4 Approximate correction: Correction(x(t), A(t), st, ϵ) 1: Return (x(t+1), A(t+1)) with the following properties: 2: S(t+1) is the active set for x(t+1) and A(t+1) ⊇S(t+1). 3: f(x(t+1)) ≤min γ∈[0,1] f x(t) + γ(st −x(t)) (make at least as much progress as a FW step) 4: gA t+1 := max v∈S(t+1) −∇f(x(t+1)), x(t+1) −v ≤ϵ (the away gap is small enough) general strongly convex functions. Moreover, the proof of convergence for FCFW does not require an exact solution to the correction step; instead, we show that the weaker properties stated for the approximate correction procedure in Algorithm 4 are sufficient for a global linear convergence rate (this correction could be implemented using away-steps FW, as done for example in [18]). 2 Global Linear Convergence Analysis 2.1 Intuition for the Convergence Proofs We first give the general intuition for the linear convergence proof of the different FW variants, starting from the work of Gu´elat and Marcotte [12]. We assume that the objective function f is smooth over a compact set M, i.e. its gradient is Lipschitz continuous with constant L. Also let M := diam(M). Let dt be the direction in which the line-search is executed by the algorithm (Line 11 in Algorithm 1). By the standard descent lemma [see e.g. (1.2.5) in 27], we have: f(x(t+1)) ≤f(x(t) + γdt) ≤f(x(t)) + γ D ∇f(x(t)), dt E + γ2 2 L∥dt∥2 ∀γ ∈[0, γmax]. (2) We let rt := −∇f(x(t)) and let ht := f(x(t)) −f(x∗) be the suboptimality error. Supposing for now that γmax ≥γ∗ t := ⟨rt, dt⟩/(L∥dt∥2). We can set γ = γ∗ t to minimize the RHS of (2), subtract f(x∗) on both sides, and re-organize to get a lower bound on the progress: ht −ht+1 ≥⟨rt, dt⟩2 2L∥dt∥2 = 1 2L⟨rt, ˆdt⟩2 , (3) where we use the ‘hat’ notation to denote normalized vectors: ˆdt := dt/∥dt∥. Let et := x∗−x(t) be the error vector. By µ-strong convexity of f, we have: f(x(t) + γet) ≥f(x(t)) + γ D ∇f(x(t)), et E + γ2 2 µ∥et∥2 ∀γ ∈[0, 1]. (4) The RHS is lower bounded by its minimum as a function of γ (unconstrained), achieved using γ := ⟨rt, et⟩/(µ∥et∥2). We are then free to use any value of γ on the LHS and maintain a valid bound. In particular, we use γ = 1 to obtain f(x∗). Again re-arranging, we get: ht ≤⟨rt, ˆet⟩2 2µ , and combining with (3), we obtain: ht −ht+1 ≥µ L ⟨rt, ˆdt⟩2 ⟨rt, ˆet⟩2 ht. (5) The inequality (5) is fairly general and valid for any line-search method in direction dt. To get a linear convergence rate, we need to lower bound (by a positive constant) the term in front of ht on the RHS, which depends on the angle between the update direction dt and the negative gradient rt. If we assume that the solution x∗lies in the relative interior of M with a distance of at least δ > 0 from the boundary, then ⟨rt, dt⟩≥δ∥rt∥for the FW direction dFW t , and by combining with ∥dt∥≤M, we get a linear rate with constant 1 −µ L( δ M )2 (this was the result from [12]). On the other hand, if x∗lies on the boundary, then ⟨ˆrt, ˆdt⟩gets arbitrary close to zero for standard FW (the zig-zagging phenomenon) and the convergence is sublinear. 5 Proof Sketch for AFW. The key insight to prove the global linear convergence for AFW is to relate ⟨rt, dt⟩with the pairwise FW direction dPFW t := st −vt. By the way the direction dt is chosen on lines 6 to 10 of Algorithm 1, we have: 2⟨rt, dt⟩≥⟨rt, dFW t ⟩+ ⟨rt, dA t ⟩= ⟨rt, dFW t + dA t ⟩= ⟨rt, dPFW t ⟩. (6) We thus have ⟨rt, dt⟩≥⟨rt, dPFW t ⟩/2. Now the crucial property of the pairwise FW direction is that for any potential negative gradient direction rt, the worst case inner product ⟨ˆrt, dPFW t ⟩ dFW t dA t dpFW t x vt st rt can be lower bounded away from zero by a quantity depending only on the geometry of M (unless we are at the optimum). We call this quantity the pyramidal width of A. The figure on the right shows the six possible pairwise FW directions dPFW t for a triangle domain, depending on which colored area the rt direction falls into. We will see that the pyramidal width is related to the smallest width of pyramids that we can construct from A in a specific way related to the choice of the away and towards atoms vt and st. See (9) and our main Theorem 3 in Section 3. This gives the main argument for the linear convergence of AFW for steps where γ∗ t ≤γmax. When γmax is too small, AFW will perform a drop step, as the line-search will truncate the step-size to γt = γmax. We cannot guarantee sufficient progress in this case, but the drop step decreases the active set size by one, and thus they cannot happen too often (not more than half the time). These are the main elements for the global linear convergence proof for AFW. The rest is to carefully consider various boundary cases. We can re-use the same techniques to prove the convergence for pairwise FW, though unfortunately the latter also has the possibility of problematic swap steps. While their number can be bounded, so far we only found the extremely loose bound quoted in Theorem 1. Proof Sketch for FCFW. For FCFW, by line 4 of the correction Algorithm 4, the away gap satisfies gA t ≤ϵ at the beginning of a new iteration. Supposing that the algorithm does not exit at line 6 of Algorithm 3, we have gFW t > ϵ and therefore 2⟨rt, dFW t ⟩≥⟨rt, dPFW t ⟩using a similar argument as in (6). Finally, by line 3 of Algorithm 4, the correction is guaranteed to make at least as much progress as a line-search in direction dFW t , and so the progress bound (5) applies also to FCFW. 2.2 Convergence Results We now give the global linear convergence rates for the four variants of the FW algorithm: awaysteps FW (AFW Alg. 1); pairwise FW (PFW Alg. 2); fully-corrective FW (FCFW Alg. 3 with approximate correction Alg. 4); and Wolfe’s min-norm point algorithm (Alg. 3 with MNP-correction as Alg. 5 in Appendix A.1). For the AFW, MNP and PFW algorithms, we call a drop step when the active set shrinks |S(t+1)| < |S(t)|. For the PFW algorithm, we also have the possibility of a swap step where γt = γmax but |S(t+1)| = |S(t)| (i.e. the mass was fully swapped from the away atom to the FW atom). A nice property of FCFW is that it does not have any drop step (it executes both FW steps and away steps simultaneously while guaranteeing enough progress at every iteration). Theorem 1. Suppose that f has L-Lipschitz gradient4 and is µ-strongly convex over M = conv(A). Let M = diam(M) and δ = PWidth(A) as defined by (9). Then the suboptimality ht of the iterates of all the four variants of the FW algorithm decreases geometrically at each step that is not a drop step nor a swap step (i.e. when γt < γmax, called a ‘good step’), that is ht+1 ≤(1 −ρ) ht , where ρ := µ 4L δ M 2 . Let k(t) be the number of ‘good steps’ up to iteration t. We have k(t) = t for FCFW; k(t) ≥t/2 for MNP and AFW; and k(t) ≥t/(3|A|!+1) for PFW (because of the swap steps). This yields a global linear convergence rate of ht ≤h0 exp(−ρ k(t)) for all variants. If µ = 0 (general convex), then ht = O(1/k(t)) instead. See Theorem 8 in Appendix D for an affine invariant version and proof. Note that to our knowledge, none of the existing linear convergence results showed that the duality gap was also linearly convergent. The result for the gap follows directly from the simple manipulation of (2); putting the FW gap to the LHS and optimizing the RHS for γ ∈[0, 1]. Theorem 2. Suppose that f has L-Lipschitz gradient over M with M := diam(M). Then the FW gap gFW t for any algorithm is upper bounded by the primal error ht as follows: gFW t ≤ht + LM 2/2 when ht > LM 2/2, gFW t ≤M p 2htL otherwise . (7) 4For AFW and PFW, we actually require that ∇f is L-Lipschitz over the larger domain M + M −M. 6 3 Pyramidal Width We now describe the claimed lower bound on the angle between the negative gradient and the pairwise FW direction, which depends only on the geometric properties of M. According to our argument about the progress bound (5) and the PFW gap (6), our goal is to find a lower bound on ⟨rt, dPFW t ⟩/⟨rt, ˆet⟩. First note that ⟨rt, dPFW t ⟩=⟨rt, st−vt⟩= max s∈M,v∈S(t) ⟨rt, s−v⟩where S(t) is a possible active set for x(t). This looks like the directional width of a pyramid with base S(t) and summit st. To be conservative, we consider the worst case possible active set for x(t); this is what we will call the pyramid directional width PdirW(A, rt, x(t)). We start with the following definitions. Directional Width. The directional width of a set A with respect to a direction r is defined as dirW(A, r) := maxs,v∈A r ∥r∥, s −v . The width of A is the minimum directional width over all possible directions in its affine hull. Pyramidal Directional Width. We define the pyramidal directional width of a set A with respect to a direction r and a base point x ∈M to be PdirW(A, r, x) := min S∈Sx dirW(S ∪{s(A, r)}, r) = min S∈Sx max s∈A,v∈S r ∥r∥, s −v , (8) where Sx := {S | S ⊆A such that x is a proper5 convex combination of all the elements in S}, and s(A, r) := arg maxv∈A⟨r, v⟩is the FW atom used as a summit. Pyramidal Width. To define the pyramidal width of a set, we take the minimum over the cone of possible feasible directions r (in order to avoid the problem of zero width). A direction r is feasible for A from x if it points inwards conv(A), (i.e. r ∈cone(A −x)). We define the pyramidal width of a set A to be the smallest pyramidal width of all its faces, i.e. PWidth(A) := min K∈faces(conv(A)) x∈K r∈cone(K−x)\{0} PdirW(K ∩A, r, x). (9) Theorem 3. Let x ∈M = conv(A) be a suboptimal point and S be an active set for x. Let x∗be an optimal point and corresponding error direction ˆe = (x∗−x)/ ∥x∗−x∥, and negative gradient r := −∇f(x) (and so ⟨r, ˆe⟩> 0). Let d = s−v be the pairwise FW direction obtained over A and S with negative gradient r. Then ⟨r, d⟩ ⟨r, ˆe⟩≥PWidth(A). (10) 3.1 Properties of Pyramidal Width and Consequences Examples of Values. The pyramidal width of a set A is lower bounded by the minimal width over all subsets of atoms, and thus is strictly greater than zero if the number of atoms is finite. On the other hand, this lower bound is often too loose to be useful, as in particular, vertex subsets of the unit cube in dimension d can have exponentially small width O(d−d 2 ) [see Corollary 27 in 36]. On the other hand, as we show here, the pyramidal width of the unit cube is actually 1/ √ d, justifying why we kept the tighter but more involved definition (9). See Appendix B.1 for the proof. Lemma 4. The pyramidal width of the unit cube in Rd is 1/ √ d. For the probability simplex with d vertices, the pyramidal width is actually the same as its width, which is 2/ √ d when d is even, and 2/ p d−1/d when d is odd [2] (see Appendix B.1). In contrast, the pyramidal width of an infinite set can be zero. For example, for a curved domain, the set of active atoms S can contain vertices forming a very narrow pyramid, yielding a zero width in the limit. Condition Number of a Set. The inverse of the rate constant ρ appearing in Theorem 1 is the product of two terms: L/µ is the standard condition number of the objective function appearing in the rates of gradient methods in convex optimization. The second quantity (M/δ)2 (diameter over pyramidal width) can be interpreted as a condition number of the domain M, or its eccentricity. The more eccentric the constraint set (large diameter compared to its pyramidal width), the slower the convergence. The best condition number of a function is when its level sets are spherical; the analog in term of the constraint sets is actually the regular simplex, which has the maximum widthto-diameter ratio amongst all simplices [see Corollary 1 in 2]. Its eccentricity is (at most) d/2. In contrast, the eccentricity of the unit cube is d2, which is much worse. 5By proper convex combination, we mean that all coefficients are non-zero in the convex combination. 7 We conjecture that the pyramidal width of a set of vertices (i.e. extrema of their convex hull) is non-increasing when another vertex is added (assuming that all previous points remain vertices). For example, the unit cube can be obtained by iteratively adding vertices to the regular probability simplex, and the pyramidal width thereby decreases from 2/ √ d to 1/ √ d. This property could provide lower bounds for the pyramidal width of more complicated polytopes, such as 1/ √ d for the d-dimensional marginal polytope, as it can be obtained by removing vertices from the unit cube. Complexity Lower Bounds. Combining the convergence Theorem 1 and the condition number of the unit simplex, we get a complexity of O(d L µ log( 1 ϵ )) to reach ϵ-accuracy when optimizing a strongly convex function over the unit simplex. Here the linear dependence on d should not come as a surprise, in view of the known lower bound of 1/t for t ≤d for Frank-Wolfe type methods [15]. Applications to Submodular Minimization. See Appendix A.2 for a consequence of our linear rate for the popular MNP algorithm for submodular function optimization (over the base polytope). 4 Non-Strongly Convex Generalization Building on the work of Beck and Shtern [4] and Wang and Lin [33], we can generalize our global linear convergence results for all Frank-Wolfe variants for the more general case where f(x) := g(Ax) + ⟨b, x⟩, for A ∈Rp×d, b ∈Rd and where g is µg-strongly convex and continuously differentiable over AM. We note that for a general matrix A, f is convex but not necessarily strongly convex. In this case, the linear convergence still holds but with the constant µ appearing in the rate of Theorem 1 replaced with the generalized constant ˜µ appearing in Lemma 9 in Appendix F. 5 Illustrative Experiments iteration 0 200 400 600 800 1000 gap 10-8 10-6 10-4 10-2 100 102 104 106 FW awayFW pairFW FW awayFW pairFW iteration 0 500 1000 1500 2000 gap 10-8 10-6 10-4 10-2 100 FW awayFW pairFW FW awayFW pairFW Figure 2: Duality gap gFW t vs iterations on the Lasso problem (top), and video co-localization (bottom). Code is available from the authors’ website. We illustrate the performance of the presented algorithm variants in two numerical experiments, shown in Figure 2. The first example is a constrained Lasso problem (ℓ1-regularized least squares regression), that is minx∈M f(x) = ∥Ax −b∥2, with M = 20 · L1 a scaled L1-ball. We used a random Gaussian matrix A ∈R200×500, and a noisy measurement b = Ax∗ with x∗being a sparse vector with 50 entries ±1, and 10% of additive noise. For the L1-ball, the linear minimization oracle LMOA just selects the column of A of best inner product with the residual vector. The second application comes from video co-localization. The approach used by [16] is formulated as a quadratic program (QP) over a flow polytope, the convex hull of paths in a network. In this application, the linear minimization oracle is equivalent to finding a shortest path in the network, which can be done easily by dynamic programming. For the LMOA, we re-use the code provided by [16] and their included aeroplane dataset resulting in a QP over 660 variables. In both experiments, we see that the modified FW variants (away-steps and pairwise) outperform the original FW algorithm, and exhibit a linear convergence. In addition, the constant in the convergence rate of Theorem 1 can also be empirically shown to be fairly tight for AFW and PFW by running them on an increasingly obtuse triangle (see Appendix E). Discussion. Building on a preliminary version of our work [20], Beck and Shtern [4] also proved a linear rate for away-steps FW, but with a simpler lower bound for the LHS of (10) using linear duality arguments. However, their lower bound [see e.g. Lemma 3.1 in 4] is looser: they get a d2 constant for the eccentricity of the regular simplex instead of the tighter d that we proved. Finally, the recently proposed generic scheme for accelerating first-order optimization methods in the sense of Nesterov from [24] applies directly to the FW variants given their global linear convergence rate that we proved. This gives for the first time first-order methods that only use linear oracles and obtain the “near-optimal” ˜O(1/k2) rate for smooth convex functions, or the accelerated ˜O( p L/µ) constant in the linear rate for strongly convex functions. Given that the constants also depend on the dimensionality, it remains an open question whether this acceleration is practically useful. Acknowledgements. We thank J.B. Alayrac, E. Hazan, A. Hubard, A. Osokin and P. Marcotte for helpful discussions. This work was partially supported by the MSR-Inria Joint Center and a Google Research Award. 8 References [1] S. D. Ahipaao˘glu, P. Sun, and M. Todd. Linear convergence of a modified Frank-Wolfe algorithm for computing minimum-volume enclosing ellipsoids. Optimization Methods and Software, 23(1):5–19, 2008. [2] R. Alexander. The width and diameter of a simplex. Geometriae Dedicata, 6(1):87–94, 1977. [3] F. Bach. Learning with submodular functions: A convex optimization perspective. Foundations and Trends in Machine Learning, 6(2-3):145–373, 2013. [4] A. Beck and S. Shtern. Linearly convergent away-step conditional gradient for non-strongly convex functions. arXiv:1504.05002v1, 2015. [5] A. Beck and M. Teboulle. A conditional gradient method with linear rate of convergence for solving convex linear systems. Mathematical Methods of Operations Research (ZOR), 59(2):235–247, 2004. [6] M. D. Canon and C. D. Cullum. A tight upper bound on the rate of convergence of Frank-Wolfe algorithm. SIAM Journal on Control, 6(4):509–516, 1968. [7] V. Chari et al. On pairwise costs for network flow multi-object tracking. In CVPR, 2015. [8] J. C. Dunn. Rates of convergence for conditional gradient algorithms near singular and nonsingular extremals. SIAM Journal on Control and Optimization, 17(2):187–211, 1979. [9] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3:95–110, 1956. [10] D. Garber and E. Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. arXiv:1301.4666v5, 2013. [11] D. Garber and E. Hazan. Faster rates for the Frank-Wolfe method over strongly-convex sets. In ICML, 2015. [12] J. Gu´elat and P. Marcotte. Some comments on Wolfe’s ‘away step’. Mathematical Programming, 1986. [13] D. Hearn, S. Lawphongpanich, and J. Ventura. Restricted simplicial decomposition: Computation and extensions. In Computation Mathematical Programming, volume 31, pages 99–118. Springer, 1987. [14] C. A. Holloway. An extension of the Frank and Wolfe method of feasible directions. Mathematical Programming, 6(1):14–27, 1974. [15] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, 2013. [16] A. Joulin, K. Tang, and L. Fei-Fei. Efficient image and video co-localization with Frank-Wolfe algorithm. In ECCV, 2014. [17] V. Kolmogorov and R. Zabin. What energy functions can be minimized via graph cuts? IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(2):147–159, 2004. [18] R. G. Krishnan, S. Lacoste-Julien, and D. Sontag. Barrier Frank-Wolfe for marginal inference. In NIPS, 2015. [19] P. Kumar and E. A. Yildirim. A linearly convergent linear-time first-order algorithm for support vector classification with a core set result. INFORMS Journal on Computing, 2010. [20] S. Lacoste-Julien and M. Jaggi. An affine invariant linear convergence analysis for Frank-Wolfe algorithms. arXiv:1312.7864v2, 2013. [21] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate Frank-Wolfe optimization for structural SVMs. In ICML, 2013. [22] G. Lan. The complexity of large-scale convex programming under a linear optimization oracle. arXiv:1309.5550v2, 2013. [23] E. S. Levitin and B. T. Polyak. Constrained minimization methods. USSR Computational Mathematics and Mathematical Physics, 6(5):787–823, Jan. 1966. [24] H. Lin, J. Mairal, and Z. Harchaoui. A universal catalyst for first-order optimization. In NIPS, 2015. [25] B. Mitchell, V. F. Demyanov, and V. Malozemov. Finding the point of a polyhedron closest to the origin. SIAM Journal on Control, 12(1), 1974. [26] R. ˜Nanculef, E. Frandi, C. Sartori, and H. Allende. A novel Frank-Wolfe algorithm. Analysis and applications to large-scale SVM training. Information Sciences, 2014. [27] Y. Nesterov. Introductory Lectures on Convex Optimization. Kluwer Academic Publishers, 2004. [28] J. Pena, D. Rodriguez, and N. Soheili. On the von Neumann and Frank-Wolfe algorithms with away steps. arXiv:1507.04073v2, 2015. [29] J. C. Platt. Fast training of support vector machines using sequential minimal optimization. In Advances in kernel methods: support vector learning, pages 185–208. 1999. [30] S. M. Robinson. Generalized Equations and their Solutions, Part II: Applications to Nonlinear Programming. Springer, 1982. [31] B. Von Hohenbalken. Simplicial decomposition in nonlinear programming algorithms. Mathematical Programming, 13(1):49–68, 1977. [32] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(12):1–305, 2008. [33] P.-W. Wang and C.-J. Lin. Iteration complexity of feasible descent methods for convex optimization. Journal of Machine Learning Research, 15:1523–1548, 2014. [34] P. Wolfe. Convergence theory in nonlinear programming. In Integer and Nonlinear Programming. 1970. [35] P. Wolfe. Finding the nearest point in a polytope. Mathematical Programming, 11(1):128–149, 1976. [36] G. M. Ziegler. Lectures on 0/1-polytopes. arXiv:math/9909177v1, 1999. 9 | 2015 | 296 |
5,809 | Efficient Learning by Directed Acyclic Graph For Resource Constrained Prediction Joseph Wang Department of Electrical & Computer Engineering Boston University, Boston, MA 02215 joewang@bu.edu Kirill Trapeznikov Systems & Technology Research Woburn, MA 01801 kirill.trapeznikov@ stresearch.com Venkatesh Saligrama Department of Electrical & Computer Engineering Boston University, Boston, MA 02215 srv@bu.edu Abstract We study the problem of reducing test-time acquisition costs in classification systems. Our goal is to learn decision rules that adaptively select sensors for each example as necessary to make a confident prediction. We model our system as a directed acyclic graph (DAG) where internal nodes correspond to sensor subsets and decision functions at each node choose whether to acquire a new sensor or classify using the available measurements. This problem can be posed as an empirical risk minimization over training data. Rather than jointly optimizing such a highly coupled and non-convex problem over all decision nodes, we propose an efficient algorithm motivated by dynamic programming. We learn node policies in the DAG by reducing the global objective to a series of cost sensitive learning problems. Our approach is computationally efficient and has proven guarantees of convergence to the optimal system for a fixed architecture. In addition, we present an extension to map other budgeted learning problems with large number of sensors to our DAG architecture and demonstrate empirical performance exceeding state-of-the-art algorithms for data composed of both few and many sensors. 1 Introduction Many scenarios involve classification systems constrained by measurement acquisition budget. In this setting, a collection of sensor modalities with varying costs are available to the decision system. Our goal is to learn adaptive decision rules from labeled training data that, when presented with an unseen example, would select the most informative and cost-effective acquisition strategy for this example. In contrast, non-adaptive methods [24] attempt to identify a common sparse subset of sensors that can work well for all data. Our goal is an adaptive method that can classify typical cases using inexpensive sensors while using expensive sensors only for atypical cases. We propose an adaptive sensor acquisition system learned using labeled training examples. The system, modeled as a directed acyclic graph (DAG), is composed of internal nodes, which contain decision functions, and a single sink node (the only node with no outgoing edges), representing the terminal action of stopping and classifying (SC). At each internal node, a decision function routes an example along one of the outgoing edges. Sending an example to another internal node represents acquisition of a previously unacquired sensor, whereas sending an example to the sink node indicates that the example should be classified using the currently acquired set of sensors. The goal is to learn these decision functions such that the expected error of the system is minimized subject to an expected budget constraint. First, we consider the case where the number of sensors available is small (as in [19, 23, 20]), though the dimensionality of data acquired by each sensor may be large (such as an image taken in different 1 modalities). In this scenario, we construct a DAG that allows for sensors to be acquired in any order and classification to occur with any set of sensors. In this regime, we propose a novel algorithm to learn node decisions in the DAG by emulating dynamic programming (DP). In our approach, we decouple a complex sequential decision problem into a series of tractable cost-sensitive learning subproblems. Cost-sensitive learning (CSL) generalizes multi-decision learning by allowing decision costs to be data dependent [2]. Such reduction enables us to employ computationally efficient CSL algorithms for iteratively learning node functions in the DAG. In our theoretical analysis, we show that, given a fixed DAG architecture, the policy risk learned by our algorithm converges to the Bayes risk as the size of the training set grows. Next, we extend our formulation to the case where a large number of sensors exist, but the number of distinct sensor subsets that are necessary for classification is small (as in [25, 11] where the depth of the trees is fixed to 5). For this regime, we present an efficient subset selection algorithm based on sub-modular approximation. We treat each sensor subset as a new “sensor,” construct a DAG over unions of these subsets, and apply our DP algorithm. Empirically, we show that our approach outperforms state-of-the-art methods in both small and large scale settings. Related Work: There is an extensive literature on adaptive methods for sensor selection for reducing test-time costs. It arguably originated with detection cascades (see [26, 4] and references therein), a popular method in reducing computation cost in object detection for cases with highly skewed class imbalance and generic features. Computationally cheap features are used at first to filter out negative examples and more expensive features are used in later stages. Our technical approach is closely related to Trapeznikov et al. [19] and Wang et al. [23, 20]. Like us they formulate an ERM problem and generalize detection cascades to classifier cascades and trees and handle balanced and/or multi-class scenarios. Trapeznikov et al. [19] propose a similar training scheme for the case of cascades, however restrict their training to cascades and simple decision functions which require alternating optimization to learn. Alternatively, Wang et al. [21, 22, 23, 20] attempt to jointly solve the decision learning problem by formulating a linear upper-bounding surrogate, converting the problem into a linear program (LP). Figure 1: A simple example of a sensor selection DAG for a three sensor system. At each state, represented by a binary vector indicating measured sensors, a policy π chooses between either adding a new sensor or stopping and classifying. Note that the state sSC has been repeated for simplicity. Conceptually, our work is closely related to Xu et al. [25] and Kusner et al.[11], who introduce Cost-Sensitive Trees of Classifiers (CSTC) and Approximately Submodular Trees of Classifiers (ASTC), respectively, to reducing test time costs. Like our paper they propose a global ERM problem. They solve for the tree structure, internal decision rules and leaf classifiers jointly using alternative minimization techniques. Recently, Kusner et al.[11] propose Approximately Submodular Trees of Classifiers (ASTC), a variation of CSTC which provides robust performance with significantly reduced training time and greedy approximation, respectively. Recently, Nan et al. [14] proposed random forests to efficiently learn budgeted systems using greedy approximation over large data sets. The subject of this paper is broadly related to other adaptive methods in the literature. Generative methods [17, 8, 9, 6] pose the problem as a POMDP, learn conditional probability models, and myopically select features based information gain of unknown features. MDP-based methods [5, 10, 7, 3] encode current observations as state, unused features as action space, and formulate various reward functions to account for classification error and costs. He et al. [7] apply imitation learning of a greedy policy with a single classification step as actions. Dulac-Arnold et al. [5] and Karayev et al. [10] apply reinforcement learning to solve this MDP. Benbouzid et al.[3] propose classifier cascades with an additional skip action within an MDP framework. Nan et al. [15] consider a nearest neighbor approach to feature selection, with confidence driven by margin magnitude. 2 2 Adaptive Sensor Acquisition by DAG In this section, we present our adaptive sensor acquisition DAG that during test-time sequentially decides which sensors should be acquired for every new example entering the system. Before formally describing the system and our learning approach, we first provide a simple illustration for a 3 sensor DAG shown in Fig. 1. The state indicating acquired sensors is represented by a binary vector, with a 0 indicating that a sensor measurement has not been acquired and a 1 representing an acquisition. Consider a new example that enters the system. Initially, it has a state of [0, 0, 0]T (as do all samples during test-time) since no sensors have been acquired. It is routed to the policy function π0, which makes a decision to measure one of the three sensors or to stop and classify. Let us assume that the function π0 routes the example to the state [1, 0, 0]T , indicating that the first sensor is acquired. At this node, the function π1 has to decide whether to acquire the second sensor, acquire the third, or classifying using only the first. If π1 chooses to stop and classify then this example will be classified using only the first sensor. Such decision process is performed for every new example. The system adaptively collects sensors until the policy chooses to stop and classify (we assume that when all sensors have been collected the decision function has no choice but to stop and classify, as shown for π7 in Fig. 1). Problem Formulation: A data instance, x ∈X, consists of M sensor measurements, x = {x1, x2, . . . , xM}, and belongs to one of L classes indicated by its label y ∈Y = {1, 2, . . . L}. Each sensor measurement, xm, is not necessarily a scalar but may instead be multi-dimensional. Let the pair, (x, y), be distributed according to an unknown joint distribution D. Additionally, associated with each sensor measurement xm is an acquisition cost, cm. To model the acquisition process, we define a state space S = {s1, . . . , sK, sSC}. The states {s1, . . . , sK} represent subsets of sensors, and the stop-and-classify state sSC represents the action of stopping and classifying with a current subset. Let Xs correspond to the space of sensor measurements in subset s. We assume that the state space includes all possible subsets1, K = 2M. For example in Fig. 1, the system contains all subsets of 3 sensors. We also introduce the state transition function, T : S →S, that defines a set of actions that can be taken from the current state. A transition from the current sensor subset to a new subset corresponds to an acquisition of new sensor measurements. A transition to the state sSC corresponds to stopping and classifying using the available information. This terminal state, sSC, has access to a classifier bank used to predict the label of an example. Since classification has to operate on any sensor subset, there is one classifier for every sk: fs1, . . . , fsK such that fs : Xs →Y. We assume the classifier bank is given and pre-trained. Practically, the classifiers can be either unique for each subset or a missing feature (i.e. sensor) classification system as in [13]. We overload notation and use node, subset of sensors, and path leading up to that subset on the DAG interchangeably. In particular we let S denote the collection of subsets of nodes. Each subset is associated with a node on the DAG graph. We refer to each node as a state since it represents the “state-of-information” for an instance at that node. We define the loss associated with classifying an example/label pair (x, y) using the sensors in sj as Lsj(x, y) = 1fsj (x)̸=y + X k∈sj ck. (1) Using this convention, the loss is the sum of the empirical risk associated with classifier fsj and the cost of the sensors in the subset sj. The expected loss over the data is defined LD(π) = Ex,y∼D Lπ(x)(x, y) . (2) Our goal is to find a policy which adaptively selects subsets for examples such that their average loss is minimized min π∈Π LD(π), (3) where π : X →S is a policy selected from a family of policies Π and π(x) is the state selected by the policy π for example x. We denote the quantity LD as the value of (3) when Π is the family of all measurable functions. LD is the Bayes cost, representing the minimum possible cost for any 1While enumerating all possible combinations is feasible for small M, for large M this problem becomes intractable. We will overcome this limitation in Section 3 by applying a novel sensor selection algorithm. For now, we remain in the small M regime. 3 function given the distribution of data. In practice, the distribution D is unknown, and instead we are given training examples (x1, y1), . . . , (xn, yn) drawn I.I.D. from D. The problem becomes an empirical risk minimization: min π∈Π n X i=1 Lπ(xi)(xi, yi). (4) Recall that our sensor acquisition system is represented as a DAG. Each node in a graph corresponds to a state (i.e. sensor subset) in S, and the state transition function, T (sj), defines the outgoing edges from every node sj. We refer to the entire edge set in the DAG as E. In such a system, the policy π is parameterized by the set of decision functions π1, . . . , πK at every node in the DAG. Each function, πj : X →T (sj), maps an example to a new state (node) from the set specified by outgoing edges. Rather than directly minimizing the empirical risk in (4), first, we define a step-wise cost associated with all edges (sj, sk) ∈E C(x, y, sj, sk) = (P t∈sk\sj ct if sk ̸= sSC 1fsj (x)̸=y otherwise . (5) C(·) is either the cost of acquiring new sensors or is the classification error induced by classifying with the current subset if sk = sSC. Using this step-wise cost, we define the empirical loss of the system w.r.t a path for an example x: R (x, y, π1, ..., πK) = X (sj,sj+1) ∈path(x,π1,...,πK) C (x, y, sj, sj+1) , (6) where path (x, π1, . . . , πK) is the path on the DAG induced by the policy functions π1, . . . , πK for example x. The empirical minimization equivalent to (4) for our DAG system is a sample average over all example specific path losses: π∗ 1, . . . , π∗ K = argmin π1,...,πK∈Π n X i=1 R (xi, yi, π1, . . . , πK) . (7) Next, we present a reduction to learn the functions π1, ..., πK that minimize the loss in (7). 2.1 Learning Policies in a DAG Learning the functions π1, . . . , πK that minimize the cost in (7) is a highly coupled problem. Learning a decision function πj is dependent on the other functions in two ways: (a) πj is dependent on functions at nodes downstream (nodes for which a path exists from πj), as these determine the cost of each action taken by πj on an individual example (the cost-to-go), and (b) πj is dependent on functions at nodes upstream (nodes for which a path exists to πj), as these determine the distribution of examples that πj acts on. Consider a policy πj at a node corresponding to state sj such that all outgoing edges from j lead to leaves. Also, we assume all examples pass through this node πj (we are ignoring the effect of upstream dependence b). This yields the following important lemma: Lemma 2.1. Given the assumptions above, the problem of minimizing the risk in (6) w.r.t a single policy function, πj, is equivalent to solving a k-class cost sensitive learning (CSL) problem.2 Proof. Consider the risk in (6) with πj such that all outgoing edges from j lead to a leaf. Ignoring the effect of other policy functions upstream from j, the risk w.r.t πj is: R(x, y, πj) = X sk∈T (sj) C(x, y, sj, sk)1πj(x)=sk →min π∈Π n X i=1 R(xi, yi, πj). Minimizing the risk over training examples yields the optimization problem on the right hand side. This is equivalent to a CSL problem over the space of “labels” T (sj) with costs given by the transition costs C(x, y, sj, sk). In order to learn the policy functions π1, . . . , πK, we propose Algorithm 1, which iteratively learns policy functions using Lemma 2.1. We solve the CSL problem by using a filter-tree scheme [2] for Learn, which constructs a tree of binary classifiers. Each binary classifier can be trained using regularized risk minimization. For concreteness we define the Learn algorithm as Learn ((x1, ⃗w1), ..., (xn, ⃗wn)) ≜ FilterTree((x1, ⃗w1), ..., (xn, ⃗wn)) (8) where the binary classifiers in the filter tree are trained using an appropriately regularized calibrated convex loss function. Note that multiple schemes exist that map the CSL problem to binary classification. 2We consider the k-class CSL problem formulated by Beygelzimer et al. [2], where an instance of the problem is defined by a distribution D over X ×[0, inf)k, a space of features and associated costs for predicting each of the k labels for each realization of features. The goal is to learn a function which maps each element of X to a label {1, . . . , k} s.t. the expected cost is minimized. 4 Algorithm 1 Graph Reduce Algorithm Input: Data: (xi, yi)n i=1, DAG: (nodes S, edges E, costs C(xi, yi, e), ∀e ∈E), CSL alg: Learn ((x1, ⃗w1), . . . , (xn, ⃗wn))) →π(·) while Graph S is NOT empty do (1) Choose a node, j ∈S, s.t. all children of j are leaf nodes for example i ∈{1, . . . , n} do (2) Construct the weight vector ⃗wi of edge costs per action. end for (3) πj ←Learn ((x1, ⃗w1), . . . , (xn, ⃗wn)) (4) Evaluate πj and update edge costs to node j: C(xi, yi, sn, sj) ←⃗wj i (πj(xi)) + C(xi, yi, sn, sj) (5) Remove all outgoing edges from node j in E (6) Remove all disconnected nodes from S. end while Output: Policy functions, π1, . . . , πK A single iteration of Algorithm 1 proceeds as follows: (1) A node j is chosen whose outgoing edges connect only to leaf nodes. (2) The costs associated with each connected leaf node are found. (3) The policy πj is trained on the entire set of training data according to these costs by solving a CSL problem. (4) The costs associated with taking the action πj are computed for each example, and the costs of moving to state j are updated. (5) Outgoing edges from node j are removed (making it a leaf node), and (6) disconnected nodes (that were previously connected to node j) are removed. The algorithm iterates through these steps until all edges have been removed. We denote the policy functions trained on the empirical data using Alg. 1 as πn 1 , . . . , πn K. 2.2 Analysis Our goal is to show that the expected risk of the policy functions π1, . . . , πK learned by Alg. 1 converge to the Bayes risk. We first state our main result: Theorem 2.2. Alg. 1 is universally consistent, that is lim n→∞LD(πn 1 , . . . , πn K) →LD (9) where πn 1 , . . . , πn K are the policy functions learned using Alg. (1), which in turn uses Learn described by Eq. 8. Alg. 1 emulates a dynamic program applied in an empirical setting. Policy functions are decoupled and trained from leaf to root conditioned on the output of descendant nodes. To adapt to the empirical setting, we optimize at each stage over all examples in the training set. The key insight is the fact that universally consistent learners output optimal decisions over subsets of the space of data, that is they are locally optimal. To illustrate this point, consider a standard classification problem. Let X ′ ⊂X be the support (or region) of examples induced by upstream deterministic decisions. d∗and f ∗, Bayes optimal classifiers w.r.t the full space and subset, respectively, are equal on the reduced support: d∗(x) = arg min d E 1d(x)̸=y|x = f ∗(x) = arg min f E 1f(x)̸=y|x, x ∈X ′ ⊂X ∀x ∈X ′. From this insight, we decouple learning problems while still training a system that converges to the Bayes risk. This can be achieved by training universally consistent CSL algorithms such as filter trees [2] that reduce the problem to binary classification. By learning consistent binary classifiers [1, 18], the risk of the cost-sensitive function can be shown to converge to the Bayes risk [2]. Proof of Theorem 2.2 is included in the Supplementary Material. Computational Efficiency: Alg. 1 reduces the problem to solving a series of O(KM) binary classification problems, where K is the number of nodes in the DAG and M is the number of sensors. Finding each binary classifier is computationally efficient, reducing to a convex problem with O(n) variables. In contrast, nearly all previous approaches require solving a non-convex problem and resort to alternating optimization [25, 19] or greedy approximation [11]. Alternatively, convex surrogates proposed for the global problem [23, 20] require solving large convex programs with θ(n) variables, even for simple linear decision functions. Furthermore, existing off-the-shelf algorithms cannot be applied to train these systems, often leading to less efficient implementation. 2.3 Generalization to Other Budgeted Learning Problems Although, we presented our algorithm in the context of supervised classification and a uniform linear sensor acquisition cost structure, the above framework holds for a wide range of problems. 5 In particular, any loss-based learning problem can be solved using the proposed DAG approach by generalizing the cost function ˜C(x, y, sj, sk) = ( c(x, y, sj, sk) if sk ̸= sSC D (x, y, sj) otherwise , (10) where c(x, y, sj, sk) is the cost of acquiring sensors in sk\sj for example (x, y) given the current state sj and D (x, y, sj) is some loss associated with applying sensor subset sj to example (x, y). This framework allows for significantly more complex budgeted learning problems to be handled. For example, the sensor acquisition cost, c(x, y, sj, sk), can be object dependent and non-linear, such as increasing acquisition costs as time increases (which can arise in image retrieval problems, where users are less likely to wait as time increases). The cost D (x, y, sj) can include alternative costs such as ℓ2 error in regression, precision error in ranking, or model error in structured learning. As in the supervised learning case, the learning functions and example labels do not need to be explicitly known. Instead, the system requires only empirical performance to be provided, allowing complex decision systems (such as humans) to be characterized or systems learned where the classifiers and labels are sensitive information. 3 Adaptive Sensor Acquisition in High-Dimensions So far, we considered the case where the DAG system allows for any subset of sensors to be acquired, however this is often computationally intractable as the number of nodes in the graph grows exponentially with the number of sensors. In practice, these complete systems are only feasible for data generated from a small set of sensors ( 10 or less). 3.1 Learning Sensor Subsets Figure 2: An example of a DAG system using the 3 sensor subsets shown on the bottom left. The new states are the union of these sensor subsets, with the system otherwise constructed in the same fashion as the small scale system. Although constructing an exhaustive DAG for data with a large number of sensors is computationally intractable, in many cases this is unnecessary. Motivated by previous methods [6, 25, 11], we assume that the number of “active” nodes in the exhaustive graph is small, that is these nodes are either not visited by any examples or all examples that visit the node acquire the same next sensor. Equivalently, this can be viewed as the system needing only a small number of sensor subsets to classify all examples with low acquisition cost. Rather than attempt to build the entire combinatorially sized graph, we instead use this assumption to first find these “active” subsets of sensors and construct a DAG to choose between unions of these subsets. The step of finding these sensor subsets can be viewed as a form of feature clustering, with a goal of grouping features that are jointly useful for classification. By doing so, the size of the DAG is reduced from exponential in the number of sensors, 2M, to exponential in a much smaller user chosen parameter number of subsets, 2t. In experimental results, we limit t = 8, which allows for a diverse subsets of sensors to be found while preserving computational tractability and efficiency. Our goal is to learn sensor subsets with high classification performance and low acquisition cost (empirically low cost as defined in (1)). Ideally, our goal is to jointly learn the subsets which minimize the empirical risk of the entire system as defined in (4), however this presents a computationally intractable problem due to the exponential search space. Rather than attempt to solve this difficult problem directly, we minimize classification error over a collection of sensor subsets σ1, . . . , σt subject to a cost constraint on the total number of sensors used. We decouple the problem from the policy learning problem by assuming that each example is classified by the best possible subset. For a constant sensor cost, the problem can be expressed as a set constraint problem: min σ1,...,σt 1 N N X i=1 min j∈{1,...,t} h 1fσj (xi)̸=yi i such that: t X j=1 |σj| ≤B δ , (11) where B is the total sensor budget over all sensor subsets and δ is the cost of a single sensor. 6 Although minimizing this loss is still computationally intractable, consider instead the equivalent problem of maximizing the “reward” (the event of a correct classification) of the subsets, defined as G = N X i=1 max j∈{1,...,t} h 1fσj (xi)=yi i → max σ1,...,σt 1 N G(c1, . . . , ct) such that: t X j=1 |σj| ≤B δ . (12) This problem is related to the knapsack problem with a non-linear objective. Maximizing the reward in (12) is still a computationally intractable problem, however the reward function is structured to allow for efficient approximation. Lemma 3.1. The objective of the maximization in (12) is sub-modular with respect to the set of subsets, such that adding any new set to the reward yields diminishing returns. Theorem 3.2. Given that the empirical risk of each classifier fσk is submodular and monotonically decreasing w.r.t. the elements in σk and uniform sensor costs, the strategy in Alg. 2 is an O(1) approximation of the optimal reward in (12). Proof of these statements is included in the Supplementary Material and centers on showing that the objective is sub-modular, and therefore applying a greedy strategy yields a 1 −1 e approximation of the optimal strategy [16]. 3.2 Constructing DAG using Sensor Subsets Algorithm 2 Sensor Subset Selection Input: Number of Subsets t, Cost Constraint B δ Output: Feature subsets, σ1, . . . , σt Initialize: σ1, . . . , σt = ∅ (i, j) = argmaxi∈{1,...,t} argmaxj∈σC i G(σ1, ..., σi ∪j, ..., σt) while PT j=1 |σj| ≤C δ do σi = σi ∪j (i, j) = argmaxi∈{1,...,t} argmaxj∈σC i G(σ1, ..., σi ∪j, ..., σt) end while Alg. 2 requires computation of the reward G for only O B δ tM sensor subsets, where M is the number of sensors, to return a constant-order approximation to the NP-hard knapsack-type problem. Given the set of sensor subsets σ1, . . . , σt, we can now construct a DAG using all possible unions of these subsets, where each sensor subset σj is treated as a new single sensor, and apply the small scale system presented in Sec. 2. The result is an efficiently learned system with relatively low complexity yet strong performance/cost trade-off. Additionally, this result can be extended to the case of non-uniform costs, where a simple extension of the greedy algorithm yields a constant-order approximation [12]. A simple case where three subsets are used is shown in Fig. 2. The three learned subsets of sensors are shown on the bottom left of Fig. 2, and these three subsets are then used to construct the entire DAG in the same fashion as in Fig. 1. At each stage, the state is represented by the union of sensor subsets acquired. Grouping the sensors in this fashion reduces the size of the graph to 8 nodes as opposed to 64 nodes required if any subset of the 6 sensors can be selected. This approach allows us to map high-dimensional adaptive sensor selection problems to small scale DAG in Sec. 2. 4 Experimental Results To demonstrate the performance of our DAG sensor acquisition system, we provide experimental results on data sets previously used in budgeted learning. Three data sets previously used for budget cascades [19, 23] are tested. In these data sets, examples are composed of a small number of sensors (under 4 sensors). To compare performance, we apply the LP approach to learning sensor trees [20] and construct trees containing all subsets of sensors as opposed to fixed order cascades [19, 23]. Next, we examine performance of the DAG system using 3 higher dimensional sets of data previously used to compare budgeted learning performance [11]. In these cases, the dimensionality of the data (between 50 and 400 features) makes exhaustive subset construction computationally infeasible. We greedily construct sensor subsets using Alg. 2, then learn a DAG over all unions of these sensor subsets. We compare performance with CSTC [25] and ASTC [11]. For all experiments, we use cost sensitive filter trees [2], where each binary classifier in the tree is learned using logistic regression. Homogeneous polynomials are used as decision functions in the filter trees. For all experiments, uniform sensor cost were were varied in the range [0, M] achieve systems with different budgets. Performance between the systems is compared by plotting the average number of features acquired during test-time vs. the average test error. 7 4.1 Small Sensor Set Experiments 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 0.2 0.25 0.3 0.35 0.4 Average Features Used Average Test Error LP Tree DAG (a) letter 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 Average Features Used Average Test Error LP Tree DAG (b) pima 1 1.5 2 2.5 3 3.5 4 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 Average Features Used Average Test Error LP Tree DAG (c) satimage Figure 3: Average number of sensors acquired vs. average test error comparison between LP tree systems and DAG systems. We compare performance of our trained DAG with that of a complete tree trained using an LP surrogate [20] on the landsat, pima, and letter datasets. To construct each sensor DAG, we include all subsets of sensors (including the empty set) and connect any two nodes differing by a single sensor, with the edge directed from the smaller sensor subset to the larger sensor subset. By including the empty set, no initial sensor needs to be selected. 3rd-order homogeneous polynomials are used for both the classification and system functions in the LP and DAG. As seen in Fig. 3, the systems learned with a DAG outperform the LP tree systems. Additionally, the performance of both of the systems is significantly better than previously reported performance on these data sets for budget cascades [19, 23]. This arises due to both the higher complexity of the classifiers and decision functions as well as the flexibility of sensor acquisition order in the DAG and LP tree compared to cascade structures. For this setting, it appears that the DAG approach is superior approach to LP trees for learning budgeted systems. 4.2 Large Sensor Set Experiments 0 5 10 15 20 25 30 35 40 45 50 0.05 0.1 0.15 0.2 0.25 0.3 ASTC CSTC DAG (a) MiniBooNE 0 5 10 15 20 25 30 35 40 45 50 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 ASTC CSTC DAG (b) Forest 0 50 100 150 200 250 0.3 0.32 0.34 0.36 0.38 0.4 0.42 0.44 ASTC CSTC DAG (c) CIFAR Figure 4: Comparison between CSTC, ASTC, and DAG of the average number of acquired features (x-axis) vs. test error (y-axis). Next, we compare performance of our trained DAG with that of CSTC [25] and ASTC [11] for the MiniBooNE, Forest, and CIFAR datasets. We use the validation data to find the homogeneous polynomial that gives the best classification performance using all features (MiniBooNE: linear, Forest: 2nd order, CIFAR: 3rd order). These polynomial functions are then used for all classification and policy functions. For each data set, Alg. 2 was used to find 7 subsets, with an 8th subset of all features added. An exhaustive DAG was trained over all unions of these 8 subsets. Fig. 4 shows performance comparing the average cost vs. average error of CSTC, ASTC, and our DAG system. The systems learned with a DAG outperform both CSTC and ASTC on the MiniBooNE and Forest data sets, with comparable performance on CIFAR at low budgets and superior performance at higher budgets. Acknowledgments This material is based upon work supported in part by the U.S. National Science Foundation Grant 1330008, by the Department of Homeland Security, Science and Technology Directorate, Office of University Programs, under Grant Award 2013- ST-061-ED0001, by ONR Grant 50202168 and US AF contract FA8650-14-C-1728. The views and conclusions contained in this document are those of the authors and should not be interpreted as necessarily representing the social policies, either expressed or implied, of the U.S. DHS, ONR or AF. 8 References [1] P. Bartlett, M. Jordan, and J. Mcauliffe. Convexity, Classification, and Risk Bounds. Journal of American Statistical Association, 101(473):138–156, 2006. [2] A. Beygelzimer, J. Langford, and P. Ravikumar. Multiclass classification with filter trees. 2007. [3] R. Busa-Fekete, D. Benbouzid, and B. Kégl. Fast classification using sparse decision dags. In Proceedings of the 29th International Conference on Machine Learning, 2012. [4] M. Chen, Z. Xu, K. Weinberger, O. Chapelle, and D. Kedem. Classifier cascade: Tradeoff between accuracy and feature evaluation cost. In International Conference on Artificial Intelligence and Statistics, 2012. [5] G. Dulac-Arnold, L. Denoyer, P. Preux, and P. Gallinari. Datum-wise classification: a sequential approach to sparsity. In Machine Learning and Knowledge Discovery in Databases, pages 375–390. 2011. [6] T. Gao and D. Koller. Active classification based on value of classifier. In Advances in Neural Information Processing Systems, volume 24, pages 1062–1070, 2011. [7] H. He, H. Daume III, and J. Eisner. Imitation learning by coaching. In Advances In Neural Information Processing Systems, pages 3158–3166, 2012. [8] S. Ji and L. Carin. Cost-sensitive feature acquisition and classification. Pattern Recognition, 40(5), 2007. [9] P. Kanani and P. Melville. Prediction-time active feature-value acquisition for cost-effective customer targeting. In Advances In Neural Information Processing Systems, 2008. [10] S. Karayev, M. Fritz, and T. Darrell. Dynamic feature selection for classification on a budget. In International Conference on Machine Learning: Workshop on Prediction with Sequential Models, 2013. [11] M. Kusner, W. Chen, Q. Zhou, Z. Xu, K. Weinberger, and Y. Chen. Feature-cost sensitive learning with submodular trees of classifiers. In Twenty-Eighth AAAI Conference on Artificial Intelligence, 2014. [12] J. Leskovec, A. Krause, C. Guestrin, C. Faloutsos, J. VanBriesen, and N. Glance. Cost-effective outbreak detection in networks. In International Conference on Knowledge Discovery and Data Mining, 2007. [13] L. Maaten, M. Chen, S. Tyree, and K. Q. Weinberger. Learning with marginalized corrupted features. In Proceedings of the 30th International Conference on Machine Learning, 2013. [14] F. Nan, J. Wang, and V. Saligrama. Feature-budgeted random forest. In Proceedings of the 32nd International Conference on Machine Learning, 2015. [15] F. Nan, J. Wang, K. Trapeznikov, and V. Saligrama. Fast margin-based cost-sensitive classification. In International Conference on Acoustics, Speech and Signal Processing, 2014. [16] G. Nemhauser, L. Wolsey, and M. Fisher. An analysis of approximations for maximizing submodular set functionsi. Mathematical Programming, 14(1):265–294, 1978. [17] V. S. Sheng and C. X. Ling. Feature value acquisition in testing: A sequential batch test algorithm. In Proceedings of the 23rd International Conference on Machine Learning, pages 809–816, 2006. [18] I. Steinwart. Consistency of support vector machines and other regularized kernel classifiers. Information Theory, IEEE Transactions on, 51(1):128–142, 2005. [19] K. Trapeznikov and V. Saligrama. Supervised sequential classification under budget constraints. In International Conference on Artificial Intelligence and Statistics, pages 581–589, 2013. [20] J. Wang, T. Bolukbasi, K. Trapeznikov, and V. Saligrama. Model selection by linear programming. In European Conference on Computer Vision, pages 647–662, 2014. [21] J. Wang and V. Saligrama. Local supervised learning through space partitioning. In Advances in Neural Information Processing Systems, pages 91–99. 2012. [22] J. Wang and V. Saligrama. Locally-linear learning machines (L3M). In Asian Conference on Machine Learning, pages 451–466, 2013. [23] J. Wang, K. Trapeznikov, and V. Saligrama. An lp for sequential learning under budgets. In International Conference on Artificial Intelligence and Statistics, pages 987–995, 2014. [24] Z. Xu, O. Chapelle, and K. Weinberger. The greedy miser: Learning under test-time budgets. In Proceedings of the 29th International Conference on Machine Learning, 2012. [25] Z. Xu, M. Kusner, M. Chen, and K. Weinberger. Cost-sensitive tree of classifiers. In Proceedings of the 30th International Conference on Machine Learning, pages 133–141, 2013. [26] C. Zhang and Z. Zhang. A Survey of Recent Advances in Face Detection. Technical report, Microsoft Research, 2010. 9 | 2015 | 297 |
5,810 | Finite-Time Analysis of Projected Langevin Monte Carlo S´ebastien Bubeck Microsoft Research sebubeck@microsoft.com Ronen Eldan Weizmann Institute roneneldan@gmail.com Joseph Lehec Universit´e Paris-Dauphine lehec@ceremade.dauphine.fr Abstract We analyze the projected Langevin Monte Carlo (LMC) algorithm, a close cousin of projected Stochastic Gradient Descent (SGD). We show that LMC allows to sample in polynomial time from a posterior distribution restricted to a convex body and with concave log-likelihood. This gives the first Markov chain to sample from a log-concave distribution with a first-order oracle, as the existing chains with provable guarantees (lattice walk, ball walk and hit-and-run) require a zerothorder oracle. Our proof uses elementary concepts from stochastic calculus which could be useful more generally to understand SGD and its variants. 1 Introduction A fundamental primitive in Bayesian learning is the ability to sample from the posterior distribution. Similarly to the situation in optimization, convexity is a key property to obtain algorithms with provable guarantees for this task. Indeed several Markov Chain Monte Carlo methods have been analyzed for the case where the posterior distribution is supported on a convex set, and the negative log-likelihood is convex. This is usually referred to as the problem of sampling from a log-concave distribution. In this paper we propose and analyze a new Markov chain for this problem which could have several advantages over existing chains for machine learning applications. We describe formally our contribution in Section 1.1. Then in Section 1.2 we explain how this contribution relates to various line of work in different fields such as theoretical computer science, statistics, stochastic approximation, and machine learning. 1.1 Main result Let K ⊂Rn be a convex set such that 0 ∈K, K contains a Euclidean ball of radius r > 0 and is contained in a Euclidean ball of radius R. Denote PK the Euclidean projection on K (i.e., PK(x) = argminy∈K |x −y| where | · | denotes the Euclidean norm in Rn), and ∥· ∥K the gauge of K defined by ∥x∥K = inf{t ≥0; x ∈tK}, x ∈Rn. Let f : K →R be a L-Lipschitz and β-smooth convex function, that is f is differentiable and satisfies ∀x, y ∈K, |∇f(x) −∇f(y)| ≤β|x −y|, and |∇f(x)| ≤L. We are interested in the problem of sampling from the probability measure µ on Rn whose density with respect to the Lebesgue measure is given by: dµ dx = 1 Z exp(−f(x))1{x ∈K}, where Z = Z y∈K exp(−f(y))dy. 1 We denote m = Eµ|X|, and M = E [∥θ∥K], where θ is uniform on the sphere Sn−1 = {x ∈Rn : |x| = 1}. In this paper we study the following Markov chain, which depends on a parameter η > 0, and where ξ1, ξ2, . . . is an i.i.d. sequence of standard Gaussian random variables in Rn, and X0 = 0, Xk+1 = PK Xk −η 2∇f(Xk) + √ηξk . (1) We call the chain (1) projected Langevin Monte Carlo (LMC). Recall that the total variation distance between two measures µ, ν is defined as TV(µ, ν) = supA |µ(A) −ν(A)| where the supremum is over all measurable sets A. With a slight abuse of notation we sometimes write TV(X, ν) where X is a random variable distributed according to µ. The notation vn = eO(un) (respectively eΩ) means that there exists c ∈R, C > 0 such that vn ≤Cun logc(un) (respectively ≥). Our main result shows that for an appropriately chosen step-size and number of iterations, one has convergence in total variation distance of the iterates (Xk) to the target distribution µ. Theorem 1 Let ε > 0. One has TV(XN, µ) ≤ε provided that η = 1 N m ε 2 and N = eΩ (n + RL)2(M + L/r)2nm6 max 1 ε16 n + RL r 6 , 1 ε22 βm(L + √ R) 8 !! . Note that by viewing β, L, r as numerical constants, using M ≤1/r, and assuming R ≤n and m ≤n3/4, the bound reads N = eΩ n9m6 ε22 . Observe also that if f is constant, that is µ is the uniform measure on K, then L = 0, m ≤√n, and one can show that M = eO(1/√n), which yields the bound: N = eΩ n ε2 11 . 1.2 Context and related works There is a long line of works in theoretical computer science proving results similar to Theorem 1, starting with the breakthough result of Dyer et al. [1991] who showed that the lattice walk mixes in eO(n23) steps. The current record for the mixing time is obtained by Lov´asz and Vempala [2007], who show a bound of eO(n4) for the hit-and-run walk. These chains (as well as other popular chains such as the ball walk or the Dikin walk, see e.g. Kannan and Narayanan [2012] and references therein) all require a zeroth-order oracle for the potential f, that is given x one can calculate the value f(x). On the other hand our proposed chain (1) works with a first-order oracle, that is given x one can calculate the value of ∇f(x). The difference between zeroth-order oracle and firstorder oracle has been extensively studied in the optimization literature (e.g., Nemirovski and Yudin [1983]), but it has been largely ignored in the literature on polynomial-time sampling algorithms. We also note that hit-and-run and LMC are the only chains which are rapidly mixing from any starting point (see Lov´asz and Vempala [2006]), though they have this property for seemingly very different reasons. When initialized in a corner of the convex body, hit-and-run might take a long time to take a step, but once it moves it escapes very far (while a chain such as the ball walk would only do a small step). On the other hand LMC keeps moving at every step, even when initialized in a corner, thanks for the projection part of (1). Our main motivation to study the chain (1) stems from its connection with the ubiquitous stochastic gradient descent (SGD) algorithm. In general this algorithm takes the form xk+1 = PK (xk −η∇f(xk) + εk) where ε1, ε2, . . . is a centered i.i.d. sequence. Standard results in approximation theory, such as Robbins and Monro [1951], show that if the variance of the noise Var(ε1) is of smaller order than the step-size η then the iterates (xk) converge to the minimum of f on K (for a step-size decreasing sufficiently fast as a function of the number of iterations). For the specific noise 2 sequence that we study in (1), the variance is exactly equal to the step-size, which is why the chain deviates from its standard and well-understood behavior. We also note that other regimes where SGD does not converge to the minimum of f have been studied in the optimization literature, such as the constant step-size case investigated in Pflug [1986], Bach and Moulines [2013]. The chain (1) is also closely related to a line of works in Bayesian statistics on Langevin Monte Carlo algorithms, starting essentially with Tweedie and Roberts [1996]. The focus there is on the unconstrained case, that is K = Rn. In this simpler situation, a variant of Theorem 1 was proven in the recent paper Dalalyan [2014]. The latter result is the starting point of our work. A straightforward way to extend the analysis of Dalalyan to the constrained case is to run the unconstrained chain with an additional potential that diverges quickly as the distance from x to K increases. However it seems much more natural to study directly the chain (1). Unfortunately the techniques used in Dalalyan [2014] cannot deal with the singularities in the diffusion process which are introduced by the projection. As we explain in Section 1.3 our main contribution is to develop the appropriate machinery to study (1). In the machine learning literature it was recently observed that Langevin Monte Carlo algorithms are particularly well-suited for large-scale applications because of the close connection to SGD. For instance Welling and Teh [2011] suggest to use mini-batch to compute approximate gradients instead of exact gradients in (1), and they call the resulting algorithm SGLD (Stochastic Gradient Langevin Dynamics). It is conceivable that the techniques developed in this paper could be used to analyze SGLD and its refinements introduced in Ahn et al. [2012]. We leave this as an open problem for future work. Another interesting direction for future work is to improve the polynomial dependency on the dimension and the inverse accuracy in Theorem 1 (our main goal here was to provide the simplest polynomial-time analysis). 1.3 Contribution and paper organization As we pointed out above, Dalalyan [2014] proves the equivalent of Theorem 1 in the unconstrained case. His elegant approach is based on viewing LMC as a discretization of the diffusion process dXt = dWt −1 2∇f(Xt), where (Wt) is a Brownian motion. The analysis then proceeds in two steps, by deriving first the mixing time of the diffusion process, and then showing that the discretized process is ‘close’ to its continuous version. In Dalalyan [2014] the first step is particularly transparent as he assumes α-strong convexity for the potential f, which in turns directly gives a mixing time of order 1/α. The second step is also simple once one realizes that LMC (without projection) can be viewed as the diffusion process dXt = dWt −1 2∇f(Xη⌊t η ⌋). Using Pinsker’s inequality and Girsanov’s formula it is then a short calculation to show that the total variation distance between Xt and Xt is small. The constrained case presents several challenges, arising from the reflection of the diffusion process on the boundary of K, and from the lack of curvature in the potential (indeed the constant potential case is particularly important for us as it corresponds to µ being the uniform distribution on K). Rather than a simple Brownian motion with drift, LMC with projection can be viewed as the discretization of reflected Brownian motion with drift, which is a process of the form dXt = dWt −1 2∇f(Xt)dt −νtL(dt), where Xt ∈K, ∀t ≥0, L is a measure supported on {t ≥0 : Xt ∈∂K}, and νt is an outer normal unit vector of K at Xt. The term νtL(dt) is referred to as the Tanaka drift. Following Dalalyan [2014] the analysis is again decomposed in two steps. We study the mixing time of the continuous process via a simple coupling argument, which crucially uses the convexity of K and of the potential f. The main difficulty is in showing that the discretized process (Xt) is close to the continuous version (Xt), as the Tanaka drift prevents us from a straightforward application of Girsanov’s formula. Our approach around this issue is to first use a geometric argument to prove that the two processes are close in Wasserstein distance, and then to show that in fact for a reflected Brownian motion with drift one can deduce a total variation bound from a Wasserstein bound. In this extended abstract we focus on the special case where f is a constant function, that is µ is uniform on the convex body K. The generalization to an arbitrary smooth potential can be found in the supplementary material. The rest of the paper is organized as follows. Section 2 contains the main tehcnical arguments. We first remind the reader of Tanaka’s construction (Tanaka [1979]) of reflected Brownian motion in Section 2.1. We present our geometric argument to bound the 3 Wasserstein distance between (Xt) and (Xt) in Section 2.2, and we use our coupling argument to bound the mixing time of (Xt) in Section 2.3. The derivation of a total variation bound from the Wasserstein bound is discussed in Section 2.4. Finally we conclude the paper in Section 3 with some preliminary experimental comparison between LMC and hit-and-run. 2 The constant potential case In this section we derive the main arguments to prove Theorem 1 when f is a constant function, that is ∇f = 0. For a point x ∈∂K we say that ν is an outer unit normal vector at x if |ν| = 1 and ⟨x −x′, ν⟩≥0, ∀x′ ∈K. For x /∈∂K we say that 0 is an outer unit normal at x. We define the support function hK of K by hK(y) = sup {⟨x, y⟩; x ∈K} , y ∈Rn. Note that hK is also the gauge function of the polar body of K. 2.1 The Skorokhod problem Let T ∈R+ ∪{+∞} and w: [0, T) →Rn be a piecewise continuous path with w(0) ∈K. We say that x: [0, T) →Rn and ϕ: [0, T) →Rn solve the Skorokhod problem for w if one has x(t) ∈K, ∀t ∈[0, T), x(t) = w(t) + ϕ(t), ∀t ∈[0, T), and furthermore ϕ is of the form ϕ(t) = − Z t 0 νs L(ds), ∀t ∈[0, T), where νs is an outer unit normal at x(s), and L is a measure on [0, T] supported on the set {t ∈ [0, T) : x(t) ∈∂K}. The path x is called the reflection of w at the boundary of K, and the measure L is called the local time of x at the boundary of K. Skorokhod showed the existence of such a a pair (x, ϕ) in dimension 1 in Skorokhod [1961], and Tanaka extended this result to convex sets in higher dimensions in Tanaka [1979]. Furthermore Tanaka also showed that the solution is unique, and if w is continuous then so is x and ϕ. In particular the reflected Brownian motion in K, denoted (Xt), is defined as the reflection of the standard Brownian motion (Wt) at the boundary of K (existence follows by continuity of Wt). Observe that by Itˆo’s formula, for any smooth function g on Rn, g(Xt) −g(X0) = Z t 0 ⟨∇g(Xs), dWs⟩+ 1 2 Z t 0 ∆g(Xs) ds − Z t 0 ⟨∇g(Xs), νs⟩L(ds). (2) To get a sense of what a solution typically looks like, let us work out the case where w is piecewise constant (this will also be useful to realize that LMC can be viewed as the solution to a Skorokhod problem). For a sequence g1 . . . gN ∈Rn, and for η > 0, we consider the path: w(t) = N X k=1 gk 1{t ≥kη}, t ∈[0, (N + 1)η). Define (xk)k=0,...,N inductively by x0 = 0 and xk+1 = PK(xk + gk). It is easy to verify that the solution to the Skorokhod problem for w is given by x(t) = xη⌊t η ⌋and ϕ(t) = − R t 0 νs L(ds), where the measure L is defined by (denoting δs for a dirac at s) L = N X k=1 |xk + gk −PK(xk + gk)|δkη, and for s = kη, νs = xk + gk −PK(xk + gk) |xk + gk −PK(xk + gk)|. 4 2.2 Discretization of reflected Brownian motion Given the discussion above, it is clear that when f is a constant function, the chain (1) can be viewed as the reflection (Xt) of a discretized Brownian motion W t := Wη⌊t η ⌋at the boundary of K (more precisely the value of Xkη coincides with the value of Xk as defined by (1)). It is rather clear that the discretized Brownian motion (W t) is “close” to the path (Wt), and we would like to carry this to the reflected paths (Xt) and (Xt). The following lemma extracted from Tanaka [1979] allows to do exactly that. Lemma 1 Let w and w be piecewise continuous path and assume that (x, ϕ) and (x, ϕ) solve the Skorokhod problems for w and w, respectively. Then for all time t we have |x(t) −x(t)|2 ≤|w(t) −w(t)|2 + 2 Z t 0 ⟨w(t) −w(t) −w(s) + w(s), ϕ(ds) −ϕ(ds)⟩. Applying the above lemma to the processes (Wt) and (W t) at time T = Nη yields (note that WT = W T ) |XT −XT |2 ≤−2 Z T 0 ⟨Wt −W t, νt⟩L(dt) + 2 Z T 0 ⟨Wt −W t, νt⟩L(dt) We claim that the second integral is equal to 0. Indeed, since the discretized process is constant on the intervals [kη, (k + 1)η) the local time L is a positive combination of Dirac point masses at η, 2η, . . . , Nη. On the other hand Wkη = W kη for all integer k, hence the claim. Therefore |XT −XT |2 ≤−2 Z T 0 ⟨Wt −W t, νt⟩L(dt) Using the inequality ⟨x, y⟩≤∥x∥K hK(y) we get |XT −XT |2 ≤2 sup [0,T ] ∥Wt −W T ∥K Z T 0 hK(νt) L(dt). Taking the square root, expectation and using Cauchy–Schwarz we get E |XT −XT | 2 ≤2 E " sup [0,T ] ∥Wt −W T ∥K # E "Z T 0 hK(νt) L(dt) # . (3) The next two lemmas deal with each term in the right hand side of the above equation, and they will show that there exists a universal constant C such that E |XT −XT | ≤C (η log(T/η))1/4 n3/4 T 1/2 M 1/2. (4) We discuss why the above bound implies a total variation bound in Section 2.4. Lemma 2 We have, for all t > 0 E Z t 0 hK(νs) L(ds) ≤nt 2 . Proof By Itˆo’s formula d|Xt|2 = 2⟨Xt, dWt⟩+ n dt −2⟨Xt, νt⟩L(dt). Now observe that by definition of the reflection, if t is in the support of L then ⟨Xt, νt⟩≥⟨x, νt⟩, ∀x ∈K. In other words ⟨Xt, νt⟩≥hK(νt). Therefore 2 Z t 0 hK(νs) L(ds) ≤2 Z t 0 ⟨Xs, dWs⟩+ nt + |X0|2 −|Xt|2. The first term of the right–hand side is a martingale, so using that X0 = 0 and taking expectation we get the result. 5 Lemma 3 There exists a universal constant C such that E " sup [0,T ] ∥Wt −W t∥K # ≤C M p nη log(T/η). Proof Note that E " sup [0,T ] ∥Wt −W t∥K # = E max 0≤i≤N−1 Yi where Yi = sup t∈[iη,(i+1)η) ∥Wt −Wiη∥K. Observe that the variables (Yi) are identically distributed, let p ≥1 and write E max i≤N−1 Yi ≤E N−1 X i=0 |Yi|p !1/p ≤N 1/p ∥Y0∥p. We claim that ∥Y0∥p ≤C√p n η M (5) for some constant C, and for all p ≥2. Taking this for granted and choosing p = log(N) in the previous inequality yields the result (recall that N = T/η). So it is enough to prove (5). Observe that since (Wt) is a martingale, the process Mt = ∥Wt∥K is a sub–martingale. By Doob’s maximal inequality ∥Y0∥p = ∥sup [0,η] Mt∥p ≤2∥Mη∥p, for every p ≥2. Letting γn be the standard Gaussian measure on Rn and using Khintchin’s inequality we get ∥Mη∥p = √η Z Rn ∥x∥p K γn(dx) 1/p ≤C√pη Z Rn ∥x∥K γn(dx). Lastly, integrating in polar coordinate, it is easily seen that Z Rn ∥x∥K γn(dx) ≤C√n M. 2.3 A mixing time estimate for the reflected Brownian motion Given a probability measure ν supported on K, we let νPt be the law of Xt when X0 has law ν. The following lemma is the key result to estimate the mixing time of the process (Xt). Lemma 4 Let x, x′ ∈K TV(δxPt, δx′Pt) ≤|x −x′| √ 2πt . The above result clearly implies that for a probability measure ν on K, TV(δ0Pt, νPt) ≤ R K |x| ν(dx) √ 2πt . Since µ (the uniform measure on K) is stationary for reflected Brownian motion, we obtain TV(δ0Pt, µ) ≤ m √ 2πt. (6) In other words, starting from 0, the mixing time of (Xt) is of order m2. We now turn to the proof of the above lemma. Proof The proof is based on a coupling argument. Let (Wt) be a Brownian motion starting from 0 and let (Xt) be a reflected Brownian motion starting from x: X0 = x dXt = dWt −νt L(dt) 6 where (νt) and L satisfy the appropriate conditions. We construct a reflected Brownian motion (X′ t) starting from x′ as follows. Let τ = inf{t ≥0; Xt = X′ t}, and for t < τ let St be the orthogonal reflection with respect to the hyperplane (Xt −X′ t)⊥. Then up to time τ, the process (X′ t) is defined by ( X′ 0 = x′ dX′ t = dW ′ t −ν′ t L′(dt) dW ′ t = St(dWt) where L′ is a measure supported on {t ≤τ; X′ t ∈∂K}, and ν′ t is an outer unit normal at X′ t for all such t. After time τ we just set X′ t = Xt. Since St is an orthogonal map (W ′ t) is a Brownian motion and thus (X′ t) is a reflected Brownian motion starting from x′. Therefore TV(δxPt, δx′Pt) ≤P(Xt ̸= X′ t) = P(τ > t). Observe that on [0, τ) dWt −dW ′ t = (I −St)(dWt) = 2⟨Vt, dWt⟩Vt, where Vt = Xt−X′ t |Xt−X′ t|. So d(Xt −X′ t) = 2⟨Vt, dWt⟩Vt −νt L(dt) + ν′ t L′(dt) = 2(dBt) Vt −νt L(dt) + ν′ t L′(dt), where Bt = Z t 0 ⟨Vs, dWs⟩, on [0, τ). Observe that (Bt) is a one–dimensional Brownian motion. Itˆo’s formula then gives dg(Xt −X′ t) = 2⟨∇g(Xt −X′ t), Vt⟩dBt −⟨∇g(Xt −X′ t), νt⟩L(dt) + ⟨∇g(Xt −X′ t), ν′t⟩L′(dt) + 2∇2g(Xt −X′ t)(Vt, Vt) dt, for every smooth function g on Rn. Now if g(x) = |x| then ∇g(Xt −X′ t) = Vt so ⟨∇g(Xt −X′ t), Vt⟩= 1, ⟨∇g(Xt −X′ t), νt⟩≥0 on the support of L, and ⟨∇g(Xt −X′ t), ν′ t⟩≤0 on the support of L′. Moreover ∇2g(Xt −X′ t) = 1 |Xt−Yt| P(Xt−Yt)⊥where Px⊥denotes the orthogonal projection on x⊥. In particular ∇2g(Xt −Yt)(Vt) = 0. We obtain |Xt −X′ t| ≤ |x −x′| + 2Bt, on [0, τ). Therefore P(τ > t) ≤P(τ ′ > t) where τ ′ is the first time the Brownian motion (Bt) hits the value −|x −x′|/2. Now by the reflection principle P(τ ′ > t) = 2 P (0 ≤2 Bt < |x −x′|) ≤|x −x′| √ 2πt . 2.4 From Wasserstein distance to total variation To conclude it remains to derive a total variation bound between XT and XT using (4). The details of this step are deferred to the supplementary material where we consider the case of a general logconcave distribution. The intuition goes as follows: the processes (XT +s)s≥0 and (XT +s)s≥0 both evolve according to a Brownian motion until the first time s that one process undergoes a reflection. But if T is large enough and η is small enough then one can easily get from (4) (and the fact that the uniform measure does not put too much mass close to the boundary) that XT and XT are much closer to each other than they are to the boundary of K. This implies that one can couple them (just as in Section 2.3) so that they meet before one of them hits the boundary. 3 Experiments Comparing different Markov Chain Monte Carlo algorithms is a challenging problem in and of itself. Here we choose the following simple comparison procedure based on the volume algorithm 7 developed in Cousins and Vempala [2014]. This algorithm, whose objective is to compute the volume of a given convex set K, procedes in phases. In each phase ℓit estimates the mean of a certain function under a multivariate Gaussian restricted to K with (unrestricted) covariance σℓIn. Cousins and Vempala provide a Matlab implementation of the entire algorithm, where in each phase the target mean is estimated by sampling from the truncated Gaussian using the hit-and-run (H&R) chain. We implemented the same procedure with LMC instead of H&R, and we choose the step-size η = 1/(βn2), where β is the smoothness parameter of the underlying log-concave distribution (in particular here β = 1/σ2 ℓ). The intuition for the choice of the step-size is as follows: the scaling in inverse smoothness comes from the optimization literature, while the scaling in inverse dimension squared comes from the analysis in the unconstrained case in Dalalyan [2014]. 1 2 3 4 5 6 7 8 9 10 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Estimated normalized volume Box H&R Box LMC Box and Ball H&R Box and Ball LMC 1 2 3 4 5 6 7 8 9 10 0 200 400 600 800 1000 1200 1400 1600 1800 2000 Time Box H&R Box LMC Box and Ball H&R Box and Ball LMC We ran the volume algorithm with both H&R and LMC on the following set of convex bodies: K = [−1, 1]n (referred to as the “Box”) and K = [−1, 1]n ∩ √n 2 Bn (referred to as the “Box and Ball”), where n = 10 × k, k = 1, . . . , 10. The computed volume (normalized by 2n for the “Box” and by 0.2×2n for the “Box and Ball”) as well as the clock time (in seconds) to terminate are reported in the figure above. From these experiments it seems that LMC and H&R roughly compute similar values for the volume (with H&R being slightly more accurate), and LMC is almost always a bit faster. These results are encouraging, but much more extensive experiments are needed to decide if LMC is indeed a competitor to H&R in practice. 8 References S. Ahn, A. Korattikara, and M. Welling. Bayesian posterior sampling via stochastic gradient fisher scoring. In ICML 2012, 2012. F. Bach and E. Moulines. Non-strongly-convex smooth stochastic approximation with convergence rate o(1/n). In Advances in Neural Information Processing Systems 26 (NIPS), pages 773–781. 2013. B. Cousins and S. Vempala. Bypassing kls: Gaussian cooling and an o∗(n3) volume algorithm. Arxiv preprint arXiv:1409.6011, 2014. A. Dalalyan. Theoretical guarantees for approximate sampling from smooth and log-concave densities. Arxiv preprint arXiv:1412.7392, 2014. M. Dyer, A. Frieze, and R. Kannan. A random polynomial-time algorithm for approximating the volume of convex bodies. Journal of the ACM (JACM), 38(1):1–17, 1991. R. Kannan and H. Narayanan. Random walks on polytopes and an affine interior point method for linear programming. Mathematics of Operations Research, 37:1–20, 2012. L. Lov´asz and S. Vempala. Hit-and-run from a corner. SIAM J. Comput., 35(4):985–1005, 2006. L. Lov´asz and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Structures & Algorithms, 30(3):307–358, 2007. A. Nemirovski and D. Yudin. Problem Complexity and Method Efficiency in Optimization. Wiley Interscience, 1983. G. Pflug. Stochastic minimization with constant step-size: asymptotic laws. SIAM J. Control and Optimization, 24(4):655–666, 1986. H. Robbins and S. Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22:400–407, 1951. A. Skorokhod. Stochastic equations for diffusion processes in a bounded region. Theory of Probability & Its Applications, 6(3):264–274, 1961. H. Tanaka. Stochastic differential equations with reflecting boundary condition in convex regions. Hiroshima Mathematical Journal, 9(1):163–177, 1979. L. Tweedie and G. Roberts. Exponential convergence of langevin distributions and their discrete approximations. Bernoulli, 2(4):341–363, 1996. M. Welling and Y.W. Teh. Bayesian learning via stochastic gradient langevin dynamics. In ICML 2011, 2011. 9 | 2015 | 298 |
5,811 | A Universal Catalyst for First-Order Optimization Hongzhou Lin1, Julien Mairal1 and Zaid Harchaoui1,2 1Inria 2NYU {hongzhou.lin,julien.mairal}@inria.fr zaid.harchaoui@nyu.edu Abstract We introduce a generic scheme for accelerating first-order optimization methods in the sense of Nesterov, which builds upon a new analysis of the accelerated proximal point algorithm. Our approach consists of minimizing a convex objective by approximately solving a sequence of well-chosen auxiliary problems, leading to faster convergence. This strategy applies to a large class of algorithms, including gradient descent, block coordinate descent, SAG, SAGA, SDCA, SVRG, Finito/MISO, and their proximal variants. For all of these methods, we provide acceleration and explicit support for non-strongly convex objectives. In addition to theoretical speed-up, we also show that acceleration is useful in practice, especially for ill-conditioned problems where we measure significant improvements. 1 Introduction A large number of machine learning and signal processing problems are formulated as the minimization of a composite objective function F : Rp →R: min x∈Rp n F(x) ≜f(x) + ψ(x) o , (1) where f is convex and has Lipschitz continuous derivatives with constant L and ψ is convex but may not be differentiable. The variable x represents model parameters and the role of f is to ensure that the estimated parameters fit some observed data. Specifically, f is often a large sum of functions f(x) ≜1 n n X i=1 fi(x), (2) and each term fi(x) measures the fit between x and a data point indexed by i. The function ψ in (1) acts as a regularizer; it is typically chosen to be the squared ℓ2-norm, which is smooth, or to be a non-differentiable penalty such as the ℓ1-norm or another sparsity-inducing norm [2]. Composite minimization also encompasses constrained minimization if we consider extended-valued indicator functions ψ that may take the value +∞outside of a convex set C and 0 inside (see [11]). Our goal is to accelerate gradient-based or first-order methods that are designed to solve (1), with a particular focus on large sums of functions (2). By “accelerating”, we mean generalizing a mechanism invented by Nesterov [17] that improves the convergence rate of the gradient descent algorithm. More precisely, when ψ = 0, gradient descent steps produce iterates (xk)k≥0 such that F(xk) −F ∗= O(1/k), where F ∗denotes the minimum value of F. Furthermore, when the objective F is strongly convex with constant µ, the rate of convergence becomes linear in O((1−µ/L)k). These rates were shown by Nesterov [16] to be suboptimal for the class of first-order methods, and instead optimal rates—O(1/k2) for the convex case and O((1 − p µ/L)k) for the µ-strongly convex one—could be obtained by taking gradient steps at well-chosen points. Later, this acceleration technique was extended to deal with non-differentiable regularization functions ψ [4, 19]. For modern machine learning problems involving a large sum of n functions, a recent effort has been devoted to developing fast incremental algorithms [6, 7, 14, 24, 25, 27] that can exploit the particular 1 structure of (2). Unlike full gradient approaches which require computing and averaging n gradients ∇f(x) = (1/n) Pn i=1 ∇fi(x) at every iteration, incremental techniques have a cost per-iteration that is independent of n. The price to pay is the need to store a moderate amount of information regarding past iterates, but the benefit is significant in terms of computational complexity. Main contributions. Our main achievement is a generic acceleration scheme that applies to a large class of optimization methods. By analogy with substances that increase chemical reaction rates, we call our approach a “catalyst”. A method may be accelerated if it has linear convergence rate for strongly convex problems. This is the case for full gradient [4, 19] and block coordinate descent methods [18, 21], which already have well-known accelerated variants. More importantly, it also applies to incremental algorithms such as SAG [24], SAGA [6], Finito/MISO [7, 14], SDCA [25], and SVRG [27]. Whether or not these methods could be accelerated was an important open question. It was only known to be the case for dual coordinate ascent approaches such as SDCA [26] or SDPC [28] for strongly convex objectives. Our work provides a universal positive answer regardless of the strong convexity of the objective, which brings us to our second achievement. Some approaches such as Finito/MISO, SDCA, or SVRG are only defined for strongly convex objectives. A classical trick to apply them to general convex functions is to add a small regularization ε∥x∥2 [25]. The drawback of this strategy is that it requires choosing in advance the parameter ε, which is related to the target accuracy. A consequence of our work is to automatically provide a direct support for non-strongly convex objectives, thus removing the need of selecting ε beforehand. Other contribution: Proximal MISO. The approach Finito/MISO, which was proposed in [7] and [14], is an incremental technique for solving smooth unconstrained µ-strongly convex problems when n is larger than a constant βL/µ (with β = 2 in [14]). In addition to providing acceleration and support for non-strongly convex objectives, we also make the following specific contributions: • we extend the method and its convergence proof to deal with the composite problem (1); • we fix the method to remove the “big data condition” n ≥βL/µ. The resulting algorithm can be interpreted as a variant of proximal SDCA [25] with a different step size and a more practical optimality certificate—that is, checking the optimality condition does not require evaluating a dual objective. Our construction is indeed purely primal. Neither our proof of convergence nor the algorithm use duality, while SDCA is originally a dual ascent technique. Related work. The catalyst acceleration can be interpreted as a variant of the proximal point algorithm [3, 9], which is a central concept in convex optimization, underlying augmented Lagrangian approaches, and composite minimization schemes [5, 20]. The proximal point algorithm consists of solving (1) by minimizing a sequence of auxiliary problems involving a quadratic regularization term. In general, these auxiliary problems cannot be solved with perfect accuracy, and several notations of inexactness were proposed, including [9, 10, 22]. The catalyst approach hinges upon (i) an acceleration technique for the proximal point algorithm originally introduced in the pioneer work [9]; (ii) a more practical inexactness criterion than those proposed in the past.1 As a result, we are able to control the rate of convergence for approximately solving the auxiliary problems with an optimization method M. In turn, we are also able to obtain the computational complexity of the global procedure for solving (1), which was not possible with previous analysis [9, 10, 22]. When instantiated in different first-order optimization settings, our analysis yields systematic acceleration. Beyond [9], several works have inspired this paper. In particular, accelerated SDCA [26] is an instance of an inexact accelerated proximal point algorithm, even though this was not explicitly stated in [26]. Their proof of convergence relies on different tools than ours. Specifically, we use the concept of estimate sequence from Nesterov [17], whereas the direct proof of [26], in the context of SDCA, does not extend to non-strongly convex objectives. Nevertheless, part of their analysis proves to be helpful to obtain our main results. Another useful methodological contribution was the convergence analysis of inexact proximal gradient methods of [23]. Finally, similar ideas appear in the independent work [8]. Their results overlap in part with ours, but both papers adopt different directions. Our analysis is for instance more general and provides support for non-strongly convex objectives. Another independent work with related results is [13], which introduce an accelerated method for the minimization of finite sums, which is not based on the proximal point algorithm. 1Note that our inexact criterion was also studied, among others, in [22], but the analysis of [22] led to the conjecture that this criterion was too weak to warrant acceleration. Our analysis refutes this conjecture. 2 2 The Catalyst Acceleration We present here our generic acceleration scheme, which can operate on any first-order or gradientbased optimization algorithm with linear convergence rate for strongly convex objectives. Linear convergence and acceleration. Consider the problem (1) with a µ-strongly convex function F, where the strong convexity is defined with respect to the ℓ2-norm. A minimization algorithm M, generating the sequence of iterates (xk)k≥0, has a linear convergence rate if there exists τM,F in (0, 1) and a constant CM,F in R such that F(xk) −F ∗≤CM,F (1 −τM,F )k, (3) where F ∗denotes the minimum value of F. The quantity τM,F controls the convergence rate: the larger is τM,F , the faster is convergence to F ∗. However, for a given algorithm M, the quantity τM,F depends usually on the ratio L/µ, which is often called the condition number of F. The catalyst acceleration is a general approach that allows to wrap algorithm M into an accelerated algorithm A, which enjoys a faster linear convergence rate, with τA,F ≥τM,F . As we will also see, the catalyst acceleration may also be useful when F is not strongly convex—that is, when µ = 0. In that case, we may even consider a method M that requires strong convexity to operate, and obtain an accelerated algorithm A that can minimize F with near-optimal convergence rate ˜O(1/k2).2 Our approach can accelerate a wide range of first-order optimization algorithms, starting from classical gradient descent. It also applies to randomized algorithms such as SAG, SAGA, SDCA, SVRG and Finito/MISO, whose rates of convergence are given in expectation. Such methods should be contrasted with stochastic gradient methods [15, 12], which minimize a different non-deterministic function. Acceleration of stochastic gradient methods is beyond the scope of this work. Catalyst action. We now highlight the mechanics of the catalyst algorithm, which is presented in Algorithm 1. It consists of replacing, at iteration k, the original objective function F by an auxiliary objective Gk, close to F up to a quadratic term: Gk(x) ≜F(x) + κ 2 ∥x −yk−1∥2, (4) where κ will be specified later and yk is obtained by an extrapolation step described in (6). Then, at iteration k, the accelerated algorithm A minimizes Gk up to accuracy εk. Substituting (4) to (1) has two consequences. On the one hand, minimizing (4) only provides an approximation of the solution of (1), unless κ = 0; on the other hand, the auxiliary objective Gk enjoys a better condition number than the original objective F, which makes it easier to minimize. For instance, when M is the regular gradient descent algorithm with ψ = 0, M has the rate of convergence (3) for minimizing F with τM,F = µ/L. However, owing to the additional quadratic term, Gk can be minimized by M with the rate (3) where τM,Gk = (µ + κ)/(L + κ) > τM,F . In practice, there exists an “optimal” choice for κ, which controls the time required by M for solving the auxiliary problems (4), and the quality of approximation of F by the functions Gk. This choice will be driven by the convergence analysis in Sec. 3.1-3.3; see also Sec. C for special cases. Acceleration via extrapolation and inexact minimization. Similar to the classical gradient descent scheme of Nesterov [17], Algorithm 1 involves an extrapolation step (6). As a consequence, the solution of the auxiliary problem (5) at iteration k +1 is driven towards the extrapolated variable yk. As shown in [9], this step is in fact sufficient to reduce the number of iterations of Algorithm 1 to solve (1) when εk = 0—that is, for running the exact accelerated proximal point algorithm. Nevertheless, to control the total computational complexity of an accelerated algorithm A, it is necessary to take into account the complexity of solving the auxiliary problems (5) using M. This is where our approach differs from the classical proximal point algorithm of [9]. Essentially, both algorithms are the same, but we use the weaker inexactness criterion Gk(xk) −G∗ k ≤εk, where the sequence (εk)k≥0 is fixed beforehand, and only depends on the initial point. This subtle difference has important consequences: (i) in practice, this condition can often be checked by computing duality gaps; (ii) in theory, the methods M we consider have linear convergence rates, which allows us to control the complexity of step (5), and then to provide the computational complexity of A. 2In this paper, we use the notation O(.) to hide constants. The notation ˜O(.) also hides logarithmic factors. 3 Algorithm 1 Catalyst input initial estimate x0 ∈Rp, parameters κ and α0, sequence (εk)k≥0, optimization method M; 1: Initialize q = µ/(µ + κ) and y0 = x0; 2: while the desired stopping criterion is not satisfied do 3: Find an approximate solution of the following problem using M xk ≈arg min x∈Rp n Gk(x) ≜F(x) + κ 2 ∥x −yk−1∥2o such that Gk(xk) −G∗ k ≤εk. (5) 4: Compute αk ∈(0, 1) from equation α2 k = (1 −αk)α2 k−1 + qαk; 5: Compute yk = xk + βk(xk −xk−1) with βk = αk−1(1 −αk−1) α2 k−1 + αk . (6) 6: end while output xk (final estimate). 3 Convergence Analysis In this section, we present the theoretical properties of Algorithm 1, for optimization methods M with deterministic convergence rates of the form (3). When the rate is given as an expectation, a simple extension of our analysis described in Section 4 is needed. For space limitation reasons, we shall sketch the proof mechanics here, and defer the full proofs to Appendix B. 3.1 Analysis for µ-Strongly Convex Objective Functions We first analyze the convergence rate of Algorithm 1 for solving problem 1, regardless of the complexity required to solve the subproblems (5). We start with the µ-strongly convex case. Theorem 3.1 (Convergence of Algorithm 1, µ-Strongly Convex Case). Choose α0 = √q with q = µ/(µ + κ) and εk = 2 9(F(x0) −F ∗)(1 −ρ)k with ρ < √q. Then, Algorithm 1 generates iterates (xk)k≥0 such that F(xk) −F ∗≤C(1 −ρ)k+1(F(x0) −F ∗) with C = 8 (√q −ρ)2 . (7) This theorem characterizes the linear convergence rate of Algorithm 1. It is worth noting that the choice of ρ is left to the discretion of the user, but it can safely be set to ρ = 0.9√q in practice. The choice α0 = √q was made for convenience purposes since it leads to a simplified analysis, but larger values are also acceptable, both from theoretical and practical point of views. Following an advice from Nesterov[17, page 81] originally dedicated to his classical gradient descent algorithm, we may for instance recommend choosing α0 such that α2 0 + (1 −q)α0 −1 = 0. The choice of the sequence (εk)k≥0 is also subject to discussion since the quantity F(x0) −F ∗is unknown beforehand. Nevertheless, an upper bound may be used instead, which will only affects the corresponding constant in (7). Such upper bounds can typically be obtained by computing a duality gap at x0, or by using additional knowledge about the objective. For instance, when F is non-negative, we may simply choose εk = (2/9)F(x0)(1 −ρ)k. The proof of convergence uses the concept of estimate sequence invented by Nesterov [17], and introduces an extension to deal with the errors (εk)k≥0. To control the accumulation of errors, we borrow the methodology of [23] for inexact proximal gradient algorithms. Our construction yields a convergence result that encompasses both strongly convex and non-strongly convex cases. Note that estimate sequences were also used in [9], but, as noted by [22], the proof of [9] only applies when using an extrapolation step (6) that involves the true minimizer of (5), which is unknown in practice. To obtain a rigorous convergence result like (7), a different approach was needed. 4 Theorem 3.1 is important, but it does not provide yet the global computational complexity of the full algorithm, which includes the number of iterations performed by M for approximately solving the auxiliary problems (5). The next proposition characterizes the complexity of this inner-loop. Proposition 3.2 (Inner-Loop Complexity, µ-Strongly Convex Case). Under the assumptions of Theorem 3.1, let us consider a method M generating iterates (zt)t≥0 for minimizing the function Gk with linear convergence rate of the form Gk(zt) −G∗ k ≤A(1 −τM)t(Gk(z0) −G∗ k). (8) When z0 = xk−1, the precision εk is reached with a number of iterations TM = ˜O(1/τM), where the notation ˜O hides some universal constants and some logarithmic dependencies in µ and κ. This proposition is generic since the assumption (8) is relatively standard for gradient-based methods [17]. It may now be used to obtain the global rate of convergence of an accelerated algorithm. By calling Fs the objective function value obtained after performing s = kTM iterations of the method M, the true convergence rate of the accelerated algorithm A is Fs −F ∗= F x s TM −F ∗≤C(1 −ρ) s TM (F(x0) −F ∗) ≤C 1 − ρ TM s (F(x0) −F ∗). (9) As a result, algorithm A has a global linear rate of convergence with parameter τA,F = ρ/TM = ˜O(τM √µ/√µ + κ), where τM typically depends on κ (the greater, the faster is M). Consequently, κ will be chosen to maximize the ratio τM/√µ + κ. Note that for other algorithms M that do not satisfy (8), additional analysis and possibly a different initialization z0 may be necessary (see Appendix D for example). 3.2 Convergence Analysis for Convex but Non-Strongly Convex Objective Functions We now state the convergence rate when the objective is not strongly convex, that is when µ = 0. Theorem 3.3 (Convergence of Algorithm 1, Convex, but Non-Strongly Convex Case). When µ = 0, choose α0 = ( √ 5 −1)/2 and εk = 2(F(x0) −F ∗) 9(k + 2)4+η with η > 0. (10) Then, Algorithm 1 generates iterates (xk)k≥0 such that F(xk) −F ∗≤ 8 (k + 2)2 1 + 2 η 2 (F(x0) −F ∗) + κ 2 ∥x0 −x∗∥2 ! . (11) This theorem is the counter-part of Theorem 3.1 when µ = 0. The choice of η is left to the discretion of the user; it empirically seem to have very low influence on the global convergence speed, as long as it is chosen small enough (e.g., we use η = 0.1 in practice). It shows that Algorithm 1 achieves the optimal rate of convergence of first-order methods, but it does not take into account the complexity of solving the subproblems (5). Therefore, we need the following proposition: Proposition 3.4 (Inner-Loop Complexity, Non-Strongly Convex Case). Assume that F has bounded level sets. Under the assumptions of Theorem 3.3, let us consider a method M generating iterates (zt)t≥0 for minimizing the function Gk with linear convergence rate of the form (8). Then, there exists TM = ˜O(1/τM), such that for any k ≥1, solving Gk with initial point xk−1 requires at most TM log(k + 2) iterations of M. We can now draw up the global complexity of an accelerated algorithm A when M has a linear convergence rate (8) for κ-strongly convex objectives. To produce xk, M is called at most kTM log(k + 2) times. Using the global iteration counter s = kTM log(k + 2), we get Fs −F ∗≤8T 2 M log2(s) s2 1 + 2 η 2 (F(x0) −F ∗) + κ 2 ∥x0 −x∗∥2 ! . (12) If M is a first-order method, this rate is near-optimal, up to a logarithmic factor, when compared to the optimal rate O(1/s2), which may be the price to pay for using a generic acceleration scheme. 5 4 Acceleration in Practice We show here how to accelerate existing algorithms M and compare the convergence rates obtained before and after catalyst acceleration. For all the algorithms we consider, we study rates of convergence in terms of total number of iterations (in expectation, when necessary) to reach accuracy ε. We first show how to accelerate full gradient and randomized coordinate descent algorithms [21]. Then, we discuss other approaches such as SAG [24], SAGA [6], or SVRG [27]. Finally, we present a new proximal version of the incremental gradient approaches Finito/MISO [7, 14], along with its accelerated version. Table 4.1 summarizes the acceleration obtained for the algorithms considered. Deriving the global rate of convergence. The convergence rate of an accelerated algorithm A is driven by the parameter κ. In the strongly convex case, the best choice is the one that maximizes the ratio τM,Gk/√µ + κ. As discussed in Appendix C, this rule also holds when (8) is given in expectation and in many cases where the constant CM,Gk is different than A(Gk(z0)−G∗ k) from (8). When µ = 0, the choice of κ > 0 only affects the complexity by a multiplicative constant. A rule of thumb is to maximize the ratio τM,Gk/ √ L + κ (see Appendix C for more details). After choosing κ, the global iteration-complexity is given by Comp ≤kinkout, where kin is an upperbound on the number of iterations performed by M per inner-loop, and kout is the upper-bound on the number of outer-loop iterations, following from Theorems 3.1-3.3. Note that for simplicity, we always consider that L ≫µ such that we may write L −µ simply as “L” in the convergence rates. 4.1 Acceleration of Existing Algorithms Composite minimization. Most of the algorithms we consider here, namely the proximal gradient method [4, 19], SAGA [6], (Prox)-SVRG [27], can handle composite objectives with a regularization penalty ψ that admits a proximal operator proxψ, defined for any z as proxψ(z) ≜arg min y∈Rp ψ(y) + 1 2∥y −z∥2 . Table 4.1 presents convergence rates that are valid for proximal and non-proximal settings, since most methods we consider are able to deal with such non-differentiable penalties. The exception is SAG [24], for which proximal variants are not analyzed. The incremental method Finito/MISO has also been limited to non-proximal settings so far. In Section 4.2, we actually introduce the extension of MISO to composite minimization, and establish its theoretical convergence rates. Full gradient method. A first illustration is the algorithm obtained when accelerating the regular “full” gradient descent (FG), and how it contrasts with Nesterov’s accelerated variant (AFG). Here, the optimal choice for κ is L −2µ. In the strongly convex case, we get an accelerated rate of convergence in ˜O(n p L/µ log(1/ε)), which is the same as AFG up to logarithmic terms. A similar result can also be obtained for randomized coordinate descent methods [21]. Randomized incremental gradient. We now consider randomized incremental gradient methods, resp. SAG [24] and SAGA [6]. When µ > 0, we focus on the “ill-conditioned” setting n ≤L/µ, where these methods have the complexity O((L/µ) log(1/ε)). Otherwise, their complexity becomes O(n log(1/ε)), which is independent of the condition number and seems theoretically optimal [1]. For these methods, the best choice for κ has the form κ = a(L −µ)/(n + b) −µ, with (a, b) = (2, −2) for SAG, (a, b) = (1/2, 1/2) for SAGA. A similar formula, with a constant L′ in place of L, holds for SVRG; we omit it here for brevity. SDCA [26] and Finito/MISO [7, 14] are actually related to incremental gradient methods, and the choice for κ has a similar form with (a, b) = (1, 1). 4.2 Proximal MISO and its Acceleration Finito/MISO was proposed in [7] and [14] for solving the problem (1) when ψ = 0 and when f is a sum of n µ-strongly convex functions fi as in (2), which are also differentiable with L-Lipschitz derivatives. The algorithm maintains a list of quadratic lower bounds—say (dk i )n i=1 at iteration k— of the functions fi and randomly updates one of them at each iteration by using strong-convexity 6 Comp. µ > 0 Comp. µ = 0 Catalyst µ > 0 Catalyst µ = 0 FG O n L µ log 1 ε O n L ε ˜O n q L µ log 1 ε ˜O n L √ε SAG [24] O L µ log 1 ε ˜O q nL µ log 1 ε SAGA [6] Finito/MISO-Prox not avail. SDCA [25] SVRG [27] O L′ µ log 1 ε ˜O q nL′ µ log 1 ε Acc-FG [19] O n q L µ log 1 ε O n L √ε no acceleration Acc-SDCA [26] ˜O q nL µ log 1 ε not avail. Table 1: Comparison of rates of convergence, before and after the catalyst acceleration, resp. in the strongly-convex and non strongly-convex cases. To simplify, we only present the case where n ≤L/µ when µ > 0. For all incremental algorithms, there is indeed no acceleration otherwise. The quantity L′ for SVRG is the average Lipschitz constant of the functions fi (see [27]). inequalities. The current iterate xk is then obtained by minimizing the lower-bound of the objective xk = arg min x∈Rp ( Dk(x) = 1 n n X i=1 dk i (x) ) . (13) Interestingly, since Dk is a lower-bound of F we also have Dk(xk) ≤F ∗, and thus the quantity F(xk) −Dk(xk) can be used as an optimality certificate that upper-bounds F(xk) −F ∗. Furthermore, this certificate was shown to converge to zero with a rate similar to SAG/SDCA/SVRG/SAGA under the condition n ≥2L/µ. In this section, we show how to remove this condition and how to provide support to non-differentiable functions ψ whose proximal operator can be easily computed. We shall briefly sketch the main ideas, and we refer to Appendix D for a thorough presentation. The first idea to deal with a nonsmooth regularizer ψ is to change the definition of Dk: Dk(x) = 1 n n X i=1 dk i (x) + ψ(x), which was also proposed in [7] without a convergence proof. Then, because the dk i ’s are quadratic functions, the minimizer xk of Dk can be obtained by computing the proximal operator of ψ at a particular point. The second idea to remove the condition n ≥2L/µ is to modify the update of the lower bounds dk i . Assume that index ik is selected among {1, . . . , n} at iteration k, then dk i (x) = (1 −δ)dk−1 i (x)+ δ(fi(xk−1)+⟨∇fi(xk−1), x −xk−1⟩+ µ 2 ∥x −xk−1∥2) if i = ik dk−1 i (x) otherwise Whereas the original Finito/MISO uses δ = 1, our new variant uses δ = min(1, µn/2(L −µ)). The resulting algorithm turns out to be very close to variant “5” of proximal SDCA [25], which corresponds to using a different value for δ. The main difference between SDCA and MISOProx is that the latter does not use duality. It also provides a different (simpler) optimality certificate F(xk) −Dk(xk), which is guaranteed to converge linearly, as stated in the next theorem. Theorem 4.1 (Convergence of MISO-Prox). Let (xk)k≥0 be obtained by MISO-Prox, then E[F(xk)] −F ∗≤1 τ (1 −τ)k+1 (F(x0) −D0(x0)) with τ ≥min n µ 4L, 1 2n o . (14) Furthermore, we also have fast convergence of the certificate E[F(xk) −Dk(xk)] ≤1 τ (1 −τ)k (F ∗−D0(x0)) . The proof of convergence is given in Appendix D. Finally, we conclude this section by noting that MISO-Prox enjoys the catalyst acceleration, leading to the iteration-complexity presented in Table 4.1. Since the convergence rate (14) does not have exactly the same form as (8), Propositions 3.2 and 3.4 cannot be used and additional analysis, given in Appendix D, is needed. Practical forms of the algorithm are also presented there, along with discussions on how to initialize it. 7 5 Experiments We evaluate the Catalyst acceleration on three methods that have never been accelerated in the past: SAG [24], SAGA [6], and MISO-Prox. We focus on ℓ2-regularized logistic regression, where the regularization parameter µ yields a lower bound on the strong convexity parameter of the problem. We use three datasets used in [14], namely real-sim, rcv1, and ocr, which are relatively large, with up to n = 2 500 000 points for ocr and p = 47 152 variables for rcv1. We consider three regimes: µ = 0 (no regularization), µ/L = 0.001/n and µ/L = 0.1/n, which leads significantly larger condition numbers than those used in other studies (µ/L ≈1/n in [14, 24]). We compare MISO, SAG, and SAGA with their default parameters, which are recommended by their theoretical analysis (step-sizes 1/L for SAG and 1/3L for SAGA), and study several accelerated variants. The values of κ and ρ and the sequences (εk)k≥0 are those suggested in the previous sections, with η=0.1 in (10). Other implementation details are presented in Appendix E. The restarting strategy for M is key to achieve acceleration in practice. All of the methods we compare store n gradients evaluated at previous iterates of the algorithm. We always use the gradients from the previous run of M to initialize a new one. We detail in Appendix E the initialization for each method. Finally, we evaluated a heuristic that constrain M to always perform at most n iterations (one pass over the data); we call this variant AMISO2 for MISO whereas AMISO1 refers to the regular “vanilla” accelerated variant, and we also use this heuristic to accelerate SAG. The results are reported in Table 1. We always obtain a huge speed-up for MISO, which suffers from numerical stability issues when the condition number is very large (for instance, µ/L = 10−3/n = 4.10−10 for ocr). Here, not only does the catalyst algorithm accelerate MISO, but it also stabilizes it. Whereas MISO is slower than SAG and SAGA in this “small µ” regime, AMISO2 is almost systematically the best performer. We are also able to accelerate SAG and SAGA in general, even though the improvement is less significant than for MISO. In particular, SAGA without acceleration proves to be the best method on ocr. One reason may be its ability to adapt to the unknown strong convexity parameter µ′ ≥µ of the objective near the solution. When µ′/L ≥1/n, we indeed obtain a regime where acceleration does not occur (see Sec. 4). Therefore, this experiment suggests that adaptivity to unknown strong convexity is of high interest for incremental optimization. 0 50 100 150 200 4 6 8 10 12 x 10 −3 #Passes, Dataset real-sim, µ = 0 Objective function 0 100 200 300 400 500 10 −8 10 −6 10 −4 10 −2 10 0 #Passes, Dataset real-sim, µ/L = 10−3/n Relative duality gap 0 100 200 300 400 500 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 #Passes, Dataset real-sim, µ/L = 10−1/n Relative duality gap MISO AMISO1 AMISO2 SAG ASAG SAGA ASAGA 0 20 40 60 80 100 0.096 0.098 0.1 0.102 0.104 #Passes, Dataset rcv1, µ = 0 Objective function 0 20 40 60 80 100 10 −4 10 −2 10 0 #Passes, Dataset rcv1, µ/L = 10−3/n Relative duality gap 0 20 40 60 80 100 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 #Passes, Dataset rcv1, µ/L = 10−1/n Relative duality gap 0 5 10 15 20 25 0.4957 0.4958 0.4959 0.496 #Passes, Dataset ocr, µ = 0 Objective function 0 5 10 15 20 25 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 #Passes, Dataset ocr, µ/L = 10−3/n Relative duality gap 0 5 10 15 20 25 10 −10 10 −8 10 −6 10 −4 10 −2 10 0 #Passes, Dataset ocr, µ/L = 10−1/n Relative duality gap Figure 1: Objective function value (or duality gap) for different number of passes performed over each dataset. The legend for all curves is on the top right. AMISO, ASAGA, ASAG refer to the accelerated variants of MISO, SAGA, and SAG, respectively. Acknowledgments This work was supported by ANR (MACARON ANR-14-CE23-0003-01), MSR-Inria joint centre, CNRS-Mastodons program (Titan), and NYU Moore-Sloan Data Science Environment. 8 References [1] A. Agarwal and L. Bottou. A lower bound for the optimization of finite sums. In Proc. International Conference on Machine Learning (ICML), 2015. [2] F. Bach, R. Jenatton, J. Mairal, and G. Obozinski. Optimization with sparsity-inducing penalties. Foundations and Trends in Machine Learning, 4(1):1–106, 2012. [3] H. H. Bauschke and P. L. Combettes. Convex Analysis and Monotone Operator Theory in Hilbert Spaces. Springer, 2011. [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] D. P. Bertsekas. Convex Optimization Algorithms. Athena Scientific, 2015. [6] A. J. Defazio, F. Bach, and S. Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In Adv. Neural Information Processing Systems (NIPS), 2014. [7] A. J. Defazio, T. S. Caetano, and J. Domke. Finito: A faster, permutable incremental gradient method for big data problems. In Proc. International Conference on Machine Learning (ICML), 2014. [8] R. Frostig, R. Ge, S. M. Kakade, and A. Sidford. Un-regularizing: approximate proximal point algorithms for empirical risk minimization. In Proc. International Conference on Machine Learning (ICML), 2015. [9] O. G¨uler. New proximal point algorithms for convex minimization. SIAM Journal on Optimization, 2(4):649–664, 1992. [10] B. He and X. Yuan. An accelerated inexact proximal point algorithm for convex minimization. Journal of Optimization Theory and Applications, 154(2):536–548, 2012. [11] J.-B. Hiriart-Urruty and C. Lemar´echal. Convex Analysis and Minimization Algorithms I. Springer, 1996. [12] A. Juditsky and A. Nemirovski. First order methods for nonsmooth convex large-scale optimization. Optimization for Machine Learning, MIT Press, 2012. [13] G. Lan. An optimal randomized incremental gradient method. arXiv:1507.02000, 2015. [14] J. Mairal. Incremental majorization-minimization optimization with application to large-scale machine learning. SIAM Journal on Optimization, 25(2):829–855, 2015. [15] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [16] Y. Nesterov. A method of solving a convex programming problem with convergence rate O(1/k2). Soviet Mathematics Doklady, 27(2):372–376, 1983. [17] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer, 2004. [18] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [19] Y. Nesterov. Gradient methods for minimizing composite functions. Mathematical Programming, 140(1):125–161, 2013. [20] N. Parikh and S.P. Boyd. Proximal algorithms. Foundations and Trends in Optimization, 1(3):123–231, 2014. [21] 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-2):1–38, 2014. [22] S. Salzo and S. Villa. Inexact and accelerated proximal point algorithms. Journal of Convex Analysis, 19(4):1167–1192, 2012. [23] M. Schmidt, N. Le Roux, and F. Bach. Convergence rates of inexact proximal-gradient methods for convex optimization. In Adv. Neural Information Processing Systems (NIPS), 2011. [24] M. Schmidt, N. Le Roux, and F. Bach. Minimizing finite sums with the stochastic average gradient. arXiv:1309.2388, 2013. [25] S. Shalev-Shwartz and T. Zhang. Proximal stochastic dual coordinate ascent. arXiv:1211.2717, 2012. [26] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. Mathematical Programming, 2015. [27] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 24(4):2057–2075, 2014. [28] Y. Zhang and L. Xiao. Stochastic primal-dual coordinate method for regularized empirical risk minimization. In Proc. International Conference on Machine Learning (ICML), 2015. 9 | 2015 | 299 |
5,812 | Policy Gradient for Coherent Risk Measures Aviv Tamar UC Berkeley avivt@berkeley.edu Yinlam Chow Stanford University ychow@stanford.edu Mohammad Ghavamzadeh Adobe Research & INRIA mohammad.ghavamzadeh@inria.fr Shie Mannor Technion shie@ee.technion.ac.il Abstract Several authors have recently developed risk-sensitive policy gradient methods that augment the standard expected cost minimization problem with a measure of variability in cost. These studies have focused on specific risk-measures, such as the variance or conditional value at risk (CVaR). In this work, we extend the policy gradient method to the whole class of coherent risk measures, which is widely accepted in finance and operations research, among other fields. We consider both static and time-consistent dynamic risk measures. For static risk measures, our approach is in the spirit of policy gradient algorithms and combines a standard sampling approach with convex programming. For dynamic risk measures, our approach is actor-critic style and involves explicit approximation of value function. Most importantly, our contribution presents a unified approach to risk-sensitive reinforcement learning that generalizes and extends previous results. 1 Introduction Risk-sensitive optimization considers problems in which the objective involves a risk measure of the random cost, in contrast to the typical expected cost objective. Such problems are important when the decision-maker wishes to manage the variability of the cost, in addition to its expected outcome, and are standard in various applications of finance and operations research. In reinforcement learning (RL) [27], risk-sensitive objectives have gained popularity as a means to regularize the variability of the total (discounted) cost/reward in a Markov decision process (MDP). Many risk objectives have been investigated in the literature and applied to RL, such as the celebrated Markowitz mean-variance model [16], Value-at-Risk (VaR) and Conditional Value at Risk (CVaR) [18, 29, 21, 10, 8, 30]. The view taken in this paper is that the preference of one risk measure over another is problem-dependent and depends on factors such as the cost distribution, sensitivity to rare events, ease of estimation from data, and computational tractability of the optimization problem. However, the highly influential paper of Artzner et al. [2] identified a set of natural properties that are desirable for a risk measure to satisfy. Risk measures that satisfy these properties are termed coherent and have obtained widespread acceptance in financial applications, among others. We focus on such coherent measures of risk in this work. For sequential decision problems, such as MDPs, another desirable property of a risk measure is time consistency. A time-consistent risk measure satisfies a “dynamic programming” style property: if a strategy is risk-optimal for an n-stage problem, then the component of the policy from the t-th time until the end (where t < n) is also risk-optimal (see principle of optimality in [5]). The recently proposed class of dynamic Markov coherent risk measures [24] satisfies both the coherence and time consistency properties. In this work, we present policy gradient algorithms for RL with a coherent risk objective. Our approach applies to the whole class of coherent risk measures, thereby generalizing and unifying previous approaches that have focused on individual risk measures. We consider both static coherent 1 risk of the total discounted return from an MDP and time-consistent dynamic Markov coherent risk. Our main contribution is formulating the risk-sensitive policy-gradient under the coherent-risk framework. More specifically, we provide: • A new formula for the gradient of static coherent risk that is convenient for approximation using sampling. • An algorithm for the gradient of general static coherent risk that involves sampling with convex programming and a corresponding consistency result. • A new policy gradient theorem for Markov coherent risk, relating the gradient to a suitable value function and a corresponding actor-critic algorithm. Several previous results are special cases of the results presented here; our approach allows to rederive them in greater generality and simplicity. Related Work Risk-sensitive optimization in RL for specific risk functions has been studied recently by several authors. [6] studied exponential utility functions, [18], [29], [21] studied meanvariance models, [8], [30] studied CVaR in the static setting, and [20], [9] studied dynamic coherent risk for systems with linear dynamics. Our paper presents a general method for the whole class of coherent risk measures (both static and dynamic) and is not limited to a specific choice within that class, nor to particular system dynamics. Reference [19] showed that an MDP with a dynamic coherent risk objective is essentially a robust MDP. The planning for large scale MDPs was considered in [31], using an approximation of the value function. For many problems, approximation in the policy space is more suitable (see, e.g., [15]). Our sampling-based RL-style approach is suitable for approximations both in the policy and value function, and scales-up to large or continuous MDPs. We do, however, make use of a technique of [31] in a part of our method. Optimization of coherent risk measures was thoroughly investigated by Ruszczynski and Shapiro [25] (see also [26]) for the stochastic programming case in which the policy parameters do not affect the distribution of the stochastic system (i.e., the MDP trajectory), but only the reward function, and thus, this approach is not suitable for most RL problems. For the case of MDPs and dynamic risk, [24] proposed a dynamic programming approach. This approach does not scale-up to large MDPs, due to the “curse of dimensionality”. For further motivation of risk-sensitive policy gradient methods, we refer the reader to [18, 29, 21, 8, 30]. 2 Preliminaries Consider a probability space (Ω, F, Pθ), where Ωis the set of outcomes (sample space), F is a σ-algebra over Ωrepresenting the set of events we are interested in, and Pθ ∈B, where B := ξ : R ω∈Ωξ(ω) = 1, ξ ≥0 is the set of probability distributions, is a probability measure over F parameterized by some tunable parameter θ ∈RK. In the following, we suppress the notation of θ in θ-dependent quantities. To ease the technical exposition, in this paper we restrict our attention to finite probability spaces, i.e., Ωhas a finite number of elements. Our results can be extended to the Lp-normed spaces without loss of generality, but the details are omitted for brevity. Denote by Z the space of random variables Z : Ω7→(−∞, ∞) defined over the probability space (Ω, F, Pθ). In this paper, a random variable Z ∈Z is interpreted as a cost, i.e., the smaller the realization of Z, the better. For Z, W ∈Z, we denote by Z ≤W the point-wise partial order, i.e., Z(ω) ≤W(ω) for all ω ∈Ω. We denote by Eξ[Z] .= P ω∈ΩPθ(ω)ξ(ω)Z(ω) a ξ-weighted expectation of Z. An MDP is a tuple M = (X, A, C, P, γ, x0), where X and A are the state and action spaces; C(x) ∈[−Cmax, Cmax] is a bounded, deterministic, and state-dependent cost; P(·|x, a) is the transition probability distribution; γ is a discount factor; and x0 is the initial state.1 Actions are chosen according to a θ-parameterized stationary Markov2 policy µθ(·|x). We denote by x0, a0, . . . , xT , aT a trajectory of length T drawn by following the policy µθ in the MDP. 1Our results may easily be extended to random costs, state-action dependent costs, and random initial states. 2For Markov coherent risk, the class of optimal policies is stationary Markov [24], while this is not necessarily true for static risk. Our results can be extended to history-dependent policies or stationary Markov 2 2.1 Coherent Risk Measures A risk measure is a function ρ : Z →R that maps an uncertain outcome Z to the extended real line R ∪{+∞, −∞}, e.g., the expectation E [Z] or the conditional value-at-risk (CVaR) minν∈R ν + 1 αE (Z −ν)+ . A risk measure is called coherent, if it satisfies the following conditions for all Z, W ∈Z [2]: A1 Convexity: ∀λ ∈[0, 1], ρ λZ + (1 −λ)W ≤λρ(Z) + (1 −λ)ρ(W); A2 Monotonicity: if Z ≤W, then ρ(Z) ≤ρ(W); A3 Translation invariance: ∀a∈R, ρ(Z + a) = ρ(Z) + a; A4 Positive homogeneity: if λ ≥0, then ρ(λZ) = λρ(Z). Intuitively, these condition ensure the “rationality” of single-period risk assessments: A1 ensures that diversifying an investment will reduce its risk; A2 guarantees that an asset with a higher cost for every possible scenario is indeed riskier; A3, also known as ‘cash invariance’, means that the deterministic part of an investment portfolio does not contribute to its risk; the intuition behind A4 is that doubling a position in an asset doubles its risk. We further refer the reader to [2] for a more detailed motivation of coherent risk. The following representation theorem [26] shows an important property of coherent risk measures that is fundamental to our gradient-based approach. Theorem 2.1. A risk measure ρ : Z →R is coherent if and only if there exists a convex bounded and closed set U ⊂B such that3 ρ(Z) = max ξ : ξPθ∈U(Pθ) Eξ[Z]. (1) The result essentially states that any coherent risk measure is an expectation w.r.t. a worst-case density function ξPθ, i.e., a re-weighting of Pθ by ξ, chosen adversarially from a suitable set of test density functions U(Pθ), referred to as risk envelope. Moreover, a coherent risk measure is uniquely represented by its risk envelope. In the sequel, we shall interchangeably refer to coherent risk measures either by their explicit functional representation, or by their corresponding risk-envelope. In this paper, we assume that the risk envelope U(Pθ) is given in a canonical convex programming formulation, and satisfies the following conditions. Assumption 2.2 (The General Form of Risk Envelope). For each given policy parameter θ ∈RK, the risk envelope U of a coherent risk measure can be written as U(Pθ) = ξPθ : ge(ξ, Pθ) = 0, ∀e ∈E, fi(ξ, Pθ) ≤0, ∀i ∈I, X ω∈Ω ξ(ω)Pθ(ω) = 1, ξ(ω) ≥0 , (2) where each constraint ge(ξ, Pθ) is an affine function in ξ, each constraint fi(ξ, Pθ) is a convex function in ξ, and there exists a strictly feasible point ξ. E and I here denote the sets of equality and inequality constraints, respectively. Furthermore, for any given ξ ∈B, fi(ξ, p) and ge(ξ, p) are twice differentiable in p, and there exists a M > 0 such that max max i∈I dfi(ξ, p) dp(ω) , max e∈E dge(ξ, p) dp(ω) ≤M, ∀ω ∈Ω. Assumption 2.2 implies that the risk envelope U(Pθ) is known in an explicit form. From Theorem 6.6 of [26], in the case of a finite probability space, ρ is a coherent risk if and only if U(Pθ) is a convex and compact set. This justifies the affine assumption of ge and the convex assumption of fi. Moreover, the additional assumption on the smoothness of the constraints holds for many popular coherent risk measures, such as the CVaR, the mean-semi-deviation, and spectral risk measures [1]. 2.2 Dynamic Risk Measures The risk measures defined above do not take into account any temporal structure that the random variable might have, such as when it is associated with the return of a trajectory in the case of MDPs. In this sense, such risk measures are called static. Dynamic risk measures, on the other hand, policies on a state space augmented with accumulated cost. The latter has shown to be sufficient for optimizing the CVaR risk [4]. 3When we study risk in MDPs, the risk envelope U(Pθ) in Eq. 1 also depends on the state x. 3 explicitly take into account the temporal nature of the stochastic outcome. A primary motivation for considering such measures is the issue of time consistency, usually defined as follows [24]: if a certain outcome is considered less risky in all states of the world at stage t + 1, then it should also be considered less risky at stage t. Example 2.1 in [13] shows the importance of time consistency in the evaluation of risk in a dynamic setting. It illustrates that for multi-period decision-making, optimizing a static measure can lead to “time-inconsistent” behavior. Similar paradoxical results could be obtained with other risk metrics; we refer the readers to [24] and [13] for further insights. Markov Coherent Risk Measures. Markov risk measures were introduced in [24] and constitute a useful class of dynamic time-consistent risk measures that are important to our study of risk in MDPs. For a T-length horizon and MDP M, the Markov coherent risk measure ρT (M) is ρT (M) = C(x0) + γρ C(x1) + . . . + γρ C(xT −1) + γρ C(xT ) ! , (3) where ρ is a static coherent risk measure that satisfies Assumption 2.2 and x0, . . . , xT is a trajectory drawn from the MDP M under policy µθ. It is important to note that in (3), each static coherent risk ρ at state x ∈X is induced by the transition probability Pθ(·|x) = P a∈A P(x′|x, a)µθ(a|x). We also define ρ∞(M) .= limT →∞ρT (M), which is well-defined since γ < 1 and the cost is bounded. We further assume that ρ in (3) is a Markov risk measure, i.e., the evaluation of each static coherent risk measure ρ is not allowed to depend on the whole past. 3 Problem Formulation In this paper, we are interested in solving two risk-sensitive optimization problems. Given a random variable Z and a static coherent risk measure ρ as defined in Section 2, the static risk problem (SRP) is given by min θ ρ(Z). (4) For example, in an RL setting, Z may correspond to the cumulative discounted cost Z = C(x0) + γC(x1) + · · · + γT C(xT ) of a trajectory induced by an MDP with a policy parameterized by θ. For an MDP M and a dynamic Markov coherent risk measure ρT as defined by Eq. 3, the dynamic risk problem (DRP) is given by min θ ρ∞(M). (5) Except for very limited cases, there is no reason to hope that neither the SRP in (4) nor the DRP in (5) should be tractable problems, since the dependence of the risk measure on θ may be complex and non-convex. In this work, we aim towards a more modest goal and search for a locally optimal θ. Thus, the main problem that we are trying to solve in this paper is how to calculate the gradients of the SRP’s and DRP’s objective functions ∇θρ(Z) and ∇θρ∞(M). We are interested in non-trivial cases in which the gradients cannot be calculated analytically. In the static case, this would correspond to a non-trivial dependence of Z on θ. For dynamic risk, we also consider cases where the state space is too large for a tractable computation. Our approach for dealing with such difficult cases is through sampling. We assume that in the static case, we may obtain i.i.d. samples of the random variable Z. For the dynamic case, we assume that for each state and action (x, a) of the MDP, we may obtain i.i.d. samples of the next state x′ ∼P(·|x, a). We show that sampling may indeed be used in both cases to devise suitable estimators for the gradients. To finally solve the SRP and DRP problems, a gradient estimate may be plugged into a standard stochastic gradient descent (SGD) algorithm for learning a locally optimal solution to (4) and (5). From the structure of the dynamic risk in Eq. 3, one may think that a gradient estimator for ρ(Z) may help us to estimate the gradient ∇θρ∞(M). Indeed, we follow this idea and begin with estimating the gradient in the static risk case. 4 Gradient Formula for Static Risk In this section, we consider a static coherent risk measure ρ(Z) and propose sampling-based estimators for ∇θρ(Z). We make the following assumption on the policy parametrization, which is standard in the policy gradient literature [15]. Assumption 4.1. The likelihood ratio ∇θ log P(ω) is well-defined and bounded for all ω∈Ω. 4 Moreover, our approach implicitly assumes that given some ω ∈Ω, ∇θ log P(ω) may be easily calculated. This is also a standard requirement for policy gradient algorithms [15] and is satisfied in various applications such as queueing systems, inventory management, and financial engineering (see, e.g., the survey by Fu [11]). Using Theorem 2.1 and Assumption 2.2, for each θ, we have that ρ(Z) is the solution to the convex optimization problem (1) (for that value of θ). The Lagrangian function of (1), denoted by Lθ(ξ, λP, λE, λI), may be written as Lθ(ξ, λP, λE, λI)= X ω∈Ω ξ(ω)Pθ(ω)Z(ω)−λP X ω∈Ω ξ(ω)Pθ(ω)−1 ! − X e∈E λE(e)ge(ξ,Pθ)− X i∈I λI(i)fi(ξ,Pθ). (6) The convexity of (1) and its strict feasibility due to Assumption 2.2 implies that Lθ(ξ, λP, λE, λI) has a non-empty set of saddle points S. The next theorem presents a formula for the gradient ∇θρ(Z). As we shall subsequently show, this formula is particularly convenient for devising sampling based estimators for ∇θρ(Z). Theorem 4.2. Let Assumptions 2.2 and 4.1 hold. For any saddle point (ξ∗ θ, λ∗,P θ , λ∗,E θ , λ∗,I θ ) ∈S of (6), we have ∇θρ(Z) = Eξ∗ θ h ∇θ log P(ω)(Z −λ∗,P θ ) i − X e∈E λ∗,E θ (e)∇θge(ξ∗ θ; Pθ) − X i∈I λ∗,I θ (i)∇θfi(ξ∗ θ; Pθ). The proof of this theorem, given in the supplementary material, involves an application of the Envelope theorem [17] and a standard ‘likelihood-ratio’ trick. We now demonstrate the utility of Theorem 4.2 with several examples in which we show that it generalizes previously known results, and also enables deriving new useful gradient formulas. 4.1 Example 1: CVaR The CVaR at level α ∈[0, 1] of a random variable Z, denoted by ρCVaR(Z; α), is a very popular coherent risk measure [23], defined as ρCVaR(Z; α) .= inf t∈R t + α−1E [(Z −t)+] . When Z is continuous, ρCVaR(Z; α) is well-known to be the mean of the α-tail distribution of Z, E [Z| Z > qα], where qα is a (1 −α)-quantile of Z. Thus, selecting a small α makes CVaR particularly sensitive to rare, but very high costs. The risk envelope for CVaR is known to be [26] U = ξPθ : ξ(ω) ∈ [0, α−1], P ω∈Ωξ(ω)Pθ(ω) = 1 . Furthermore, [26] show that the saddle points of (6) satisfy ξ∗ θ(ω) = α−1 when Z(ω) > λ∗,P θ , and ξ∗ θ(ω) = 0 when Z(ω) < λ∗,P θ , where λ∗,P θ is any (1 −α)quantile of Z. Plugging this result into Theorem 4.2, we can easily show that ∇θρCVaR(Z; α) = E [∇θ log P(ω)(Z −qα)| Z(ω) > qα] . This formula was recently proved in [30] for the case of continuous distributions by an explicit calculation of the conditional expectation, and under several additional smoothness assumptions. Here we show that it holds regardless of these assumptions and in the discrete case as well. Our proof is also considerably simpler. 4.2 Example 2: Mean-Semideviation The semi-deviation of a random variable Z is defined as SD[Z] .= E (Z −E [Z])2 + 1/2. The semi-deviation captures the variation of the cost only above its mean, and is an appealing alternative to the standard deviation, which does not distinguish between the variability of upside and downside deviations. For some α ∈[0, 1], the mean-semideviation risk measure is defined as ρMSD(Z; α) .= E [Z] + αSD[Z], and is a coherent risk measure [26]. We have the following result: Proposition 4.3. Under Assumption 4.1, with ∇θE [Z] = E [∇θ log P(ω)Z], we have ∇θρMSD(Z; α) = ∇θE [Z] + αE [(Z−E [Z])+(∇θ log P(ω)(Z−E [Z])−∇θE [Z])] SD(Z) . This proposition can be used to devise a sampling based estimator for ∇θρMSD(Z; α) by replacing all the expectations with sample averages. The algorithm along with the proof of the proposition are in the supplementary material. In Section 6 we provide a numerical illustration of optimization with a mean-semideviation objective. 5 4.3 General Gradient Estimation Algorithm In the two previous examples, we obtained a gradient formula by analytically calculating the Lagrangian saddle point (6) and plugging it into the formula of Theorem 4.2. We now consider a general coherent risk ρ(Z) for which, in contrast to the CVaR and mean-semideviation cases, the Lagrangian saddle-point is not known analytically. We only assume that we know the structure of the risk-envelope as given by (2). We show that in this case, ∇θρ(Z) may be estimated using a sample average approximation (SAA; [26]) of the formula in Theorem 4.2. Assume that we are given N i.i.d. samples ωi ∼Pθ, i = 1, . . . , N, and let Pθ;N(ω) .= 1 N PN i=1 I {ωi = ω} denote the corresponding empirical distribution. Also, let the sample risk envelope U(Pθ;N) be defined according to Eq. 2 with Pθ replaced by Pθ;N. Consider the following SAA version of the optimization in Eq. 1: ρN(Z) = max ξ:ξPθ;N∈U(Pθ;N) X i∈1,...,N Pθ;N(ωi)ξ(ωi)Z(ωi). (7) Note that (7) defines a convex optimization problem with O(N) variables and constraints. In the following, we assume that a solution to (7) may be computed efficiently using standard convex programming tools such as interior point methods [7]. Let ξ∗ θ;N denote a solution to (7) and λ∗,P θ;N, λ∗,E θ;N, λ∗,I θ;N denote the corresponding KKT multipliers, which can be obtained from the convex programming algorithm [7]. We propose the following estimator for the gradient-based on Theorem 4.2: ∇θ;Nρ(Z) = N X i=1 Pθ;N(ωi)ξ∗ θ;N(ωi)∇θ log P(ωi)(Z(ωi) −λ∗,P θ;N) (8) − X e∈E λ∗,E θ;N(e)∇θge(ξ∗ θ;N; Pθ;N) − X i∈I λ∗,I θ;N(i)∇θfi(ξ∗ θ;N; Pθ;N). Thus, our gradient estimation algorithm is a two-step procedure involving both sampling and convex programming. In the following, we show that under some conditions on the set U(Pθ), ∇θ;Nρ(Z) is a consistent estimator of ∇θρ(Z). The proof has been reported in the supplementary material. Proposition 4.4. Let Assumptions 2.2 and 4.1 hold. Suppose there exists a compact set C = Cξ×Cλ such that: (I) The set of Lagrangian saddle points S ⊂C is non-empty and bounded. (II) The functions fe(ξ, Pθ) for all e ∈E and fi(ξ, Pθ) for all i ∈I are finite-valued and continuous (in ξ) on Cξ. (III) For N large enough, the set SN is non-empty and SN ⊂C w.p. 1. Further assume that: (IV) If ξNPθ;N ∈U(Pθ;N) and ξN converges w.p. 1 to a point ξ, then ξPθ ∈U(Pθ). We then have that limN→∞ρN(Z) = ρ(Z) and limN→∞∇θ;Nρ(Z) = ∇θρ(Z) w.p. 1. The set of assumptions for Proposition 4.4 is large, but rather mild. Note that (I) is implied by the Slater condition of Assumption 2.2. For satisfying (III), we need that the risk be well-defined for every empirical distribution, which is a natural requirement. Since Pθ;N always converges to Pθ uniformly on Ω, (IV) essentially requires smoothness of the constraints. We remark that in particular, constraints (I) to (IV) are satisfied for the popular CVaR, mean-semideviation, and spectral risk. It is interesting to compare the performance of the SAA estimator (8) with the analytical-solution based estimator, as in Sections 4.1 and 4.2. In the supplementary material, we report an empirical comparison between the two approaches for the case of CVaR risk, which showed that the two approaches performed very similarly. This is well-expected, since in general, both SAA and standard likelihood-ratio based estimators obey a law-of-large-numbers variance bound of order 1/ √ N [26]. To summarize this section, we have seen that by exploiting the special structure of coherent risk measures in Theorem 2.1 and by the envelope-theorem style result of Theorem 4.2, we are able to derive sampling-based, likelihood-ratio style algorithms for estimating the policy gradient ∇θρ(Z) of coherent static risk measures. The gradient estimation algorithms developed here for static risk measures will be used as a sub-routine in our subsequent treatment of dynamic risk measures. 5 Gradient Formula for Dynamic Risk In this section, we derive a new formula for the gradient of the Markov coherent dynamic risk measure, ∇θρ∞(M). Our approach is based on combining the static gradient formula of Theorem 4.2, with a dynamic-programming decomposition of ρ∞(M). 6 The risk-sensitive value-function for an MDP M under the policy θ is defined as Vθ(x) = ρ∞(M|x0 = x), where with a slight abuse of notation, ρ∞(M|x0 = x) denotes the Markovcoherent dynamic risk in (3) when the initial state x0 is x. It is shown in [24] that due to the structure of the Markov dynamic risk ρ∞(M), the value function is the unique solution to the risk-sensitive Bellman equation Vθ(x) = C(x) + γ max ξPθ(·|x)∈U(x,Pθ(·|x)) Eξ[Vθ(x′)], (9) where the expectation is taken over the next state transition. Note that by definition, we have ρ∞(M) = Vθ(x0), and thus, ∇θρ∞(M) = ∇θVθ(x0). We now develop a formula for ∇θVθ(x); this formula extends the well-known “policy gradient theorem” [28, 14], developed for the expected return, to Markov-coherent dynamic risk measures. We make a standard assumption, analogous to Assumption 4.1 of the static case. Assumption 5.1. The likelihood ratio ∇θ log µθ(a|x) is well-defined and bounded for all x ∈X and a ∈A. For each state x ∈X, let (ξ∗ θ,x, λ∗,P θ,x , λ∗,E θ,x, λ∗,I θ,x) denote a saddle point of (6), corresponding to the state x, with Pθ(·|x) replacing Pθ in (6) and Vθ replacing Z. The next theorem presents a formula for ∇θVθ(x); the proof is in the supplementary material. Theorem 5.2. Under Assumptions 2.2 and 5.1, we have ∇Vθ(x) = Eξ∗ θ " ∞ X t=0 γt∇θ log µθ(at|xt)hθ(xt, at) x0 = x # , where Eξ∗ θ [·] denotes the expectation w.r.t. trajectories generated by the Markov chain with transition probabilities Pθ(·|x)ξ∗ θ,x(·), and the stage-wise cost function hθ(x, a) is defined as hθ(x, a)=C(x)+ X x′∈X P(x′|x, a)ξ∗ θ,x(x′) " γVθ(x′)−λ∗,P θ,x − X i∈I λ∗,I θ,x(i)dfi(ξ∗ θ,x, p) dp(x′) − X e∈E λ∗,E θ,x(e)dge(ξ∗ θ,x, p) dp(x′) # . Theorem 5.2 may be used to develop an actor-critic style [28, 14] sampling-based algorithm for solving the DRP problem (5), composed of two interleaved procedures: Critic: For a given policy θ, calculate the risk-sensitive value function Vθ, and Actor: Using the critic’s Vθ and Theorem 5.2, estimate ∇θρ∞(M) and update θ. Space limitation restricts us from specifying the full details of our actor-critic algorithm and its analysis. In the following, we highlight only the key ideas and results. For the full details, we refer the reader to the full paper version, provided in the supplementary material. For the critic, the main challenge is calculating the value function when the state space X is large and dynamic programming cannot be applied due to the ‘curse of dimensionality’. To overcome this, we exploit the fact that Vθ is equivalent to the value function in a robust MDP [19] and modify a recent algorithm in [31] to estimate it using function approximation. For the actor, the main challenge is that in order to estimate the gradient using Thm. 5.2, we need to sample from an MDP with ξ∗ θ-weighted transitions. Also, hθ(x, a) involves an expectation for each s and a. Therefore, we propose a two-phase sampling procedure to estimate ∇Vθ in which we first use the critic’s estimate of Vθ to derive ξ∗ θ, and sample a trajectory from an MDP with ξ∗ θ-weighted transitions. For each state in the trajectory, we then sample several next states to estimate hθ(x, a). The convergence analysis of the actor-critic algorithm and the gradient error incurred from function approximation of Vθ are reported in the supplementary material. We remark that our actor-critic algorithm requires a simulator for sampling multiple state-transitions from each state. Extending our approach to work with a single trajectory roll-out is an interesting direction for future research. 6 Numerical Illustration In this section, we illustrate our approach with a numerical example. The purpose of this illustration is to emphasize the importance of flexibility in designing risk criteria for selecting an appropriate risk-measure – such that suits both the user’s risk preference and the problem-specific properties. We consider a trading agent that can invest in one of three assets (see Figure 1 for their distributions). The returns of the first two assets, A1 and A2, are normally distributed: A1 ∼N(1, 1) and A2 ∼ 7 Figure 1: Numerical illustration - selection between 3 assets. A: Probability density of asset return. B,C,D: Bar plots of the probability of selecting each asset vs. training iterations, for policies π1, π2, and π3, respectively. At each iteration, 10,000 samples were used for gradient estimation. N(4, 6). The return of the third asset A3 has a Pareto distribution: f(z) = α zα+1 ∀z > 1, with α = 1.5. The mean of the return from A3 is 3 and its variance is infinite; such heavy-tailed distributions are widely used in financial modeling [22]. The agent selects an action randomly, with probability P(Ai) ∝exp(θi), where θ ∈R3 is the policy parameter. We trained three different policies π1, π2, and π3. Policy π1 is risk-neutral, i.e., maxθ E [Z], and it was trained using standard policy gradient [15]. Policy π2 is risk-averse and had a mean-semideviation objective maxθ E [Z] −SD[Z], and was trained using the algorithm in Section 4. Policy π3 is also risk-averse, with a mean-standarddeviation objective, as proposed in [29, 21], maxθ E [Z] − p Var[Z], and was trained using the algorithm of [29]. For each of these policies, Figure 1 shows the probability of selecting each asset vs. training iterations. Although A2 has the highest mean return, the risk-averse policy π2 chooses A3, since it has a lower downside, as expected. However, because of the heavy upper-tail of A3, policy π3 opted to choose A1 instead. This is counter-intuitive as a rational investor should not avert high returns. In fact, in this case A3 stochastically dominates A1 [12]. 7 Conclusion We presented algorithms for estimating the gradient of both static and dynamic coherent risk measures using two new policy gradient style formulas that combine sampling with convex programming. Thereby, our approach extends risk-sensitive RL to the whole class of coherent risk measures, and generalizes several recent studies that focused on specific risk measures. On the technical side, an important future direction is to improve the convergence rate of gradient estimates using importance sampling methods. This is especially important for risk criteria that are sensitive to rare events, such as the CVaR [3]. From a more conceptual point of view, the coherent-risk framework explored in this work provides the decision maker with flexibility in designing risk preference. As our numerical example shows, such flexibility is important for selecting appropriate problem-specific risk measures for managing the cost variability. However, we believe that our approach has much more potential than that. In almost every real-world application, uncertainty emanates from stochastic dynamics, but also, and perhaps more importantly, from modeling errors (model uncertainty). A prudent policy should protect against both types of uncertainties. The representation duality of coherent-risk (Theorem 2.1), naturally relates the risk to model uncertainty. In [19], a similar connection was made between model-uncertainty in MDPs and dynamic Markov coherent risk. We believe that by carefully shaping the risk-criterion, the decision maker may be able to take uncertainty into account in a broad sense. Designing a principled procedure for such risk-shaping is not trivial, and is beyond the scope of this paper. However, we believe that there is much potential to risk shaping as it may be the key for handling model misspecification in dynamic decision making. Acknowledgments The research leading to these results has received funding from the European Research Council under the European Unions Seventh Framework Program (FP7/2007-2013) / ERC Grant Agreement n. 306638. Yinlam Chow is partially supported by Croucher Foundation Doctoral Scholarship. 8 References [1] C. Acerbi. Spectral measures of risk: a coherent representation of subjective risk aversion. Journal of Banking & Finance, 26(7):1505–1518, 2002. [2] P. Artzner, F. Delbaen, J. Eber, and D. Heath. Coherent measures of risk. Mathematical finance, 9(3):203– 228, 1999. [3] O. Bardou, N. Frikha, and G. Pag`es. Computing VaR and CVaR using stochastic approximation and adaptive unconstrained importance sampling. Monte Carlo Methods and Applications, 15(3):173–210, 2009. [4] N. B¨auerle and J. Ott. Markov decision processes with average-value-at-risk criteria. Mathematical Methods of Operations Research, 74(3):361–379, 2011. [5] D. Bertsekas. Dynamic programming and optimal control. Athena Scientific, 4th edition, 2012. [6] V. Borkar. A sensitivity formula for risk-sensitive cost and the actor–critic algorithm. Systems & Control Letters, 44(5):339–346, 2001. [7] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge university press, 2009. [8] Y. Chow and M. Ghavamzadeh. Algorithms for CVaR optimization in MDPs. In NIPS 27, 2014. [9] Y. Chow and M. Pavone. A unifying framework for time-consistent, risk-averse model predictive control: theory and algorithms. In American Control Conference, 2014. [10] E. Delage and S. Mannor. Percentile optimization for Markov decision processes with parameter uncertainty. Operations Research, 58(1):203213, 2010. [11] M. Fu. Gradient estimation. In Simulation, volume 13 of Handbooks in Operations Research and Management Science, pages 575 – 616. Elsevier, 2006. [12] J. Hadar and W. R. Russell. Rules for ordering uncertain prospects. The American Economic Review, pages 25–34, 1969. [13] D. Iancu, M. Petrik, and D. Subramanian. Tight approximations of dynamic risk measures. arXiv:1106.6102, 2011. [14] V. Konda and J. Tsitsiklis. Actor-critic algorithms. In NIPS, 2000. [15] P. Marbach and J. Tsitsiklis. Simulation-based optimization of Markov reward processes. IEEE Transactions on Automatic Control, 46(2):191–209, 1998. [16] H. Markowitz. Portfolio selection: Efficient diversification of investment. John Wiley and Sons, 1959. [17] P. Milgrom and I. Segal. Envelope theorems for arbitrary choice sets. Econometrica, 70(2):583–601, 2002. [18] J. Moody and M. Saffell. Learning to trade via direct reinforcement. Neural Networks, IEEE Transactions on, 12(4):875–889, 2001. [19] T. Osogami. Robustness and risk-sensitivity in Markov decision processes. In NIPS, 2012. [20] M. Petrik and D. Subramanian. An approximate solution method for large risk-averse Markov decision processes. In UAI, 2012. [21] L. Prashanth and M. Ghavamzadeh. Actor-critic algorithms for risk-sensitive MDPs. In NIPS 26, 2013. [22] S. Rachev and S. Mittnik. Stable Paretian models in finance. John Willey & Sons, New York, 2000. [23] R. Rockafellar and S. Uryasev. Optimization of conditional value-at-risk. Journal of risk, 2:21–42, 2000. [24] A. Ruszczy´nski. Risk-averse dynamic programming for Markov decision processes. Mathematical Programming, 125(2):235–261, 2010. [25] A. Ruszczy´nski and A. Shapiro. Optimization of convex risk functions. Math. OR, 31(3):433–452, 2006. [26] A. Shapiro, D. Dentcheva, and A. Ruszczy´nski. Lectures on stochastic programming, chapter 6, pages 253–332. SIAM, 2009. [27] R. Sutton and A. Barto. Reinforcement learning: An introduction. Cambridge Univ Press, 1998. [28] R. Sutton, D. McAllester, S. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In NIPS 13, 2000. [29] A. Tamar, D. Di Castro, and S. Mannor. Policy gradients with variance related risk criteria. In International Conference on Machine Learning, 2012. [30] A. Tamar, Y. Glassner, and S. Mannor. Optimizing the CVaR via sampling. In AAAI, 2015. [31] A. Tamar, S. Mannor, and H. Xu. Scaling up robust MDPs using function approximation. In International Conference on Machine Learning, 2014. 9 | 2015 | 3 |
5,813 | Weakly-supervised Disentangling with Recurrent Transformations for 3D View Synthesis Jimei Yang1 Scott Reed2 Ming-Hsuan Yang1 Honglak Lee2 1University of California, Merced {jyang44, mhyang}@ucmerced.edu 2University of Michigan, Ann Arbor {reedscot, honglak}@umich.edu Abstract An important problem for both graphics and vision is to synthesize novel views of a 3D object from a single image. This is in particular challenging due to the partial observability inherent in projecting a 3D object onto the image space, and the ill-posedness of inferring object shape and pose. However, we can train a neural network to address the problem if we restrict our attention to specific object classes (in our case faces and chairs) for which we can gather ample training data. In this paper, we propose a novel recurrent convolutional encoder-decoder network that is trained end-to-end on the task of rendering rotated objects starting from a single image. The recurrent structure allows our model to capture longterm dependencies along a sequence of transformations, and we demonstrate the quality of its predictions for human faces on the Multi-PIE dataset and for a dataset of 3D chair models, and also show its ability of disentangling latent data factors without using object class labels. 1 Introduction Numerous graphics algorithms have been established to synthesize photorealistic images from 3D models and environmental variables (lighting and viewpoints), commonly known as rendering. At the same time, recent advances in vision algorithms enable computers to gain some form of understanding of objects contained in images, such as classification [16], detection [10], segmentation [18], and caption generation [26], to name a few. These approaches typically aim to deduce abstract representations from raw image pixels. However, it has been a long-standing problem for both graphics and vision to automatically synthesize novel images of applying intrinsic transformations (e.g. 3D rotation and deformation) to the subject of an input image. From an artificial intelligent perspective, this can be viewed as answering questions about object appearance when the view angle or illumination is changed, or some action is taken. These synthesized images may then be perceived by humans in photo editing [14], or evaluated by other machine vision systems, such as the game playing agent with vision-based reinforcement learning [20]. In this paper, we consider the problem of predicting transformed appearances of an object when it is rotated in 3D from a single image. In general this is an ill-posed problem due to the loss of information inherent in projecting a 3D object into the image space. Classic geometry-based approaches either recover a 3D object model from multiple related images, i.e. multi-view stereo and structure-from-motion, or register a single image of a known object class to its prior 3D model, e.g. faces [5]. The resulting mesh can be used to re-render the scene from novel viewpoints. However, having 3D meshes as intermediate representations, these methods are 1) limited to particular object classes, 2) vulnerable to image alignment mistakes and 3) easy to generate artifacts during unseen texture synthesis. To overcome these limitations, we propose a learning approach without explicit 3D model recovery. Having observed rotations of similar 3D objects (e.g. faces, chairs, household objects), the trained model can both 1) better infer the true pose, shape and texture of the object, and 2) make plausible assumptions about potentially ambiguous aspects of appearance in novel 1 viewpoints. Thus, the learning algorithm relies on mappings between Euclidean image space and underlying nonlinear manifold. In particular, 3D view synthesis can be cast as pose manifold traversal where a desired rotation can be decomposed to a sequence of small steps. A major challenge arises due to the long-term dependency among multiple rotation steps; the key identifying information (e.g. shape, texture) from the original input must be remembered along the entire trajectory. Furthermore, the local rotation at each step must generate the correct result on the data manifold, or subsequent steps will also fail. Closely related to the image generation task considered in this paper is the problem of 3D invariant recognition, which involves comparing object images from different viewpoints or poses with dramatic changes of appearance. Shepard and Metzler in their mental rotation experiments [22] found that the time taken for humans to match 3D objects from two different views increased proportionally with the angular rotational difference between them. It was as if the humans were rotating their mental images at a steady rate. Inspired by this mental rotation phenomenon, we propose a recurrent convolutional encoder-decoder network with action units to model the process of pose manifold traversal. The network consists of four components: a deep convolutional encoder [16], shared identity units, recurrent pose units with rotation action inputs, and a deep convolutional decoder [8]. Rather than training the network to model a specific rotation sequence, we provide control signals at each time step instructing the model how to move locally along the pose manifold. The rotation sequences can be of varying length. To improve the ease of training, we employed curriculum learning, similar to that used in other sequence prediction problems [27]. Intuitively, the model should learn how to make a one-step 15◦rotation before learning how to make a series of such rotations. The main contributions of this work are summarized as follows. First, a novel recurrent convolutional encoder-decoder network is developed for learning to apply out-of-plane rotations to human faces and 3D chair models. Second, the learned model can generate realistic rotation trajectories with a control signal supplied at each step by the user. Third, despite only trained to synthesize images, our model learns discriminative view-invariant features without using class labels. This weakly-supervised disentangling is especially notable with longer-term prediction. 2 Related Work The transforming autoencoder [12] introduces the notion of capsules in deep networks, which tracks both the presence and position of visual features in the input image. These models are shown to be capable of applying affine transformations and 3D rotations to images. We address a similar task of rendering object appearance undergoing 3D rotations, but we use a convolutional network architecture in lieu of capsules (albeit with stride-2 convolution instead of max-pooling), and incorporate action inputs and recurrent structure to handle repeated rotation steps. The Predictive Gating Pyramid (PGP) [19] is developed for time series prediction, and is able to learn image transformations including shifts and rotation over multiple time steps. Our task is related to this time series prediction, but our formulation includes a control signal, uses disentangled latent features, and uses convolutional encoder and decoder networks to model detailed images. Another gating network is proposed in [7] to directly model mental rotation by optimizing transforming distance. Instead of extracting invariant recognition features in one shot, their model learns to perform recognition by exploring a space of relevant transformations. Similarly, our model can explore the space of rotation about an object image by setting the control signal input at each time step of our recurrent network. The problem of training neural networks that generate images is studied in [25]. A convolutional network mapping shape, pose and transformation labels to images is proposed in [8] for generating chairs. They are able to control these factors of variation and generate high quality renderings. We also generate chair renderings in this paper, but our model adds several additional features: a deep encoder network (so that we can generalize to novel images, rather than only decode), distributed representations for appearance and pose, and recurrent structure for long-term prediction. Contemporary to our work, the Inverse Graphics Network (IGN) [17] also adds an encoding function to learn graphics codes of images, along with a decoder similar to that in the chair generating network. As in our model, IGN uses a deep convolutional encoder to extract image representations, apply modifications to these, and then re-render. Our model differs in that we train a recurrent network to perform trajectories of multiple transformations, we add control signal input at each step, and we use deterministic feed-forward training rather than the variational auto-encoder (VAE) framework [15] (although our approach could be extended to a VAE version). 2 Figure 1: Deep convolutional encoder-decoder network for learning 3d rotation A related line of work to ours is disentangling the latent factors of variation that generate natural images. Bilinear models for separating style and content are developed in [24], and are shown to be capable of separating handwriting style and character identity, and also separating face identity and pose. The disentangling Boltzmann Machine (disBM) [21] applies this idea to augment the Restricted Boltzmann Machine by partitioning its hidden state into distinct factors of variation and modeling their higher-order interaction. The multi-view perceptron [29] employs a stochastic feedforward network to disentangle the identity and pose factors of face images in order to achieve view-invariant recognition. The encoder network for IGN is also trained to learn a disentangled representation of images by extracting a graphics code for each factor. In [6], the (potentially unknown) latent factors of variation are both discovered and disentangled using a novel hidden unit regularizer. Our work is also loosely related to the “DeepStereo” algorithm [9] that synthesizes novel views of scenes from multiple images using deep convolutional networks. 3 Recurrent Convolutional Encoder-Decoder Network In this section we describe our model formulation. Given an image of 3D object, our goal is to synthesize its rotated views. Inspired by recent success of convolutional networks (CNNs) in mapping images to high-level abstract representations [16] and synthesizing images from graphics codes [8], we base our model on deep convolutional encoder-decoder networks. One example network structure is shown in Figure 1. The encoder network used 5 × 5 convolution-relu layers with stride 2 and 2-pixel padding so that the dimension is halved at each convolution layer, followed by two fullyconnected layers. In the bottleneck layer, we define a group of units to represent the pose (pose units) where the desired transformations can be applied. The other group of units represent what does not change during transformations, named as identity units. The decoder network is symmetric to the encoder. To increase dimensionality we use fixed upsampling as in [8]. We found that fixed stride-2 convolution and upsampling worked better than max-pooling and unpooling with switches, because when applying transformations the encoder pooling switches would not in general match the switches produced by the target image. The desired transformations are reflected by the action units. We used a 1-of-3 encoding, in which [100] encoded a clockwise rotation, [010] encoded a noop, and [001] encoded a counter-clockwise rotation. The triangle indicates a tensor product taking as input the pose units and action units, and producing the transformed pose units. Equivalently, the action unit selects the matrix that transforms the input pose units to the output pose units. The action units introduce a small linear increment to the pose units, which essentially model the local transformations in the nonlinear pose manifold. However, in order to achieve longer rotation trajectories, if we simply accumulate the linear increments from the action units (e.g. [2 0 0] for two-step clockwise rotation, the pose units will fall off the manifold resulting in bad predictions. To overcome this problem, we generalize the model to a recurrent neural network, which have been shown to capture long-term dependencies for a wide variety of sequence modeling problems. In essence, we turn the pose units to be recurrent to model the step-by-step pose manifold traversals and the identity units are shared across all time steps, since we assume that all training sequences preserve the identity while only changing the pose. Figure 2 shows the unrolled version of our RNN model. We only perform encoding at the first time step, and all transformations are carried out in the latent space; i.e. the model predictions at time step t are not fed into the next time step input. The training objective is based on pixel-wise prediction over all time steps for training sequences: Lrnn = N X i=1 T X t=1 ||y(i,t) −g(fpose(x(i), a(i), t), fid(x(i)))||2 2 (1) where a(i) is the sequence of T actions, fid(x(i)) produces the identity features invariant to all the time steps, fpose(x(i), a(i), t) produces the transformed pose features at time step t, g(·, ·) is the 3 Figure 2: Unrolled recurrent convolutional network for learning to rotate 3d objects. The convolutional encoder and decoders have been abstracted out, represented here as vertical rectangles. image decoder producing an image given the output of fid(·) and fpose(·, ·, ·), x(i) is the i-th image, y(i,t) is the i-th training image target at step t. 3.1 Curriculum Training We trained the network parameters using backpropagation through time and the ADAM solver [3]. To effectively train our recurrent network, we found it beneficial to use curriculum learning [4], in which we gradually increase the difficulty of training by increasing the trajectory length. This appears to be useful for sequence prediction with recurrent networks in other domains as well, such as learning to execute Python programs [27]. In section 4, we show that increasing the training sequence length improves both the model’s image prediction performance as well as the pose-invariant recognition performance of identity features. Also, longer training sequences force the identity units to better disentangle themselves from the pose. If the same identity units need to be used to predict both a 15◦-rotated and a 120◦-rotated image during training, these units can not pick up pose-related information. In this way, our model can learn disentangled features (i.e. identity units can do invariant identity recognition but are not informative of pose, and vice-versa) without explicitly regularizing to achieve this effect. We did not find it necessary to use gradient clipping. 4 Experiments We carry out experiments to achieve the following objectives. First, we examine the ability of our model to synthesize high quality images of both face and complex 3D objects (chairs) in a wide range of rotational angles. Second, we evaluate the discriminative performance of disentangled identity units through cross-view object recognition. Third, we demonstrate the ability to generate and rotate novel object classes by interpolating identity units of seen objects. 4.1 Datasets Multi-PIE. The Multi-PIE [11] dataset consists of 754,204 face images from 337 people. The images are captured from 15 viewpoints under 20 illumination conditions in different sessions. To evaluate our model for rotating faces, we select a subset of Multi-PIE that covers 7 viewpoints evenly from −45◦to 45◦under neutral illumination. Each face image is aligned through manually annotated landmarks on eyes, nose and mouth corners, and then cropped to 80 × 60 × 3 pixels. We use the images of first 200 people for training and the remaining 137 people as the test set. Chairs. This dataset contains 1393 chair CAD models made public by Aubry et al. [1]. Each chair model is rendered from 31 azimuth angles (with steps of 11◦) and 2 elevation angles (20◦and 30◦) at a fixed distance to the virtual camera. We use a subset of 809 chair models in our experiments, which are selected out of 1393 by Dosovitskiy et al. [8] in order to remove near-duplicate models, models differing only in color or low-quality models. We crop the rendered images to have a small border and resize them to a common size of 64 × 64 × 3 pixels. We also prepare their binary masks by subtracting the white background. We use the images of the first 500 models as the training set and the remaining 409 models as the test set. 4.2 Network Architectures and Training Details Multi-PIE. The encoder network for Multi-PIE used two convolution-relu layers with stride 2 and 2-pixel padding, followed by one fully-connected layers: 5×5×64−5×5×128−1024. The identity 4 −45◦−30◦−15◦ 0◦ 15◦ 30◦ 45◦ Input 45◦ 30◦ 15◦ 0◦ −15◦−30◦−45◦ Input Figure 3: 3D view synthesis on Multi-PIE. For each panel, the top row shows the ground truth images from −45◦to 45◦, the bottom row shows the re-renderings of 6-step clockwise rotation from an input image of −45◦ and of 6-step counter-clockwise rotation from an input image of 45◦. 45◦ 30◦ 15◦ −15◦ −30◦ −45◦ 45◦ 30◦ 15◦ −15◦ −30◦ −45◦ Input RNN 3D model Figure 4: Comparing face pose normalization results with 3D morphable model [28]. and pose units are 512 and 128, respectively. The decoder network is symmetric to the encoder. The curriculum training procedure starts with the single-step rotation model which we named RNN1. We prepare training samples by pairing face images of the same person captured in the same session with adjacent camera viewpoints. For example, x(i) at −30◦is mapped to y(i) at −15◦with action a(i) = [001]; x(i) at −15◦is mapped to y(i) at −30◦with action a(i) = [100]; and x(i) at −30◦is mapped to y(i) at −30◦with action a(i) = [010]. For face images with ending viewpoints −45◦ and 45◦, only one-way rotation is feasible. We train the network using the ADAM solver with fixed learning rate 1e−4 for 400 epochs1. Since there are 7 viewpoints per person per session, we schedule the curriculum training with t=2, t=4 and t=6 stages, which we named RNN2, RNN4 and RNN6, respectively. To sample training sequences with fixed length, we allow both clockwise and counter-clockwise rotations. For example, when t=4, one input image x(i) at 30◦is mapped to (y(i,1), y(i,2), y(i,3), y(i,4)) with corresponding angles (45◦, 30◦, 15◦, 0◦) and action inputs ([001], [100], [100], [100]). In each stage, we initialize the network parameters with the previous stage and fine-tune the network with fixed learning rate 1e−5 for 10 additional epochs. Chairs. The encoder network for chairs used three convolution-relu layers with stride 2 and 2-pixel padding, followed by two fully-connected layers: 5×5×64−5×5×128−5×5×256−1024−1024. The decoder network is symmetric, except that after the fully-connected layers it branches into image and mask prediction layers.The mask prediction indicates whether a pixel belongs to foreground or background. We adopted this idea from the generative CNNs [8] and found it beneficial to training efficiency and image synthesis quality. A tradeoff parameter λ=0.1 is applied to the mask prediction loss. We train the single-step network parameters with fixed learning rate 1e−4 for 500 epochs. We schedule the curriculum training with t=2, t=4, t=8 and t=16, which we named RNN2, RNN4, RNN8 and RNN16. Note that the curriculum training stops at t = 16 because we reached the limit of GPU memory. Since the images of each chair model are rendered from 31 viewpoints evenly sampled between 0◦and 360◦, we can easily prepare training sequences of clockwise or counterclockwise t-step rotations around the circle. Similarly, the network parameters of the current stage is initialized with those of previous stage and fine-tuned with fixed learning rate 1e−5 for 50 epochs. 4.3 3D View Synthesis of Novel Objects We first examine the re-rendering quality of our RNN models for novel objects instances that were not seen during training. On the Multi-PIE dataset, given one input image from the test set with possible views between −45◦to 45◦, the encoder produces identity units and pose units and then the decoder renders images progressively with fixed identity units and action-driven recurrent pose units up to t-steps. Examples are shown in Figure 3 of the longest rotations, i.e. clockwise from 1We carry out experiments using Caffe [13] on Nvidia k40c and Titan X GPUs. 5 −45◦to 45◦and counter-clockwise from 45◦to −45◦with RNN6. High quality renderings are generated with smooth transformations between adjacent views. The characteristics of faces, such as gender, expression, eyes, nose and glasses are also preserved during rotation. We also compare our RNN model with a state-of-the-art 3D morphable model for face pose normalization [28] in Figure 4. It can be observed that our RNN model produces stable renderings while 3D morphable model is sensitive to facial landmark localization. One of the advantages of 3D morphable model is that it preserves facial textures well. On the chair dataset, we use RNN16 to synthesize 16 rotated views of novel chairs in the test set. Given a chair image of certain view, we define two action sequences; one for progressive clockwise rotation and and another for counter-clockwise rotation. It is a more challenging task compared to rotating faces due to the complex 3D shapes of chairs and the large rotation angles (more than 180◦after 16-step rotations). Since no previous methods tackle the exact same chair re-rendering problem, we use a k-nearest-neighbor (KNN) method for baseline comparisons. The KNN baseline is implemented as follows. We first extract the CNN features “fc7” from VGG-16 net [23] for all the chair images. For each test chair image, we find its k nearest neighbors in the training set by comparing their “fc7” features. The retrieved top-K images are expected to be similar to the query in terms of both style and pose [2]. Given a desired rotation angle, we synthesize rotated views of the test image by averaging the corresponding rotated views of the retrieved top-K images in the training set at the pixel level. We tune the K value in [1,3,5,7], namely KNN1, KNN3, KNN5 and KNN7 to achieve its best performance. Two examples are shown in Figure 5. In our RNN model, the 3D shapes are well preserved with clear boundaries for all the 16 rotated views from different input, and the appearance changes smoothly between adjacent views with consistent style. Input t = 1 t = 2 t = 3 t = 4 t = 5 t = 6 t = 7 t = 8 t = 9 t = 10 t = 11 t = 12 t = 13 t = 14 t = 15 t = 16 Figure 5: 3D view synthesis of 16-step rotations on Chairs. In each panel, the first and second row demonstrate re-renderings of 16-step clockwise and counter-clockwise rotations from our RNN16 model and KNN5 baseline, respectively. Note that conceptually the learned network parameters during different stages of curriculum training can be used to process an arbitrary number of rotation steps. Unsurprisingly, the RNN1 model (the first row in Figure 6) only works well in the first rotation step and produce degenerate results from the second step. The RNN2 (second row in Figure 6), trained with two-step rotations, generates reasonable results in the third step. Progressively, the RNN4 and RNN8 seem to generalize well on chairs with longer predictions (t = 6 for RNN4 and t = 12 for RNN8). We measure the quantitative performance of KNN and our RNN by the mean squared error (MSE) in (1) in Figure 7. As a result, the best KNN with 5 retrievals (KNN5) obtains ∼310 MSE, which is comparable to our RNN4 model, but significantly outperformed by our RNN16 model (∼179 MSE) with a 42% improvement. 4.4 Cross-View Object Recognition In this experiment, we examine and compare the discriminative performance of disentangled representations through cross-view object recognition. 6 RNN1 RNN2 RNN4 RNN8 RNN16 GT Model t=1 t = 2 t = 3 t = 4 t = 6 t = 8 t = 12 t = 16 Figure 6: Comparing chair synthesis results from RNN at different curriculum stages. Figure 7: Comparing reconstruction mean squared errors (MSE) on chairs with RNNs and KNNs. Multi-PIE. We create 7 gallery/probe splits from the test set. In each split, the face images of same view, e.g. −45◦are collected as gallery and the rest of other views as probes. We extract 512-d features from the identity units of RNNs for all the test images so that the probes are matched to the gallery by their cosine distance. It is considered as a success if the matched gallery image has the same identity with one probe. We also categorize the probes in each split by measuring their angle offsets from the gallery. In particular, the angle offsets range from 15◦to 90◦. The recognition difficulties increase with angle offsets. To demonstrate the discriminative performance of our learned representations, we also implement a convolutional network (CNN) classifier. The CNN architecture is setup by connecting our encoder and identity units with a 200-way softmax output layer, and its parameters are learned on the training set with ground truth class labels. The 512-d features extracted from the layer before the softmax layer are used to perform cross-view object recognition as above. Figure 8 (left) compares the average success rates of RNNs and CNN with their standard deviations over 7 splits for each angle offset. The success rates of RNN1 drop more than 20% from angle offset 15◦to 90◦. The success rates keep improving in general with curriculum training of RNNs, and the best results are achieved as RNN6. As expected, the performance gap for RNN6 between 15◦to 90◦reduces to 10%. This phenomenon demonstrates that our RNN model gradually learns pose/viewpoint-invariant representations for 3D face recognition. Without using any class labels, our RNN model achieves competitive results against CNN. Chairs. The experiment setup is similar to Multi-PIE. There are in total 31 azimuth views per chair instance. For each view we create its gallery/probe split so that we have 31 splits. We extract 512-d features from identity units of RNN1, RNN2, RNN4, RNN8 and RNN16. The probes for each split are categorized into 15 angle offsets ranging from 12◦to 174◦. Note that this experiment is particularly challenging because chair matching is a fine-grained recognition task and chair appearances change significantly with 3D rotations. We also compare our model against CNN, but instead of training CNN from scratch we use the pre-trained VGG-16 net [23] to extract the 4096-d “fc7” features for chair matching. The success rates are shown in Figure 8 (right). The performance drops quickly when the angle offset is greater than 45◦, but the RNN16 significantly improves the overall success rates especially for large angle offsets. We notice that the standard deviations are large around the angle offsets 70◦to 120◦. This is because some views contain more information about the chair 3D shapes than the other views so that we see performance variations. Interestingly, the performance of VGG-16 net surpasses our RNN model when the angle offset is greater than 120◦. We hypothesize that this phenomenon results from the symmetric structures of most of chairs. The VGG-16 net was trained with mirroring data augmentation to achieve certain symmetric invariance while our RNN model does not explore this structure. To further demonstrate the disentangling property of our RNN model, we use the pose units extracted from the input images to repeat the above cross-view recognition experiments. The mean success rates are shown in Table 1. It turns out that the better the identity units perform the worse the pose units perform. When the identity units achieve near-perfect recognition on Multi-PIE, the pose units only obtain a mean success rate 1.4%, which is close to the random guess 0.5% for 200 classes. 7 Angle offset 20 30 40 50 60 70 80 90 Classification success rates (%) 60 65 70 75 80 85 90 95 100 RNN1 RNN2 RNN4 RNN6 CNN Angle offset 20 40 60 80 100 120 140 160 180 Classification success rates (%) 0 10 20 30 40 50 60 70 80 90 100 RNN1 RNN2 RNN4 RNN8 RNN16 VGG-16 Figure 8: Comparing cross-view recognition success rates for faces (left) and chairs (right). Table 1: Comparing mean cross-view recognition success rates (%) with identity and pose units. Models RNN: identity RNN: pose CNN Multi-PIE 93.3 1.4 92.6 Chairs 56.8 9.0 52.5 (VGG-16) 4.5 Class Interpolation and View Synthesis In this experiment, we demonstrate the ability of our RNN model to generate novel chairs by interpolating between two existing ones. Given two chair images of same view from different instances, the encoder network is used to compute their identity units z1 id, z2 id and pose units z1 pose, z2 pose, respectively. The interpolation is computed by zid = βz1 id +(1−β)z2 id and zpose = βz1 pose +(1−β)z2 pose, where β = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]. The interpolated zid and zpose are then fed into the recurrent decoder network to render its rotated views. Example interpolations between four chair instances are shown in Figure 9. The Interpolated chairs present smooth stylistic transformations between any pair of input classes (each row in Figure 9), and their unique stylistic characteristics are also well preserved among its rotated views (each column in Figure 9). Input t=1 t=5 t=9 t=13 β 0.0 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0 Figure 9: Chair style interpolation and view synthesis. Given four chair images of same view (first row) from test set, each row presents renderings of style manifold traversal with fixed view while each column presents the renderings of pose manifold traversal with fixed interpolated identity. 5 Conclusion In this paper we develop a recurrent convolutional encoder-decoder network, and demonstrate its effectiveness for synthesizing 3D views of unseen object instances. On the Multi-PIE dataset and a database of 3D chair CAD models, the model predicts accurate renderings across trajectories of repeated rotations. The proposed curriculum training by gradually increasing trajectory length of training sequences yields both better image appearance and more discriminative features for poseinvariant recognition. We also show that a trained model could interpolate across the identity manifold of chairs at fixed pose, and traverse the pose manifold while fixing the identity. This generative disentangling of chair identity and pose emerged from our recurrent rotation prediction objective, even though we do not explicitly regularize the hidden units to be disentangled. Our future work includes introducing more actions into the proposed model other than rotation, handling objects embedded in complex scenes, and handling one-to-many mappings for which a transformation yields a multi-modal distribution over future states in the trajectory. 8 References [1] M. Aubry, D. Maturana, A. A. Efros, B. Russell, and J. Sivic. Seeing 3D chairs: exemplar part-based 2D-3D alignment using a large dataset of CAD models. In CVPR, 2014. [2] M. Aubry and B. C. Russell. Understanding deep features with computer-generated imagery. In ICCV, 2015. [3] J. Ba and D. Kingma. Adam: A method for stochastic optimization. In ICLR, 2015. [4] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In ICML, 2009. [5] V. Blanz and T. Vetter. A morphable model for the synthesis of 3D faces. In SIGGRAPH, 1999. [6] B. Cheung, J. Livezey, A. Bansal, and B. Olshausen. Discovering hidden factors of variation in deep networks. In ICLR, 2015. [7] W. Ding and G. Taylor. Mental rotation by optimizing transforming distance. In NIPS Deep Learning and Representation Learning Workshop, 2014. [8] A. Dosovitskiy, J. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In CVPR, 2015. [9] J. Flynn, I. Neulander, J. Philbin, and N. Snavely. Deepstereo: Learning to predict new views from the world’s imagery. arXiv preprint arXiv:1506.06825, 2015. [10] R. Girshick. Fast R-CNN. In ICCV, 2015. [11] R. Gross, I. Matthews, J. Cohn, T. Kanade, and S. Baker. Multi-PIE. Image and Vision Computing, 28(5):807–813, May 2010. [12] G. E. Hinton, A. Krizhevsky, and S. D. Wang. Transforming auto-encoders. In ICANN, 2011. [13] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [14] N. Kholgade, T. Simon, A. Efros, and Y. Sheikh. 3D object manipulation in a single photograph using stock 3D models. In SIGGRAPH, 2014. [15] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [16] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [17] T. D. Kulkarni, W. Whitney, P. Kohli, and J. B. Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015. [18] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [19] V. Michalski, R. Memisevic, and K. Konda. Modeling deep temporal dependencies with recurrent “grammar cells”. In NIPS, 2014. [20] V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller. Playing atari with deep reinforcement learning. In NIPS Deep Learning Workshop, 2013. [21] S. Reed, K. Sohn, Y. Zhang, and H. Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014. [22] R. N. Shepard and J. Metzler. Mental rotation of three dimensional objects. Science, 171(3972):701–703, Febrary 1971. [23] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [24] J. B. Tenenbaum and W. T. Freeman. Separating style and content with bilinear models. Neural Computation, 12(6):1247–1283, June 2000. [25] T. Tieleman. Optimizing neural networks that generate images. PhD thesis, University of Toronto, 2014. [26] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan. Show and tell: A neural image caption generator. In CVPR, 2015. [27] W. Zaremba and I. Sutskever. Learning to execute. arXiv preprint arXiv:1410.4615, 2014. [28] X. Zhu, Z. Lei, J. Yan, D. Yi, and S. Z. Li. High-fidelity pose and expression normalization for face recognition in the wild. In CVPR, 2015. [29] Z. Zhu, P. Luo, X. Wang, and X. Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In NIPS, 2014. 9 | 2015 | 30 |
5,814 | Distributed Submodular Cover: Succinctly Summarizing Massive Data Baharan Mirzasoleiman ETH Zurich Amin Karbasi Yale University Ashwinkumar Badanidiyuru Google Andreas Krause ETH Zurich Abstract How can one find a subset, ideally as small as possible, that well represents a massive dataset? I.e., its corresponding utility, measured according to a suitable utility function, should be comparable to that of the whole dataset. In this paper, we formalize this challenge as a submodular cover problem. Here, the utility is assumed to exhibit submodularity, a natural diminishing returns condition prevalent in many data summarization applications. The classical greedy algorithm is known to provide solutions with logarithmic approximation guarantees compared to the optimum solution. However, this sequential, centralized approach is impractical for truly large-scale problems. In this work, we develop the first distributed algorithm – DISCOVER – for submodular set cover that is easily implementable using MapReduce-style computations. We theoretically analyze our approach, and present approximation guarantees for the solutions returned by DISCOVER. We also study a natural trade-off between the communication cost and the number of rounds required to obtain such a solution. In our extensive experiments, we demonstrate the effectiveness of our approach on several applications, including active set selection, exemplar based clustering, and vertex cover on tens of millions of data points using Spark. 1 Introduction A central challenge in machine learning is to extract useful information from massive data. Concretely, we are often interested in selecting a small subset of data points such that they maximize a particular quality criterion. For example, in nonparametric learning, we often seek to select a small subset of points along with associated basis functions that well approximate the hypothesis space [1]. More abstractly, in data summarization problems, we often seek a small subset of images [2], news articles [3], scientific papers [4], etc., that are representative w.r.t. an entire corpus. In many such applications, the utility function that measures the quality of the selected data points satisfies submodularity, i.e., adding an element from the dataset helps more in the context of few selected elements than if we have already selected many elements (c.f., [5]). Our focus in this paper is to find a succinct summary of the data, i.e., a subset, ideally as small as possible, which achieves a desired (large) fraction of the utility provided by the full dataset. Hereby, utility is measured according to an appropriate submodular function. We formalize this problem as a submodular cover problem, and seek efficient algorithms for solving it in face of massive data. The celebrated result of Wolsey [6] shows that a greedy approach that selects elements sequentially in order to maximize the gain over the items selected so far, yields a logarithmic factor approximation. It is also known that improving upon this approximation ratio is hard under natural complexity theoretic assumptions [7]. Even though such a greedy algorithm produces near-optimal solutions, 1 it is impractical for massive datasets, as sequential procedures that require centralized access to the full data are highly constrained in terms of speed and memory. In this paper, we develop the first distributed algorithm – DISCOVER – for solving the submodular cover problem. It can be easily implemented in MapReduce-style parallel computation models [8] and provides a solution that is competitive with the (impractical) centralized solution. We also study a natural trade-off between the communication cost (for each round of MapReduce) and the number of rounds. The trade-off lets us choose between a small communication cost between machines while having more rounds to perform or a large communication cost with the benefit of running fewer rounds. Our experimental results demonstrate the effectiveness of our approach on a variety of submodular cover instances: vertex cover, exemplar-based clustering, and active set selection in non-parametric learning. We also implemented DISCOVER on Spark [9] and approximately solved vertex cover on a social graph containing more than 65 million nodes and 1.8 billion edges. 2 Background and Related Work Recently, submodular optimization has attracted a lot of interest in machine learning and data mining where it has been applied to a variety of problems including viral marketing [10], information gathering [11], and active learning [12], to name a few. Like convexity in continuous optimization, submodularity allows many discrete problems to become efficiently approximable (e.g., constrained submodular maximization). In the submodular cover problem, the main objective is to find the smallest subset of data points such that its utility reaches a desirable fraction of the entire dataset. As stated earlier, the sequential, centralized greedy method fails to appropriately scale. Once faced with massive data, MapReduce [8] (and modern implementations like Spark [9]) offer arguably one of the most successful programming models for reliable parallel computing. Distributed solutions for some special cases of the submodular cover problem have been recently proposed. In particular, for the set cover problem (i.e., find the smallest subcollection of sets that covers all the data points), Berger et al. [13] provided the first distributed solution with an approximation guarantee similar to that of the greedy procedure. Blelloch et al. [14] improved their result in terms of the number of rounds required by a MapReduce-based implementation. Very recently, Stergiou et al. [15] introduced an efficient distributed algorithm for set cover instances of massive size. Another variant of the set cover problem that has received some attention is maximum k-cover (i.e., cover as many elements as possible from the ground set by choosing at most k subsets) for which Chierichetti et al. [16] introduced a distributed solution with a (1 −1/e −ϵ) approximation guarantee. Going beyond the special case of coverage functions, distributed constrained submodular maximization has also been the subject of recent research in the machine learning and data mining communities. In particular, Mirzasoleiman et al. [17] provided a simple two-round distributed algorithm called GREEDI for submodular maximization under cardinality constraints. Contemporarily, Kumar et al [18] developed a multi-round algorithm for submodular maximzation subject to cardinality and matroid constraints. There have also been very recent efforts to either make use of randomization methods or treat data in a streaming fashion [19, 20]. To the best of our knowledge, we are the first to address the general distributed submodular cover problem and propose an algorithm DISCOVER for approximately solving it. 3 The Distributed Submodular Cover Problem The goal of data summarization is to select a small subset A out of a large dataset indexed by V (called the ground set) such that A achieves a certain quality. To this end, we first need to define a utility function f : 2V →R+ that measures the quality of any subset A ⊆V , i.e., f(A) quantifies how well A represents V according to some objective. In many data summarization applications, the utility function f satisfies submodularity, stating that the gain in utility of an element e in context of a summary A decreases as A grows. Formally, f is submodular if f(A ∪{e}) −f(A) ≥f(B ∪{e}) −f(B), for any A ⊆B ⊆V and e ∈V \ B. Note that the meaning of utility is application specific and submodular functions provide a wide range of possibilities to define appropriate utility functions. In 2 Section 3.2 we discuss concrete instances of functions f that we consider in our experiments. Let us denote the marginal utility of an element e w.r.t. a subset A as △(e|A) = f(A ∪{e}) −f(A). The utility function f is called monotone if △(e|A) ≥0 for any e ∈V \ A and A ⊆V . Throughout this paper we assume that the utility function is monotone submodular. The focus of this paper is on the submodular cover problem, i.e., finding the smallest set Ac such that it achieves a utility Q = (1 −ϵ)f(V ) for some 0 ≤ϵ ≤1. More precisely, Ac = arg minA⊆V |A|, such that f(A) ≥Q. (1) We call Ac the optimum centralized solution with size k = |Ac|. Unfortunately, finding Ac is NP-hard, for many classes of submodular functions [7]. However, a simple greedy algorithm is known to be very effective. This greedy algorithm starts with the empty set A0, and at each iteration i, it chooses an element e ∈V that maximizes △(e|Ai−1), i.e., Ai = Ai−1 ∪ {arg maxe∈V △f(e|Ai−1)}. Let us denote this (centralized) greedy solution by Ag. When f is integral (i.e., f : 2V →N) it is known that the size of the solution returned by the greedy algorithm |Ag| is at most H(maxe f({e}))|Ac|, where H(z) is the z-th harmonic number and is bounded by H(z) ≤1 + ln z [6]. Thus, we have |Ag| ≤(1 + ln(maxe f({e})))|Ac|, and obtaining a better solution is hard under natural complexity theoretic assumptions [7]. As it is standard practice, for our theoretical analysis to hold, we assume that f is an integral, monotone submodular function. Scaling up: Distributed computation in MapReduce. In many data summarization applications where the ground set V is large, the sequential greedy algorithm is impractical: either the data cannot be stored on a single computer or the centralized solution is too expensive in terms of computation time. Instead, we seek an algorithm for solving the submodular cover problem in a distributed manner, preferably amenable to MapReduce implementations. In this model, at a high level, the data is first distributed to m machines in a cluster, then each part is processed by the corresponding machine (in parallel, without communication), and finally the outputs are either merged or used for the next round of MapReduce computation. While in principle multiple rounds of computation can be realized, in practice, expensive synchronization is required after each round. Hence, we are interested in distributed algorithms that require few rounds of computation. 3.1 Naive Approaches Towards Distributed Submodular Cover One way of solving the distributed submodular cover problem in multiple rounds is as follows. In each round, all machines – in parallel – compute the marginal gains for the data points assigned to them. Then, they communicate their best candidate to a central processor, who then identifies the globally best element, and sends it back to all the m machines. This element is then taken into account when selecting the next element with highest marginal gain, and so on. Unfortunately, this approach requires synchronization after each round and we have exactly |Ag| many rounds. In many applications, k and hence |Ag| is quite large, which renders this approach impractical for MapReduce style computations. An alternative approach would be for each machine i to select greedily enough elements from its partition Vi until it reaches at least Q/m utility. Then, all machines merge their solution. This approach is much more communication efficient, and can be easily implemented, e.g., using a single MapReduce round. Unfortunately, many machines may select redundant elements, and the merged solution may suffer from diminishing returns and never reach Q. Instead of aiming for Q/m, one could aim for a larger fraction, but it is not clear how to select this target value. In Section 4, we introduce our solution DISCOVER, which requires few rounds of communication, while at the same time yielding a solution competitive with the centralized one. Before that, let us briefly discuss the specific utility functions that we use in our experiments (described in Section 5). 3.2 Example Applications of the Distributed Submodular Cover Problem In this part, we briefly discuss three concrete utility functions that have been extensively used in previous work for finding a diverse subset of data points and ultimately leading to good data summaries [1, 17, 21, 22, 23]. Truncated Vertex Cover: Let G = (V, E) be a graph with the vertex set V and edge set E. Let ϱ(C) denote the neighbours of C ⊆V in the graph G. One way to measure the influence of a set C 3 is to look at its cover f(C) = |ϱ(C)∪C|. It is easy to see that f is a monotone submodular function. The truncated vertex cover is the problem of choosing a small subset of nodes C such that it covers a desired fraction of |V | [21]. Active Set Selection in Kernel Machines: In many application such as feature selections [22], determinantal point processes [24], and GP regression [23], where the data is described in terms of a kernel matrix K, we want to select a small subset of elements while maintaining a certain diversity. Very often, the utility function boils down to f(S) = log det(I + αKS,S) where α > 0 and KS,S is the principal sub-matrix of K indexed by S. It is known that f is monotone submodular [5]. Exemplar-Based Clustering: Another natural application is to select a small number of exemplars from the data representing the clusters present in it. A natural utility function (see, [1] and [17]) is f(S) = L({e0}) −L(S ∪{e0}) where L(S) = 1 |V | P e∈V minυ∈S d(e, υ) is the k-medoid loss function and e0 is an appropriately chosen reference element. The utility function f is monotone submodular [1]. The goal of distributed submodular cover here is to select the smallest set of exemplars that satisfies a specified bound on the loss. 4 The DISCOVER Algorithm for Distributed Submodular Cover On a high level, our main approach is to reduce the submodular cover to a sequence of cardinality constrained submodular maximization problems1, a problem for which good distributed algorithms (e.g., GREEDI [17, 25, 26]) are known. Concretely, our reduction is based on a combination of the following three ideas. To get an intuition, we will first assume that we have access to an optimum algorithm which can solve cardinality constrained submodular maximization exactly, i.e., solve, for some specified ℓ, Aoc[ℓ] = arg max |S|≤ℓf(S). (2) We will then consider how to solve the problem when, instead of Aoc[ℓ], we only have access to an approximation algorithm for cardinality constrained maximization. Lastly, we will illustrate how we can parametrize our algorithm to trade-off the number of rounds of the distributed algorithm versus communication cost per round. 4.1 Estimating Size of the Optimal Solution Momentarily, assume that we have access to an optimum algorithm OPTCARD(V, ℓ) for computing Aoc[ℓ] on the ground set V . Then one simple way to solve the submodular cover problem would be to incrementally check for each ℓ= {1, 2, 3, . . .} if f(Aoc[ℓ]) ≥Q. But this is very inefficient since it will take k = |Ac| rounds of running the distributed algorithm for computing Aoc[ℓ]. A simple fix that we will follow is to instead start with ℓ= 1 and double it until we find an ℓsuch that f(Aoc[ℓ]) ≥Q. This way we are guaranteed to find a solution of size at most 2k in at most ⌈log2(k)⌉rounds of running Aoc[ℓ]. The pseudocode is given in Algorithm 1. However, in practice, we cannot run Algorithm 1. In particular, there is no efficient way to identify the optimum subset Aoc[ℓ] in set V , unless P=NP. Hence, we need to rely on approximation algorithms. 4.2 Handling Approximation Algorithms for Submodular Maximization Assume that there is a distributed algorithm DISCARD(V, m, ℓ), for cardinality constrained submodular maximization, that runs on the dataset V with m machines and provides a set Agd[m, ℓ] with λ-approximation guarantee to the optimal solution Aoc[ℓ], i.e., f(Agd[m, ℓ]) ≥λf(Aoc[ℓ]). Let us assume that we could run DISCARD with the unknown value ℓ= k. Then the solution we get satisfies f(Agd[m, k]) ≥λQ. Thus, we are not guaranteed to get Q anymore. Now, what we can do (still under the assumption that we know k) is to repeatedly run DISCARD in order to augment our solution set until we get the desired value Q. Note that for each invocation of DISCARD, to find a set of size ℓ= k, we have to take into account the solutions A that we have accumulated so far. So, 1Note that while reduction from submodular coverage to submodular maximization has been used (e.g., [27]), the straightforward application to the distributed setting incurs large communication cost. 4 Algorithm 1 Approximate Submodular Cover Input: Set V , constraint Q. Output: Set A. 1: ℓ= 1. 2: Aoc[ℓ] = OPTCARD(V, ℓ). 3: while f(Aoc[ℓ]) < Q do 4: ℓ= ℓ× 2. 5: Aoc[l] = OPTCARD(V, ℓ). 6: A = Aoc[ℓ]. 7: Return A. Algorithm 2 Approximate OPTCARD Input: Set V , #of partitions m, constraint Q, ℓ. Output: Set Adc[m]. 1: r = 0, Agd[m, ℓ] = ∅, . 2: while f(Agd[m, ℓ]) < Q do 3: A = Agd[m, ℓ]. 4: r = r + 1. 5: Agd[m, ℓ] = DISCARD(V, m, ℓ, A). 6: if f(Agd[m, ℓ])−f(A) ≥λ(Q−f(A)) then 7: Adc[m] = {Agd[m, ℓ] ∪A}. 8: else 9: break 10: Return Adc[m]. by overloading the notation, DISCARD(V, m, ℓ, A) returns a set of size ℓgiven that A has already been selected in previous rounds (i.e., DISCARD computes the marginal gains w.r.t. A). Note that at every invocation –thanks to submodularity– DISCARD increases the value of the solution by at least λ(Q −f(A)). Therefore, by running DISCARD at most ⌈log(Q)/λ⌉times we get Q. Unfortunately, we do not know the optimum value k. So, we can feed an estimate ℓof the size of the optimum solution k to DISCARD. Now, again thanks to submodularity, DISCARD can check whether this ℓis good enough or not: if the improvement in the value of the solution is not at least λ(Q −f(A)) during the augmentation process, we can infer that ℓis a too small estimate of k and we cannot get the desired value Q by using ℓ– so we apply the doubling strategy again. Theorem 4.1. Let DISCARD be a distributed algorithm for cardinality-constrained submodular maximization with λ approximation guarantee. Then, Algorithm 1 (where OPTCARD is replaced with Approximate OPTCARD, Algorithm 2) runs in at most ⌈log(k) + log(Q)/λ + 1⌉rounds and produces a solution of size at most ⌈2k + 2 log(Q)k/λ⌉. 4.3 Trading Off Communication Cost and Number of Rounds While Algorithm 1 successfully finds a distributed solution Adc[m] with f(Adc[m]) ≥Q, (c.f. 4.1), the intermediate problem instances (i.e., invocations of DISCARD) are required to select sets of size up to twice the size of the optimal solution k, and these solutions are communicated between all machines. Oftentimes, k is quite large and we do not want to have such a large communication cost per round. Now, instead of finding an ℓ≥k what we can do is to find a smaller ℓ≥αk, for 0 < α ≤1 and augment these smaller sets in each round of Algorithm 2. This way, the communication cost reduces to an α fraction (per round), while the improvement in the value of the solution is at least αλ(Q −f(Agd[m, ℓ])). Consequently, we can trade-off the communication cost per round with the total number of rounds. As a positive side effect, for α < 1, since in each invocation of DISCARD it returns smaller sets, the final solution set size can potentially get closer to the optimum solution size k. For instance, for the extreme case of α = 1/k we recover the solution of the sequential greedy algorithm (up to O(1/λ)). We see this effect in our experimental results. 4.4 DISCOVER The DISCOVER algorithm is shown in Algorithm 3. The algorithm proceeds in rounds, with communication between machines taking place only between successive rounds. In particular, DISCOVER takes the ground set V , the number of partitions m, and the trade-off parameter α. It starts with ℓ= 1, and Adc[m] = ∅. It then augments the set Adc[m] with set Agd[m, ℓ] of at most ℓnew elements using an arbitrary distributed algorithm for submodular maximization under cardinality constraint, DISCARD. If the gain from adding Agd[m, ℓ] to Adc[m] is at least αλ(Q −f(Agd[m, ℓ])), then we continue augmenting Agd[m, ℓ] with another set of at most ℓelements. Otherwise, we double ℓand restart the process with 2ℓ. We repeat this process until we get Q. Theorem 4.2. Let DISCARD be a distributed algorithm for cardinality-constrained submodular maximization with λ approximation guarantee. Then, DISCOVER runs in at most ⌈log(αk) + log(Q)/(λα) + 1⌉rounds and produces a solution of size ⌈2αk + log(Q)2k/λ⌉. 5 Algorithm 3 DISCOVER Input: Set V , #of partitions m, constraint Q, trade off parameter α. Output: Set Adc[m]. 1: Adc[m] = ∅, r = 0. 2: while f(Adc[m]) < Q do 3: r = r + 1. 4: Agd[m, ℓ] = DISCARD(V, m, ℓ, Adc[m]). 5: if f(Adc[m] ∪Agd[m, ℓ]) −f(Adc[m]) ≥αλ(Q −f(Adc[m])) then 6: Adc[m] = {Adc[m] ∪Agd[m, ℓ]}. 7: else 8: ℓ= ℓ× 2. 9: Return Adc[m]. GREEDI as Subroutine: So far, we have assumed that a distributed algorithm DISCARD that runs on m machines is given to us as a black box, which can be used to find sets of cardinality ℓand obtain a λ-factor of the optimal solution. More concretely, we can use GREEDI, a recently proposed distributed algorithm for maximizing submodular functions under a cardinality constraint [17] (outlined in Algorithm 4). It first distributes the ground set V to m machines. Then each machine i separately runs the standard greedy algorithm to produce a set Agc i [ℓ] of size ℓ. Finally, the solutions are merged, and another round of greedy selection is performed (over the merged results) in order to return the solution Agd[m, ℓ] of size ℓ. It was proven that GREEDI provides a (1 − e−1)2/ min(m, ℓ)-approximation to the optimal solution [17]. Here, we prove a (tight) improved bound on the performance of GREEDI. More formally, we have the following theorem. Theorem 4.3. Let f be a monotone submodular function and let ℓ> 0. Then, GREEDI produces a solution Agd[m, ℓ] where f(Agd[m, ℓ]) ≥ 1 36√ min(m,ℓ)f(Ac[ℓ]). Algorithm 4 Greedy Distributed Submodular Maximization (GREEDI) Input: Set V , #of partitions m, constraint ℓ. Output: Set Agd[m, ℓ]. 1: Partition V into m sets V1, V2, . . . , Vm. 2: Run the standard greedy algorithm on each set Vi. Find a solution Agc i [ℓ]. 3: Merge the resulting sets: B = ∪m i=1Agc i [ℓ]. 4: Run the standard greedy algorithm on B until ℓelements are selected. Return Agd[m, ℓ]. We illustrate the resulting algorithm DISCOVER using GREEDI as subroutine in Figure 1. By combining Theorems 4.2 and 4.3, we will have the following. Corollary 4.4. By using GREEDI, we get that DISCOVER produces a solution of size ⌈2αk + 72 log(Q)k p min(m, αk))⌉and runs in at most ⌈log(αk)+36 p min(m, αk) log(Q)/α+1⌉rounds. Note that for a constant number of machines m, α = 1 and a large solution size αk ≥m, the above result simply implies that in at most O(log(kQ)) rounds, DISCOVER produces a solution of size O(k log Q). In contrast, the greedy solution with O(k log Q) rounds (which is much larger than O(log(kQ))) produces a solution of the same quality. Very recently, a (1 −e−1)/2-approximation guarantee was proven for the randomized version of GREEDI [26, 25]. This suggests that, if it is possible to reshuffle (i.e., randomly re-distribute V among the m machines) the ground set each time that we revoke GREEDI, we can benefit from these stronger approximation guarantees (which are independent of m and k). Note that Theorem 4.2 does not directly apply here, since it requires a deterministic subroutine for constrained submodular maximization. We defer the analysis to a longer version of this paper. As a final technical remark, for our theoretical results to hold we have assumed that the utility function f is integral. In some applications (like active set selection) this assumption may not hold. In these cases, either we can appropriately discretize and rescale the function, or instead of achieving 6 Data Cluster Nodes Cover GreeDi r = 1 r = 2 GreeDi … … … Figure 1: Illustration of our multi-round algorithm DISCOVER , assuming it terminates in two rounds (without doubling search for ℓ). the utility Q, try to reach (1 −ϵ)Q, for some 0 < ϵ < 1. In the latter case, we can simply replace Q with Q/ϵ in Theorem 4.2. 5 Experiments In our experiments we wish to address the following questions: 1) How well does DISCOVER perform compare to the centralized greedy solution; 2) How is the trade-off between the solution size and the number of rounds affected by parameter α; and 3) How well does DISCOVER scale to massive data sets. To this end, we run DISCOVER on three scenarios: exemplar based clustering, active set selection in GPs, and vertex cover problem. For vertex cover, we report experiments on a large social graph with more than 65.6 million vertices and 1.8 billion edges. Since the constant in Theorem 4.3 is not optimized, we used λ = 1/ p min(m, k) in all the experiments. Exemplar based Clustering. Our exemplar based clustering experiments involve DISCOVER applied to the clustering utility f(S) described in Section 3.2 with d(x, x′) = ∥x −x′∥2. We perform our experiments on a set of 10,000 Tiny Images [28]. Each 32 by 32 RGB pixel image is represented as a 3,072 dimentional vectors. We subtract from each vector the mean value, then normalize it to have unit norm. We use the origin as the auxiliary exemplar for this experiment. Fig. 2a compares the performance of our approach to the centralized benchmark with the number of machines set to m = 10 and varying coverage percentage Q = (1 −ϵ)f(V ). Here, we have β = (1 −ϵ). It can be seen that DISCOVER provides a solution which is very close to the centralized solution, with a number of rounds much smaller than the solution size. Varying α results in a tradeoff between solution size and number of rounds. Active Set Selection. Our active set selection experiments involve DISCOVER applied to the log-determinant function f(S) described in Section 3.2, using an exponential kernel K(ei, ej) = exp(−|ei −ej|2/0.75). We use the Parkinsons Telemonitoring dataset [29] comprised of 5,875 biomedical voice measurements with 22 attributes from people in early-stage Parkinson’s disease. Fig. 2b compares the performance of our approach to the benchmark with the number of machines set to m = 6 and varying coverage percentage Q = (1−ϵ)f(V ). Again, DISCOVER performs close to the centralized greedy solution, even with very few rounds. Again we see a tradeoff by varying α. Large Scale Vertex Cover with Spark. As our large scale experiment, we applied DISCOVER to the Friendster network consists of 65,608,366 nodes and 1,806,067,135 edges [30]. The average outdegree is 55.056 while the maximum out-degree is 5,214. The disk footprint of the graph is 30.7GB, stored in 246 part files on HDFS. Our experimental infrastructure was a cluster of 8 quad-core machines with 32GB of memory each, running Spark. We set the number of reducers to m = 64. Each machine carried out a set of map/reduce tasks in sequence, where each map/reduce stage corresponds to running GREEDI with a specific values of ℓon the whole data set. We first distributed the data uniformly at random to the machines, where each machine received ≈1,025,130 vertices (≈12.5GB RAM). Then we start with ℓ= 1, perform a map/reduce task to extract one element. We then communicate back the results to each machine and based on the improvement in the value of the solution, we perform another round of map/reduce calculation with either the the same value for ℓor 2 × ℓ. We continue performing map/reduce tasks until we get the desired value Q. We examine the performance of DISCOVER by obtaining covers for 50%, 30%, 20% and 10% of the whole graph. The total running time of the algorithm for the above coverage percentages with α = 1 was about 5.5, 1.5, 0.6 and 0.1 hours respectively. For comparison, we ran the centralized 7 Number of Rounds 20 40 60 80 100 Solution Set Size 500 1000 1500 2000 2500 3000 DisCover 0 = 0.20 Greedy 0 = 0.20 DisCover 0 = 0.23 Greedy 0 = 0.23 DisCover 0 = 0.24 Greedy 0 = 0.24 DisCover 0 = 0.25 Greedy 0 = 0.25 , = 0.1 , = 1, = 0.4 , = 0.2 , = 1 , = 1 , = 1 , = 0.6 , = 0.2 , = 0.1 , = 0.2 , = 0.1 (a) Images 10K Number of Rounds 0 50 100 150 200 Solution Set Size 0 500 1000 1500 2000 2500 DisCover 0 = 0.20 Greedy 0 = 0.20 DisCover 0 = 0.35 Greedy 0 = 0.35 DisCover 0 = 0.55 Greedy 0 = 0.55 DisCover 0 = 0.65 Greedy 0 = 0.65 , = 0.1 , = 0.05 , = 0.01 , = 0.05 , = 1 , = 0.1 , = 0.05 , = 1 , = 1 , = 1 , = 0.4 , = 0.1 , = 0.1, = 0.05 , = 0.4 (b) Parkinsons Telemonitoring 0 50 100 150 200 #105 3 3.2 3.4 3.6 3.8 4 DisCover 0 = 0.5 Greedy 0 = 0.5 0 100 200 300 400 #104 4.7 4.75 4.8 4.85 4.9 4.95 DisCover 0 = 0.7 Greedy 0 = 0.7 Number of Rounds 0 100 200 300 400 Solution Set Size #104 1.5 1.6 1.7 1.8 1.9 2 DisCover 0 = 0.8 Greedy 0 = 0.8 0 20 40 60 80 100 3700 3800 3900 4000 4100 DisCover 0 = 0.9 Greedy 0 = 0.9 , = 0.4 , = 0.1 , = 0.2 , = 0.1 , = 0.4 , = 0.2 , = 0.1 , = 0.05 , = 0.2 , = 1 , = 0.4 , = 1 , = 0.1 , = 1 , = 0.01 , = 0.2 , = 1, 0.4 (c) Friendster Figure 2: Performance of DISCOVER compared to the centralized solution. a, b) show the solution set size vs. the number of rounds for various α, for a set of 10,000 Tiny Images and Parkinsons Telemonitoring. c) shows the same quantities for the Friendster network with 65,608,366 vertices. greedy on a computer of 24 cores and 256GB memory. Note that, loading the entire data set into memory requires 200GB of RAM, and running the centralized greedy algorithm for 50% cover requires at least another 15GB of RAM. This highlights the challenges in applying the centralized greedy algorithm to larger scale data sets. Fig. 2c shows the solution set size versus the number of rounds for various α and different coverage constraints. We find that by decreasing α, DISCOVER’s solutions quickly converge (in size) to those obtained by the centralized solution. 6 Conclusion We have developed the first efficient distributed algorithm –DISCOVER – for the submodular cover problem. We have theoretically analyzed its performance and showed that it can perform arbitrary close to the centralized (albeit impractical in context of large data sets) greedy solution. We also demonstrated the effectiveness of our approach through extensive experiments, including vertex cover on a graph with 65.6 million vertices using Spark. We believe our results provide an important step towards solving submodular optimization problems in very large scale, real applications. Acknowledgments. This research was supported by ERC StG 307036, a Microsoft Faculty Fellowship and an ETH Fellowship. 8 References [1] Ryan Gomes and Andreas Krause. Budgeted nonparametric learning from data streams. In ICML, 2010. [2] Sebastian Tschiatschek, Rishabh Iyer, Haochen Wei, and Jeff Bilmes. Learning Mixtures of Submodular Functions for Image Collection Summarization. In NIPS, 2014. [3] Khalid El-Arini, Gaurav Veda, Dafna Shahaf, and Carlos Guestrin. Turning down the noise in the blogosphere. In KDD, 2009. [4] Khalid El-Arini and Carlos Guestrin. Beyond keyword search: Discovering relevant scientific literature. In KDD, 2011. [5] Andreas Krause and Daniel Golovin. Submodular function maximization. In Tractability: Practical Approaches to Hard Problems. Cambridge University Press, 2013. [6] Laurence A. Wolsey. An analysis of the greedy algorithm for the submodular set covering problem. Combinatorica, 1982. [7] Uriel Feige. A threshold of ln n for approximating set cover. Journal of the ACM, 1998. [8] J. Dean and S. Ghemawat. Mapreduce: Simplified data processing on large clusters. In OSDI, 2004. [9] Matei Zaharia, Mosharaf Chowdhury, Michael J Franklin, Scott Shenker, and Ion Stoica. In Spark: cluster computing with working sets, pages 181–213. Springer, 2010. [10] David Kempe, Jon Kleinberg, and ´Eva Tardos. Maximizing the spread of influence through a social network. In Proceedings of the ninth ACM SIGKDD, 2003. [11] Andreas Krause and Carlos Guestrin. Intelligent information gathering and submodular function optimization. Tutorial at the International Joint Conference in Artificial Intelligence, 2009. [12] Daniel Golovin and Andreas Krause. Adaptive submodularity: Theory and applications in active learning and stochastic optimization. Journal of Artificial Intelligence Research, 2011. [13] Bonnie Berger, John Rompel, and Peter W Shor. Efficient nc algorithms for set cover with applications to learning and geometry. Journal of Computer and System Sciences, 1994. [14] Guy E. Blelloch, Richard Peng, and Kanat Tangwongsan. Linear-work greedy parallel approximate set cover and variants. In SPAA, 2011. [15] Stergios Stergiou and Kostas Tsioutsiouliklis. Set cover at web scale. In SIGKDD. ACM, 2015. [16] Flavio Chierichetti, Ravi Kumar, and Andrew Tomkins. Max-cover in map-reduce. In WWW, 2010. [17] Baharan Mirzasoleiman, Amin Karbasi, Rik Sarkar, and Andreas Krause. Distributed submodular maximization: Identifying representative elements in massive data. In NIPS, 2013. [18] Ravi Kumar, Benjamin Moseley, Sergei Vassilvitskii, and Andrea Vattani. Fast greedy algorithms in mapreduce and streaming. In SPAA, 2013. [19] Baharan Mirzasoleiman, Ashwinkumar Badanidiyuru, Amin Karbasi, Jan Vondrak, and Andreas Krause. Lazier than lazy greedy. In AAAI, 2015. [20] Ashwinkumar Badanidiyuru, Baharan Mirzasoleiman, Amin Karbasi, and Andreas Krause. Streaming submodular maximization: Massive data summarization on the fly. In SIGKDD. ACM, 2014. [21] Silvio Lattanzi, Benjamin Moseley, Siddharth Suri, and Sergei Vassilvitskii. Filtering: a method for solving graph problems in mapreduce. In SPAA, 2011. [22] Roberto Battiti. Using mutual information for selecting features in supervised neural net learning. Neural Networks, IEEE Transactions on, 5(4):537–550, 1994. [23] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning). 2006. [24] Alex Kulesza and Ben Taskar. Determinantal point processes for machine learning. Mach. Learn, 2012. [25] Rafael Barbosa, Alina Ene, Huy L. Nguyen, and Justin Ward. The power of randomization: Distributed submodular maximization on massive datasets. In arXiv, 2015. [26] Vahab Mirrokni and Morteza Zadimoghaddam. Randomized composable core-sets for distributed submodular maximization. In STOC, 2015. [27] Rishabh K Iyer and Jeff A Bilmes. Submodular optimization with submodular cover and submodular knapsack constraints. In NIPS, pages 2436–2444, 2013. [28] Antonio Torralba, Rob Fergus, and William T Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. TPAMI, 2008. [29] Athanasios Tsanas, Max Little, Patrick McSharry, and Lorraine Ramig. Enhanced classical dysphonia measures and sparse regression for telemonitoring of parkinson’s disease progression. In ICASSP, 2010. [30] Jaewon Yang and Jure Leskovec. Defining and evaluating network communities based on ground-truth. Knowledge and Information Systems, 42(1):181–213, 2015. 9 | 2015 | 300 |
5,815 | Robust PCA with compressed data Wooseok Ha University of Chicago haywse@uchicago.edu Rina Foygel Barber University of Chicago rina@uchicago.edu Abstract The robust principal component analysis (RPCA) problem seeks to separate lowrank trends from sparse outliers within a data matrix, that is, to approximate a n⇥d matrix D as the sum of a low-rank matrix L and a sparse matrix S. We examine the robust principal component analysis (RPCA) problem under data compression, where the data Y is approximately given by (L+S)·C, that is, a low-rank + sparse data matrix that has been compressed to size n ⇥m (with m substantially smaller than the original dimension d) via multiplication with a compression matrix C. We give a convex program for recovering the sparse component S along with the compressed low-rank component L · C, along with upper bounds on the error of this reconstruction that scales naturally with the compression dimension m and coincides with existing results for the uncompressed setting m = d. Our results can also handle error introduced through additive noise or through missing data. The scaling of dimension, compression, and signal complexity in our theoretical results is verified empirically through simulations, and we also apply our method to a data set measuring chlorine concentration across a network of sensors to test its performance in practice. 1 Introduction Principal component analysis (PCA) is a tool for providing a low-rank approximation to a data matrix D 2 Rn⇥d, with the aim of reducing dimension or capturing the main directions of variation in the data. More recently, there has been increased focus on more general forms of PCA, that is more robust to realistic flaws in the data such as heavy-tailed outliers. The robust PCA (RPCA) problem formulates a decomposition of the data, D ⇡L + S , into a low-rank component L (capturing trends across the data matrix) and a sparse component S (capturing outlier measurements that may obscure the low-rank trends), which we seek to separate based only on observing the data matrix D [3, 10]. Depending on the application, we may be primarily interested in one or the other component: • In some settings, the sparse component S may represent unwanted outliers, e.g. corrupted measurements—we may wish to clean the data by removing the outliers and recovering the low-rank component L. • In other settings, the sparse component S may contain the information of interest—for instance, in image or video data, S may capture the foreground objects which are of interest, while L may capture background components which we wish to subtract. Existing methods to separate the sparse and low-rank components include convex [3, 10] and nonconvex [9] methods, and can handle extensions or additional challenges such as missing data [3], column-sparse rather than elementwise-sparse structure [11], streaming data [6, 7], and different types of structures superimposed with a low-rank component [1]. 1 In this paper, we examine the possibility of demixing sparse and low rank structure, under the additional challenge of working with data that has been compressed, Y = D · C ⇡(L + S) · C 2 Rn⇥m , where L, S 2 Rn⇥d comprise the (approximately) low-rank and (approximately) sparse components of the original data matrix D, while C 2 Rd⇥m is a random or fixed compression matrix. In general, we think of the compression dimension m as being significantly smaller than d, motivated by several considerations: • Communication constraints: if the n ⇥d data matrix consists of d-dimensional measurements taken at n remote sensors, compression would allow the sensors to transmit information of dimension m ⌧d; • Storage constraints: storing a matrix with nm many entries instead of nd many entries; • Data privacy: if the data is represented as the n ⇥d matrix, where n-dimensional features were collected from d individuals, we can preserve privacy by compressing the data by a random linear transformation and allow the access to database only through the compressed data. This privacy-preserving method has been called matrix masking in the privacy literature and studied by [12] in the context of high-dimensional linear regression. Random projection methods have been shown to be highly useful for reducing dimensionality without much loss of accuracy for numerical tasks such as least squares regression [8] or low-rank matrix computations [5]. Here we use random projections to compress data while preserving the information about the underlying low-rank and sparse structure. [13] also applied random projection methods to the robust PCA problem, but their purpose is to accelerate the computational task of low-rank approximation, which is different from the aim of our work. In the compressed robust PCA setting, we hope to learn about both the low-rank and sparse components. Unlike compressed sensing problems where sparse structure may be reconstructed perfectly with undersampling, here we face a different type of challenge: • The sparse component S is potentially identifiable from the compressed component S · C, using the tools of compressed sensing; however, • The low-rank component L is not identifiable from its compression L · C. Specifically, if we let PC 2 Rd⇥d be the projection operator onto the column span of C, then the two low-rank matrices L and L0 = L · PC cannot be distinguished after multiplication by C. Therefore, our goal will be to recover both the sparse component S, and the compressed low-rank component L · C. Note that recovering L · C is similar to the goal of recovering the column span of L, which may be a useful interpretation if we think of the columns of the data matrix D as data points lying in Rn; the column span of L characterizes a low-rank subspace of Rn that captures the main trends in the data. Notation We will use the following notation throughout the paper. We write [n] = {1, . . . , n} for any n ≥1. We write kvk0 or kMk0 to denote the number of nonzero entries in a vector v or matrix M (note that this is not in fact a norm). Mi⇤denotes the ith row of a matrix M and is treated as a column vector. We will use the matrix norms kMkF (Frobenius norm), kMk1 (elementwise `1 norm), kMk1 (elementwise `1 norm), kMk (spectral norm, i.e. largest singular value), and kMk⇤ (nuclear norm, also known as the trace norm, given by the sum of the singular values of M). 2 Problem and method We begin by formally defining the problem at hand. The data, which takes the form of a n ⇥d matrix, is well-approximated by a sum L? + S?, where L? is low-rank and S? is sparse. However, we can only access this data through a (noisy) compression: our observed data is the n ⇥m matrix Y = (L? + S?) · C + Z , (1) where C 2 Rd⇥m is the compression matrix, and Z 2 Rn⇥m absorbs all sources of error and noise—we discuss specific models for Z later on. 2 Given this model, our goal will be to learn about both the low-rank and sparse structure. In the ordinary robust PCA setting, the task of separating the low-rank and sparse components has been known to be possible when the underlying low-rank component L? satisfies certain conditions, e.g. incoherence condition in [3] or spikiness condition in [1]. In order to successfully decompose the low-rank and sparse component in the compressed data, we thus need the similar conditions to hold for the compressed low-rank component, which we define as the product P ? := L? · C. As we will see, if L? satisfies the spikiness condition, i.e. kL?k1 ↵0, then the compressed low-rank component P ? satisfies the similar spikiness condition, i.e. a bound on kP ?Ck1. This motivates the possibility to recover both the low-rank and sparse components in the case of compressed data. As discussed above, while we can aim to recover the sparse component S?, there is no hope to recover the original low-rank component L?, since L? is not identifiable in the compressed model. Therefore, we propose a natural convex program for recovering the underlying compressed lowrank component P ? = L? · C and the sparse component S?. Note that as discussed in [5], random projection preserves the column span of L?, and so we can recover the column span of L? via P ?. We define our estimators of the sparse component S?, and the low-rank product P ?, as follows: ( bP, bS) = arg min (P,S):kP C>k1↵ ⇢1 2kY −P −S · Ck2 F + ⌫kPk⇤+ λkSk1 # . (2) Note that we impose the spikiness condition kPC>k1 ↵on P, in order to guarantee good performance for demixing such two superimposed components—in later section, we will see that the same condition holds for P ?. This method is parametrized by the triple (↵, ⌫, λ), and natural scalings for these tuning parameters are discussed alongside our theoretical results. 2.1 Sources of errors and noise Next, we give several examples of models and interpretations for the error term Z in (1). Random noise First, we may consider a model where the signal has an exact low-rank + sparse decomposition, with well-behaved additive noise added before and/or after the compression step: Y = (L? + S? + Zpre) · C + Zpost , where the entries of the pre- and post-compression noise, Zpre and Zpost, are i.i.d. mean-zero subgaussian random variables. In this case, the noise term Z in (1) is given by Z = Zpre · C + Zpost. Misspecified model Next, we may consider a case where the original data can be closely approximated by a low-rank + sparse decomposition, but this decomposition is not exact. In this case, we could express the original (uncompressed) data as L? +S? +Zmodel, where Zmodel captures the error of the low-rank + sparse decomposition. Then this model misspecification can be absorbed into the noise term Z, i.e. Z = Zmodel · C. Missing data Given an original data matrix D = L? + S?, we might have access only to a partial version of this matrix. We write D⌦to denote the available data, where ⌦⇢[n] ⇥[d] indexes the entries where data is available, and (D⌦)ij = Dij · ij2⌦. Then, a low-rank + sparse model for our compressed data is given by Y = D⌦· C = (L? + S? ⌦) · C + Zmissing · C , where Zmissing = L? ⌦−L?. In some settings, we may first want to adjust D⌦before compressing the data, for instance, by reweighting the observed entries in D⌦to ensure a closer approximation to D. Denoting the reweighted matrix of partial observations by eD⌦, we have compressed data Y = eD⌦· C = (L? + eS? ⌦) · C + Zmissing · C , with Zmissing = eL? ⌦−L?, and where eS? ⌦is the reweighted matrix of S? ⌦. Then the error from the missing data can be absorbed into the Z term, i.e. Z = Zmissing · C. Combinations Finally, the observed data Y may differ from the compressed low-rank + sparse decomposition (L? +S?)·C due to a combination of the factors above, in which case we may write Z = (Zpre + Zmodel + Zmissing) · C + Zpost . 3 2.2 Models for the compression matrix C Next, we consider several scenarios for the compression matrix C. Random compression In some settings, the original data naturally lies in Rn⇥d, but is compressed by the user for some purpose. For instance, if we have data from d individuals, with each data point lying in Rn, we may compress this data for the purpose of providing privacy to the individuals in the data set. Alternately, we may compress data to adhere to constraints on communication bandwidth or on data storage. In either case, we control the choice of the compression matrix C, and are free to use a simple random model. Here we consider two models: Gaussian model: the entries of C are generated as Cij iid ⇠N(0, 1/m). (3) Orthogonal model: C = p d/m · U, where U 2 Rd⇥m is an orthonormal matrix chosen uniformly at random. (4) Note that in each case, E ⇥ CC>⇤ = Id. Multivariate regression / multitask learning In a multivariate linear regression, we observe a matrix of data Y that follows a model Y = X · B + W where X is an observed design matrix, B is an unknown matrix of coefficients (generally the target parameter), and W is a matrix of noise terms. Often, the rows of Y are thought of as (independent) samples, where each row is a multivariate response. In this setting, the accuracy of the regression can often be improved by leveraging low-rank or sparse structure that arises naturally in the matrix of coefficients B. If B is approximately low-rank + sparse, the methodology of this paper can be applied: taking the transpose of the multivariate regression model, we have Y > = B> · X> + W >. Compare to our initial model (1), where we replace Y with Y >, and use the compression matrix C = X>. Then, if B> ⇡L? +S? is a low-rank + sparse approximation, the multivariate regression can be formulated as a problem of the form (1) by setting the error term to equal Z = (B> −L? −S?) · X> + W >. 3 Theoretical results In this section, we develop theoretical error bounds for the compressed robust PCA problem under several of the scenarios described above. We first give a general deterministic result in Section 3.1, then specialize this result to handle scenarios of pre- and post-compression noise and missing data. Results for multivariate regression are given in the Supplementary Materials. 3.1 Deterministic result We begin by stating a version of the Restricted Eigenvalue property found in the compressed sensing and sparse regression literature [2]: Definition 1. For a matrix X 2 Rm⇥d and for c1, c2 ≥0, X satisfies the restricted eigenvalue property with constants (c1, c2), denoted by REm,d(c1, c2), if kXvk2 ≥c1kvk2 −c2 · r log(d) m · kvk1 for all v 2 Rd . (5) We now give our main result for the accuracy of the convex program (2), a theorem that we will see can be specialized to many of the settings described earlier. This theorem gives a deterministic result and does not rely on a random model for the compression matrix C or the error matrix Z. Theorem 1. Let L? 2 Rn⇥d be any matrix with rank(L?) r, and let S? 2 Rn⇥d be any matrix with at most s nonzero entries per row, that is, maxikS? i⇤k0 s. Let C 2 Rd⇥m be any compression matrix and define the data Y and the error/noise term Z as in (1). Let P ? = L? · C as before. Suppose that C> satisfies REm,d(c1, c2), where c0 := c1 −c2 · p 16s log(d)/m > 0. If parameters (↵, ⌫, λ) satisfy ↵≥kL?CC>k1, ⌫≥2kZk, λ ≥2kZC>k1 + 4↵, (6) then deterministically, the solution ( bP, bS) to the convex program (2) satisfies k bP −P ?k2 F + c2 0kbS −S?k2 F 18r⌫2 + 9c−2 0 snλ2 . 4 We now highlight several applications of this theorem to specific settings: a random compression model with Gaussian or subgaussian noise, and a random compression model with missing data. (An application to the multivariate linear regression model is given in the Supplementary Materials.) 3.2 Results for random compression with subgaussian noise Suppose compression matrix C is random, and that the error term Z in the model (1) comes from i.i.d. subgaussian noise, e.g. measurement error that takes place before and/or after the compression: Z = Zpre · C + Zpost . Our model for this setting is as follows: for fixed matrices L? and S?, where rank(L?) r and maxikS? i⇤k0 s, we observe data Y = (L? + S? + Zpre) · C + Zpost , (7) where the compression matrix C is generated under either the Gaussian (3) or orthogonal (4) model, and where the noise matrices Zpre, Zpost are independent from each other and from C, with entries (Zpre)ij iid ⇠N(0, σ2 pre) and (Zpost)ij iid ⇠N(0, σ2 post) . For this section, we assume d ≥m without further comment (that is, the compression should reduce the dimension of the data). Let σ2 max ≥max{σ2 pre, σ2 post}. Specializing the result of Theorem 1 to this setting, we obtain the following probablistic guarantee: Theorem 2. Assume the model (7). Suppose that rank(L?) r, maxikS? i⇤k0 s, and kL?k1 ↵0. Then there exist universal constants c, c0, c00 > 0 such that if we define ↵= 5↵0 r d log(nd) m , ⌫= 24σmax r d(n + m) m , λ = 32σmax r d log(nd) m + 4↵, and if m ≥c · s log(nd), then the solution ( bP, bS) to the convex program (2) satisfies k bP −P ?k2 F + kbS −S?k2 F c0 · d m ) σ2 max · r(n + m) + (σ2 max + ↵2 0) · sn log(nd) * (8) with probability at least 1 −c00 nd. Remark 1. If the entries of Zpre and Zpost are subgaussian rather than Gaussian, then the same result holds, except for a change in the constants appearing in the parameters (↵, ⌫, λ). (Recall that a random variable X is σ2-subgaussian if E ⇥ etX⇤ et2σ2/2 for all t 2 R.) Remark 2. In the case d = m, our result matches Corollary 2 in Agarwal et al [1] exactly, except that our result involves multiplicative logarithm factor log(nd) in the ↵0 term whereas theirs does not.1 This additional log factor arises when we upper bound kL?CC>k1, which is unavoidable if we want the bound to hold with high probability. Remark 3. Theorem 2 shows the natural scaling: the first term r(n+m) is the degree of freedom for compressed rank r matrix P whereas the term sn log(nd) is the signal complexity of sparse component S, which has sn many nonzero entries. The multiplicative factor d mσ2 max can be interpreted as the noise variance of the problem amplified by the compression. 3.3 Results for random compression with missing data Next, we consider a missing data scenario where the original n ⇥d matrix is only partially observed. The original (complete) data is D = L? + S? 2 Rn⇥d, a low-rank + sparse decomposition.2 However, only a subset ⌦⇢[n] ⇥[d] of entries are observed—we are given access to Dij for each (i, j) 2 ⌦. After a reweighting step, we compress this data with a compression matrix C 2 Rd⇥m, for instance, in order to reduce communication, storage, or computation requirements. 1Note that s · n in our paper is equivalent to s in [1], since their work defines s to be the total number of nonzero entries in S? while we count entries per row. 2For clarity of presentation, we do not include additive noise before or after compression in this section. However, our theoretical analysis for additive noise (Theorem 2) and for missing data (Theorem 3) can be combined in a straightforward way to obtain an error bound scaling as a sum of the two respective bounds. 5 First, we specify a model for the missing data. For each (i, j) 2 [n] ⇥[d], let ⇢ij 2 [0, 1] be the probability that this entry is observed. Additionally, we assume that the sampling scheme is independent across all entries, and that the ⇢ij’s are known.3 To proceed, we first define a reweighted version of the partially observed data matrix and then multiply by the compression matrix C: Y = eD⌦· C where ( eD⌦)ij = Dij/⇢ij · ij2⌦. (9) Define also the reweighted versions of the low rank and sparse components, (eL? ⌦)ij = Lij/⇢ij · ij2⌦ and (eS? ⌦)ij = Sij/⇢ij · ij2⌦, and note that we then have Y = ⇣ eL? ⌦+ eS? ⌦ ⌘ · C = ⇣ L? + eS? ⌦ ⌘ · C + Z , (10) where Z = (eL? ⌦−L?)·C. The role of the reweighting step (9) is to ensure that this noise term Z has mean zero. Note that in the reformulation (10) of the model, Y is approximated with a compression of L? + eS? ⌦, where L? is the original low rank component while eS? ⌦is defined above. While the original sparse component S?, is not identifiable via the missing data model (since we have no information to help us recover entries S? ij for (i, j) 62 ⌦), this new decomposition L? + eS? ⌦now has a sparse component that is identifiable, since by definition, eS? ⌦preserves the sparsity of S? but has no nonzero entries in unobserved locations, that is, (eS? ⌦)ij = 0 whenever (i, j) 62 ⌦. With this model in place, we obtain the following probabilistic guarantee for this setting, which is another specialized version of Theorem 1. We note that we again have no assumptions on the values of the entries in S?, only on the sparsity level—e.g. there is no bound assumed on kS?k1. Theorem 3. Assume the model (9). Suppose that rank(L?) r, maxikS? i⇤k0 s, and kL?k1 ↵0. If the sampling scheme satisfies ⇢ij ≥⇢min for all (i, j) 2 [n] ⇥[d] for some positive constant ⇢min > 0, then there exist universal constants c, c0, c00 > 0 such that if we define ↵= 5↵0 r d log(nd) m , ⌫= 10⇢−1 min↵0 r d(n + m) log(nd) m , λ = 12⇢−1 min↵0 s d log2(nd) m + 4↵, and if m ≥c · s log(nd), then the solution ( bP, bS) to the convex program (2) satisfies k bP −P ?k2 F + kbS −eS? ⌦k2 F c0 · d m · ⇢−2 min↵2 0 ) r(n + m) log(nd) + sn log2(nd) * with probability at least 1 −c00 nd. 4 Experiments In this section, we first use simulated data to study the behavior of the convex program (2) for different compression dimensions, signal complexities and missing levels, which show the close agreement with the scaling predicted by our theory. We also apply our method to a data set consisting of chlorine measurements across a network of sensors. For simplicity, in all experiments, we select ↵= 1, which is easier for optimization and generally results in a solution that still has low spikiness (that is, the solution is the same as if we had imposed a bound with finite ↵). 4.1 Simulated data Here we run a series of simulations on compressed data to examine the performance of the convex program (2). In all cases, we used the compression matrix C generated under the orthogonal model (4). We solve the convex program (2) via alternating minimization over L and S, selecting the regularization parameters ⌫and λ that minimizes the squared Frobenius error. All results are averaged over 5 trials. 3In practice, the assumption that ⇢ij’s are known is not prohibitive. For example, we might model ⇢ij = ↵iβj (the row and column locations of the observed entries are chosen independently, e.g. see [4]), or a logistic model, log ⇣ ⇢ij 1−⇢ij ⌘ = ↵i + βj. In either case, fitting a model using the observed set ⌦is extremely accurate. 6 Compression ratio d/m 0 2 4 6 8 10 Total squared error ×105 0 0.5 1 1.5 2 n=d=800 n=d=400 Figure 1: Results for the noisy data experiment. The total squared error, calculated as in Theorem 2, is plotted against the compression ratio d/m. Note the linear scaling, as predicted by the theory. Rank 0 10 20 30 40 50 Total squared error ×104 0 0.5 1 1.5 2 Dimension n=d=200 m=50 m=100 m=150 m=200 Rank 0 10 20 30 40 50 Total squared error ×104 0 1 2 3 4 5 Dimension n=d=400 m=100 m=200 m=300 m=400 Sparsity proportion 0 0.02 0.04 0.06 0.08 0.1 Total squared error ×104 0 2 4 6 8 Dimension n=d=200 m=50 m=100 m=150 m=200 Sparsity proportion 0 0.02 0.04 0.06 0.08 0.1 Total squared error ×104 0 5 10 15 Dimension n=d=400 m=100 m=200 m=300 m=400 Figure 2: Results for the varying-rank (top row) and varying-sparsity (bottom row) experiments. The total squared error, calculated as in Theorem 2, is plotted against the rank r or sparsity proportion s/d. Note the nearly linear scaling for most values of m. Simulation 1: compression ratio. First we examine the role of the compression dimension m. We fix the matrix dimension n = d 2 {400, 800}. The low-rank component is given by L? = pr·UV >, where U and V are n ⇥r and d ⇥r matrices with i.i.d. N(0, 1) entries, for rank r = 10. The sparse component S? has 1% of its entries generated as 5 · N(0, 1), that is, s = 0.01d. The data is D = L? + S? + Z, where Zij iid ⇠N(0, 0.25). Figure 1 shows the squared Frobenius error k bP −P ?k2 F + kbS −S?k2 F plotted against the compression ratio d/m. We see error scaling linearly with the compression ratio, which supports our theoretical results. Simulation 2: rank and sparsity. Next we study the role of rank and sparsity, for a matrix of size n = d = 200 or n = d = 400. We generate the data D as before, but we either vary the rank r 2 {5, 10, . . . , 50}, or we vary the sparsity s with s/d 2 {0.01, 0.02, . . . , 0.1}. Figure 2 shows the squared Frobenius error plotted against either the varying rank or the varying sparsity. We repeat this experiment for several different compression dimensions m. We see a little deviation from linear scaling for the smallest m, which can be due to the fact that our theorems give upper bounds rather than tight matching upper and lower bounds (or perhaps the smallest value of m does not satisfy the condition stated in the theorems). However, for all but the smallest m, we see error scaling nearly linearly with rank or with sparsity, which is consistent with our theory. Simulation 3: missing data. Finally, we perform experiments under the existence of missing entries in the data matrix D = L? + S?. We fix dimensions n = d = 400 and generate L? and S? as before, with r = 10 and s = 0.01d, but do not add noise. To introduce the missing entries in the data, we use a uniform sampling scheme, where each entry of D is observed with probability ⇢, 7 ρ 0 0.2 0.4 0.6 0.8 1 Total squared error ×105 0 1 2 3 4 5 6 7 m=100 m=200 m=300 m=400 1/ρ2 0 20 40 60 80 100 Total squared error ×105 0 1 2 3 4 5 6 7 m=100 m=200 m=300 m=400 Figure 3: Results for the missing data experiment. The total squared error, calculated as in Theorem 3, is plotted against ⇢(proportion of observed data) or against 1/⇢2, for various values of m, based on one trial. Note the nearly linear scaling with respect to 1/⇢2. 0 1000 2000 3000 4000 −5 −4 −3 −2 −1 Compression dimension m Log(relative error) Low−rank + sparse model Low−rank model Figure 4: Results for the chlorine data (averaged over 2 trials), plotting the log of the relative error on the test set for a low-rank + sparse model and a low-rank-only model. The low-rank + sparse model performs better across a range of compression dimensions m (up to 8–9% reduction in error). with ⇢2 {0.1, 0.2, . . . , 1}. Figure 3 shows the squared Frobenius error k bP −P ?k2 F + kbS −eS? ⌦k2 F (see Theorem 3 for details) across a range of probabilities ⇢. We see that the squared error scales approximately linearly with 1/⇢2, as predicted by our theory. 4.2 Chlorine sensor data To illustrate the application of our method to a specific application, we consider chlorine concentration data from a network of sensors.4 The data contains a realistic simulation of chlorine concentration measurements from n = 166 sensors in a hydraulic system over d = 4310 time points. We assume D is well approximated with a low-rank + sparse decomposition. We then compress the data using the orthogonal model (4) and study the performance of our estimators (2) for varying m. In order to evaluate performance, we use 80% of the entries to fit the model, 10% as a validation set for selecting tuning parameters, and the final 10% as a test set. We compare against a low-rank matrix reconstruction, equivalent to setting bS = 0 and fitting only the low-rank component bL. (Details are given in the Supplementary Materials.) The results are displayed in Figure 4, where we see that the error of the recovery grows smoothly with compression dimension m, and that the low-rank + sparse decomposition gives better data reconstruction than the low-rank-only model. 5 Discussion In this paper, we have examined the robust PCA problem under data compression, where we seek to decompose a data matrix into low-rank + sparse components with access only to a partial projection of the data. This provides a tool for accurate modeling of data with multiple superimposed structures, while enabling restrictions on communication, privacy, or other considerations that may make compression necessary. Our theoretical results show an intuitive tradeoff between the compression ratio and the error of the fitted low-rank + sparse decomposition, which coincides with existing results in the extreme case of no compression (compression ratio = 1). Future directions for this problem include adapting the method to the streaming data (online learning) setting. 4Data obtained from http://www.cs.cmu.edu/afs/cs/project/spirit-1/www/ 8 References [1] Alekh Agarwal, Sahand Negahban, Martin J Wainwright, et al. Noisy matrix decomposition via convex relaxation: Optimal rates in high dimensions. The Annals of Statistics, 40(2):1171– 1197, 2012. [2] Peter J Bickel, Ya’acov Ritov, and Alexandre B Tsybakov. Simultaneous analysis of lasso and dantzig selector. The Annals of Statistics, pages 1705–1732, 2009. [3] Emmanuel J Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. [4] Rina Foygel, Ohad Shamir, Nati Srebro, and Ruslan R Salakhutdinov. Learning with the weighted trace-norm under arbitrary sampling distributions. In Advances in Neural Information Processing Systems, pages 2133–2141, 2011. [5] Nathan Halko, Per-Gunnar Martinsson, and Joel A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011. [6] Jun He, Laura Balzano, and John Lui. Online robust subspace tracking from partial information. arXiv preprint arXiv:1109.3827, 2011. [7] Jun He, Laura Balzano, and Arthur Szlam. Incremental gradient on the grassmannian for online foreground and background separation in subsampled video. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1568–1575. IEEE, 2012. [8] Odalric Maillard and Rémi Munos. Compressed least-squares regression. In Advances in Neural Information Processing Systems, pages 1213–1221, 2009. [9] Praneeth Netrapalli, UN Niranjan, Sujay Sanghavi, Animashree Anandkumar, and Prateek Jain. Non-convex robust PCA. In Advances in Neural Information Processing Systems, pages 1107–1115, 2014. [10] John Wright, Arvind Ganesh, Shankar Rao, Yigang Peng, and Yi Ma. Robust principal component analysis: Exact recovery of corrupted low-rank matrices via convex optimization. In Advances in Neural Information Processing Systems, pages 2080–2088, 2009. [11] Huan Xu, Constantine Caramanis, and Sujay Sanghavi. Robust PCA via outlier pursuit. In Advances in Neural Information Processing Systems, pages 2496–2504, 2010. [12] Shuheng Zhou, John Lafferty, and Larry Wasserman. Compressed and privacy-sensitive sparse regression. IEEE Transactions on Information Theory, 55(2):846–866, 2009. [13] Tianyi Zhou and Dacheng Tao. Godec: Randomized low-rank & sparse matrix decomposition in noisy case. In Proceedings of the 28th International Conference on Machine Learning, pages 33–40, 2011. 9 | 2015 | 301 |
5,816 | Bidirectional Recurrent Convolutional Networks for Multi-Frame Super-Resolution Yan Huang1 Wei Wang1 Liang Wang1,2 1Center for Research on Intelligent Perception and Computing National Laboratory of Pattern Recognition 2Center for Excellence in Brain Science and Intelligence Technology Institute of Automation, Chinese Academy of Sciences {yhuang, wangwei, wangliang}@nlpr.ia.ac.cn Abstract Super resolving a low-resolution video is usually handled by either single-image super-resolution (SR) or multi-frame SR. Single-Image SR deals with each video frame independently, and ignores intrinsic temporal dependency of video frames which actually plays a very important role in video super-resolution. Multi-Frame SR generally extracts motion information, e.g., optical flow, to model the temporal dependency, which often shows high computational cost. Considering that recurrent neural networks (RNNs) can model long-term contextual information of temporal sequences well, we propose a bidirectional recurrent convolutional network for efficient multi-frame SR. Different from vanilla RNNs, 1) the commonly-used recurrent full connections are replaced with weight-sharing convolutional connections and 2) conditional convolutional connections from previous input layers to the current hidden layer are added for enhancing visual-temporal dependency modelling. With the powerful temporal dependency modelling, our model can super resolve videos with complex motions and achieve state-of-the-art performance. Due to the cheap convolution operations, our model has a low computational complexity and runs orders of magnitude faster than other multi-frame methods. 1 Introduction Since large numbers of high-definition displays have sprung up, generating high-resolution videos from previous low-resolution contents, namely video super-resolution (SR), is under great demand. Recently, various methods have been proposed to handle this problem, which can be classified into two categories: 1) single-image SR [10, 5, 9, 8, 12, 25, 23] super resolves each of the video frames independently, and 2) multi-frame SR [13, 17, 3, 2, 14, 13] models and exploits temporal dependency among video frames, which is usually considered as an essential component of video SR. Existing multi-frame SR methods generally model the temporal dependency by extracting subpixel motions of video frames, e.g., estimating optical flow based on sparse prior integration or variation regularity [2, 14, 13]. But such accurate motion estimation can only be effective for video sequences which contain small motions. In addition, the high computational cost of these methods limits the real-world applications. Several solutions have been explored to overcome these issues by avoiding the explicit motion estimation [21, 16]. Unfortunately, they still have to perform implicit motion estimation to reduce temporal aliasing and achieve resolution enhancement when large motions are encountered. Given the fact that recurrent neural networks (RNNs) can well model long-term contextual information for video sequence, we propose a bidirectional recurrent convolutional network (BRCN) 1 to efficiently learn the temporal dependency for multi-frame SR. The proposed network exploits three convolutions. 1) Feedforward convolution models visual spatial dependency between a lowresolution frame and its high-resolution result. 2) Recurrent convolution connects the hidden layers of successive frames to learn temporal dependency. Different from the commonly-used full recurrent connection in vanilla RNNs, it is a weight-sharing convolutional connection here. 3) Conditional convolution connects input layers at the previous timestep to the current hidden layer, to further enhance visual-temporal dependency modelling. To simultaneously consider the temporal dependency from both previous and future frames, we exploit a forward recurrent network and a backward recurrent network, respectively, and then combine them together for the final prediction. We apply the proposed model to super resolve videos with complex motions. The experimental results demonstrate that the model can achieve state-of-the-art performance, as well as orders of magnitude faster speed than other multi-frame SR methods. Our main contributions can be summarized as follows. We propose a bidirectional recurrent convolutional network for multi-frame SR, where the temporal dependency can be efficiently modelled by bidirectional recurrent and conditional convolutions. It is an end-to-end framework which does not need pre-/post-processing. We achieve better performance and faster speed than existing multiframe SR methods. 2 Related Work We will review the related work from the following prospectives. Single-Image SR. Irani and Peleg [10] propose the primary work for this problem, followed by Freeman et al. [8] studying this problem in a learning-based way. To alleviate high computational complexity, Bevilacqua et al. [4] and Chang et al. [5] introduce manifold learning techniques which can reduce the required number of image patch exemplars. For further acceleration, Timofte et al. [23] propose the anchored neighborhood regression method. Yang et al. [25] and Zeyde et al. [26] exploit compressive sensing to encode image patches with a compact dictionary and obtain sparse representations. Dong et al. [6] learn a convolutional neural network for single-image SR which achieves the current state-of-the-art result. In this work, we focus on multi-frame SR by modelling temporal dependency in video sequences. Multi-Frame SR. Baker and Kanade [2] extract optical flow to model the temporal dependency in video sequences for video SR. Then, various improvements [14, 13] around this work are explored to better handle visual motions. However, these methods suffer from the high computational cost due to the motion estimation. To deal with this problem, Protter et al. [16] and Takeda et al. [21] avoid motion estimation by employing nonlocal mean and 3D steering kernel regression. In this work, we propose bidirectional recurrent and conditional convolutions as an alternative to model temporal dependency and achieve faster speed. 3 Bidirectional Recurrent Convolutional Network 3.1 Formulation Given a low-resolution, noisy and blurry video, our goal is to obtain a high-resolution, noise-free and blur-free version. In this paper, we propose a bidirectional recurrent convolutional network (BRCN) to map the low-resolution frames to high-resolution ones. As shown in Figure 1, the proposed network contains a forward recurrent convolutional sub-network and a backward recurrent convolutional sub-network to model the temporal dependency from both previous and future frames. Note that similar bidirectional scheme has been proposed previously in [18]. The two sub-networks of BRCN are denoted by two black blocks with dash borders, respectively. In each sub-network, there are four layers including the input layer, the first hidden layer, the second hidden layer and the output layer, which are connected by three convolutional operations: 1. Feedforward Convolution. The multi-layer convolutions denoted by black lines learn visual spatial dependency between a low-resolution frame and its high-resolution result. Similar configurations have also been explored previously in [11, 7, 6]. 2 𝑿𝒊−𝟏 𝑿𝒊 𝑿𝒊+𝟏 𝑿𝒊+𝟏 𝑿𝒊 𝑿𝒊−𝟏 ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ Backward sub-network Forward sub-network Input layer (low-resolution frame) Output layer (high-resolution frame) First hidden layer Second hidden layer Second hidden layer First hidden layer Input layer (low-resolution frame) : Feedforward convolution : Recurrent convolution : Conditional convolution Figure 1: The proposed bidirectional recurrent convolutional network (BRCN). 2. Recurrent Convolution. The convolutions denoted by blue lines aim to model long-term temporal dependency across video frames by connecting adjacent hidden layers of successive frames, where the current hidden layer is conditioned on the hidden layer at the previous timestep. We use the recurrent convolution in both forward and backward subnetworks. Such bidirectional recurrent scheme can make full use of the forward and backward temporal dynamics. 3. Conditional Convolution. The convolutions denoted by red lines connect input layer at the previous timestep to the current hidden layer, and use previous inputs to provide longterm contextual information. They enhance visual-temporal dependency modelling with this kind of conditional connection. We denote the frame sets of a low-resolution video1 X as {Xi}i=1,2,...,T , and infer the other three layers as follows. First Hidden Layer. When inferring the first hidden layer Hf 1(Xi) (or Hb 1(Xi)) at the ith timestep in the forward (or backward) sub-network, three inputs are considered: 1) the current input layer Xi connected by a feedforward convolution, 2) the hidden layer Hf 1(Xi−1) (or Hb 1(Xi+1)) at the i−1th (or i+1th) timestep connected by a recurrent convolution, and 3) the input layer Xi−1 (or Xi+1) at the i−1th (or i+1th) timestep connected by a conditional convolution. Hf 1(Xi) = λ(Wf v1 ∗Xi + Wf r1 ∗Hf 1(Xi−1) + Wf t1 ∗Xi−1 + Bf 1) Hb 1(Xi) = λ(Wb v1 ∗Xi + Wb r1 ∗Hb 1(Xi+1) + Wb t1 ∗Xi+1 + Bb 1) (1) where Wf v1 (or Wb v1) and Wf t1 (or Wb t1) represent the filters of feedforward and conditional convolutions in the forward (or backward) sub-network, respectively. Both of them have the size of c×fv1×fv1×n1, where c is the number of input channels, fv1 is the filter size and n1 is the number of filters. Wf r1 (or Wb r1) represents the filters of recurrent convolutions. Their filter size fr1 is set to 1 to avoid border effects. Bf 1 (or Bb 1) represents biases. The activation function is the rectified linear unit (ReLu): λ(x)=max(0, x) [15]. Note that in Equation 1, the filter responses of recurrent and 1Note that we upscale each low-resolution frame in the sequence to the desired size with bicubic interpolation in advance. 3 1 B 1A 1 C 0 C i X 1 i X 1 i H i H 1 i X i X 1 1 ( ) f i H X 1 ( ) f i H X -dimensional vector (a) TRBM (b) BRCN Figure 2: Comparison between TRBM and the proposed BRCN. conditional convolutions can be regarded as dynamic changing biases, which focus on modelling the temporal changes across frames, while the filter responses of feedforward convolution focus on learning visual content. Second Hidden Layer. This phase projects the obtained feature maps Hf 1(Xi) (or Hb 1(Xi)) from n1 to n2 dimensions, which aims to capture the nonlinear structure in sequence data. In addition to intra-frame mapping by feedforward convolution, we also consider two inter-frame mappings using recurrent and conditional convolutions, respectively. The projected n2-dimensional feature maps in the second hidden layer Hf 2(Xi) (or (Hb 2(Xi)) in the forward (or backward) sub-network can be obtained as follows: Hf 2(Xi) = λ(Wf v2 ∗Hf 1(Xi) + Wf r2 ∗Hf 2(Xi−1) + Wf t2 ∗Hf 1(Xi−1) + Bf 2) Hb 2(Xi) = λ(Wb v2 ∗Hb 1(Xi) + Wb r2 ∗Hb 2(Xi+1) + Wb t2 ∗Hb 1(Xi+1) + Bb 2) (2) where Wf v2 (or Wb v2) and Wf t2 (or Wb t2) represent the filters of feedforward and conditional convolutions, respectively, both of which have the size of n1×1×1×n2. Wf r2 (or Wb r2) represents the filters of recurrent convolution, whose size is n2×1×1×n2. Note that the inference of the two hidden layers can be regarded as a representation learning phase, where we could stack more hidden layers to increase the representability of our network to better capture the complex data structure. Output Layer. In this phase, we combine the projected n2-dimensional feature maps in both forward and backward sub-networks to jointly predict the desired high-resolution frame: O(Xi) =Wf v3 ∗Hf 2(Xi) + Wf t3 ∗Hf 2(Xi−1) + Bf 3 + Wb v3 ∗Hb 2(Xi) + Wb t3 ∗Hb 2(Xi+1) + Bb 3 (3) where Wf v3 (or Wb v3) and Wf t3 (or Wb t3) represent the filters of feedforward and conditional convolutions, respectively. Their sizes are both n2×fv3×fv3×c. We do not use any recurrent convolution for output layer. 3.2 Connection with Temporal Restricted Boltzmann Machine In this section, we discuss the connection between the proposed BRCN and temporal restricted boltzmann machine (TRBM) [20] which is a widely used model in sequence modelling. As shown in Figure 2, TRBM and BRCN contain similar recurrent connections (blue lines) between hidden layers, and conditional connections (red lines) between input layer and hidden layer. They share the common flexibility to model and propagate temporal dependency along the time. However, TRBM is a generative model while BRCN is a discriminative model, and TRBM contains an additional connection (green line) between input layers for sample generation. In fact, BRCN can be regarded as a deterministic, bidirectional and patch-based implementation of TRBM. Specifically, when inferring the hidden layer in BRCN, as illustrated in Figure 2 (b), feedforward and conditional convolutions extract overlapped patches from the input, each of which is 4 fully connected to a n1-dimensional vector in the feature maps Hf 1(Xi). For recurrent convolutions, since each filter size is 1 and all the filters contain n1×n1 weights, a n1-dimensional vector in Hf 1(Xi) is fully connected to the corresponding n1-dimensional vector in Hf 1(Xi−1) at the previous time step. Therefore, the patch connections of BRCN are actually those of a “discriminative” TRBM. In other words, by setting the filter sizes of feedforward and conditional convolutions as the size of the whole frame, BRCN is equivalent to TRBM. Compared with TRBM, BRCN has the following advantages for handling the task of video superresolution. 1) BRCN restricts the receptive field of original full connection to a patch rather than the whole frame, which can capture the temporal change of visual details. 2) BRCN replaces all the full connections with weight-sharing convolutional ones, which largely reduces the computational cost. 3) BRCN is more flexible to handle videos of different sizes, once it is trained on a fixed-size video dataset. Similar to TRBM, the proposed model can be generalized to other sequence modelling applications, e.g., video motion modelling [22]. 3.3 Network Learning Through combining Equations 1, 2 and 3, we can obtain the desired prediction O(X; Θ) from the low-resolution video X, where Θ denotes the network parameters. Network learning proceeds by minimizing the Mean Square Error (MSE) between the predicted high-resolution video O(X; Θ) and the groundtruth Y: L = ∥O(X; Θ) −Y∥2 (4) via stochastic gradient descent. Actually, stochastic gradient descent is enough to achieve satisfying results, although we could exploit other optimization algorithms with more computational cost, e.g., L-BFGS. During optimization, all the filter weights of recurrent and conditional convolutions are initialized by randomly sampling from a Gaussian distribution with mean 0 and standard deviation 0.001, whereas the filter weights of feedforward convolution are pre-trained on static images [6]. Note that the pretraining step only aims to speed up training by providing a better parameter initialization, due to the limited size of training set. This step can be avoided by alternatively using a larger scale dataset. We experimentally find that using a smaller learning rate (e.g., 1e−4) for the weights in the output layer is crucial to obtain good performance. 4 Experimental Results To verify the effectiveness, we apply the proposed model to the task of video SR, and present both quantitative and qualitative results as follows. 4.1 Datasets and Implementation Details We use 25 YUV format video sequences2 as our training set, which have been widely used in many video SR methods [13, 16, 21]. To enlarge the training set, model training is performed in a volumebased way, i.e., cropping multiple overlapped volumes from training videos and then regarding each volume as a training sample. During cropping, each volume has a spatial size of 32×32 and a temporal step of 10. The spatial and temporal strides are 14 and 8, respectively. As a result, we can generate roughly 41,000 volumes from the original dataset. We test our model on a variety of challenging videos, including Dancing, Flag, Fan, Treadmill and Turbine [19], which contain complex motions with severe motion blur and aliasing. Note that we do not have to extract volumes during testing, since the convolutional operation can scale to videos of any spatial size and temporal step. We generate the testing dataset with the following steps: 1) using Gaussian filter with standard deviation 2 to smooth each original frame, and 2) downsampling the frame by a factor of 4 with bicubic method3. 2http://www.codersvoice.com/a/webbase/video/08/152014/130.html. 3Here we focus on the factor of 4, which is usually considered as the most difficult case in super-resolution. 5 Table 1: The results of PSNR (dB) and running time (sec) on the testing video sequences. Video Bicubic SC [25] K-SVD [26] NE+NNLS [4] ANR [23] PSNR Time PSNR Time PSNR Time PSNR Time PSNR Time Dancing 26.83 26.80 45.47 27.69 2.35 27.63 19.89 27.67 0.85 Flag 26.35 26.28 12.89 27.61 0.58 27.41 4.54 27.52 0.20 Fan 31.94 32.50 12.92 33.55 1.06 33.45 8.27 33.49 0.38 Treadmill 21.15 21.27 15.47 22.22 0.35 22.08 2.60 22.24 0.12 Turbine 25.09 25.77 16.49 27.00 0.51 26.88 3.67 27.04 0.18 Average 26.27 26.52 20.64 27.61 0.97 27.49 7.79 27.59 0.35 Video NE+LLE [5] SR-CNN [6] 3DSKR [21] Enhancer [1] BRCN PSNR Time PSNR Time PSNR Time PSNR Time PSNR Time Dancing 27.64 4.20 27.81 1.41 27.81 1211 27.06 28.09 3.44 Flag 27.48 0.96 28.04 0.36 26.89 255 26.58 28.55 0.78 Fan 33.46 1.76 33.61 0.60 31.91 323 32.14 33.73 1.46 Treadmill 22.22 0.57 22.42 0.15 22.32 127 21.20 22.63 0.46 Turbine 26.98 0.80 27.50 0.23 24.27 173 25.60 27.71 0.70 Average 27.52 1.66 27.87 0.55 26.64 418 26.52 28.15 1.36 Table 2: The results of PSNR (dB) by variants of BRCN on the testing video sequences. v: feedforward convolution, r: recurrent convolution, t: conditional convolution, b: bidirectional scheme. Video BRCN BRCN BRCN BRCN BRCN {v} {v, r} {v, t} {v, r, t} {v, r, t, b} Dancing 27.81 27.98 27.99 28.09 28.09 Flag 28.04 28.32 28.39 28.47 28.55 Fan 33.61 33.63 33.65 33.65 33.73 Treadmill 22.42 22.59 22.56 22.59 22.63 Turbine 27.50 27.47 27.50 27.62 27.71 Average 27.87 27.99 28.02 28.09 28.15 Some important parameters of our network are illustrated as follows: fv1=9, fv3=5, n1=64, n2=32 and c=14. Note that varying the number and size of filters does not have a significant impact on the performance, because some filters with certain sizes are already in a regime where they can almost reconstruct the high-resolution videos [24, 6]. 4.2 Quantitative and Qualitative Comparison We compare our BRCN with two multi-frame SR methods including 3DSKR [21] and a commercial software namely Enhancer [1], and seven single-image SR methods including Bicubic, SC [25], KSVD [26], NE+NNLS [4], ANR [23], NE+LLE [5] and SR-CNN [6]. The results of all the methods are compared in Table 1, where evaluation measures include both peak signal-to-noise ratio (PSNR) and running time (Time). Specifically, compared with the state-of-theart single-image SR methods (e.g., SR-CNN, ANR and K-SVD), our multi-frame-based method can surpass them by 0.28∼0.54 dB, which is mainly attributed to the beneficial mechanism of temporal dependency modelling. BRCN also performs much better than the two representative multi-frame SR methods (3DSKR and Enhancer) by 1.51 dB and 1.63 dB, respectively. In fact, most existing multi-frame-based methods tend to fail catastrophically when dealing with very complex motions, because it is difficult for them to estimate the motions with pinpoint accuracy. For the proposed BRCN, we also investigate the impact of model architecture on the performance. We take a simplified network containing only feedforward convolution as a benchmark, and then study its several variants by successively adding other operations including bidirectional scheme, recurrent and conditional convolutions. The results by all the variants of BRCN are shown in Table 2, where the elements in the brace represent the included operations. As we can see, due to the ben4Similar to [23], we only deal with luminance channel in the YCrCb color space. Note that our model can be generalized to handle all the three channels by setting c=3. Here we simply upscale the other two channels with bicubic method for well illustration. 6 (a) Original (b) Bicubic (c) ANR [23] (d) SR-CNN [6] (e) BRCN Figure 3: Closeup comparison among original frames and super resolved results by Bicubic, ANR, SR-CNN and BRCN, respectively. efit of learning temporal dependency, exploiting either recurrent convolution {v, r} or conditional convolution {v, t} can greatly improve the performance. When combining these two convolutions together {v, r, t}, they obtain much better results. The performance can still be further promoted when adding the bidirectional scheme {v, r, t, b}, which results from the fact that each video frame is related to not only its previous frame but also the future one. In addition to the quantitative evaluation, we also present some qualitative results in terms of singleframe (in Figure 3) and multi-frame (in Figure 5). Please enlarge and view these figures on the screen for better comparison. From these figures, we can observe that our method is able to recover more image details than others under various motion conditions. 4.3 Running Time BRCN 3DSKR SR-CNN SC NE+LLE ANR K-SVD NE+NNLS : multi-frame SR method : single-image SR method Figure 4: Running time vs. PSNR for all the methods. We present the comparison of running time in both Table 1 and Figure 4, where all the methods are implemented on the same machine (Intel CPU 3.10 GHz and 32 GB memory). The publicly available codes of compared methods are all in MATLAB while SR-CNN and ours are in Python. From the table and figure, we can see that our BRCN takes 1.36 sec per frame on average, which is orders of magnitude faster than the fast multi-frame SR method 3DSKR. It should be noted that the speed gap is not caused by the different MATLAB/Python implementations. As stated in [13, 21], the computational bottleneck for existing multi-frame SR methods is the accurate motion estimation, while our model explores an alternative based on efficient spatial-temporal convolutions which has lower computational complexity. Note that the speed of our method is worse than the fastest single-image SR method ANR. It is likely that our method involves the additional phase of temporal dependency modelling but we achieve better performance (28.15 vs. 27.59 dB). 7 (a) Original (b) Bicubic (c) ANR [23] (d) SR-CNN [6] (e) BRCN Figure 5: Comparison among original frames (2th, 3th and 4th frames, from the top row to the bottom) of the Dancing video and super resolved results by Bicubic, ANR, SR-CNN and BRCN, respectively. 4.4 Filter Visualization (a) Wf v1 (b) Wf t1 (c) Wf v3 (d) Wf t3 Figure 6: Visualization of learned filters by the proposed BRCN. We visualize the learned filters of feedforward and conditional convolutions in Figure 6. The filters of Wf v1 and Wf t1 exhibit some strip-like patterns, which can be viewed as edge detectors. The filters of Wf v3 and Wf t3 show some centrally-averaging patterns, which indicate that the predicted highresolution frame is obtained by averaging over the feature maps in the second hidden layer. This averaging operation is also in consistent with the corresponding reconstruction phase in patch-based SR methods (e.g., [25]), but the difference is that our filters are automatically learned rather than pre-defined. When comparing the learned filters between feedforward and conditional convolutions, we can also observe that the patterns in the filters of feedforward convolution are much more regular and clear. 5 Conclusion and Future Work In this paper, we have proposed the bidirectional recurrent convolutional network (BRCN) for multiframe SR. Our main contribution is the novel use of bidirectional scheme, recurrent and conditional convolutions for temporal dependency modelling. We have applied our model to super resolve videos containing complex motions, and achieved better performance and faster speed. In the future, we will perform comparisons with other multi-frame SR methods. Acknowledgments This work is jointly supported by National Natural Science Foundation of China (61420106015, 61175003, 61202328, 61572504) and National Basic Research Program of China (2012CB316300). 8 References [1] Video enhancer. http://www.infognition.com/videoenhancer/, version 1.9.10. 2014. [2] S. Baker and T. Kanade. Super-resolution optical flow. Technical report, CMU, 1999. [3] B. Bascle, A. Blake, and A. Zisserman. Motion deblurring and super-resolution from an image sequence. European Conference on Computer Vision, pages 571–582, 1996. [4] M. Bevilacqua, A. Roumy, C. Guillemot, and M.-L. A. Morel. Low-complexity single-image superresolution based on nonnegative neighbor embedding. British Machine Vision Conference, 2012. [5] H. Chang, D.-Y. Yeung, and Y. Xiong. Super-resolution through neighbor embedding. IEEE Conference on Computer Vision and Pattern Recognition, page I, 2004. [6] C. Dong, C. C. Loy, K. He, and X. Tang. Learning a deep convolutional network for image superresolution. European Conference on Computer Vision, pages 184–199, 2014. [7] D. Eigen, D. Krishnan, and R. Fergus. Restoring an image taken through a window covered with dirt or rain. IEEE International Conference on Computer Vision, pages 633–640, 2013. [8] W. T. Freeman, E. C. Pasztor, and O. T. Carmichael. Learning low-level vision. International Journal of Computer Vision, pages 25–47, 2000. [9] D. Glasner, S. Bagon, and M. Irani. Super-resolution from a single image. IEEE International Conference on Computer Vision, pages 349–356, 2009. [10] M. Irani and S. Peleg. Improving resolution by image registration. CVGIP: Graphical Models and Image Processing, pages 231–239, 1991. [11] V. Jain and S. Seung. Natural image denoising with convolutional networks. Advances in Neural Information Processing Systems, pages 769–776, 2008. [12] K. Jia, X. Wang, and X. Tang. Image transformation based on learning dictionaries across image spaces. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 367–380, 2013. [13] C. Liu and D. Sun. On bayesian adaptive video super resolution. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 346–360, 2014. [14] D. Mitzel, T. Pock, T. Schoenemann, and D. Cremers. Video super resolution using duality based tv-l 1 optical flow. Pattern Recognition, pages 432–441, 2009. [15] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. International Conference on Machine Learning, pages 807–814, 2010. [16] M. Protter, M. Elad, H. Takeda, and P. Milanfar. Generalizing the nonlocal-means to super-resolution reconstruction. IEEE Transactions on Image Processing, pages 36–51, 2009. [17] R. R. Schultz and R. L. Stevenson. Extraction of high-resolution frames from video sequences. IEEE Transactions on Image Processing, pages 996–1011, 1996. [18] M. Schusterand and K. K. Paliwal. Bidirectional recurrent neural networks. IEEE Transactions on Signal Processing, pages 2673–2681, 1997. [19] O. Shahar, A. Faktor, and M. Irani. Space-time super-resolution from a single video. IEEE Conference on Computer Vision and Pattern Recognition, pages 3353–3360, 2011. [20] I. Sutskever and G. E. Hinton. Learning multilevel distributed representations for high-dimensional sequences. In International Conference on Artificial Intelligence and Statistics, pages 548–555, 2007. [21] H. Takeda, P. Milanfar, M. Protter, and M. Elad. Super-resolution without explicit subpixel motion estimation. IEEE Transactions on Image Processing, pages 1958–1975, 2009. [22] G. Taylor, G. Hinton, and S. Roweis. Modeling human motion using binary latent variables. Advances in Neural Information Processing Systems, pages 448–455, 2006. [23] R. Timofte, V. De, and L. V. Gool. Anchored neighborhood regression for fast example-based superresolution. IEEE International Conference on Computer Vision, pages 1920–1927, 2013. [24] L. Xu, J. S. Ren, C. Liu, and J. Jia. Deep convolutional neural network for image deconvolution. In Advances in Neural Information Processing Systems, pages 1790–1798, 2014. [25] J. Yang, J. Wright, T. S. Huang, and Y. Ma. Image super-resolution via sparse representation. IEEE Transactions on Image Processing, pages 2861–2873, 2010. [26] R. Zeyde, M. Elad, and M. Protte. On single image scale-up using sparse-representations. Curves and Surfaces, pages 711–730, 2012. 9 | 2015 | 302 |
5,817 | Regret-Based Pruning in Extensive-Form Games Noam Brown Computer Science Department Carnegie Mellon University Pittsburgh, PA 15217 noamb@cmu.edu Tuomas Sandholm Computer Science Department Carnegie Mellon University Pittsburgh, PA 15217 sandholm@cs.cmu.edu Abstract Counterfactual Regret Minimization (CFR) is a leading algorithm for finding a Nash equilibrium in large zero-sum imperfect-information games. CFR is an iterative algorithm that repeatedly traverses the game tree, updating regrets at each information set. We introduce an improvement to CFR that prunes any path of play in the tree, and its descendants, that has negative regret. It revisits that sequence at the earliest subsequent CFR iteration where the regret could have become positive, had that path been explored on every iteration. The new algorithm maintains CFR’s convergence guarantees while making iterations significantly faster—even if previously known pruning techniques are used in the comparison. This improvement carries over to CFR+, a recent variant of CFR. Experiments show an order of magnitude speed improvement, and the relative speed improvement increases with the size of the game. 1 Introduction Extensive-form imperfect-information games are a general model for strategic interaction. The last ten years have witnessed a leap of several orders of magnitude in the size of two-player zero-sum extensive-form imperfect-information games that can be solved to (near-)equilibrium [11][2][6]. This is the game class that this paper focuses on. For small games, a linear program (LP) can find a solution (that is, a Nash equilibrium) to the game in polynomial time, even in the presence of imperfect information. However, today’s leading LP solvers only scale to games with around 108 nodes in the game tree [4]. Instead, iterative algorithms are used to approximate solutions for larger games. There are a variety of such iterative algorithms that are guaranteed to converge to a solution [5, 3, 10]. Among these, Counterfactual Regret Minimization (CFR) [16] has emerged as the most popular, and CFR+ as the state-of-the-art variant thereof [13, 14]. CFR begins by exploring the entire game tree (though sampling variants exist as well [9]) and calculating regret for every hypothetical situation in which the player could be. A key improvement that makes CFR practical in large games is pruning. At a high level, pruning allows the algorithm to avoid traversing the entire game tree while still maintaining the same convergence guarantees. The classic version of pruning, which we will refer to as partial pruning, allows the algorithm to skip updates for a player in a sequence if the other player’s current strategy does not reach the sequence with positive probability. This dramatically reduces the cost of each iteration. The magnitude of this reduction varies considerably depending on the game, but can easily be higher than 90% [9], which improves the convergence speed of the algorithm by a factor of 10. Moreover, the benefit of partial pruning empirically seems to be more significant as the size of the game increases. While partial pruning leads to a large gain in speed, we observe that there is still room for much larger speed improvement. Partial pruning only skips updates for a player if an opponent’s action in the path leading to that point has zero probability. This can fail to prune paths that are actually prunable. Consider a game where the first player to act (Player 1) has hundreds of actions to choose 1 from, and where, over several iterations, the reward received from many of them is extremely poor. Intuitively, we should be able to spend less time updating the strategy for Player 1 following these poor actions, and more time on the actions that proved worthwhile so far. However, here, partial pruning will continue to update Player 1’s strategy following each action in every iteration. In this paper we introduce a better version of pruning, regret-based pruning (RBP), in which CFR can avoid traversing a path in the game tree if either player takes actions leading to that path with zero probability. This pruning needs to be temporary, because the probabilities may change later in the CFR iterations, so the reach probability may turn positive later on. The number of CFR iterations during which a sequence can be skipped depends on how poorly the sequence has performed in previous CFR iterations. More specifically, the number of iterations that an action can be pruned is proportional to how negative the regret is for that action. We will detail these topics in this paper. RBP can lead to a dramatic improvement depending on the game. As a rough example, consider a game in which each player has very negative regret for actions leading to 90% of nodes. Partial pruning, which skips updates for a player when the opponent does not reach the node, would traverse 10% of the game tree per iteration. In contrast, regret-based pruning, which skips updates when either player does not reach the node, would traverse only 0.1 · 0.1 = 1% of the game tree. In general, RBP roughly squares the performance gain of partial pruning. We test RBP with CFR and CFR+. Experiments show that it leads to more than an order of magnitude speed improvement over partial pruning. The benefit increases with the size of the game. 2 Background In this section we present the notation used in the rest of the paper. In an imperfect-information extensive-form game there is a finite set of players, P. H is the set of all possible histories (nodes) in the game tree, represented as a sequence of actions, and includes the empty history. A(h) is the actions available in a history and P(h) ∈P ∪c is the player who acts at that history, where c denotes chance. Chance plays an action a ∈A(h) with a fixed probability σc(h, a) that is known to all players. The history h′ reached after an action is taken in h is a child of h, represented by h · a = h′, while h is the parent of h′. More generally, h′ is an ancestor of h (and h is a descendant of h′), represented by h′ ⊏h, if there exists a sequence of actions from h′ to h. Z ⊆H are terminal histories for which no actions are available. For each player i ∈P, there is a payoff function ui : Z →ℜ. If P = {1, 2} and u1 = −u2, the game is two-player zero-sum. We define ∆i = maxz∈Z ui(z) −minz∈Z ui(z) and ∆= maxi ∆i. Imperfect information is represented by information sets for each player i ∈P by a partition Ii of h ∈H : P(h) = i. For any information set I ∈Ii, all histories h, h′ ∈I are indistinguishable to player i, so A(h) = A(h′). I(h) is the information set I where h ∈I. P(I) is the player i such that I ∈Ii. A(I) is the set of actions such that for all h ∈I, A(I) = A(h). |Ai| = maxI∈Ii |A(I)| and |A| = maxi |Ai|. We define U(I) to be the maximum payoff reachable from a history in I, and L(I) to be the minimum. That is, U(I) = maxz∈Z,h∈I:h⊑z uP (I)(z) and L(I) = minz∈Z,h∈I:h⊑z uP (I)(z). We define ∆(I) = U(I) −L(I) to be the range of payoffs reachable from a history in I. We similarly define U(I, a), L(I, a), and ∆(I, a) as the maximum, minimum, and range of payoffs (respectively) reachable from a history in I after taking action a. We define D(I, a) to be the set of information sets reachable by player P(I) after taking action a. Formally, I′ ∈D(I, a) if for some history h ∈I and h′ ∈I′, h · a ⊑h′ and P(I) = P(I′). A strategy σi(I) is a probability vector over A(I) for player i in information set I. The probability of a particular action a is denoted by σi(I, a). Since all histories in an information set belonging to player i are indistinguishable, the strategies in each of them must be identical. That is, for all h ∈I, σi(h) = σi(I) and σi(h, a) = σi(I, a). We define σi to be a probability vector for player i over all available strategies Σi in the game. A strategy profile σ is a tuple of strategies, one for each player. ui(σi, σ−i) is the expected payoff for player i if all players play according to the strategy profile ⟨σi, σ−i⟩. If a series of strategies are played over T iterations, then ¯σT i = P t∈T σt i T . πσ(h) = Πh′→a⊑hσP (h)(h, a) is the joint probability of reaching h if all players play according to σ. πσ i (h) is the contribution of player i to this probability (that is, the probability of reaching h if all players other than i, and chance, always chose actions leading to h). πσ −i(h) is the contribution of 2 all players other than i, and chance. πσ(h, h′) is the probability of reaching h′ given that h has been reached, and 0 if h ̸⊏h′. In a perfect-recall game, ∀h, h′ ∈I ∈Ii, πi(h) = πi(h′). In this paper we focus on perfect-recall games. Therefore, for i = P(I) we define πi(I) = πi(h) for h ∈I. We define the average strategy ¯σT i (I) for an information set I to be ¯σT i (I) = P t∈T πσt i i σt i(I) P t∈T πσt i (I) (1) 2.1 Nash Equilibrium A best response to σ−i is a strategy σ∗ i such that ui(σ∗ i , σ−i) = maxσ′ i∈Σi ui(σ′ i, σ−i). A Nash equilibrium, is a strategy profile where every player plays a best response. Formally, it is a strategy profile σ∗such that ∀i, ui(σ∗ i , σ∗ −i) = maxσ′ i∈Σi ui(σ′ i, σ∗ −i). We define a Nash equilibrium strategy for player i as a strategy σi that is part of any Nash equilibrium. In two-player zero-sum games, if σi and σ−i are both Nash equilibrium strategies, then ⟨σi, σ−i⟩is a Nash equilibrium. An ϵ-equilibrium is a strategy profile σ∗such that ∀i, ui(σ∗ i , σ∗ −i) + ϵ ≥maxσ′ i∈Σi ui(σ′ i, σ∗ −i). 2.2 Counterfactual Regret Minimization Counterfactual Regret Minimization (CFR) is a popular regret-minimization algorithm for extensiveform games [16]. Our analysis of CFR makes frequent use of counterfactual value. Informally, this is the expected utility of an information set given that player i tries to reach it. For player i at information set I given a strategy profile σ, this is defined as vσ i (I) = X h∈I πσ −i(h) X z∈Z πσ(h, z)ui(z) (2) The counterfactual value of an action a is vσ i (I, a) = X h∈I πσ −i(h) X z∈Z πσ(h · a, z)ui(z) (3) Let σt be the strategy profile used on iteration t. The instantaneous regret on iteration t for action a in information set I is rt(I, a) = vσt P (I)(I, a) −vσt P (I)(I) (4) and the regret for action a in I on iteration T is RT (I, a) = X t∈T rt(I, a) (5) Additionally, RT +(I, a) = max{RT (I, a), 0} and RT (I) = maxa{RT +(I, a)}. Regret for player i in the entire game is RT i = max σ′ i∈Σi X t∈T ui(σ′ i, σt −i) −ui(σt i, σt −i) (6) In CFR, a player in an information set picks an action among the actions with positive regret in proportion to his positive regret on that action. Formally, on each iteration T + 1, player i selects actions a ∈A(I) according to probabilities σT +1 i (I, a) = RT +(I,a) P a′∈A(I) RT +(I,a′), if P a′∈Ai RT +(I, a′) > 0 1 |A(I)|, otherwise (7) If a player plays according to CFR in every iteration, then on iteration T, RT (I) ≤∆i p |A(I)| √ T. Moreover, RT i ≤ X I∈Ii RT (I) ≤|Ii|∆i p |Ai| √ T (8) So, as T →∞, RT i T →0. In two-player zero-sum games, if both players’ average regret RT i T ≤ϵ, their average strategies ⟨¯σT 1 , ¯σT 2 ⟩form a 2ϵ-equilibrium [15]. Thus, CFR constitutes an anytime algorithm for finding an ϵ-Nash equilibrium in zero-sum games. 3 3 Applying Best Response to Zero-Reach Sequences In Section 2 it was explained that if both players’ average regret approaches zero, then their average strategies approach a Nash equilibrium. CFR provides one way to compute strategies that have bounded regret, but it is not the only way. CFR-BR [7] is a variant of CFR in which one player plays CFR and the other player plays a best response to the opponent’s strategy in every iteration. Calculating a best response to a fixed strategy is computationally cheap (in games of perfect recall), costing only a single traversal of the game tree. By playing a best response in every iteration, the best-responder is guaranteed to have at most zero regret. Moreover, the CFR player’s regret is still bounded according to (8). However, in practice the CFR player’s regret in CFR-BR tends to be higher than when both players play vanilla CFR (since the opponent is clairvoyantly maximizing the CFR player’s regret). For this reason, empirical results show that CFR-BR converges slower than CFR, even though the best-responder’s regret is always at most zero. We now discuss a modification of CFR that will motivate the main contribution of this paper, which, in turn, is described in Section 4. The idea is that by applying a best response only in certain situations (and CFR in others), we can lower regret for one player without increasing it for the opponent. Without loss of generality, we discuss how to reduce regret for Player 1. Specifically, consider an information set I ∈I1 and action a where σt 1(I, a) = 0 and any history h ∈I. Then for any ancestor history h′ such that h′ ⊏h · a, we know πσt 1 (h′, h · a) = 0. Likewise, for any descendant history h′ such that h · a ⊑h′, we know πσt 1 (h′) = 0. Thus, from (4) we see that Player 1’s strategy on iteration t in any information set following action a has no effect on Player 2’s regret for that iteration. Moreover, it also has no effect on Player 1’s regret for any information set except R(I, a) and information sets that follow action a. Therefore, by playing a best response only in information sets following action a (and playing vanilla CFR elsewhere), Player 1 guarantees zero regret for himself in all information sets following action a, without the practical cost of increasing his regret in information sets before I or of increasing Player 2’s regret. This may increase regret for action a itself, but if we only do this when R(I, a) ≤−∆(I), we can guarantee R(I, a) ≤0 even after the iteration. Similarly, Player 2 can simultaneously play a best response in information sets following an action a′ where σt 2(I′, a′) = 0 for I′ ∈I2. This approach leads to lower regret for both players. (In situations where both players’ sequences of reaching an information set have zero probability (π1(h) = π2(h) = 0) the strategies chosen have no impact on the regret or average strategy for either player, so there is no need to compute what strategies should be played from then on.) Our experiments showed that this technique leads to a dramatic improvement over CFR in terms of the number of iterations needed—though the theoretical convergence bound remains the same. However, each iteration touches more nodes—because negative-regret actions more quickly become positive and are not skipped with partial pruning—and thus takes longer. It depends on the game whether CFR or this technique is faster overall; see experiments in Appendix A. Regret-based pruning, introduced in the next section, outperforms both of these approaches significantly. 4 Regret-Based Pruning (RBP) In this section we present the main contribution of this paper, a technique for soundly pruning—on a temporary basis—negative-regret actions from the tree traversal in order to speed it up significantly. In Section 3 we proposed a variant of CFR where a player plays a best response in information sets that the player reaches with zero probability. In this section, we show that these information sets and their descendants need not be traversed in every iteration. Rather, the frequency that they must be traversed is proportional to how negative regret is for the action leading to them. This less-frequent traversal does not hurt the regret bound (8). Consider an information set I ∈I1 and action a where Rt(I, a) = −1000 and regret for at least one other action in I is positive, and assume ∆(I) = 1. From (7), we see that σt+1 1 (I, a) = 0. As described in Section 3, the strategy played by Player 1 on iteration t + 1 in any information set following action a has no effect on Player 2. Moreover, it has no immediate effect on what Player 1 will do in the next iteration (other than in information sets following action a), because we know regret for action a will still be at most -999 on iteration t + 2 (since ∆(I) = 1) and will continue to not be played. So rather than traverse the game tree following action a, we could “procrastinate” in deciding what Player 1 did on iteration t+1, t+2, ..., t+1000 4 in that branch until after iteration t + 1000 (at which point regret for that action may be positive). That is, we could (in principle) store Player 2’s strategy for each iteration between t+1 and t+1000, and on iteration t+1000 calculate a best response to each of them and announce that Player 1 played those best responses following action a on iterations t + 1 to t + 1000 (and update the regrets to match this). Obviously this itself would not be an improvement, but performance would be identical to the algorithm described in Section 3. However, rather than have Player 1 calculate and play a best response for each iteration between t+1 and t+1000 separately, we could simply calculate a best response against the average strategy that Player 2 played in those iterations. This can be accomplished in a single traversal of the game tree. We can then announce that Player 1 played this best response on each iteration between t + 1 and t + 1000. This provides benefits similar to the algorithm described in Section 3, but allows us to do the work of 1000 iterations in a single traversal! We coin this regret-based pruning (RBP). We now present a theorem that guarantees that when R(I, a) ≤0, we can prune D(I, a) through regret-based pruning for ⌊ |R(I,a)| U(I,a)−L(I)⌋iterations. Theorem 1. Consider a two-player zero-sum game. Let a ∈A(I) be an action such that on iteration T0, RT0(I, a) ≤0. Let I′ be an information set for any player such that I′ ̸∈D(I, a) and let a′ ∈A(I′). Let m = ⌊ |R(I,a)| U(I,a)−L(I)⌋. If σ(I, a) = 0 when R(I, a) ≤0, then regardless of what is played in D(I, a) during {T0, ..., T0 + m}, RT +(I′, a′) is identical for T ≤T0 + m. Proof. Since vσ i (I) ≥L(I) and vσ i (I, a) ≤U(I, a), so from (4) we get rt(I, a) ≤U(I, a) −L(I). Thus, for iteration T0 ≤T ≤T0 + m, RT (I, a) ≤0. Clearly the theorem is true for T < T0. We prove the theorem continues to hold inductively for T ≤T0 + m. Assume the theorem holds for iteration T and consider iteration T + 1. Suppose I′ ∈IP (I) and either I′ ̸= I or a′ ̸= a. Then for any h′ ∈I′, there is no ancestor of h′ in an information set in D(I, a). Thus, πσT +1 −i (h′) does not depend on the strategy in D(I, a). Moreover, for any z ∈Z, if h′ ⊏h ⊏z for some h ∈I∗∈D(I, a), then πσT +1(h′, z) = 0 because σT +1(I, a) = 0. Since I′ ̸= I or a′ ̸= a, it similarly holds that πσT +1(h′·a′, z) = 0. Then from (4), rT +1(I, a) does not depend on the strategy in D(I, a). Now suppose I′ ∈Ii for i ̸= P(I). Consider some h′ ∈I′ and some h ∈I. First suppose that h · a ⊑h′. Since πσT +1 i (h · a) = 0, so πσT +1 i (h′) = 0 and h′ contributes nothing to the regret of I′. Now suppose h′ ⊏h. Then for any z ∈Z, if h′ ⊏h ⊏z then πσT +1(h′, z) = 0 and does not depend on the strategy in D(I, a). Finally, suppose h′ ̸⊏h and h · a ̸⊑h′. Then for any z ∈Z such that h′ ⊏z, we know h ̸⊏z and therefore πσT +1(h′, z) = 0 does not depend on the strategy in D(I, a). Now suppose I′ = I and a′ = a. We proved RT (I, a) ≤0 for T0 ≤T ≤T0 +m, so RT +(I, a) = 0. Thus, for all T ≤T0 + m, RT (I′, a′) is identical regardless of what is played in D(I, a). We can improve this approach significantly by not requiring knowledge beforehand of exactly how many iterations can be skipped. Rather, we will decide in light of what happens during the intervening CFR iterations when an action needs to be revisited. From (4) we know that rT (I, a) ∝πσT −i (I). Moreover, vσT P (I)(I) does not depend on D(I, a). Thus, we can prune D(I, a) from iteration T0 until iteration T1 so long as T0 X t=1 vσt P (I)(I, a) + T1 X t=T0+1 πσt −i(I)U(I, a) ≤ T1 X t=1 vσt P (I)(I) (9) In the worst case, this allows us to skip only ⌊ R(I,a) U(I,a)−L(I)⌋iterations. However, in practice it performs significantly better, though we cannot know on iteration T0 how many iterations it will skip because it depends on what is played in T0 ≤t ≤T1. Our exploratory experiments showed that in practice performance also improves by replacing U(I, a) with a more accurate upper bound on reward in (9). CFR will still converge if D(I, a) is pruned for too many iterations; however, that hurts convergence speed. In the experiments included in this paper, we conservatively use U(I, a) as the upper bound. 5 4.1 Best Response Calculation for Regret-Based Pruning In this section we discuss how one can efficiently compute the best responses as called for in regretbased pruning. The advantage of Theorem 1 is that we can wait until after pruning has finished—that is, until we revisit an action—to decide what strategies were played in D(I, a) during the intervening iterations. We can then calculate a single best response to the average strategy that the opponent played, and say that that best response was played in D(I, a) in each of the intervening iterations. This results in zero regret over those iterations for information sets in D(I, a). We now describe how this best response can be calculated efficiently. Typically, when playing CFR one stores PT t=1 πt i(I)σt i(I) for each information set I. This allows one to immediately calculate the average strategy defined in (1) in any particular iteration. If we start pruning on iteration T0 and revisit on iteration T1, we wish to calculate a best response to ¯σT1−T0 i where ¯σT1−T0 i (I) = PT1 t=T0 πt i(I)σt i(I) PT1 t=T0 πt i(I) . An easy approach would be to store the opponent’s cumulative strategy before pruning begins and subtract it from the current cumulative strategy when pruning ends. In fact, we only need to store the opponent’s strategy in information sets that follow action a. However, this could potentially use O(H) memory because the same information set I belonging to Player 2 may be reached from multiple information sets belonging to Player 1. In contrast, CFR only requires O(|I||A|) memory, and we want to maintain this desirable property. We accomplish that as follows. To calculate a best response against ¯σT 2 , we traverse the game tree and calculate the counterfactual value, defined in (3), for every action for every information set belonging to Player 1 that does not lead to any further Player 1 information sets. Specifically, we calculate v¯σT0−1 1 (I, a) for every action a in I such that D(I, a) = ∅. Since we calculate this only for actions where D(I, a) = ∅, so v¯σT0−1 1 (I, a) does not depend on ¯σ1. Then, starting from the bottom information sets, we set the best-response strategy σBR 1 (I) to always play the action with the highest counterfactual value (ties can be broken arbitrarily), and pass this value up as the payoff for reaching I, repeating the process up the tree. In order to calculate a best response to ¯σT1−T0 2 , we first store, before pruning begins, the counterfactual values for Player 1 against Player 2’s average strategy for every action a in each information set I where D(I, a) = ∅. When we revisit the action on iteration T1, we calculate a best response to ¯σT1 2 except that we set the counterfactual value for every action a in information set I where D(I, a) = ∅to be T1v¯σT1 1 (I, a) −(T0 −1)v¯σT0−1 1 (I, a). The latter term was stored, and the former term can be calculated from the current average strategy profile. As before, we set σBR 1 (I) to always play whichever action has the highest counterfactual value, and pass this term up. A slight complication arises when we are pruning an action a in information set I and wish to start pruning an earlier action a′ from information set I′ such that I ∈D(I′, a′). In this case, it is necessary to explore action a in order to calculate the best response in D(I′, a′). However, if such traversals happen frequently, then this would defeat the purpose of pruning action a. One way to address this is to only prune an action a′ when the number of iterations guaranteed (or estimated) to be skipped exceeds some threshold. This ensures that the overhead is worthwhile, and that we are not frequently traversing an action a farther down the tree that is already being pruned. Another option is to add some upper bound to how long we will prune an action. If the lower bound for how long we will prune a exceeds the upper bound for how long we will prune a′, then we need not traverse a in the best response calculation for a′ because a will still be pruned when we are finished with pruning a′. In our experiments, we use the former approach. Experiments to determine a good parameter for this are presented in Appendix B. 4.2 Regret-Based Pruning with CFR+ CFR+ [13] is a variant of CFR where the regret is never allowed to go below 0. Formally, RT (I, a) = max{RT −1(I, a) + rT (I, a), 0} for T ≥1 and RT (I, a) = 0 for T = 0. Although this change appears small, and does not improve the bound on regret, it leads to faster empirical convergence. CFR+ was a key advancement that allowed Limit Texas Hold’em poker to be essentially solved [1]. At first glance, it would seem that CFR+ and RBP are incompatible. RBP allows actions to be traversed with decreasing frequency as regret decreases below zero. However, CFR+ sets a floor 6 for regret at zero. Nevertheless, it is possible to combine the two, as we now show. We modify the definition of regret in CFR+ so that it can drop below zero, but immediately returns to being positive as soon as regret begins increasing. Formally, we modify the definition of regret in CFR+ for T > 0 to be as follows: RT (I, a) = rT (I, a) if rT (I, a) > 0 and RT −1(I, a) ≤0, and RT (I, a) = RT −1(I, a) + rT (I, a) otherwise. This leads to identical behavior in CFR+, and also allows regret to drop below zero so actions can be pruned. When using RBP with CFR+, regret does not strictly follow the rules for CFR+. CFR+ calls for an action to be played with positive probability whenever instantaneous regret for it is positive in the previous iteration. Since RBP only checks the regret for an action after potentially several iterations have been skipped, there may be a delay between the iteration when an action would return to play in CFR+ and the iteration when it returns to play in RBP. This does not pose a theoretical problem: CFR’s convergence rate still applies. However, this difference is noticeable when combined with linear averaging. Linear averaging weighs each iteration σt in the average strategy by t. It does not affect regret or influence the selection of strategies on an iteration. That is, with linear averaging the new definition for average strategy becomes ¯σT i (I) = P t∈T (tπ σt i i σt i) P t∈T (tπ σt i i ) . Linear averaging still maintains the asymptotic convergence rate of constant averaging (where each iteration is weighed equally) in CFR+ [14]. Empirically it causes CFR+ to converge to a Nash equilibrium much faster. However, in vanilla CFR it results in worse performance and there is no proof guaranteeing convergence. Since RBP with CFR+ results in behavior that does not strictly conform to CFR+, linear averaging results in somewhat noisier convergence. This can be mitigated by reporting the strategy profile found so far that is closest to a Nash equilibrium rather than the current average strategy profile, and we do this in the experiments. 5 Experiments We tested regret-based pruning in both CFR and CFR+ against partial pruning, as well as against CFR with no pruning. Our implementation traverses the game tree once each iteration.1 We tested our algorithm on standard Leduc Hold’em [12] and a scaled-up variant of it featuring more actions. Leduc Hold’em is a popular benchmark problem for imperfect-information game solving due to its size (large enough to be highly nontrivial but small enough to be solvable) and strategic complexity. In Leduc Hold’em, there is a deck consisting of six cards: two each of Jack, Queen, and King. There are two rounds. In the first round, each player places an ante of 1 chip in the pot and receives a single private card. A round of betting then takes place with a two-bet maximum, with Player 1 going first. A public shared card is then dealt face up and another round of betting takes place. Again, Player 1 goes first, and there is a two-bet maximum. If one of the players has a pair with the public card, that players wins. Otherwise, the player with the higher card wins. In standard Leduc Hold’em, the bet size in the first round is 2 chips, and 4 chips in the second round. In our scaled-up variant, which we call Leduc-5, there are 5 bet sizes to choose from: in the first round a player may bet 0.5, 1, 2, 4, or 8 chips, while in the second round a player may bet 1, 2, 4, 8, or 16 chips. We measure the quality of a strategy profile by its exploitability, which is the summed ϵ distance of both players from a Nash equilibrium strategy. Formally, exploitability of a strategy profile σ is maxσ∗ 1∈Σ1 u1(σ∗ 1, σ2) + maxσ∗ 2∈Σ2 u2(σ1, σ∗ 2). We measure exploitability against the number of nodes touched over all CFR traversals. As shown in Figure 1, RBP leads to a substantial improvement over vanilla CFR with partial pruning in Leduc Hold’em, increasing the speed of convergence by more than a factor of 8. This is partially due to the game tree being traversed twice as fast, and partially due to the use of a best response in sequences that are pruned (the benefit of which was described in Section 3). The improvement when added on top of CFR+ is smaller, increasing the speed of convergence by about a factor of 2. This matches the reduction in game tree traversal size. The benefit from RBP is more substantial in the larger benchmark game, Leduc-5. RBP increases convergence speed of CFR by a factor of 12, and reduces the per-iteration game tree traversal cost by about a factor of 7. In CFR+, RBP improves the rate of convergence by about an order of magnitude. RBP also decreases the number of nodes touched per iteration in CFR+ by about a factor of 40. 1Canonical CFR+ traverses the game tree twice each iteration, updating the regrets for each player in separate traversals [13]. This difference does not, however, affect the error measure (y-axis) in the experiments. 7 (a) Leduc Hold’em (b) Leduc-5 Hold’em Figure 1: Top: Exploitability. Bottom: Nodes touched per iteration. The results imply that larger games benefit more from RBP than smaller games. This is not universally true, since it is possible to have a large game where every action is part of the Nash equilibrium. Nevertheless, there are many games with very large action spaces where the vast majority of those actions are suboptimal, but players do not know beforehand which are suboptimal. In such games, RBP would improve convergence tremendously. 6 Conclusions and Future Research In this paper we introduced a new method of pruning that allows CFR to avoid traversing highregret actions in every iteration. Our regret-based pruning (RBP) temporarily ceases their traversal in a sound way without compromising the overall convergence rate. Experiments show an order of magnitude speed improvement over partial pruning, and suggest that the benefit of RBP increases with game size. Thus RBP is particularly useful in large games where many actions are suboptimal, but where it is not known beforehand which actions those are. In future research, it would be worth examining whether similar forms of pruning can be applied to other equilibrium-finding algorithms as well. RBP, as presented in this paper, is for CFR using regret matching to determine what strategies to use on each iteration based on the regrets. RBP does not directly apply to other strategy selection techniques that could be used within CFR such as exponential weights, because the latter always puts positive probability on actions. Also, it would be interesting to see whether RBP-like pruning could be applied to first-order methods for equilibriumfinding [5, 3, 10, 8]. The results in this paper suggest that for any equilibrium-finding algorithm to be efficient in large games, effective pruning is essential. 6.1 Acknowledgement This material is based on work supported by the National Science Foundation under grants IIS1320620 and IIS-1546752, as well as XSEDE computing resources provided by the Pittsburgh Supercomputing Center. 8 References [1] Michael Bowling, Neil Burch, Michael Johanson, and Oskari Tammelin. Heads-up limit holdem poker is solved. Science, 347(6218):145–149, 2015. [2] Noam Brown, Sam Ganzfried, and Tuomas Sandholm. Hierarchical abstraction, distributed equilibrium computation, and post-processing, with application to a champion no-limit texas hold’em agent. In Proceedings of the 2015 international conference on Autonomous agents and multi-agent systems. International Foundation for Autonomous Agents and Multiagent Systems, 2015. [3] Andrew Gilpin, Javier Pe˜na, and Tuomas Sandholm. First-order algorithm with O(ln(1/ϵ)) convergence for ϵ-equilibrium in two-person zero-sum games. Mathematical Programming, 133(1–2):279–298, 2012. Conference version appeared in AAAI-08. [4] Andrew Gilpin and Tuomas Sandholm. Lossless abstraction of imperfect information games. Journal of the ACM, 54(5), 2007. Early version ‘Finding equilibria in large sequential games of imperfect information’ appeared in the Proceedings of the ACM Conference on Electronic Commerce (EC), pages 160–169, 2006. [5] Samid Hoda, Andrew Gilpin, Javier Pe˜na, and Tuomas Sandholm. Smoothing techniques for computing Nash equilibria of sequential games. Mathematics of Operations Research, 35(2):494–512, 2010. Conference version appeared in WINE-07. [6] Eric Griffin Jackson. A time and space efficient algorithm for approximately solving large imperfect information games. In AAAI Workshop on Computer Poker and Imperfect Information, 2014. [7] Michael Johanson, Nolan Bard, Neil Burch, and Michael Bowling. Finding optimal abstract strategies in extensive-form games. In AAAI Conference on Artificial Intelligence (AAAI), 2012. [8] Christian Kroer, Kevin Waugh, Fatma Kılınc¸-Karzan, and Tuomas Sandholm. Faster firstorder methods for extensive-form game solving. In Proceedings of the ACM Conference on Economics and Computation (EC), 2015. [9] Marc Lanctot, Kevin Waugh, Martin Zinkevich, and Michael Bowling. Monte Carlo sampling for regret minimization in extensive games. In Proceedings of the Annual Conference on Neural Information Processing Systems (NIPS), pages 1078–1086, 2009. [10] Franc¸ois Pays. An interior point approach to large games of incomplete information. In AAAI Computer Poker Workshop, 2014. [11] Tuomas Sandholm. The state of solving large incomplete-information games, and application to poker. AI Magazine, pages 13–32, Winter 2010. Special issue on Algorithmic Game Theory. [12] Finnegan Southey, Michael Bowling, Bryce Larson, Carmelo Piccione, Neil Burch, Darse Billings, and Chris Rayner. Bayes’ bluff: Opponent modelling in poker. In Proceedings of the 21st Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 550–558, July 2005. [13] Oskari Tammelin. Solving large imperfect information games using CFR+. arXiv preprint arXiv:1407.5042, 2014. [14] Oskari Tammelin, Neil Burch, Michael Johanson, and Michael Bowling. Solving heads-up limit texas holdem. In IJCAI, volume 2015, 2015. [15] Kevin Waugh, David Schnizlein, Michael Bowling, and Duane Szafron. Abstraction pathologies in extensive games. In International Conference on Autonomous Agents and Multi-Agent Systems (AAMAS), 2009. [16] Martin Zinkevich, Michael Bowling, Michael Johanson, and Carmelo Piccione. Regret minimization in games with incomplete information. In Proceedings of the Annual Conference on Neural Information Processing Systems (NIPS), 2007. 9 | 2015 | 303 |
5,818 | Adaptive Low-Complexity Sequential Inference for Dirichlet Process Mixture Models Theodoros Tsiligkaridis, Keith W. Forsythe Massachusetts Institute of Technology, Lincoln Laboratory Lexington, MA 02421 USA ttsili@ll.mit.edu, forsythe@ll.mit.edu Abstract We develop a sequential low-complexity inference procedure for Dirichlet process mixtures of Gaussians for online clustering and parameter estimation when the number of clusters are unknown a-priori. We present an easily computable, closed form parametric expression for the conditional likelihood, in which hyperparameters are recursively updated as a function of the streaming data assuming conjugate priors. Motivated by large-sample asymptotics, we propose a novel adaptive low-complexity design for the Dirichlet process concentration parameter and show that the number of classes grow at most at a logarithmic rate. We further prove that in the large-sample limit, the conditional likelihood and data predictive distribution become asymptotically Gaussian. We demonstrate through experiments on synthetic and real data sets that our approach is superior to other online state-of-the-art methods. 1 Introduction Dirichlet process mixture models (DPMM) have been widely used for clustering data Neal (1992); Rasmussen (2000). Traditional finite mixture models often suffer from overfitting or underfitting of data due to possible mismatch between the model complexity and amount of data. Thus, model selection or model averaging is required to find the correct number of clusters or the model with the appropriate complexity. This requires significant computation for high-dimensional data sets or large samples. Bayesian nonparametric modeling are alternative approaches to parametric modeling, an example being DPMM’s which can automatically infer the number of clusters from the data via Bayesian inference techniques. The use of Markov chain Monte Carlo (MCMC) methods for Dirichlet process mixtures has made inference tractable Neal (2000). However, these methods can exhibit slow convergence and their convergence can be tough to detect. Alternatives include variational methods Blei & Jordan (2006), which are deterministic algorithms that convert inference to optimization. These approaches can take a significant computational effort even for moderate sized data sets. For large-scale data sets and low-latency applications with streaming data, there is a need for inference algorithms that are much faster and do not require multiple passes through the data. In this work, we focus on lowcomplexity algorithms that adapt to each sample as they arrive, making them highly scalable. An online algorithm for learning DPMM’s based on a sequential variational approximation (SVA) was proposed in Lin (2013), and the authors in Wang & Dunson (2011) recently proposed a sequential maximum a-posterior (MAP) estimator for the class labels given streaming data. The algorithm is called sequential updating and greedy search (SUGS) and each iteration is composed of a greedy selection step and a posterior update step. The choice of concentration parameter α is critical for DPMM’s as it controls the number of clusters Antoniak (1974). While most fast DPMM algorithms use a fixed α Fearnhead (2004); Daume 1 (2007); Kurihara et al. (2006), imposing a prior distribution on α and sampling from it provides more flexibility, but this approach still heavily relies on experimentation and prior knowledge. Thus, many fast inference methods for Dirichlet process mixture models have been proposed that can adapt α to the data, including the works Escobar & West (1995) where learning of α is incorporated in the Gibbs sampling analysis, Blei & Jordan (2006) where a Gamma prior is used in a conjugate manner directly in the variational inference algorithm. Wang & Dunson (2011) also account for model uncertainty on the concentration parameter α in a Bayesian manner directly in the sequential inference procedure. This approach can be computationally expensive, as discretization of the domain of α is needed, and its stability highly depends on the initial distribution on α and on the range of values of α. To the best of our knowledge, we are the first to analytically study the evolution and stability of the adapted sequence of α’s in the online learning setting. In this paper, we propose an adaptive non-Bayesian approach for adapting α motivated by largesample asymptotics, and call the resulting algorithm ASUGS (Adaptive SUGS). While the basic idea behind ASUGS is directly related to the greedy approach of SUGS, the main contribution is a novel low-complexity stable method for choosing the concentration parameter adaptively as new data arrive, which greatly improves the clustering performance. We derive an upper bound on the number of classes, logarithmic in the number of samples, and further prove that the sequence of concentration parameters that results from this adaptive design is almost bounded. We finally prove, that the conditional likelihood, which is the primary tool used for Bayesian-based online clustering, is asymptotically Gaussian in the large-sample limit, implying that the clustering part of ASUGS asymptotically behaves as a Gaussian classifier. Experiments show that our method outperforms other state-of-the-art methods for online learning of DPMM’s. The paper is organized as follows. In Section 2, we review the sequential inference framework for DPMM’s that we will build upon, introduce notation and propose our adaptive modification. In Section 3, the probabilistic data model is given and sequential inference steps are shown. Section 4 contains the growth rate analysis of the number of classes and the adaptively-designed concentration parameters, and Section 5 contains the Gaussian large-sample approximation to the conditional likelihood. Experimental results are shown in Section 6 and we conclude in Section 7. 2 Sequential Inference Framework for DPMM Here, we review the SUGS framework of Wang & Dunson (2011) for online clustering. Here, the nonparametric nature of the Dirichlet process manifests itself as modeling mixture models with countably infinite components. Let the observations be given by yi ∈Rd, and γi to denote the class label of the ith observation (a latent variable). We define the available information at time i as y(i) = {y1, . . . , yi} and γ(i−1) = {γ1, . . . , γi−1}. The online sequential updating and greedy search (SUGS) algorithm is summarized next for completeness. Set γ1 = 1 and calculate π(θ1|y1, γ1). For i ≥2, 1. Choose best class label for yi: γi ∈arg max1≤h≤ki−1+1 P(γi = h|y(i), γ(i−1)). 2. Update the posterior distribution using yi, γi: π(θγi|y(i), γ(i)) ∝ f(yi|θγi)π(θγi|y(i−1), γ(i−1)). where θh are the parameters of class h, f(yi|θh) is the observation density conditioned on class h and ki−1 is the number of classes created at time i −1. The algorithm sequentially allocates observations yi to classes based on maximizing the conditional posterior probability. To calculate the posterior probability P(γi = h|y(i), γ(i−1)), define the variables: Li,h(yi) def = P(yi|γi = h, y(i−1), γ(i−1)), πi,h(α) def = P(γi = h|α, y(i−1), γ(i−1)) From Bayes’ rule, P(γi = h|y(i), γ(i−1)) ∝Li,h(yi)πi,h(α) for h = 1, . . . , ki−1 + 1. Here, α is considered fixed at this iteration, and is not updated in a fully Bayesian manner. According to the Dirichlet process prediction, the predictive probability of assigning observation yi to a class h is: πi,h(α) = mi−1(h) i−1+α , h = 1, . . . , ki−1 α i−1+α, h = ki−1 + 1 (1) 2 Algorithm 1 Adaptive Sequential Updating and Greedy Search (ASUGS) Input: streaming data {yi}∞ i=1, rate parameter λ > 0. Set γ1 = 1 and k1 = 1. Calculate π(θ1|y1, γ1). for i ≥2: do (a) Update concentration parameter: αi−1 = ki−1 λ+log(i−1). (b) Choose best label for yi: γi ∼{q(i) h } = n Li,h(yi)πi,h(αi−1) P h′ Li,h′(yi)πi,h′(αi−1) o . (c) Update posterior distribution: π(θγi|y(i), γ(i)) ∝f(yi|θγi)π(θγi|y(i−1), γ(i−1)). end for where mi−1(h) = Pi−1 l=1 I(γl = h) counts the number of observations labeled as class h at time i −1, and α > 0 is the concentration parameter. 2.1 Adaptation of Concentration Parameter α It is well known that the concentration parameter α has a strong influence on the growth of the number of classes Antoniak (1974). Our experiments show that in this sequential framework, the choice of α is even more critical. Choosing a fixed α as in the online SVA algorithm of Lin (2013) requires cross-validation, which is computationally prohibitive for large-scale data sets. Furthermore, in the streaming data setting where no estimate on the data complexity exists, it is impractical to perform cross-validation. Although the parameter α is handled from a fully Bayesian treatment in Wang & Dunson (2011), a pre-specified grid of possible values α can take, say {αl}L l=1, along with the prior distribution over them, needs to be chosen in advance. Storage and updating of a matrix of size (ki−1 + 1) × L and further marginalization is needed to compute P(γi = h|y(i), γ(i−1)) at each iteration i. Thus, we propose an alternative data-driven method for choosing α that works well in practice, is simple to compute and has theoretical guarantees. The idea is to start with a prior distribution on α that favors small α and shape it into a posterior distribution using the data. Define pi(α) = p(α|y(i), γ(i)) as the posterior distribution formed at time i, which will be used in ASUGS at time i + 1. Let p1(α) ≡p1(α|y(1), γ(1)) denote the prior for α, e.g., an exponential distribution p1(α) = λe−λα. The dependence on y(i) and γ(i) is trivial only at this first step. Then, by Bayes rule, pi(α) ∝p(yi, γi|y(i−1), γ(i−1), α)p(α|y(i−1), γ(i−1)) ∝ pi−1(α)πi,γi(α) where πi,γi(α) is given in (1). Once this update is made after the selection of γi, the α to be used in the next selection step is the mean of the distribution pi(α), i.e., αi = E[α|y(i), γ(i)]. As will be shown in Section 5, the distribution pi(α) can be approximated by a Gamma distribution with shape parameter ki and rate parameter λ + log i. Under this approximation, we have αi = ki λ+log i, only requiring storage and update of one scalar parameter ki at each iteration i. The ASUGS algorithm is summarized in Algorithm 1. The selection step may be implemented by sampling the probability mass function {q(i) h }. The posterior update step can be efficiently performed by updating the hyperparameters as a function of the streaming data for the case of conjugate distributions. Section 3 derives these updates for the case of multivariate Gaussian observations and conjugate priors for the parameters. 3 Sequential Inference under Unknown Mean & Unknown Covariance We consider the general case of an unknown mean and covariance for each class. The probabilistic model for the parameters of each class is given as: yi|µ, T ∼N(·|µ, T), µ|T ∼N(·|µ0, coT), T ∼W(·|δ0, V0) (2) where N(·|µ, T) denotes the multivariate normal distribution with mean µ and precision matrix T, and W(·|δ, V) is the Wishart distribution with 2δ degrees of freedom and scale matrix V. The parameters θ = (µ, T) ∈Rd ×Sd ++ follow a normal-Wishart joint distribution. The model (2) leads to closed-form expressions for Li,h(yi)’s due to conjugacy Tzikas et al. (2008). To calculate the class posteriors, the conditional likelihoods of yi given assignment to class h and the previous class assignments need to be calculated first. The conditional likelihood of yi given 3 assignment to class h and the history (y(i−1), γ(i−1)) is given by: Li,h(yi) = Z f(yi|θh)π(θh|y(i−1), γ(i−1))dθh (3) Due to the conjugacy of the distributions, the posterior π(θh|y(i−1), γ(i−1)) always has the form: π(θh|y(i−1), γ(i−1)) = N(µh|µ(i−1) h , c(i−1) h Th)W(Th|δ(i−1) h , V(i−1) h ) where µ(i−1) h , c(i−1) h , δ(i−1) h , V(i−1) h are hyperparameters that can be recursively computed as new samples come in. The form of this recursive computation of the hyperparameters is derived in Appendix A. For ease of interpretation and numerical stability, we define Σ(i) h := (V(i) h )−1 2δ(i) h as the inverse of the mean of the Wishart distribution W(·|δ(i) h , V(i) h ). The matrix Σ(i) h has the natural interpretation as the covariance matrix of class h at iteration i. Once the γith component is chosen, the parameter updates for the γith class become: µ(i) γi = 1 1 + c(i−1) γi yi + c(i−1) γi 1 + c(i−1) γi µ(i−1) γi (4) c(i) γi = c(i−1) γi + 1 (5) Σ(i) γi = 2δ(i−1) γi 1 + 2δ(i−1) γi Σ(i−1) γi + 1 1 + 2δ(i−1) γi c(i−1) γi 1 + c(i−1) γi (yi −µ(i−1) γi )(yi −µ(i−1) γi )T (6) δ(i) γi = δ(i−1) γi + 1 2 (7) If the starting matrix Σ(0) h is positive definite, then all the matrices {Σ(i) h } will remain positive definite. Let us return to the calculation of the conditional likelihood (3). By iterated integration, it follows that: Li,h(yi) ∝ r(i−1) h 2δ(i−1) h !d/2 ρd(δ(i−1) h ) det(Σ(i−1) h )−1/2 1 + r(i−1) h 2δ(i−1) h (yi −µ(i−1) h )T (Σ(i−1) h )−1(yi −µ(i−1) h ) δ(i−1) h + 1 2 (8) where ρd(a) def = Γ(a+ 1 2 ) Γ(a+ 1−d 2 ) and r(i−1) h def = c(i−1) h 1+c(i−1) h . A detailed mathematical derivation of this conditional likelihood is included in Appendix B. We remark that for the new class h = ki−1 + 1, Li,ki−1+1 has the form (8) with the initial choice of hyperparameters r(0), δ(0), µ(0), Σ(0). 4 Growth Rate Analysis of Number of Classes & Stability In this section, we derive a model for the posterior distribution pn(α) using large-sample approximations, which will allow us to derive growth rates on the number of classes and the sequence of concentration parameters, showing that the number of classes grows as E[kn] = O(log1+ϵ n) for ϵ arbitarily small under certain mild conditions. The probability density of the α parameter is updated at the jth step in the following fashion: pj+1(α) ∝pj(α) · α j+α innovation class chosen 1 j+α otherwise , where only the α-dependent factors in the update are shown. The α-independent factors are absorbed by the normalization to a probability density. Choosing the innovation class pushes mass toward infinity while choosing any other class pushes mass toward zero. Thus there is a possibility that the innovation probability grows in a undesired manner. We assess the growth of the number of innovations rn def = kn −1 under simple assumptions on some likelihood functions that appear naturally in the ASUGS algorithm. Assuming that the initial distribution of α is p1(α) = λe−λα, the distribution used at step n + 1 is proportional to αrn Qn−1 j=1 (1 + α j )−1e−λα. We make use of the limiting relation 4 Theorem 1. The following asymptotic behavior holds: limn→∞ log Qn−1 j=1 (1+ α j ) α log n = 1. Proof. See Appendix C. Using Theorem 1, a large-sample model for pn(α) is αrne−(λ+log n)α, suitably normalized. Recognizing this as the Gamma distribution with shape parameter rn + 1 and rate parameter λ + log n, its mean is given by αn = rn+1 λ+log n. We use the mean in this form to choose class membership in Alg. 1. This asymptotic approximation leads to a very simple scalar update of the concentration parameter; there is no need for discretization for tracking the evolution of continuous probability distributions on α. In our experiments, this approximation is very accurate. Recall that the innovation class is labeled K+ = kn−1 + 1 at the nth step. The modeled updates randomly select a previous class or innovation (new class) by sampling from the probability distribution {q(n) k = P(γn = k|y(n), γ(n−1))}K+ k=1. Note that n −1 = P k̸=K+ mn(k) , where mn(k) represents the number of members in class k at time n. We assume the data follows the Gaussian mixture distribution: pT (y) def = K X h=1 πhN(y|µh, Σh) (9) where πh are the prior probabilities, and µh, Σh are the parameters of the Gaussian clusters. Define the mixture-model probability density function, which plays the role of the predictive distribution: ˜Ln,K+(y) def = X k̸=K+ mn−1(k) n −1 Ln,k(y), (10) so that the probabilities of choosing a previous class or an innovation (using Equ. (1)) are proportional to P k̸=K+ mn−1(k) n−1+αn−1 Ln,k(yn) = (n−1) n−1+αn−1 ˜Ln,K+(yn) and αn−1 n−1+αn−1 Ln,K+(yn), respectively. If τn−1 denotes the innovation probability at step n, then we have ρn−1 αn−1Ln,K+(yn) n −1 + αn−1 , ρn−1 (n −1)˜Ln,K+(yn) n −1 + αn−1 ! = (τn−1, 1 −τn−1) (11) for some positive proportionality factor ρn−1. Define the likelihood ratio (LR) at the beginning of stage n as 1: ln(y) def = Ln,K+(y) ˜Ln,K+(y) (12) Conceptually, the mixture (10) represents a modeled distribution fitting the currently observed data. If all “modes” of the data have been observed, it is reasonable to expect that ˜Ln,K+ is a good model for future observations. The LR ln(yn) is not large when the future observations are well-modeled by (10). In fact, we expect ˜Ln,K+ →pT as n →∞, as discussed in Section 5. Lemma 1. The following bound holds: τn−1 = ln(yn)αn−1 n−1+ln(yn)αn−1 ≤min ln(yn)αn−1 n−1 , 1 . Proof. The result follows directly from (11) after a simple calculation. The innovation random variable rn is described by the random process associated with the probabilities of transition P(rn+1 = k|rn) = τn, k = rn + 1 1 −τn, k = rn . (13) 1Here, L0(·) def = Ln,K+(·) is independent of n and only depends on the initial choice of hyperparameters as discussed in Sec. 3. 5 The expectation of rn is majorized by the expectation of a similar random process, ¯rn, based on the transition probability σn def = min( rn+1 an , 1) instead of τn as Appendix D shows, where the random sequence {an} is given by ln+1(yn+1)−1n(λ+log n). The latter can be described as a modification of a Polya urn process with selection probability σn. The asymptotic behavior of rn and related variables is described in the following theorem. Theorem 2. Let τn be a sequence of real-valued random variables 0 ≤τn ≤1 satisfying τn ≤rn+1 an for n ≥N, where an = ln+1(yn+1)−1n(λ + log n), and where the nonnegative, integer-valued random variables rn evolve according to (13). Assume the following for n ≥N: 1. ln(yn) ≤ζ (a.s.) 2. D(pT ∥˜Ln,K+) ≤δ (a.s.) where D(p ∥q) is the Kullback-Leibler divergence between distributions p(·) and q(·). Then, as n →∞, rn = OP (log1+ζ√ δ/2 n), αn = OP (logζ√ δ/2 n) (14) Proof. See Appendix E. Theorem 2 bounds the growth rate of the mean of the number of class innovations and the concentration parameter αn in terms of the sample size n and parameter ζ. The bounded LR and bounded KL divergence conditions of Thm. 2 manifest themselves in the rate exponents of (14). The experiments section shows that both of the conditions of Thm. 2 hold for all iterations n ≥N for some N ∈N. In fact, assuming the correct clustering, the mixture distribution ˜Ln,kn−1+1 converges to the true mixture distribution pT , implying that the number of class innovations grows at most as O(log1+ϵ n) and the sequence of concentration parameters is O(logϵ n), where ϵ > 0 can be arbitrarily small. 5 Asymptotic Normality of Conditional Likelihood In this section, we derive an asymptotic expression for the conditional likelihood (8) in order to gain insight into the steady-state of the algorithm. We let πh denote the true prior probability of class h. Using the bounds of the Gamma function in Theorem 1.6 from Batir (2008), it follows that lima→∞ ρd(a) e−d/2(a−1/2)d/2 = 1. Under normal convergence conditions of the algorithm (with the pruning and merging steps included), all classes h = 1, . . . , K will be correctly identified and populated with approximately ni−1(h) ≈πh(i −1) observations at time i −1. Thus, the conditional class prior for each class h converges to πh as i →∞, in virtue of (14), πi,h(αi−1) = ni−1(h) i−1+αi−1 = πh 1+ OP (logζ√ δ/2(i−1)) i−1 i→∞ −→πh. According to (5), we expect r(i−1) h →1 as i →∞since c(i−1) h ∼πh(i −1). Also, we expect 2δ(i−1) h ∼ πh(i −1) as i →∞according to (7). Also, from before, ρd(δ(i−1) h ) ∼e−d/2(δ(i−1) h −1/2)d/2 ∼ e−d/2(πh i−1 2 −1 2)d/2. The parameter updates (4)-(7) imply µ(i) h →µh and Σ(i) h →Σh as i →∞. This follows from the strong law of large numbers, as the updates are recursive implementations of the sample mean and sample covariance matrix. Thus, the large-sample approximation to the conditional likelihood becomes: Li,h(yi) i→∞ ∝ limi→∞ 1 + π−1 h i−1 (yi −µ(i−1) h )T (Σ(i−1) h )−1(yi −µ(i−1) h ) −i−1 2π−1 h limi→∞det(Σ(i−1) h )1/2 i→∞ ∝ e−1 2 (yi−µh)T Σ−1 h (yi−µh) √det Σh (15) where we used limu→∞(1+ c u)u = ec. The conditional likelihood (15) corresponds to the multivariate Gaussian distribution with mean µh and covariance matrix Σh. A similar asymptotic normality 6 result was recently obtained in Tsiligkaridis & Forsythe (2015) for Gaussian observations with a von Mises prior. The asymptotics mn−1(h) n−1 →πh, µ(n) h →µh, Σ(n) h →Σh, Ln,h(y) →N(y|µh, Σh) as n →∞imply that the mixture distribution ˜Ln,K+ in (10) converges to the true Gaussian mixture distribution pT of (9). Thus, for any small δ, we expect D(pT ∥˜Ln,K+) ≤δ for all n ≥N, validating the assumption of Theorem 2. 6 Experiments We apply the ASUGS learning algorithm to a synthetic 16-class example and to a real data set, to verify the stability and accuracy of our method. The experiments show the value of adaptation of the Dirichlet concentration parameter for online clustering and parameter estimation. Since it is possible that multiple clusters are similar and classes might be created due to outliers, or due to the particular ordering of the streaming data sequence, we add the pruning and merging step in the ASUGS algorithm as done in Lin (2013). We compare ASUGS and ASUGS-PM with SUGS, SUGS-PM, SVA and SVA-PM proposed in Lin (2013), since it was shown in Lin (2013) that SVA and SVA-PM outperform the block-based methods that perform iterative updates over the entire data set including Collapsed Gibbs Sampling, MCMC with Split-Merge and Truncation-Free Variational Inference. 6.1 Synthetic Data set We consider learning the parameters of a 16-class Gaussian mixture each with equal variance of σ2 = 0.025. The training set was made up of 500 iid samples, and the test set was made up of 1000 iid samples. The clustering results are shown in Fig. 1(a), showing that the ASUGS-based approaches are more stable than SVA-based algorithms. ASUGS-PM performs best and identifies the correct number of clusters, and their parameters. Fig. 1(b) shows the data log-likelihood on the test set (averaged over 100 Monte Carlo trials), the mean and variance of the number of classes at each iteration. The ASUGS-based approaches achieve a higher log-likelihood than SVA-based approaches asymptotically. Fig. 6.1 provides some numerical verification for the assumptions of Theorem 2. As expected, the predictive likelihood ˜Li,K+ (10) converges to the true mixture distribution pT (9), and the likelihood ratio li(yi) is bounded after enough samples are processed. -4 -2 0 2 4 -4 -2 0 2 4 SVA -4 -2 0 2 4 -4 -2 0 2 4 SVA-PM -4 -2 0 2 4 -4 -2 0 2 4 ASUGS -4 -2 0 2 4 -4 -2 0 2 4 ASUGS-PM (a) Iteration 0 100 200 300 400 500 Avg. Joint Log-likelihood -10 -8 -6 -4 -2 Iteration 0 100 200 300 400 500 Mean Number of Classes 0 5 10 15 20 25 ASUGS ASUGS-PM SUGS SUGS-PM SVA SVA-PM Iteration 0 100 200 300 400 500 Variance of Number of Classes 0 1 2 3 4 5 (b) Figure 1: (a) Clustering performance of SVA, SVA-PM, ASUGS and ASUGS-PM on synthetic data set. ASUGS-PM identifies the 16 clusters correctly. (b) Joint log-likelihood on synthetic data, mean and variance of number of classes as a function of iteration. The likelihood values were evaluated on a held-out set of 1000 samples. ASUGS-PM achieves the highest log-likelihood and has the lowest asymptotic variance on the number of classes. 6.2 Real Data Set We applied the online nonparametric Bayesian methods for clustering image data. We used the MNIST data set, which consists of 60, 000 training samples, and 10, 000 test samples. Each sample 7 Sample i 100 200 300 400 500 li(yi) 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Sample i 0 100 200 300 400 500 k ~Li;K+ ! pT k2 2 0 0.5 1 1.5 2 2.5 3 Figure 2: Likelihood ratio li(yi) = Li,K+(yi) ˜Li,K+(yi) (left) and L2-distance between ˜Li,K+(·) and true mixture distribution pT (right) for synthetic example (see 1). is a 28 × 28 image of a handwritten digit (total of 784 dimensions), and we perform PCA preprocessing to reduce dimensionality to d = 50 dimensions as in Kurihara et al. (2006). We use only a random 1.667% subset, consisting of 1000 random samples for training. This training set contains data from all 10 digits with an approximately uniform proportion. Fig. 3 shows the predictive log-likelihood over the test set, and the mean images for clusters obtained using ASUGSPM and SVA-PM, respectively. We note that ASUGS-PM achieves higher log-likelihood values and finds all digits correctly using only 23 clusters, while SVA-PM finds some digits using 56 clusters. Iteration 0 100 200 300 400 500 600 700 800 900 1000 Predictive Log-Likelihood -5000 -4500 -4000 -3500 -3000 -2500 -2000 -1500 -1000 -500 0 ASUGS-PM SUGS-PM SVA-PM (a) (b) (c) Figure 3: Predictive log-likelihood (a) on test set, mean images for clusters found using ASUGS-PM (b) and SVA-PM (c) on MNIST data set. 6.3 Discussion Although both SVA and ASUGS methods have similar computational complexity and use decisions and information obtained from processing previous samples in order to decide on class innovations, the mechanics of these methods are quite different. ASUGS uses an adaptive α motivated by asymptotic theory, while SVA uses a fixed α. Furthermore, SVA updates the parameters of all the components at each iteration (in a weighted fashion) while ASUGS only updates the parameters of the most-likely cluster, thus minimizing leakage to unrelated components. The λ parameter of ASUGS does not affect performance as much as the threshold parameter ϵ of SVA does, which often leads to instability requiring lots of pruning and merging steps and increasing latency. This is critical for large data sets or streaming applications, because cross-validation would be required to set ϵ appropriately. We observe higher log-likelihoods and better numerical stability for ASUGS-based methods in comparison to SVA. The mathematical formulation of ASUGS allows for theoretical guarantees (Theorem 2), and asymptotically normal predictive distribution. 7 Conclusion We developed a fast online clustering and parameter estimation algorithm for Dirichlet process mixtures of Gaussians, capable of learning in a single data pass. Motivated by large-sample asymptotics, we proposed a novel low-complexity data-driven adaptive design for the concentration parameter and showed it leads to logarithmic growth rates on the number of classes. Through experiments on synthetic and real data sets, we show our method achieves better performance and is as fast as other state-of-the-art online learning DPMM methods. 8 References Antoniak, C. E. Mixtures of Dirichlet Processes with Applications to Bayesian Nonparametric Problems. The Annals of Statistics, 2(6):1152–1174, 1974. Batir, N. Inequalities for the Gamma Function. Archiv der Mathematik, 91(6):554–563, 2008. Blei, D. M. and Jordan, M. I. Variational Inference for Dirichlet Process Mixtures. Bayesian Analysis, 1(1):121–144, 2006. Daume, H. Fast Search for Dirichlet Process Mixture Models. In Conference on Artificial Intelligence and Statistics, 2007. Escobar, M. D. and West, M. Bayesian Density Estimation and Inference using Mixtures. Journal of the American Statistical Association, 90(430):577–588, June 1995. Fearnhead, P. Particle Filters for Mixture Models with an Uknown Number of Components. Statistics and Computing, 14:11–21, 2004. Kurihara, K., Welling, M., and Vlassis, N. Accelerated Variational Dirichlet Mixture Models. In Advances in Neural Information Processing Systems (NIPS), 2006. Lin, Dahua. Online learning of nonparametric mixture models via sequential variational approximation. In Burges, C.J.C., Bottou, L., Welling, M., Ghahramani, Z., and Weinberger, K.Q. (eds.), Advances in Neural Information Processing Systems 26, pp. 395–403. Curran Associates, Inc., 2013. Neal, R. M. Bayesian Mixture Modeling. In Proceedings of the Workshop on Maximum Entropy and Bayesian Methods of Statistical Analysis, volume 11, pp. 197–211, 1992. Neal, R. M. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9(2):249–265, June 2000. Rasmussen, C. E. The infinite gaussian mixture model. In Advances in Neural Information Processing Systems 12, pp. 554–560. MIT Press, 2000. Tsiligkaridis, T. and Forsythe, K. W. A Sequential Bayesian Inference Framework for Blind Frequency Offset Estimation. In Proceedings of IEEE International Workshop on Machine Learning for Signal Processing, Boston, MA, September 2015. Tzikas, D. G., Likas, A. C., and Galatsanos, N. P. The Variational Approximation for Bayesian Inference. IEEE Signal Processing Magazine, pp. 131–146, November 2008. Wang, L. and Dunson, D. B. Fast Bayesian Inference in Dirichlet Process Mixture Models. Journal of Computational and Graphical Statistics, 20(1):196–216, 2011. 9 | 2015 | 304 |
5,819 | Bidirectional Recurrent Neural Networks as Generative Models Mathias Berglund Aalto University, Finland Tapani Raiko Aalto University, Finland Mikko Honkala Nokia Labs, Finland Leo K¨arkk¨ainen Nokia Labs, Finland Akos Vetek Nokia Labs, Finland Juha Karhunen Aalto University, Finland Abstract Bidirectional recurrent neural networks (RNN) are trained to predict both in the positive and negative time directions simultaneously. They have not been used commonly in unsupervised tasks, because a probabilistic interpretation of the model has been difficult. Recently, two different frameworks, GSN and NADE, provide a connection between reconstruction and probabilistic modeling, which makes the interpretation possible. As far as we know, neither GSN or NADE have been studied in the context of time series before. As an example of an unsupervised task, we study the problem of filling in gaps in high-dimensional time series with complex dynamics. Although unidirectional RNNs have recently been trained successfully to model such time series, inference in the negative time direction is non-trivial. We propose two probabilistic interpretations of bidirectional RNNs that can be used to reconstruct missing gaps efficiently. Our experiments on text data show that both proposed methods are much more accurate than unidirectional reconstructions, although a bit less accurate than a computationally complex bidirectional Bayesian inference on the unidirectional RNN. We also provide results on music data for which the Bayesian inference is computationally infeasible, demonstrating the scalability of the proposed methods. 1 Introduction Recurrent neural networks (RNN) have recently been trained successfully for time series modeling, and have been used to achieve state-of-the-art results in supervised tasks including handwriting recognition [12] and speech recognition [13]. RNNs have also been used successfully in unsupervised learning of time series [26, 8]. Recently, RNNs have also been used to generate sequential data [1] in a machine translation context, which further emphasizes the unsupervised setting. Bahdanau et al. [1] used a bidirectional RNN to encode a phrase into a vector, but settled for a unidirectional RNN to decode it into a translated phrase, perhaps because bidirectional RNNs have not been studied much as generative models. Even more recently, Maas et al. [18] used a deep bidirectional RNN in speech recognition, generating text as output. Missing value reconstruction is interesting in at least three different senses. Firstly, it can be used to cope with data that really has missing values. Secondly, reconstruction performance of artificially missing values can be used as a measure of performance in unsupervised learning [21]. Thirdly, reconstruction of artificially missing values can be used as a training criterion [9, 11, 27]. While traditional RNN training criterions correspond to one-step prediction, training to reconstruct longer gaps can push the model towards concentrating on longer-term predictions. Note that the one-step 1 Figure 1: Structure of the simple RNN (left) and the bidirectional RNN (right). prediction criterion is typically used even in approaches that otherwise concentrate on modelling long-term dependencies [see e.g. 19, 17]. When using unidirectional RNNs as generative models, it is straightforward to draw samples from the model in sequential order. However, inference is not trivial in smoothing tasks, where we want to evaluate probabilities for missing values in the middle of a time series. For discrete data, inference with gap sizes of one is feasible - however, inference with larger gap sizes becomes exponentially more expensive. Even sampling can be exponentially expensive with respect to the gap size. One strategy used for training models that are used for filling in gaps is to explicitly train the model with missing data [see e.g. 9]. However, such a criterion has not to our knowledge yet been used and thoroughly evaluated compared with other inference strategies for RNNs. In this paper, we compare different methods of using RNNs to infer missing values for binary time series data. We evaluate the performance of two generative models that rely on bidirectional RNNs, and compare them to inference using a unidirectional RNN. The proposed methods are very favourable in terms of scalability. 2 Recurrent Neural Networks Recurrent neural networks [24, 14] can be seen as extensions of the standard feedforward multilayer perceptron networks, where the inputs and outputs are sequences instead of individual observations. Let us denote the input to a recurrent neural network by X = {xt} where xt 2 RN is an input vector for each time step t. Let us further denote the output as Y = {yt} where yt 2 RM is an output vector for each time step t. Our goal is to model the distribution P (Y|X). Although RNNs map input sequences to output sequences, we can use them in an unsupervised manner by letting the RNN predict the next input. We can do so by setting Y = {yt = xt+1}. 2.1 Unidirectional Recurrent Neural Networks The structure of a basic RNN with one hidden layer is illustrated in Figure 1, where the output yt is determined by P ! yt | {xd}t d=1 " = φ (Wyht + by) (1) where ht = tanh (Whht−1 + Wxxt + bh) (2) and Wy, Wh, and Wx are the weight matrices connecting the hidden to output layer, hidden to hidden layer, and input to hidden layer, respectively. by and bh are the output and hidden layer bias vectors, respectively. Typical options for the final nonlinearity φ are the softmax function for classification or categorical prediction tasks, or independent Bernoulli variables with sigmoid functions for other binary prediction tasks. In this form, the RNN therefore evaluates the output yt based on information propagated through the hidden layer that directly or indirectly depends on the observations {xd}t d=1 = {x1, . . . , xt}. 2 2.2 Bidirectional Recurrent Neural Networks Bidirectional RNNs (BRNN) [25, 2] extend the unidirectional RNN by introducing a second hidden layer, where the hidden to hidden connections flow in opposite temporal order. The model is therefore able to exploit information both from the past and the future. The output yt is traditionally determined by P (yt | {xd}d6=t) = φ ! Wf yhf t + Wb yhb t + by " , but we propose the use of P (yt | {xd}d6=t) = φ ! Wf yhf t−1 + Wb yhb t+1 + by " (3) where hf t = tanh ! Wf hhf t−1 + Wf xxt + bf h " (4) hb t = tanh ! Wb hhb t+1 + Wb xxt + bb h " . (5) The structure of the BRNN is illustrated in Figure 1 (right). Compared with the regular RNN, the forward and backward directions have separate non-tied weights and hidden activations, and are denoted by the superscript f and b for forward and backward, respectively. Note that the connections are acyclic. Note also that in the proposed formulation, yt does not get information from xt. We can therefore use the model in an unsupervised manner to predict one time step given all other time steps in the input sequence simply by setting Y = X. 3 Probabilistic Interpretation for Unsupervised Modelling Probabilistic unsupervised modeling for sequences using a unidirectional RNN is straightforward, as the joint distribution for the whole sequence is simply the product of the individual predictions: Punidirectional(X) = T Y t=1 P(xt | {xd}t−1 d=1). (6) For the BRNN, the situation is more complicated. The network gives predictions for individual outputs given all the others, and the joint distribution cannot be written as their product. We propose two solutions for this, denoted by GSN and NADE. GSN Generative Stochastic Networks (GSN) [6] use a denoising auto-encoder to estimate the data distribution as the asymptotic distribution of the Markov chain that alternates between corruption and denoising. The resulting distribution is thus defined only implicitly, and cannot be written analytically. We can define a corruption function that masks xt as missing, and a denoising function that reconstructs it from the others. It turns out that one feedforward pass of the BRNN does exactly that. Our first probabilistic interpretation is thus that the joint distribution defined by a BRNN is the asymptotic distribution of a process that replaces one observation vector xt at a time in X by sampling it from PBRNN(xt | {xd}d6=t). In practice, we will start from a random initialization and use Gibbs sampling. NADE The Neural Autoregressive Distribution Estimator (NADE) [27] defines a probabilistic model by reconstructing missing components of a vector one at a time in a random order, starting from a fully unobserved vector. Each reconstruction is given by an auto-encoder network that takes as input the observations so far and an auxiliary mask vector that indicates which values are missing. We extend the same idea for time series. Firstly, we concatenate an auxiliary binary element to input vectors to indicate a missing input. The joint distribution of the time series is defined by first drawing a random permutation od of time indices 1 . . . T and then setting data points observed one by one in that order, starting from a fully missing sequence: PNADE(X | od) = T Y d=1 P(xod | {xoe}d−1 e=1). (7) In practice, the BRNN will be trained with some inputs marked as missing, while all the outputs are observed. See Section 5.1 for more training details. 3 4 Filling in gaps with Recurrent Neural Networks The task we aim to solve is to fill in gaps of multiple consecutive data points in high-dimensional binary time series data. The inference is not trivial for two reasons: firstly, we reconstruct multiple consecutive data points, which are likely to depend on each other, and secondly, we fill in data in the middle of a time series and hence need to consider the data both before and after the gap. For filling in gaps with the GSN approach, we first train a bidirectional RNN to estimate PBRNN(xt | {xd}d6=t). In order to achieve that, we use the structure presented in Section 2.2. At test time, the gap is first initialized to random values, after which the missing values are sampled from the distribution PBRNN(xt | {xd}d6=t) one by one in a random order repeatedly to approximate the stationary distribution. For the RNN structures used in this paper, the computational complexity of this approach at test time is O((dc + c2)(T + gM)) where d is the dimensionality of a data point, c is the number of hidden units in the RNN, T is the number of time steps in the data, g is the length of the gap and M is the number of Markov chain Monte Carlo (MCMC) steps used for inference. For filling in gaps with the NADE approach, we first train a bidirectional RNN where some of the inputs are set to a separate missing value token. At test time, all data points in the gap are first initialized with this token, after which each missing data point is reconstructed once until the whole gap is filled. Computationally, the main difference to GSN is that we do not have to sample each reconstructed data point multiple times, but the reconstruction is done in as many steps as there are missing data points in the gap. For the RNN structures used in this paper, the computational complexity of this approach at test time is O((dc + c2)(T + g)) where d is the dimensionality of a data point, c is the number of hidden units in the RNN, g is the length of the gap and T is the number of time steps in the data. In addition to the two proposed methods, one can use a unidirectional RNN to solve the same task. We call this method Bayesian MCMC. Using a unidirectional RNN for the task of filling in gaps is not trivial, as we need to take into account the probabilities of the values after the gap, which the model does not explicitly do. We therefore resort to a similar approach as the GSN approach, where we replace the PBRNN(xt | {xd}d6=t) with a unidirectional equivalent for the Gibbs sampling. As the unidirectional RNN models conditional probabilities of the form PRNN(xt | {xd}t−1 d=1), we can use Bayes’ theorem to derive: PRNN (xt = a | {xd}d6=t) (8) / PRNN ! xt = a | {xd}t−1 d=1 " PRNN ! {xe}T e=t+1 | xt = a, {xd}t−1 d=1 " (9) = T Y ⌧=t PRNN(x⌧| {xd}⌧−1 d=1) $$$ xt=a (10) where PRNN(x⌧| {xd}⌧−1 d=1) is directly the output of the unidirectional RNN given an input sequence X, where one time step t, i.e. the one we Gibbs sample, is replaced by a proposal a. The problem is that we have to go through all possible proposals a separately to evaluate the probability P (xt = a|{xd}d6=t). We therefore have to evaluate the product of the outputs of the unidirectional RNN for time steps t . . . T for each possible a. In some cases this is feasible to evaluate. For categorical data, e.g. text, there are as many possible values for a as there are dimensions1. However, for other binary data the number of possibilities grows exponentially, and is clearly not feasible to evaluate. For the RNN structures used in this paper, the computational complexity of this approach at test time is O((dc+c2)(T +aTM)) where a is the number of different values a data point can have, d is the dimensionality of a data point, c is the number of hidden units in the RNN, T is the number of time steps in the data, and M is the number of MCMC steps used for inference. The critical difference in complexity to the GSN approach is the coefficient a, that for categorical data takes the value d, for binary vectors 2d and for continuous data is infinite. As a simple baseline model, we also evaluate the one-gram log-likelihood of the gaps. The one-gram model assumes a constant context-independent categorical distribution for the categorical task, or a 1For character-based text, the number of dimensions is the number of characters in the model alphabet. 4 vector of factorial binomial probabilities for the structured prediction task: Pone−gram (yt) = f (by) . This can be done in O(dg). We also compare to one-way inference, where the data points in the gap are reconstructed in order without taking the future context into account, using Equations (1) and (2) directly. The computational complexity is O((dc + c2)T). 5 Experiments We run two sets of experiments: one for a categorical prediction task, and one for a binary structured prediction task. In the categorical prediction task we fill in gaps of five characters in Wikipedia text, while in the structural prediction task we fill in gaps of five time steps in different polyphonic music data sets. 5.1 Training details for categorical prediction task For the categorical prediction task, we test the performance of the two proposed methods, GSN and NADE. In addition, we compare the performance to MCMC using Bayesian inference and one-way inference with a unidirectional RNN. We therefore have to train three different RNNs, one for each method. Each RNN is trained as a predictor network, where the character at each step is predicted based on all the previous characters (in the case of the RNN) or all the previous and following characters (in the case of the BRNNs). We use the same data set as Sutskever et al. [26], which consists of 2GB of English text from Wikipedia. For training, we follow a similar strategy as Hermans and Schrauwen [15]. The characters are encoded as one-hot binary vectors with a dimensionality of d = 96 characters and the output is modelled with a softmax distribution. We train the unirectional RNN with string lengths of T = 250 characters, where the error is propagated only from the last 200 outputs. In the BRNN we use string length of T = 300 characters, where the error is propagated from the middle 200 outputs. We therefore avoid propagating the gradient from predictions that lack long temporal context. For the BRNN used in the NADE method, we add one dimension to the one-hot input which corresponds to a missing value token. During training, in each minibatch we mark g = 5 consecutive characters every 25 time steps as a gap. During training, the error is propagated only from these gaps. For each gap, we uniformly draw a value from 1 to 5, and set that many characters in the gap to the missing value token. The model is therefore trained to predict the output in different stages of inference, where a number of the inputs are still marked as missing. For comparison, we also train a similar network, but without masking. In that variant, the error is therefore propagated from all time steps. We refer to “NADE” masked and “NADE no mask”, respectively, for these two training methods. For all the models, the weight elements are drawn from the uniform distribution: wi,j ⇠U [−s, s] where s = 1 for the input to hidden layer, and following Glorot and Bengio [10], where s = p 6/ (din + dout) for the hidden-to-hidden and the hidden-to output layers. The biases are initialized to zero. We use c = 1000 hidden units in the unidirectional RNN and c = 684 hidden units in the two hidden layers in the BRNNs. The number of parameters in the two model types is therefore roughly the same. In the recurrent layers, we set the recurrent activation connected to the first time step to zero. The networks are trained using stochastic gradient descent and the gradient is calculated using backpropagation through time. We use a minibatch size of 40, i.e. each minibatch consists of 40 randomly sampled sequences of length 250. As the gradients tend to occasionally “blow up” when training RNNs [5, 20], we normalize the gradients at each update to have length one. The step size is set to 0.25 for all layers in the beginning of training, and it is linearly decayed to zero during training. As training the model is very time-consuming2, we do not optimize the hyperparameters, or repeat runs to get confidence intervals around the evaluated performances. 2We used about 8 weeks of GPU time for the reported results. 5 5.2 Training Details for the Binary Structured Prediction Task In the other set of experiments, we use four polyphonic music data sets [8]. The data sets consist of at least 7 hours of polyphonic music each, where each data point is a binary d = 88-dimensional vector that represents one time step of MIDI-encoded music, indicating which of the 88 keys of a piano are pressed. We test the performance of the two proposed methods, but omit training the unidirectional RNNs as the computational complexity of the Bayesian MCMC is prohibitive (a = 288). We train all models for 50 000 updates in minibatches of ⇡3 000 individual data points3. As the data sets are small, we select the initial learning rate on a grid of {0.0001, 0.0003, . . . , 0.3, 1} based on the lowest validation set cost. We use no “burn-in” as several of the scores are fairly short, and therefore do not specifically mask out values in the beginning or end of the data set as we did for the text data. For the NADE method, we use an additional dimension as a missing value token in the data. For the missing values, we set the missing value token to one and the other dimensions to zero. Other training details are similar to the categorical prediction task. 5.3 Evaluation of Models At test time, we evaluate the models by calculating the mean log-likelihood of the correct value of gaps of five consecutive missing values in test data. In the GSN and Bayesian MCMC approaches, we first set the five values in the gap to a random value for the categorical prediction task, or to zero for the structured prediction task. We then sample all five values in the gap in random order, and repeat the procedure for M = 100 MCMC steps4. For evaluating the log-likelihood of the correct value for the string, we force the last five steps to sample the correct value, and store the probability of the model sampling those values. We also evaluate the probability of reconstructing correctly the individual data points by not forcing the last five time steps to sample the correct value, but by storing the probability of reconstructing the correct value for each data point separately. We run the MCMC chain 100 times and use the log of the mean of the likelihoods of predicting the correct value over these 100 runs. When evaluating the performance of one-directional inference, we use a similar approach to MCMC. However, when evaluating the log-likelihood of the entire gap, we only construct it once in sequential order, and record the probabilities of reconstructing the correct value. When evaluating the probability of reconstructing the correct value for each data point separately, we use the same approach as for MCMC and sample the gap 100 times, recording for each step the probability of sampling the correct value. The result for each data point is the log of the mean of the likelihoods over these 100 runs. On the Wikipedia data, we evaluate the GSN and NADE methods on 50 000 gaps on the test data. On the music data, all models are evaluated on all possible gaps of g = 5 on the test data, excluding gaps that intersect with the first and last 10 time steps of a score. When evaluating the Bayesian MCMC with the unidirectional RNN, we have to significantly limit the size of the data set, as the method is highly computationally complex. We therefore run it on 1 000 gaps on the test data. For NADE, we set the five time steps in the gap to the missing value token. We then reconstruct them one by one to the correct value, and record the probability of the correct reconstruction. We repeat this process for all possible permutations of the order in which to do the reconstruction, and therefore acquire the exact probability of the correct reconstruction given the model and the data. We also evaluate the individual character reconstruction probabilities by recording the probability of sampling the correct value given all other values in the gap are set to missing. 5.4 Results From Table 1 we can see that the Bayesian MCMC method seems to yield the best results, while GSN or NADE outperform one-way inference. It is worth noting that in the most difficult data sets, 3A minibatch can therefore consist of e.g. 100 musical scores, each of length T = 30. 4M = 100 MCMC steps means that each value in the gap of g = 5 will be resampled M/g = 20 times 6 Table 1: Negative Log Likelihood (NLL) for gaps of five time steps using different models (lower is better). In the experiments, GSN and NADE perform well, although they are outperformed by Bayesian MCMC. Inference strategy Wikipedia Nottingham Piano Muse JSB GSN 4.60 19.1 38.8 37.3 43.8 NADE masked 4.86 19.0 40.4 36.5 44.3 NADE 4.88 18.5 39.4 34.7 44.6 Bayesian MCMC 4.37 NA NA NA NA One-way inference 5.79 19.2 38.9 37.6 43.9 One-gram 23.3 145 138 147 118 Position in gap 1 1.5 2 2.5 3 3.5 4 4.5 5 Data point NLL 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 GSN NADE Bayesian MCMC One-way inference Position in gap 1 1.5 2 2.5 3 3.5 4 4.5 5 Data point NLL 7.5 8 8.5 9 9.5 10 GSN NADE One-way inference Figure 2: Average NLL per data point using different methods with the Wikipedia data set (left) and the Piano data set (right) for different positions in a gap of 5 consecutive missing values. The middle data point is the most difficult to estimate for the most methods, while the one-way inference cannot take future context into account making prediction of later positions difficult. For the leftmost position in the gap, the one-way inference performs the best since it does not require any approximations such as MCMC. piano and JSB, oneway inference performs very well. Qualitative examples of the reconstructions obtained with the GSN and NADE on the Wikipedia data are shown in Table 3 (supplementary material). In order to get an indication of how the number of MCMC steps in the GSN approach affects performance, we plotted the difference in NLL of GSN and NADE of the test set as a function of the number of MCMC steps in Figure 3 (supplementary material). The figure indicates that the music data sets mix fairly well, as the performance of GSN quickly saturates. However, for the Wikipedia data, the performance could probably be even further improved by letting the MCMC chain run for more than M = 100 steps. In Figure 2 we have evaluated the NLL for the individual characters in the gaps of length five. As expected, all methods except for one-way inference are better at predicting characters close to both edges of the gap. As a sanity check, we make sure our models have been successfully trained by evaluating the mean test log-likelihood of the BRNNs for gap sizes of one. In Table 2 (supplementary material) we can see that the BRNNs expectedly outperform previously published results with unidirectional RNNs, which indicates that the models have been trained successfully. 6 Conclusion and Discussion Although recurrent neural networks have been used as generative models for time series data, it has not been trivial how to use them for inference in cases such as missing gaps in the sequential data. 7 In this paper, we proposed to use bidirectional RNNs as generative models for time series, with two probabilistic interpretations called GSN and NADE. Both provide efficient inference in both positive and negative directions in time, and both can be used in tasks where Bayesian inference of a unidirectional RNN is computationally infeasible. The model we trained for NADE differed from the basic BRNN in several ways: Firstly, we artificially marked gaps of 5 consecutive points as missing, which should help in specializing the model for such reconstruction tasks. It would be interesting to study the effect of the missingness pattern used in training, on the learned representations and predictions. Secondly, in addition to using all outputs as the training signal, we tested using only the reconstructions of those missing values as the training signal. This reduces the effective amount of training that the model went through. Thirdly, the model had one more input (the missingness indicator) that makes the learning task more difficult. We can see from Table 2 that the model we trained for NADE where we only used the reconstructions as the training signal has a worse performance than the BRNN for reconstructing single values. This indicates that these differences in training have a significant impact on the quality of the final trained probabilistic model. We used the same number of parameters when training an RNN and a BRNN. The RNN can concentrate all the learning effort on forward prediction, and re-use the learned dependencies in backward inference by the computationally heavy Bayesian inference. It remains an open question which approach would work best given an optimal size of the hidden layers. As future work, other model structures could be explored in this context, for instance the Long ShortTerm Memory [16]. Specifically to our NADE approach, it might make sense to replace the regular additive connection from the missingness indicator input to the hidden activations in Eq. (4,5), by a multiplicative connection that somehow gates the dynamics mappings Wf h and Wb h. Another direction to extend is to use a deep architecture with more hidden layers. The midi music data is an example of a structured prediction task: Components of the output vector depend strongly on each other. However, our model assumes independent Bernoulli distributions for them. One way to take those dependencies into account is to use stochastic hidden units hf t and hb t, which has been shown to improve performance on structured prediction tasks [22]. Bayer and Osendorfer [4] explored that approach, and reconstructed missing values in the middle of motion capture data. In their reconstruction method, the hidden stochastic variables are selected based on an auxiliary inference model, after which the missing values are reconstructed conditioned on the hidden stochastic variable values. Both steps are done with maximum a posteriori point selection instead of sampling. Further quantitative evaluation of the method would be an interesting point of comparison. The proposed methods could be easily extended to continuous-valued data. As an example application, time-series reconstructions with a recurrent model has been shown to be effective in speech recognition especially under impulsive noise [23]. Acknowledgements We thank KyungHyun Cho and Yoshua Bengio for useful discussions. The software for the simulations for this paper was based on Theano [3, 7]. Nokia has supported Mathias Berglund and the Academy of Finland has supported Tapani Raiko. References [1] Bahdanau, D., Cho, K., and Bengio, Y. (2015). Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations (ICLR 2015). [2] Baldi, P., Brunak, S., Frasconi, P., Soda, G., and Pollastri, G. (1999). Exploiting the past and the future in protein secondary structure prediction. Bioinformatics, 15(11), 937–946. [3] Bastien, F., Lamblin, P., Pascanu, R., Bergstra, J., Goodfellow, I. J., Bergeron, A., Bouchard, N., and Bengio, Y. (2012). Theano: new features and speed improvements. Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop. [4] Bayer, J. and Osendorfer, C. (2014). Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610. 8 [5] Bengio, Y., Simard, P., and Frasconi, P. (1994). Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2), 157–166. [6] Bengio, Y., Yao, L., Alain, G., and Vincent, P. (2013). Generalized denoising auto-encoders as generative models. In Advances in Neural Information Processing Systems, pages 899–907. [7] Bergstra, J., Breuleux, O., Bastien, F., Lamblin, P., Pascanu, R., Desjardins, G., Turian, J., Warde-Farley, D., and Bengio, Y. (2010). Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy 2010). Oral Presentation. [8] Boulanger-Lewandowski, N., Bengio, Y., and Vincent, P. (2012). Modeling temporal dependencies in high-dimensional sequences: Application to polyphonic music generation and transcription. In Proceedings of the 29th International Conference on Machine Learning (ICML 2012), pages 1159–1166. [9] Brakel, P., Stroobandt, D., and Schrauwen, B. (2013). Training energy-based models for time-series imputation. The Journal of Machine Learning Research, 14(1), 2771–2797. [10] Glorot, X. and Bengio, Y. (2010). Understanding the difficulty of training deep feedforward neural networks. In International conference on artificial intelligence and statistics, pages 249–256. [11] Goodfellow, I., Mirza, M., Courville, A., and Bengio, Y. (2013). Multi-prediction deep boltzmann machines. In Advances in Neural Information Processing Systems, pages 548–556. [12] Graves, A., Liwicki, M., Fern´andez, S., Bertolami, R., Bunke, H., and Schmidhuber, J. (2009). A novel connectionist system for unconstrained handwriting recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(5), 855–868. [13] Graves, A., Mohamed, A.-r., and Hinton, G. (2013). Speech recognition with deep recurrent neural networks. arXiv preprint arXiv:1303.5778. [14] Haykin, S. (2009). Neural networks and learning machines, volume 3. Pearson Education. [15] Hermans, M. and Schrauwen, B. (2013). Training and analysing deep recurrent neural networks. In C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 190–198. Curran Associates, Inc. [16] Hochreiter, S. and Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 1735– 1780. [17] Koutn´ık, J., Greff, K., Gomez, F., and Schmidhuber, J. (2014). A clockwork RNN. In Proceedings of the 31 st International Conference on Machine Learning. [18] Maas, A. L., Hannun, A. Y., Jurafsky, D., and Ng, A. Y. (2014). First-pass large vocabulary continuous speech recognition using bi-directional recurrent dnns. arXiv preprint arXiv:1408.2873. [19] Mikolov, T., Joulin, A., Chopra, S., Mathieu, M., and Ranzato, M. (2014). Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753. [20] Pascanu, R., Mikolov, T., and Bengio, Y. (2013). On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on Machine Learning (ICML 2013), pages 1310–1318. [21] Raiko, T. and Valpola, H. (2001). Missing values in nonlinear factor analysis. In Proc. of the 8th Int. Conf. on Neural Information Processing (ICONIP01),(Shanghai), pages 822–827. [22] Raiko, T., Berglund, M., Alain, G., and Dinh, L. (2015). Techniques for learning binary stochastic feedforward neural networks. In International Conference on Learning Representations (ICLR 2015), San Diego. [23] Remes, U., Palom¨aki, K., Raiko, T., Honkela, A., and Kurimo, M. (2011). Missing-feature reconstruction with a bounded nonlinear state-space model. IEEE Signal Processing Letters, 18(10), 563–566. [24] Rumelhart, D. E., Hinton, G. E., and Williams, R. J. (1986). Learning representations by back-propagating errors. Nature, 323, 533–536. [25] Schuster, M. and Paliwal, K. K. (1997). Bidirectional recurrent neural networks. IEEE Transactions on Signal Processing, 45(11), 2673–2681. [26] Sutskever, I., Martens, J., and Hinton, G. E. (2011). Generating text with recurrent neural networks. In Proceedings of the 28th International Conference on Machine Learning (ICML 2011), pages 1017–1024. [27] Uria, B., Murray, I., and Larochelle, H. (2014). A deep and tractable density estimator. In Proceedings of The 31st International Conference on Machine Learning, pages 467–475. 9 | 2015 | 305 |
5,820 | Double or Nothing: Multiplicative Incentive Mechanisms for Crowdsourcing Nihar B. Shah University of California, Berkeley nihar@eecs.berkeley.edu Dengyong Zhou Microsoft Research dengyong.zhou@microsoft.com Abstract Crowdsourcing has gained immense popularity in machine learning applications for obtaining large amounts of labeled data. Crowdsourcing is cheap and fast, but suffers from the problem of low-quality data. To address this fundamental challenge in crowdsourcing, we propose a simple payment mechanism to incentivize workers to answer only the questions that they are sure of and skip the rest. We show that surprisingly, under a mild and natural “no-free-lunch” requirement, this mechanism is the one and only incentive-compatible payment mechanism possible. We also show that among all possible incentive-compatible mechanisms (that may or may not satisfy no-free-lunch), our mechanism makes the smallest possible payment to spammers. Interestingly, this unique mechanism takes a “multiplicative” form. The simplicity of the mechanism is an added benefit. In preliminary experiments involving over several hundred workers, we observe a significant reduction in the error rates under our unique mechanism for the same or lower monetary expenditure. 1 Introduction Complex machine learning tools such as deep learning are gaining increasing popularity and are being applied to a wide variety of problems. These tools, however, require large amounts of labeled data [HDY+12, RYZ+10, DDS+09, CBW+10]. These large labeling tasks are being performed by coordinating crowds of semi-skilled workers through the Internet. This is known as crowdsourcing. Crowdsourcing as a means of collecting labeled training data has now become indispensable to the engineering of intelligent systems. Most workers in crowdsourcing are not experts. As a consequence, labels obtained from crowdsourcing typically have a significant amount of error [KKKMF11, VdVE11, WLC+10]. Recent efforts have focused on developing statistical techniques to post-process the noisy labels in order to improve its quality (e.g., [RYZ+10, ZLP+15, KOS11, IPSW14]). However, when the inputs to these algorithms are erroneous, it is difficult to guarantee that the processed labels will be reliable enough for subsequent use by machine learning or other applications. In order to avoid “garbage in, garbage out”, we take a complementary approach to this problem: cleaning the data at the time of collection. We consider crowdsourcing settings where the workers are paid for their services, such as in the popular crowdsourcing platforms of Amazon Mechanical Turk and others. These commercial platforms have gained substantial popularity due to their support for a diverse range of tasks for machine learning labeling, varying from image annotation and text recognition to speech captioning and machine translation. We consider problems that are objective in nature, that is, have a definite answer. Figure 1a depicts an example of such a question where the worker is shown a set of images, and for each image, the worker is required to identify if the image depicts the Golden Gate Bridge. 1 Is this the Golden Gate Bridge? Yes! No Is this the Golden Gate Bridge? Yes! No! I’m not sure (a)! (b)! Figure 1: Different interfaces in a crowdsourcing setup: (a) the conventional interface, and (b) with an option to skip. Our approach builds on the simple insight that in typical crowdsourcing setups, workers are simply paid in proportion to the amount of tasks they complete. As a result, workers attempt to answer questions that they are not sure of, thereby increasing the error rate of the labels. For the questions that a worker is not sure of, her answers could be very unreliable [WLC+10, KKKMF11, VdVE11, JSV14]. To ensure acquisition of only high-quality labels, we wish to encourage the worker to skip the questions about which she is unsure, for instance, by providing an explicit “I’m not sure” option for every question (see Figure 1b). Our goal is to develop payment mechanisms to encourage the worker to select this option when she is unsure. We will term any payment mechanism that incentivizes the worker to do so as “incentive compatible”. In addition to incentive compatibility, preventing spammers is another desirable requirement from incentive mechanisms in crowdsourcing. Spammers are workers who answer randomly without regard to the question being asked, in the hope of earning some free money, and are known to exist in large numbers on crowdsourcing platforms [WLC+10, Boh11, KKKMF11, VdVE11]. It is thus of interest to deter spammers by paying them as low as possible. An intuitive objective, to this end, is to ensure a zero expenditure on spammers who answer randomly. In this paper, however, we impose a strictly and significantly weaker condition, and then show that there is one and only one incentive-compatible mechanism that can satisfy this weak condition. Our requirement, referred to as the “no-free-lunch” axiom, says that if all the questions attempted by the worker are answered incorrectly, then the payment must be zero. We propose a payment mechanism for the aforementioned setting (“incentive compatibility” plus “no-free-lunch”), and show that surprisingly, this is the only possible mechanism. We also show that additionally, our mechanism makes the smallest possible payment to spammers among all possible incentive compatible mechanisms that may or may not satisfy the no-free-lunch axiom. Our payment mechanism takes a multiplicative form: the evaluation of the worker’s response to each question is a certain score, and the final payment is a product of these scores. This mechanism has additional appealing features in that it is simple to compute, and is also simple to explain to the workers. Our mechanism is applicable to any type of objective questions, including multiple choice annotation questions, transcription tasks, etc. In order to test whether our mechanism is practical, and to assess the quality of the final labels obtained, we conducted experiments on the Amazon Mechanical Turk crowdsourcing platform. In our preliminary experiments that involved over several hundred workers, we found that the quality of data improved by two-fold under our unique mechanism, with the total monetary expenditure being the same or lower as compared to the conventional baseline. 2 Problem Setting In the crowdsourcing setting that we consider, one or more workers perform a task, where a task consists of multiple questions. The questions are objective, by which we mean, each question has precisely one correct answer. Examples of objective questions include multiple-choice classification questions such as Figure 1, questions on transcribing text from audio or images, etc. For any possible answer to any question, we define the worker’s confidence about an answer as the probability, according to her belief, of this answer being correct. In other words, one can assume that the worker has (in her mind) a probability distribution over all possible answers to a question, and the confidence for an answer is the probability of that answer being correct. As a shorthand, we also define the confidence about a question as the confidence for the answer that the worker is most 2 confident about for that question. We assume that the worker’s confidences for different questions are independent. Our goal is that for every question, the worker should be incentivized to: 1. skip if the confidence is below a certain pre-defined threshold, otherwise: 2. select the answer that she thinks is most confident about. More formally, let T 2 (0, 1) be a predefined value. The goal is to design payment mechanisms that incentivize the worker to skip the questions for which her confidence is lower than T, and attempt those for which her confidence is higher than T. 1 Moreover, for the questions that she attempts to answer, she must be incentivized to select the answer that she believes is most likely to be correct. The threshold T may be chosen based on various factors of the problem at hand, for example, on the downstream machine learning algorithms using the crowdsourced data, or the knowledge of the statistics of worker abilities, etc. In this paper we assume that the threshold T is given to us. Let N denote the total number of questions in the task. Among these, we assume the existence of some “gold standard” questions, that is, a set of questions whose answers are known to the requester. Let G (1 G N) denote the number of gold standard questions. The G gold standard questions are assumed to be distributed uniformly at random in the pool of N questions (of course, the worker does not know which G of the N questions form the gold standard). The payment to a worker for a task is computed after receiving her responses to all the questions in the task. The payment is based on the worker’s performance on the gold standard questions. Since the payment is based on known answers, the payments to different workers do not depend on each other, thereby allowing us to consider the presence of only one worker without any loss in generality. We will employ the following standard notation. For any positive integer K, the set {1, . . . , K} is denoted by [K]. The indicator function is denoted by 1, i.e., 1{z} = 1 if z is true, and 0 otherwise. The notation R+ denotes the set of all non-negative real numbers. Let x1, . . . , xG 2 {−1, 0, +1} denote the evaluations of the answers that the worker gives to the G gold standard questions. Here, “0” denotes that the worker skipped the question, “−1” denotes that the worker attempted to answer the question and that answer was incorrect, and “+1” denotes that the worker attempted to answer the question and that answer was correct. Let f : {−1, 0, +1}G ! R+ denote the payment function, namely, a function that determines the payment to the worker based on these evaluations x1, . . . , xG. Note that the crowdsourcing platforms of today mandate the payments to be non-negative. We will let µ (> 0) denote the budget, i.e., the maximum amount that can be paid to any individual worker for this task: max x1,...,xG f(x1, . . . , xG) = µ. The amount µ is thus the amount of compensation paid to a perfect agent for her work. We will assume this budget condition of µ throughout the rest of the paper. We assume that the worker attempts to maximize her overall expected payment. In what follows, the expression ‘the worker’s expected payment’ will refer to the expected payment from the worker’s point of view, and the expectation will be taken with respect to the worker’s confidences about her answers and the uniformly random choice of the G gold standard questions among the N questions in the task. For any question i 2 [N], let yi = 1 if the worker attempts question i, and set yi = 0 otherwise. Further, for every question i 2 [N] such that yi 6= 0, let pi be the confidence of the worker for the answer she has selected for question i, and for every question i 2 [N] such that yi = 0, let pi 2 (0, 1) be any arbitrary value. Let E = (✏1, . . . , ✏G) 2 {−1, 1}G. Then from the worker’s perspective, the expected payment for the selected answers and confidence-levels is 1 !N G " X (j1,...,jG) ✓{1,...,N} X E2{−1,1}G f(✏1yj1, . . . , ✏GyjG) G Y i=1 (pji) 1+✏i 2 (1 −pji) 1−✏i 2 ! . In the expression above, the outermost summation corresponds to the expectation with respect to the randomness arising from the unknown choice of the gold standard questions. The inner summation corresponds to the expectation with respect to the worker’s beliefs about the correctness of her responses. 1In the event that the confidence about a question is exactly equal to T, the worker may be equally incentivized to answer or skip. 3 We will call any payment function f as an incentive-compatible mechanism if the expected payment of the worker under this payment function is strictly maximized when the worker responds in the manner desired.2 3 Main results: Incentive-compatible mechanism and guarantees In this section, we present the main results of the paper, namely, the design of incentive-compatible mechanisms with practically useful properties. To this end, we impose the following natural requirement on the payment function f that is motivated by the practical considerations of budget constraints and discouraging spammers and miscreants [Boh11, KKKMF11, VdVE11, WLC+10]. We term this requirement as the “no-free-lunch axiom”: Axiom 1 (No-free-lunch axiom). If all the answers attempted by the worker in the gold standard are wrong, then the payment is zero. More formally, for every set of evaluations (x1, . . . , xG) that satisfy 0 < PG i=1 1{xi 6= 0} = PG i=1 1{xi = −1}, we require the payment to satisfy f(x1, . . . , xG) = 0. Observe that no-free-lunch is an extremely mild requirement. In fact, it is significantly weaker than imposing a zero payment on workers who answer randomly. For instance, if the questions are of binary-choice format, then randomly choosing among the two options for each question would result in 50% of the answers being correct in expectation, while the no-free-lunch axiom is applicable only when none of them turns out to be correct. 3.1 Proposed “Multiplicative” Mechanism We now present our proposed payment mechanism in Algorithm 1. Algorithm 1 “Multiplicative” incentive-compatible mechanism • Inputs: Threshold T, Budget µ, Evaluations (x1, . . . , xG) 2 {−1, 0, +1}G of the worker’s answers to the G gold standard questions • Let C = PG i=1 1{xi = 1} and W = PG i=1 1{xi = −1} • The payment is f(x1, . . . , xG) = µT G−C1{W = 0}. The proposed mechanism has a multiplicative form: each answer in the gold standard is given a score based on whether it was correct (score = 1 T ), incorrect (score = 0) or skipped (score = 1), and the final payment is simply a product of these scores (scaled by µ). The mechanism is easy to describe to workers: For instance, if T = 1 2, G = 3 and µ = 80 cents, then the description reads: “The reward starts at 10 cents. For every correct answer in the 3 gold standard questions, the reward will double. However, if any of these questions are answered incorrectly, then the reward will become zero. So please use the ‘I’m not sure’ option wisely.” Observe how this payment rule is similar to the popular ‘double or nothing’ paradigm [Dou14]. The algorithm makes a zero payment if one or more attempted answers in the gold standard are wrong. Note that this property is significantly stronger than the property of no-free-lunch which we originally required, where we wanted a zero payment only when all attempted answers were wrong. Surprisingly, as we prove shortly, Algorithm 1 is the only incentive-compatible mechanism that satisfies no-free-lunch. The following theorem shows that the proposed payment mechanism indeed incentivizes a worker to skip the questions for which her confidence is below T, while answering those for which her confidence is greater than T. In the latter case, the worker is incentivized to select the answer which she thinks is most likely to be correct. Theorem 1. The payment mechanism of Algorithm 1 is incentive-compatible and satisfies the nofree-lunch condition. 2Such a payment function that is based on gold standard questions is also called a “strictly proper scoring rule” [GR07]. 4 The proof of Theorem 1 is presented in Appendix A. It is easy to see that the mechanism satisfies nofree-lunch. The proof of incentive compatibility is also not hard: We consider any arbitrary worker (with arbitrary belief distributions), and compute the expected payment for that worker for the case when her choices in the task follow the requirements. We then show that any other choice leads to a strictly smaller expected payment. While we started out with a very weak condition of no-free-lunch of making a zero payment when all attempted answers are wrong, the mechanism proposed in Algorithm 1 is significantly more strict and makes a zero payment when any of the attempted answers is wrong. A natural question that arises is: can we design an alternative mechanism satisfying incentive compatibility and nofree-lunch that operates somewhere in between? 3.2 Uniqueness of the Mechanism In the previous section we showed that our proposed multiplicative mechanism is incentive compatible and satisfies the intuitive requirement of no-free-lunch. It turns out, perhaps surprisingly, that this mechanism is unique in this respect. Theorem 2. The payment mechanism of Algorithm 1 is the only incentive-compatible mechanism that satisfies the no-free-lunch condition. Theorem 2 gives a strong result despite imposing very weak requirements. To see this, recall our earlier discussion on deterring spammers, that is, incurring a low expenditure on workers who answer randomly. For instance, when the task comprises binary-choice questions, one may wish to design mechanisms which make a zero payment when the responses to 50% or more of the questions in the gold standard are incorrect. The no-free-lunch axiom is a much weaker requirement, and the only mechanism that can satisfy this requirement is the mechanism of Algorithm 1. The proof of Theorem 2 is available in Appendix B. The proof relies on the following key lemma that establishes a condition that any incentive-compatible mechanism must necessarily satisfy. The lemma applies to any incentive-compatible mechanism and not just to those satisfying no-free-lunch. Lemma. Any incentive-compatible payment mechanism f must satisfy, for every i 2 {1, . . . , G} and every (y1, . . . , yi−1, yi+1, . . . , yG) 2 {−1, 0, 1}G−1, Tf(y1, . . . , yi−1, 1, yi+1, . . . , yG) + (1 −T)f(y1, . . . , yi−1, −1, yi+1, . . . , yG) = f(y1, . . . , yi−1, 0, yi+1, . . . , yG). The proof of this lemma is provided in Appendix C. Given this lemma, the proof of Theorem 2 is then completed via an induction on the number of skipped questions. 3.3 Optimality against Spamming Behavior As discussed earlier, crowdsouring tasks, especially those with multiple choice questions, often encounter spammers who answer randomly without heed to the question being asked. For instance, under a binary-choice setup, a spammer will choose one of the two options uniformly at random for every question. A highly desirable objective in crowdsourcing settings is to deter spammers. To this end, one may wish to impose a condition of zero payment when the responses to 50% or more of the attempted questions in the gold standard are incorrect. A second desirable metric could be to minimize the expenditure on a worker who simply skips all questions. While the aforementioned requirements were deterministic functions of the worker’s responses, one may alternatively wish to impose requirements that depend on the distribution of the worker’s answering process. For instance, a third desirable feature would be to minimize the expected payment to a worker who answers all questions uniformly at random. We now show that interestingly, our unique multiplicative payment mechanism simultaneously satisfies all these requirements. The result is stated assuming a multiplechoice setup, but extends trivially to non-multiple-choice settings. Theorem 3.A (Distributional). Consider any value A 2 {0, . . . , G}. Among all incentivecompatible mechanisms (that may or may not satisfy no-free-lunch), Algorithm 1 strictly minimizes the expenditure on a worker who skips some A of the questions in the the gold standard, and chooses answers to the remaining (G −A) questions uniformly at random. 5 Theorem 3.B (Deterministic). Consider any value B 2 (0, 1]. Among all incentive-compatible mechanisms (that may or may not satisfy no-free-lunch), Algorithm 1 strictly minimizes the expenditure on a worker who gives incorrect answers to a fraction B or more of the questions attempted in the gold standard. The proof of Theorem 3 is presented in Appendix D. We see from this result that the multiplicative payment mechanism of Algorithm 1 thus possesses very useful properties geared to deter spammers, while ensuring that a good worker will be paid a high enough amount. To illustrate this point, let us compare the mechanism of Algorithm 1 with the popular additive class of payment mechanisms. Example 1. Consider the popular class of “additive” mechanisms, where the payments to a worker are added across the gold standard questions. This additive payment mechanism offers a reward of µ G for every correct answer in the gold standard, µT G for every question skipped, and 0 for every incorrect answer. Importantly, the final payment to the worker is the sum of the rewards across the G gold standard questions. One can verify that this additive mechanism is incentive compatible. One can also see that that as guaranteed by our theory, this additive payment mechanism does not satisfy the no-free-lunch axiom. Suppose each question involves choosing from two options. Let us compute the expenditure that these two mechanisms make under a spamming behavior of choosing the answer randomly to each question. Given the 50% likelihood of each question being correct, on can compute that the additive mechanism makes a payment of µ 2 in expectation. On the other hand, our mechanism pays an expected amount of only µ2−G. The payment to spammers thus reduces exponentially with the number of gold standard questions under our mechanism, whereas it does not reduce at all in the additive mechanism. Now, consider a different means of exploiting the mechanism(s) where the worker simply skips all questions. To this end, observe that if a worker skips all the questions then the additive payment mechanism will incur an expenditure of µT. On the other hand, the proposed payment mechanism of Algorithm 1 pays an exponentially smaller amount of µT G (recall that T < 1). 4 Simulations and Experiments In this section, we present synthetic simulations and real-world experiments to evaluate the effects of our setting and our mechanism on the final label quality. 4.1 Synthetic Simulations We employ synthetic simulations to understand the effects of various kinds of labeling errors in crowdsourcing. We consider binary-choice questions in this set of simulations. Whenever a worker answers a question, her confidence for the correct answer is drawn from a distribution P independent of all else. We investigate the effects of the following five choices of the distribution P: • The uniform distribution on the support [0.5, 1]. • A triangular distribution with lower end-point 0.2, upper end-point 1 and a mode of 0.6. • A beta distribution with parameter values ↵= 5 and β = 1. • The hammer-spammer distribution [KOS11], that is, uniform on the discrete set {0.5, 1}. • A truncated Gaussian distribution: a truncation of N(0.75, 0.5) to the interval [0, 1]. When a worker has a confidence p (drawn from the distribution P) and attempts the question, the probability of making an error equals (1 −p). We compare (a) the setting where workers attempt every question, with (b) the setting where workers skip questions for which their confidence is below a certain threshold T. In this set of simulations, we set T = 0.75. In either setting, we aggregate the labels obtained from the workers for each question via a majority vote on the two classes. Ties are broken by choosing one of the two options uniformly at random. 6 Figure 2: Error under different interfaces for synthetic simulations of five distributions of the workers’ error probabilities. Figure 2 depicts the results from these simulations. Each bar represents the fraction of questions that are labeled incorrectly, and is an average across 50,000 trials. (The standard error of the mean is too small to be visible.) We see that the skip-based setting consistently outperforms the conventional setting, and the gains obtained are moderate to high depending on the underlying distribution of the workers’ errors. In particular, the gains are quite striking under the hammer-spammer model: this result is not surprising since the mechanism (ideally) screens the spammers out and leaves only the hammers who answer perfectly. 4.2 Experiments on Amazon Mechanical Turk We conducted preliminary experiments on the Amazon Mechanical Turk commercial crowdsourcing platform (mturk.com) to evaluate our proposed scheme in real-world scenarios. The complete data, including the interface presented to the workers in each of the tasks, the results obtained from the workers, and the ground truth solutions, are available on the website of the first author. Goal. Before delving into details, we first note certain caveats relating to such a study of mechanism design on crowdsourcing platforms. When a worker encounters a mechanism for only a small amount of time (a handful of tasks in typical research experiments) and for a small amount of money (at most a few dollars in typical crowdsourcing tasks), we cannot expect the worker to completely understand the mechanism and act precisely as required. For instance, we wouldn’t expect our experimental results to change significantly even upon moderate modifications in the promised amounts, and furthermore, we do expect the outcomes to be noisy. Incentive compatibility kicks in when the worker encounters a mechanism across a longer term, for example, when a proposed mechanism is adopted as a standard for a platform, or when higher amounts are involved. This is when we would expect workers or others (e.g., bloggers or researchers) to design strategies that can game the mechanism. The theoretical guarantee of incentive compatibility or strict properness then prevents such gaming in the long run. We thus regard these experiments as preliminary. Our intentions towards this experimental exercise were (a) to evaluate the potential of our algorithms to work in practice, and (b) to investigate the effect of the proposed algorithms on the net error in the collected labelled data. Experimental setup. We conducted the five following experiments (“tasks”) on Amazon Mechanical Turk: (a) identifying the golden gate bridge from pictures, (b) identifying the breeds of dogs from pictures, (c) identifying heads of countries, (d) identifying continents to which flags belong, and (e) identifying the textures in displayed images. Each of these tasks comprised 20 to 126 multi7 Figure 3: Error under different interfaces and mechanisms for five experiments conducted on Mechanical Turk. ple choice questions.3 For each experiment, we compared (i) a baseline setting (Figure 1a) with an additive payment mechanism that pays a fixed amount per correct answer, and (ii) our skip-based setting (Figure 1b) with the multiplicative mechanism of Algorithm 1. For each experiment, and for each of the two settings, we had 35 workers independently perform the task. Upon completion of the tasks on Amazon Mechanical Turk, we aggregated the data in the following manner. For each mechanism in each experiment, we subsampled 3, 5, 7, 9 and 11 workers, and took a majority vote of their responses. We averaged the accuracy across all questions and across 1, 000 iterations of this subsample-and-aggregate procedure. Results. Figure 3 reports the error in the aggregate data in the five experiments. We see that in most cases, our skip-based setting results in a higher quality data, and in many of the instances, the reduction is two-fold or higher. All in all, in the experiments, we observed a substantial reduction in the amount of error in the labelled data while expending the same or lower amounts and receiving no negative comments from the workers. These observations suggest that our proposed skip-based setting coupled with our multiplicative payment mechanisms have potential to work in practice; the underlying fundamental theory ensures that the system cannot be gamed in the long run. 5 Discussion and Conclusions In an extended version of this paper [SZ14], we generalize the “skip-based” setting considered here to one where we also elicit the workers’ confidence about their answers. Moreover, in a companion paper [SZP15], we construct mechanisms to elicit the support of worker’s beliefs. Our mechanism offers some additional benefits. The pattern of skips of the workers provide a reasonable estimate of the difficulty of each question. In practice, the questions that are estimated to be more difficult may now be delegated to an expert or to additional non-expert workers. Secondly, the theoretical guarantees of our mechanism may allow for better post-processing of the data, incorporating the confidence information and improving the overall accuracy. Developing statistical aggregation algorithms or augmenting existing ones (e.g., [RYZ+10, KOS11, LPI12, ZLP+15]) for this purpose is a useful direction of research. Thirdly, the simplicity of our mechanisms may facilitate an easier adoption among the workers. In conclusion, given the uniqueness and optimality in theory, simplicity, and good performance observed in practice, we envisage our multiplicative payment mechanisms to be of interest to practitioners as well as researchers who employ crowdsourcing. 3See the extended version of this paper [SZ14] for additional experiments involving free-form responses, such as text transcription. 8 References [Boh11] John Bohannon. Social science for pennies. Science, 334(6054):307–307, 2011. [CBW+10] Andrew Carlson, Justin Betteridge, Richard C Wang, Estevam R Hruschka Jr, and Tom M Mitchell. Coupled semi-supervised learning for information extraction. In ACM WSDM, pages 101–110, 2010. [DDS+09] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, 2009. [Dou14] Double or Nothing. http://wikipedia.org/wiki/Double_or_nothing, 2014. Last accessed: July 31, 2014. [GR07] Tilmann Gneiting and Adrian E Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007. [HDY+12] Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. [IPSW14] Panagiotis G Ipeirotis, Foster Provost, Victor S Sheng, and Jing Wang. Repeated labeling using multiple noisy labelers. Data Mining and Knowledge Discovery, 28(2):402–441, 2014. [JSV14] Srikanth Jagabathula, Lakshminarayanan Subramanian, and Ashwin Venkataraman. Reputation-based worker filtering in crowdsourcing. In Advances in Neural Information Processing Systems 27, pages 2492–2500, 2014. [KKKMF11] Gabriella Kazai, Jaap Kamps, Marijn Koolen, and Natasa Milic-Frayling. Crowdsourcing for book search evaluation: impact of HIT design on comparative system ranking. In ACM SIGIR, pages 205–214, 2011. [KOS11] David R Karger, Sewoong Oh, and Devavrat Shah. Iterative learning for reliable crowdsourcing systems. In Advances in neural information processing systems, pages 1953–1961, 2011. [LPI12] Qiang Liu, Jian Peng, and Alexander T Ihler. Variational inference for crowdsourcing. In NIPS, pages 701–709, 2012. [RYZ+10] Vikas C Raykar, Shipeng Yu, Linda H Zhao, Gerardo Hermosillo Valadez, Charles Florin, Luca Bogoni, and Linda Moy. Learning from crowds. The Journal of Machine Learning Research, 11:1297–1322, 2010. [SZ14] Nihar B Shah and Dengyong Zhou. Double or nothing: Multiplicative incentive mechanisms for crowdsourcing. arXiv:1408.1387, 2014. [SZP15] Nihar B Shah, Dengyong Zhou, and Yuval Peres. Approval voting and incentives in crowdsourcing. In International Conference on Machine Learning (ICML), 2015. [VdVE11] Jeroen Vuurens, Arjen P de Vries, and Carsten Eickhoff. How much spam can you take? An analysis of crowdsourcing results to increase accuracy. In ACM SIGIR Workshop on Crowdsourcing for Information Retrieval, pages 21–26, 2011. [WLC+10] Paul Wais, Shivaram Lingamneni, Duncan Cook, Jason Fennell, Benjamin Goldenberg, Daniel Lubarov, David Marin, and Hari Simons. Towards building a highquality workforce with Mechanical Turk. NIPS workshop on computational social science and the wisdom of crowds, 2010. [ZLP+15] Dengyong Zhou, Qiang Liu, John C Platt, Christopher Meek, and Nihar B Shah. Regularized minimax conditional entropy for crowdsourcing. arXiv preprint arXiv:1503.07240, 2015. 9 | 2015 | 306 |
5,821 | Asynchronous stochastic convex optimization: the noise is in the noise and SGD don’t care Sorathan Chaturapruek1 John C. Duchi2 Chris R´e1 Departments of 1Computer Science, 2Electrical Engineering, and 2Statistics Stanford University Stanford, CA 94305 {sorathan,jduchi,chrismre}@stanford.edu Abstract We show that asymptotically, completely asynchronous stochastic gradient procedures achieve optimal (even to constant factors) convergence rates for the solution of convex optimization problems under nearly the same conditions required for asymptotic optimality of standard stochastic gradient procedures. Roughly, the noise inherent to the stochastic approximation scheme dominates any noise from asynchrony. We also give empirical evidence demonstrating the strong performance of asynchronous, parallel stochastic optimization schemes, demonstrating that the robustness inherent to stochastic approximation problems allows substantially faster parallel and asynchronous solution methods. In short, we show that for many stochastic approximation problems, as Freddie Mercury sings in Queen’s Bohemian Rhapsody, “Nothing really matters.” 1 Introduction We study a natural asynchronous stochastic gradient method for the solution of minimization problems of the form minimize f(x) := EP [F(x; W)] = Z Ω F(x; ω)dP(ω), (1) where x 7→F(x; ω) is convex for each ω ∈Ω, P is a probability distribution on Ω, and the vector x ∈Rd. Stochastic gradient techniques for the solution of problem (1) have a long history in optimization, starting from the early work of Robbins and Monro [19] and continuing on through Ermoliev [7], Polyak and Juditsky [16], and Nemirovski et al. [14]. The latter two show how certain long stepsizes and averaging techniques yield more robust and asymptotically optimal optimization schemes, and we show how their results extend to practical parallel and asynchronous settings. We consider an extension of previous stochastic gradient methods to a natural family of asynchronous gradient methods [3], where multiple processors can draw samples from the distribution P and asynchronously perform updates to a centralized (shared) decision vector x. Our iterative scheme is based on the HOGWILD! algorithm of Niu et al. [15], which is designed to asynchronously solve certain stochastic optimization problems in multi-core environments, though our analysis and iterations are different. In particular, we study the following procedure, where each processor runs asynchronously and independently of the others, though they maintain a shared integer iteration counter k; each processor P asynchronously performs the following: (i) Processor P reads current problem data x (ii) Processor P draws a random sample W ∼P, computes g = ∇F(x; W), and increments the centralized counter k (iii) Processor P updates x ←x −αkg sequentially for each coordinate j = 1, 2, . . . , d by incrementing [x]j ←[x]j −αk[g]j, where the scalars αk are a non-increasing stepsize sequence. 1 Our main results show that because of the noise inherent to the sampling process for W, the errors introduced by asynchrony in iterations (i)–(iii) are asymptotically negligible: they do not matter. Even more, we can efficiently construct an x from the asynchronous process possessing optimal convergence rate and asymptotic variance. This has consequences for solving stochastic optimization problems on multi-core and multi-processor systems; we can leverage parallel computing without performing any synchronization, so that given a machine with m processors, we can read data and perform updates m times as quickly as with a single processor, and the error from reading stale information on x becomes asymptotically negligible. In Section 2, we state our main convergence theorems about the asynchronous iteration (i)–(iii) for solving problem (1). Our main result, Theorem 1, gives explicit conditions under which our results hold, and we give applications to specific stochastic optimization problems as well as a general result for asynchronous solution of operator equations. Roughly, all we require for our (optimal) convergence results is that the Hessian of f be positive definite near x⋆= argminx f(x) and that the gradients ∇f(x) be smooth. Several researchers have provided and analyzed asynchronous algorithms for optimization. Bertsekas and Tsitsiklis [3] provide a comprehensive study both of models of asynchronous computation and analyses of asynchronous numerical algorithms. More recent work has studied asynchronous gradient procedures, though it often imposes strong conditions on gradient sparsity, conditioning of the Hessian of f, or allowable types of asynchrony; as we show, none are essential. Niu et al. [15] propose HOGWILD! and show that under sparsity and smoothness assumptions (essentially, that the gradients ∇F(x; W) have a vanishing fraction of non-zero entries, that f is strongly convex, and ∇F(x; ω) is Lipschitz for all ω), convergence guarantees similar to the synchronous case are possible; Agarwal and Duchi [1] showed under restrictive ordering assumptions that some delayed gradient calculations have negligible asymptotic effect; and Duchi et al. [4] extended Niu et al.’s results to a dual averaging algorithm that works for non-smooth, non strongly-convex problems, so long as certain gradient sparsity assumptions hold. Researchers have also investigated parallel coordinate descent solvers; Richt´arik and Tak´aˇc [18] and Liu et al. [13] show how certain “nearseparability” properties of an objective function f govern convergence rate of parallel coordinate descent methods, the latter focusing on asynchronous schemes. As we show, large-scale stochastic optimization renders many of these problem assumptions unnecessary. In addition to theoretical results, in Section 3 we give empirical results on the power of parallelism and asynchrony in the implementation of stochastic approximation procedures. Our experiments demonstrate two results: first, even in non-asymptotic finite-sample settings, asynchrony introduces little degradation in solution quality, regardless of data sparsity (a common assumption in previous analyses); that is, asynchronously-constructed estimates are statistically efficient. Second, we show that there is some subtlety in implementation of these procedures in real hardware; while increases in parallelism lead to concomitant linear improvements in the speed with which we compute solutions to problem (1), in some cases we require strategies to reduce hardware resource competition between processors to achieve the full benefits of asynchrony. Notation A sequence of random variables or vectors Xn converges in distribution to Z, denoted Xn d→Z, if E[f(Xn)] →E[f(Z)] for all bounded continuous functions f. We let Xn p→Z denote convergence in probability, meaning that limn P(∥Xn −Z∥> ǫ) = 0 for any ǫ > 0. The notation N(µ, Σ) denotes the multivariate Gaussian with mean µ and covariance Σ. 2 Main results Our main results repose on a few standard assumptions often used for the analysis of stochastic optimization procedures, which we now detail, along with a few necessary definitions. We let k denote the iteration counter used throughout the asynchronous gradient procedure. Given that we compute g = ∇F(x; W) with counter value k in the iterations (i)–(iii), we let xk denote the (possibly inconsistent) particular x used to compute g, and likewise say that g = gk, noting that the update to x is then performed using αk. In addition, throughout paper, we assume there is some finite bound M < ∞such that no processor reads information more than M steps out of date. 2.1 Asynchronous convex optimization We now present our main theoretical results for solving the stochastic convex problem (1), giving the necessary assumptions on f and F(·; W) for our results. Our first assumption roughly states that f has quadratic expansion near the (unique) optimal point x⋆and is smooth. 2 Assumption A. The function f has unique minimizer x⋆and is twice continuously differentiable in the neighborhood of x⋆with positive definite Hessian H = ∇2f(x⋆) ≻0 and there is a covariance matrix Σ ≻0 such that E[∇F(x⋆; W)∇F(x⋆; W)⊤] = Σ. Additionally, there exists a constant C < ∞such that the gradients ∇F(x; W) satisfy E[∥∇F(x; W) −∇F(x⋆; W)∥2] ≤C ∥x −x⋆∥2 for all x ∈Rd. (2) Lastly, f has L-Lipschitz continuous gradient: ∥∇f(x) −∇f(y)∥≤L ∥x −y∥for all x, y ∈Rd. Assumption A guarantees the uniqueness of the vector x⋆minimizing f(x) over Rd and ensures that f is well-behaved enough for our asynchronous iteration procedure to introduce negligible noise over a non-asynchronous procedure. In addition to Assumption A, we make one of two additional assumptions. In the first case, we assume that f is strongly convex: Assumption B. The function f is λ-strongly convex over all of Rd for some λ > 0, that is, f(y) ≥f(x) + ⟨∇f(x), y −x⟩+ λ 2 ∥x −y∥2 for x, y ∈Rd. (3) Our alternate assumption is a Lipschitz assumption on f itself, made by virtue of a second moment bound on ∇F(x; W). Assumption B’. There exists a constant G < ∞such that for all x ∈Rd, E[∥∇F(x; W)∥2] ≤G2. (4) With our assumptions in place, we state our main theorem. Theorem 1. Let the iterates xk be generated by the asynchronous process (i), (ii), (iii) with stepsize choice αk = αk−β, where β ∈( 1 2, 1) and α > 0. Let Assumption A and either of Assumptions B or B’ hold. Then 1 √n n X k=1 (xk −x⋆) d→N 0, H−1ΣH−1 = N 0, (∇2f(x⋆))−1Σ(∇2f(x⋆))−1 . Before moving to example applications of Theorem 1, we note that its convergence guarantee is generally unimprovable even by numerical constants. Indeed, for classical statistical problems, the covariance H−1ΣH−1 is the inverse Fisher information, and by the Le Cam-H´ajek local minimax theorems [9] and results on Bahadur efficiency [21, Chapter 8], this is the optimal covariance matrix, and the best possible rate is n−1 2 . As for function values, using the delta method [e.g. 10, Theorem 1.8.12], we can show the optimal convergence rate of 1/n on function values. Corollary 1. Let the conditions of Theorem 1 hold. Then n f 1 n Pn k=1 xk −f(x⋆) d→ 1 2 tr H−1Σ · χ2 1, where χ2 1 denotes a chi-squared random variable with 1 degree of freedom, and H = ∇2f(x⋆) and Σ = E[∇F(x⋆; W)∇F(x⋆; W)⊤]. 2.2 Examples We now give two classical statistical optimization problems to illustrate Theorem 1. We verify that the conditions of Assumptions A and B or B’ are not overly restrictive. Linear regression Standard linear regression problems satisfies the conditions of Assumption B. In this case, the data ω = (a, b) ∈Rd × R and the objective F(x; ω) = 1 2(⟨a, x⟩−b)2. If we have moment bounds E[∥a∥4 2] < ∞, E[b2] < ∞and H = E[aa⊤] ≻0, we have ∇2f(x⋆) = H, and the assumptions of Theorem 1 are certainly satisfied. Standard modeling assumptions yield more concrete guarantees. For example, if b = ⟨a, x⋆⟩+ ε where ε is independent mean-zero noise with E[ε2] = σ2, the minimizer of f(x) = E[F(x; W)] is x⋆, we have ⟨a, x⋆⟩−b = −ε, and E[∇F(x⋆; W)∇F(x⋆; W)⊤] = E[(⟨a, x⋆⟩−b)aa⊤(⟨a, x⋆⟩−b)] = E[aa⊤ε2] = σ2E[aa⊤] = σ2H. In particular, the asynchronous iterates satisfy 1 √n n X k=1 (xk −x⋆) d→N(0, σ2H−1) = N 0, σ2E[aa⊤]−1 , which is the (minimax optimal) asymptotic covariance of the ordinary least squares estimate of x⋆. 3 Logistic regression As long as the data has finite second moment, logistic regression problems satisfy all the conditions of Assumption B’ in Theorem 1. We have ω = (a, b) ∈Rd × {−1, 1} and instantaneous objective F(x; ω) = log(1 + exp(−b ⟨a, x⟩)). For fixed ω, this function is Lipschitz continuous and has gradient and Hessian ∇F(x; ω) = − 1 1 + exp(b ⟨a, x⟩)ba and ∇2F(x; ω) = eb⟨a,x⟩ (1 + eb⟨a,x⟩)2 aa⊤, where ∇F(x; ω) is Lipschitz continuous as ∥∇2F(x; (a, b))∥≤1 4 ∥a∥2 2. So long as E[∥a∥2 2] < ∞ and E[∇2F(x⋆; W)] ≻0 (i.e. E[aa⊤] is positive definite), Theorem 1 applies to logistic regression. 2.3 Extension to nonlinear problems We prove Theorem 1 by way of a more general result on finding the zeros of a residual operator R : Rd →Rd, where we only observe noisy views of R(x), and there is unique x⋆such that R(x⋆) = 0. Such situations arise, for example, in the solution of stochastic monotone operator problems (cf. Juditsky, Nemirovski, and Tauvel [8]). In this more general setting, we consider the following asynchronous iterative process, which extends that for the convex case outlined previously. Each processor P performs the following asynchronously and independently: (i) Processor P reads current problem data x (ii) Processor P receives vector g = R(x) + ξ, where ξ is a random (conditionally) mean-zero noise vector, and increments a centralized counter k (iii) Processor P updates x ←x −αkg sequentially for each coordinate j = 1, 2, . . . , d by incrementing [x]j = [x]j −αk[g]j. As in the convex case, we associate vectors xk and gk with the update performed using αk, and we let ξk denote the noise vector used to construct gk. These iterates and assignment of indices imply that xk has the form xk = − k−1 X i=1 αiEkigi, (5) where Eki ∈{0, 1}d×d is a diagonal matrix whose jth diagonal entry captures that coordinate j of the ith gradient has been incorporated into iterate xk. We define the an increasing sequence of σ-fields Fk by Fk = σ ξ1, . . . , ξk, Eij : i ≤k + 1, j ≤i , (6) that is, the noise variables ξk are adapted to the filtration Fk, and these σ-fields are the smallest containing both the noise and all index updates that have occurred and that will occur to compute xk+1. Thus we have xk+1 ∈Fk, and our mean-zero assumption on the noise ξ is E[ξk | Fk−1] = 0. We base our analysis on Polyak and Juditsky’s study [16] of stochastic approximation procedures, so we enumerate a few more requirements—modeled on theirs—for our results on convergence of the asynchronous iterations for solving the nonlinear equality R(x⋆) = 0. We assume there is a Lyapunov function V satisfying V (x) ≥λ ∥x∥2 for all x ∈Rd, ∥∇V (x) −∇V (y)∥≤L ∥x −y∥ for all x, y, that ∇V (0) = 0, and V (0) = 0. This implies λ ∥x∥2 ≤V (x) ≤V (0) + ⟨∇V (0), x −0⟩+ L 2 ∥x∥2 = L 2 ∥x∥2 (7) and ∥∇V (x)∥2 ≤L2 ∥x∥2 ≤(L2/λ)V (x). We make the following assumptions on the residual R. Assumption C. There exists a matrix H ∈Rd×d with H ≻0, a parameter 0 < γ ≤1, constant C < ∞, and ǫ > 0 such that if x satisfies ∥x −x⋆∥≤ǫ, ∥R(x) −H(x −x⋆)∥≤C ∥x −x⋆∥1+γ . 4 Assumption C essentially requires that R is differentiable at x⋆with derivative matrix H ≻0. We also make a few assumptions on the noise process ξ; specifically, we assume ξ implicitly depends on x ∈Rd (so that we may write ξk = ξ(xk)), and that the following assumption holds. Assumption D. The noise vector ξ(x) decomposes as ξ(x) = ξ(0) + ζ(x), where ξ(0) is a process satisfying E[ξk(0)ξk(0)⊤| Fk−1] p→Σ ≻0 for a matrix Σ ∈Rd×d, supk E[∥ξk(0)∥2 | Fk−1] < ∞ with probability 1, and E[∥ζk(x)∥2 | Fk−1] ≤C ∥x −x⋆∥2 for a constant C < ∞and all x ∈Rd. As in the convex case, we make one of two additional assumptions, which should be compared with Assumptions B and B’. The first is that R gives globally strong information about x⋆. Assumption E (Strongly convex residuals). There exists a constant λ0 > 0 such that for all x ∈Rd, ⟨∇V (x −x⋆), R(x)⟩≥λ0V (x −x⋆). Alternatively, we may make an assumption on the boundedness of R, which we shall see suffices for proving our main results. Assumption E’ (Bounded residuals). There exist λ0 > 0 and ǫ > 0 such that inf 0<∥x−x⋆∥≤ǫ ⟨∇V (x −x⋆), R(x)⟩ V (x −x⋆) ≥λ0 and inf ǫ<∥x−x⋆∥⟨∇V (x −x⋆), R(x)⟩> 0. In addition there exists C < ∞such that, ∥R(x)∥≤C and E[∥ξk∥2 | Fk−1] ≤C2 for all k and x. With these assumptions in place, we obtain the following more general version of Theorem 1; indeed, we show that Theorem 1 is a consequence of this result. Theorem 2. Let V be a function satisfying inequality (7), and let Assumptions C and D hold. Let the stepsizes αk = αk−β, where 1 1+γ < β < 1. Let one of Assumptions E or E’ hold. Then 1 √n n X k=1 (xk −x⋆) d→N 0, H−1ΣH−1 . We may compare this result to Polyak and Juditsky’s Theorem 2 [16], which gives identical asymptotic convergence guarantees but with somewhat weaker conditions on the function V and stepsize sequence αk. Our stronger assumptions, however, allow our result to apply even in fully asynchronous settings. 2.4 Proof sketch We provide rigorous proofs in the long version of this paper [5], providing an amputated sketch here. First, to show that Theorem 1 follows from Theorem 2, we set R(x) = ∇f(x) and V (x) = 1 2 ∥x∥2. We can then show that Assumption A, which guarantees a second-order Taylor expansion, implies Assumption C with γ = 1 and H = ∇2f(x⋆). Moreover, Assumption B (or B’) implies Assumption E (respectively, E’), while to see that Assumption D holds, we set ξ(0) = ∇F(x⋆; W), taking Σ = E[∇F(x⋆; W)∇F(x⋆; W)⊤] and ζ(x) = ∇F(x; W) −∇F(x⋆; W), and applying inequality (2) of Assumption A to satisfy Assumption D with the vector ζ. The proof of Theorem 2 is somewhat more involved. Roughly, we show the asymptotic equivalence of the sequence xk from expression (5) to the easier to analyze sequence exk = −Pk−1 i=1 αigi. Asymptotically, we obtain E[∥xk −exk∥2] = O(α2 k), while the iterates exk—in spite of their incorrect gradient calculations—are close enough to a correct stochastic gradient iterate that they possess optimal asymptotic normality properties. This “close enough” follows by virtue of the squared error bounds for ζ in Assumption D, which guarantee that ξk essentially behaves like an i.i.d. sequence asymptotically (after application of the Robbins-Siegmund martingale convergence theorem [20]), which we then average to obtain a central-limit-theorem. 3 Experimental results We provide empirical results studying the performance of asynchronous stochastic approximation schemes on several simulated and real-world datasets. Our theoretical results suggest that asynchrony should introduce little degradation in solution quality, which we would like to verify; we 5 also investigate the engineering techniques necessary to truly leverage the power of asynchronous stochastic procedures. In our experiments, we focus on linear and logistic regression, the examples given in Section 2.2; that is, we have data (ai, bi) ∈Rd × R (for linear regression) or (ai, bi) ∈Rd × {−1, 1} (for logistic regression), for i = 1, . . . , N, and objectives f(x) = 1 2N N X i=1 (⟨ai, x⟩−bi)2 and f(x) = 1 N N X i=1 log 1 + exp(−bi ⟨ai, x⟩) . (8) We perform each of our experiments using a 48-core Intel Xeon machine with 1 terabyte of RAM, and have put code and binaries to replicate our experiments on CodaLab [6]. The Xeon architecture puts each core onto one of four sockets, where each socket has its own memory. To limit the impact of communication overhead in our experiments, we limit all experiments to at most 12 cores, all on the same socket. Within an experiment—based on the empirical expectations (8)—we iterate in epochs, meaning that our stochastic gradient procedure repeatedly loops through all examples, each exactly once.1 Within an epoch, we use a fixed stepsize α, decreasing the stepsize by a factor of .9 between each epoch (this matches the experimental protocol of Niu et al. [15]). Within each epoch, we choose examples in a randomly permuted order, where the order changes from epoch to epoch (cf. [17]). To address issues of hardware resource contention (see Section 3.2 for more on this), in some cases we use a mini-batching strategy. Abstractly, in the formulation of the basic problem (1), this means that in each calculation of a stochastic gradient g we draw B ≥1 samples W1, . . . , WB i.i.d. according to P, then set g(x) = 1 B B X b=1 ∇F(x; Wb). (9) The mini-batching strategy (9) does not change the (asymptotic) convergence guarantees of asynchronous stochastic gradient descent, as the covariance matrix Σ = E[g(x⋆)g(x⋆)⊤] satisfies Σ = 1 BE[∇F(x⋆; W)∇F(x⋆; W)⊤], while the total iteration count is reduced by the a factor B. Lastly, we measure the performance of optimization schemes via speedup, defined as speedup = average epoch runtime on a single core using HOGWILD! average epoch runtime on m cores . (10) In our experiments, as increasing the number m of cores does not change the gap in optimality f(xk) −f(x⋆) after each epoch, speedup is equivalent to the ratio of the time required to obtain an ǫ-accurate solution using a single processor/core to that required to obtain ǫ-accurate solution using m processors/cores. 3.1 Efficiency and sparsity For our first set of experiments, we study the effect that data sparsity has on the convergence behavior of asynchronous methods—sparsity has been an essential part of the analysis of many asynchronous and parallel optimization schemes [15, 4, 18], while our theoretical results suggest it should be unimportant—using the linear regression objective (8). We generate synthetic linear regression problems with N = 106 examples in d = 103 dimensions via the following procedure. Let ρ ∈(0, 1] be the desired fraction of non-zero gradient entries, and let Πρ be a random projection operator that zeros out all but a fraction ρ of the elements of its argument, meaning that for a ∈Rd, Πρ(a) uniformly at random chooses ρd elements of a, leaves them identical, and zeroes the remaining elements. We generate data for our linear regression drawing a random vector u⋆∼N(0, I), then constructing bi = ⟨ai, u⋆⟩+ εi, i = 1, . . . , N, where εi i.i.d. ∼N(0, 1), ai = Πρ(eai), eai i.i.d. ∼N(0, I), and Πρ(eai) denotes an independent random sparse projection of eai. To measure optimality gap, we directly compute x⋆= (AT A)−1AT b, where A = [a1 a2 · · · aN]⊤∈RN×d. In Figure 1, we plot the results of simulations using densities ρ ∈{.005, .01, .2, 1} and mini-batch size B = 10, showing the gap f(xk) −f(x⋆) as a function of the number of epochs for each of the given sparsity levels. We give results using 1, 2, 4, and 10 processor cores (increasing degrees of asynchrony), and from the plots, we see that regardless of the number of cores, the convergence 1Strictly speaking, this violates the stochastic gradient assumption, but it allows direct comparison with the original HOGWILD! code and implementation [15]. 6 behavior is nearly identical, with very minor degradations in performance for the sparsest data. (We plot the gaps f(xk) −f(x⋆) on a logarithmic axis.) Moreover, as the data becomes denser, the more asynchronous methods—larger number of cores—achieve performance essentially identical to the fully synchronous method in terms of convergence versus number of epochs. In Figure 2, we plot the speedup achieved using different numbers of cores. We also include speedup achieved using multiple cores with explicit synchronization (locking) of the updates, meaning that instead of allowing asynchronous updates, each of the cores globally locks the decision vector when it reads, unlocks and performs mini-batched gradient computations, and locks the vector again when it updates the vector. We can see that the performance curve is much worse than than the withoutlocking performance curve across all densities. That the locking strategy also gains some speedup when the density is higher is likely due to longer computation of the gradients. However, the lockingstrategy performance is still not competitive with that of the without-locking strategy. 0 5 10 15 20 10-4 10-3 10-2 10-1 100 10 cores 8 cores 4 cores 1 core f(xk) −f(x⋆) Epochs 0 5 10 15 20 10-4 10-2 100 10 cores 8 cores 4 cores 1 core Epochs 0 5 10 15 20 10-2 10-1 100 101 10 cores 8 cores 4 cores 1 core Epochs 0 5 10 15 20 10-4 10-2 100 102 10 cores 8 cores 4 cores 1 core Epochs (a) ρ = .005 (b) ρ = .01 (c) ρ = .2 (d) ρ = 1 Figure 1. (Exponential backoff stepsizes) Optimality gaps for synthetic linear regression experiments showing effects of data sparsity and asynchrony on f(xk)−f(x⋆). A fraction ρ of each vector ai ∈Rd is non-zero. 2 4 6 8 10 0 2 4 6 8 10 linear speedup without locking with locking Cores 2 4 6 8 10 0 2 4 6 8 10 linear speedup without locking with locking Cores 2 4 6 8 10 0 2 4 6 8 10 linear speedup without locking with locking Cores 2 4 6 8 10 0 2 4 6 8 10 linear speedup without locking with locking Cores (a) ρ = .005 (b) ρ = .01 (c) ρ = .2 (d) ρ = 1 Figure 2. (Exponential backoff stepsizes) Speedups for synthetic linear regression experiments showing effects of data sparsity on speedup (10). A fraction ρ of each vector ai ∈Rd is non-zero. 3.2 Hardware issues and cache locality We detail a small set of experiments investigating hardware issues that arise even in implementation of asynchronous gradient methods. The Intel x86 architecture (as with essentially every processor architecture) organizes memory in a hierarchy, going from L1 to L3 (level 1 to level 3) caches of increasing sizes. An important aspect of the speed of different optimization schemes is the relative fraction of memory hits, meaning accesses to memory that is cached locally (in order of decreasing speed, L1, L2, or L3 cache). In Table 1, we show the proportion of cache misses at each level of the memory hierarchy for our synthetic regression experiment with fully dense data (ρ = 1) over the execution of 20 epochs, averaged over 10 different experiments. We compare memory contention when the batch size B used to compute the local asynchronous gradients (9) is 1 and 10. We see that the proportion of misses for the fastest two levels—1 and 2—of the cache for B = 1 increase significantly with the number of cores, while increasing the batch size to B = 10 substantially mitigates cache incoherency. In particular, we maintain (near) linear increases in iteration speed with little degradation in solution quality (the gap f(bx) −f(x⋆) output by each of the procedures with and without batching is identical to within 10−3; cf. Figure 1(d)). 7 No batching (B = 1) Number of cores 1 4 8 10 fraction of L1 misses 0.0009 0.0017 0.0025 0.0026 fraction of L2 misses 0.5638 0.6594 0.7551 0.7762 fraction of L3 misses 0.6152 0.4528 0.3068 0.2841 epoch average time (s) 4.2101 1.6577 1.4052 1.3183 speedup 1.00 2.54 3.00 3.19 Batch size B = 10 Number of cores 1 4 8 10 fraction of L1 misses 0.0012 0.0011 0.0011 0.0011 fraction of L2 misses 0.5420 0.5467 0.5537 0.5621 fraction of L3 misses 0.5677 0.5895 0.5714 0.5578 epoch average time (s) 4.4286 1.1868 0.6971 0.6220 speedup 1.00 3.73 6.35 7.12 Table 1. Memory traffic for batched updates (9) versus non-batched updates (B = 1) for a dense linear regression problem in d = 103 dimensions with a sample of size N = 106. Cache misses are substantially higher with B = 1. 3.3 Real datasets We perform experiments using three different real-world datasets: the Reuters RCV1 corpus [11], the Higgs detection dataset [2], and the Forest Cover dataset [12]. Each represents a binary classification problem which we formulate using logistic regression. We briefly detail statistics for each: (1) Reuters RCV1 dataset consists of N ≈7.81 · 105 data vectors (documents) ai ∈{0, 1}d with d ≈5 · 104 dimensions; each vector has sparsity approximately ρ = 3 · 10−3. Our task is to classify each document as being about corporate industrial topics (CCAT) or not. (2) The Higgs detection dataset consists of N = 106 data vectors eai ∈Rd0, with d0 = 28. We quantize each coordinate into 5 bins containing equal fraction of the coordinate values and encode each vector eai as a vector ai ∈{0, 1}5d0 whose non-zero entries correspond to quantiles into which coordinates fall. The task is to detect (simulated) emissions from a linear accelerator. (3) The Forest Cover dataset consists of N ≈5.7 · 105 data vectors ai ∈{−1, 1}d with d = 54, and the task is to predict forest growth types. 0 5 10 15 20 10-3 10-2 10-1 10 cores 8 cores 4 cores 1 core f(xk) −f(x⋆) Epochs 0 5 10 15 20 10-3 10-2 10-1 10 cores 8 cores 4 cores 1 core Epochs 0 5 10 15 20 10-3 10-2 10-1 10 cores 8 cores 4 cores 1 core Epochs Figure 3. (Exponential backoff stepsizes) Optimality gaps f(xk) − f(x⋆) on the (a) RCV1, (b) Higgs, and (c) Forest Cover datasets. (a) RCV1 (ρ = .003) (b) Higgs (ρ = 1) (c) Forest (ρ = 1) 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10 linear speedup without locking Cores 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10 linear speedup without locking Cores 2 4 6 8 10 1 2 3 4 5 6 7 8 9 10 linear speedup without locking Cores Figure 4. (Exponential backoff stepsizes) Logistic regression experiments showing speedup (10) on the (a) RCV1, (b) Higgs, and (c) Forest Cover datasets. (a) RCV1 (ρ = .003) (b) Higgs (ρ = 1) (c) Forest (ρ = 1) In Figure 3, we plot the gap f(xk) −f(x⋆) as a function of epochs, giving standard error intervals over 10 runs for each experiment. There is essentially no degradation in objective value for the different numbers of processors, and in Figure 4, we plot speedup achieved using 1, 4, 8, and 10 cores with batch sizes B = 10. Asynchronous gradient methods achieve speedup of between 6× and 8× on each of the datasets using 10 cores. 8 References [1] A. Agarwal and J. C. Duchi. Distributed delayed stochastic optimization. In Advances in Neural Information Processing Systems 24, 2011. [2] P. Baldi, P. Sadowski, and D. Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature Communications, 5, July 2014. [3] D. P. Bertsekas and J. N. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice-Hall, Inc., 1989. [4] J. C. Duchi, M. I. Jordan, and H. B. McMahan. Estimation, optimization, and parallelism when data is sparse. In Advances in Neural Information Processing Systems 26, 2013. [5] J. C. Duchi, S. Chaturapruek, and C. R´e. Asynchronous stochastic convex optimization. arXiv:1508.00882 [math.OC], 2015. [6] J. C. Duchi, S. Chaturapruek, and C. R´e. Asynchronous stochastic convex optimization, 2015. URL https://www.codalab.org/worksheets/. Code for reproducing experiments. [7] Y. M. Ermoliev. On the stochastic quasi-gradient method and stochastic quasi-Feyer sequences. Kibernetika, 2:72–83, 1969. [8] A. Juditsky, A. Nemirovski, and C. Tauvel. Solving variational inequalities with the stochastic mirror-prox algorithm. Stochastic Systems, 1(1):17–58, 2011. [9] L. Le Cam and G. L. Yang. Asymptotics in Statistics: Some Basic Concepts. Springer, 2000. [10] E. L. Lehmann and G. Casella. Theory of Point Estimation, Second Edition. Springer, 1998. [11] D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [12] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. [13] J. Liu, S. J. Wright, C. R´e, V. Bittorf, and S. Sridhar. An asynchronous parallel stochastic coordinate descent algorithm. In Proceedings of the 31st International Conference on Machine Learning, 2014. [14] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [15] F. Niu, B. Recht, C. Re, and S. Wright. Hogwild: a lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems 24, 2011. [16] B. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. [17] B. Recht and C. R´e. Beneath the valley of the noncommutative arithmetic-geometric mean inequality: conjectures, case-studies, and consequences. In Proceedings of the Twenty Fifth Annual Conference on Computational Learning Theory, 2012. [18] P. Richt´arik and M. Tak´aˇc. Parallel coordinate descent methods for big data optimization. Mathematical Programming, page Online first, 2015. URL http://link.springer.com/article/10.1007/s10107-015-0901-6. [19] H. Robbins and S. Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22:400–407, 1951. [20] H. Robbins and D. Siegmund. A convergence theorem for non-negative almost supermartingales and some applications. In Optimizing Methods in Statistics, pages 233–257. Academic Press, New York, 1971. [21] A. W. van der Vaart. Asymptotic Statistics. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 1998. ISBN 0-521-49603-9. 9 | 2015 | 307 |
5,822 | Bounding errors of Expectation-Propagation Guillaume Dehaene University of Geneva guillaume.dehaene@gmail.com Simon Barthelmé CNRS, Gipsa-lab simon.barthelme@gipsa-lab.fr Abstract Expectation Propagation is a very popular algorithm for variational inference, but comes with few theoretical guarantees. In this article, we prove that the approximation errors made by EP can be bounded. Our bounds have an asymptotic interpretation in the number n of datapoints, which allows us to study EP’s convergence with respect to the true posterior. In particular, we show that EP converges at a rate of O(n−2) for the mean, up to an order of magnitude faster than the traditional Gaussian approximation at the mode. We also give similar asymptotic expansions for moments of order 2 to 4, as well as excess Kullback-Leibler cost (defined as the additional KL cost incurred by using EP rather than the ideal Gaussian approximation). All these expansions highlight the superior convergence properties of EP. Our approach for deriving those results is likely applicable to many similar approximate inference methods. In addition, we introduce bounds on the moments of log-concave distributions that may be of independent interest. Introduction Expectation Propagation (EP, 1) is an efficient approximate inference algorithm that is known to give good approximations, to the point of being almost exact in certain applications [2, 3]. It is surprising that, while the method is empirically very successful, there are few theoretical guarantees on its behavior. Indeed, most work on EP has focused on efficiently implementing the method in various settings. Theoretical work on EP mostly represents new justifications of the method which, while they offer intuitive insight, do not give mathematical proofs that the method behaves as expected. One recent breakthrough is due to Dehaene and Barthelmé [4] who prove that, in the large datalimit, the EP iteration behaves like a Newton search and its approximation is asymptotically exact. However, it remains unclear how good we can expect the approximation to be when we have only finite data. In this article, we offer a characterization of the quality of the EP approximation in terms of the worst-case distance between the true and approximate mean and variance. When approximating a probability distribution p(x) that is, for some reason, close to being Gaussian, a natural approximation to use is the Gaussian with mean equal to the mode (or argmax) of p(x) and with variance the inverse log-Hessian at the mode. We call it the Canonical Gaussian Approximation (CGA), and its use is usually justified by appealing to the Bernstein-von Mises theorem, which shows that, in the limit of a large amount of independent observations, posterior distributions tend towards their CGA. This powerful justification, and the ease with which the CGA is computed (finding the mode can be done using Newton methods) makes it a good reference point for any method like EP which aims to offer a better Gaussian approximation at a higher computational cost. In section 1, we introduce the CGA and the EP approximation. In section 2, we give our theoretical results bounding the quality of EP approximations. 1 1 Background In this section, we present the CGA and give a short introduction to the EP algorithm. In-depth descriptions of EP can be found in Minka [5], Seeger [6], Bishop [7], Raymond et al. [8]. 1.1 The Canonical Gaussian Approximation What we call here the CGA is perhaps the most common approximate inference method in the machine learning cookbook. It is often called the “Laplace approximation”, but this is a misnomer: the Laplace approximation refers to approximating the integral ´ p from the integral of the CGA. The reason the CGA is so often used is its compelling simplicity: given a target distribution p(x) = exp (−φ (x)), we find the mode x⋆and compute the second derivatives of φ at x⋆: x⋆ = argminφ(x) β⋆ = φ′′ (x⋆) to form a Gaussian approximation q(x) = N x|x⋆, 1 β⋆ ≈p(x). The CGA is effectively just a second-order Taylor expansion, and its use is justified by the Bernstein-von Mises theorem [9], which essentially says that the CGA becomes exact in the large-data (large-n) asymptotic limit. Roughly, if pn(x) ∝Qn i=1 p (yi|x) p0 (x), where y1 . . . yn represent independent datapoints, then limn→∞pn (x) = N x|x⋆ n, 1 β⋆ n in total variation. 1.2 CGA vs Gaussian EP Gaussian EP, as its name indicates, provides an alternative way of computing a Gaussian approximation to a target distribution. There is broad overlap between the problems where EP can be applied and the problems where the CGA can be used, with EP coming at a higher cost. Our contribution is to show formally that the higher computational cost for EP may well be worth bearing, as EP approximations can outperform CGAs by an order of magnitude. To be specific, we focus on the moment estimates (mean and covariance) computed by EP and CGA, and derive bounds on their distance to the true mean and variance of the target distribution. Our bounds have an asymptotic interpretation, and under that interpretation we show for example that the mean returned by EP is within an order of O n−2 of the true mean, where n is the number of datapoints. For the CGA, which uses the mode as an estimate of the mean, we exhibit a O n−1 upper bound, and we compute the error term responsible for this O n−1 behavior. This enables us to show that, in the situations in which this error is indeed O n−1 , EP is better than the CGA. 1.3 The EP algorithm We consider the task of approximating a probability distribution over a random-variable X : p(x), which we call the target distribution. X can be high-dimensional, but for simplicity, we focus on the one-dimensional case. One important hypothesis that makes EP feasible is that p(x) factorizes into n simple factor terms: p(x) = Y i fi(x) EP proposes to approximate each fi(x) (usually referred to as sites) by a Gaussian function qi(x) (referred to as the site-approximations). It is convenient to use the parametrization of Gaussians in terms of natural parameters: qi (x|ri, βi) ∝exp rix −βi x2 2 which makes some of the further computations easier to understand. Note that EP could also be used with other exponential approximating families. These Gaussian approximations are computed iteratively. Starting from a current approximation (qt i (x|rt i, βt i)), we select a site for update with index i. We then: 2 • Compute the cavity distribution qt −i(x) ∝Q j̸=1 qt j(x). This is very easy in natural parameters: q−i(x) ∝exp X j̸=i rt j x − X j̸=i βt j x2 2 • Compute the hybrid distribution ht i(x) ∝qt −i(x)fi(x) and its mean and variance • Compute the Gaussian which minimizes the Kullback-Leibler divergence to the hybrid, ie the Gaussian with same mean and variance: P(ht i) = argmin q KL ht i|q • Finally, update the approximation of fi: qt+1 i = P(ht i) qt −i where the division is simply computed as a subtraction between natural parameters We iterate these operations until a fixed point is reached, at which point we return a Gaussian approximation of p(x) ≈Q qi(x). 1.4 The “EP-approximation” In this work, we will characterize the quality of an EP approximation of p(x). We define this to be any fixed point of the iteration presented in section 1.3, which could all be returned by the algorithm. It is known that EP will have at least one fixed-point [1], but it is unknown under which conditions the fixed-point is unique. We conjecture that, when all sites are log-concave (one of our hypotheses to control the behavior of EP), it is in fact unique but we can’t offer a proof yet. If p (x) isn’t logconcave, it is straightforward to construct examples in which EP has multiple fixed-points. These open questions won’t matter for our result because we will show that all fixed-points of EP (should there be more than one) produce a good approximation of p (x). Fixed points of EP have a very interesting characterization. If we note q∗ i the site-approximations at a given fixed-point, h∗ i the corresponding hybrid distributions, and q∗the global approximation of p(x), then the mean and variance of all the hybrids and q∗is the same1. As we will show in section 2.2, this leads to a very tight bound on the possible positions of these fixed-points. 1.5 Notation We will use repeatedly the following notation. p(x) = Q i fi(x) is the target distribution we want to approximate. The sites fi(x) are each approximated by a Gaussian site-approximation qi(x) yielding an approximation to p(x) ≈q(x) = Q i qi(x). The hybrids hi(x) interpolate between q(x) and p(x) by replacing one site approximation qi(x) with the true site fi(x). Our results make heavy use of the log-functions of the sites and the target distribution. We note φi(x) = −log (fi(x)) and φp(x) = −log (p(x)) = P φi(x). We will introduce in section 2 hypotheses on these functions. Parameter βm controls their minimum curvature and parameters Kd control the maximum dth derivative. We will always consider fixed-points of EP, where the mean and variance under all hybrids and q(x) is identical. We will note these common values: µEP and vEP . We will also refer to the third and fourth centered moment of the hybrids, denoted by mi 3, mi 4 and to the fourth moment of q(x) which is simply 3v2 EP . We will show how all these moments are related to the true moments of the target distribution which we will note µ, v for the mean and variance, and mp 3, mp 4 for the third and fourth moment. We also investigate the quality of the CGA: µ ≈x⋆and v ≈ h φ ′′ p(x⋆) i−1 where x⋆is the the mode of p(x). 1For non-Gaussian approximations, the expected values of all sufficient statistics of the exponential family are equal. 3 2 Results In this section, we will give tight bounds on the quality of the EP approximation (ie: of fixed-points of the EP iteration). Our results lean on the properties of log-concave distributions [10]. In section 2.1, we introduce new bounds on the moments of log-concave distributions. The bounds show that those distributions are in a certain sense close to being Gaussian. We then apply these results to study fixed points of EP, where they enable us to compute bounds on the distance between the mean and variance of the true distribution p(x) and of the approximation given by EP, which we do in section 2.2. Our bounds require us to assume that all sites fi(x) are βm-strongly log-concave with slowlychanging log-function. That is, if we note φi(x) = −log (fi(x)): ∀i ∀x φ ′′ i (x) ≥ βm > 0 (1) ∀i ∀d ∈[3, 4, 5, 6] φ(d) i (x) ≤ Kd (2) The target distribution p(x) then inherits those properties from the sites. Noting φp(x) = −log (p(x)) = P i φi(x), then φp is nβm-strongly log-concave and its higher derivatives are bounded: ∀x, φ ′′ p(x) ≥ nβm (3) ∀d ∈[3, 4, 5, 6] φ(d) p (x) ≤ nKd (4) A natural concern here is whether or not our conditions on the sites are of practical interest. Indeed, strongly-log-concave likelihoods are rare. We picked these strong regularity conditions because they make the proofs relatively tractable (although still technical and long). The proof technique carries over to more complicated, but more realistic, cases. One such interesting generalization consists of the case in which p(x) and all hybrids at the fixed-point are log-concave with slowly changing log-functions (with possibly differing constants). In such a case, while the math becomes more unwieldy, similar bounds as ours can be found, greatly extending the scope of our results. The results we present here should thus be understood as a stepping stone and not as the final word on the quality of the EP approximation: we have focused on providing a rigorous but extensible proof. 2.1 Log-concave distributions are strongly constrained Log-concave distributions have many interesting properties. They are of course unimodal, and the family is closed under both marginalization and multiplication. For our purposes however, the most important property is a result due to Brascamp and Lieb [11], which bounds their even moments. We give here an extension in the case of log-concave distributions with slowly changing log-functions (as quantified by eq. (2)). Our results show that these are close to being Gaussian. The Brascamp-Lieb inequality states that, if LC(x) ∝exp (−φ(x)) is βm-strongly log-concave (ie: φ ′′(x) ≥βm), then centered even moments of LC are bounded by the corresponding moments of a Gaussian with variance β−1 m . If we note these moments m2k and µLC = ELC(x) the mean of LC: m2k = ELC (x −µLC)2k m2k ≤ (2k −1)!!β−k m (5) where (2k −1)!! is the double factorial: the product of all odd terms from 1 to 2k −1. 3!! = 3, 5!! = 15, 7!! = 105, etc. This result can be understood as stating that a log-concave distribution must have a small variance, but doesn’t generally need to be close to a Gaussian. With our hypothesis of slowly changing log-functions, we were able to improve on this result. Our improved results include a bound on odd moments, as well as first order expansions of even moments (eqs. (6)-(9)). Our extension to the Brascamp-Lieb inequality is as follows. If φ is slowly changing in the sense that some of its higher derivatives are bounded, as per eq. 2, then we can give a bound on φ ′(µLC) 4 (showing that µLC is close to the mode x⋆of LC, see eqs. (10) to (13)) and m3 (showing that LC is mostly symmetric): φ ′(µLC) ≤ K3 2βm (6) |m3| ≤ 2K3 β3m (7) and we can compute the first order expansions of m2 and m4, and bound the errors in terms of βm and the K’s : m−1 2 −φ ′′(µLC) ≤ K2 3 β2m + K4 2βm (8) φ ′′(µLC)m4 −3m2 ≤ 19 2 K2 3 β4m + 5 2 K4 β3m (9) With eq. (8) and (9), we see that m2 ≈ φ ′′(µLC) −1 and m4 ≈3 φ ′′(µLC) −2 and, in that sense, that LC(x) is close to the Gaussian with mean µLC and inverse-variance φ ′′ (µLC). These expansions could be extended to further orders and similar formulas can be found for the other moments of LC(x): for example, any odd moments can be bounded by |m2k+1| ≤CkK3β−(k+1) m (with Ck some constant) and any even moment can be found to have first-order expansion: m2k ≈(2k −1)!! φ ′′(µLC) −k . The proof, as well as more detailed results, can be found in the Supplement. Note how our result relates to the Bernstein-von Mises theorem, which says that, in the limit of a large amount of observations, a posterior p(x) tends towards its CGA. If we consider the posterior obtained from n likelihood functions that are all log-concave and slowly changing, our results show the slightly different result that the moments of that posterior are close to those of a Gaussian with mean µLC (instead of x⋆ LC) and inverse-variance φ ′′ (µLC) (instead of φ ′′ (x⋆ LC)) . This point is critical. While the CGA still ends up capturing the limit behavior of p, as µLC →x⋆in the largedata limit (see eq. (13) below), an approximation that would return the Gaussian approximation at µLC would be better. This is essentially what EP does, and this is how it improves on the CGA. 2.2 Computing bounds on EP approximations In this section, we consider a given EP fixed-point q∗ k (x|ri, βi) and the corresponding approximation of p(x): q∗(x|r = P ri, β = P βi). We will show that the expected value and variance of q∗(resp. µEP and vEP ) are close to the true mean and variance of p (resp. µ and v), and also investigate the quality of the CGA (µ ≈x⋆, v ≈ h φ ′′ p(x⋆) i−1 ). Under our assumptions on the sites (eq. (1) and (2)), we are able to derive bounds on the quality of the EP approximation. The proof is quite involved and long, and we will only present it in the Supplement. In the main text, we give a partial version: we detail the first step of the demonstration, which consists of computing a rough bound on the distance between the true mean µ, the EP approximation µEP and the mode x⋆, and give an outline of the rest of the proof. Let’s show that µ, µEP and x⋆are all close to one another. We start from eq. (6) applied to p(x): φ ′ p(µ) ≤K3 2βm (10) 5 which tells us that φ ′ p(µ) ≈0. µ must thus be close to x⋆. Indeed: φ ′ p(µ) = φ ′ p(µ) −φ ′ p(x⋆) (11) = φ ′′ p (ξ) (µ −x⋆) ξ ∈[µ, x⋆] ≥ φ ′′ p (ξ) |µ −x⋆| ≥ nβm |µ −x⋆| (12) Combining eq. (10) and (12), we finally have: |µ −x⋆| ≤n−1 K3 2β2m (13) Let’s now show that µEP is also close to x⋆. We proceed similarly, starting from eq. (6) but applied to all hybrids hi(x): ∀i φ ′ i(µEP ) + β−iµEP −r−i ≤n−1 K3 2βm (14) which is not really equivalent to eq. (10) yet. Recall that q(x|r, β) has mean µEP : we thus have: r = βµEP . Which gives: X i β−i ! µEP = ((n −1)β) µEP = (n −1)r = X i r−i (15) If we sum all terms in eq. (14), the β−iµEP and r−i thus cancel, leaving us with: φ ′ p(µEP ) ≤K3 2βm (16) which is equivalent to eq. (10) but for µEP instead of µ. This shows that µEP is, like µ, close to x⋆: |µEP −x⋆| ≤n−1 K3 2β2m (17) At this point, we can show that, since they are both close to x⋆(eq. (13) and (17)), µ = µEP + O n−1 , which constitutes the first step of our computation of bounds on the quality of EP. After computing this, the next step is evaluating the quality of the approximation of the variance, via computing v−1 −v−1 EP for EP and v−1 −φ ′′ p(x⋆) for the CGA, from eq. (8). In both cases, we find: v−1 = v−1 EP + O (1) (18) = φ ′′ p(x⋆) + O (1) (19) Since v−1 is of order n, because of eq. (5) (Brascamp-Lieb upper bound on variance), this is a decent approximation: the relative error is of order n−1. We can find similarly that both EP and CGA do a good job of finding a good approximation of the fourth moment of p: m4. For EP this means that the fourth moment of each hybrid and of q are a close match: ∀i m4 ≈ mi 4 ≈3v2 EP (20) ≈ 3 φ ′′ p(m) −2 (21) In contrast, the third moment of the hybrids doesn’t match at all the third moment of p, but their sum does ! m3 ≈ X i mi 3 (22) 6 Finally, we come back to the approximation of µ by µEP . These obey two very similar relationships: φ ′ p(µ) + φ(3) p (µ)v 2 = O n −1 (23) φ ′ p(µEP ) + φ(3) p (µEP )vEP 2 = O n −1 (24) Since v = vEP + O n−2 (a slight rephrasing of eq. (18)), we finally have: µ = µEP + O n−2 (25) We summarize the results in the following theorem: Theorem 1. Characterizing fixed-points of EP Under the assumptions given by eq. (1) and (2) (log-concave sites with slowly changing log), we can bound the quality of the EP approximation and the CGA: |µ −x∗| ≤ n−1 K3 2β2m |µ −µEP | ≤ B1(n) = O n−2 v−1 −φ ′′ p(x∗) ≤ 2K2 3 β2m + K4 2βm v−1 −v−1 EP ≤ B2(n) = O (1) We give the full expression for the bounds B1 and B2 in the Supplement Note that the order of magnitude of the bound on |µ −x⋆| is the best possible, because it is attained for certain distributions. For example, consider a Gamma distribution with natural parameters (nα, nβ) whose mean α β is approximated at order n−1 by its mode α β − 1 nβ . More generally, from eq. (23), we can compute the first order of the error: µ −m ≈−φ(3) p (µ) φ ′′ p(µ) v 2 ≈−1 2 φ(3) p (µ) φ ′′ p(µ) 2 (26) which is the term causing the order n−1 error. Whenever this term is significant, it is thus safe to conclude that EP improves on the CGA. Also note that, since v−1 is of order n, the relative error for the v−1 approximation is of order n−1 for both methods. Despite having a convergence rate of the same order, the EP approximation is demonstrably better than the CGA, as we show next. Let us first see why the approximation for v−1 is only of order 1 for both methods. The following relationship holds: v−1 = φ ′′ p(µ) + φ(3) p (µ)mp 3 2v + φ(4) p (µ)mp 4 3!v + O n−1 (27) In this relationship, φ ′′ p(µ) is an order n term while the rest are order 1. If we now compare this to the CGA approximation of v−1, we find that it fails at multiple levels. First, it completely ignores the two order 1 terms, and then, because it takes the value of φ ′′ p at x⋆which is at a distance of O n−1 from µ, it adds another order 1 error term (since φ(3) p = O (n)). The CGA is thus adding quite a bit of error, even if each component is of order 1. Meanwhile, vEP obeys a relationship similar to eq. (27): v−1 EP = φ ′′ p(µEP ) + X i φ(3) i (µEP ) mi 3 2vEP + φ(4) p (µEP ) 3v2 EP 3!vEP + O n−1 (28) We can see where the EP approximation produces errors. The φ ′′ p term is well approximated: since |µ −µEP | = O n−2 , we have φ ′′ p(µ) = φ ′′ p(µEP )+O n−1 . The term involving m4 is also well 7 approximated, and we can see that the only term that fails is the m3 term. The order 1 error is thus entirely coming from this term, which shows that EP performance suffers more from the skewness of the target distribution than from its kurtosis. Finally, note that, with our result, we can get some intuitions about the quality of the EP approximation using other metrics. For example, if the most interesting metric is the KL divergence KL (p, q), the excess KL divergence from using the EP approximation q instead of the true minimizer qKL (which has the same mean µ and variance v as p) is given by: ∆KL = ˆ p log qKL q = ˆ p(x) −(x −µ)2 2v + (x −µEP )2 2vEP −1 2 log v vEP ! (29) = 1 2 v vEP −1 −log v vEP + (µ −µEP )2 2vEP (30) ≈ 1 4 v −vEP vEP 2 + (µ −µEP )2 2vEP (31) which we recognize as KL (qKL, q). A similar formula gives the excess KL divergence from using the CGA instead of qKL. For both methods, the variance term is of order n−2 (though it should be smaller for EP), but the mean term is of order n−3 for EP while it is of order n−1 for the CGA. Once again, EP is found to be the better approximation. Finally, note that our bounds are quite pessimistic: the true value might be a much better fit than we have predicted here. A first cause is the bounding of the derivatives of log(p) (eqs. (3),(4)): while those bounds are correct, they might prove to be very pessimistic. For example, if the contributions from the sites to the higher-derivatives cancel each other out, a much lower bound than nKd might apply. Similarly, there might be another lower bound on the curvature much higher than nβm. Another cause is the bounding of the variance from the curvature. While applying Brascamp-Lieb requires the distribution to have high log-curvature everywhere, a distribution with high-curvature close to the mode and low-curvature in the tails still has very low variance: in such a case, the Brascamp-Lieb bound is very pessimistic. In order to improve on our bounds, we will thus need to use tighter bounds on the log-derivatives of the hybrids and of the target distribution, but we will also need an extension of the Brascamp-Lieb result that can deal with those cases where a distribution is strongly log-concave around its mode but, in the tails, the log-curvature is much lower. 3 Conclusion EP has been used for now quite some time without any theoretical concrete guarantees on its performance. In this work, we provide explicit performance bounds and show that EP is superior to the CGA, in the sense of giving provably better approximations of the mean and variance. There are now theoretical arguments for substituting EP to the CGA in a number of practical problems where the gain in precision is worth the increased computational cost. This work tackled the first steps in proving that EP offers an appropriate approximation. Continuing in its tracks will most likely lead to more general and less pessimistic bounds, but it remains an open question how to quantify the quality of the approximation using other distance measures. For example, it would be highly useful for machine learning if one could show bounds on prediction error when using EP. We believe that our approach should extend to more general performance measures and plan to investigate this further in the future. References [1] Thomas P. Minka. Expectation Propagation for approximate Bayesian inference. In UAI ’01: Proceedings of the 17th Conference in Uncertainty in Artificial Intelligence, pages 362–369, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. ISBN 1-55860-800-1. URL http://portal.acm.org/citation.cfm?id=720257. 8 [2] Malte Kuss and Carl E. Rasmussen. Assessing Approximate Inference for Binary Gaussian Process Classification. J. Mach. Learn. Res., 6:1679–1704, December 2005. ISSN 1532-4435. URL http://portal.acm.org/citation.cfm?id=1194901. [3] Hannes Nickisch and Carl E. Rasmussen. Approximations for Binary Gaussian Process Classification. Journal of Machine Learning Research, 9:2035–2078, October 2008. URL http://www.jmlr.org/papers/volume9/nickisch08a/nickisch08a.pdf. [4] Guillaume Dehaene and Simon Barthelmé. Expectation propagation in the large-data limit. Technical report, March 2015. URL http://arxiv.org/abs/1503.08060. [5] T. Minka. Divergence Measures and Message Passing. Technical report, 2005. URL http://research.microsoft.com/en-us/um/people/minka/papers/ message-passing/minka-divergence.pdf. [6] M. Seeger. Expectation Propagation for Exponential Families. Technical report, 2005. URL http://people.mmci.uni-saarland.de/~{}mseeger/papers/ epexpfam.pdf. [7] Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer, 1st ed. 2006. corr. 2nd printing 2011 edition, October 2007. ISBN 0387310738. URL http://www.amazon.com/exec/obidos/redirect? tag=citeulike07-20&path=ASIN/0387310738. [8] Jack Raymond, Andre Manoel, and Manfred Opper. Expectation propagation, September 2014. URL http://arxiv.org/abs/1409.6179. [9] Anirban DasGupta. Asymptotic Theory of Statistics and Probability (Springer Texts in Statistics). Springer, 1 edition, March 2008. ISBN 0387759700. URL http://www.amazon.com/exec/obidos/redirect?tag=citeulike07-20& path=ASIN/0387759700. [10] Adrien Saumard and Jon A. Wellner. Log-concavity and strong log-concavity: A review. Statist. Surv., 8:45–114, 2014. doi: 10.1214/14-SS107. URL http://dx.doi.org/10. 1214/14-SS107. [11] Herm J. Brascamp and Elliott H. Lieb. Best constants in young’s inequality, its converse, and its generalization to more than three functions. Advances in Mathematics, 20(2):151–173, May 1976. ISSN 00018708. doi: 10.1016/0001-8708(76)90184-5. URL http://dx.doi. org/10.1016/0001-8708(76)90184-5. 9 | 2015 | 308 |
5,823 | On the Limitation of Spectral Methods: From the Gaussian Hidden Clique Problem to Rank-One Perturbations of Gaussian Tensors Andrea Montanari Department of Electrical Engineering and Department of Statistics. Stanford University. montanari@stanford.edu Daniel Reichman Department of Cognitive and Brain Sciences, University of California, Berkeley, CA daniel.reichman@gmail.com Ofer Zeitouni Faculty of Mathematics, Weizmann Institute, Rehovot 76100, Israel and Courant Institute, New York University ofer.zeitouni@weizmann.ac.il Abstract We consider the following detection problem: given a realization of a symmetric matrix X of dimension n, distinguish between the hypothesis that all upper triangular variables are i.i.d. Gaussians variables with mean 0 and variance 1 and the hypothesis that there is a planted principal submatrix B of dimension L for which all upper triangular variables are i.i.d. Gaussians with mean 1 and variance 1, whereas all other upper triangular elements of X not in B are i.i.d. Gaussians variables with mean 0 and variance 1. We refer to this as the ‘Gaussian hidden clique problem’. When L = (1 + ϵ)√n (ϵ > 0), it is possible to solve this detection problem with probability 1 −on(1) by computing the spectrum of X and considering the largest eigenvalue of X. We prove that when L < (1 −ϵ)√n no algorithm that examines only the eigenvalues of X can detect the existence of a hidden Gaussian clique, with error probability vanishing as n →∞. The result above is an immediate consequence of a more general result on rank-one perturbations of k-dimensional Gaussian tensors. In this context we establish a lower bound on the critical signal-to-noise ratio below which a rank-one signal cannot be detected. 1 Introduction Consider the following detection problem. One is given a symmetric matrix X = X(n) of dimension n, such that the n 2 + n entries (Xi,j)i≤j are mutually independent random variables. Given (a realization of) X one would like to distinguish between the hypothesis that all random variables Xi,j have the same distribution F0 to the hypothesis where there is a set U ⊆[n], with L := |U|, so that all random variables in the submatrix XU := (Xs,t : s, t ∈U) have a distribution F1 that is different from the distribution of all other elements in X which are still distributed as F0. We refer to XU as the hidden submatrix. 1 The same problem was recently studied in [1, 8] and, for the asymmetric case (where no symmetry assumption is imposed on the independent entries of X), in [6, 18, 20]. Detection problems with similar flavor (such as the hidden clique problem) have been studied over the years in several fields including computer science, physics and statistics. We refer to Section 5 for further discussion of the related literature. An intriguing outcome of these works is that, while the two hypothesis are statistically distinguishable as soon as L ≥C log n (for C a sufficiently large constant) [7], practical algorithms require significantly larger L. In this paper we study the class of spectral (or eigenvaluebased) tests detecting the hidden submatrix. Our proof technique naturally allow to consider two further generalizations of this problem that are of independent interests. We briefly summarize our results below. The Gaussian hidden clique problem. This is a special case of the above hypothesis testing setting, whereby F0 = N(0, 1) and F1 = N(1, 1) (entries on the diagonal are defined slightly differently in order to simplify calculations). Here and below N(m, σ2) denote the Gaussian distribution of mean m and variance σ2. Equivalently, let Z be a random matrix from the Gaussian Orthogonal Ensemble (GOE) i.e. Zij ∼N(0, 1/n) independently for i < j, and Zii ∼N(0, 2/n). Then, under hypothesis H1,L we have X = n−1/21U1T U + Z (1U being the indicator vector of U), and under hypothesis H0, X = Z (the factor n in the normalization is for technical convenience). The Gaussian hidden clique problem can be thought of as the following clustering problem: there are n elements and the entry (i, j) measures the similarity between elements i and j. The hidden submatrix corresponds to a cluster of similar elements, and our goal is to determine given the matrix whether there is a large cluster of similar elements or alternatively, whether all similarities are essentially random (Gaussian) noise. Our focus in this work is on the following restricted hypothesis testing question. Let λ1 ≥λ2 ≥ · · · ≥λn be the ordered eigenvalues of X. Is there a test that depends only on λ1, . . . , λn and that distinguishes H0 from H1,L ‘reliably,’ i.e. with error probability converging to 0 as n →∞? Notice that the eigenvalues distribution does not depend on U as long as this is independent from the noise Z. We can therefore think of U as fixed for this question. Historically, the first polynomial time algorithm for detecting a planted clique of size O(√n) in a random graph [2] relied on spectral methods (see Section 5 for more details). This is one reason for our interest in spectral tests for the Gaussian hidden clique problem. If L ≥(1 + ε)√n then [11] implies that a simple test checking whether λ1 ≥2 + δ for some δ = δ(ε) > 0 is reliable for the Gaussian hidden clique problem. We prove that this result is tight, in the sense that no spectral test is reliable for L ≤(1 −ε)√n. Rank-one matrices in Gaussian noise. Our proof technique builds on a simple observation. Since the noise Z is invariant under orthogonal transformations1, the above question is equivalent to the following testing problem. For β ∈R≥0, and v ∈Rn, ∥v∥2 = 1 a uniformly random unit vector, test H0: X = Z versus H1, X = βvvT +Z. (The correspondence between the two problems yields β = L/√n.) Again, this problem (and a closely related asymmetric version [22]) has been studied in the literature, and it follows from [11] that a reliable test exists for β ≥1 + ε. We provide a simple proof (based on the second moment method) that no test is reliable for β < 1 −ε. Rank-one tensors in Gaussian noise. It turns that the same proof applies to an even more general problem: detecting a rank-one signal in a noisy tensor. We carry out our analysis in this more general setting for two reasons. First, we think that this clarifies the what aspects of the model are important for our proof technique to apply. Second, the problem estimating tensors from noisy data has attracted significant interest recently within the machine learning community [15, 21]. More precisely, we consider a noisy tensor X ∈Nk Rn, of the form X = β v⊗k + Z, where Z is Gaussian noise, and v is a random unit vector. We consider the problem of testing this hypothesis against H0: X = Z. We establish a threshold β2nd k such that no test can be reliable for β < β2nd k (in particular β2nd 2 = 1). Two differences are worth remarking for k ≥3 with respect to the more familiar matrix case k = 2. First, we do not expect the second moment bound β2nd k to be tight, i.e. a reliable test to exist for all β > β2nd k . On the other hand, we can show that it is tight up to 1By this we mean that, for any orthogonal matrix R ∈O(n), independent of Z, RZRT is distributed as Z. 2 a universal (k and n independent) constant. Second, below β2nd k the problem is more difficult than the matrix version below β2nd 2 = 1: not only no reliable test exists but, asymptotically, any test behaves asymptotically as random guessing. For more details on our results regarding noisy tensors, see Theorem 3. 2 Main result for spectral detection Let Z be a GOE matrix as defined in the previous section. Equivalently if G is an (asymmetric) matrix with i.i.d. entries Gi,j ∼N(0, 1), Z = 1 √ 2n G + GT . (1) For a deterministic sequence of vectors v(n), ∥v(n)∥2 = 1, we consider the two hypotheses H0 : X = Z , H1,β : X = βvvT + Z . (2) A special example is provided by the Gaussian hidden clique problem in which case β = L/√n and v = 1U/ √ L for some set U ⊆[n], |U| = L, ( H0 : X = Z , H1,L : X = 1 √n1U1T U + Z . (3) Observe that the distribution of eigenvalues of X, under either alternative, is invariant to the choice of the vector v (or subset U), as long as the norm of v is kept fixed. Therefore, any successful algorithm that examines only the eigenvalues, will distinguish between H0 and H1,β but not give any information on the vector v (or subset U, in the case of H1,L). We let Q0 = Q0(n) (respectively, Q1 = Q1(n)) denote the distribution of the eigenvalues of X under H0 (respectively H1 = H1,β or H1,L). A spectral statistical test for distinguishing between H0 and H1 (or simply a spectral test) is a measurable map Tn : (λ1, . . . , λn) 7→{0, 1}. To formulate precisely what we mean by the word distinguish, we introduce the following notion. Definition 1. For each n ∈N, let P0,n, P1,n be two probability measures on the same measure space (Ωn, Fn). We say that the sequence (P1,n) is contiguous with respect to (P0,n) if, for any sequence of events An ∈Fn, lim n→∞P0,n(An) = 0 ⇒ lim n→∞P1,n(An) = 0 . (4) Note that contiguity is not in general a symmetric relation. In the context of the spectral statistical tests described above, the sequences An in Definition 1 (with Pn = Q0(n) and Qn = Q1(n)) can be put in correspondence with spectral statistical tests Tn by taking An = {(λ1, . . . , λn) : Tn(λ1, . . . , λn) = 0}. We will thus say that H1 is spectrally contiguous with respect to H0 if Qn is contiguous with respect to Pn. Our main result on the Gaussian hidden clique problem is the following. Theorem 1. For any sequence L = L(n) satisfying lim supn→∞L(n)/√n < 1, the hypotheses H1,L are spectrally contiguous with respect to H0. 2.1 Contiguity and integrability Contiguity is related to a notion of uniform absolute continuity of measures. Recall that a probability measure µ on a measure space is absolutely continuous with respect to another probability measure ν if for every measurable set A, ν(A) = 0 implies that µ(A) = 0, in which case there exists a ν-integrable, non-negative function f ≡dµ dν (the Radon-Nikodym derivative of µ with respect to ν), so that µ(A) = R A f dν for every measurable set A. We then have the following known useful fact: 3 Lemma 2. Within the setting of Definition 1, assume that P1,n is absolutely continuous with respect to P0,n, and denote by Λn ≡dP1,n dP0,n its Radon-Nikodym derivative. (a) If lim supn→∞E0,n(Λ2 n) < ∞, then (P1,n) is contiguous with respect to (P0,n). (b) If limn→∞E0,n(Λ2 n) = 1, then limn→∞∥P0,n −P1,n∥TV = 0, where ∥· ∥TV denotes the total variation distance, i.e. ∥P0,n −P1,n∥TV ≡sup A |P0,n(A) −P1,n(A)∥. 2.2 Method and structure of the paper Consider problem (2). We use the fact that the law of the eigenvalues under both H0 and H1,β are invariant under conjugations by a orthogonal matrix. Once we conjugate matrices sampled under the hypothesis H1,β by an independent orthogonal matrix sampled according to the Haar distribution, we get a matrix distributed as X = βvvT + Z , (5) where u is uniform on the n-dimensional sphere, and Z is a GOE matrix (with off-diagonal entries of variance 1/n). Letting P1,n denote the law of βuuT + Z and P0,n denote the law of Z, we show that P1,n is contiguous with respect to P0,n, which implies that the law of eigenvalues Q1(n) is contiguous with respect to Q0(n). To show the contiguity, we consider a more general setup, of independent interest, of Gaussian tensors of order k, and in that setup show that the Radon-Nikodym derivative Λn,L = dP1,n dP0,n is uniformly square integrable under P0,n; an application of Lemma 2 then quickly yields Theorem 1. The structure of the paper is as follows. In the next section, we define formally the detection problem for a symmetric tensor of order k ≥2. We show the existence of a threshold under which detection is not possible (Theorem 3), and show how Theorem 1 follows from this. Section 4 is devoted to the proof of Theorem 3, and concludes with some additional remarks and consequences of Theorem 3. Finally, Section 5 is devoted to a description of the relation between the Gaussian hidden clique problem and hidden clique problem in computer science, and related literature. 3 A symmetric tensor model and a reduction Exploiting rotational invariance, we will reduce the spectral detection problem to a detection problem involving a standard detection problem between random matrices. Since the latter generalizes to a tensor setup, we first introduce a general Gaussian hypothesis testing for k-tensors, which is of independent interest. We then explain how the spectral detection problem reduces to the special case of k = 2. 3.1 Preliminaries and notation We use lower-case boldface for vectors (e.g. u, v) and upper-case boldface for matrices and tensors (e.g. X, Z). The ordinary scalar product and ℓp norm over vectors are denoted by ⟨u, v⟩= Pn i=1 uivi, and ∥v∥p. We write Sn−1 for the unit sphere in n dimensions Sn−1 ≡ x ∈Rn : ∥x∥2 = 1 . (6) Given X ∈Nk Rn a real k-th order tensor, we let {Xi1,...,ik}i1,...,ik denote its coordinates. The outer product of two tensors is X ⊗Y, and, for v ∈Rn, we define v⊗k = v ⊗· · · ⊗v ∈Nk Rn as the k-th outer power of v. We define the inner product of two tensors X, Y ∈Nk Rn as ⟨X, Y⟩= X i1,··· ,ik∈[n] Xi1,··· ,ikYi1,··· ,ik . (7) 4 We define the Frobenius (Euclidean) norm of a tensor X by ∥X∥F = p ⟨X, X⟩, and its operator norm by ∥X∥op ≡max{⟨X, u1 ⊗· · · ⊗uk⟩: ∀i ∈[k] , ∥ui∥2 ≤1}. (8) It is easy to check that this is indeed a norm. For the special case k = 2, it reduces to the ordinary ℓ2 matrix operator norm (equivalently, to the largest singular value of X). For a permutation π ∈Sk, we will denote by Xπ the tensor with permuted indices Xπ i1,··· ,ik = Xπ(i1),··· ,π(ik). We call the tensor X symmetric if, for any permutation π ∈Sk, Xπ = X. It is proved [23] that, for symmetric tensors, we have the equivalent representation ∥X∥op ≡max{|⟨X, u⊗k⟩| : ∥u∥2 ≤1}. (9) We define R ≡R ∪∞with the usual conventions of arithmetic operations. 3.2 The symmetric tensor model and main result We denote by G ∈Nk Rn a tensor with independent and identically distributed entries Gi1,··· ,ik ∼ N(0, 1) (note that this tensor is not symmetric). We define the symmetric standard normal noise tensor Z ∈Nk Rn by Z = 1 k! r 2 n X π∈Sk Gπ . (10) Note that the subset of entries with unequal indices form an i.i.d. collection {Zi1,i2,...,ik}i1<···<ik ∼ N(0, 2/(n(k!))). With this normalization, we have, for any symmetric tensor A ∈Nk Rn E e⟨A,Z⟩ = exp n 1 n∥A∥2 F o . (11) We will also use the fact that Z is invariant in distribution under conjugation by orthogonal transformations, that is, that for any orthogonal matrix U ∈O(n), {Zi1,...,ik} has the same distribution as {P j1,...,jk Qk ℓ=1 Uiℓ,jℓ · Zj1,...,jk}. Given a parameter β ∈R≥0, we consider the following model for a random symmetric tensor X: X ≡β v⊗k + Z , (12) with Z a standard normal tensor, and v uniformly distributed over the unit sphere Sn−1. In the case k = 2 this is the standard rank-one deformation of a GOE matrix. We let Pβ = P(k) β denote the law of X under model (12). Theorem 3. For k ≥2, let β2nd k ≡ inf q∈(0,1) r −1 qk log(1 −q2) . (13) Assume β < β2nd k . Then, for any k ≥3, we have lim n→∞
Pβ −P0
TV = 0 . (14) Further, for k = 2 and β < β2nd k = 1, Pβ is contiguous with respect to P0. A few remarks are in order, following Theorem 3. First, it is not difficult to derive the asymptotic β2nd k = p log(k/2) + ok(1) for large k. 5 Second, for k = 2 we get using log(1−q2) ≤−q2, that β2nd k = 1. Recall that for k = 2 and β > 1, it is known that the largest eigenvalue of X, λ1(X) converges almost surely to (β + 1/β) [11]. As a consequence ∥P0 −Pβ∥TV →1 for all β > 1: the second moment bound is tight. For k ≥ 3, it follows by the triangle inequality that ∥X∥op ≥ β −∥Z∥op, and further lim supn→∞∥Z∥op ≤µk almost surely as n →∞[19, 5] for some bounded µk. It follows that ∥P0 −Pβ∥TV →1 for all β > 2µk [21]. Hence, the second moment bound is off by a k-dependent factor. For large k, 2µk = √2 log k + Ok(1) and hence the factor is indeed bounded in k. Behavior below the threshold. Let us stress an important qualitative difference between k = 2 and k ≥3, for β < β2nd k . For k ≥3, the two models are indistinguishable and any test is essentially as good as random guessing. Formally, for any measurable function T : ⊗kRn →{0, 1}, we have lim n→∞ P0(T(X) = 1) + Pβ(T(X) = 0) = 1 . (15) For k = 2, our result implies that, for β < 1, ∥P0 −Pβ∥TV is bounded away from 1. On the other hand, it is easy to see that it is bounded away from 0 as well, i.e. 0 < lim inf n→∞∥P0 −Pβ∥TV ≤lim sup n→∞∥P0 −Pβ∥TV < 1 . (16) Indeed, consider for instance the statistics S = Tr(X). Under P0, S ∼N(0, 2), while under Pβ, S ∼N(β, 2). Hence lim inf n→∞∥P0 −Pβ∥TV ≥∥N(0, 1) −N(β/ √ 2, 1)∥TV = 1 −2Φ − β 2 √ 2 > 0 (17) (Here Φ(x) = R x −∞e−z2/2dz/ √ 2π is the Gaussian distribution function.) The same phenomenon for rectangular matrices (k = 2) is discussed in detail in [22]. 3.3 Reduction of spectral detection to the symmetric tensor model, k = 2 Recall that in the setup of Theorem 1, Q0,n is the law of the eigenvalues of X under H0 and Q1,n is the law of the eigenvalues of X under H1,L. Then Q1,n is invariant by conjugation of orthogonal matrices. Therefore, the detection problem is not changed if we replace X = n−1/21U1T U + Z by bX ≡RXRT = 1 √nR1U(R1U)T + RZRT , (18) where R ∈O(n) is an orthogonal matrix sampled according to the Haar measure. A direct calculation yields bX = βvvT + eZ, (19) where v is uniform on the n dimensional sphere, β = L/√n, and eZ is a GOE matrix (with offdiagonal entries of variance 1/n). Furthermore, v and eZ are independent of one another. Let P1,n be the law of bX. Note that P1,n = P(k=2) β with β = L/√n. We can relate the detection problem of H0 vs. H1,L to the detection problem of P0,n vs. P1,n as follows. Lemma 4. (a) If P1,n is contiguous with respect to P0,n then H1,L is spectrally contiguous with respect to H0. (b) We have ∥Q0,n −Q1,n∥TV ≤∥P0,n −P1,n∥TV. In view of Lemma 4, Theorem 1 is an immediate consequence of Theorem 3. 4 Proof of Theorem 3 The proof uses the following large deviations lemma, which follows, for instance, from [9, Proposition 2.3]. 6 Lemma 5. Let v a uniformly random vector on the unit sphere Sn−1 and let ⟨v, e1⟩be its first coordinate. Then, for any interval [a, b] with −1 ≤a < b ≤1 lim n→∞ 1 n log P(⟨v, e1⟩∈[a, b]) = max n1 2 log(1 −q2) : q ∈[a, b] o . (20) Proof of Theorem 3. We denote by Λ the Radon-Nikodym derivative of Pβ with respect to P0. By definition E0Λ = 1. It is easy to derive the following formula Λ = Z exp n −nβ2 4 + nβ 2 ⟨X, v⊗k⟩ o µn(dv) . (21) where µn is the uniform measure on Sn−1. Squaring and using (11), we get E0Λ2 = e−nβ2/2 Z E0 exp nnβ 2 ⟨X, v1 ⊗k + v2 ⊗k⟩ o µn(dv1)µn(dv2) = e−nβ2/2 Z exp nnβ2 4
v1 ⊗k + v2 ⊗k
2 F o µn(dv1)µn(dv2) = Z exp nnβ2 2 ⟨v1, v2⟩ko µn(dv1)µn(dv2) = Z exp nnβ2 2 ⟨v, e1⟩ko µn(dv) , (22) where in the first step we used (11) and in the last step, we used rotational invariance. Let Fβ : [−1, 1] →R be defined by Fβ(q) ≡β2qk 2 + 1 2 log(1 −q2) . (23) Using Lemma 5 and Varadhan’s lemma, for any −1 ≤a < b ≤1, Z exp nnβ2 2 ⟨v, e1⟩ko I(⟨v, e1⟩∈[a, b]) µn(dv) = exp n n max q∈[a,b] Fβ(q) + o(n) o . (24) It follows from the definition of β2nd k that max|q|≥ε Fβ(q) < 0 for any ε > 0. Hence E0Λ2 ≤ Z exp nnβ2 2 ⟨v, e1⟩ko I(|⟨v, e1⟩| ≤ε) µn(dv) + e−c(ε)n , (25) for some c(ε) > 0 and all n large enough. Next notice that, under µn, ⟨v, e1⟩ d= G/(G2 +Zn−1)1/2 where G ∼N(0, 1) and Zn−1 is a χ2 with n−1 degrees of freedom independent of G. Then, letting Zn ≡G2 + Zn−1 (a χ2 with n degrees of freedom) E0Λ2 ≤E n exp nβ2 2 |G|k Zk/2 n I(|G/Z1/2 n | ≤ε) o + e−c(ε)n ≤E n exp nβ2 2 |G|k Zk/2 n I(|G/Z1/2 n | ≤ε) I(Zn−1 ≥n(1 −δ)) o + enβ2εk/2P Zn−1 ≤n(1 −δ) + e−c(ε)n ≤E n exp n1−(k/2)β2 2(1 −δ)k/2 |G|k I(|G|2 ≤2εn) o + enβ2εk/2P Zn−1 ≤n(1 −δ) + e−c(ε)n = 2 √ 2π Z 2εn 0 eC(β,δ)n1−k/2xk−x2/2dx + enβ2εk/2P Zn−1 ≤n(1 −δ) + e−c(ε)n , (26) where C(β, δ) = β2/(2(1 −δ)k/2). Now, for any δ > 0, we can (and will) choose ε small enough so that both enβ2εk/2P Zn−1 ≤n(1 −δ) →0 exponentially fast (by tail bounds on χ2 random variables) and, if k ≥3, the argument of the exponent in the integral in the right hand side of (26) 7 is bounded above by −x2/4, which is possible since the argument vanishes at x∗= 2C(β, δ)n1/2. Hence, for any δ > 0, and all n large enough, we have E0Λ2 ≤ 2 √ 2π Z 2εn 0 eC(β,δ)n1−k/2xk−x2/2dx + e−c(δ)n , (27) for some c(δ) > 0. Now, for k ≥3 the integrand in (27) is dominated by e−x2/4 and converges pointwise (as n →∞) to 1. Therefore, since E0Λ2 ≥(E0Λ)2 = 1, k ≥3 : lim n→∞E0Λ2 = 1 . (28) For k = 2, the argument is independent of n and can be integrated immediately, yielding (after taking the limit δ →0) k = 2 : lim sup n→∞E0Λ2 ≤ 1 p 1 −β2 . (29) (Indeed, the above calculation implies that the limit exists and is given by the right-hand side.) The proof is completed by invoking Lemma 2. 5 Related work In the classical G(n, 1/2) planted clique problem, the computational problem is to find the planted clique (of cardinality k) in polynomial time, where we assume the location of the planted clique is hidden and is not part of the input. There are several algorithms that recover the planted clique in polynomial time when k = C√n where C > 0 is a constant independent of n [2, 8, 10]. Despite significant effort, no polynomial time algorithm for this problem is known when k = o(√n). In the decision version of the planted clique problem, one seeks an efficient algorithm that distinguishes between a random graph distributed as G(n, 1/2) or a random graph containing a planted clique of size k ≥(2 + δ) log n (for δ > 0; the natural threshold for the problem is the size of the largest clique in a random sample of G(n, 1/2), which is asymptotic to 2 log n [14]). No polynomial time algorithm is known for this decision problem if k = o(√n). As another example, consider the following setting introduced by [4] (see also [1]): one is given a realization of a n-dimensional Gaussian vector x := (x1, .., xn) with i.i.d. entries. The goal is to distinguish between the following two hypotheses. Under the first hypothesis, all entries in x are i.i.d. standard normals. Under the second hypothesis, one is given a family of subsets C := {S1, ..., Sm} such that for every 1 ≤k ≤m, Sk ⊆{1, ..., n} and there exists an i ∈{1, . . . , m} such that, for any α ∈Si, xα is a Gaussian random variable with mean µ > 0 and unit variance whereas for every α /∈Si, xα is standard normal. (The second hypothesis does not specify the index i, only its existence). The main question is how large µ must be such that one can reliably distinguish between these two hypotheses. In [4], α are vertices in certain undirected graphs and the family C is a set of pre-specified paths in these graphs. The Gaussian hidden clique problem is related to various applications in statistics and computational biology [6, 18]. That detection is statistically possible when L ≫log n was established in [1]. In terms of polynomial time detection, [8] show that detection is possible when L = Θ(√n) for the symmetric cases. As noted, no polynomial time algorithm is known for the Gaussian hidden clique problem when k = o(√n). In [1, 20] it was hypothesized that the Gaussian hidden clique problem should be difficult when L ≪√n. The closest results to ours are the ones of [22]. In the language of the present paper, these authors consider a rectangular matrix of the form X = λ v1vT 2 + Z ∈Rn1×n2 whereby Z has i.i.d. entries Zij ∼N(0, 1/n1), v1 is deterministic of unit norm, and v2 has entries which are i.i.d. N(0, 1/n1), independent of Z. They consider the problem of testing this distribution against λ = 0. Setting c = limn→∞n1 n2 , it is proved in [22] that the distribution of the singular values of X under the null and the alternative are mutually contiguous if λ < √c and not mutually contiguous if λ > √c. While [22] derive some more refined results, their proofs rely on advanced tools from random matrix theory [13], while our proof is simpler, and generalizable to other settings (e.g. tensors). 8 References [1] L. Addario-Berry, N. Broutin, L. Devroye, G. Lugosi. On combinatorial testing problems. Annals of Statistics 38(5) (2011), 3063–3092. [2] N. Alon, M. Krivelevich and B. Sudakov. Finding a large hidden clique in a random graph. Random Structures and Algorithms 13 (1998), 457–466. [3] G. W. Anderson, A. Guionnet and O. Zeitouni. An introduction to random matrices. Cambridge University Press (2010). [4] E. Arias-Castro, E. J., Cand`es, H. Helgason and O. Zeitouni. Searching for a trail of evidence in a maze. Annals of Statistics 36 (2008), 1726–1757. [5] A. Auffinger, G. Ben Arous, and J. Cerny. Random matrices and complexity of spin glasses. Communications on Pure and Applied Mathematics 66(2) (2013), 165–201. [6] S. Balakrishnan, M. Kolar, A. Rinaldo, A. Singh, and L. Wasserman. Statistical and computational tradeoffs in biclustering. NIPS Workshop on Computational Trade-offs in Statistical Learning (2011). [7] S. Bhamidi, P.S. Dey, and A.B. Nobel. Energy landscape for large average submatrix detection problems in Gaussian random matrices. arXiv:1211.2284. [8] Y. Deshpande and A. Montanari. Finding hidden cliques of size p N/e in nearly linear time. Foundations of Computational Mathematics (2014), 1–60 [9] A. Dembo and O. Zeitouni. Matrix optimization under random external fields. arXiv:1409.4606 [10] U. Feige and R. Krauthgamer. Finding and certifying a large hidden clique in a semi-random graph. Random Struct. Algorithms 162(2) (1999), 195–208. [11] D. F´eral and S. P´ech´e. The largest eigenvalue of rank one deformation of large Wigner matrices. Comm. Math. Phys. 272 (2007), 185–228. [12] Z. F¨uredi and J. Koml´os, The eigenvalues of random symmetric matrices. Combinatorica 1 (1981), 233–241. [13] A. Guionnet and M. Maida. A Fourier view on R-transform and related asymptotics of spherical integrals. Journal of Functional Analysis 222 (2005), 435–490. [14] G. R. Grimmett and C. J. H. McDiarmid. On colouring random graphs. Math. proc. Cambridge Philos. Soc. 77 (1975), 313–324. [15] D. Hsu, S. M. Kakade, and T. Zhang. A spectral algorithm for learning hidden Markov models. Journal of Computer and System Sciences 78.5 (2012): 1460-1480. [16] M. Jerrum. Large cliques elude the Metropolis process. Random Struct. Algorithms 3(4) (1992), 347–360. [17] A. Knowles and J. Yin, The isotropic semicircle law and deformation of Wigner matrices. Communications on Pure and Applied Mathematics 66(11) (2013), 1663–1749. [18] M. Kolar, S. Balakrishnan, A. Rinaldo, and A. Singh. Minimax localization of structural information in large noisy matrices. Neural Information Processing Systems (NIPS), (2011), 909–917. [19] M. Talagrand. Free energy of the spherical mean field model. Probability theory and related fields 134(3) (2006), 339–382. [20] Z Ma and Y Wu. Computational barriers in minimax submatrix detection. arXiv:1309.5914. [21] A. Montanari and E. Richard. A Statistical Model for Tensor PCA. Neural Information Processing Systems (NIPS) (2014), 2897–2905. [22] A. Onatski, M. J. Moreira, M. Hallin, et al. Asymptotic power of sphericity tests for high-dimensional data. The Annals of Statistics 41(3) (2013), 1204–1231. [23] W. C. Waterhouse. The absolute-value estimate for symmetric multilinear forms. Linear Algebra and its Applications 128 (1990), 97–105. 9 | 2015 | 309 |
5,824 | Backpropagation for Energy-Efficient Neuromorphic Computing Steve K. Esser IBM Research–Almaden 650 Harry Road, San Jose, CA 95120 sesser@us.ibm.com Rathinakumar Appuswamy IBM Research–Almaden 650 Harry Road, San Jose, CA 95120 rappusw@us.ibm.com Paul A. Merolla IBM Research–Almaden 650 Harry Road, San Jose, CA 95120 pameroll@us.ibm.com John V. Arthur IBM Research–Almaden 650 Harry Road, San Jose, CA 95120 arthurjo@us.ibm.com Dharmendra S. Modha IBM Research–Almaden 650 Harry Road, San Jose, CA 95120 dmodha@us.ibm.com Abstract Solving real world problems with embedded neural networks requires both training algorithms that achieve high performance and compatible hardware that runs in real time while remaining energy efficient. For the former, deep learning using backpropagation has recently achieved a string of successes across many domains and datasets. For the latter, neuromorphic chips that run spiking neural networks have recently achieved unprecedented energy efficiency. To bring these two advances together, we must first resolve the incompatibility between backpropagation, which uses continuous-output neurons and synaptic weights, and neuromorphic designs, which employ spiking neurons and discrete synapses. Our approach is to treat spikes and discrete synapses as continuous probabilities, which allows training the network using standard backpropagation. The trained network naturally maps to neuromorphic hardware by sampling the probabilities to create one or more networks, which are merged using ensemble averaging. To demonstrate, we trained a sparsely connected network that runs on the TrueNorth chip using the MNIST dataset. With a high performance network (ensemble of 64), we achieve 99.42% accuracy at 108 µJ per image, and with a high efficiency network (ensemble of 1) we achieve 92.7% accuracy at 0.268 µJ per image. 1 Introduction Neural networks today are achieving state-of-the-art performance in competitions across a range of fields [1][2][3]. Such success raises hope that we can now begin to move these networks out of the lab and into embedded systems that can tackle real world problems. This necessitates a shift DARPA: Approved for Public Release, Distribution Unlimited 1 in thinking to system design, where both neural network and hardware substrate must collectively meet performance, power, space, and speed requirements. On a neuron-for-neuron basis, the most efficient substrates for neural network operation today are dedicated neuromorphic designs [4][5][6][7]. To achieve high efficiency, neuromorphic architectures can use spikes to provide event based computation and communication that consumes energy only when necessary, can use low precision synapses to colocate memory with computation keeping data movement local and allowing for parallel distributed operation, and can use constrained connectivity to implement neuron fan-out efficiently thus dramatically reducing network traffic on-chip. However, such design choices introduce an apparent incompatibility with the backpropagation algorithm [8] used for training today’s most successful deep networks, which uses continuous-output neurons and high-precision synapses, and typically operates with no limits on the number of inputs per neuron. How then can we build systems that take advantage of algorithmic insights from deep learning, and the operational efficiency of neuromorphic hardware? As our main contribution here, we demonstrate a learning rule and a network topology that reconciles the apparent incompatibility between backpropagation and neuromorphic hardware. The essence of the learning rule is to train a network offline with hardware supported connectivity, as well as continuous valued input, neuron output, and synaptic weights, but values constrained to the range [0, 1]. We further impose that such constrained values represent probabilities, either of a spike occurring or of a particular synapse being on. Such a network can be trained using backpropagation, but also has a direct representation in the spiking, low synaptic precision deployment system, thereby bridging these two worlds. The network topology uses a progressive mixing approach, where each neuron has access to a limited set of inputs from the previous layer, but sources are chosen such that neurons in successive layers have access to progressively more network input. Previous efforts have shown success with subsets of the elements we bring together here. Backpropagation has been used to train networks with spiking neurons but with high-precision weights [9][10][11][12], and the converse, networks with trinary synapses but with continuous output neurons [13]. Other probabilistic backpropagation approaches have been demonstrated for networks with binary neurons and binary or trinary synapses but full inter-layer connectivity [14][15]. The work presented here is novel in that i) we demonstrate for the first time an offline training methodology using backpropagation to create a network that employs spiking neurons, synapses requiring less bits of precision than even trinary weights, and constrained connectivity, ii) we achieve the best accuracy to date on MNIST (99.42%) when compared to networks that use spiking neurons, even with high precision synapses (99.12%) [12], as well as networks that use binary synapses and neurons (97.88%) [15], and iii) we demonstrate the network running in real-time on the TrueNorth chip [7], achieving by far the best published power efficiency for digit recognition (4 µJ per classification at 95% accuracy running 1000 images per second) compared to other low power approaches (6 mJ per classification at 95% accuracy running 50 images per second) [16]. 2 Deployment Hardware We use the TrueNorth neurosynaptic chip [7] as our example deployment system, though the approach here could be generalized to other neuromorphic hardware [4][5][6]. The TrueNorth chip consists of 4096 cores, with each core containing 256 axons (inputs), a 256 × 256 synapse crossbar, and 256 spiking neurons. Information flows via spikes from a neuron to one axon between any two cores, and from the axon to potentially all neurons on the core, gated by binary synapses in the crossbar. Neurons can be considered to take on a variety of dynamics [17], including those described below. Each axon is assigned 1 of 4 axon types, which is used as an index into a lookup table of s-values, unique to each neuron, that provides a signed 9-bit integer synaptic strength to the corresponding synapse. This approach requires only 1 bit per synapse for the on/off state and an additional 0.15 bits per synapse for the lookup table scheme. 3 Network Training In our approach, we employ two types of multilayer networks. The deployment network runs on a platform supporting spiking neurons, discrete synapses with low precision, and limited connectivity. 2 The training network is used to learn binary synaptic connectivity states and biases. This network shares the same topology as the deployment network, but represents input data, neuron outputs, and synaptic connections using continuous values constrained to the range [0, 1] (an overview is provided in Figure 1 and Table 1). These values correspond to probabilities of a spike occurring or of a synapse being “on”, providing a means of mapping the training network to the deployment network, while providing a continuous and differentiable space for backpropagation. Below, we describe the deployment network, our training methodology, and our procedure for mapping the training network to the deployment network. 3.1 Deployment network 1 -1 Synapse strength .9 .7 .2 .2 .5 .7 .7 Deployment Training Spikes Connected synapses Spike probabilities Synaptic connection probabilities Input Input Neuron Neuron Figure 1: Diagram showing input, synapses, and output for one neuron in the deployment and training network. For simplicity, only three synapses are depicted. Our deployment network follows a feedforward methodology where neurons are sequentially updated from the first to the last layer. Input to the network is represented using stochastically generated spikes, where the value of each input unit is 0 or 1 with some probability. We write this as P(xi = 1) ≡˜xi, where xi is the spike state of input unit i and ˜xi is a continuous value in the range [0, 1] derived by re-scaling the input data (pixels). This scheme allows representation of data using binary spikes, while preserving data precision in the expectation. Summed neuron input is computed as Ij = X i xicijsij + bj, (1) where j is the target neuron index, cij is a binary indicator variable representing whether a synapse is on, sij is the synaptic strength, and bj is the bias term. This is identical to common practice in neural networks, except that we have factored the synaptic weight into cij and sij, such that we can focus our learning efforts on the former for reasons described below. The neuron activation function follows a history-free thresholding equation nj = 1 if Ij > 0, 0 otherwise. These dynamics are implemented in TrueNorth by setting each neuron’s leak equal to the learned bias term (dropping any fractional portion), its threshold to 0, its membrane potential floor to 0, and setting its synapse parameters using the scheme described below. We represent each class label using multiple output neurons in the last layer of the network, which we found improves prediction performance. The network prediction for a class is simply the average of the output of all neurons assigned to that class. Table 1: Network components Deployment Network Training Network Variable Values Correspondance Variable Values Network input x {0, 1} P(x = 1) ≡˜x ˜x [0, 1] Synaptic connection c {0, 1} P(c = 1) ≡˜c ˜c [0, 1] Synaptic strength s {−1, 1} s ≡s s {−1, 1} Neuron output n {0, 1} P(n = 1) ≡˜n ˜n [0, 1] 3 3.2 Training network Training follows the backpropagation methodology by iteratively i) running a forward pass from the first layer to the last layer, ii) comparing the network output to desired output using a loss function, iii) propagating the loss backwards through the network to determine the loss gradient at each synapse and bias term, and iv) using this gradient to update the network parameters. The training network forward pass is a probabilistic representation of the deployment network forward pass. Synaptic connections are represented as probabilities using ˜cij, where P(cij = 1) ≡˜cij, while synaptic strength is represented using sij as in the deployment network. It is assumed that sij can be drawn from a limited set of values and we consider the additional constraint that it is set in “blocks” such that multiple synapses share the same value, as done in TrueNorth for efficiency. While it is conceivable to learn optimal values for sij under such conditions, this requires stepwise changes between allowed values and optimization that is not local to each synapse. We take a simpler approach here, which is to learn biases and synapse connection probabilities, and to intelligently fix the synapse strengths using an approach described in the Network Initialization section. Input to the training network is represented using ˜xi, which is the probability of an input spike occurring in the deployment network. For neurons, we note that Equation 1 is a summation of weighted Bernoulli variables plus a bias term. If we assume independence of these inputs and have sufficient numbers, then we can approximate the probability distribution of this summation as a Gaussian with mean µj = bj + X i ˜xi˜cijsij and variance σ2 j = X i ˜xi˜cij(1 −˜xi˜cij)s2 ij. (2) We can then derive the probability of such a neuron firing using the complementary cumulative distribution function of a Gaussian: ˜nj = 1 −1 2 1 + erf θ −µj q 2σ2 j , (3) where erf is the error function, θ = 0 and P(nj = 1) ≡˜nj. For layers after the first, ˜xi is replaced by the input from the previous layer, ˜ni, which represents the probability that a neuron produces a spike. A variety of loss functions are suitable for our approach, but we found that training converged the fastest when using log loss, E = − X k [yk log(pk) + (1 −yk) log(1 −pk)] , where for each class k, yk is a binary class label that is 1 if the class is present and 0 otherwise, and pk is the probability that the the average spike count for the class is greater than 0.5. Conveniently, we can use the Gaussian approximation in Equation 3 for this, with θ = 0.5 and the mean and variance terms set by the averaging process. The training network backward pass is an adaptation of backpropagation using the neuron and synapse equations above. To get the gradient at each synapse, we use the chain rule to compute ∂E ∂˜cij = ∂E ∂˜nj ∂˜nj ∂˜cij . For the bias, a similar computation is made by replacing ˜cij in the above equation with bj. We can then differentiate Equation 3 to produce ∂˜nj ∂˜cij = ˜xisij σj √ 2π e − (θ−µj )2 2σ2 j −(θ −µj) ˜xis2 ij −˜x2 i ˜cijs2 ij σ3 j √ 2π e − (θ−µj )2 2σ2 j . (4) 4 As described below, we will assume that the synapse strengths to each neuron are balanced between positive and negative values and that each neuron receives 256 inputs, so we can expect µ to be close to zero, and µ, ˜ni and ˜cij to be much less than σ. Therefore, the right term of Equation 4 containing the denominator σ3 j , can be expected to be much smaller than the left term containing the denominator σj. Under these conditions, for computational efficiency we can approximate Equation 4 by dropping the right term and factoring out the remainder as ∂˜nj ∂˜cij ≈∂˜nj ∂µj ∂µj ∂˜cij , where ∂˜nj ∂µj = 1 σj √ 2π e − (θ−µj )2 2σ2 j , and ∂µj ∂˜cij = ˜xisij. A similar treatment can be used to show that corresponding gradient with respect to the bias term equals one. The network is updated using the loss gradient at each synapse and bias term. For each iteration, synaptic connection probability changes according to ∆˜cij = −α ∂E ∂˜cij , where α is the learning rate. Any synaptic connection probabilities that fall outside of the range [0, 1] as a result of the update rule are “snapped” to the nearest valid value. Changes to the bias term are handled in a similar fashion, with values clipped to fall in the range [−255, 255], the largest values supported using TrueNorth neuron parameters. The training procedure described here is amenable to methods and heuristics applied in standard backpropagation. For the results shown below, we used mini batch size 100, momentum 0.9, dropout 0.5 [18], learning rate decay on a fixed schedule across training iterations starting at 0.1 and multiplying by 0.1 every 250 epochs, and transformations of the training data for each iteration with rotation up to ±15◦, shift up to ±5 pixels and rescale up to ±15%. 3.3 Mapping training network to deployment network Training is performed offline, and the resulting network is mapped to the deployment network for hardware operation. For deployment, depending on system requirements, we can utilize an ensemble of one or more samplings of the training network to increase overall output performance. Unlike other ensemble methods, we train only once then sample the training network for each member. The system output for each class is determined by averaging across all neurons in all member networks assigned to the class. Synaptic connection states are set on or off according to P(cij = 1) ≡ ˜cij, using independent random number draws for each synapse in each ensemble member. Data is converted into a spiking representation for input using P(xi = 1) ≡˜xi, using independent random number draws for each input to each member of the ensemble. 3.4 Network initialization The approach for network initialization described here allows us to optimize for efficient neuromorphic hardware that employs less than 2 bits per synapse. In our approach, each synaptic connection probability is initialized from a uniform random distribution over the range [0, 1]. To initialize synapse strength values, we begin from the principle that each core should maximize information transfer by maximizing information per neuron and minimizing redundancy between neurons. Such methods have been explored in detail in approaches such as infomax [19]. While the first of these goals is data dependent, we can pursue the second at initialization time by tuning the space of possible weights for a core, represented by the matrix of synapse strength values, S. 5 Axons 1-64 Type 1 Axons 65-128 Type 2 Axons 129-192 Type 3 Axons 193-256 Type 4 Neurons 1-11 Neurons 12-22 Neurons 246-256 1 -1 Synapse strength ... Figure 2: Synapse strength values depicted as axons (rows) × neurons (columns) array. The learning procedure fixes these values when the network is initialized and learns the probability that each synapse is in a transmitting state. The blocky appearance of the strength matrix is the result of the shared synaptic strength approach used by TrueNorth to reduce memory footprint. In our approach, we wish to minimize redundancy between neurons on a core by attempting to induce a product distribution on the outputs for every pair of neurons. To simplify the problem, we note that the summed weighted inputs to a pair of neurons is wellapproximated by a bi-variate Gaussian distribution. Thus, forcing the covariance between the summed weighted inputs to zero guarantees that the inputs are independent. Furthermore, since functions of pairwise independent random variables remain pair-wise independent, the neuron outputs are guaranteed to be independent. The summed weighted input to j-th neuron is given by Equation 1. It is desirable for the purposes of maintaining balance in neuron dynamics to configure its weights using a mix of positive and negative values that sum to zero. Thus for all j, X i sij = 0, (5) which implies that E[Ij] ≈0 assuming inputs and synaptic connection states are both decorrelated and the bias term is near 0. This simplifies the covariance between the inputs to any two neurons on a core to E[IjIr] = E X i,q xicijsijxqcqrsqr . Rearranging terms, we get E[IjIr] = X i cijsijcqrsqrE[x2 i ] + X i cijsij X q̸=i cqrsqrE[xixq]. (6) Next, we note from the equation for covariance that E[xixq] = σ(xi, xq) + E[xi]E[xq]. Under the assumption that inputs have equal mean and variance, then for any i, E[x2 i ] = ρ, where ρ = σ(xi, xq) + E[xi]E[xq] is a constant. Further assuming that covariance between xi and xq where i ̸= q is the same for all inputs, then E[xixq] = γ, where γ = σ(xi, xq) + E[xi]E[xq] is a constant. Using this and equation (5), Equation 6 becomes E[IjIr] = ρ ⟨cjsj, crsr⟩+ γ X i cijsij(−cirsir) = ρ ⟨cjsj, crsr⟩−γ ⟨cjsj, crsr⟩ = (ρ −γ) ⟨cjsj, crsr⟩. So minimizing the absolute value of the inner product between columns of W forces Ij and Ir to be maximally uncorrelated under the constraints. Inspired by this observation, we apriori (i.e., without any knowledge of the input data) choose the strength values such that the absolute value of the inner product between columns of the effective weight matrix is minimized, and the sum of effective weights to each neuron is zero. Practically, this is achieved by assigning half of each neuron’s s-values to −1 and the other half to 1, balancing the possible permutations of such assignments so they occur as equally as possible across neurons on a core, and evenly distributing the four possible axon types amongst the axons on a core. The resulting matrix of synaptic strength values can be seen in Figure 2. This configuration thus provides an optimal weight subspace, given the constraints, in which backpropagation can operate in a datadriven fashion to find desirable synaptic on/off states. 6 1 cm 16 3 input 16 12 input 5 Core Network 30 Core Network one core (256 neurons) input window layer stride 256 neurons A B C Figure 3: A) Two network configurations used for the results described here, a 5 core network designed to minimize core count and a 30 core network designed to maximize accuracy. B) Board with a socketed TrueNorth chip used to run the deployment networks. The chip is 4.3 cm2, runs in real time (1 ms neuron updates), and consumes 63 mW running a benchmark network that uses all of its 1 million neuron [7]. C) Measured accuracy and measured energy for the two network configurations running on the chip. Ensemble size is shown to the right of each data point. 4 Network topology The network topology is designed to support neurons with responses to local, regional or global features while respecting the “core-to-core” connectivity of the TrueNorth architecture – namely that all neurons on a core share access to the same set of inputs, and that the number of such inputs is limited. The network uses a multilayer feedforward scheme, where the first layer consists of input elements in a rows × columns × channels array, such as an image, and the remaining layers consist of TrueNorth cores. Connections between layers are made using a sliding window approach. Input to each core in a layer is drawn from an R × R × F input window (Figure 3A), where R represents the row and column dimensions, and F represents the feature dimension. For input from the first layer, rows and columns are in units of input elements and features are input channels, while for input from the remaining layers rows and columns are in units of cores and features are neurons. The first core in a given target layer locates its input window in the upper left corner of its source layer, and the next core in the target layer shifts its input window to the right by a stride of S. Successive cores slide the window over by S until the edge of the source layer is reached, then the window is returned to the left, and shifted down by S and the process is repeated. Features are sub-selected randomly, with the constraint that each neuron can only be selected by one target core. We allow input elements to be selected multiple times. This scheme is similar in some respects to that used by a convolution network, but we employ independent synapses for each location. The specific networks employed here, and associated parameters, are shown in Figure 3A. 5 Results We applied the training method described above to the MNIST dataset [20], examining accuracy vs. energy tradeoffs using two networks running on the TrueNorth chip (Figure 3B). The first network is the smallest multilayer TrueNorth network possible for the number of pixels present in the dataset, consisting of 5 cores distributed in 2 layers, corresponding to 512 neurons. The second network was built with a primary goal of maximizing accuracy, and is composed of 30 cores distributed in 4 layers (Figure 3A), corresponding to 3840 neurons. Networks are configured with a first layer using R = 16 and F = 1 in both networks, and S = 12 in the 5 core network and S = 4 in the 30 core network, while all subsequent layers in both networks use R = 2, F = 64, and S = 1. These parameters result in a ”pyramid” shape, where all cores from layer 2 to the final layer draw input 7 from 4 source cores and 64 neurons in each of those sources. Each core employs 64 neurons per core it targets, up to a maximum of 256 neurons. We tested each network in an ensemble of 1, 4, 16, or 64 members running on a TrueNorth chip in real-time. Each image was encoded using a single time step (1 ms), with a different spike sampling used for each input line targeted by a pixel. The instrumentation available measures active power for the network in operation and leakage power for the entire chip, which consists of 4096 cores. We report energy numbers as active power plus the fraction of leakage power for the cores in use. The highest overall performance we observed of 99.42% was achieved with a 30 core trained network using a 64 member ensemble, for a total of 1920 cores, that was measured using 108 µJ per classification. The lowest energy was achieved by the 5 core network operating in an ensemble of 1, that was measured using 0.268 µJ per classification while achieving 92.70% accuracy. Results are plotted showing accuracy vs. energy in Figure 3C. Both networks classified 1000 images per second. 6 Discussion Our results show that backpropagation operating in a probabilistic domain can be used to train networks that naturally map to neuromorphic hardware with spiking neurons and extremely lowprecision synapses. Our approach can be succinctly summarized as constrain-then-train, where we first constrain our network to provide a direct representation of our deployment system and then train within those constraints. This can be contrasted with a train-then-constrain approach, where a network agnostic to the final deployment system is first trained, and following training is constrained through normalization and discretization methods to provide a spiking representation or low precision weights. While requiring a customized training rule, the constrain-then-train approach offers the advantage that a decrease in training error has a direct correspondence to a decrease in error for the deployment network. Conversely, the train-then-constrain approach allows use of off the shelf training methods, but unconstrained training is not guaranteed to produce a reduction in error after hardware constraints are applied. Looking forward, we see several avenues for expanding this approach to more complex datasets. First, deep convolution networks [20] have seen a great deal of success by using backpropagation to learn the weights of convolutional filters. The learning method introduced here is independent of the specific network structure beyond the given sparsity constraint, and could certainly be adapted for use in convolution networks. Second, biology provides a number of examples, such as the retina or cochlea, for mapping high-precision sensory data into a binary spiking representation. Drawing inspiration from such approaches may improve performance beyond the linear mapping scheme used in this work. Third, this approach may also be adaptable to other gradient based learning methods, or to methods with existing probabilistic components such as contrastive divergence [21]. Further, while we describe the use of this approach with TrueNorth to provide a concrete use case, we see no reason why this training approach cannot be used with other spiking neuromorphic hardware [4][5][6]. We believe this work is particularly timely, as in recent years backpropagation has achieved a high level of performance on a number tasks reflecting real world tasks, including object detection in complex scenes [1], pedestrian detection [2], and speech recognition [3]. A wide range of sensors are found in mobile devices ranging from phones to automobiles, and platforms like TrueNorth provide a low power substrate for processing that sensory data. By bridging backpropagation and energy efficient neuromorphic computing, we hope that the work here provides an important step towards building low-power, scalable brain-inspired systems with real world applicability. Acknowledgments This research was sponsored by the Defense Advanced Research Projects Agency under contracts No. HR0011- 09-C-0002 and No. FA9453-15-C-0055. The views, opinions, and/or findings contained in this paper are those of the authors and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. 8 References [1] 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,” International Journal of Computer Vision, 2015. [2] W. Ouyang and X. Wang, “Joint deep learning for pedestrian detection,” in International Conference on Computer Vision, pp. 2056–2063, 2013. [3] A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenger, S. Satheesh, S. Sengupta, A. Coates, et al., “Deepspeech: Scaling up end-to-end speech recognition,” arXiv preprint arXiv:1412.5567, 2014. [4] B. Benjamin, P. Gao, E. McQuinn, S. Choudhary, A. Chandrasekaran, J.-M. Bussat, R. Alvarez-Icaza, J. Arthur, P. Merolla, and K. Boahen, “Neurogrid: A mixed-analog-digital multichip system for largescale neural simulations,” Proceedings of the IEEE, vol. 102, no. 5, pp. 699–716, 2014. [5] E. Painkras, L. Plana, J. Garside, S. Temple, F. Galluppi, C. Patterson, D. Lester, A. Brown, and S. Furber, “SpiNNaker: A 1-W 18-core system-on-chip for massively-parallel neural network simulation,” IEEE Journal of Solid-State Circuits, vol. 48, no. 8, pp. 1943–1953, 2013. [6] T. Pfeil, A. Gr¨ubl, S. Jeltsch, E. M¨uller, P. M¨uller, M. A. Petrovici, M. Schmuker, D. Br¨uderle, J. Schemmel, and K. Meier, “Six networks on a universal neuromorphic computing substrate,” Frontiers in neuroscience, vol. 7, 2013. [7] P. A. Merolla, J. V. Arthur, R. Alvarez-Icaza, A. S. Cassidy, J. Sawada, F. Akopyan, B. L. Jackson, N. Imam, C. Guo, Y. Nakamura, et al., “A million spiking-neuron integrated circuit with a scalable communication network and interface,” Science, vol. 345, no. 6197, pp. 668–673, 2014. [8] D. Rumelhart, G. Hinton, and R. Williams, “Learning representations by back-propagating errors,” Nature, vol. 323, no. 6088, pp. 533–536, 1986. [9] P. Moerland and E. Fiesler, “Neural network adaptations to hardware implementations,” in Handbook of neural computation (E. Fiesler and R. Beale, eds.), New York: Institute of Physics Publishing and Oxford University Publishing, 1997. [10] E. Fiesler, A. Choudry, and H. J. Caulfield, “Weight discretization paradigm for optical neural networks,” in The Hague’90, 12-16 April, pp. 164–173, International Society for Optics and Photonics, 1990. [11] Y. Cao, Y. Chen, and D. Khosla, “Spiking deep convolutional neural networks for energy-efficient object recognition,” International Journal of Computer Vision, vol. 113, no. 1, pp. 54–66, 2015. [12] P. U. Diehl, D. Neil, J. Binas, M. Cook, S.-C. Liu, and M. Pfeiffer, “Fast-classifying, high-accuracy spiking deep networks through weight and threshold balancing,” in International Joint Conference on Neural Networks, 2015, in press. [13] L. K. Muller and G. Indiveri, “Rounding methods for neural networks with low resolution synaptic weights,” arXiv preprint arXiv:1504.05767, 2015. [14] J. Zhao, J. Shawe-Taylor, and M. van Daalen, “Learning in stochastic bit stream neural networks,” Neural Networks, vol. 9, no. 6, pp. 991 – 998, 1996. [15] Z. Cheng, D. Soudry, Z. Mao, and Z. Lan, “Training binary multilayer neural networks for image classification using expectation backpropgation,” arXiv preprint arXiv:1503.03562, 2015. [16] E. Stromatias, D. Neil, F. Galluppi, M. Pfeiffer, S. Liu, and S. Furber, “Scalable energy-efficient, lowlatency implementations of spiking deep belief networks on spinnaker,” in International Joint Conference on Neural Networks, IEEE, 2015, in press. [17] A. S. Cassidy, P. Merolla, J. V. Arthur, S. Esser, B. Jackson, R. Alvarez-Icaza, P. Datta, J. Sawada, T. M. Wong, V. Feldman, A. Amir, D. Rubin, F. Akopyan, E. McQuinn, W. Risk, and D. S. Modha, “Cognitive computing building block: A versatile and efficient digital neuron model for neurosynaptic cores,” in International Joint Conference on Neural Networks, 2013. [18] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov, “Improving neural networks by preventing co-adaptation of feature detectors,” arXiv preprint arXiv:1207.0580, 2012. [19] A. J. Bell and T. J. Sejnowski, “An information-maximization approach to blind separation and blind deconvolution,” Neural computation, vol. 7, no. 6, pp. 1129–1159, 1995. [20] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [21] G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, vol. 313, no. 5786, pp. 504–507, 2006. 9 | 2015 | 31 |
5,825 | Convergence Rates of Active Learning for Maximum Likelihood Estimation Kamalika Chaudhuri ⇤ Sham M. Kakade † Praneeth Netrapalli ‡ Sujay Sanghavi § Abstract An active learner is given a class of models, a large set of unlabeled examples, and the ability to interactively query labels of a subset of these examples; the goal of the learner is to learn a model in the class that fits the data well. Previous theoretical work has rigorously characterized label complexity of active learning, but most of this work has focused on the PAC or the agnostic PAC model. In this paper, we shift our attention to a more general setting – maximum likelihood estimation. Provided certain conditions hold on the model class, we provide a two-stage active learning algorithm for this problem. The conditions we require are fairly general, and cover the widely popular class of Generalized Linear Models, which in turn, include models for binary and multi-class classification, regression, and conditional random fields. We provide an upper bound on the label requirement of our algorithm, and a lower bound that matches it up to lower order terms. Our analysis shows that unlike binary classification in the realizable case, just a single extra round of interaction is sufficient to achieve near-optimal performance in maximum likelihood estimation. On the empirical side, the recent work in [12] and [13] (on active linear and logistic regression) shows the promise of this approach. 1 Introduction In active learning, we are given a sample space X, a label space Y, a class of models that map X to Y, and a large set U of unlabelled samples. The goal of the learner is to learn a model in the class with small target error while interactively querying the labels of as few of the unlabelled samples as possible. Most theoretical work on active learning has focussed on the PAC or the agnostic PAC model, where the goal is to learn binary classifiers that belong to a particular hypothesis class [2, 14, 10, 7, 3, 4, 22], and there has been only a handful of exceptions [19, 9, 20]. In this paper, we shift our attention to a more general setting – maximum likelihood estimation (MLE), where Pr(Y |X) is described by a model ✓belonging to a model class ⇥. We show that when data is generated by a model in this class, we can do active learning provided the model class ⇥has the following simple property: the Fisher information matrix for any model ✓2 ⇥at any (x, y) depends only on x and ✓. This condition is satisfied in a number of widely applicable model classes, such as Linear Regression and Generalized Linear Models (GLMs), which in turn includes models for Multiclass Classification and Conditional Random Fields. Consequently, we can provide active learning algorithms for maximum likelihood estimation in all these model classes. The standard solution to active MLE estimation in the statistics literature is to select samples for label query by optimizing a class of summary statistics of the asymptotic covariance matrix of the ⇤Dept. of CS, University of California at San Diego. Email: kamalika@cs.ucsd.edu †Dept. of CS and of Statistics, University of Washington. Email: sham@cs.washington.edu ‡Microsoft Research New England. Email:praneeth@microsoft.com §Dept. of ECE, The University of Texas at Austin. Email:sanghavi@mail.utexas.edu 1 estimator [6]. The literature, however, does not provide any guidance towards which summary statistic should be used, or any analysis of the solution quality when a finite number of labels or samples are available. There has also been some recent work in the machine learning community [12, 13, 19] on this problem; but these works focus on simple special cases (such as linear regression [19, 12] or logistic regression [13]), and only [19] involves a consistency and finite sample analysis. In this work, we consider the problem in its full generality, with the goal of minimizing the expected log-likelihood error over the unlabelled data. We provide a two-stage active learning algorithm for this problem. In the first stage, our algorithm queries the labels of a small number of random samples from the data distribution in order to construct a crude estimate ✓1 of the optimal parameter ✓⇤. In the second stage, we select a set of samples for label query by optimizing a summary statistic of the covariance matrix of the estimator at ✓1; however, unlike the experimental design work, our choice of statistic is directly motivated by our goal of minimizing the expected log-likelihood error, which guides us towards the right objective. We provide a finite sample analysis of our algorithm when some regularity conditions hold and when the negative log likelihood function is convex. Our analysis is still fairly general, and applies to Generalized Linear Models, for example. We match our upper bound with a corresponding lower bound, which shows that the convergence rate of our algorithm is optimal (except for lower order terms); the finite sample convergence rate of any algorithm that uses (perhaps multiple rounds of) sample selection and maximum likelihood estimation is either the same or higher than that of our algorithm. This implies that unlike what is observed in learning binary classifiers, a single round of interaction is sufficient to achieve near-optimal log likelihood error for ML estimation. 1.1 Related Work Previous theoretical work on active learning has focussed on learning a classifier belonging to a hypothesis class H in the PAC model. Both the realizable and non-realizable cases have been considered. In the realizable case, a line of work [7, 18] has looked at a generalization of binary search; while their algorithms enjoy low label complexity, this style of algorithms is inconsistent in the presence of noise. The two main styles of algorithms for the non-realizable case are disagreementbased active learning [2, 10, 4], and margin or confidence-based active learning [3, 22]. While active learning in the realizable case has been shown to achieve an exponential improvement in label complexity over passive learning [2, 7, 14], in the agnostic case, the gains are more modest (sometimes a constant factor) [14, 10, 8]. Moreover, lower bounds [15] show that the label requirement of any agnostic active learning algorithm is always at least ⌦(⌫2/✏2), where ⌫is the error of the best hypothesis in the class, and ✏is the target error. In contrast, our setting is much more general than binary classification, and includes regression, multi-class classification and certain kinds of conditional random fields that are not covered by previous work. [19] provides an active learning algorithm for linear regression problem under model mismatch. Their algorithm attempts to learn the location of the mismatch by fitting increasingly refined partitions of the domain, and then uses this information to reweight the examples. If the partition is highly refined, then the computational complexity of the resulting algorithm may be exponential in the dimension of the data domain. In contrast, our algorithm applies to a more general setting, and while we do not address model mismatch, our algorithm has polynomial time complexity. [1] provides an active learning algorithm for Generalized Linear Models in an online selective sampling setting; however, unlike ours, their input is a stream of unlabelled examples, and at each step, they need to decide whether the label of the current example should be queried. Our work is also related to the classical statistical work on optimal experiment design, which mostly considers maximum likelihood estimation [6]. For uni-variate estimation, they suggest selecting samples to maximize the Fisher information which corresponds to minimizing the variance of the regression coefficient. When ✓is multi-variate, the Fisher information is a matrix; in this case, there are multiple notions of optimal design which correspond to maximizing different parameters of the Fisher information matrix. For example, D-optimality maximizes the determinant, and A-optimality maximizes the trace of the Fisher information. In contrast with this work, we directly optimize the expected log-likelihood over the unlabelled data which guides us to the appropriate objective function; moreover, we provide consistency and finite sample guarantees. 2 Finally, on the empirical side, [13] and [12] derive algorithms similar to ours for logistic and linear regression based on projected gradient descent. Notably, these works provide promising empirical evidence for this approach to active learning; however, no consistency guarantees or convergence rates are provided (the rates presented in these works are not stated in terms of the sample size). In contrast, our algorithm applies more generally, and we provide consistency guarantees and convergence rates. Moreover, unlike [13], our logistic regression algorithm uses a single extra round of interaction, and our results illustrate that a single round is sufficient to achieve a convergence rate that is optimal except for lower order terms. 2 The Model We begin with some notation. We are given a pool U = {x1, . . . , xn} of n unlabelled examples drawn from some instance space X, and the ability to interactively query labels belonging to a label space Y of m of these examples. In addition, we are given a family of models M = {p(y|x, ✓), ✓2 ⇥} parameterized by ✓2 ⇥✓Rd. We assume that there exists an unknown parameter ✓⇤2 ⇥such that querying the label of an xi 2 U generates a yi drawn from the distribution p(y|xi, ✓⇤). We also abuse notation and use U to denote the uniform distribution over the examples in U. We consider the fixed-design (or transductive) setting, where our goal is to minimize the error on the fixed set of points U. For any x 2 X, y 2 Y and ✓2 ⇥, we define the negative log-likelihood function L(y|x, ✓) as: L(y|x, ✓) = −log p(y|x, ✓) Our goal is to find a ˆ✓to minimize LU(ˆ✓), where LU(✓) = EX⇠U,Y ⇠p(Y |X,✓⇤)[L(Y |X, ✓)] by interactively querying labels for a subset of U of size m, where we allow label queries with replacement i.e., the label of an example may be queried multiple times. An additional quantity of interest to us is the Fisher information matrix, or the Hessian of the negative log-likelihood L(y|x, ✓) function, which determines the convergence rate. For our active learning procedure to work correctly, we require the following condition. Condition 1. For any x 2 X, y 2 Y, ✓2 ⇥, the Fisher information @2L(y|x,✓) @✓2 is a function of only x and ✓(and does not depend on y.) Condition 1 is satisfied by a number of models of practical interest; examples include linear regression and generalized linear models. Section 5.1 provides a brief derivation of Condition 1 for generalized linear models. For any x, y and ✓, we use I(x, ✓) to denote the Hessian @2L(y|x,✓) @✓2 ; observe that by Assumption 1, this is just a function of x and ✓. Let Γ be any distribution over the unlabelled samples in U; for any ✓2 ⇥, we use: IΓ(✓) = EX⇠Γ[I(X, ✓)] 3 Algorithm The main idea behind our algorithm is to sample xi from a well-designed distribution Γ over U, query the labels of these samples and perform ML estimation over them. To ensure good performance, Γ should be chosen carefully, and our choice of Γ is motivated by Lemma 1. Suppose the labels yi are generated according to: yi ⇠p(y|xi, ✓⇤). Lemma 1 states that the expected loglikelihood error of the ML estimate with respect to m samples from Γ in this case is essentially Tr ! IΓ(✓⇤)−1IU(✓⇤) " /m. This suggests selecting Γ as the distribution Γ⇤that minimizes Tr ! IΓ⇤(✓⇤)−1IU(✓⇤) " . Unfortunately, we cannot do this as ✓⇤is unknown. We resolve this problem through a two stage algorithm; in the first stage, we use a small number m1 of samples to construct a coarse estimate ✓1 of ✓⇤(Steps 1-2). In the second stage, we calculate a distribution Γ1 which minimizes Tr ! IΓ1(✓1)−1IU(✓1) " and draw samples from (a slight modification of) this distribution for a finer estimation of ✓⇤(Steps 3-5). 3 Algorithm 1 ActiveSetSelect Input: Samples xi, for i = 1, · · · , n 1: Draw m1 samples u.a.r from U, and query their labels to get S1. 2: Use S1 to solve the MLE problem: ✓1 = argmin✓2⇥ X (xi,yi)2S1 L(yi|xi, ✓) 3: Solve the following SDP (refer Lemma 3): a⇤= argminaTr ! S−1IU(✓1) " s.t. ( S = P i aiI(xi, ✓1) 0 ai 1 P i ai = m2 4: Draw m2 examples using probability Γ = ↵Γ1 +(1−↵)U where the distribution Γ1 = a⇤ i m2 and ↵= 1 −m−1/6 2 . Query their labels to get S2. 5: Use S2 to solve the MLE problem: ✓2 = argmin✓2⇥ X (xi,yi)2S2 L(yi|xi, ✓) Output: ✓2 The distribution Γ1 is modified slightly to ¯Γ (in Step 4) to ensure that I¯Γ(✓⇤) is well conditioned with respect to IU(✓⇤). The algorithm is formally presented in Algorithm 1. Finally, note that Steps 1-2 are necessary because IU and IΓ are functions of ✓. In certain special cases such as linear regression, IU and IΓ are independent of ✓. In those cases, Steps 1-2 are unnecessary, and we may skip directly to Step 3. 4 Performance Guarantees The following regularity conditions are essentially a quantified version of the standard Local Asymptotic Normality (LAN) conditions for studying maximum likelihood estimation (see [5, 21]). Assumption 1. (Regularity conditions for LAN) 1. Smoothness: The first three derivatives of L(y|x, ✓) exist in all interior points of ⇥✓Rd. 2. Compactness: ⇥is compact and ✓⇤is an interior point of ⇥. 3. Strong Convexity: IU(✓⇤) = 1 n Pn i=1 I (xi, ✓⇤) is positive definite with smallest singular value σmin > 0. 4. Lipschitz continuity: There exists a neighborhood B of ✓⇤and a constant L3 such that for all x 2 U, I(x, ✓) is L3-Lipschitz in this neighborhood. &&&IU(✓⇤)−1/2 (I (x, ✓) −I (x, ✓0)) IU(✓⇤)−1/2&&& 2 L3 k✓−✓0kIU (✓⇤) , for every ✓, ✓0 2 B. 5. Concentration at ✓⇤: For any x 2 U and y, we have (with probability one), krL(y|x, ✓⇤)kIU(✓⇤)−1 L1, and &&&IU(✓⇤)−1/2I (x, ✓⇤) IU(✓⇤)−1/2&&& 2 L2. 6. Boundedness: max(x,y) sup✓2⇥|L(x, y|✓)| R. In addition to the above, we need one extra condition which is essentially a pointwise self concordance. This condition is satisfied by a vast class of models, including the generalized linear models. 4 Assumption 2. Point-wise self concordance: −L4 k✓−✓⇤k2 I (x, ✓⇤) ⪯I (x, ✓) −I (x, ✓⇤) ⪯L4 k✓−✓⇤k2 I (x, ✓⇤) . Definition 1. [Optimal Sampling Distribution Γ⇤] We define the optimal sampling distribution Γ⇤ over the points in U as the distribution Γ⇤= (γ⇤ 1, . . . , γ⇤ n) for which γ⇤ i ≥0, P i γ⇤ i = 1, and Tr ! IΓ⇤(✓⇤)−1IU(✓⇤) " is as small as possible. Definition 1 is motivated by Lemma 1, which indicates that under some mild regularity conditions, a ML estimate calculated on samples drawn from Γ⇤will provide the best convergence rates (including the right constant factor) for the expected log-likelihood error. We now present the main result of our paper. The proof of the following theorem and all the supporting lemmas will be presented in Appendix A. Theorem 1. Suppose the regularity conditions in Assumptions 1 and 2 hold. Let β ≥ 10, and the number of samples used in step (1) be m1 > O ✓ max ✓ L2 log2 d, L2 1 ⇣ L2 3 + 1 σmin ⌘ log2 d, diameter(⇥) Tr(IU(✓⇤)−1), β2L2 4 δ Tr ⇣ IU(✓⇤)−1⌘◆◆ . Then with probability ≥1 −δ, the expected log likelihood error of the estimate ✓2 of Algorithm 1 is bounded as: E [LU(✓2)] −LU(✓⇤) ✓ 1 + 2 β −1 ◆4 (1 + e✏m2)Tr ⇣ IΓ⇤(✓⇤)−1IU(✓⇤) ⌘1 m2 + R m2 2 , (1) where Γ⇤ is the optimal sampling distribution in Definition 1 and e✏m2 = O ✓! L1L3 + pL2 " plog dm2 m1/6 2 ◆ . Moreover, for any sampling distribution Γ satisfying IΓ(✓⇤) ⌫cIU(✓⇤) and label constraint of m2, we have the following lower bound on the expected log likelihood error for ML estimate: E h LU(b✓Γ) i −LU(✓⇤) ≥(1 −✏m2) Tr ⇣ IΓ(✓⇤)−1IU(✓⇤) ⌘1 m2 −L2 1 cm2 2 , (2) where ✏m2 def = e✏m2 c2m1/3 2 . Remark 1. (Restricting to Maximum Likelihood Estimation) Our restriction to maximum likelihood estimators is minor, as this is close to minimax optimal (see [16]). Minor improvements with certain kinds of estimators, such as the James-Stein estimator, are possible. 4.1 Discussions Several remarks about Theorem 1 are in order. The high probability bound in Theorem 1 is with respect to the samples drawn in S1; provided these samples are representative (which happens with probability ≥1 −δ), the output ✓2 of Algorithm 1 will satisfy (1). Additionally, Theorem 1 assumes that the labels are sampled with replacement; in other words, we can query the label of a point xi multiple times. Removing this assumption is an avenue for future work. Second, the highest order term in both (1) and (2) is Tr ⇣ IΓ⇤(✓⇤)−1IU(✓⇤) ⌘ /m. The terms involving ✏m2 and e✏m2 are lower order as both ✏m2 and e✏m2 are o(1). Moreover, if β = !(1), then the term involving β in (1) is of a lower order as well. Observe that β also measures the tradeoff between m1 and m2, and as long as β = o(pm2), m1 is also of a lower order than m2. Thus, provided β is !(1) and o(pm2), the convergence rate of our algorithm is optimal except for lower order terms. Finally, the lower bound (2) applies to distributions Γ for which IΓ(✓⇤) ≥cIU(✓⇤), where c occurs in the lower order terms of the bound. This constraint is not very restrictive, and does not affect the asymptotic rate. Observe that IU(✓⇤) is full rank. If IΓ(✓⇤) is not full rank, then the expected log likelihood error of the ML estimate with respect to Γ will not be consistent, and thus such a Γ will never achieve the optimal rate. If IΓ(✓⇤) is full rank, then there always exists a c for which IΓ(✓⇤) ≥cIU(✓⇤). Thus (2) essentially states that for distributions Γ where IΓ(✓⇤) is close to being rank-deficient, the asymptotic convergence rate of O(Tr ! IΓ(✓⇤)−1IU(✓⇤) " /m2) is achieved at larger values of m2. 5 4.2 Proof Outline Our main result relies on the following three steps. 4.2.1 Bounding the Log-likelihood Error First, we characterize the log likelihood error (wrt U) of the empirical risk minimizer (ERM) estimate obtained using a sampling distribution Γ. Concretely, let Γ be a distribution on U. Let b✓Γ be the ERM estimate using the distribution Γ: b✓Γ = argmin✓2⇥ 1 m2 m2 X i=1 L(Yi|Xi, ✓), (3) where Xi ⇠Γ and Yi ⇠p(y|Xi, ✓⇤). The core of our analysis is Lemma 1, which shows a precise estimate of the log likelihood error E h LU ⇣ b✓Γ ⌘ −LU (✓⇤) i . Lemma 1. Suppose L satisfies the regularity conditions in Assumptions 1 and 2. Let Γ be a distribution on U and b✓Γ be the ERM estimate (3) using m2 labeled examples. Suppose further that IΓ(✓⇤) ⌫cIU(✓⇤) for some constant c < 1. Then, for any p ≥2 and m2 large enough such that ✏m2 def = O ⇣ 1 c2 ! L1L3 + pL2 " q p log dm2 m2 ⌘ < 1, we have: (1 −✏m2) ⌧2 m2 − L2 1 cmp/2 2 E h LU ⇣ b✓Γ ⌘ −LU (✓⇤) i (1 + ✏m2) ⌧2 m2 + R mp 2 , where ⌧2 def = Tr ⇣ IΓ(✓⇤)−1IU(✓⇤) ⌘ . 4.2.2 Approximating ✓⇤ Lemma 1 motivates sampling from the optimal sampling distribution Γ⇤that minimizes Tr ⇣ IΓ⇤(✓⇤)−1IU(✓⇤) ⌘ . However, this quantity depends on ✓⇤, which we do not know. To resolve this issue, our algorithm first queries the labels of a small fraction of points (m1) and solves a ML estimation problem to obtain a coarse estimate ✓1 of ✓⇤. How close should ✓1 be to ✓⇤? Our analysis indicates that it is sufficient for ✓1 to be close enough that for any x, I(x, ✓1) is a constant factor spectral approximation to I(x, ✓⇤); the number of samples needed to achieve this is analyzed in Lemma 2. Lemma 2. Suppose L satisfies the regularity conditions in Assumptions 1 and 2. If the number of samples used in the first step m1 > O 0 @max 0 @L2 log2 d, L2 1 ✓ L2 3 + 1 σmin ◆ log2 d, diameter(⇥) Tr ⇣ IU(✓⇤)−1⌘, β2L2 4 δ Tr ⇣ IU(✓⇤)−1⌘ 1 A 1 A , then, we have: −1 β I (x, ✓⇤) ⪯I (x, ✓1) −I (x, ✓⇤) ⪯1 β I (x, ✓⇤) 8 x 2 X with probability greater than 1 −δ. 4.2.3 Computing Γ1 Third, we are left with the task of obtaining a distribution Γ1 that minimizes the log likelihood error. We now pose this optimization problem as an SDP. From Lemmas 1 and 2, it is clear that we should aim to obtain a sampling distribution Γ = ( ai m2 : i 2 [n]) minimizing Tr ⇣ IΓ(✓1)−1IU(✓1) ⌘ . Let IU(✓1) = P j σjvjvj> be the singular value decomposition (svd) of IU(✓1). Since Tr ⇣ IΓ(✓1)−1IU(✓1) ⌘ = Pd j=1 σjvj>IΓ(✓1)−1vj, this is equivalent 6 to solving: min a,c d X j=1 σjcj s.t. 8 > < > : S = P i aiI(xi, ✓1) vj>S−1vj cj ai 2 [0, 1] P i ai = m2. (4) Among the above constraints, the constraint vj>S−1vj cj seems problematic. However, Schur complement formula tells us that: cj vj> vj S 9 ⌫0 , S ⌫0 and vj>S−1vj cj. In our case, we know that S ⌫0, since it is a sum of positive semi definite matrices. The above argument proves the following lemma. Lemma 3. The following two optimization programs are equivalent: mina Tr ! S−1IU(✓1) " s.t. S = P i aiI(xi, ✓1) ai 2 [0, 1] P i ai = m2. ⌘ mina,c Pd j=1 σjcj s.t. S = P i aiI(xi, ✓1) cj vj> vj S 9 ⌫0 ai 2 [0, 1] P i ai = m2, where IU(✓1) = P j σjvjvj> denotes the svd of IU(✓1). 5 Illustrative Examples We next present some examples that illustrate Theorem 1. We begin by showing that Condition 1 is satisfied by the popular class of Generalized Linear Models. 5.1 Derivations for Generalized Linear Models A generalized linear model is specified by three parameters – a linear model, a sufficient statistic, and a member of the exponential family. Let ⌘be a linear model: ⌘= ✓>X. Then, in a Generalized Linear Model (GLM), Y is drawn from an exponential family distribution with parameter ⌘. Specifically, p(Y = y|⌘) = e⌘>t(y)−A(⌘), where t(·) is the sufficient statistic and A(·) is the log-partition function. From properties of the exponential family, the log-likelihood is written as log p(y|⌘) = ⌘>t(y) −A(⌘). If we take ⌘= ✓>x, and take the derivative with respect to ✓, we have: @ log p(y|✓,x) @✓ = xt(y) −xA0(✓>x). Taking derivatives again gives us @2 log p(y|✓,x) @✓2 = −xx>A00(✓>x), which is independent of y. 5.2 Specific Examples We next present three illustrative examples of problems that our algorithm may be applied to. Linear Regression. Our first example is linear regression. In this case, x 2 Rd and Y 2 R are generated according to the distribution: Y = ✓> ⇤X + ⌘, where ⌘is a noise variable drawn from N(0, 1). In this case, the negative loglikelihood function is: L(y|x, ✓) = (y −✓>x)2, and the corresponding Fisher information matrix I(x, ✓) is given as: I(x, ✓) = xx>. Observe that in this (very special) case, the Fisher information matrix does not depend on ✓; as a result we can eliminate the first two steps of the algorithm, and proceed directly to step 3. If ⌃= 1 n P i xixi> is the covariance matrix of U, then Theorem 1 tells us that we need to query labels from a distribution Γ⇤ with covariance matrix ⇤such that Tr ! ⇤−1⌃ " is minimized. We illustrate the advantages of active learning through a simple example. Suppose U is the unlabelled distribution: xi = ⇢ e1 w.p. 1 −d−1 d2 , ej w.p. 1 d2 for j 2 {2, · · · , d} , where ej is the standard unit vector in the jth direction. The covariance matrix ⌃of U is a diagonal matrix with ⌃11 = 1 −d−1 d2 and ⌃jj = 1 d2 for j ≥2. For passive learning over U, we query labels 7 of examples drawn from U which gives us a convergence rate of Tr(⌃−1⌃) m = d m. On the other hand, active learning chooses to sample examples from the distribution Γ⇤such that xi = ⇢ e1 w.p. ⇠1 −d−1 2d , ej w.p. ⇠ 1 2d for j 2 {2, · · · , d} , where ⇠indicates that the probabilities hold upto O ! 1 d2 " . This has a diagonal covariance matrix ⇤such that ⇤11 ⇠1 −d−1 2d and ⇤jj ⇠ 1 2d for j ≥2, and convergence rate of Tr(⇤−1⌃) m ⇠ 1 m ⇣ 2d d+1 · ! 1 −d−1 d2 " + (d −1) · 2d · 1 d2 ⌘ 4 m, which does not grow with d! Logistic Regression. Our second example is logistic regression for binary classification. In this case, x 2 Rd, Y 2 {−1, 1} and the negative log-likelihood function is: L(y|x, ✓) = log(1 + e−y✓>x), and the corresponding Fisher information I(x, ✓) is given as: I(x, ✓) = e✓>x (1+e✓>x)2 · xx>. For illustration, suppose k✓⇤k2 and kxk2 are bounded by a constant and the covariance matrix ⌃is sandwiched between two multiples of identity in the PSD ordering i.e., c dI ⪯⌃⪯C d I for some constants c and C. Then the regularity assumptions 1 and 2 are satisfied for constant values of L1, L2, L3 and L4. In this case, Theorem 1 states that choosing m1 to be ! ⇣ Tr ⇣ IU(✓⇤)−1⌘⌘ = ! (d) gives us the optimal convergence rate of (1 + o(1)) Tr(IΓ⇤(✓⇤)−1IU(✓⇤)) m2 . Multinomial Logistic Regression. Our third example is multinomial logistic regression for multiclass classification. In this case, Y 2 1, . . . , K, x 2 Rd, and the parameter matrix ✓2 R(K−1)⇥d. The negative log-likelihood function is written as: L(y|x, ✓) = −✓> y x + log(1 + PK−1 k=1 e✓> k x), if y 6= K, and L(y = k|x, ✓) = log(1 + PK−1 k=1 e✓> k x) otherwise. The corresponding Fisher information matrix is a (K −1)d ⇥(K −1)d matrix, which is obtained as follows. Let F be the (K −1) ⇥(K −1) matrix with: Fii = e✓> i x(1 + P k6=i e✓> k x) (1 + P k e✓> k x)2 , Fij = − e✓> i x+✓> j x (1 + P k e✓> k x)2 Then, I(x, ✓) = F ⌦xx>. Similar to the example in the logistic regression case, suppose &&✓⇤ y && 2 and kxk2 are bounded by a constant and the covariance matrix ⌃satisfies c dI ⪯⌃⪯ C d I for some constants c and C. Since F ⇤= diag (p⇤ i ) −p⇤p⇤>, where p⇤ i = P(y = i|x, ✓⇤), the boundedness of &&✓⇤ y && 2 and kxk2 implies that ecI ⪯F ⇤⪯eCI for some constants ec and eC (depending on K). This means that cec d I ⪯I(x, ✓⇤) ⪯C e C d I and so the regularity assumptions 1 and 2 are satisfied with L1, L2, L3 and L4 being constants. Theorem 1 again tells us that using !(d) samples in the first step gives us the optimal convergence rate of maximum likelihood error. 6 Conclusion In this paper, we provide an active learning algorithm for maximum likelihood estimation which provably achieves the optimal convergence rate (upto lower order terms) and uses only two rounds of interaction. Our algorithm applies in a very general setting, which includes Generalized Linear Models. There are several avenues of future work. Our algorithm involves solving an SDP which is computationally expensive; an open question is whether there is a more efficient, perhaps greedy, algorithm that achieves the same rate. A second open question is whether it is possible to remove the with replacement sampling assumption. A final question is what happens if IU(✓⇤) has a high condition number. In this case, our algorithm will require a large number of samples in the first stage; an open question is whether we can use a more sophisticated procedure in the first stage to reduce the label requirement. Acknowledgements. KC thanks NSF under IIS 1162581 for research support. 8 References [1] A. Agarwal. Selective sampling algorithms for cost-sensitive multiclass prediction. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, Atlanta, GA, USA, 16-21 June 2013, pages 1220–1228, 2013. [2] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. J. Comput. Syst. Sci., 75(1):78–89, 2009. [3] M.-F. Balcan and P. M. Long. Active and passive learning of linear separators under logconcave distributions. In COLT, 2013. [4] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [5] L. Cam and G. Yang. Asymptotics in Statistics: Some Basic Concepts. Springer Series in Statistics. Springer New York, 2000. [6] J. Cornell. Experiments with Mixtures: Designs, Models, and the Analysis of Mixture Data (third ed.). Wiley, 2002. [7] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, 2005. [8] S. Dasgupta. Two faces of active learning. Theor. Comput. Sci., 412(19), 2011. [9] S. Dasgupta and D. Hsu. Hierarchical sampling for active learning. In ICML, 2008. [10] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. In NIPS, 2007. [11] R. Frostig, R. Ge, S. M. Kakade, and A. Sidford. Competing with the empirical risk minimizer in a single pass. arXiv preprint arXiv:1412.6606, 2014. [12] Q. Gu, T. Zhang, C. Ding, and J. Han. Selective labeling via error bound minimization. In In Proc. of Advances in Neural Information Processing Systems (NIPS) 25, Lake Tahoe, Nevada, United States, 2012. [13] Q. Gu, T. Zhang, and J. Han. Batch-mode active learning via error bound minimization. In 30th Conference on Uncertainty in Artificial Intelligence (UAI), 2014. [14] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [15] M. K¨a¨ari¨ainen. Active learning in the non-realizable case. In ALT, 2006. [16] L. Le Cam. Asymptotic Methods in Statistical Decision Theory. Springer, 1986. [17] E. L. Lehmann and G. Casella. Theory of point estimation, volume 31. Springer Science & Business Media, 1998. [18] R. D. Nowak. The geometry of generalized binary search. IEEE Transactions on Information Theory, 57(12):7893–7906, 2011. [19] S. Sabato and R. Munos. Active regression through stratification. In NIPS, 2014. [20] R. Urner, S. Wulff, and S. Ben-David. Plal: Cluster-based active learning. In COLT, 2013. [21] A. W. van der Vaart. Asymptotic Statistics. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2000. [22] C. Zhang and K. Chaudhuri. Beyond disagreement-based agnostic active learning. In Proc. of Neural Information Processing Systems, 2014. 9 | 2015 | 310 |
5,826 | Distributionally Robust Logistic Regression Soroosh Shafieezadeh-Abadeh Peyman Mohajerin Esfahani Daniel Kuhn ´Ecole Polytechnique F´ed´erale de Lausanne, CH-1015 Lausanne, Switzerland {soroosh.shafiee,peyman.mohajerin,daniel.kuhn} @epfl.ch Abstract This paper proposes a distributionally robust approach to logistic regression. We use the Wasserstein distance to construct a ball in the space of probability distributions centered at the uniform distribution on the training samples. If the radius of this ball is chosen judiciously, we can guarantee that it contains the unknown datagenerating distribution with high confidence. We then formulate a distributionally robust logistic regression model that minimizes a worst-case expected logloss function, where the worst case is taken over all distributions in the Wasserstein ball. We prove that this optimization problem admits a tractable reformulation and encapsulates the classical as well as the popular regularized logistic regression problems as special cases. We further propose a distributionally robust approach based on Wasserstein balls to compute upper and lower confidence bounds on the misclassification probability of the resulting classifier. These bounds are given by the optimal values of two highly tractable linear programs. We validate our theoretical out-of-sample guarantees through simulated and empirical experiments. 1 Introduction Logistic regression is one of the most frequently used classification methods [1]. Its objective is to establish a probabilistic relationship between a continuous feature vector and a binary explanatory variable. However, in spite of its overwhelming success in machine learning, data analytics and medicine etc., logistic regression models can display a poor out-of-sample performance if training data is sparse. In this case modelers often resort to ad hoc regularization techniques in order to combat overfitting effects. This paper aims to develop new regularization techniques for logistic regression—and to provide intuitive probabilistic interpretations for existing ones—by using tools from modern distributionally robust optimization. Logistic Regression: Let x ∈Rn denote a feature vector and y ∈{−1, +1} the associated binary label to be predicted. In logistic regression, the conditional distribution of y given x is modeled as Prob(y|x) = [1 + exp(−y⟨β, x⟩)]−1 , (1) where the weight vector β ∈Rn constitutes an unknown regression parameter. Suppose that N training samples {(ˆxi, ˆyi)}N i=1 have been observed. Then, the maximum likelihood estimator of classical logistic regression is found by solving the geometric program min β 1 N N X i=1 lβ(ˆxi, ˆyi) , (2) whose objective function is given by the sample average of the logloss function lβ(x, y) = log(1 + exp (−y⟨β, x⟩)). It has been observed, however, that the resulting maximum likelihood estimator may display a poor out-of-sample performance. Indeed, it is well documented that minimizing the average logloss function leads to overfitting and weak classification performance [2, 3]. In order 1 to overcome this deficiency, it has been proposed to modify the objective function of problem (2) [4, 5, 6]. An alternative approach is to add a regularization term to the logloss function in order to mitigate overfitting. These regularization techniques lead to a modified optimization problem min β 1 N N X i=1 lβ(ˆxi, ˆyi) + εR(β) , (3) where R(β) and ε denote the regularization function and the associated coefficient, respectively. A popular choice for the regularization term is R(β) = ∥β∥, where ∥· ∥denotes a generic norm such as the ℓ1 or the ℓ2-norm. The use of ℓ1-regularization tends to induce sparsity in β, which in turn helps to combat overfitting effects [7]. Moreover, ℓ1-regularized logistic regression serves as an effective means for feature selection. It is further shown in [8] that ℓ1-regularization outperforms ℓ2-regularization when the number of training samples is smaller than the number of features. On the downside, ℓ1-regularization leads to non-smooth optimization problems, which are more challenging. Algorithms for large scale regularized logistic regression are discussed in [9, 10, 11, 12]. Distributionally Robust Optimization: Regression and classification problems are typically modeled as optimization problems under uncertainty. To date, optimization under uncertainty has been addressed by several complementary modeling paradigms that differ mainly in the representation of uncertainty. For instance, stochastic programming assumes that the uncertainty is governed by a known probability distribution and aims to minimize a probability functional such as the expected cost or a quantile of the cost distribution [13, 14]. In contrast, robust optimization ignores all distributional information and aims to minimize the worst-case cost under all possible uncertainty realizations [15, 16, 17]. While stochastic programs may rely on distributional information that is not available or hard to acquire in practice, robust optimization models may adopt an overly pessimistic view of the uncertainty and thereby promote over-conservative decisions. The emerging field of distributionally robust optimization aims to bridge the gap between the conservatism of robust optimization and the specificity of stochastic programming: it seeks to minimize a worst-case probability functional (e.g., the worst-case expectation), where the worst case is taken with respect to an ambiguity set, that is, a family of distributions consistent with the given prior information on the uncertainty. The vast majority of the existing literature focuses on ambiguity sets characterized through moment and support information, see e.g. [18, 19, 20]. However, ambiguity sets can also be constructed via distance measures in the space of probability distributions such as the Prohorov metric [21] or the Kullback-Leibler divergence [22]. Due to its attractive measure concentration properties, we use here the Wasserstein metric to construct ambiguity sets. Contribution: In this paper we propose a distributionally robust perspective on logistic regression. Our research is motivated by the well-known observation that regularization techniques can improve the out-of-sample performance of many classifiers. In the context of support vector machines and Lasso, there have been several recent attempts to give ad hoc regularization techniques a robustness interpretation [23, 24]. However, to the best of our knowledge, no such connection has been established for logistic regression. In this paper we aim to close this gap by adopting a new distributionally robust optimization paradigm based on Wasserstein ambiguity sets [25]. Starting from a data-driven distributionally robust statistical learning setup, we will derive a family of regularized logistic regression models that admit an intuitive probabilistic interpretation and encapsulate the classical regularized logistic regression (3) as a special case. Moreover, by invoking recent measure concentration results, our proposed approach provides a probabilistic guarantee for the emerging regularized classifiers, which seems to be the first result of this type. All proofs are relegated to the technical appendix. We summarize our main contributions as follows: • Distributionally robust logistic regression model and tractable reformulation: We propose a data-driven distributionally robust logistic regression model based on an ambiguity set induced by the Wasserstein distance. We prove that the resulting semi-infinite optimization problem admits an equivalent reformulation as a tractable convex program. • Risk estimation: Using similar distributionally robust optimization techniques based on the Wasserstein ambiguity set, we develop two highly tractable linear programs whose optimal values provide confidence bounds on the misclassification probability or risk of the emerging classifiers. • Out-of-sample performance guarantees: Adopting a distributionally robust framework allows us to invoke results from the measure concentration literature to derive finite-sample probabilistic 2 guarantees. Specifically, we establish out-of-sample performance guarantees for the classifiers obtained from the proposed distributionally robust optimization model. • Probabilistic interpretation of existing regularization techniques: We show that the standard regularized logistic regression is a special case of our framework. In particular, we show that the regularization coefficient ε in (3) can be interpreted as the size of the ambiguity set underlying our distributionally robust optimization model. 2 A distributionally robust perspective on statistical learning In the standard statistical learning setting all training and test samples are drawn independently from some distribution P supported on Ξ = Rn × {−1, +1}. If the distribution P was known, the best weight parameter β could be found by solving the stochastic optimization problem inf β EP [lβ(x, y)] = Z Rn×{−1,+1} lβ(x, y)P(d(x, y)) . (4) In practice, however, P is only indirectly observable through N independent training samples. Thus, the distribution P is itself uncertain, which motivates us to address problem (4) from a distributionally robust perspective. This means that we use the training samples to construct an ambiguity set P, that is, a family of distributions that contains the unknown distribution P with high confidence. Then we solve the distributionally robust optimization problem inf β sup Q∈P EQ [lβ(x, y)] , (5) which minimizes the worst-case expected logloss function. The construction of the ambiguity set P should be guided by the following principles. (i) Tractability: It must be possible to solve the distributionally robust optimization problem (5) efficiently. (ii) Reliability: The optimizer of (5) should be near-optimal in (4), thus facilitating attractive out-of-sample guarantees. (iii) Asymptotic consistency: For large training data sets, the solution of (5) should converge to the one of (4). In this paper we propose to use the Wasserstein metric to construct P as a ball in the space of probability distributions that satisfies (i)–(iii). Definition 1 (Wasserstein Distance). Let M(Ξ2) denote the set of probability distributions on Ξ×Ξ. The Wasserstein distance between two distributions P and Q supported on Ξ is defined as W(Q, P) := inf Π∈M(Ξ2) Z Ξ2 d(ξ, ξ′) Π(dξ, dξ′) : Π(dξ, Ξ) = Q(dξ), Π(Ξ, dξ′) = P(dξ′) , where ξ = (x, y) and d(ξ, ξ′) is a metric on Ξ. The Wasserstein distance represents the minimum cost of moving the distribution P to the distribution Q, where the cost of moving a unit mass from ξ to ξ′ amounts to d(ξ, ξ′). In the remainder, we denote by Bε(P) := {Q : W(Q, P) ≤ε} the ball of radius ε centered at P with respect to the Wasserstein distance. In this paper we propose to use Wasserstein balls as ambiguity sets. Given the training data points {(ˆxi, ˆyi)}N i=1, a natural candidate for the center of the Wasserstein ball is the empirical distribution ˆPN = 1 N PN i=1 δ(ˆxi,ˆyi), where δ(ˆxi,ˆyi) denotes the Dirac point measure at (ˆxi, ˆyi). Thus, we henceforth examine the distributionally robust optimization problem inf β sup Q∈Bε(ˆPN) EQ [lβ(x, y)] (6) equipped with a Wasserstein ambiguity set. Note that (6) reduces to the average logloss minimization problem (2) associated with classical logistic regression if we set ε = 0. 3 Tractable reformulation and probabilistic guarantees In this section we demonstrate that (6) can be reformulated as a tractable convex program and establish probabilistic guarantees for its optimal solutions. 3 3.1 Tractable reformulation We first define a metric on the feature-label space, which will be used in the remainder. Definition 2 (Metric on the Feature-Label Space). The distance between two data points (x, y), (x′, y′) ∈Ξ is defined as d (x, y), (x′, y′) = ∥x −x′∥+ κ|y −y′|/2 , where ∥· ∥is any norm on Rn, and κ is a positive weight. The parameter κ in Definition 2 represents the relative emphasis between feature mismatch and label uncertainty. The following theorem presents a tractable reformulation of the distributionally robust optimization problem (6) and thus constitutes the first main result of this paper. Theorem 1 (Tractable Reformulation). The optimization problem (6) is equivalent to ˆJ := inf β sup Q∈Bε(ˆPN) EQ [lβ(x, y)] = min β,λ,si λε + 1 N N P i=1 si s.t. lβ(ˆxi, ˆyi) ≤si ∀i ≤N lβ(ˆxi, −ˆyi) −λκ ≤si ∀i ≤N ∥β∥∗≤λ. (7) Note that (7) constitutes a tractable convex program for most commonly used norms ∥· ∥. Remark 1 (Regularized Logistic Regression). As the parameter κ > 0 characterizing the metric d(·, ·) tends to infinity, the second constraint group in the convex program (7) becomes redundant. Hence, (7) reduces to the celebrated regularized logistic regression problem inf β ε∥β∥∗+ 1 N N X i=1 lβ(ˆxi, ˆyi), where the regularization function is determined by the dual norm on the feature space, while the regularization coefficient coincides with the radius of the Wasserstein ball. Note that for κ = ∞ the Wasserstein distance between two distributions is infinite if they assign different labels to a fixed feature vector with positive probability. Any distribution in Bε(ˆPN) must then have nonoverlapping conditional supports for y = +1 and y = −1. Thus, setting κ = ∞reflects the belief that the label is a (deterministic) function of the feature and that label measurements are exact. As this belief is not tenable in most applications, an approach with κ < ∞may be more satisfying. 3.2 Out-of-sample performance guarantees We now exploit a recent measure concentration result characterizing the speed at which ˆPN converges to P with respect to the Wasserstein distance [26] in order to derive out-of-sample performance guarantees for distributionally robust logistic regression. In the following, we let ˆΞN := {(ˆxi, ˆyi)}N i=1 be a set of N independent training samples from P, and we denote by ˆβ, ˆλ, and ˆsi the optimal solutions and ˆJ the corresponding optimal value of (7). Note that these values are random objects as they depend on the random training data ˆΞN. Theorem 2 (Out-of-Sample Performance). Assume that the distribution P is light-tailed, i.e. , there is a > 1 with A := EP[exp(∥2x∥a)] < +∞. If the radius ε of the Wasserstein ball is set to εN(η) = log (c1η−1) c2N 1 a 1{N< log (c1η−1) c2c3 } + log (c1η−1) c2N 1 n 1{N≥log (c1η−1) c2c3 }, (8) then we have PN P ∈Bε(ˆPN) ≥1 −η, implying that PN{ˆΞN : EP[l ˆβ(x, y)] ≤ˆJ} ≥1 −η for all sample sizes N ≥1 and confidence levels η ∈(0, 1]. Moreover, the positive constants c1, c2, and c3 appearing in (8) depend only on the light-tail parameters a and A, the dimension n of the feature space, and the metric on the feature-label space. Remark 2 (Worst-Case Loss). Denoting the empirical logloss function on the training set ˆΞN by EˆPN [l ˆβ(x, y)], the worst-case loss ˆJ can be expressed as ˆJ = ˆλε + E ˆPN [l ˆβ(x, y)] + 1 N N X i=1 max{0, ˆyi⟨ˆβ, ˆxi⟩−ˆλκ}. (9) 4 Note that the last term in (9) can be viewed as a complementary regularization term that does not appear in standard regularized logistic regression. This term accounts for label uncertainty and decreases with κ. Thus, κ can be interpreted as our trust in the labels of the training samples. Note that this regularization term vanishes for κ →∞. One can further prove that ˆλ converges to ∥ˆβ∥∗ for κ →∞, implying that (9) reduces to the standard regularized logistic regression in this limit. Remark 3 (Performance Guarantees). The following comments are in order: I. Light-Tail Assumption: The light-tail assumption of Theorem 2 is restrictive but seems to be unavoidable for any a priori guarantees of the type described in Theorem 2. Note that this assumption is automatically satisfied if the features have bounded support or if they are known to follow, for instance, a Gaussian or exponential distribution. II. Asymptotic Consistency: For any fixed confidence level η, the radius εN(η) defined in (8) drops to zero as the sample size N increases, and thus the ambiguity set shrinks to a singleton. To be more precise, with probability 1 across all training datasets, a sequence of distributions in the ambiguity set (8) converges in the Wasserstein metric, and thus weakly, to the unknown data generating distribution P; see [25, Corollary 3.4] for a formal proof. Consequently, the solution of (2) can be shown to converge to the solution of (4) as N increases. III. Finite Sample Behavior: The a priori bound (8) on the size of the Wasserstein ball has two growth regimes. For small N, the radius decreases as N 1 a , and for large N it scales with N 1 n , where n is the dimension of the feature space. We refer to [26, Section 1.3] for further details on the optimality of these rates and potential improvements for special cases. Note that when the support of the underlying distribution P is bounded or P has a Gaussian distribution, the parameter a can be effectively set to 1. 3.3 Risk Estimation: Worst- and Best-Cases One of the main objectives in logistic regression is to control the classification performance. Specifically, we are interested in predicting labels from features. This can be achieved via a classifier function fβ : Rn →{+1, −1}, whose risk R(β) := P y ̸= fβ(x) represents the misclassification probability. In logistic regression, a natural choice for the classifier is fβ(x) = +1 if Prob(+1|x) > 0.5; = −1 otherwise. The conditional probability Prob(y|x) is defined in (1). The risk associated with this classifier can be expressed as R(β) = EP 1{y⟨β,x⟩≤0} . As in Section 3.1, we can use worst- and best-case expectations over Wasserstein balls to construct confidence bounds on the risk. Theorem 3 (Risk Estimation). For any ˆβ depending on the training dataset {(ˆxi, ˆyi)}N i=1 we have: (i) The worst-case risk Rmax(ˆβ) := supQ∈Bε(ˆPN) EQ[1{y⟨ˆβ,x⟩≤0}] is given by Rmax(ˆβ) = min λ,si,ri,ti λε + 1 N N P i=1 si s.t. 1 −ri ˆyi⟨ˆβ, ˆxi⟩≤si ∀i ≤N 1 + ti ˆyi⟨ˆβ, ˆxi⟩−λκ ≤si ∀i ≤N ri∥ˆβ∥∗≤λ, ti∥ˆβ∥∗≤λ ∀i ≤N ri, ti, si ≥0 ∀i ≤N. (10a) If the Wasserstein radius ε is set to εN(η) as defined in (8), then Rmax(ˆβ) ≥R(ˆβ) with probability 1 −η across all training sets {(xi, yi)}N i=1. (ii) Similarly, the best-case risk Rmin(ˆβ) := infQ∈Bε(ˆPN) EQ[1{y⟨ˆβ,x⟩<0}] is given by Rmin(ˆβ) = 1 − min λ,si,ri,ti λε + 1 N N P i=1 si s.t. 1 + ri ˆyi⟨ˆβ, ˆxi⟩≤si ∀i ≤N 1 −ti ˆyi⟨ˆβ, ˆxi⟩−λκ ≤si ∀i ≤N ri∥ˆβ∥∗≤λ, ti∥ˆβ∥∗≤λ ∀i ≤N ri, ti, si ≥0 ∀i ≤N. (10b) 5 ε 10-5 10-4 10-3 10-2 10-1 100 1 −ˆη 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Average CCR 60 65 70 75 80 85 (a) N = 10 training samples ε 10-5 10-4 10-3 10-2 10-1 100 1 −ˆη 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Average CCR(%) 85 87 89 91 93 95 (b) N = 100 training samples ε 10-5 10-4 10-3 10-2 10-1 100 1 −ˆη 0.2 0.4 0.6 0.8 1 Average CCR(%) 93.9 94.1 94.3 94.5 (c) N = 1000 training samples Figure 1: Out-of-sample performance (solid blue line) and the average CCR (dashed red line) If the Wasserstein radius ε is set to εN(η) as defined in (8), then Rmin(ˆβ) ≤R(ˆβ) with probability 1 −η across all training sets {(xi, yi)}N i=1. We emphasize that (10a) and (10b) constitute highly tractable linear programs. Moreover, we have Rmin(ˆβ) ≤R(ˆβ) ≤Rmax(ˆβ) with probability 1 −2η. 4 Numerical Results We now showcase the power of distributionally robust logistic regression in simulated and empirical experiments. All optimization problems are implemented in MATLAB via the modeling language YALMIP [27] and solved with the state-of-the-art nonlinear programming solver IPOPT [28]. All experiments were run on an Intel XEON CPU (3.40GHz). For the largest instance studied (N = 1000), the problems (2), (3), (7) and (10) were solved in 2.1, 4.2, 9.2 and 0.05 seconds, respectively. 4.1 Experiment 1: Out-of-Sample Performance We use a simulation experiment to study the out-of-sample performance guarantees offered by distributionally robust logistic regression. As in [8], we assume that the features x ∈R10 follow a multivariate standard normal distribution and that the conditional distribution of the labels y ∈{+1, −1} is of the form (1) with β = (10, 0, . . . , 0). The true distribution P is uniquely determined by this information. If we use the ℓ∞-norm to measure distances in the feature space, then P satisfies the light-tail assumption of Theorem 2 for 2 > a ≳1. Finally, we set κ = 1. Our experiment comprises 100 simulation runs. In each run we generate N ∈{10, 102, 103} training samples and 104 test samples from P. We calibrate the distributionally robust logistic regression model (6) to the training data and use the test data to evaluate the average logloss as well as the correct classification rate (CCR) of the classifier associated with ˆβ. We then record the percentage ˆηN(ε) of simulation runs in which the average logloss exceeds ˆJ. Moreover, we calculate the average CCR across all simulation runs. Figure 1 displays both 1 −ˆηN(ε) and the average CCR as a function of ε for different values of N. Note that 1 −ˆηN(ε) quantifies the probability (with respect to the training data) that P belongs to the Wasserstein ball of radius ε around the empirical distribution ˆPN. Thus, 1 −ˆηN(ε) increases with ε. The average CCR benefits from the regularization induced by the distributional robustness and increases with ε as long as the empirical confidence 1 −ˆηN(ε) is smaller than 1. As soon as the Wasserstein ball is large enough to contain the distribution P with high confidence (1 −ˆηN(ε) ≲1), however, any further increase of ε is detrimental to the average CCR. Figure 1 also indicates that the radius ε implied by a fixed empirical confidence level scales inversely with the number of training samples N. Specifically, for N = 10, 102, 103, the Wasserstein radius implied by the confidence level 1 −ˆη = 95% is given by ε ≈0.2, 0.02, 0.003, respectively. This observation is consistent with the a priori estimate (8) of the Wasserstein radius εN(η) associated with a given η. Indeed, as a ≳1, Theorem 2 implies that εN(η) scales with N 1 a ≲N for ε ≥c3. 6 4.2 Experiment 2: The Effect of the Wasserstein Ball In the second simulation experiment we study the statistical properties of the out-of-sample logloss. As in [2], we set n = 10 and assume that the features follow a multivariate standard normal distribution, while the conditional distribution of the labels is of the form (1) with β sampled uniformly from the unit sphere. We use the ℓ2-norm in the feature space, and we set κ = 1. All results reported here are averaged over 100 simulation runs. In each trial, we use N = 102 training samples to calibrate problem (6) and 104 test samples to estimate the logloss distribution of the resulting classifier. Figure 2(a) visualizes the conditional value-at-risk (CVaR) of the out-of-sample logloss distribution for various confidence levels and for different values of ε. The CVaR of the logloss at level α is defined as the conditional expectation of the logloss above its (1 −α)-quantile, see [29]. In other words, the CVaR at level α quantifies the average of the α × 100% worst logloss realizations. As expected, using a distributionally robust approach renders the logistic regression problem more ‘risk-averse’, which results in uniformly lower CVaR values of the logloss, particularly for smaller confidence levels. Thus, increasing the radius of the Wasserstein ball reduces the right tail of the logloss distribution. Figure 2(c) confirms this observation by showing that the cumulative distribution function (CDF) of the logloss converges to a step function for large ε. Moreover, one can prove that the weight vector ˆβ tends to zero as ε grows. Specifically, for ε ≥0.1 we have β ≈0, in which case the logloss approximates the deterministic value log(2) = 0.69. Zooming into the CVaR graph of Figure 2(a) at the end of the high confidence levels, we observe that the 100%-CVaR, which coincides in fact with the expected logloss, increases at every quantile level; see Figure 2(b). 4.3 Experiment 3: Real World Case Studies and Risk Estimation Next, we validate the performance of the proposed distributionally robust logistic regression method on the MNIST dataset [30] and three popular datasets from the UCI repository: Ionosphere, Thoracic Surgery, and Breast Cancer [31]. In this experiment, we use the distance function of Definition 2 with the ℓ1-norm. We examine three different models: logistic regression (LR), regularized logistic regression (RLR), and distributionally robust logistic regression with κ = 1 (DRLR). All results reported here are averaged over 100 independent trials. In each trial related to a UCI dataset, we randomly select 60% of data to train the models and the rest to test the performance. Similarly, in each trial related to the MNIST dataset, we randomly select 103 samples from the training dataset, and test the performance on the complete test dataset. The results in Table 1 (top) indicate that DRLR outperforms RLR in terms of CCR by about the same amount by which RLR outperforms classical LR (0.3%–1%), consistently across all experiments. We also evaluated the out-of-sample CVaR of logloss, which is a natural performance indicator for robust methods. Table 1 (bottom) shows that DRLR wins by a large margin (outperforming RLR by 4%–43%). In the remainder we focus on the Ionosphere case study (the results of which are representative for the other case studies). Figures 3(a) and 3(b) depict the logloss and the CCR for different Wasserstein radii ε. DRLR (κ = 1) outperforms RLR (κ = ∞) consistently for all sufficiently small values of ε. This observation can be explained by the fact that DRLR accounts for uncertainty in the label, whereas RLR does not. Thus, there is a wider range of Wasserstein radii that result in Quantile Percentage 0 20 40 60 80 100 CVaR 0 1 2 3 4 5 6 ε =0 ε =0.005 ε =0.01 ε =0.05 ε =0.1 ε =0.5 (a) CVaR versus quantile of the logloss function Quantile Percentage 94 95 96 97 98 99 100 CVaR 0.6 0.7 0.8 0.9 ε =0 ε =0.005 ε =0.01 ε =0.05 ε =0.1 ε =0.5 (b) CVaR versus quantile of the logloss function (zoomed) logloss 0 1 2 3 4 5 6 CDF 0 0.2 0.4 0.6 0.8 1 ε =0 ε =0.005 ε =0.01 ε =0.05 ε =0.1 ε =0.5 (c) Cumulative distribution of the logloss function Figure 2: CVaR and CDF of the logloss function for different Wasserstein radii ε 7 Table 1: The average and standard deviation of CCR and CVaR evaluated on the test dataset. LR RLR DRLR CCR Ionosphere 84.8 ± 4.3% 86.1 ± 3.1% 87.0 ± 2.6% Thoracic Surgery 82.7 ± 2.0% 83.1 ± 2.0% 83.8 ± 2.0% Breast Cancer 94.4 ± 1.8% 95.5 ± 1.2% 95.8 ± 1.2% MNIST 1 vs 7 97.8 ± 0.6% 98.0 ± 0.3% 98.6 ± 0.2% MNIST 4 vs 9 93.7 ± 1.1% 94.6 ± 0.5% 95.1 ± 0.4% MNIST 5 vs 6 94.9 ± 1.6% 95.7 ± 0.5% 96.7 ± 0.4% CVaR Ionosphere 10.5 ± 6.9 4.2 ± 1.5 3.5 ± 2.0 Thoracic Surgery 3.0 ± 1.9 2.3 ± 0.3 2.2 ± 0.2 Breast Cancer 20.3 ± 15.1 1.3 ± 0.4 0.9 ± 0.2 MNIST 1 vs 7 3.9 ± 2.8 0.67 ± 0.13 0.38 ± 0.06 MNIST 4 vs 9 8.7 ± 6.5 1.45 ± 0.20 1.09 ± 0.08 MNIST 5 vs 6 14.1 ± 9.5 1.35 ± 0.20 0.84 ± 0.08 ε 10-4 10-3 10-2 10-1 Average logloss 0 2 4 6 8 10 12 RLR (κ = +∞) DRLR (κ = 1) (a) The average logloss for different κ ε 10-4 10-3 10-2 10-1 Average CCR 0.83 0.84 0.85 0.86 0.87 0.88 RLR (κ = +∞) DRLR (κ = 1) (b) The average correct classification rate for different κ ε 10-5 10-4 10-3 10-2 10-1 100 Risk 0 0.2 0.4 0.6 0.8 1 Confidence (1 −2ˆη) 0 0.2 0.4 0.6 0.8 1 True Risk Upper Bound Lower Bound Confidence (c) Risk estimation and its confidence level Figure 3: Average logloss, CCR and risk for different Wasserstein radii ε (Ionosphere dataset) an attractive out-of-sample logloss and CCR. This effect facilitates the choice of ε and could be a significant advantage in situations where it is difficult to determine ε a priori. In the experiment underlying Figure 3(c), we first fix ˆβ to the optimal solution of (7) for ε = 0.003 and κ = 1. Figure 3(c) shows the true risk R(ˆβ) and its confidence bounds. As expected, for ε = 0 the upper and lower bounds coincide with the empirical risk on the training data, which is a lower bound for the true risk on the test data due to over-fitting effects. As ε increases, the confidence interval between the bounds widens and eventually covers the true risk. For instance, at ε ≈0.05 the confidence interval is given by [0, 0.19] and contains the true risk with probability 1−2ˆη = 95%. Acknowledgments: This research was supported by the Swiss National Science Foundation under grant BSCGI0 157733. References [1] D. W. Hosmer and S. Lemeshow. Applied Logistic Regression. John Wiley & Sons, 2004. [2] J. Feng, H. Xu, S. Mannor, and S. Yan. Robust logistic regression and classification. In Advances in Neural Information Processing Systems, pages 253–261, 2014. [3] Y. Plan and R. Vershynin. Robust 1-bit compressed sensing and sparse logistic regression: A convex programming approach. IEEE Transactions on Information Theory, 59(1):482–494, 2013. [4] N. Ding, S. Vishwanathan, M. Warmuth, and V. S. Denchev. t-logistic regression for binary and multiclass classification. The Journal of Machine Learning Research, 5:1–55, 2013. [5] C. Liu. Robit Regression: A Simple Robust Alternative to Logistic and Probit Regression, pages 227–238. John Wiley & Sons, 2005. 8 [6] P. J. Rousseeuw and A. Christmann. Robustness against separation and outliers in logistic regression. Computational Statistics & Data Analysis, 43(3):315–332, 2003. [7] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society: Series B, 58(1):267–288, 1996. [8] A. Y. Ng. Feature selection, L1 vs. L2 regularization, and rotational invariance. In Proceedings of the Twenty-First International Conference on Machine Learning, pages 78–85, 2004. [9] K. Koh, S.-J. Kim, and S. Boyd. An interior-point method for large-scale ℓ1-regularized logistic regression. The Journal of Machine Learning Research, 8:1519–1555, 2007. [10] S. Shalev-Shwartz and A. Tewari. Stochastic methods for ℓ1-regularized loss minimization. The Journal of Machine Learning Research, 12:1865–1892, 2011. [11] J. Shi, W. Yin, S. Osher, and P. Sajda. A fast hybrid algorithm for large-scale ℓ1-regularized logistic regression. The Journal of Machine Learning Research, 11:713–741, 2010. [12] S. Yun and K.-C. Toh. A coordinate gradient descent method for ℓ1-regularized convex minimization. Computational Optimization and Applications, 48(2):273–307, 2011. [13] A. Shapiro, D. Dentcheva, and A. Ruszczyski. Lectures on Stochastic Programming. SIAM, 2009. [14] J. R. Birge and F. Louveaux. Introduction to Stochastic Programming. Springer, 2011. [15] A. Ben-Tal and A. Nemirovski. Robust optimization—methodology and applications. Mathematical Programming B, 92(3):453–480, 2002. [16] D. Bertsimas and M. Sim. The price of robustness. Operations Research, 52(1):35–53, 2004. [17] A. Ben-Tal, L. El Ghaoui, and A. Nemirovski. Robust Optimization. Princeton University Press, 2009. [18] E. Delage and Y. Ye. Distributionally robust optimization under moment uncertainty with application to data-driven problems. Operations Research, 58(3):595–612, 2010. [19] J. Goh and M. Sim. Distributionally robust optimization and its tractable approximations. Operations Research, 58(4):902–917, 2010. [20] W. Wiesemann, D. Kuhn, and M. Sim. Distributionally robust convex optimization. Operations Research, 62(6):1358–1376, 2014. [21] E. Erdo˘gan and G. Iyengar. Ambiguous chance constrained problems and robust optimization. Mathematical Programming B, 107(1-2):37–61, 2006. [22] Z. Hu and L. J. Hong. Kullback-Leibler divergence constrained distributionally robust optimization. Technical report, Available from Optimization Online, 2013. [23] H. Xu, C. Caramanis, and S. Mannor. Robustness and regularization of support vector machines. The Journal of Machine Learning Research, 10:1485–1510, 2009. [24] H. Xu, C. Caramanis, and S. Mannor. Robust regression and Lasso. IEEE Transactions on Information Theory, 56(7):3561–3574, 2010. [25] P. Mohajerin Esfahani and D. Kuhn. Data-driven distributionally robust optimization using the Wasserstein metric: Performance guarantees and tractable reformulations. http://arxiv. org/abs/1505.05116, 2015. [26] N. Fournier and A. Guillin. On the rate of convergence in Wasserstein distance of the empirical measure. Probability Theory and Related Fields, pages 1–32, 2014. [27] J. L¨ofberg. YALMIP: A toolbox for modeling and optimization in Matlab. In IEEE International Symposium on Computer Aided Control Systems Design, pages 284–289, 2004. [28] A. W¨achter and L. T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Mathematical Programming A, 106(1):25– 57, 2006. [29] R. T. Rockafellar and S. Uryasev. Optimization of conditional value-at-risk. Journal of Risk, 2:21–42, 2000. [30] Y. LeCun. The MNIST database of handwritten digits, 1998. http://yann.lecun.com/ exdb/mnist/. [31] K. Bache and M. Lichman. UCI machine learning repository, 2013. http://archive. ics.uci.edu/ml. 9 | 2015 | 311 |
5,827 | Adaptive Primal-Dual Splitting Methods for Statistical Learning and Image Processing Thomas Goldstein⇤ Department of Computer Science University of Maryland College Park, MD Min Li† School of Economics and Management Southeast University Nanjing, China Xiaoming Yuan‡ Department of Mathematics Hong Kong Baptist University Kowloon Tong, Hong Kong Abstract The alternating direction method of multipliers (ADMM) is an important tool for solving complex optimization problems, but it involves minimization sub-steps that are often difficult to solve efficiently. The Primal-Dual Hybrid Gradient (PDHG) method is a powerful alternative that often has simpler sub-steps than ADMM, thus producing lower complexity solvers. Despite the flexibility of this method, PDHG is often impractical because it requires the careful choice of multiple stepsize parameters. There is often no intuitive way to choose these parameters to maximize efficiency, or even achieve convergence. We propose self-adaptive stepsize rules that automatically tune PDHG parameters for optimal convergence. We rigorously analyze our methods, and identify convergence rates. Numerical experiments show that adaptive PDHG has strong advantages over non-adaptive methods in terms of both efficiency and simplicity for the user. 1 Introduction Splitting methods such as ADMM [1, 2, 3] have recently become popular for solving problems in distributed computing, statistical regression, and image processing. ADMM allows complex problems to be broken down into sequences of simpler sub-steps, usually involving large-scale least squares minimizations. However, in many cases these least squares minimizations are difficult to directly compute. In such situations, the Primal-Dual Hybrid Gradient method (PDHG) [4, 5], also called the linearized ADMM [4, 6], enables the solution of complex problems with a simpler sequence of sub-steps that can often be computed in closed form. This flexibility comes at a cost – the PDHG method requires the user to choose multiple stepsize parameters that jointly determine the convergence of the method. Without having extensive analytical knowledge about the problem being solved (such as eigenvalues of linear operators), there is no intuitive way to select stepsize parameters to obtain fast convergence, or even guarantee convergence at all. In this article we introduce and analyze self-adaptive variants of PDHG – variants that automatically tune stepsize parameters to attain (and guarantee) fast convergence without user input. Applying adaptivity to splitting methods is a difficult problem. It is known that naive adaptive variants of ⇤tomg@cs.umd.edu †limin@seu.edu.cn ‡xmyuan@hkbu.edu.hk 1 ADMM are non-convergent, however recent results prove convergence when specific mathematical requirements are enforced on the stepsizes [7]. Despite this progress, the requirements for convergence of adaptive PDHG have been unexplored. This is surprising, given that stepsize selection is a much bigger issue for PDHG than for ADMM because it requires multiple stepsize parameters. The contributions of this paper are as follows. First, we describe applications of PDHG and its advantages over ADMM. We then introduce a new adaptive variant of PDHG. The new algorithm not only tunes parameters for fast convergence, but contains a line search that guarantees convergence when stepsize restrictions are unknown to the user. We analyze the convergence of adaptive PDHG, and rigorously prove convergence rate guarantees. Finally, we use numerical experiments to show the advantages of adaptivity on both convergence speed and ease of use. 2 The Primal-Dual Hybrid Gradient Method The PDHG scheme has its roots in the Arrow-Hurwicz method, which was studied by Popov [8]. Research in this direction was reinvigorated by the introduction of PDHG, which converges rapidly for a wider range of stepsizes than Arrow-Hurwicz. PDHG was first presented in [9] and analyzed for convergence in [4, 5]. It was later studied extensively for image segmentation [10]. An extensive technical study of the method and its variants is given by He and Yuan [11]. Several extensions of PDHG, including simplified iterations for the case that f or g is differentiable, are presented by Condat [12]. Several authors have also derived PDHG as a preconditioned form of ADMM [4, 6]. PDHG solves saddle-point problems of the form min x2X max y2Y f(x) + yT Ax −g(y). (1) for convex f and g. We will see later that an incredibly wide range of problems can be cast as (1). The steps of PDHG are given by 8 > > > > > > > < > > > > > > > : ˆxk+1 = xk −⌧kAT yk (2) xk+1 = arg min x2X f(x) + 1 2⌧k kx −ˆxk+1k2 (3) ˆyk+1 = yk + σkA(2xk+1 −xk) (4) yk+1 = arg min y2Y g(y) + 1 2σk ky −ˆyk+1k2 (5) where {⌧k} and {σk} are stepsize parameters. Steps (2) and (3) of the method update x, decreasing the energy (1) by first taking a gradient descent step with respect to the inner product term in (1) and then taking a “backward” or proximal step involving f. In steps (4) and (5), the energy (1) is increased by first marching up the gradient of the inner product term with respect to y, and then a backward step is taken with respect to g. PDHG has been analyzed in the case of constant stepsizes, ⌧k = ⌧and σk = σ. In particular, it is known to converge as long as σ⌧< 1/⇢(AT A) [4, 5, 11]. However, PDHG typically does not converge when non-constant stepsizes are used, even in the case that σk⌧k < 1/⇢(AT A) [13]. Furthermore, it is unclear how to select stepsizes when the spectral properties of A are unknown. In this article, we identify the specific stepsize conditions that guarantee convergence in the presence of adaptivity, and propose a backtracking scheme that can be used when the spectral radius of A is unknown. 3 Applications Linear Inverse Problems Many inverse problems and statistical regressions have the form minimize h(Sx) + f(Ax −b) (6) where f (the data term) is some convex function, h is a (convex) regularizer (such as the `1-norm), A and S are linear operators, and b is a vector of data. Recently, the alternating direction method 2 of multipliers (ADMM) has become a popular method for solving such problems. The ADMM relies on the change of variables y Sx, and generates the following sequence of iterates for some stepsize ⌧ 8 < : xk+1 = arg minx f(Ax −b) + (Sx −yk)T λk + ⌧ 2kSx −ykk2 yk+1 = arg miny h(y) + (Sxk+1 −y)T λk + ⌧ 2kSxk+1 −yk2 λk+1 = λk + ⌧(Sxk+1 −yk+1). (7) The x-update in (7) requires the solution of a (potentially large) least-square problem involving both A and S. Common formulations such as the consensus ADMM [14] solve these large sub-problems with direct matrix factorizations, however this is often impractical when either the data matrices are extremely large or fast transforms (such as FFT, DCT, or Hadamard) cannot be used. The problem (6) can be put into the form (1) using the Fenchel conjugate of the convex function h, denoted h⇤, which satisfies the important identity h(z) = max y yT z −h⇤(y) for all z in the domain of h. Replacing h in (6) with this expression involving its conjugate yields min x max y f(Ax −b) + yT Sx −h⇤(y) which is of the form (1). The forward (gradient) steps of PDHG handle the matrix A explicitly, allowing linear inverse problems to be solved without any difficult least-squares sub-steps. We will see several examples of this below. Scaled Lasso The square-root lasso [15] or scaled lasso [16] is a variable selection regression that obtains sparse solutions to systems of linear equations. Scaled lasso has several advantages over classical lasso – it is more robust to noise and it enables setting penalty parameters without cross validation [15, 16]. Given a data matrix D and a vector b, the scaled lasso finds a sparse solution to the system Dx = b by solving min x µkxk1 + kDx −bk2 (8) for some scaling parameter µ. Note the `2 term in (8) is not squared as in classical lasso. If we write µkxk1 = max ky1k1µ yT 1 x, and kDx −bk2 = max ky2k21 yT 2 (Dx −b) we can put (8) in the form (1) min x max ky1k1µ,ky2k21 yT 1 x + yT 2 (Dx −b). (9) Unlike ADMM, PDHG does not require the solution of least-squares problems involving D. Total-Variation Minimization Total variation [17] is commonly used to solve problems of the form min x µkrxk1 + 1 2kAx −fk2 2 (10) where x is a 2D array (image), r is the discrete gradient operator, A is a linear operator, and f contains data. If we add a dual variable y and write µkrxk1 = maxkyk1µ yT rx, we obtain max kyk1µ min x 1 2kAx −fk2 + yT rx (11) which is clearly of the form (1). The PDHG solver using formulation (11) avoids the inversion of the gradient operator that is required by ADMM. This is useful in many applications. For example, in compressive sensing the matrix A may be a sub-sampled orthogonal Hadamard [18], wavelet, or Fourier transform [19, 20]. In this case, the proximal sub-steps of PDHG are solvable in closed form using fast transforms because they do not involve the gradient operator r. The sub-steps of ADMM involve both the gradient operator and the matrix A simultaneously, and thus require inner loops with expensive iterative solvers. 3 4 Adaptive Formulation The convergence of PDHG can be measured by the size of the residuals, or gradients of (1) with respect to the primal and dual variables x and y. These primal and dual gradients are simply pk+1 = @f(xk+1) + AT yk+1, and dk+1 = @g(yk+1) + Axk+1 (12) where @f and @g denote the sub-differential of f and g. The sub-differential can be directly evaluated from the sequence of PDHG iterates using the optimality condition for (3): 0 2 @f(xk+1) + 1 ⌧k (xk+1 −ˆxk+1). Rearranging this yields 1 ⌧k (ˆxk+1 −xk+1) 2 @f(xk+1). The same method can be applied to (5) to obtain @g(yk+1). Applying these results to (12) yields the closed form residuals pk+1 = 1 ⌧k (xk −xk+1) −AT (yk −yk+1), dk+1 = 1 σk (yk −yk+1) −A(xk −xk+1). (13) When choosing the stepsize for PDHG, there is a tradeoff between the primal and dual residuals. Choosing a large ⌧k and a small σk drives down the primal residuals at the cost of large dual residuals. Choosing a small ⌧k and large σk results in small dual residuals but large primal errors. One would like to choose stepsizes so that the larger of pk+1 and dk+1 is as small as possible. If we assume the residuals on step k+1 change monotonically with ⌧k, then max{pk+1, dk+1} is minimized when pk+1 = dk+1. This suggests that we tune ⌧k to “balance” the primal and dual residuals. To achieve residual balancing, we first select a parameter ↵0 < 1 that controls the aggressiveness of adaptivity. On each iteration, we check whether the primal residual is at least twice the dual. If so, we increase the primal stepsize to ⌧k+1 = ⌧k/(1−↵k) and decrease the dual to σk+1 = σk(1−↵k). If the dual residual is at least twice the primal, we do the opposite. When we modify the stepsize, we shrink the adaptivity level to ↵k+1 = ⌘↵k, for ⌘2 (0, 1). We will see in Section 5 that this adaptivity level decay is necessary to guarantee convergence. In our implementation we use ↵0 = ⌘= .95. In addition to residual balancing, we check the following backtracking condition after each iteration c 2⌧k kxk+1 −xkk2 −2(yk+1 −yk)T A(xk+1 −xk) + c 2σk kyk+1 −ykk2 > 0 (14) where c 2 (0, 1) is a constant (we use c = 0.9) is our experiments. If condition (14) fails, then we shrink ⌧k and σk before the next iteration. We will see in Section 5 that the backtracking condition (14) is sufficient to guarantee convergence. The complete scheme is listed in Algorithm 1. Algorithm 1 Adaptive PDHG 1: Choose x0, y0, large ⌧0 and σ0, and set ↵0 = ⌘= 0.95. 2: while kpkk, kdkk > tolerance do 3: Compute (xk+1, yk+1) from (xk, yk) using the PDHG updates (2-5) 4: Check the backtracking condition (14) and if it fails set ⌧k ⌧k/2, σk σk/2 5: Compute the residuals (13), and use them for the following two adaptive updates 6: If 2kpk+1k < kdk+1k, then set ⌧k+1 = ⌧k(1 −↵k), σk+1 = σk/(1 −↵k), and ↵k+1 = ↵k⌘ 7: If kpk+1k > 2kdk+1k, then set ⌧k+1 = ⌧k/(1 −↵k), σk+1 = σk(1 −↵k), and ↵k+1 = ↵k⌘ 8: If no adaptive updates were triggered, then ⌧k+1 = ⌧k, σk+1 = σk, and ↵k+1 = ↵k 9: end while 5 Convergence Theory In this section, we analyze Algorithm 1 and its rate of convergence. In our analysis, we consider adaptive variants of PDHG that satisfy the following assumptions. We will see later that these assumptions guarantee convergence of PDHG with rate O(1/k). Algorithm 1 trivially satisfies Assumption A. The sequence {φk} measures the adaptive aggressiveness on iteration k, and serves the same role as ↵k in Algorithm 1. The geometric decay of ↵k ensures that Assumption B holds. The backtracking rule explicitly guarantees Assumption C. 4 Assumptions for Adaptive PDHG A The sequences {⌧k} and {σk} are positive and bounded. B The sequence {φk} is summable, where φk = max n ⌧k−⌧k+1 ⌧k , σk−σk+1 σk , 0 o . C Either X or Y is bounded, and there is a constant c 2 (0, 1) such that for all k > 0 c 2⌧k kxk+1 −xkk2 −2(yk+1 −yk)T A(xk+1 −xk) + c 2σk kyk+1 −ykk2 > 0. 5.1 Variational Inequality Formulation For notational simplicity, we define the composite vector uk = (xk, yk) and the matrices Mk = ✓ ⌧−1 k I −AT −A σ−1 k I ◆ , Hk = ✓ ⌧−1 k I 0 0 σ−1 k I ◆ , and Q(u) = ✓ AT y −Ax ◆ . (15) This notation allows us to formulate the optimality conditions for (1) as a variational inequality (VI). If u? = (x?, y?) is a solution to (1), then x? is a minimizer of (1). More formally, f(x) −f(x?) + (x −x?)T AT y? ≥0 8 x 2 X. (16) Likewise, (1) is maximized by y?, and so −g(y) + g(y?) + (y −y?)T Ax? 0 8 y 2 Y. (17) Subtracting (17) from (16) and letting h(u) = f(x) + g(y) yields the VI formulation h(u) −h(u?) + (u −u?)T Q(u?) ≥0 8u 2 ⌦, (18) where ⌦= X ⇥Y. We say ˜u is an approximate solution to (1) with VI accuracy ✏if h(u) −h(˜u) + (u −˜u)T Q(˜u) ≥−✏ 8u 2 B1(˜u) \ ⌦, (19) where B1(˜u) is a unit ball centered at ˜u. In Theorem 1, we prove O(1/k) ergodic convergence of adaptive PDHG using the VI notion of convergence. 5.2 Preliminary Results We now prove several results about the PDHG iterates that are needed to obtain a convergence rate. Lemma 1. The iterates generated by PDHG (2-5) satisfy kuk −u?k2 Mk ≥kuk+1 −ukk2 Mk + kuk+1 −u?k2 Mk. The proof of this lemma follows standard techniques, and is presented in the supplementary material. This next lemma bounds iterates generated by PDHG. Lemma 2. Suppose the stepsizes for PDHG satisfy Assumptions A, B and C. Then kuk −u?k2 Hk CU for some upper bound CU > 0. The proof of this lemma is given in the supplementary material. Lemma 3. Under Assumptions A, B, and C, we have n X k=1 ⇣ kuk −uk2 Mk −kuk −uk2 Mk−1 ⌘ 2CφCU + 2CφCHku −u?k2 where Cφ = P1 k=0 φk and CH is a constant such that ku −u?k2 Hk CHku −u?k2. 5 Proof. Using the definition of Mk we obtain n X k=1 ⇣ kuk −uk2 Mk −kuk −uk2 Mk−1 ⌘ = n X k=1 ( 1 ⌧k − 1 ⌧k−1 )kxk −xk2 + ( 1 σk − 1 σk−1 )kyk −yk2 . n X k=1 φk−1 ✓1 ⌧k kxk −xk2 + 1 σk kyk −yk2 ◆ = n X k=1 φk−1kuk −uk2 Hk 2 n X k=1 φk−1 / kuk −u?k2 Hk + ku −u?k2 Hk 0 2 n X k=1 φk−1 / CU + CHku −u?k20 2CφCU + 2CφCHku −u?k2, (20) where we have used the bound kuk −u?k2 Hk CU from Lemma 2 and Cφ = P1 k=0 φk. This final lemma provides a VI interpretation of the PDHG iteration. Lemma 4. The iterates uk = (xk, yk) generated by PDHG satisfy h(u) −h(uk+1) + (u −uk+1)T [Quk+1 + Mk(uk+1 −uk)] ≥0 8u 2 ⌦. (21) Proof. Let uk = (xk, yk) be a pair of PDHG iterates. The minimizers in (3) and (5) of PDHG satisfy the following for all x 2 X f(x) −f(xk+1) + (x −xk+1)T [AT yk+1 −AT (yk+1 −yk) + 1 ⌧k (xk+1 −xk)] ≥0, (22) and also for all y 2 Y g(y) −g(yk+1) + (y −yk+1)T [−Axk+1 −A(xk+1 −xk) + 1 σk (yk+1 −yk)] ≥0. (23) Adding these two inequalities and using the notation (15) yields the result. 5.3 Convergence Rate We now combine the above lemmas into our final convergence result. Theorem 1. Suppose that the stepsizes in PDHG satisfy Assumptions A, B, and C. Consider the sequence defined by ˜ut = 1 t t X k=1 uk. This sequence satisfies the convergence bound h(u) −h(˜ut) + (u −˜ut)T Q(˜ut) ≥ku −˜utk2 Mt −ku −u0k2 M0 −2CφCU −2CφCHku −u?k2 2t . Thus ˜ut converges to a solution of (1) with rate O(1/k) in the VI sense (19). 6 Proof. We begin with the following identity (a special case of the polar identity for vector spaces): (u −uk+1)T Mk(uk −uk+1) = 1 2(ku −uk+1k2 Mk −ku −ukk2 Mk) + 1 2kuk −uk+1k2 Mk. We apply this to the VI formulation of the PDHG iteration (18) to get h(u) −h(uk+1) + (u −uk+1)T Q(uk+1) ≥1 2 / ku −uk+1k2 Mk −ku −ukk2 Mk 0 + 1 2kuk −uk+1k2 Mk. (24) Note that (u −uk+1)T Q(u −uk+1) = (x −xk+1)AT (y −yk+1) −(y −yk+1)A(x −xk+1) = 0, (25) and so (u −uk+1)T Q(u) = (u −uk+1)T Q(uk+1). Also, Assumption C guarantees that kuk − uk+1k2 Mk ≥0. These observations reduce (24) to h(u) −h(uk+1) + (u −uk+1)T Q(u) ≥1 2 / ku −uk+1k2 Mk −ku −ukk2 Mk 0 . (26) We now sum (26) for k = 0 to t −1, and invoke Lemma 3, 2 t−1 X k=0 [h(u) −h(uk+1) + (u −uk+1)T Q(u)] ≥ku −utk2 Mt −ku −u0k2 M0 + t X k=1 h ku −ukk2 Mk−1 −ku −ukk2 Mk i ≥ku −utk2 Mt −ku −u0k2 M0 −2CφCU −2CφCHku −u?k2. (27) Because h is convex, t−1 X k=0 h(uk+1) = t X k=1 h(uk) ≥th 1 t t X k=1 uk ! = th(˜ut). The left side of (27) therefore satisfies 2t / h(u) −h(˜ut) + (u −˜ut)T Q(u) 0 ≥ 2 t−1 X k=0 ⇥ h(u) −h(uk+1) + (u −uk+1)T Q(u) ⇤ . (28) Combining (27) and (28) yields the tasty bound h(u) −h(˜ut) + (u −˜ut)T Q(u) ≥ku −utk2 Mt −ku −u0k2 M0 −2CφCU −2CφCHku −u?k2 2t . Applying (19) proves the theorem. 6 Numerical Results We apply the original and adaptive PDHG to the test problems described in Section 3. We terminate the algorithms when both the primal and dual residual norms (i.e. kpkk and kdkk) are smaller than 0.05. We consider four variants of PDHG. The method “Adapt:Backtrack” denotes adaptive PDHG with backtracking. The method “Adapt: ⌧σ = L” refers to the adaptive method without backtracking with ⌧0 = σ0 = 0.95⇢(AT A)−1 2 . We also consider the non-adaptive PDHG with two different stepsize choices. The method “Const: ⌧, σ = p L” refers to the constant-stepsize method with both stepsize parameters equal to p L = ⇢(AT A)−1 2 . The method “Const: ⌧-final” refers to the constant-stepsize method, where the stepsizes are chosen to be the final values of the stepsizes used by “Adapt: ⌧σ = L.” This final method is meant to demonstrate the performance of PDHG with a stepsize that is customized to the problem at hand, but still non-adaptive. The specifics of each test problem are described below: 7 0 50 100 150 200 250 300 10 0 101 10 2 10 3 10 4 10 5 106 10 7 Iteration Energy Gap ROF Convergence Curves, µ = 0.05 Adapt:Backtrack Adapt:τ σ = L Const:τ = √ L Const:τ -final 0 50 100 150 200 250 300 0 2 4 6 8 10 12 Iteration τk Primal Stepsize (τk) Adapt:Backtrack Adapt:τ σ = L Figure 1: (left) Convergence curves for the TV denoising experiment with µ = 0.05. The y-axis displays the difference between the objective (10) at the kth iterate and the optimal objective value. (right) Stepsize sequences, {⌧k}, for both adaptive schemes. Table 1: Iteration counts for each problem with runtime (sec) in parenthesis. Problem Adapt:Backtrack Adapt: ⌧σ = L Const: ⌧, σ = p L Const: ⌧-final Scaled Lasso (50%) 212 (0.33) 240 (0.38) 342 (0.60) 156 (0.27) Scaled Lasso (20%) 349 (0.22) 330 (0.21) 437 (0.25) 197 (0.11) Scaled Lasso (10%) 360 (0.21) 322 (0.18) 527 (0.28) 277 (0.15) TV, µ = .25 16 (0.0475) 16 (0.041) 78 (0.184) 48 (0.121) TV, µ = .05 50 (0.122) 51 (0.122) 281 (0.669) 97 (0.228) TV, µ = .01 109 (0.262) 122 (0.288) 927 (2.17) 152 (0.369) Compressive (20%) 163 (4.08) 168 (4.12) 501 (12.54) 246 (6.03) Compressive (10%) 244 (5.63) 274 (6.21) 908 (20.6) 437 (9.94) Compressive (5%) 382 (9.54) 438 (10.7) 1505 (34.2) 435 (9.95) Scaled Lasso We test our methods on (8) using the synthetic problem suggested in [21]. The test problem recovers a 1000 dimensional vector with 10 nonzero components using a Gaussian matrix. Total Variation Minimization We apply the model (10) with A = I to the “Cameraman” image. The image is scaled to the range [0, 255], and noise contaminated with standard deviation 10. The image is denoised with µ = 0.25, 0.05, and 0.01. See Table 1 for time trial results. Note the similar performance of Algorithm 1 with and without backtracking, indicating that there is no advantage to knowing the constant L = ⇢(AT A)−1. We plot convergence curves and show the evolution of ⌧k in Figure 1. Note that ⌧k is large for the first several iterates and then decays over time. Compressed Sensing We reconstruct a Shepp-Logan phantom from sub-sampled Hadamard measurements. Data is generated by applying the Hadamard transform to a 256 ⇥256 discretization of the Shepp-Logan phantom, and then sampling 5%, 10%, and 20% of the coefficients are random. 7 Discussion and Conclusion Several interesting observations can be made from the results in Table 1. First, both the backtracking (“Adapt: Backtrack”) and non-backtracking (“Adapt: ⌧σ = L”) methods have similar performance on average for the imaging problems, with neither algorithm showing consistently better performance. Thus there is no cost to using backtracking instead of knowing the ideal stepsize ⇢(AT A). Finally, the method “Const: ⌧-final” (using non-adaptive, “optimized” stepsizes) did not always outperform the constant, non-optimized stepsizes. This occurs because the true “best” stepsize choice depends on the active set of the problem and the structure of the remaining error and thus evolves over time. This is depicted in Figure 1, which shows the time dependence of ⌧k. This show that adaptive methods can achieve superior performance by evolving the stepsize over time. 8 Acknowledgments This work was supported by the National Science Foundation ( #1535902), the Office of Naval Research (#N00014-15-1-2676), and the Hong Kong Research Grants Council’s General Research Fund (HKBU 12300515). The second author was supported in part by the Program for New Century Excellent University Talents under Grant No. NCET-12-0111, and the Qing Lan Project. 8 References [1] R. Glowinski and A. Marroco. Sur l’approximation, par ´el´ements finis d’ordre un, et la r´esolution, par p´enalisation-dualit´e d’une classe de probl`emes de Dirichlet non lin´eaires. Rev. Franc¸aise d’Automat. Inf. Recherche Op´erationelle, 9(2):41–76, 1975. [2] Roland Glowinski and Patrick Le Tallec. Augmented Lagrangian and Operator-Splitting Methods in Nonlinear Mechanics. Society for Industrial and Applied Mathematics, Philadephia, PA, 1989. [3] Tom Goldstein and Stanley Osher. The Split Bregman method for `1 regularized problems. SIAM J. Img. Sci., 2(2):323–343, April 2009. [4] Ernie Esser, Xiaoqun Zhang, and Tony F. Chan. A general framework for a class of first order primal-dual algorithms for convex optimization in imaging science. SIAM Journal on Imaging Sciences, 3(4):1015– 1046, 2010. [5] Antonin Chambolle and Thomas Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. Convergence, 40(1):1–49, 2010. [6] Yuyuan Ouyang, Yunmei Chen, Guanghui Lan, and Eduardo Pasiliao Jr. An accelerated linearized alternating direction method of multipliers. arXiv preprint arXiv:1401.6607, 2014. [7] B. He, H. Yang, and S.L. Wang. Alternating direction method with self-adaptive penalty parameters for monotone variational inequalities. Journal of Optimization Theory and Applications, 106(2):337–356, 2000. [8] L.D. Popov. A modification of the arrow-hurwicz method for search of saddle points. Mathematical notes of the Academy of Sciences of the USSR, 28:845–848, 1980. [9] Mingqiang Zhu and Tony Chan. An efficient primal-dual hybrid gradient algorithm for total variation image restoration. UCLA CAM technical report, 08-34, 2008. [10] T. Pock, D. Cremers, H. Bischof, and A. Chambolle. An algorithm for minimizing the mumford-shah functional. In Computer Vision, 2009 IEEE 12th International Conference on, pages 1133–1140, 2009. [11] Bingsheng He and Xiaoming Yuan. Convergence analysis of primal-dual algorithms for a saddle-point problem: From contraction perspective. SIAM J. Img. Sci., 5(1):119–149, January 2012. [12] Laurent Condat. A primal-dual splitting method for convex optimization involving lipschitzian, proximable and linear composite terms. Journal of Optimization Theory and Applications, 158(2):460–479, 2013. [13] Silvia Bonettini and Valeria Ruggiero. On the convergence of primal–dual hybrid gradient algorithms for total variation image restoration. Journal of Mathematical Imaging and Vision, 44(3):236–253, 2012. [14] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers. Foundations and Trends in Machine Learning, 2010. [15] A. Belloni, Victor Chernozhukov, and L. Wang. Square-root lasso: pivotal recovery of sparse signals via conic programming. Biometrika, 98(4):791–806, 2011. [16] Tingni Sun and Cun-Hui Zhang. Scaled sparse linear regression. Biometrika, 99(4):879–898, 2012. [17] L Rudin, S Osher, and E Fatemi. Nonlinear total variation based noise removal algorithms. Physica. D., 60:259–268, 1992. [18] Tom Goldstein, Lina Xu, Kevin Kelly, and Richard Baraniuk. The STONE transform: Multi-resolution image enhancement and real-time compressive video. Preprint available at Arxiv.org (arXiv:1311.34056), 2013. [19] M. Lustig, D. Donoho, and J. Pauly. Sparse MRI: The application of compressed sensing for rapid MR imaging. Magnetic Resonance in Medicine, 58:1182–1195, 2007. [20] Xiaoqun Zhang and J. Froment. Total variation based fourier reconstruction and regularization for computer tomography. In Nuclear Science Symposium Conference Record, 2005 IEEE, volume 4, pages 2332–2336, Oct 2005. [21] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B, 58:267–288, 1994. 9 | 2015 | 312 |
5,828 | Regret Lower Bound and Optimal Algorithm in Finite Stochastic Partial Monitoring Junpei Komiyama The University of Tokyo junpei@komiyama.info Junya Honda The University of Tokyo honda@stat.t.u-tokyo.ac.jp Hiroshi Nakagawa The University of Tokyo nakagawa@dl.itc.u-tokyo.ac.jp Abstract Partial monitoring is a general model for sequential learning with limited feedback formalized as a game between two players. In this game, the learner chooses an action and at the same time the opponent chooses an outcome, then the learner suffers a loss and receives a feedback signal. The goal of the learner is to minimize the total loss. In this paper, we study partial monitoring with finite actions and stochastic outcomes. We derive a logarithmic distribution-dependent regret lower bound that defines the hardness of the problem. Inspired by the DMED algorithm (Honda and Takemura, 2010) for the multi-armed bandit problem, we propose PM-DMED, an algorithm that minimizes the distribution-dependent regret. PM-DMED significantly outperforms state-of-the-art algorithms in numerical experiments. To show the optimality of PM-DMED with respect to the regret bound, we slightly modify the algorithm by introducing a hinge function (PMDMED-Hinge). Then, we derive an asymptotically optimal regret upper bound of PM-DMED-Hinge that matches the lower bound. 1 Introduction Partial monitoring is a general framework for sequential decision making problems with imperfect feedback. Many classes of problems, including prediction with expert advice [1], the multi-armed bandit problem [2], dynamic pricing [3], the dark pool problem [4], label efficient prediction [5], and linear and convex optimization with full or bandit feedback [6, 7] can be modeled as an instance of partial monitoring. Partial monitoring is formalized as a repeated game played by two players called a learner and an opponent. At each round, the learner chooses an action, and at the same time the opponent chooses an outcome. Then, the learner observes a feedback signal from a given set of symbols and suffers some loss, both of which are deterministic functions of the selected action and outcome. The goal of the learner is to find the optimal action that minimizes his/her cumulative loss. Alternatively, we can define the regret as the difference between the cumulative losses of the learner and the single optimal action, and minimization of the loss is equivalent to minimization of the regret. A learner with a small regret balances exploration (acquisition of information about the strategy of the opponent) and exploitation (utilization of information). The rate of regret indicates how fast the learner adapts to the problem: a linear regret indicates the inability of the learner to find the optimal action, whereas a sublinear regret indicates that the learner can approach the optimal action given sufficiently large time steps. 1 The study of partial monitoring is classified into two settings with respect to the assumption on the outcomes. On one hand, in the stochastic setting, the opponent chooses an outcome distribution before the game starts, and an outcome at each round is an i.i.d. sample from the distribution. On the other hand, in the adversarial setting, the opponent chooses the outcomes to maximize the regret of the learner. In this paper, we study the former setting. 1.1 Related work The paper by Piccolboni and Schindelhauer [8] is one of the first to study the regret of the finite partial monitoring problem. They proposed the FeedExp3 algorithm, which attains O(T 3/4) minimax regret on some problems. This bound was later improved by Cesa-Bianchi et al. [9] to O(T 2/3), who also showed an instance in which the bound is optimal. Since then, most literature on partial monitoring has dealt with the minimax regret, which is the worst-case regret over all possible opponent’s strategies. Bart´ok et al. [10] classified the partial monitoring problems into four categories in terms of the minimax regret: a trivial problem with zero regret, an easy problem with ˜Θ( √ T) regret1, a hard problem with Θ(T 2/3) regret, and a hopeless problem with Θ(T) regret. This shows that the class of the partial monitoring problems is not limited to the bandit sort but also includes larger classes of problems, such as dynamic pricing. Since then, several algorithms with a ˜O( √ T) regret bound for easy problems have been proposed [11, 12, 13]. Among them, the Bayes-update Partial Monitoring (BPM) algorithm [13] is state-of-the-art in the sense of empirical performance. Distribution-dependent and minimax regret: we focus on the distribution-dependent regret that depends on the strategy of the opponent. While the minimax regret in partial monitoring has been extensively studied, little has been known on distribution-dependent regret in partial monitoring. To the authors’ knowledge, the only paper focusing on the distribution-dependent regret in finite discrete partial monitoring is the one by Bart´ok et al. [11], which derived O(log T) distribution-dependent regret for easy problems. In contrast to this situation, much more interest in the distribution-dependent regret has been shown in the field of multi-armed bandit problems. Upper confidence bound (UCB), the most well-known algorithm for the multi-armed bandits, has a distribution-dependent regret bound [2, 14], and algorithms that minimize the distribution-dependent regret (e.g., KL-UCB) has been shown to perform better than ones that minimize the minimax regret (e.g., MOSS), even in instances in which the distributions are hard to distinguish (e.g., Scenario 2 in Garivier et al. [15]). Therefore, in the field of partial monitoring, we can expect that an algorithm that minimizes the distribution-dependent regret would perform better than the existing ones. Contribution: the contributions of this paper lie in the following three aspects. First, we derive the regret lower bound: in some special classes of partial monitoring (e.g., multi-armed bandits), an O(log T) regret lower bound is known to be achievable. In this paper, we further extend this lower bound to obtain a regret lower bound for general partial monitoring problems. Second, we propose an algorithm called Partial Monitoring DMED (PM-DMED). We also introduce a slightly modified version of this algorithm (PM-DMED-Hinge) and derive its regret bound. PM-DMED-Hinge is the first algorithm with a logarithmic regret bound for hard problems. Moreover, for both easy and hard problems, it is the first algorithm with the optimal constant factor on the leading logarithmic term. Third, performances of PM-DMED and existing algorithms are compared in numerical experiments. Here, the partial monitoring problems consisted of three specific instances of varying difficulty. In all instances, PM-DMED significantly outperformed the existing methods when a number of rounds is large. The regret of PM-DMED on these problems quickly approached the theoretical lower bound. 2 Problem Setup This paper studies the finite stochastic partial monitoring problem with N actions, M outcomes, and A symbols. An instance of the partial monitoring game is defined by a loss matrix L = (li,j) ∈ RN×M and a feedback matrix H = (hi,j) ∈[A]N×M, where [A] = {1, 2, . . . , A}. At the beginning, the learner is informed of L and H. At each round t = 1, 2, . . . , T, a learner selects an action i(t) ∈[N], and at the same time an opponent selects an outcome j(t) ∈[M]. The learner 1Note that ˜Θ ignores a polylog factor. 2 suffers loss li(t),j(t), which he/she cannot observe: the only information the learner receives is the signal hi(t),j(t) ∈[A]. We consider a stochastic opponent whose strategy for selecting outcomes is governed by the opponent’s strategy p∗∈PM, where PM is a set of probability distributions over an M-ary outcome. The outcome j(t) of each round is an i.i.d. sample from p∗. p* C1 C3 C4 C2 C5 ||p*-C1 c||M Figure 1: Cell decomposition of a partial monitoring instance with M = 3. The goal of the learner is to minimize the cumulative loss over T rounds. Let the optimal action be the one that minimizes the loss in expectation, that is, i∗= arg mini∈[N] L⊤ i p∗, where Li is the i-th row of L. Assume that i∗is unique. Without loss of generality, we can assume that i∗= 1. Let ∆i = (Li −L1)⊤p∗∈[0, ∞) and Ni(t) be the number of rounds before the t-th in which action i is selected. The performance of the algorithm is measured by the (pseudo) regret, Regret(T) = T ∑ t=1 ∆i(t) = ∑ i∈[N] ∆iNi(T + 1), which is the difference between the expected loss of the learner and the optimal action. It is easy to see that minimizing the loss is equivalent to minimizing the regret. The expectation of the regret measures the performance of an algorithm that the learner uses. For each action i ∈[N], let Ci be the set of opponent strategies for which action i is optimal: Ci = {q ∈PM : ∀j̸=i(Li −Lj)⊤q ≤0}. We call Ci the optimality cell of action i. Each optimality cell is a convex closed polytope. Furthermore, we call the set of optimality cells {C1, . . . , CN} the cell decomposition as shown in Figure 1. Let Cc i = PM \ Ci be the set of strategies with which action i is not optimal. The signal matrix Si ∈{0, 1}A×M of action i is defined as (Si)k,j = 11 [hi,j = k], where 11 [X] = 1 if X is true and 0 otherwise. The signal matrix defined here is slightly different from the one in the previous papers (e.g., Bart´ok et al. [10]) in which the number of rows of Si is the number of the different symbols in the i-th row of H. The advantage in using the definition here is that, Sip∗∈RA is a probability distribution over symbols that the algorithm observes when it selects an action i. Examples of signal matrices are shown in Section 5. An instance of partial monitoring is globally observable if for all pairs i, j of actions, Li −Lj ∈⊕k∈[N]ImS⊤ k . In this paper, we exclusively deal with globally observable instances: in view of the minimax regret, this includes trivial, easy, and hard problems. 3 Regret Lower Bound A good algorithm should work well against any opponent’s strategy. We extend this idea by introducing the notion of strong consistency: a partial monitoring algorithm is strongly consistent if it satisfies E[Regret(T)] = o(T a) for any a > 0 and p ∈PM given L and H. In the context of the multi-armed bandit problem, Lai and Robbins [2] derived the regret lower bound of a strongly consistent algorithm: an algorithm must select each arm i until its number of draws Ni(t) satisfies log t ≲Ni(t)d(θi∥θ1), where d(θi∥θ1) is the KL divergence between the two one-parameter distributions from which the rewards of action i and the optimal action are generated. Analogously, in the partial monitoring problem, we can define the minimum number of observations. Lemma 1. For sufficiently large T, a strongly consistent algorithm satisfies: ∀q∈Cc 1 ∑ i∈[N] E[Ni(T)]D(p∗ i ∥Siq) ≥log T −o(log T), where p∗ i = Sip∗and D(p∥q) = ∑ i(p)i log ((p)i/(q)i) is the KL divergence between two discrete distributions, in which we define 0 log 0/0 = 0. Lemma 1 can be interpreted as follows: for each round t, consistency requires the algorithm to make sure that the possible risk that action i ̸= 1 is optimal is smaller than 1/t. Large deviation principle [16] states that, the probability that an opponent with strategy q behaves like p∗is 3 roughly exp (−∑ i Ni(t)D(p∗ i ∥Siq)). Therefore, we need to continue exploration of the actions until ∑ i Ni(t)D(p∗ i ∥Siq) ∼log t holds for any q ∈Cc 1 to reduce the risk to exp (−log t) = 1/t. The proof of Lemma 1 is in Appendix B in the supplementary material. Based on the technique used in Lai and Robbins [2], the proof considers a modified game in which another action i ̸= 1 is optimal. The difficulty in proving the lower bound in partial monitoring lies in that, the feedback structure can be quite complex: for example, to confirm the superiority of action 1 over 2, one might need to use the feedback from action 3 /∈{1, 2}. Still, we can derive the lower bound by utilizing the consistency of the algorithm in the original and modified games. We next derive a lower bound on the regret based on Lemma 1. Note that, the expectation of the regret can be expressed as E[Regret(T)] = ∑ i̸=1 E[Ni(t)](Li −L1)⊤p∗. Let Rj({pi}) = { {ri}i̸=j ∈[0, ∞)N−1 : inf q∈cl(Cc j ):pj=Sjq ∑ i riD(pi∥Siq) ≥1 } , where cl(·) denotes a closure. Moreover, let C∗ j (p, {pi}) = inf ri∈Rj({pi}) ∑ i̸=j ri(Li −Lj)⊤p , the optimal solution of which is R∗ j(p, {pi}) = { {ri}i̸=j ∈Rj({pi}) : ∑ i̸=j ri(Li −Lj)⊤p = C∗ j (p, {pi}) } . The value C∗ 1(p∗, {p∗ i }) log T is the possible minimum regret for observations such that the minimum divergence of p∗from any q ∈Cc 1 is larger than log T. Using Lemma 1 yields the following regret lower bound: Theorem 2. The regret of a strongly consistent algorithm is lower bounded as: E[Regret(T)] ≥C∗ 1(p∗, {p∗ i }) log T −o(log T). From this theorem, we can naturally measure the harshness of the instance by C∗ 1(p∗, {p∗ i }), whereas the past studies (e.g., Vanchinathan et al. [13]) ambiguously define the harshness as the closeness to the boundary of the cells. Furthermore, we show in Lemma 5 in the Appendix that C∗ 1(p∗, {p∗ i }) = O(N/∥p∗−Cc 1∥2 M): the regret bound has at most quadratic dependence on ∥p∗−Cc 1∥M, which is defined in Appendix D as the closeness of p∗to the boundary of the optimal cell. 4 PM-DMED Algorithm In this section, we describe the partial monitoring deterministic minimum empirical divergence (PMDMED) algorithm, which is inspired by DMED [17] for solving the multi-armed bandit problem. Let ˆpi(t) ∈[0, 1]A be the empirical distribution of the symbols under the selection of action i. Namely, the k-th element of ˆpi(t) is (∑t−1 t′=1 11[i(t′) = i∩hi(t′),j(t′) = k])/(∑t−1 t′=1 11[i(t′) = i]). We sometimes omit t from ˆpi when it is clear from the context. Let the empirical divergence of q ∈PM be ∑ i∈[N] Ni(t)D(ˆpi(t)∥Siq), the exponential of which can be considered as a likelihood that q is the opponent’s strategy. The main routine of PM-DMED is in Algorithm 1. At each loop, the actions in the current list ZC are selected once. The list for the actions in the next loop ZN is determined by the subroutine in Algorithm 2. The subroutine checks whether the empirical divergence of each point q ∈Cc 1 is larger than log t or not (Eq. (3)). If it is large enough, it exploits the current information by selecting ˆi(t), the optimal action based on the estimation ˆp(t) that minimizes the empirical divergence. Otherwise, it selects the actions with the number of observations below the minimum requirement for making the empirical divergence of each suboptimal point q ∈Cc 1 larger than log t. Unlike the N-armed bandit problem in which a reward is associated with an action, in the partial monitoring problem, actions, outcomes, and feedback signals can be intricately related. Therefore, we need to solve a non-trivial optimization to run PM-DMED. Later in Section 5, we discuss a practical implementation of the optimization. 4 Algorithm 1 Main routine of PM-DMED and PM-DMED-Hinge 1: Initialization: select each action once. 2: ZC, ZR ←[N], ZN ←∅. 3: while t ≤T do 4: for i(t) ∈ZC in an arbitrarily fixed order do 5: Select i(t), and receive feedback. 6: ZR ←ZR \ {i(t)}. 7: Add actions to ZN in accordance with {Algorithm 2 (PM-DMED) Algorithm 3 (PM-DMED-Hinge). 8: t ←t + 1. 9: end for 10: ZC, ZR ←ZN, ZN ←∅. 11: end while Algorithm 2 PM-DMED subroutine for adding actions to ZN (without duplication). 1: Parameter: c > 0. 2: Compute an arbitrary ˆp(t) such that ˆp(t) ∈arg min q ∑ i Ni(t)D(ˆpi(t)∥Siq) (1) and let ˆi(t) = arg mini L⊤ i ˆp(t). 3: If ˆi(t) /∈ZR then put ˆi(t) into ZN. 4: If there are actions i /∈ZR such that Ni(t) < c √ log t (2) then put them into ZN. 5: If {Ni(t)/ log t}i̸=ˆi(t) /∈Rˆi(t)({ˆpi(t)}) (3) then compute some {r∗ i }i̸=ˆi(t) ∈R∗ ˆi(t)(ˆp(t), {ˆpi(t)}) (4) and put all actions i such that i /∈ZR and r∗ i > Ni(t)/ log t into ZN. Necessity of √log T exploration: PM-DMED tries to observe each action to some extent (Eq. (2)), which is necessary for the following reason: consider a four-state game characterized by L = 0 1 1 0 10 1 0 0 10 0 1 0 11 11 11 11 , H = 1 1 1 1 1 2 2 3 1 2 2 3 1 1 2 2 , and p∗= (0.1, 0.2, 0.3, 0.4)⊤. The optimal action here is action 1, which does not yield any useful information. By using action 2, one receives three kinds of symbols from which one can estimate (p∗)1, (p∗)2 + (p∗)3, and (p∗)4, where (p∗)j is the j-th component of p∗. From this, an algorithm can find that (p∗)1 is not very small and thus the expected loss of actions 2 and 3 is larger than that of action 1. Since the feedback of actions 2 and 3 are the same, one may also use action 3 in the same manner. However, the loss per observation is 1.2 and 1.3 for actions 2 and 3, respectively, and thus it is better to use action 2. This difference comes from the fact that (p∗)2 = 0.2 < 0.3 = (p∗)3. Since an algorithm does not know p∗beforehand, it needs to observe action 4, the only source for distinguishing (p∗)2 from (p∗)3. Yet, an optimal algorithm cannot select it more than Ω(log T) times because it affects the O(log T) factor in the regret. In fact, O((log T)a) observations of action 4 with some a > 0 are sufficient to be convinced that (p∗)2 < (p∗)3 with probability 1 −o(1/T poly(a)). For this reason, PM-DMED selects each action √log t times. 5 Experiment Following Bart´ok et al. [11], we compared the performances of algorithms in three different games: the four-state game (Section 4), a three-state game and dynamic pricing. Experiments on the Narmed bandit game was also done, and the result is shown in Appendix C.1 . The three-state game, which is classified as easy in terms of the minimax regret, is characterized by: L = ( 1 1 0 0 1 1 1 0 1 ) and H = ( 1 2 2 2 1 2 2 2 1 ) . The signal matrices of this game are, S1 = ( 1 0 0 0 1 1 ) , S2 = ( 0 1 0 1 0 1 ) , and S3 = ( 0 0 1 1 1 0 ) . 5 100 101 102 103 104 105 106 t: round 0 20 40 60 80 100 120 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (a) three-states, benign 100 101 102 103 104 105 106 t: round 0 100 200 300 400 500 600 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (b) three-states, intermediate 103 104 105 106 t: round 0 500 1000 1500 2000 2500 3000 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (c) three-states, harsh 100 101 102 103 104 105 106 t: round 0 200 400 600 800 1000 1200 1400 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (d) dynamic pricing, benign 100 101 102 103 104 105 106 t: round 0 1000 2000 3000 4000 5000 6000 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (e) dynamic pricing, intermediate 103 104 105 106 t: round 0 20000 40000 60000 80000 100000 120000 R(t): regret Random FeedExp3 CBP BPM-LEAST BPM-TS PM-DMED LB (f) dynamic pricing, harsh 100 101 102 103 104 105 106 t: round 0 500 1000 1500 2000 R(t): regret Random CBP BPM-LEAST BPM-TS PM-DMED LB (g) four-states Figure 2: Regret-round semilog plots of algorithms. The regrets are averaged over 100 runs. LB is the asymptotic regret lower bound of Theorem 2. Dynamic pricing, which is classified as hard in terms of the minimax regret, is a game that models a repeated auction between a seller (learner) and a buyer (opponent). At each round, the seller sets a price for a product, and at the same time, the buyer secretly sets a maximum price he is willing to pay. The signal is “buy” or “no-buy”, and the seller’s loss is either a given constant (no-buy) or the difference between the buyer’s and the seller’s prices (buy). The loss and feedback matrices are: L = 0 1 . . . N −1 c 0 . . . N −2 ... ... ... ... c . . . c 0 and H = 2 2 . . . 2 1 2 . . . 2 ... ... ... ... 1 . . . 1 2 , where signals 1 and 2 correspond to no-buy and buy. The signal matrix of action i is Si = ( i−1 z }| { 1 . . . 1 0 . . . 0 M−i+1 z }| { 0 . . . 0 1 . . . 1 ) . Following Bart´ok et al. [11], we set N = 5, M = 5, and c = 2. In our experiments with the three-state game and dynamic pricing, we tested three settings regarding the harshness of the opponent: at the beginning of a simulation, we sampled 1,000 points uniformly at random from PM, then sorted them by C∗ 1(p∗, {p∗ i }). We chose the top 10%, 50%, and 90% harshest ones as the opponent’s strategy in the harsh, intermediate, and benign settings, respectively. We compared Random, FeedExp3 [8], CBP [11] with α = 1.01, BPM-LEAST, BPM-TS [13], and PM-DMED with c = 1. Random is a naive algorithm that selects an action uniformly random. FeedExp3 requires a matrix G such that H⊤G = L⊤, and thus one cannot apply it to the four-state game. CBP is an algorithm of logarithmic regret for easy games. The parameters η and f(t) of CBP were set in accordance with Theorem 1 in their paper. BPM-LEAST is a Bayesian algorithm with ˜O( √ T) regret for easy games, and BPM-TS is a heuristic of state-of-the-art performance. The priors of two BPMs were set to be uninformative to avoid a misspecification, as recommended in their paper. 6 Algorithm 3 PM-DMED-Hinge subroutine for adding actions to ZN (without duplication). 1: Parameters: c > 0, f(n) = bn−1/2 for b > 0, α(t) = a/(log log t) for a > 0. 2: Compute arbitrary ˆp(t) which satisfies ˆp(t) ∈arg min q ∑ i Ni(t)(D(ˆpi(t)∥Siq) −f(Ni(t)))+ (5) and let ˆi(t) = arg mini L⊤ i ˆp(t). 3: If ˆi(t) /∈ZR then put ˆi(t) into ZN. 4: If ˆp(t) /∈Cˆi(t),α(t) (6) or there exists an action i such that D(ˆpi(t)∥Siˆp(t)) > f(Ni(t)) (7) then put all actions i /∈ZR into ZN. 5: If there are actions i such that Ni(t) < c √ log t (8) then put the actions not in ZR into ZN. 6: If {Ni(t)/ log t}i̸=ˆi(t) /∈Rˆi(t)({ˆpi(t), f(Ni(t))}) (9) then compute some {r∗ i }i̸=ˆi(t) ∈R∗ ˆi(t)(ˆp(t), {ˆpi(t), f(Ni(t))}) (10) and put all actions such that i /∈ZR and r∗ i > Ni(t)/ log t into ZN. If such r∗ i is infeasible then put all action i /∈ZR into ZN. The computation of ˆp(t) in (1) and the evaluation of the condition in (3) involve convex optimizations, which were done with Ipopt [18]. Moreover, obtaining {r∗ i } in (4) is classified as a linear semi-infinite programming (LSIP) problem, a linear programming (LP) with finitely many variables and infinitely many constraints. Following the optimization of BPM-LEAST [13], we resorted to a finite sample approximation and used the Gurobi LP solver [19] in computing {r∗ i }: at each round, we sampled 1,000 points from PM, and relaxed the constraints on the samples. To speed up the computation, we skipped these optimizations in most rounds with large t and used the result of the last computation. The computation of the coefficient C∗ 1(p∗, {p∗ i }) of the regret lower bound (Theorem 2) is also an LSIP, which was approximated by 100,000 sample points from Cc 1. The experimental results are shown in Figure 2. In the four-state game and the other two games with an easy or intermediate opponent, PM-DMED outperforms the other algorithms when the number of rounds is large. In particular, in the dynamic pricing game with an intermediate opponent, the regret of PM-DMED at T = 106 is ten times smaller than those of the other algorithms. Even in the harsh setting in which the minimax regret matters, PM-DMED has some advantage over all algorithms except for BPM-TS. With sufficiently large T, the slope of an optimal algorithm should converge to LB. In all games and settings, the slope of PM-DMED converges to LB, which is empirical evidence of the optimality of PM-DMED. 6 Theoretical Analysis Section 5 shows that the empirical performance of PM-DMED is very close to the regret lower bound in Theorem 2. Although the authors conjecture that PM-DMED is optimal, it is hard to analyze PM-DMED. The technically hardest part arises from the case in which the divergence of each action is small but not yet fully converged. To circumvent this difficulty, we can introduce a discount factor. Let Rj({pi, δi})= { {ri}i̸=j ∈[0, ∞)N−1 : inf q∈cl(Cc j ):D(pj∥Sjq)≤δj ∑ i ri(D(pi∥Siq)−δi)+ ≥1 } , (11) where (X)+ = max(X, 0). Note that Rj({pi, δi}) in (11) is a natural generalization of Rj({pi}) in Section 4 in the sense that Rj({pi, 0}) = Rj({pi}). Event {Ni(t)/ log t}i̸=1 ∈R1({ˆpi(t), δi}) means that the number of observations {Ni(t)} is enough to ensure that the “{δi}-discounted” empirical divergence of each q ∈Cc 1 is larger than log t. Analogous to Rj({pi, δi}), we define 7 C∗ j (p, {pi, δi}) = inf {ri}i̸=j∈Rj({pi,δi})) ∑ i̸=j ri(Lj −Li)⊤p and its optimal solution by R∗ j(p, {pi, δi}) = { {ri}i̸=j ∈Rj({pi, δi}) : ∑ i̸=j ri(Lj −Li)⊤p = C∗ j (p, {pi, δi}) } . We also define Ci,α = {p ∈PM : L⊤ i p + α ≤minj̸=i L⊤ j p}, the optimal region of action i with margin. PM-DMED-Hinge shares the main routine of Algorithm 1 with PM-DMED and lists the next actions by Algorithm 3. Unlike PM-DMED, it (i) discounts f(Ni(t)) from the empirical divergence D(ˆpi(t)∥Siq). Moreover, (ii) when ˆp(t) is close to the cell boundary, it encourages more exploration to identify the cell it belongs to by Eq. (6). Theorem 3. Assume that the following regularity conditions hold for p∗. (1) R∗ 1(p, {pi, δi}) is unique at p = p∗, pi = Sip∗, δi = 0. Moreover, (2) for Sδ = {q : D(p∗ 1∥S1q) ≤δ}, it holds that cl(int(Cc 1) ∩Sδ) = cl(cl(Cc 1) ∩Sδ) for all δ ≥0 in some neighborhood of δ = 0, where cl(·) and int(·) denote the closure and the interior, respectively. Then, E[Regret(T)] ≤C∗ 1(p∗, {p∗ i }) log T + o(log T) . We prove this theorem in Appendix D . Recall that R∗ 1(p, {ˆpi(t), δi}) is the set of optimal solutions of an LSIP. In this problem, KKT conditions and the duality theorem apply as in the case of finite constraints; thus, we can check whether Condition 1 holds or not for each p∗(see, e.g., Ito et al. [20] and references therein). Condition 2 holds in most cases, and an example of an exceptional case is shown in Appendix A. Theorem 3 states that PM-DMED-Hinge has a regret upper bound that matches the lower bound of Theorem 2. Corollary 4. (Optimality in the N-armed bandit problem) In the N-armed Bernoulli bandit problem, the regularity conditions in Theorem 3 always hold. Moreover, the coefficient of the leading logarithmic term in the regret bound of the partial monitoring problem is equal to the bound given in Lai and Robbins [2]. Namely, C∗ 1(p∗, {p∗ i }) = ∑N i̸=1(∆i/d(µi∥µ1)), where d(p∥q) = p log (p/q) + (1 −p) log ((1 −p)/(1 −q)) is the KL-divergence between Bernoulli distributions. Corollary 4, which is proven in Appendix C, states that PM-DMED-Hinge attains the optimal regret of the N-armed bandit if we run it on an N-armed bandit game represented as partial monitoring. Asymptotic analysis: it is Theorem 6 where we lose the finite-time property. This theorem shows the continuity of the optimal solution set R∗ 1(p, {pi, δi}) of C∗ j (p, {pj}), which does not mention how close R∗ 1(p, {pi, δi}) is to R∗ 1(p∗, {p∗ i , 0}) if max{∥p−p∗∥M, maxi ∥pi−p∗ i ∥M, maxi δi} ≤δ for given δ. To obtain an explicit bound, we need sensitivity analysis, the theory of the robustness of the optimal value and the solution for small deviations of its parameters (see e.g., Fiacco [21]). In particular, the optimal solution of partial monitoring involves an infinite number of constraints, which makes the analysis quite hard. For this reason, we will not perform a finite-time analysis. Note that, the N-armed bandit problem is a special instance in which we can avoid solving the above optimization and a finite-time optimal bound is known. Necessity of the discount factor: we are not sure whether discount factor f(n) in PM-DMEDHinge is necessary or not. We also empirically tested PM-DMED-Hinge: although it is better than the other algorithms in many settings, such as dynamic pricing with an intermediate opponent, it is far worse than PM-DMED. We found that our implementation, which uses the Ipopt nonlinear optimization solver, was sometimes inaccurate at optimizing (5): there were some cases in which the true p∗satisfies ∀i∈[N]D(ˆpi(t)∥Sip∗) −f(Ni(t)) = 0, while the solution ˆp(t) we obtained had non-zero hinge values. In this case, the algorithm lists all actions from (7), which degrades performance. Determining whether the discount factor is essential or not is our future work. Acknowledgements The authors gratefully acknowledge the advice of Kentaro Minami and sincerely thank the anonymous reviewers for their useful comments. This work was supported in part by JSPS KAKENHI Grant Number 15J09850 and 26106506. 8 References [1] Nick Littlestone and Manfred K. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212–261, February 1994. [2] T. L. Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [3] Robert D. Kleinberg and Frank Thomson Leighton. The value of knowing a demand curve: Bounds on regret for online posted-price auctions. In FOCS, pages 594–605, 2003. [4] Alekh Agarwal, Peter L. Bartlett, and Max Dama. Optimal allocation strategies for the dark pool problem. In AISTATS, pages 9–16, 2010. [5] Nicol`o Cesa-Bianchi, G´abor Lugosi, and Gilles Stoltz. Minimizing regret with label efficient prediction. IEEE Transactions on Information Theory, 51(6):2152–2162, 2005. [6] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, pages 928–936, 2003. [7] Varsha Dani, Thomas P. Hayes, and Sham M. Kakade. Stochastic linear optimization under bandit feedback. In COLT, pages 355–366, 2008. [8] Antonio Piccolboni and Christian Schindelhauer. Discrete prediction games with arbitrary feedback and loss. In COLT, pages 208–223, 2001. [9] Nicol`o Cesa-Bianchi, G´abor Lugosi, and Gilles Stoltz. Regret minimization under partial monitoring. Math. Oper. Res., 31(3):562–580, 2006. [10] G´abor Bart´ok, D´avid P´al, and Csaba Szepesv´ari. Minimax regret of finite partial-monitoring games in stochastic environments. In COLT, pages 133–154, 2011. [11] G´abor Bart´ok, Navid Zolghadr, and Csaba Szepesv´ari. An adaptive algorithm for finite stochastic partial monitoring. In ICML, 2012. [12] G´abor Bart´ok. A near-optimal algorithm for finite partial-monitoring games against adversarial opponents. In COLT, pages 696–710, 2013. [13] Hastagiri P. Vanchinathan, G´abor Bart´ok, and Andreas Krause. Efficient partial monitoring with prior information. In NIPS, pages 1691–1699, 2014. [14] Peter Auer, Nicol´o Cesa-bianchi, and Paul Fischer. Finite-time Analysis of the Multiarmed Bandit Problem. Machine Learning, 47:235–256, 2002. [15] Aur´elien Garivier and Olivier Capp´e. The KL-UCB algorithm for bounded stochastic bandits and beyond. In COLT, pages 359–376, 2011. [16] Amir Dembo and Ofer Zeitouni. Large deviations techniques and applications. Applications of mathematics. Springer, New York, Berlin, Heidelberg, 1998. [17] Junya Honda and Akimichi Takemura. An Asymptotically Optimal Bandit Algorithm for Bounded Support Models. In COLT, pages 67–79, 2010. [18] Andreas W¨achter and Carl D. Laird. Interior point optimizer (IPOPT). [19] Gurobi Optimization Inc. Gurobi optimizer. [20] S. Ito, Y. Liu, and K. L. Teo. A dual parametrization method for convex semi-infinite programming. Annals of Operations Research, 98(1-4):189–213, 2000. [21] Anthony V. Fiacco. Introduction to sensitivity and stability analysis in nonlinear programming. Academic Press, New York, 1983. 9 | 2015 | 313 |
5,829 | Online Prediction at the Limit of Zero Temperature Mark Herbster Stephen Pasteris Department of Computer Science University College London London WC1E 6BT, England, UK {m.herbster,s.pasteris}@cs.ucl.ac.uk Shaona Ghosh ECS University of Southampton Southampton, UK SO17 1BJ ghosh.shaona@gmail.com Abstract We design an online algorithm to classify the vertices of a graph. Underpinning the algorithm is the probability distribution of an Ising model isomorphic to the graph. Each classification is based on predicting the label with maximum marginal probability in the limit of zero-temperature with respect to the labels and vertices seen so far. Computing these classifications is unfortunately based on a #Pcomplete problem. This motivates us to develop an algorithm for which we give a sequential guarantee in the online mistake bound framework. Our algorithm is optimal when the graph is a tree matching the prior results in [1]. For a general graph, the algorithm exploits the additional connectivity over a tree to provide a per-cluster bound. The algorithm is efficient, as the cumulative time to sequentially predict all of the vertices of the graph is quadratic in the size of the graph. 1 Introduction Semi-supervised learning is now a standard methodology in machine learning. A common approach in semi-supervised learning is to build a graph [2] from a given set of labeled and unlabeled data with each datum represented as a vertex. The hope is that the constructed graph will capture either the cluster [3] or manifold [4] structure of the data. Typically, an edge in this graph indicates the expectation that the joined data points are more likely to have the same label. One method to exploit this representation is to use the semi-norm induced by the Laplacian of the graph [5, 4, 6, 7]. A shared idea of the Laplacian semi-norm based approaches is that the smoothness of a boolean labeling of the graph is measured via the “cut”, which is just the number of edges that connect disagreeing labels. In practice the semi-norm is then used as a regularizer in which the optimization problem is relaxed from boolean to real values. Our approach also uses the “cut”, but unrelaxed, to define an Ising distribution over the vertices of the graph. Predicting with the vertex marginals of an Ising distribution in the limit of zero temperature was shown to be optimal in the mistake bound model [1, Section 4.1] when the graph is a tree. The exact computation of marginal probabilities in the Ising model is intractable on non-trees [8]. However, in the limit of zero temperature, a rich combinatorial structure called the Picard-Queyranne graph [9] emerges. We exploit this structure to give an algorithm which 1) is optimal on trees, 2) has a quadratic cumulative computational complexity, and 3) has a mistake bound on generic graphs that is stronger than previous bounds in many natural cases. The paper is organized as follows. In the remainder of this section, we introduce the Ising model and lightly review previous work in the online mistake bound model for predicting the labeling of a graph. In Section 2 we review our key technical tool the Picard-Queyranne graph [9] and explain the required notation. In the body of Section 3 we provide a mistake bound analysis of our algorithm as well as the intractable 0-Ising algorithm and then conclude with a detailed comparison to the state of the art. In the appendices we provide proofs as well as preliminary experimental results. Ising model in the limit zero temperature. In our setting, the parameters of the Ising model are an n-vertex graph G = (V (G), E(G)) and a temperature parameter τ > 0, where V (G) = 1 {1, . . . , n} denotes the vertex set and E(G) denotes the edge set. Each vertex of this graph may be labeled with one of two states {0, 1} and thus a labeling of a graph may be denoted by a vector u ∈{0, 1}n where ui denotes the label of vertex i. The cutsize of a labeling u is defined as φG(u) := P (i,j)∈E(G) |ui −uj|. The Ising probability distribution over labelings of G is then defined as pG τ (u) ∝exp −1 τ φG(u) where τ > 0 is the temperature parameter. In our online setting at the beginning of trial t + 1 we will have already received an example sequence, St, of t vertex-label pairs (i1, y1), . . . , (it, yt) where pair (i, y) ∈V (G)×{0, 1}. We use pG τ (uv = y|St) := pG τ (uv = y|ui1 = y1, . . . , uit = yt) to denote the marginal probability that vertex v has label y given the previously labeled vertices of St. For convenience we also define the marginalized cutsize φG(u|St) to be equal to φG(u) if ui1 = y1, . . . , uit = yt and equal to undefined otherwise. Our prediction ˆyt+1 of vertex it+1 is then the label with maximal marginal probability in the limit of zero temperature, thus ˆy0I t+1(it+1|St) := argmax y∈{0,1} lim τ→0 pG τ (uit+1 = y|ui1 = y1, . . . , uit = yt) . [0-Ising] (1) Note the prediction is undefined if the labels are equally probable. In low temperatures the mass of the marginal is dominated by the labelings consistent with St and the proposed label of vertex it+1 of minimal cut; as we approach zero, ˆyt+1 is the label consistent with the maximum number of labelings of minimal cut. Thus if k := min u∈{0,1}nφG(u|S) then we have that ˆy0I(v|S) = ® 0 |u ∈{0, 1}n : φG(u|(S, (v, 0))) = k| > |u ∈{0, 1}n : φG(u|(S, (v, 1))) = k| 1 |u ∈{0, 1}n : φG(u|(S, (v, 0))) = k| < |u ∈{0, 1}n : φG(u|(S, (v, 1))) = k| . The problem of counting minimum label-consistent cuts was shown to be #P-complete in [10] and further computing ˆy0I(v|S) is also NP-hard (see Appendix G). In Section 2.1 we introduce the Picard-Queyranne graph [9] which captures the combinatorial structure of the set of minimum-cuts. We then use this simplifying structure as a basis to design a heuristic approximation to ˆy0I(v|S) with a mistake bound guarantee. Predicting the labelling of a graph in the mistake bound model. We prove performance guarantees for our method in the mistake bound model introduced by Littlestone [11]. On the graph this model corresponds to the following game. Nature presents a graph G; Nature queries a vertex i1 ∈V (G) = INn; the learner predicts the label of the vertex ˆy1 ∈{0, 1}; nature presents a label y1; nature queries a vertex i2; the learner predicts ˆy2; and so forth. The learner’s goal is to minimize the total number of mistakes M = |{t : ˆyt ̸= yt}|. If nature is adversarial, the learner will always make a “mistake”, but if nature is regular or simple, there is hope that a learner may incur only a few mistakes. Thus, a central goal of online learning is to design algorithms whose total mistakes can be bounded relative to the complexity of nature’s labeling. The graph labeling problem has been studied extensively in the online literature. Here we provide a rough discussion of the two main approaches for graph label prediction, and in Section 3.3 we provide a more detailed comparison. The first approach is based on the graph Laplacian [12, 13, 14]; it provides bounds that utilize the additional connectivity of non-tree graphs, which are particularly strong when the graph contains uniformly-labeled clusters of small (resistance) diameter. The drawbacks of this approach are that the bounds are weaker on graphs with large diameter and that the computation times are slower. The second approach is to estimate the original graph with an appropriately selected tree or “path” graph [15, 16, 1, 17]; this leads to faster computation times, and bounds that are better on graphs with large diameters. The algorithm treeOpt [1] is optimal on trees. These algorithms may be extended to non-tree graphs by first selecting a spanning tree uniformly at random [16] and then applying the algorithm to the sampled tree. This randomized approach enables expected mistake bounds which exploit the cluster structure in the graph. The bounds we prove for the NP-hard 0-Ising prediction and our heuristic are most similar to the “small p” bounds proven for the p-seminorm interpolation algorithm [14]. Although these bounds are not strictly comparable, a key strength of our approach is that the new bounds often improve when the graph contains uniformly-labeled clusters of varying diameters. Furthermore, when the graph is a tree we match the optimal bounds of [1]. Finally, the cumulative time required to compute the complete labeling of a graph is quadratic in the size of the graph for our algorithm, while [14] requires the minimization of a non-strongly convex function (on every trial) which is not differentiable when p →1. 2 2 Preliminaries An (undirected) graph G is a pair of sets (V, E) such that E is a set of unordered pairs of distinct elements from V . We say that R is a subgraph R ⊆G iff V (R) ⊆V (G) and E(R) = {(i, j) : i, j ∈V (R), (i, j) ∈E(G)}. Given any subgraph R ⊆G, we define its boundary (or inner border) ∂0(R), its neighbourhood (or exterior border) ∂e(R) respectively as ∂0(R) := {j : i ̸∈V (R), j ∈ V (R), (i, j) ∈E(G)}, and ∂e(R) := {i : i ̸∈V (R), j ∈V (R), (i, j) ∈E(G)}, and its exterior edge border ∂E e (R) := {(i, j) : i ̸∈V (R), j ∈V (R), (i, j) ∈E(G)}. The length of a subgraph P is denoted by |P| := |E(P)| and we denote the diameter of a graph by D(G). A pair of vertices v, w ∈V (G) are κ-connected if there exist κ edge-disjoint paths connecting them. The connectivity of a graph, κ(G), is the maximal value of κ such that every pair of points in G is κ-connected. The atomic number Nκ(G) of a graph at connectivity level κ is the minimum cardinality c of a partition of G into subgraphs {R1, . . . , Rc} such that κ(Ri) ≥κ for all 1 ≤i ≤c. Our results also require the use of directed-, multi-, and quotient- graphs. Every undirected graph also defines a directed graph where each undirected edge (i, j) is represented by directed edges (i, j) and (j, i). An orientation of an undirected graph is an assignment of a direction to each edge, turning the initial graph into a directed graph. In a multi-graph the edge set is now a multi-set and thus there may be multiple edges between two vertices. A quotient-graph G is defined from a graph G and a partition of its vertex set {Vi}N i=1 so that V (G) := {Vi}N i=1 (we often call these vertices supervertices to emphasize that they are sets) and the multiset E(G) := {(I, J) : I, J ∈V (G), I ̸= J, i ∈ I, j ∈J, (i, j) ∈E(G)}. We commonly construct a quotient-graph G by “merging” a collection of super-vertices, for example, in Figure 2 from 2a to 2b where 6 and 9 are merged to “6/9” and also the five merges that transforms 2c to 2d. The set of all label-consistent minimum-cuts in a graph with respect to an example sequence S is U∗ G(S) := argminu∈{0,1}n φG(u|S). The minimum is typically non-unique. For example in Figure 2a, the vertex sets {v1, . . . , v4}, {v5, . . . , v12} correspond to one label-consistent minimum-cut and {v1, . . . , v5, v7, v8}, {v6, v9 . . . , v12} to another (the cutsize is 3). The (uncapacitated) maximum flow is the number of edge-disjoint paths between a source and target vertex. Thus in Figure 2b between vertex “1” and vertex “6/9” there are at most 3 simultaneously edge-disjoint paths; these are also not unique, as one path must pass through either vertices ⟨v11, v12⟩or vertices ⟨v11, v10, v12⟩. Figure 2c illustrates one such flow F (just the directed edges). For convenience it is natural to view the maximum flow or the label-consistent minimum-cut as being with respect to only two vertices as in Figure 2a transformed to Figure 2b so that H ←merge(G, {v6, v9}). The “flow” and the “cut” are related by Menger’s theorem which states that the minimum-cut with respect to a source and target vertex is equal to the max flow between them. Given a connected graph H and source and target vertices s, t the Ford-Fulkerson algorithm [18] can find k edge-disjoint paths from s to t in time O(k|E(H)|) where k is the value of the max flow. 2.1 The Picard-Queyranne graph Given a set of labels there may be multiple label-consistent minimum-cuts as well as multiple maximum flows in a graph. The Picard-Queyranne (PQ) graph [9] reduces this multiplicity as far as is possible with respect to the indeterminacy of the maximum flow. The vertices of the PQ-graph are defined as a super-vertex set on a partition of the original graph’s vertex set. Two vertices are contained in the same super-vertex iff they have the same label in every label-consistent minimum-cut. An edge between two vertices defines an analogous edge between two super-vertices iff that edge is conserved in every maximum flow. Furthermore the edges between super-vertices strictly orient the labels in any label-consistent minimum-cut as may be seen in the formal definition that follows. First we introduce the following useful notations: let kG,S := min{φG(u|S) : u ∈{0, 1}n} denote the minimum-cutsize of G with respect to S; let i S∼j denote an equivalence relation between vertices in V (G) where i S∼j iff ∀u ∈U∗ G(S) : ui = uj; and then we define, Definition 1 ([9]). The Picard-Queyranne graph G(G, S) is derived from graph G and non-trivial example sequence S. The graph is an orientation of the quotient graph derived from the partition {⊥, I2, . . . , IN−1,⊤} of V (G) induced by S∼. The edge set of G is constructed of kG,S edge-disjoint paths starting at source vertex ⊥and terminating at target vertex ⊤. A labeling u ∈{0, 1}n is in U∗ G(S) iff 1. i ∈⊥implies ui = 0 and i ∈⊤implies ui = 1 3 2. i, j ∈H implies ui = uj 3. i ∈I, j ∈J, (I, J) ∈E(G), and ui = 1 implies uj = 1 where ⊥and ⊤are the source and target vertices and H, I, J ∈V (G). As G(G, S) is a DAG it naturally defines a partial order (V (G), ≤G) on the vertex set where I ≤G J if there exists a path starting at I and ending at J. The least and greatest elements of the partial order are ⊥and ⊤. The notation ↑R and ↓R denote the up set and down set of R. Given the set U∗of all label-consistent minimum-cuts then if u ∈U∗there exists an antichain A ⊆V (G) \ {⊤} such that ui = 0 when i ∈I ∈↓A otherwise ui = 1; furthermore for every antichain there exists a labelconsistent minimum-cut. The simple structure of G(G, S) was utilized by [9] to enable the efficient algorithmic enumeration of minimum-cuts. However, the cardinality of this set of all label-consistent minimum-cuts is potentially exponential in the size of the PQ-graph and the exact computation of the cardinality was later shown #P-complete in [10]. In Figure 1 we give the algorithm from [9, 19] PicardQueyranneGraph(graph: G; example sequence: S = (vk, yk)t k=1) 1. (H, s, t) ←SourceTargetMerge(G, S) 2. F ←MaxFlow(H, s, t) 3. I ←(V (I), E(I)) where V (I) := V (H) and E(I) := {(i, j) : (i, j) ∈E(H), (j, i) ̸∈F} 4. G0 ←QuotientGraph(StronglyConnectedComponents(I), H) 5. E(G) ←E(G0); V (G) ←V (G0) except ⊥(G) ←⊥(G0) ∪{vk : k ∈INt, yk = 0} and ⊤(G) ←⊤(G0) ∪{vk : k ∈INt, yk = 1} Return: directed graph: G Figure 1: Computing the Picard-Queyranne graph 1 3 2 4 11 7 8 5 10 6 12 9 (a) Graph G and S = ⟨(v1, 0), (v6, 1), (v9, 1)⟩ 1 3 2 4 11 7 8 5 10 12 6/9 (b) Graph H (step 1 in Figure 1) 1 3 2 4 11 7 8 5 10 12 6/9 (c) Graph I (step 3 in Figure 1) ⊥ A B C ⊥ (d) PQ Graph G (step 4 in Figure 1) Figure 2: Building a Picard-Queyranne graph to compute a PQ-graph. We illustrate the computation in Figure 2. The algorithm operates first on (G, S) (step 1) by “merging” all vertices which share the same label in S to create H. In step 2 a max flow graph F ⊆H is computed by the Ford-fulkerson algorithm. It is well-known in the case of unweighted graphs that a max flow graph F may be output as a DAG of k edge-disjoint paths where k is the value of the flow. In step 3 all edges in the flow become directed edges creating I. The graph G0 is then created in step 4 from I where the strongly connected components become the super-vertices of G0 and the super-edges correspond to a subset of flow edges from F. Finally, in 4 step 5, we create the PQ-graph G by “fixing” the source and target vertices so that they also have as elements the original labeled vertices from S which were merged in step 1. The correctness of the algorithm follows from arguments in [9]; we provide an independent proof in Appendix B. Theorem 2 ([9]). The algorithm in Figure 1 computes the unique Picard-Queyranne graph G(G, S) derived from graph G and non-trivial example sequence S. 3 Mistake Bounds Analysis In this section we analyze the mistakes incurred by the intractable 0-Ising strategy (see (1)) and the strategy longest-path (see Figure 3). Our analysis splits into two parts. Firstly, we show (Section 3.1, Theorem 4) for a sufficiently regular graph label prediction algorithm, that we may analyze independently the mistake bound of each uniformly-labeled cluster (connected subgraph). Secondly, the per-cluster analysis then separates into three cases, the result of which is summarized in Theorem 10. For a given cluster C when its internal connectivity is larger than the number of edges in the boundary (κ(C) > |∂E e (C)|) we will incur no more than one mistake in that cluster. On the other hand for smaller connectivity clusters (κ(C) ≤|∂E e (C)|) we incur up to quadratically in mistakes via the edge boundary size. When C is a tree we incur O(|∂E e (C)| log D(C)) mistakes. The analysis of smaller connectivity clusters separates into two parts. First, a sequence of trials in which the label-consistent minimum-cut does not increase, we call a PQ-game (Section 3.2) as in essence it is played on a PQ-graph. We give a mistake bound for a PQ-game for the intractable 0-Ising prediction and a comparable bound for the strategy longest-path in Theorem 8. Second, when the label-consistent minimum-cut increases the current PQ-game ends and a new one begins, leading to a sequence of PQ-games. The mistakes incurred over a sequence of PQ-games is addressed in the aforementioned Theorem 10 and finally Section 3.3 concludes with a discussion of the combined bounds of Theorems 4 and 10 with respect to other graph label prediction algorithms. 3.1 Per-cluster mistake bounds for regular graph label prediction algorithms An algorithm is called regular if it is permutation-invariant, label-monotone, and Markov. An algorithm is permutation-invariant if the prediction at any time t does not depend on the order of the examples up to time t; label-monotone if for every example sequence if we insert an example “between” examples t and t+1 with label y then the prediction at time t+1 is unchanged or changed to y; and Markov with respect to a graph G if for any disjoint vertex sets P and Q and separating set R then the predictions in P are independent of the labels in Q given the labels of R. A subgraph is uniformly-labeled with respect to an example sequence iff the label of each vertex is the same and these labels are consistent with the example sequence. The following definition characterizes the “worst-case” example sequences for regular algorithms with respect to uniformly-labeled clusters. Definition 3. Given an online algorithm A and a uniformly-labeled subgraph C ⊆G, then BA(C; G) denotes the maximal mistakes made only in C for the presentation of any permutation of examples in ∂e(C), each with label y, followed by any permutation of examples in C, each with label 1−y. The following theorem enables us to analyze the mistakes incurred in each uniformly-labeled subgraph C independently of each other and independently of the remaining graph structure excepting the subgraph’s exterior border ∂e(C). Theorem 4 (Proof in Appendix D). Given an online permutation-invariant label-monotone Markov algorithm A and a graph G which is covered by uniformly-labeled subgraphs C1, . . . , Cc the mistakes incurred by the algorithm may be bounded by M ≤Pc i=1 BA(Ci; G) . The above theorem paired with Theorem 10 completes the mistake bound analysis of our algorithms. 3.2 PQ-games Given a PQ-graph G = G(G, S), the derived online PQ-game is played between a player and an adversary. The aim of the player is to minimize their mistaken predictions; for the adversary it is to maximize the player’s mistaken predictions. Thus to play the adversary proposes a vertex z ∈Z ∈V (G), the player then predicts a label ˆy ∈{0, 1}, then the adversary returns a label y ∈{0, 1} and either a mistake is incurred or not. The only restriction on the adversary is to not return a label which increases the label-consistent minimum-cut. As long as the adversary does not give an example (z ∈⊥, 1) or (z ∈⊤, 0), the label-consistent minimum-cut does not increase 5 no matter the value of y; which also implies the player has a trivial strategy to predict the label of z ∈⊥∪⊤. After the example is given, we have an updated PQ-graph with new source and target super-vertices as seen in the proposition below. Proposition 5. If G(G, S) is a PQ-graph and (z, y = 0) ((z, y = 1)) is an example with z ∈Z ∈V (G) and z ̸∈⊤(z ̸∈⊥) then let Z = ↓{Z} (Z = ↑{Z}) then G(G, ⟨S, (z, y)⟩) = merge(G(G, S), Z). Thus given the PQ-graph G the PQ-game is independent of G and S, since a “play” z ∈V (G) induces a “play” Z ∈V (G) (with z ∈Z). Mistake bounds for PQ-games. Given a single PQ-game, in the following we will discuss the three strategies fixed-paths, 0-Ising, and longest-path that the player may adopt for which we prove online mistake bounds. The first strategy fixed-paths is merely motivational: it can be used to play a single PQ-game, but not a sequence. The second strategy 0-Ising is computationally infeasible. Finally, the longest-path strategy is “dynamically” similar to fixed-paths but is also permutation-invariant. Common to all our analyses is a k-path cover P of PQ-graph G which is a partitioning of the edge-set of G into k edge-disjoint directed paths P := {p1, . . . , pk} from ⊥to ⊤. Note that the cover is not necessarily unique; for example, in Figure 2d, we have the two unique path covers P1 := {(⊥, A, ⊤), (⊥, A, B, ⊤), (⊥, B, C, ⊤)} and P2 := {(⊥, A, ⊤), (⊥, A, B, C, ⊤), (⊥, B, ⊤)}. We denote the set of all path covers as P and thus we have for Figure 2d that P := {P1, P2}. This cover motivates a simple mistake bound and strategy. Suppose we had a single path of length |p| where the first and last vertex are the “source” and “target” vertices. So the minimum label-consistent cut-size is “1” and a natural strategy is simply to predict with the “nearest-neighbor” revealed label and trivially our mistake bound is log |p|. Generalizing to multiple paths we have the following strategy. Strategy fixed-paths(‹ P): Given a PQ-graph choose a path cover {˜p1, . . . , ˜pk} = ‹ P ∈P(G). If the path cover is also vertex-disjoint except for the source and target vertex we may directly use the “nearest-neighbor” strategy detailed above, achieving the mistake upper bound M ≤Pk i=1 log |˜pi|. Unsurprisingly, in the vertex-disjoint case it is a mistake-bound optimal [11] algorithm. If, however, ‹ P is not vertex-disjoint and we need to predict a vertex V we may select a path in ‹ P containing V and predict with the nearest neighbour and also obtain the bound above. In this case, however, the bound may not be “optimal.” Essentially the same technique was used in [20] in a related setting for learning “directed cuts.” A limitation of the fixed-paths strategy is that it does not seem possible to extend into a strategy that can play a sequence of PQ-games and still meet the regularity properties, particularly permutation-invariance as required by Theorem 4. Strategy 0-Ising: The prediction of the Ising model in the limit of zero temperature (cf. (1)), is equivalent to those of the well-known Halving algorithm [21, 22] where the hypothesis class U∗ is the set of label-consistent minimum-cuts. The mistake upper bound of the Halving algorithm is just M ≤log |U∗| where this bound follows from the observation that whenever a mistake is made at least “half” of concepts in U∗are no longer consistent. We observe that we may upper bound |U∗| ≤argminP ∈P(G) Qk i=1 |pi| since the product of path lengths from any path cover P is an upper bound on the cardinality of U∗and hence we have the bound in (2). And in fact this bound may be a significant improvement over the fixed-paths strategy’s bound as seen in the following proposition. Proposition 6 (Proof in Appendix C). For every c ≥2 there exists a PQ-graph Gc, with a path cover P ′ ∈P(Gc) and a PQ-game example sequence such that the mistakes Mfixed-paths(P ′) = Ω(c2), while for all PQ-game example sequences on Gc the mistakes M0-Ising = O(c). Unfortunately the 0-Ising strategy has the drawback that counting label-consistent minimum-cuts is #P-complete and computing the prediction (see (1)) is NP-hard (see Appendix G). Strategy longest-path: In our search for an efficient and regular prediction strategy it seems natural to attempt to “dynamize” the fixed-paths approach and predict with a nearest neighbor along a dynamic path. Two such permutation-invariant methods are the longest-path and shortest-path strategies. The strategy shortest-path predicts the label of a super-vertex Z in a PQ-game G as 0 iff the shortest directed path (⊥, . . . , Z) is shorter than the shortest directed path (Z, . . . , ⊤). The strategy longest-path predicts the label of a super-vertex Z in a PQ-game G as 0 iff the longest directed path (⊥, . . . , Z) is shorter than the longest directed path (Z, . . . , ⊤). The strategy shortest-path seems to be intuitively favored over longest-path as it is just 6 Input: Graph: G, Example sequence: S = ⟨(i1, 0), (i2, 1), (i3, y3), . . . , (iℓ, yℓ)⟩∈(INn × {0, 1})ℓ Initialization: G3 = PicardQueyranneGraph(G, S2) for t = 3, . . . , ℓdo Receive: it ∈{1, . . . , n} It = V ∈V (Gt) with it ∈V Predict (longest-path): ˆyt = ß 0 |longest-path(Gt, ⊥t, It)|≤|longest-path(Gt, It, ⊤t)| 1 otherwise Predict (0-Ising): ˆyt = ˆyI0(it|St−1) % as per equation (1) Receive: yt if (it ̸∈⊥t or yt ̸= 1) and (it ̸∈⊤t or yt ̸= 0) then % cut unchanged Gt+1 = ß merge(Gt, ↓{It}) yt = 0 merge(Gt, ↑{It}) yt = 1 else % cut increases Gt+1 = PicardQueyranneGraph(G, St) end Figure 3: Longest-path and 0-Ising online prediction the “nearest-neighbor” prediction with respect to the geodesic distance. However, the following proposition shows that it is strictly worse than any fixed-paths strategy in the worst case. Proposition 7 (Proof in Appendix C). For every c ≥4 there exists a PQ-graph Gc and a PQ-game example sequence such that the mistakes Mshortest-path = Ω(c2 log(c)), while for every path cover P ∈P(Gc) and for all PQ-game example sequences on Gc the mistakes Mfixed-paths(P ) = O(c2). In contrast, for the strategy longest-paths in the proof of Theorem 8 we show that there always exists some retrospective path cover Plp ∈P(G) such that Mlongest-paths ≤Pk i=1 log |pi lp|. Computing the “longest-path” has time complexity linear in the number of edges in a DAG. Summarizing the mistake bounds for the three PQ-game strategies for a single PQ-game we have the following theorem. Theorem 8 (Proof in Appendix C). The mistakes, M, of an online PQ-game for player strategies fixed-paths(‹ P), 0-Ising, and longest-path on PQ-graph G and k-path cover ‹ P ∈ P(G) is bounded by M ≤ Pk i=1 log |˜pi| fixed-paths(‹ P) argminP ∈P(G) Pk i=1 log |pi| 0-Ising argmaxP ∈P(G) Pk i=1 log |pi| longest-path . (2) 3.3 Global analysis of prediction at zero temperature In Figure 3 we summarize the prediction protocol for 0-Ising and longest-path. We claim the regularity properties of our strategies in the following theorem. Theorem 9 (Proof in Appendix E). The strategies 0-Ising and longest-path are permutation-invariant, label-monotone, and Markov. The technical hurdle here is to prove that label-monotonicity holds over a sequence of PQ-games. For this we need an analog of Proposition 5 to describe how the PQ-graph changes when the labelconsistent minimum-cut increases (see Proposition 19). The application of the following theorem along with Theorem 4 implies we may bound the mistakes of each uniformly-labeled cluster in potentially three ways. Theorem 10 (Proof in Appendix D). Given either the 0-Ising or longest-path strategy A the mistakes on uniformly-labeled subgraph C ⊆G are bounded by BA(C; G) ∈ O(1) κ(C) > |∂E e (C)| O |∂E e (C)|(1 + |∂E e (C)| −κ(C)) log N(C) κ(C) ≤|∂E e (C)| O(|∂E e (C)| log D(C)) C is a tree (3) with the atomic number N(C) := N|∂E e (C)|+1(C) ≤|V (C)|. 7 First, if the internal connectivity of the cluster is high we will only make a single mistake in that cluster. Second, if the cluster is a tree then we pay the external connectivity of the cluster |∂E e (C)| times the log of the cluster diameter. Finally, in the remaining case we pay quadratically in the external connectivity and logarithmically in the “atomic number” of the cluster. The atomic number captures the fact that even a poorly connected cluster may have sub-regions of high internal connectivity. Computational complexity. If G is a graph and S an example sequence with a label-consistent minimum-cut of φ then we may implement the longest-path strategy so that it has a cumulative computational complexity of O(max(φ, n) |E(G)|). This follows because if on a trial the “cut” does not increase we may implement prediction and update in O(|E(G)|) time. On the other hand if the “cut” increases by φ′ we pay O(φ′|E(G)|) time. To do so we implement an online “Ford-Fulkerson” algorithm [18] which starts from the previous “residual” graph to which it then adds the additional φ′ flow paths with φ′ steps of size O(|E(G)|). Discussion. There are essentially five dominating mistake bounds for the online graph labeling problem: (I) the bound of treeOpt [1] on trees, (II) the bound in expectation of treeOpt on a random spanning tree sampled from a graph [1], (III) the bound of p-seminorm interpolation [14] tuned for “sparsity” (p < 2), (IV) the bound of p-seminorm interpolation as tuned to be equivalent to online label propagation [5] (p = 2), (V) this paper’s longest-path strategy. The algorithm treeOpt was shown to be optimal on trees. In Appendix F we show that longest-path also obtains the same optimal bound on trees. Algorithm (II) applies to generic graphs and is obtained from (I) by sampling a random spanning tree (RST). It is not directly comparable to the other algorithms as its bound holds only in expectation with respect to the RST. We use [14, Corollary 10] to compare (V) to (III) and (IV). We introduce the following simplifying notation to compare bounds. Let C1, . . . , Cc denote uniformly-labeled clusters (connected subgraphs) which cover the graph and set κr := κ(Cr) and φr := |∂E e (Cr)|. We define Dr(i) to be the wide diameter at connectivity level i of cluster Cr. The wide diameter Dr(i) is the minimum value such that for all pairs of vertices v, w ∈Cr there exists i edge-disjoints of paths from v to w of length at least Dr(i) in Cr (and if i > κr then Dr(i) := +∞). Thus Dr(1) is the diameter of cluster Cr and Dr(1) ≤Dr(2) ≤· · · . Let φ denote the minimum label-consistent cutsize and observe that if the cardinality of the cover |{C1, . . . , Cc}| is minimized then we have that 2φ = Pc r=1 φr. Thus using [14, Corollary 10] we have the following upper bounds of (III): (φ/κ∗)2 log D∗+ c and (IV): (φ/κ∗)D∗+ c where κ∗:= minr κr and D∗:= maxr Dr(κ∗). In comparison we have (V): [Pc r=1 max(0, φr −κr + 1)φr log Nr] + c with atomic numbers Nr := Nφr+1(Cr). To contrast the bounds, consider a double lollipop labeled-graph: first create a lollipop which is a path of n/4 vertices attached to a clique of n/4 vertices. Label these vertices 1. Second, clone the lollipop except with labels 0. Finally join the two cliques with n/8 edges arbitrarily. For (III) and (IV) the bounds are O(n) independent of the choice of clusters. Whereas an upper bound for (V) is the exponentially smaller O(log n) which is obtained by choosing a four cluster cover consisting of the two paths and the two cliques. This emphasizes the generic problem of (III) and (IV): parameters κ∗and D∗are defined by the worst clusters; whereas (V) is truly a per-cluster bound. We consider the previous “constructed” example to be representative of a generic case where the graph contains clusters of many resistance diameters as well as sparse interconnecting “background” vertices. On the other hand, there are cases in which (III,IV) improve on (V). For a graph with only small diameter clusters and if the cutsize exceeds the cluster connectivity then (IV) improves on (III,V) given the linear versus quadratic dependence on the cutsize. The log-diameter may be arbitrarily smaller than log-atomic-number ((III) improves on (V)) and also vice-versa. Other subtleties not accounted for in the above comparison include the fact a) the wide diameter is a crude upper bound for resistance diameter (cf. [14, Theorem 1]) and b) the clusters of (III,IV) are not required to be uniformly-labeled. Regarding “a)” replacing “wide” with “resistance” does not change the fact the bound now holds with respect to the worst resistance diameter and the example above is still problematic. Regarding “b)” it is a nice property but we do not know how to exploit this to give an example that significantly improves (III) or (IV) over a slightly more detailed analysis of (V). Finally (III,IV) depend on a correct choice of tunable parameter p. Thus in summary (V) matches the optimal bound of (I) on trees, and can often improve on (III,IV) when a graph is naturally covered by label-consistent clusters of different diameters. However (III,IV) may improve on (V) in a number of cases including when the log-diameter is significantly smaller than log-atomic-number of the clusters. 8 References [1] Nicol`o Cesa-Bianchi, Claudio Gentile, and Fabio Vitale. Fast and optimal prediction on a labeled tree. In Proceedings of the 22nd Annual Conference on Learning. Omnipress, 2009. [2] Avrim Blum and Shuchi Chawla. Learning from labeled and unlabeled data using graph mincuts. In Proceedings of the Eighteenth International Conference on Machine Learning, ICML ’01, pages 19–26, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. [3] Olivier Chapelle, Jason Weston, and Bernhard Sch¨olkopf. Cluster kernels for semi-supervised learning. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 601–608. MIT Press, 2003. [4] Mikhail Belkin and Partha Niyogi. Semi-supervised learning on riemannian manifolds. Mach. Learn., 56(1-3):209–239, 2004. [5] Xiaojin Zhu, Zoubin Ghahramani, and John D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In ICML, pages 912–919, 2003. [6] Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Sch¨olkopf. Learning with local and global consistency. In NIPS, 2003. [7] Martin Szummer and Tommi Jaakkola. Partially labeled classification with markov random walks. In NIPS, pages 945–952, 2001. [8] Leslie Ann Goldberg and Mark Jerrum. The complexity of ferromagnetic ising with local fields. Combinatorics, Probability & Computing, 16(1):43–61, 2007. [9] Jean-Claude Picard and Maurice Queyranne. On the structure of all minimum cuts in a network and applications. In V.J. Rayward-Smith, editor, Combinatorial Optimization II, volume 13 of Mathematical Programming Studies, pages 8–16. Springer Berlin Heidelberg, 1980. [10] J. Scott Provan and Michael O. Ball. The complexity of counting cuts and of computing the probability that a graph is connected. SIAM Journal on Computing, 12(4):777–788, 1983. [11] Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine Learning, 2:285–318, April 1988. [12] Mark Herbster, Massimiliano Pontil, and Lisa Wainer. Online learning over graphs. In ICML ’05: Proceedings of the 22nd international conference on Machine learning, pages 305–312, New York, NY, USA, 2005. ACM. [13] Mark Herbster. Exploiting cluster-structure to predict the labeling of a graph. In Proceedings of the 19th International Conference on Algorithmic Learning Theory, pages 54–69, 2008. [14] Mark Herbster and Guy Lever. Predicting the labelling of a graph via minimum p-seminorm interpolation. In Proceedings of the 22nd Annual Conference on Learning Theory (COLT’09), 2009. [15] Mark Herbster, Guy Lever, and Massimiliano Pontil. Online prediction on large diameter graphs. In Advances in Neural Information Processing Systems (NIPS 22), pages 649–656. MIT Press, 2009. [16] Nicol`o Cesa-Bianchi, Claudio Gentile, Fabio Vitale, and Giovanni Zappella. Random spanning trees and the prediction of weighted graphs. In Proceedings of the 27th International Conference on Machine Learning (27th ICML), pages 175–182, 2010. [17] Fabio Vitale, Nicol`o Cesa-Bianchi, Claudio Gentile, and Giovanni Zappella. See the tree through the lines: The shazoo algorithm. In John Shawe-Taylor, Richard S. Zemel, Peter L. Bartlett, Fernando C. N. Pereira, and Kilian Q. Weinberger, editors, NIPS, pages 1584–1592, 2011. [18] L. R. Ford and D. R. Fulkerson. Maximal Flow through a Network. Canadian Journal of Mathematics, 8:399–404, 1956. [19] Michael O. Ball and J. Scott Provan. Calculating bounds on reachability and connectedness in stochastic networks. Networks, 13(2):253–278, 1983. [20] Thomas G¨artner and Gemma C. Garriga. The cost of learning directed cuts. In Proceedings of the 18th European Conference on Machine Learning, 2007. [21] J. M. Barzdin and R. V. Frievald. On the prediction of general recursive functions. Soviet Math. Doklady, 13:1224–1228, 1972. [22] Nick Littlestone and Manfred K. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212– 261, 1994. 9 | 2015 | 314 |
5,830 | Scalable Semi-Supervised Aggregation of Classifiers Akshay Balsubramani UC San Diego abalsubr@cs.ucsd.edu Yoav Freund UC San Diego yfreund@cs.ucsd.edu Abstract We present and empirically evaluate an efficient algorithm that learns to aggregate the predictions of an ensemble of binary classifiers. The algorithm uses the structure of the ensemble predictions on unlabeled data to yield significant performance improvements. It does this without making assumptions on the structure or origin of the ensemble, without parameters, and as scalably as linear learning. We empirically demonstrate these performance gains with random forests. 1 Introduction Ensemble-based learning is a very successful approach to learning classifiers, including well-known methods like boosting [1], bagging [2], and random forests [3]. The power of these methods has been clearly demonstrated in open large-scale learning competitions such as the Netflix Prize [4] and the ImageNet Challenge [5]. In general, these methods train a large number of “base” classifiers and then combine them using a (possibly weighted) majority vote. By aggregating over classifiers, ensemble methods reduce the variance of the predictions, and sometimes also reduce the bias [6]. The ensemble methods above rely solely on a labeled training set of data. In this paper we propose an ensemble method that uses a large unlabeled data set in addition to the labeled set. Our work is therefore at the intersection of semi-supervised learning [7, 8] and ensemble learning. This paper is based on recent theoretical results of the authors [9]. Our main contributions here are to extend and apply those results with a new algorithm in the context of random forests [3] and to perform experiments in which we show that, when the number of labeled examples is small, our algorithm’s performance is at least that of random forests, and often significantly better. For the sake of completeness, we provide an intuitive introduction to the analysis given in [9]. How can unlabeled data help in the context of ensemble learning? Consider a simple example with six equiprobable data points. The ensemble consists of six classifiers, partitioned into three “A” rules and three “B” rules. Suppose that the “A” rules each have error 1/3 and the “B” rules each have error 1/6. 1 If given only this information, we might take the majority vote over the six rules, possibly giving lower weights to the “A” rules because they have higher errors. Suppose, however, that we are given the unlabeled information in Table 1. The columns of this table correspond to the six classifiers and the rows to the six unlabeled examples. Each entry corresponds to the prediction of the given classifier on the given example. As we see, the main difference between the “A” rules and the “B” rules is that any two “A” rules disagree with probability 1/3, whereas the “B” rules always agree. For this example, it can be seen (e.g. proved by contradiction) that the only possible true labeling of the unlabeled data that is consistent with Table 1 and with the errors of the classifiers is that all the examples are labeled ’+’. Consequently, we conclude that the majority vote over the “A” rules has zero error, performing significantly better than any of the base rules. In contrast, giving the “B” rules equal weight would 1We assume that (bounds on) the errors are, with high probability, true on the actual distribution. Such bounds can be derived using large deviation bounds or bootstrap-type methods. 1 result in an a rule with error 1/6. Crucially, our reasoning to this point has solely used the structure of the unlabeled examples along with the error rates in Table 1 to constrain our search for the true labeling. A classifiers B classifiers x1 + + + + + x2 + + + + + x3 + + + + + x4 + + + + + x5 + + + + + x6 + + error 1/3 1/3 1/3 1/6 1/6 1/6 Table 1: An example of the utility of unlabeled examples in ensemble learning By such reasoning alone, we have correctly predicted according to a weighted majority vote. This example provides some insight into the ways in which unlabeled data can be useful: • When combining classifiers, diversity is important. It can be better to combine less accurate rules that disagree with each other than to combine more accurate rules that tend to agree. • The bounds on the errors of the rules can be seen as a set of constraints on the true labeling. A complementary set of constraints is provided by the unlabeled examples. These sets of constraints can be combined to improve the accuracy of the ensemble classifier. The above setup was recently introduced and analyzed in [9]. That paper characterizes the problem as a zero-sum game between a predictor and an adversary. It then describes the minimax solution of the game, which corresponds to an efficient algorithm for transductive learning. In this paper, we build on the worst-case framework of [9] to devise an efficient and practical semisupervised aggregation algorithm for random forests. To achieve this, we extend the framework to handle specialists – classifiers which only venture to predict on a subset of the data, and abstain from predicting on the rest. Specialists can be very useful in targeting regions of the data on which to precisely suggest a prediction. The high-level idea of our algorithm is to artificially generate new specialists from the ensemble. We incorporate these, and the targeted information they carry, into the worst-case framework of [9]. The resulting aggregated predictor inherits the advantages of the original framework: (A) Efficient: Learning reduces to solving a scalable p-dimensional convex optimization, and test-time prediction is as efficient and parallelizable as p-dimensional linear prediction. (B) Versatile/robust: No assumptions about the structure or origin of the predictions or labels. (C) No introduced parameters: The aggregation method is completely data-dependent. (D) Safe: Accuracy guaranteed to be at least that of the best classifier in the ensemble. We develop these ideas in the rest of this paper, reviewing the core worst-case setting of [9] in Section 2, and specifying how to incorporate specialists and the resulting learning algorithm in Section 3. Then we perform an exploratory evaluation of the framework on data in Section 4. Though the framework of [9] and our extensions can be applied to any ensemble of arbitrary origin, in this paper we focus on random forests, which have been repeatedly demonstrated to have state-of-theart, robust classification performance in a wide variety of situations [10]. We use a random forest as a base ensemble whose predictions we aggregate. But unlike conventional random forests, we do not simply take a majority vote over tree predictions, instead using a unlabeled-data-dependent aggregation strategy dictated by the worst-case framework we employ. 2 Preliminaries A few definitions are required to discuss these issues concretely, following [9]. Write [a]+ = max(0, a) and [n] = {1, 2, . . . , n}. All vector inequalities are componentwise. 2 We first consider an ensemble H = {h1, . . . , hp} and unlabeled data x1, . . . , xn on which we wish to predict. As in [9], the predictions and labels are allowed to be randomized, represented by values in [−1, 1] instead of just the two values {−1, 1}. The ensemble’s predictions on the unlabeled data are denoted by F: F = h1(x1) h1(x2) · · · h1(xn) ... ... ... ... hp(x1) hp(x2) · · · hp(xn) ∈[−1, 1]p×n (1) We use vector notation for the rows and columns of F: hi = (hi(x1), · · · , hi(xn))⊤and xj = (h1(xj), · · · , hp(xj))⊤. The true labels on the test data T are represented by z = (z1; . . . ; zn) ∈ [−1, 1]n. The labels z are hidden from the predictor, but we assume the predictor has knowledge of a correlation vector b ∈(0, 1]p such that 1 n P j hi(xj)zj ≥bi, i.e. 1 nFz ≥b. These p constraints on z exactly represent upper bounds on individual classifier error rates, which can be estimated from the training set w.h.p. when all the data are drawn i.i.d., in a standard way also used by empirical risk minimization (ERM) methods that simply predict with the minimum-error classifier [9]. 2.1 The Transductive Binary Classification Game The idea of [9] is to formulate the ensemble aggregation problem as a two-player zero-sum game between a predictor and an adversary. In this game, the predictor is the first player, who plays g = (g1; g2; . . . ; gn), a randomized label gi ∈[−1, 1] for each example {xi}n i=1. The adversary then sets the labels z ∈[−1, 1]n under the ensemble classifier error constraints defined by b. 2 The predictor’s goal is to minimize the worst-case expected classification error on the test data (w.r.t. the randomized labelings z and g), which is just 1 2 1 −1 nz⊤g . This is equivalently viewed as maximizing worst-case correlation 1 nz⊤g. To summarize concretely, we study the following game: V := max g∈[−1,1]n min z∈[−1,1]n, 1 n Fz≥b 1 nz⊤g (2) The minimax theorem ([1], p.144) applies to the game (2), and there is an optimal strategy g∗such that min z∈[−1,1]n, 1 n Fz≥b 1 nz⊤g∗≥V , guaranteeing worst-case prediction error 1 2(1 −V ) on the n unlabeled data. This optimal strategy g∗is a simple function of a particular weighting over the p hypotheses – a nonnegative p-vector. Definition 1 (Slack Function). Let σ ≥0p be a weight vector over H (not necessarily a distribution). The vector of ensemble predictions is F⊤σ = (x⊤ 1 σ, . . . , x⊤ n σ), whose elements’ magnitudes are the margins. The prediction slack function is γ(σ, b) := γ(σ) := −b⊤σ + 1 n n X j=1 x⊤ j σ −1 + (3) and this is convex in σ. The optimal weight vector σ∗is any minimizer σ∗∈arg min σ≥0p [γ(σ)]. The main result of [9] uses these to describe the minimax equilibrium of the game (2). Theorem 2 ([9]). The minimax value of the game (2) is V = −γ(σ∗). The minimax optimal predictions are defined as follows: for all j ∈[n], g∗ j := gj(σ∗) = x⊤ j σ∗ x⊤ j σ∗ < 1 sgn(x⊤ j σ∗) otherwise 2Since b is calculated from the training set and deviation bounds, we assume the problem feasible w.h.p. 3 2.2 Interpretation Theorem 2 suggests a statistical learning algorithm for aggregating the p ensemble classifiers’ predictions: estimate b from the training (labeled) set, optimize the convex slack function γ(σ) to find σ∗, and finally predict with gj(σ∗) on each example j in the test set. The resulting predictions are guaranteed to have low error, as measured by V . In particular, it is easy to prove [9] that V is at least maxi bi, the performance of the best classifier. The slack function (3) merits further scrutiny. Its first term depends only on the labeled data and not the unlabeled set, while the second term 1 n Pn j=1 x⊤ j σ −1 + incorporates only unlabeled information. These two terms trade off smoothly – as the problem setting becomes fully supervised and unlabeled information is absent, the first term dominates, and σ∗tends to put all its weight on the best single classifier like ERM. Indeed, this viewpoint suggests a (loose) interpretation of the second term as an unsupervised regularizer for the otherwise fully supervised optimization of the “average” error b⊤σ. It turns out that a change in the regularization factor corresponds to different constraints on the true labels z: Theorem 3 ([9]). Let Vα := max g∈[−1,1]n min z∈[−α,α]n, 1 n Fz≥b 1 nz⊤g for any α > 0. Then Vα = minσ≥0p h −b⊤σ + α n Pn j=1 x⊤ j σ −1 + i . So the regularized optimization assumes each zi ∈[−α, α]. For α < 1, this is equivalent to assuming the usual binary labels (α = 1), and then adding uniform random label noise: flipping the label w.p. 1 2(1−α) on each of the n examples independently. This encourages “clipping” of the ensemble predictions x⊤ j σ∗to the σ∗-weighted majority vote predictions, as specified by g∗. 2.3 Advantages and Disadvantages This formulation has several significant merits that would seem to recommend its use in practical situations. It is very efficient – once b is estimated (a scalable task, given the labeled set), the slack function γ is effectively an average over convex functions of i.i.d. unlabeled examples, and consequently is amenable to standard convex optimization techniques [9] like stochastic gradient descent (SGD) and variants. These only operate in p dimensions, independent of n (which is ≫p). The slack function is Lipschitz and well-behaved, resulting in stable approximate learning. Moreover, test-time prediction is extremely efficient, because it only requires the p-dimensional weighting σ∗and can be computed example-by-example on the test set using only a dot product in Rp. The form of g∗and its dependence on σ∗facilitates interpretation as well, as it resembles familiar objects: sigmoid link functions for linear classifiers. Other advantages of this method also bear mention: it makes no assumptions on the structure of H or F, is provably robust against the worst case, and adds no input parameters that need tuning. These benefits are notable because they will be inherited by our extension of the framework in this paper. However, this algorithm’s practical performance can still be mediocre on real data, which is often easier to predict than an adversarial setup would have us believe. As a result, we seek to add more information in the form of constraints on the adversary, to narrow the gap between it and reality. 3 Learning with Specialists To address this issue, we examine a generalized scenario in which each classifier in the ensemble can abstain on any subset of the examples instead of predicting ±1. It is a specialist that predicts only over a subset of the input, and we think of its abstain/participate decision being randomized in the same way as the randomized label on each example. In this section, we extend the framework of Section 2.1 to arbitrary specialists, and discuss the semi-supervised learning algorithm that results. In our formulation, suppose that for a classifier i ∈[p] and an example x, the classifier decides to abstain with probability 1 −vi(x). But if the decision is to participate, the classifier predicts 4 hi(x) ∈[−1, 1] as previously. Our only assumption on {vi(x1), . . . , vi(xn)} is the reasonable one that Pn j=1 vi(xj) > 0, so classifier i is not a worthless specialist that abstains everywhere. The constraint on classifier i is now not on its correlation with z on the entire test set, but on the average correlation with z restricted to occasions on which it participates. So for some [bS]i ∈[0, 1], n X j=1 vi(xj) Pn k=1 vi(xk) hi(xj)zj ≥[bS]i (4) Define ρi(xj) := vi(xj) Pn k=1 vi(xk) (a distribution over j ∈[n]) for convenience. Now redefine our unlabeled data matrix as follows: S = n ρ1(x1)h1(x1) ρ1(x2)h1(x2) · · · ρ1(xn)h1(xn) ... ... ... ... ρp(x1)hp(x1) ρp(x2)hp(x2) · · · ρp(xn)hp(xn) (5) Then the constraints (4) can be written as 1 nSz ≥bS, analogous to the initial prediction game (2). To summarize, our specialist ensemble aggregation game is stated as VS := min z∈[−1,1]n, 1 n Sz≥bS max g∈[−1,1]n 1 nz⊤g (6) We can immediately solve this game from Thm. 2, with (S, bS) simply taking the place of (F, b). Theorem 4 (Solution of the Specialist Aggregation Game). The awake ensemble prediction w.r.t. weighting σ ≥0p on example xi is S⊤σ i = n p X j=1 ρj(xi)hj(xi)σj . The slack function is now γS(σ) := 1 n n X j=1 h S⊤σ j −1 i + −b⊤ S σ (7) The minimax value of this game is VS = maxσ≥0p[−γS(σ)] = −γS(σ∗ S). The minimax optimal predictions are defined as follows: for all i ∈[n], [g∗ S]i .= gS(σ∗ S) = S⊤σ∗ S i S⊤σ∗ S i < 1 sgn( S⊤σ∗ S i) otherwise In the no-specialists case, the vector ρi is the uniform distribution ( 1 n, . . . , 1 n) for any i ∈[p], and the problem reduces to the prediction game (2). As in the original prediction game, the minimax equilibrium depends on the data only through the ensemble predictions, but these are now of a different form. Each example is now weighted proportionally to ρj(xi). So on any given example xi, only hypotheses which participate on it will be counted; and those that specialize the most narrowly, and participate on the fewest other examples, will have more influence on the eventual prediction gi, ceteris paribus. 3.1 Creating Specialists for an Algorithm We can now present the main ensemble aggregation method of this paper, which creates specialists from the ensemble, adding them as additional constraints (rows of S). The algorithm, HEDGECLIPPER, is given in Fig. 1, and instantiates our specialist learning framework with a random forest [3]. As an initial exploration of the framework here, random forests are an appropriate base ensemble because they are known to exhibit state-of-the-art performance [10]. Their wellknown advantages also include scalability, robustness (to corrupt data and parameter choices), and interpretability; each of these benefits is shared by our aggregation algorithm, which consequently inherits them all. Furthermore, decision trees are a natural fit as the ensemble classifiers because they are inherently hierarchical. Intuitively (and indeed formally too [11]), they act like nearest-neighbor (NN) predictors w.r.t. a distance that is “adaptive” to the data. So each tree in a random forest represents a 5 somewhat different, nonparametric partition of the data space into regions in which one of the labels ±1 dominates. Each such region corresponds exactly to a leaf of the tree. The idea of HEDGECLIPPER is simply to consider each leaf in the forest as a specialist, which predicts only on the data falling into it. By the NN intuition above, these specialists can be viewed as predicting on data that is near them, where the supervised training of the tree attempts to define the purest possible partitioning of the space. A pure partitioning results in many specialists with [bS]i ≈1, each of which contributes to the awake ensemble prediction w.r.t. σ∗over its domain, to influence it towards the correct label (inasmuch as [bS]i is high). Though the idea is complex in concept for a large forest with many arbitrarily overlapping leaves from different trees, it fits the worst-case specialist framework of the previous sections. So the algorithm is still essentially linear learning with convex optimization, as we have described. Algorithm 1 HEDGECLIPPER Input: Labeled set L, unlabeled set U 1: Using L, grow trees T = {T1, . . . , Tp} (regularized; see Sec. 3.2) 2: Using L, estimate bS on T and its leaves 3: Using U, (approximately) optimize (7) to estimate σ∗ S Output: The estimated weighting σ∗ S, for use at test time Figure 1: At left is algorithm HEDGECLIPPER. At right is a schematic of how the forest structure is related to the unlabeled data matrix S, with a given example x highlighted. The two colors in the matrix represent ±1 predictions, and white cells abstentions. 3.2 Discussion Trees in random forests have thousands of leaves or more in practice. As we are advocating adding so many extra specialists to the ensemble for the optimization, it is natural to ask whether this erodes some of the advantages we have claimed earlier. Computationally, it does not. When ρj(xi) = 0, i.e. classifier j abstains deterministically on xi, then the value of hj(xi) is irrelevant. So storing S in a sparse matrix format is natural in our setup, with the accompanying performance gain in computing S⊤σ while learning σ∗and predicting with it. This turns out to be crucial to efficiency – each tree induces a partitioning of the data, so the set of rows corresponding to any tree contains n nonzero entries in total. This is seen in Fig. 1. Statistically, the situation is more complex. On one hand, there is no danger of overfitting in the traditional sense, regardless of how many specialists are added. Each additional specialist can only shrink the constraint set that the adversary must follow in the game (6). It only adds information about z, and therefore the performance VS must improve, if the game is solved exactly. However, for learning we are only concerned with approximately optimizing γS(σ) and solving the game. This presents several statistical challenges. Standard optimization methods do not converge as well in high ambient dimension, even given the structure of our problem. In addition, random forests practically perform best when each tree is grown to overfit. In our case, on any sizable test set, small leaves would cause some entries of S to have large magnitude, ≫1. This can foil an algorithm like HEDGECLIPPER by causing it to vary wildly during the optimization, particularly since those leaves’ [bS]i values are only roughly estimated. From an optimization perspective, some of these issues can be addressed by e.g. (pseudo)-secondorder methods [12], whose effect would be interesting to explore in future work. Our implementation opts for another approach – to grow trees constrained to have a nontrivial minimum weight per leaf. Of course, there are many other ways to handle this, including using the tree structure beyond the leaves; we just aim to conduct an exploratory evaluation here, as several of these areas remain ripe for future research. 6 4 Experimental Evaluation We now turn to evaluating HEDGECLIPPER on publicly available datasets. Our implementation uses minibatch SGD to optimize (6), runs in Python on top of the popular open-source learning package scikit-learn, and runs out-of-core (n-independent memory), taking advantage of the scalability of our formulation. 3 The datasets are drawn from UCI/LibSVM as well as data mining sites like Kaggle, and no further preprocessing was done on the data. We refer to “Base RF” as the forest of constrained trees from which our implementation draws its specialists. We restrict the training data available to the algorithm, using mostly supervised datasets because these far outnumber medium/large-scale public semi-supervised datasets. Unused labeled examples are combined with the test examples (and the extra unlabeled set, if any is provided) to form the set of unlabeled data used by the algorithm. Further information and discussion on the protocol is in the appendix. Class-imbalanced and noisy sets are included to demonstrate the aforementioned practical advantages of HEDGECLIPPER. Therefore, AUC is an appropriate measure of performance, and these results are in Table 2. Results are averaged over 10 runs, each drawing a different random subsample of labeled data. The best results according to a paired t-test are in bold. We find that the use of unlabeled data is sufficient to achieve improvements over even traditionally overfitted RFs in many cases. Notably, in most cases there is a significant benefit given by unlabeled data in our formulation, as compared to the base RF used. The boosting-type methods also perform fairly well, as we discuss in the next section. Figure 2: Class-conditional “awake ensemble prediction” (x⊤σ∗) distributions, on SUSY. Rows (top to bottom): {1K, 10K, 100K} labels. Columns (left to right): α = {1.0, 0.3, 3.0}, and the base RF. The awake ensemble prediction values x⊤σ on the unlabeled set are a natural way to visualize and explore the operation of the algorithm on the data, in an analogous way to the margin distribution in boosting [6]. One representative sample is in Fig. 2, on SUSY, a dataset with many (5M) examples, roughly evenly split between ±1. These plots demonstrate that our algorithm produces much more peaked class-conditional ensemble prediction distributions than random forests, suggesting marginbased learning applications. Changing α alters the aggressiveness of the clipping, inducing a more or less peaked distribution. The other datasets without dramatic label imbalance show very similar qualitative behavior in these respects, and these plots help choose α in practice (see appendix). Toy datasets with extremely low dimension seem to exhibit little to no significant improvement from our method. We believe this is because the distinct feature splits found by the random forest are few in number, and it is the diversity in ensemble predictions that enables HEDGECLIPPER to clip (weighted majority vote) dramatically and achieve its performance gains. On the other hand, given a large quantity of data, our algorithm is able to learn significant structure, the minimax structure appears appreciably close to reality, as evinced by the results on large datasets. 5 Related and Future Work This paper’s framework and algorithms are superficially reminiscent of boosting, another paradigm that uses voting behavior to aggregate an ensemble and has a game-theoretic intuition [1, 15]. There is some work on semi-supervised versions of boosting [16], but it departs from this principled structure and has little in common with our approach. Classical boosting algorithms like AdaBoost [17] make no attempt to use unlabeled data. It is an interesting open problem to incorporate boosting ideas into our formulation, particularly since the two boosting-type methods acquit themselves well 3It is possible to make this footprint independent of d as well by hashing features [13], not done here. 7 Dataset # training HEDGECLIPPER Random Forest Base RF AdaBoost Trees MART [14] Logistic Regression kagg-prot 10 0.567 0.509 0.500 0.520 0.497 0.510 100 0.714 0.665 0.656 0.681 0.666 0.688 ssl-text 10 0.586 0.517 0.512 0.556 0.553 0.501 100 0.765 0.551 0.542 0.596 0.569 0.552 kagg-cred 100 0.558 0.518 0.501 0.528 0.542 0.502 1K 0.602 0.534 0.510 0.585 0.565 0.505 10K 0.603 0.563 0.535 0.586 0.566 0.510 a1a 100 0.779 0.619 0.525 0.680 0.682 0.725 1K 0.808 0.714 0.655 0.734 0.722 0.768 w1a 100 0.543 0.510 0.505 0.502 0.513 0.509 1K 0.651 0.592 0.520 0.695 0.689 0.671 covtype 100 0.735 0.703 0.661 0.709 0.732 0.515 1K 0.764 0.761 0.715 0.730 0.761 0.524 10K 0.809 0.822 0.785 0.759 0.788 0.515 ssl-secstr 10 0.572 0.574 0.535 0.563 0.557 0.557 100 0.656 0.645 0.610 0.643 0.637 0.629 1K 0.687 0.682 0.646 0.690 0.689 0.683 SUSY 1K 0.776 0.769 0.764 0.747 0.771 0.720 10K 0.785 0.787 0.784 0.787 0.789 0.759 100K 0.799 0.797 0.797 0.797 0.796 0.779 epsilon 1K 0.651 0.659 0.645 0.718 0.726 0.774 webspam-uni 1K 0.936 0.928 0.920 0.923 0.928 0.840 10K 0.967 0.970 0.957 0.945 0.953 0.901 Table 2: Area under ROC curve for HEDGECLIPPER vs. supervised ensemble algorithms. in our results, and can pack information parsimoniously into many fewer ensemble classifiers than random forests. There is a long-recognized connection between transductive and semi-supervised learning, and our method bridges these two settings. Popular variants on supervised learning such as the transductive SVM [18] and graph-based or nearest-neighbor algorithms, which dominate the semi-supervised literature [8], have shown promise largely in data-poor regimes because they face major scalability challenges. Our focus on ensemble aggregation instead allows us to keep a computationally inexpensive linear formulation and avoid considering the underlying feature space of the data. Largely unsupervised ensemble methods have been explored especially in applications like crowdsourcing, in which the method of [19] gave rise to a plethora of Bayesian methods under various conditional independence generative assumptions on F [20]. Using tree structure to construct new features has been applied successfully, though without guarantees [21]. Learning with specialists has been studied in an adversarial online setting as in the work of Freund et al. [22]. Though that paper’s setting and focus is different from ours, the optimal algorithms it derives also depend on each specialist’s average error on the examples on which it is awake. Finally, we re-emphasize the generality of our formulation, which leaves many interesting questions to be explored. The specialists we form are not restricted to being trees; there are other ways of dividing the data like clustering methods. Indeed, the ensemble can be heterogeneous and even incorporate other semi-supervised methods. Our method is complementary to myriad classification algorithms, and we hope to stimulate inquiry into the many research avenues this opens. Acknowledgements The authors acknowledge support from the National Science Foundation under grant IIS-1162581. 8 References [1] Robert E. Schapire and Yoav Freund. Boosting: Foundations and Algorithms. The MIT Press, 2012. [2] Leo Breiman. Bagging predictors. Machine learning, 24(2):123–140, 1996. [3] Leo Breiman. Random forests. Machine learning, 45(1):5–32, 2001. [4] Yehuda Koren. The bellkor solution to the netflix grand prize. 2009. [5] 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. [6] Robert E Schapire, Yoav Freund, Peter Bartlett, and Wee Sun Lee. Boosting the margin: A new explanation for the effectiveness of voting methods. Annals of statistics, pages 1651–1686, 1998. [7] Olivier Chapelle, Bernhard Sch¨olkopf, and Alexander Zien. Semi-supervised learning. [8] Xiaojin Zhu and Andrew B Goldberg. Introduction to semi-supervised learning. Synthesis lectures on artificial intelligence and machine learning, 3(1):1–130, 2009. [9] Akshay Balsubramani and Yoav Freund. Optimally combining classifiers using unlabeled data. In Conference on Learning Theory, 2015. [10] Rich Caruana, Nikos Karampatziakis, and Ainur Yessenalina. An empirical evaluation of supervised learning in high dimensions. In Proceedings of the 25th international conference on Machine learning, pages 96–103. ACM, 2008. [11] Yi Lin and Yongho Jeon. Random forests and adaptive nearest neighbors. Journal of the American Statistical Association, 101(474):578–590, 2006. [12] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [13] Kilian Weinberger, Anirban Dasgupta, John Langford, Alex Smola, and Josh Attenberg. Feature hashing for large scale multitask learning. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 1113–1120. ACM, 2009. [14] Jerome H Friedman. Greedy function approximation: a gradient boosting machine. Annals of statistics, pages 1189–1232, 2001. [15] Yoav Freund and Robert E Schapire. Game theory, on-line prediction and boosting. In Proceedings of the ninth annual conference on Computational learning theory, pages 325–332. ACM, 1996. [16] P Kumar Mallapragada, Rong Jin, Anil K Jain, and Yi Liu. Semiboost: Boosting for semi-supervised learning. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 31(11):2000–2014, 2009. [17] Yoav Freund and Robert E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. J. Comput. Syst. Sci., 55(1):119–139, 1997. [18] Thorsten Joachims. Transductive inference for text classification using support vector machines. In Proceedings of the Sixteenth International Conference on Machine Learning, pages 200–209. Morgan Kaufmann Publishers Inc., 1999. [19] Alexander Philip Dawid and Allan M Skene. Maximum likelihood estimation of observer error-rates using the em algorithm. Applied statistics, pages 20–28, 1979. [20] Fabio Parisi, Francesco Strino, Boaz Nadler, and Yuval Kluger. Ranking and combining multiple predictors without labeled data. Proceedings of the National Academy of Sciences, 111(4):1253–1258, 2014. [21] Frank Moosmann, Bill Triggs, and Frederic Jurie. Fast discriminative visual codebooks using randomized clustering forests. In Twentieth Annual Conference on Neural Information Processing Systems (NIPS’06), pages 985–992. MIT Press, 2007. [22] Yoav Freund, Robert E Schapire, Yoram Singer, and Manfred K Warmuth. Using and combining predictors that specialize. In Proceedings of the twenty-ninth annual ACM symposium on Theory of computing, pages 334–343. ACM, 1997. [23] Predicting a Biological Response. 2012. https://www.kaggle.com/c/bioresponse. [24] Give Me Some Credit. 2011. https://www.kaggle.com/c/GiveMeSomeCredit. 9 | 2015 | 315 |
5,831 | Deep Convolutional Inverse Graphics Network Tejas D. Kulkarni*1, William F. Whitney*2, Pushmeet Kohli3, Joshua B. Tenenbaum4 1,2,4Massachusetts Institute of Technology, Cambridge, USA 3Microsoft Research, Cambridge, UK 1tejask@mit.edu 2wwhitney@mit.edu 3pkohli@microsoft.com 4jbt@mit.edu * First two authors contributed equally and are listed alphabetically. Abstract This paper presents the Deep Convolution Inverse Graphics Network (DCIGN), a model that aims to learn an interpretable representation of images, disentangled with respect to three-dimensional scene structure and viewing transformations such as depth rotations and lighting variations. The DCIGN model is composed of multiple layers of convolution and de-convolution operators and is trained using the Stochastic Gradient Variational Bayes (SGVB) algorithm [10]. We propose a training procedure to encourage neurons in the graphics code layer to represent a specific transformation (e.g. pose or light). Given a single input image, our model can generate new images of the same object with variations in pose and lighting. We present qualitative and quantitative tests of the model’s efficacy at learning a 3D rendering engine for varied object classes including faces and chairs. 1 Introduction Deep learning has led to remarkable breakthroughs in learning hierarchical representations from images. Models such as Convolutional Neural Networks (CNNs) [13], Restricted Boltzmann Machines, [8, 19], and Auto-encoders [2, 23] have been successfully applied to produce multiple layers of increasingly abstract visual representations. However, there is relatively little work on characterizing the optimal representation of the data. While Cohen et al. [4] have considered this problem by proposing a theoretical framework to learn irreducible representations with both invariances and equivariances, coming up with the best representation for any given task is an open question. Various work [3, 4, 7] has been done on the theory and practice of representation learning, and from this work a consistent set of desiderata for representations has emerged: invariance, interpretability, abstraction, and disentanglement. In particular, Bengio et al. [3] propose that a disentangled representation is one for which changes in the encoded data are sparse over real-world transformations; that is, changes in only a few latents at a time should be able to represent sequences which are likely to happen in the real world. The “vision as inverse graphics” paradigm suggests a representation for images which provides these features. Computer graphics consists of a function to go from compact descriptions of scenes (the graphics code) to images, and this graphics code is typically disentangled to allow for rendering scenes with fine-grained control over transformations such as object location, pose, lighting, texture, and shape. This encoding is designed to easily and interpretably represent sequences of real data so that common transformations may be compactly represented in software code; this criterion is conceptually identical to that of Bengio et al., and graphics codes conveniently align with the properties of an ideal representation. 1 observed image Filters = 96 kernel size (KS) = 5 150x150 Convolution + Pooling graphics code x Q(zi|x) Filters = 64 KS = 5 Filters = 32 KS = 5 7200 pose light shape .... Filters = 32 KS = 7 Filters = 64 KS = 7 Filters = 96 KS = 7 P(x|z) Encoder (De-rendering) Decoder (Renderer) Unpooling (Nearest Neighbor) + Convolution {µ200, ⌃200} Figure 1: Model Architecture: Deep Convolutional Inverse Graphics Network (DC-IGN) has an encoder and a decoder. We follow the variational autoencoder [10] architecture with variations. The encoder consists of several layers of convolutions followed by maxpooling and the decoder has several layers of unpooling (upsampling using nearest neighbors) followed by convolution. (a) During training, data x is passed through the encoder to produce the posterior approximation Q(zi|x), where zi consists of scene latent variables such as pose, light, texture or shape. In order to learn parameters in DC-IGN, gradients are back-propagated using stochastic gradient descent using the following variational object function: −log(P(x|zi)) + KL(Q(zi|x)||P(zi)) for every zi. We can force DC-IGN to learn a disentangled representation by showing mini-batches with a set of inactive and active transformations (e.g. face rotating, light sweeping in some direction etc). (b) During test, data x can be passed through the encoder to get latents zi. Images can be re-rendered to different viewpoints, lighting conditions, shape variations, etc by setting the appropriate graphics code group (zi), which is how one would manipulate an off-the-shelf 3D graphics engine. Recent work in inverse graphics [15, 12, 11] follows a general strategy of defining a probabilistic with latent parameters, then using an inference algorithm to find the most appropriate set of latent parameters given the observations. Recently, Tieleman et al. [21] moved beyond this two-stage pipeline by using a generic encoder network and a domain-specific decoder network to approximate a 2D rendering function. However, none of these approaches have been shown to automatically produce a semantically-interpretable graphics code and to learn a 3D rendering engine to reproduce images. In this paper, we present an approach which attempts to learn interpretable graphics codes for complex transformations such as out-of-plane rotations and lighting variations. Given a set of images, we use a hybrid encoder-decoder model to learn a representation that is disentangled with respect to various transformations such as object out-of-plane rotations and lighting variations. We employ a deep directed graphical model with many layers of convolution and de-convolution operators that is trained using the Stochastic Gradient Variational Bayes (SGVB) algorithm [10]. We propose a training procedure to encourage each group of neurons in the graphics code layer to distinctly represent a specific transformation. To learn a disentangled representation, we train using data where each mini-batch has a set of active and inactive transformations, but we do not provide target values as in supervised learning; the objective function remains reconstruction quality. For example, a nodding face would have the 3D elevation transformation active but its shape, texture and other transformations would be inactive. We exploit this type of training data to force chosen neurons in the graphics code layer to specifically represent active transformations, thereby automatically creating a disentangled representation. Given a single face image, our model can re-generate the input image with a different pose and lighting. We present qualitative and quantitative results of the model’s efficacy at learning a 3D rendering engine. 2 𝜙1 𝛼1 𝛼 𝜙L 1 𝜙L z[4,n] z = z3 z2 z1 𝜙 corresponds to Output ple in batch x1 from encoder to encoder intrinsic properties (shape, texture, etc) same as output for x1 z[4,n] z3 z2 z1 les in batch xi z[4,n] z3 z2 z1 unique for each xi in batch zero error signal for clamped outputs zero error signal for clamped outputs Backpropagation z[4,n] z3 z2 z1 z[4,n] z3 z2 z1 Caption: Training on a minibatch in which only 𝜙, the azimuth angle of the face, changes. During the forward step, the output from each component z_k != z_1 of the encoder is forced to be the same for each sample in the batch. This reflects the fact that the generating variables of the image which correspond to the desired values of these latents are unchanged throughout the batch. By holding these outputs constant throughout the batch, z_1 is forced to explain all the variance within the batch i e the full range of changes to the image caused by changing 𝜙 Figure 2: Structure of the representation vector. φ is the azimuth of the face, α is the elevation of the face with respect to the camera, and φL is the azimuth of the light source. 2 Related Work As mentioned previously, a number of generative models have been proposed in the literature to obtain abstract visual representations. Unlike most RBM-based models [8, 19, 14], our approach is trained using back-propagation with objective function consisting of data reconstruction and the variational bound. Relatively recently, Kingma et al. [10] proposed the SGVB algorithm to learn generative models with continuous latent variables. In this work, a feed-forward neural network (encoder) is used to approximate the posterior distribution and a decoder network serves to enable stochastic reconstruction of observations. In order to handle fine-grained geometry of faces, we work with relatively large scale images (150 × 150 pixels). Our approach extends and applies the SGVB algorithm to jointly train and utilize many layers of convolution and de-convolution operators for the encoder and decoder network respectively. The decoder network is a function that transform a compact graphics code ( 200 dimensions) to a 150 × 150 image. We propose using unpooling (nearest neighbor sampling) followed by convolution to handle the massive increase in dimensionality with a manageable number of parameters. Recently, [6] proposed using CNNs to generate images given object-specific parameters in a supervised setting. As their approach requires ground-truth labels for the graphics code layer, it cannot be directly applied to image interpretation tasks. Our work is similar to Ranzato et al. [18], whose work was amongst the first to use a generic encoder-decoder architecture for feature learning. However, in comparison to our proposal their model was trained layer-wise, the intermediate representations were not disentangled like a graphics code, and their approach does not use the variational auto-encoder loss to approximate the posterior distribution. Our work is also similar in spirit to [20], but in comparison our model does not assume a Lambertian reflectance model and implicitly constructs the 3D representations. Another piece of related work is Desjardins et al. [5], who used a spike and slab prior to factorize representations in a generative deep network. In comparison to existing approaches, it is important to note that our encoder network produces the interpretable and disentangled representations necessary to learn a meaningful 3D graphics engine. A number of inverse-graphics inspired methods have recently been proposed in the literature [15]. However, most such methods rely on hand-crafted rendering engines. The exception to this is work by Hinton et al. [9] and Tieleman [21] on transforming autoencoders which use a domain-specific decoder to reconstruct input images. Our work is similar in spirit to these works but has some key differences: (a) It uses a very generic convolutional architecture in the encoder and decoder networks to enable efficient learning on large datasets and image sizes; (b) it can handle single static frames as opposed to pair of images required in [9]; and (c) it is generative. 3 Model As shown in Figure 1, the basic structure of the Deep Convolutional Inverse Graphics Network (DC-IGN) consists of two parts: an encoder network which captures a distribution over graphics codes Z given data x and a decoder network which learns a conditional distribution to produce an approximation ˆx given Z. Z can be a disentangled representation containing a factored set of latent variables zi ∈Z such as pose, light and shape. This is important 3 Forward Backward Encoder Decoder out = mean zk k ∈ batch i i grad = zk mean zk k ∈ batch i i i z[4,n] z3 z2 z1 out1 = z1 grad1 = ∇z1 ∇out1 Encoder Decoder clamped unclamped Figure 3: Training on a minibatch in which only φ, the azimuth angle of the face, changes. During the forward step, the output from each component zi ̸= z1 of the encoder is altered to be the same for each sample in the batch. This reflects the fact that the generating variables of the image (e.g. the identity of the face) which correspond to the desired values of these latents are unchanged throughout the batch. By holding these outputs constant throughout the batch, the single neuron z1 is forced to explain all the variance within the batch, i.e. the full range of changes to the image caused by changing φ. During the backward step z1 is the only neuron which receives a gradient signal from the attempted reconstruction, and all zi ̸= z1 receive a signal which nudges them to be closer to their respective averages over the batch. During the complete training process, after this batch, another batch is selected at random; it likewise contains variations of only one of φ, α, φL, intrinsic; all neurons which do not correspond to the selected latent are clamped; and the training proceeds. in learning a meaningful approximation of a 3D graphics engine and helps tease apart the generalization capability of the model with respect to different types of transformations. Let us denote the encoder output of DC-IGN to be ye = encoder(x). The encoder output is used to parametrize the variational approximation Q(zi|ye), where Q is chosen to be a multivariate normal distribution. There are two reasons for using this parametrization: (1) Gradients of samples with respect to parameters θ of Q can be easily obtained using the reparametrization trick proposed in [10], and (2) Various statistical shape models trained on 3D scanner data such as faces have the same multivariate normal latent distribution [17]. Given that model parameters We connect ye and zi, the distribution parameters θ = (µzi, Σzi) and latents Z can then be expressed as: µz = Weye, Σz = diag(exp(Weye)) (1) ∀i, zi ∼N(µzi, Σzi) (2) We present a novel training procedure which allows networks to be trained to have disentangled and interpretable representations. 3.1 Training with Specific Transformations The main goal of this work is to learn a representation of the data which consists of disentangled and semantically interpretable latent variables. We would like only a small subset of the latent variables to change for sequences of inputs corresponding to real-world events. One natural choice of target representation for information about scenes is that already designed for use in graphics engines. If we can deconstruct a face image by splitting it into variables for pose, light, and shape, we can trivially represent the same transformations that these variables are used for in graphics applications. Figure 2 depicts the representation which we will attempt to learn. With this goal in mind, we perform a training procedure which directly targets this definition of disentanglement. We organize our data into mini-batches corresponding to changes in only a single scene variable (azimuth angle, elevation angle, azimuth angle of the light 4 (a) (b) Figure 4: Manipulating light and elevation variables: Qualitative results showing the generalization capability of the learned DC-IGN decoder to re-render a single input image with different pose directions. (a) We change the latent zlight smoothly leaving all 199 other latents unchanged. (b) We change the latent zelevation smoothly leaving all 199 other latents unchanged. source); these are transformations which might occur in the real world. We will term these the extrinsic variables, and they are represented by the components z1,2,3 of the encoding. We also generate mini-batches in which the three extrinsic scene variables are held fixed but all other properties of the face change. That is, these batches consist of many different faces under the same viewing conditions and pose. These intrinsic properties of the model, which describe identity, shape, expression, etc., are represented by the remainder of the latent variables z[4,200]. These mini-batches varying intrinsic properties are interspersed stochastically with those varying the extrinsic properties. We train this representation using SGVB, but we make some key adjustments to the outputs of the encoder and the gradients which train it. The procedure (Figure 3) is as follows. 1. Select at random a latent variable ztrain which we wish to correspond to one of {azimuth angle, elevation angle, azimuth of light source, intrinsic properties}. 2. Select at random a mini-batch in which that only that variable changes. 3. Show the network each example in the minibatch and capture its latent representation for that example zk. 4. Calculate the average of those representation vectors over the entire batch. 5. Before putting the encoder’s output into the decoder, replace the values zi ̸= ztrain with their averages over the entire batch. These outputs are “clamped”. 6. Calculate reconstruction error and backpropagate as per SGVB in the decoder. 7. Replace the gradients for the latents zi ̸= ztrain (the clamped neurons) with their difference from the mean (see Section 3.2). The gradient at ztrain is passed through unchanged. 8. Continue backpropagation through the encoder using the modified gradient. Since the intrinsic representation is much higher-dimensional than the extrinsic ones, it requires more training. Accordingly we select the type of batch to use in a ratio of about 1:1:1:10, azimuth : elevation : lighting : intrinsic; we arrived at this ratio after extensive testing, and it works well for both of our datasets. This training procedure works to train both the encoder and decoder to represent certain properties of the data in a specific neuron. By clamping the output of all but one of the neurons, we force the decoder to recreate all the variation in that batch using only the changes in that one neuron’s value. By clamping the gradients, we train the encoder to put all the information about the variations in the batch into one output neuron. This training method leads to networks whose latent variables have a strong equivariance with the corresponding generating parameters, as shown in Figure 6. This allows the value 5 of the true generating parameter (e.g. the true angle of the face) to be trivially extracted from the encoder. 3.2 Invariance Targeting By training with only one transformation at a time, we are encouraging certain neurons to contain specific information; this is equivariance. But we also wish to explicitly discourage them from having other information; that is, we want them to be invariant to other transformations. Since our mini-batches of training data consist of only one transformation per batch, then this goal corresponds to having all but one of the output neurons of the encoder give the same output for every image in the batch. To encourage this property of the DC-IGN, we train all the neurons which correspond to the inactive transformations with an error gradient equal to their difference from the mean. It is simplest to think about this gradient as acting on the set of subvectors zinactive from the encoder for each input in the batch. Each of these zinactive’s will be pointing to a close-together but not identical point in a high-dimensional space; the invariance training signal will push them all closer together. We don’t care where they are; the network can represent the face shown in this batch however it likes. We only care that the network always represents it as still being the same face, no matter which way it’s facing. This regularizing force needs to be scaled to be much smaller than the true training signal, otherwise it can overwhelm the reconstruction goal. Empirically, a factor of 1/100 works well. 4 Experiments Figure 5: Manipulating azimuth (pose) variables: Qualitative results showing the generalization capability of the learnt DC-IGN decoder to render original static image with different azimuth (pose) directions. The latent neuron zazimuth is changed to random values but all other latents are clamped. We trained our model on about 12,000 batches of faces generated from a 3D face model obtained from Paysan et al. [17], where each batch consists of 20 faces with random variations on face identity variables (shape/texture), pose, or lighting. We used the rmsprop [22] learning algorithm during training and set the meta learning rate equal to 0.0005, the momentum decay to 0.1 and weight decay to 0.01. To ensure that these techniques work on other types of data, we also trained networks to perform reconstruction on images of widely varied 3D chairs from many perspectives derived from the Pascal Visual Object Classes dataset as extracted by Aubry et al. [16, 1]. This task tests the ability of the DC-IGN to learn a rendering function for a dataset with high variation between the elements of the set; the chairs vary from office chairs to wicker to modern designs, and viewpoints span 360 degrees and two elevations. These networks were trained with the same methods and parameters as the ones above. 4.1 3D Face Dataset The decoder network learns an approximate rendering engine as shown in Figures (4,7). Given a static test image, the encoder network produces the latents Z depicting scene variables such as light, pose, shape etc. Similar to an off-the-shelf rendering engine, we can independently control these to generate new images with the decoder. For example, as shown in Figure 7, given the original test image, we can vary the lighting of an image by keeping all the other latents constant and varying zlight. It is perhaps surprising that the fully-trained decoder network is able to function as a 3D rendering engine. 6 (a) (b) (c) Figure 6: Generalization of decoder to render images in novel viewpoints and lighting conditions: We generated several datasets by varying light, azimuth and elevation, and tested the invariance properties of DC-IGN’s representation Z. We show quantitative performance on three network configurations as described in section 4.1. (a,b,c) All DC-IGN encoder networks reasonably predicts transformations from static test images. Interestingly, as seen in (a), the encoder network seems to have learnt a switch node to separately process azimuth on left and right profile side of the face. We also quantitatively illustrate the network’s ability to represent pose and light on a smooth linear manifold as shown in Figure 6, which directly demonstrates our training algorithm’s ability to disentangle complex transformations. In these plots, the inferred and ground-truth transformation values are plotted for a random subset of the test set. Interestingly, as shown in Figure 6(a), the encoder network’s representation of azimuth has a discontinuity at 0◦(facing straight forward). Figure 7: Entangled versus disentangled representations. First column: Original images. Second column: transformed image using DC-IGN. Third column: transformed image using normally-trained network. 4.1.1 Comparison with Entangled Representations To explore how much of a difference the DC-IGN training procedure makes, we compare the novel-view reconstruction performance of networks with entangled representations (baseline) versus disentangled representations (DC-IGN). The baseline network is identical in every way to the DC-IGN, but was trained with SGVB without using our proposed training procedure. As in Figure 4, we feed each network a single input image, then attempt to use the decoder to re-render this image at different azimuth angles. To do this, we first must figure out which latent of the entangled representation most closely corresponds to the azimuth. This we do rather simply. First, we encode all images in an azimuth-varied batch using the baseline’s encoder. Then we calculate the variance of each of the latents over this batch. The latent with the largest variance is then the one most closely associated with the azimuth of the face, and we will call it zazimuth. Once that is found, the latent zazimuth is varied for both the models to render a novel view of the face given a single image of that face. Figure 7 shows that explicit disentanglement is critical for novel-view reconstruction. 4.2 Chair Dataset We performed a similar set of experiments on the 3D chairs dataset described above. This dataset contains still images rendered from 3D CAD models of 1357 different chairs, each model skinned with the photographic texture of the real chair. Each of these models is rendered in 60 different poses; at each of two elevations, there are 30 images taken from 360 degrees around the model. We used approximately 1200 of these chairs in the training set and the remaining 150 in the test set; as such, the networks had never seen the chairs in the test set from any angle, so the tests explore the networks’ ability to generalize to arbitrary 7 (a) (b) Figure 8: Manipulating rotation: Each row was generated by encoding the input image (leftmost) with the encoder, then changing the value of a single latent and putting this modified encoding through the decoder. The network has never seen these chairs before at any orientation. (a) Some positive examples. Note that the DC-IGN is making a conjecture about any components of the chair it cannot see; in particular, it guesses that the chair in the top row has arms, because it can’t see that it doesn’t. (b) Examples in which the network extrapolates to new viewpoints less accurately. chairs. We resized the images to 150 × 150 pixels and made them grayscale to match our face dataset. We trained these networks with the azimuth (flat rotation) of the chair as a disentangled variable represented by a single node z1; all other variation between images is undifferentiated and represented by z[2,200]. The DC-IGN network succeeded in achieving a mean-squared error (MSE) of reconstruction of 2.7722 × 10−4 on the test set. Each image has grayscale values in the range [0, 1] and is 150 × 150 pixels. In Figure 8 we have included examples of the network’s ability to re-render previouslyunseen chairs at different angles given a single image. For some chairs it is able to render fairly smooth transitions, showing the chair at many intermediate poses, while for others it seems to only capture a sort of “keyframes” representation, only having distinct outputs for a few angles. Interestingly, the task of rotating a chair seen only from one angle requires speculation about unseen components; the chair might have arms, or not; a curved seat or a flat one; etc. 5 Discussion We have shown that it is possible to train a deep convolutional inverse graphics network with a fairly disentangled, interpretable graphics code layer representation from static images. By utilizing a deep convolution and de-convolution architecture within a variational autoencoder formulation, our model can be trained end-to-end using back-propagation on the stochastic variational objective function [10]. We proposed a training procedure to force the network to learn disentangled and interpretable representations. Using 3D face and chair analysis as a working example, we have demonstrated the invariant and equivariant characteristics of the learned representations. Acknowledgements: We thank Thomas Vetter for access to the Basel face model. We are grateful for support from the MIT Center for Brains, Minds, and Machines (CBMM). We also thank Geoffrey Hinton and Ilker Yildrim for helpful feedback and discussions. 8 References [1] M. Aubry, D. Maturana, A. Efros, B. Russell, and J. Sivic. Seeing 3d chairs: exemplar partbased 2d-3d alignment using a large dataset of cad models. In CVPR, 2014. [2] Y. Bengio. Learning deep architectures for ai. Foundations and trends R ⃝in Machine Learning, 2(1):1–127, 2009. [3] Y. Bengio, A. Courville, and P. Vincent. Representation learning: A review and new perspectives. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 35(8):1798–1828, 2013. [4] T. Cohen and M. Welling. Learning the irreducible representations of commutative lie groups. arXiv preprint arXiv:1402.4437, 2014. [5] G. Desjardins, A. Courville, and Y. Bengio. Disentangling factors of variation via generative entangling. arXiv preprint arXiv:1210.5474, 2012. [6] A. Dosovitskiy, J. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. arXiv:1411.5928, 2015. [7] I. Goodfellow, H. Lee, Q. V. Le, A. Saxe, and A. Y. Ng. Measuring invariances in deep networks. In Advances in neural information processing systems, pages 646–654, 2009. [8] G. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006. [9] G. E. Hinton, A. Krizhevsky, and S. D. Wang. Transforming auto-encoders. In Artificial Neural Networks and Machine Learning–ICANN 2011, pages 44–51. Springer, 2011. [10] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [11] T. D. Kulkarni, P. Kohli, J. B. Tenenbaum, and V. Mansinghka. Picture: A probabilistic programming language for scene perception. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4390–4399, 2015. [12] T. D. Kulkarni, V. K. Mansinghka, P. Kohli, and J. B. Tenenbaum. Inverse graphics with probabilistic cad models. arXiv preprint arXiv:1407.1339, 2014. [13] Y. LeCun and Y. Bengio. Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361, 1995. [14] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 609–616. ACM, 2009. [15] V. Mansinghka, T. D. Kulkarni, Y. N. Perov, and J. Tenenbaum. Approximate bayesian image interpretation using generative probabilistic graphics programs. In Advances in Neural Information Processing Systems, pages 1520–1528, 2013. [16] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. [17] P. Paysan, R. Knothe, B. Amberg, S. Romdhani, and T. Vetter. A 3d face model for pose and illumination invariant face recognition. Genova, Italy, 2009. IEEE. [18] M. Ranzato, F. J. Huang, Y.-L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pages 1–8. IEEE, 2007. [19] R. Salakhutdinov and G. E. Hinton. Deep boltzmann machines. In International Conference on Artificial Intelligence and Statistics, pages 448–455, 2009. [20] Y. Tang, R. Salakhutdinov, and G. Hinton. Deep lambertian networks. arXiv preprint arXiv:1206.6445, 2012. [21] T. Tieleman. Optimizing Neural Networks that Generate Images. PhD thesis, University of Toronto, 2014. [22] T. Tieleman and G. Hinton. Lecture 6.5 - rmsprop, coursera: Neural networks for machine learning. 2012. [23] P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio, and P.-A. Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. The Journal of Machine Learning Research, 11:3371–3408, 2010. 9 | 2015 | 316 |
5,832 | Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago Mehrdad Mahdavi TTI Chicago Alexander G. Schwing University of Toronto Abstract Maximum a-posteriori (MAP) inference is an important task for many applications. Although the standard formulation gives rise to a hard combinatorial optimization problem, several effective approximations have been proposed and studied in recent years. We focus on linear programming (LP) relaxations, which have achieved state-of-the-art performance in many applications. However, optimization of the resulting program is in general challenging due to non-smoothness and complex non-separable constraints. Therefore, in this work we study the benefits of augmenting the objective function of the relaxation with strong convexity. Specifically, we introduce strong convexity by adding a quadratic term to the LP relaxation objective. We provide theoretical guarantees for the resulting programs, bounding the difference between their optimal value and the original optimum. Further, we propose suitable optimization algorithms and analyze their convergence. 1 Introduction Probabilistic graphical models are an elegant framework for reasoning about multiple variables with structured dependencies. They have been applied in a variety of domains, including computer vision, natural language processing, computational biology, and many more. Throughout, finding the maximum a-posteriori (MAP) configuration, i.e., the most probable assignment, is one of the central tasks for these models. Unfortunately, in general the MAP inference problem is NP-hard. Despite this theoretical barrier, in recent years it has been shown that approximate inference methods based on linear programming (LP) relaxations often provide high quality MAP solutions in practice. Although tractable in principle, LP relaxations pose a real computational challenge. In particular, for many applications, standard LP solvers perform poorly due to the large number of variables and constraints [33]. Therefore, significant research effort has been put into designing efficient solvers that exploit the special structure of the MAP inference problem. Some of the proposed algorithms optimize the primal LP directly, however this is hard due to complex coupling constraints between the variables. Therefore, most of the specialized MAP solvers optimize the dual function, which is often easier since it preserves the structure of the underlying model and facilitates elegant message-passing algorithms. Nevertheless, the resulting optimization problem is still challenging since the dual function is piecewise linear and therefore non-smooth. In fact, it was recently shown that LP relaxations for MAP inference are not easier than general LPs [22]. This result implies that there exists an inherent trade-off between the approximation error (accuracy) of the relaxation and its optimization error (efficiency). In this paper we propose new ways to explore this trade-off. Specifically, we study the benefits of adding strong convexity in the form of a quadratic term to the MAP LP relaxation objective. We show that adding strong convexity to the primal LP results in a new smooth dual objective, which serves as an alternative to soft-max. This smooth objective can be computed efficiently and optimized via gradient-based methods, including accelerated gradient. On the other hand, introducing strong convexity in the dual leads to a new primal formulation in which the coupling constraints are enforced softly, through a penalty term in the objective. This allows us to derive an efficient 1 conditional gradient algorithm, also known as the Frank-Wolfe (FW) algorithm. We can then regularize both primal and dual to obtain a smooth and strongly convex objective, for which various algorithms enjoy linear convergence rate. We provide theoretical guarantees for the new objective functions, analyze the convergence rate of the proposed algorithms, and compare them to existing approaches. All of our algorithms are guaranteed to globally converge to the optimal value of the modified objective function. Finally, we show empirically that our methods are competitive with other state-of-the-art algorithms for MAP LP relaxation. 2 Related Work Several authors proposed efficient approximations for MAP inference based on LP relaxations [e.g., 30]. Kumar et al. [12] show that LP relaxation dominates other convex relaxations for MAP inference. Due to the complex non-separable constraints, only few of the existing algorithms optimize the primal LP directly. Ravikumar et al. [23] present a proximal point method that requires iterative projections onto the constraints in the inner loop. Inexactness of these iterative projections complicates the convergence analysis of this scheme. In Section 4.1 we show that adding a quadratic term to the dual problem corresponds to a much easier primal in which agreement constraints are enforced softly through a penalty term that accounts for constraint violation. This enables us to derive a simpler projection-free algorithm based on conditional gradient for the primal relaxed program [4, 13]. Recently, Belanger et al. [1] used a different non-smooth penalty term for constraint violation, and showed that it corresponds to box-constraints on dual variables. In contrast, our penalty terms are smooth, which leads to a different objective function and faster convergence guarantees. Most of the popular algorithms for MAP LP relaxations focus on the dual program and optimize it in various ways. The subgradient algorithm can be applied to the non-smooth objective [11], however its convergence rate is rather slow, both in theory and in practice. In particular, the algorithm requires O(1/✏2) iterations to obtain an ✏-accurate solution to the dual problem. Algorithms based on coordinate minimization can also be applied [e.g., 6, 10, 31], and often converge fast, but they might get stuck in suboptimal fixed points due to the non-smoothness of the objective. To overcome this limitation it has been proposed to smooth the dual objective using a soft-max function [7, 8]. Coordinate minimization methods are then guaranteed to converge to the optimum of the smoothed objective. Meshi et al. [17] have shown that the convergence rate of such algorithms is O(1/γ✏), where γ is the smoothing parameter. Accelerated gradient algorithms have also been successfully applied to the smooth dual, obtaining improved convergence rate of O(1/pγ✏), which can be used to obtain a O(1/✏) rate w.r.t. the original objective [24]. In Section 4.2 we propose an alternative smoothing technique, based on adding a quadratic term to the primal objective. We then show how gradient-based algorithms can be applied efficiently to optimize the new objective function. Other globally convergent methods that have been proposed include augmented Lagrangian [15, 16], bundle methods [9], and a steepest descent approach [25, 26]. However, the convergence rate of these methods in the context of MAP inference has not been analyzed yet, making them hard to compare to other algorithms. 3 Problem Formulation In this section we formalize MAP inference in graphical models. Consider a set of n discrete variables X1, . . . , Xn, and denote by xi a particular assignment to variable Xi. We refer to subsets of these variables by r ✓{1, . . . , n}, also known as regions, and the total number of regions is referred to as q. Each subset is associated with a local score function, or factor, ✓r(xr). The MAP problem is to find an assignment x which maximizes a global score function that decomposes over the factors: max x X r ✓r(xr) . The above combinatorial optimization problem is hard in general, and tractable only in several special cases. Most notably, for tree-structured graphs or super-modular pairwise score functions, efficient dynamic programming algorithms can be applied. Here we do not make such simplifying assumptions and instead focus on approximate inference. In particular, we are interested in approx2 imations based on the LP relaxation, taking the following form: max µ2ML f(µ) := X r X xr µr(xr)✓r(xr) = µ>✓ (1) where: ML = ⇢ µ ≥0 #### P xr µr(xr) = 1 8r P xp\xr µp(xp) = µr(xr) 8r, xr, p : r 2 p % , where ‘r 2 p’ represents a containment relationship between the regions p and r. The dual program of the above LP is formulated as minimizing the re-parameterization of factors [32]: min δ g(δ) := X r max xr ✓r(xr) + X p:r2p δpr(xr) − X c:c2r δrc(xc) ! ⌘ X r max xr ˆ✓δ r(xr) , (2) This is a piecewise linear function in the dual variables δ. Hence, it is convex (but not strongly) and non-smooth. Two commonly used optimization schemes for this objective are subgradient descent and block coordinate minimization. While the convergence rate of the former can be upper bounded by O(1/✏2), the latter is non-convergent due to the non-smoothness of the objective function. To remedy this shortcoming, it has been proposed to smooth the objective by replacing the local maximization with a soft-max [7, 8]. The resulting unconstrainted program is: min δ gγ(δ) := X r γ log X xr exp ˆ✓δ r(xr) γ ! . (3) This dual form corresponds to adding local entropy terms to the primal given in Eq. (1), obtaining: max µ2ML X r X xr (µr(xr)✓r(xr) + γH(µr)) , (4) where H(µr) = −P xr µr(xr) log µr(xr) denotes the entropy. The following guarantee holds for the smooth optimal value g⇤ γ: g⇤g⇤ γ g⇤+ γ X r log Vr , (5) where g⇤is the optimal value of the dual program given in Eq. (2), and Vr = |r| denotes the number of variables in region r. The dual given in Eq. (3) is a smooth function with Lipschitz constant L = 1 γ P r Vr [see 24]. In this case coordinate minimization algorithms are globally convergent (to the smooth optimum), and their convergence rate can be bounded by O(1/γ✏) [17]. Gradient-based algorithms can also be applied to the smooth dual and have similar convergence rate O(1/γ✏). This can be improved using Nesterov’s acceleration scheme to obtain an O(1/pγ✏) rate [24]. The gradient of Eq. (3) takes the simple form: rδpr(xr)gγ = 0 @br(xr) − X xp\xr bp(xp) 1 A , where br(xr) / exp ˆ✓δ r(xr) γ ! . (6) 4 Introducing Strong Convexity In this section we study the effect of adding strong convexity to the objective function. Specifically, we add the Euclidean norm of the variables to either the dual (Section 4.1) or primal (Section 4.2) function. We study the properties of the objectives, and propose appropriate optimization schemes. 4.1 Strong Convexity in the Dual As mentioned above, the dual given in Eq. (2) is a piecewise linear function, hence not smooth. Introducing strong convexity to control the convergence rate, is an alternative to smoothing. We propose to introduce strong convexity by simply adding the L2 norm of the variables to the dual 3 Algorithm 1 Block-coordinate Frank-Wolfe for soft-constrained primal 1: Initialize: µr(xr) = {xr = argmaxx0r ˆ✓δ(µ) r (x0 r)} for all r, xr 2: while not converged do 3: Pick r at random 4: Let sr(xr) = {xr = argmaxx0r ˆ✓δ(µ) r (x0 r)} for all xr 5: Let ⌘= (ˆ✓δ(µ) r ) >(sr−µr) 1 λ Prksr−µrk2+ 1 λ P c:c2r kArc(sr−µr)k2 , and clip to [0, 1] 6: Update µr (1 −⌘)µr + ⌘sr 7: end while program given in Eq. (2), i.e., min δ ˘gλ(δ) := g(δ) + λ 2 kδk2 . (7) The corresponding primal objective is then (see Appendix A): max µ2∆⇥fλ(µ) := µ>✓−1 2λ X r,xr,p:r2p 0 @ X xp\xr µp(xp) −µr(xr) 1 A 2 = µ>✓−λ 2 kAµk2 , (8) where ∆⇥preserves only the separable per-region simplex constraints in ML, and for convenience we define (Aµ)r,xr,p = 1 λ ⇣P xp\xr µp(xp) −µr(xr) ⌘ . Importantly, this primal program is similar to the original primal given in Eq. (1), but the non-separable marginalization constraints in ML are enforced softly – via a penalty term in the objective. Interestingly, the primal in Eq. (8) is somewhat similar to the objective function obtained by the steepest descent approach proposed by Schwing et al. [25], despite being motivated from different perspectives. Similar to Schwing et al. [25], our algorithm below is also based on conditional gradient, however ours is a single-loop algorithm, whereas theirs employs a double-loop procedure. We obtain the following guarantee for the optimum of the strongly convex dual (see Appendix C): g⇤˘g⇤ λ g⇤+ λ 2 h , (9) where h is chosen such that kδ⇤k2 h. It can be shown that h = (4Mqk✓k1)2, where M = maxr Wr, and Wr is the number of configurations of region r (see Appendix C). Notice that this bound is worse than the soft-max bound stated in Eq. (5) due to the dependence on the magnitude of the parameters ✓and the number of configurations Wr. Optimization It is easy to modify the subgradient algorithm to optimize the strongly convex dual given in Eq. (7). It only requires adding the term λδ to the subgradient. Since the objective is non-smooth and strongly convex, we obtain a convergence rate of O(1/λ✏) [19]. We note that coordinate descent algorithms for the dual objective are still non-convergent, since the program is still non-smooth. Instead, we propose to optimize the primal given in Eq. (8) via a conditional gradient algorithm [4]. Specifically, in Algorithm 1 we implement the block-coordinate Frank-Wolfe algorithm proposed by Lacoste-Julien et al. [13]. In Algorithm 1 we denote Pr = |{p : r 2 p}|, we define δ(µ) as δpr(xr) = 1 λ ⇣P xp\xr µp(xp) −µr(xr) ⌘ , and Arcµr = P xr\xc µr(xr). In Appendix D we show that the convergence rate of Algorithm 1 is O(1/λ✏), similar to subgradient in the dual. However, Algorithm 1 has several advantages over subgradient. First, the step-size requires no tuning since the optimal step ⌘is computed analytically. Second, it is easy to monitor the sub-optimality of the current solution by keeping track of the duality gap P r (ˆ✓δ r) >(sr −µr), which provides a sound stopping condition.1 Notice that the basic operation for the update is maximization over the re-parameterization (maxxr ˆ✓δ r(xr)), which is similar to a subgradient computation. This operation is sometimes cheaper than coordinate minimization, which requires computing max1Similar rate guarantees can be derived for the duality gap. 4 marginals [see 28]. We also point out that, similar to Lacoste-Julien et al. [13], it is possible to execute Algorithm 1 in terms of dual variables, without storing primal variables µr(xr) for large parent regions (see Appendix E for details). As we demonstrate in Section 5, this can be important when using global factors. We note that Algorithm 1 can be used with minor modifications in the inner loop of an augmented Lagrangian algorithm [15]. But we show later that this double-loop procedure is not necessary to obtain good results for some applications. Finally, Meshi et al. [18] show how to use the objective in Eq. (8) to obtain an efficient training algorithm for learning the score functions ✓from data. 4.2 Strong Convexity in the Primal We next consider appending the primal given in Eq. (1) with a similar L2 norm, obtaining: max µ2ML fγ(µ) := µ>✓−γ 2 kµk2 . (10) It turns out that the corresponding dual function takes the form (see Appendix B): min δ ˜gγ(δ) := X r max u2∆ ⇣ u>ˆ✓δ r −γ 2 kuk2⌘ = X r 0 @γ 2 ..... ˆ✓δ r γ ..... 2 −min u2∆ γ 2 .....u − ˆ✓δ r γ ..... 21 A . (11) Thus the dual objective involves scaling the factor reparameterization ˆ✓δ r by 1/γ, and then projecting the resulting vector onto the probability simplex. We denote the result of this projection by ur (or just u when clear from context). The L2 norm in Eq. (10) has the same role as the entropy terms in Eq. (4), and serves to smooth the dual function. This is a consequence of the well known duality between strong convexity and smoothness [e.g., 21]. In particular, the dual stated in Eq. (11) is smooth with Lipschitz constant L = q/γ. To calculate the objective value we need to compute the projection ur onto the simplex for all factors. This can be done by sorting the elements of the scaled reparameterization ˆ✓δ r/γ, and then shifting all elements by the same value such that all positive elements sum to 1. The negative elements are then set to 0 [see, e.g., 3, for details]. Intuitively, we can think of ur as a max-marginal which does not place weight 1 on the maximum element, but instead spreads the weight among the top scoring elements, if their score is close enough to the maximum. The effect is similar to the soft-max case, where br can also be thought-of as a soft max-marginal (see Eq. (6)). On the other hand, unlike br, our max-marginal ur will most likely be sparse, since only a few elements tend to have scores close to the maximum and hence non-zero value in ur. Another interesting property of the dual in Eq. (11) is invariance to shifting, which is also the case for the non-smooth dual provided in Eq. (2) and the soft-max dual given in Eq. (3). Specifically, shifting all elements of δpr(·) by the same value does not change the objective value, since the projection onto the simplex is shift-invariant. We next bound the difference between the smooth optimum and the original one. The bound follows easily from the bounded norm of µr in the probability simplex: f ⇤−γ 2 q f ⇤ γ f ⇤, or equivalently: f ⇤ ⇣ f ⇤ γ + γ 2 q ⌘ f ⇤+ γ 2 q . We actually use the equivalent form on the right in order to get an upper bound rather than a lower bound.2 From strong duality we immediately get a similar guarantee for the dual optimum: g⇤ ⇣ ˜g⇤ γ + γ 2 q ⌘ g⇤+ γ 2 q . Notice that this bound is better than the corresponding soft-max bound stated in Eq. (5), since it does not depend on the scope size of regions, i.e., Vr. 2In our experiments we show the shifted objective value. 5 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 Convex Strongly-convex Non-smooth Dual: min δ g(δ) := ! r max xr ˆ✓δ r(xr) Subgradient O(1/ϵ2) CD (non-convergent) Primal: max µ∈ML µ⊤✓ Proximal projections Dual: min δ g(δ) + λ 2 ∥δ∥2 Subgradient O(1/λϵ) Primal: max µ∈∆⇥µ⊤✓−λ 2 ∥Aµ∥2 FW O(1/λϵ) Section 4.1 L2-max Dual: min δ ˜gγ(δ) := ! r max u∈∆ " u⊤ˆ✓δ r −γ 2 ∥u∥2# Gradient O(1/γϵ) Accelerated O(1/√γϵ) CD? Primal: max µ∈ML µ⊤✓−γ 2 ∥µ∥2 Section 4.2 Dual: min δ ˜gγ(δ) + λ 2 ∥δ∥2 Gradient O( 1 γλ log( 1 ϵ )) Accelerated O( 1 √γλ log( 1 ϵ )) Primal: max µ∈∆⇥µ⊤✓−λ 2 ∥Aµ∥2 −γ 2 ∥µ∥2 SDCA O((1 + 1 γλ) log( 1 ϵ )) Section 4.3 Soft-max Dual: min δ gγ(δ) := ! r γ log ! xr exp " ˆθδ r(xr) γ # Gradient O(1/γϵ) Accelerated O(1/√γϵ) CD O(1/γϵ) Primal: max µ∈ML µ⊤✓+ γ ! r H(µr) Dual: min δ gγ(δ) + λ 2 ∥δ∥2 Gradient O( 1 γλ log( 1 ϵ )) Accelerated O( 1 √γλ log( 1 ϵ )) Primal: max µ∈∆⇥µ⊤✓−λ 2 ∥Aµ∥2 + γ ! r H(µr) Section 4.3 Table 1: Summary of objective functions, algorithms and rates. Existing approaches are shaded. Optimization To solve the dual program given in Eq. (11) we can use gradient-based algorithms. The gradient takes the form: rδpr(xr)˜gγ = 0 @ur(xr) − X xp\xr up(xp) 1 A , which only requires computing the projection ur, as in the objective function. Notice that this form is very similar to the soft-max gradient (Eq. (6)), with projections u taking the role of beliefs b. The gradient descent algorithm applies the updates: δ δ −1 Lr˜gγ iteratively. The convergence rate of this scheme for our smooth dual is O(1/γ✏), which is similar to the soft-max rate [26]. As in the soft-max case, Nesterov’s accelerated gradient method achieves a better O(1/pγ✏) rate [see 16]. Unfortunately, it is not clear how to derive efficient coordinate minimization updates for the dual in Eq. (11), since the projection ur depends on the dual variables δ in a non-linear manner. Finally, we point out that the program in Eq. (10) is very similar to the one solved in the inner loop of proximal point methods [5]. Therefore our gradient-based algorithm can be used with minor modifications as a subroutine within such proximal algorithms (requires mapping the final dual solution to a feasible primal solution [see, e.g., 15]). 4.3 Smooth and Strong In order to obtain a smooth and strongly convex objective function, we can add an L2 regularizer to the smooth program given in Eq. (11) (similarly possible for the soft-max dual in Eq. (3)). Gradientbased algorithms have linear convergence rate in this case [26]. Equivalently, we can add an L2 term to the primal in Eq. (8). Although conditional gradient is not guaranteed to converge linearly in this case [27], stochastic coordinate ascent (SDCA) does enjoy linear convergence, and can even be accelerated to gain better dependence on the smoothing and convexity parameters [28]. This requires only minor modifications to the algorithms discussed above, which are highlighted in Appendix F. To conclude this section, we summarize all objective functions and algorithms in Table 1. 5 Experiments We now proceed to evaluate the proposed methods on real and synthetic data and compare them to existing state-of-the-art approaches. We begin with a synthetic model adapted from Kolmogorov [12]. This example was designed to show that coordinate descent algorithms might get stuck in suboptimal points due to non-smoothness. We compare the following MAP inference algorithms: non-smooth coordinate descent (CD), non-smooth subgradient descent, smooth CD (for soft-max), gradient descent (GD) and accelerated GD (AGD) with either soft-max or L2 smoothing (Section 6 Table 1: Summary of objective functions, algorithms and rates. Row and column headers pertain to the dual objective. Previously known approaches are shaded. Optimization To solve the dual program given in Eq. (11) we can use gradient-based algorithms. The gradient takes the form: rδpr(xr)˜gγ = 0 @ur(xr) − X xp\xr up(xp) 1 A , which only requires computing the projection ur, as in the objective function. Notice that this form is very similar to the soft-max gradient (Eq. (6)), with projections u taking the role of beliefs b. The gradient descent algorithm applies the updates: δ δ −1 Lr˜gγ iteratively. The convergence rate of this scheme for our smooth dual is O(1/γ✏), which is similar to the soft-max rate [20]. As in the soft-max case, Nesterov’s accelerated gradient method achieves a better O(1/pγ✏) rate [see 24]. Unfortunately, it is not clear how to derive efficient coordinate minimization updates for the dual in Eq. (11), since the projection ur depends on the dual variables δ in a non-linear manner. Finally, we point out that the program in Eq. (10) is very similar to the one solved in the inner loop of proximal point methods [23]. Therefore our gradient-based algorithm can be used with minor modifications as a subroutine within such proximal algorithms (requires mapping the final dual solution to a feasible primal solution [see, e.g., 17]). 4.3 Smooth and Strong In order to obtain a smooth and strongly convex objective function, we can add an L2 term to the smooth program given in Eq. (11) (similarly possible for the soft-max dual in Eq. (3)). Gradientbased algorithms have linear convergence rate in this case [20]. Equivalently, we can add an L2 term to the primal in Eq. (8). Although conditional gradient is not guaranteed to converge linearly in this case [5], stochastic coordinate ascent (SDCA) does enjoy linear convergence, and can even be accelerated to gain better dependence on the smoothing and convexity parameters [27]. This requires only minor modifications to the algorithms presented above, which are highlighted in Appendix F. To conclude this section, we summarize all objective functions and algorithms in Table 1. 5 Experiments We now proceed to evaluate the proposed methods on real and synthetic data and compare them to existing state-of-the-art approaches. We begin with a synthetic model adapted from Kolmogorov [10]. This example was designed to show that coordinate descent algorithms might get stuck in suboptimal points due to non-smoothness. We compare the following MAP inference algorithms: non-smooth coordinate descent (CD), non-smooth subgradient descent, smooth CD (for soft-max), gradient descent (GD) and accelerated GD (AGD) with either soft-max or L2 smoothing (Section 4.2), our Frank-Wolfe Algorithm 1 (FW), and the linear convergence variants (Section 4.3). In Fig. 1 6 10 0 10 2 10 4 10 6 −60 −40 −20 0 Iterations Objective CD Non−smooth Subgradient CD Soft, γ=1 CD Soft, γ=0.1 CD Soft, γ=0.01 GD Soft, γ=0.01 AGD Soft, γ=0.01 GD L2, γ=0.01 AGD L2, γ=1 AGD L2, γ=0.1 AGD L2, γ=0.01 FW, λ=0.01 FW, λ=0.001 FW, λ=0.0001 AGD, γ=0.1, λ=0.001 SDCA, γ=0.1, λ=0.001 Non−smooth OPT Figure 1: Comparison of various inference algorithms on a synthetic model. The objective value as a function of the iterations is plotted. The optimal value is shown in thin dashed dark line. we notice that non-smooth CD (light blue, dashed) is indeed stuck at the initial point. Second, we observe that the subgradient algorithm (yellow) is extremely slow to converge. Third, we see that smooth CD algorithms (green) converge nicely to the smooth optimum. Gradient-based algorithms for the same smooth (soft-max) objective (purple) also converge to the same optimum, while AGD is much faster than GD. We can also see that gradient-based algorithms for the L2-smooth objective (red) preform slightly better than their soft-max counterparts. In particular, they have faster convergence and tighter objective for the same value of the smoothing parameter, as our theoretical analysis suggests. For example, compare the convergence of AGD soft and AGD L2 both with γ = 0.01. For the optimal value, compare CD soft and AGD L2 both with γ = 1. Fourth, we note that the FW algorithm (blue) requires smaller values of the strong-convexity parameter λ in order to achieve high accuracy, as our bound in Eq. (9) predicts. We point out that the dependence on the smoothing or strong convexity parameter is roughly linear, which is also aligned with our convergence bounds. Finally, we see that for this model the smooth and strongly convex algorithms (gray) perform similar or even slightly worse than either the smooth-only or strongly-convex-only counterparts. In our experiments we compare the number of iterations rather than runtime of the algorithms since the computational cost per iteration is roughly the same for all algorithms (includes a pass over all factors), and the actual runtime greatly depends on the implementation. For example, gradient computation for L2 smoothing requires sorting factors rather than just maximizing over their values, incurring worst-case cost of O(Wr log Wr) per factor instead of just O(Wr) for soft-max gradient. However, one can use partitioning around a pivot value instead of sorting, yielding O(Wr) cost in expectation [3], and caching the pivot can also speed-up the runtime considerably. Moreover, logarithm and exponent operations needed by the soft-max gradient are much slower than the basic operations used for computing the L2 smooth gradient. As another example, we point out that AGD algorithms can be further improved by searching for the effective Lipschitz constant rather than using the conservative bound L (see [24] for more details). In order to abstract away these details we compare the iteration cost of the vanilla versions of all algorithms. We next conduct experiments on real data from a protein side-chain prediction problem from Yanover et al. [33]. This problem can be cast as MAP inference in a model with unary and pairwise factors. Fig. 2 (left) shows the convergence of various MAP algorithms for one of the proteins (similar behavior was observed for the other instances). The behavior is similar to the synthetic example above, except for the much better performance of non-smooth coordinate descent. In particular, we see that coordinate minimization algorithms perform very well in this setting, better than gradientbased and the FW algorithms (this finding is consistent with previous work [e.g., 17]). Only a closer look (Fig. 2, left, bottom) reveals that smoothing actually helps to obtain a slightly better solution here. In particular, the soft-max CD (with γ = 0.001) and L2-max AGD (with γ = 0.01), as well as the primal (SDCA) and dual (AGD) algorithms for the smooth and strongly convex objective, are able to recover the optimal solution within the allowed number of iterations. The non-smooth FW algorithm also finds a near-optimal solution. Finally, we apply our approach to an image segmentation problem with a global cardinality factor. Specifically, we use the Weizmann Horse dataset for foreground-background segmentation [2]. All images are resized to 150 ⇥150 pixels, and we use 50 images to learn the parameters of the model and the other 278 images to test inference. Our model consists of unary and pairwise factors along with a single global cardinality factor, that serves to encourage segmentations where the number of foreground pixels is not too far from the trainset mean. Specifically, we use the cardinality factor from Li and Zemel [14], defined as: ✓c(x) = max{0, |s −s0| −t}2, where s = P i xi. Here, s0 is a reference cardinality computed from the training set, and t is a tolerance parameter, set to t = s0/5. 7 10 0 10 1 10 2 10 3 10 4 0 50 100 150 200 250 Iterations Objective 10 0 10 1 10 2 10 3 10 4 102 103 104 105 106 107 Iterations Objective Iterations 100 101 102 103 104 Objective -10000 -8000 -6000 -4000 -2000 0 2000 CD Non-smooth Subgradient CD Soft =0.01 CD Soft =0.001 AGD L2 =0.01 AGD L2 =0.001 AGD Soft =0.01 AGD Soft =0.001 FW =0.01 AGD =0.01 =0.01 SDCA =0.01 =0.01 10 0 10 1 10 2 10 3 10 4 −8 −6 −4 −2 0 x 10 5 Iterations Objective Subgradient MPLP FW Figure 2: (Left) Comparison of MAP inference algorithms on a protein side-chain prediction problem. In the upper figure the solid lines show the optimized objective for each algorithm, and the dashed lines show the score of the best decoded solution (obtained via simple rounding). The bottom figure shows the value of the decoded solution in more detail. (Right) Comparison of MAP inference algorithms on an image segmentation problem. Again, solid lines show the value of the optimized objective while dashed lines show the score of the best decoded solution so far. First we notice that not all of the algorithms are efficient in this setting. In particular, algorithms that optimize the smooth dual (either soft-max or L2 smoothing) need to enumerate factor configurations in order to compute updates, which is prohibitive for the global cardinality factor. We therefore take the non-smooth subgradient and coordinate descent [MPLP, 6] as baselines, and compare their performance to that of our FW Algorithm 1 (with λ = 0.01). We use the variant that does not store primal variables for the global factor (Appendix E). We point out that MPLP requires calculating max-marginals for factors, rather than a simple maximization for subgradient and FW. In the case of cardinality factors this can be done at similar cost using dynamic programming [29], however there are other types of factors where max-marginal computation might be more expensive than max [28]. In Fig. 2 (right) we show a typical run for a single image, where we limit the number of iterations to 10K. We observe that subgradient descent is again very slow to converge, and coordinate descent is also rather slow here (in fact, it is not even guaranteed to reach the optimum). In contrast, our FW algorithm converges orders of magnitude faster and finds a high quality solution (for runtime comparison see Appendix G). Over the entire 278 test instances we found that FW gets the highest score solution for 237 images, while MPLP finds the best solution in only 41 images, and subgradient never wins. To explain this success, recall that our algorithm enforces the agreement constraints between factor marginals only softly. It makes sense that in this setting it is not crucial to reach full agreement between the cardinality factor and the other factors in order to obtain a good solution. 6 Conclusion In this paper we studied the benefits of strong convexity for MAP inference. We introduced a simple L2 term to make either the dual or primal LP relaxations strongly convex. We analyzed the resulting objective functions and provided theoretical guarantees for their optimal values. We then proposed several optimization algorithms and derived upper bounds on their convergence rates. Using the same machinery, we obtained smooth and strongly convex objective functions, for which our algorithms retained linear convergence guarantees. Our approach offers new ways to trade-off the approximation error of the relaxation and the optimization error. Indeed, we showed empirically that our methods significantly outperform strong baselines on problems involving cardinality potentials. To extend our work we aim at natural language processing applications since they share characteristics similar to the investigated image segmentation task. Finally, we were unable to derive closed-form coordinate minimization updates for our L2-smooth dual in Eq. (11). We hope to find alternative smoothing techniques which facilitate even more efficient updates. References [1] D. Belanger, A. Passos, S. Riedel, and A. McCallum. Message passing for soft constraint dual decomposition. In UAI, 2014. 8 [2] E. Borenstein, E. Sharon, and S. Ullman. Combining top-down and bottom-up segmentation. In CVPR, 2004. [3] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the l 1-ball for learning in high dimensions. In ICML, pages 272–279, 2008. [4] M. Frank and P. Wolfe. An algorithm for quadratic programming, volume 3, pages 95–110. 1956. [5] D. Garber and E. Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. arXiv preprint arXiv:1301.4666, 2013. [6] A. Globerson and T. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. In NIPS. MIT Press, 2008. [7] T. Hazan and A. Shashua. Norm-product belief propagation: Primal-dual message-passing for approximate inference. IEEE Transactions on Information Theory, 56(12):6294–6316, 2010. [8] J. Johnson. Convex Relaxation Methods for Graphical Models: Lagrangian and Maximum Entropy Approaches. PhD thesis, EECS, MIT, 2008. [9] J. H. Kappes, B. Savchynskyy, and C. Schn¨orr. A bundle approach to efficient map-inference by lagrangian relaxation. In CVPR, 2012. [10] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(10):1568–1583, 2006. [11] N. Komodakis, N. Paragios, and G. Tziritas. MRF energy minimization and beyond via dual decomposition. IEEE PAMI, 2010. [12] M. P. Kumar, V. Kolmogorov, and P. H. S.Torr. An analysis of convex relaxations for map estimation of discrete mrfs. JMLR, 10:71–106, 2009. [13] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate Frank-Wolfe optimization for structural SVMs. In ICML, pages 53–61, 2013. [14] Y. Li and R. Zemel. High order regularization for semi-supervised learning of structured output problems. In ICML, pages 1368–1376, 2014. [15] A. L. Martins, M. A. T. Figueiredo, P. M. Q. Aguiar, N. A. Smith, and E. P. Xing. An augmented lagrangian approach to constrained map inference. In ICML, pages 169–176, 2011. [16] O. Meshi and A. Globerson. An alternating direction method for dual map lp relaxation. In ECML, 2011. [17] O. Meshi, T. Jaakkola, and A. Globerson. Convergence rate analysis of map coordinate minimization algorithms. In NIPS, pages 3023–3031, 2012. [18] O. Meshi, N. Srebro, and T. Hazan. Efficient training of structured svms via soft constraints. In AISTATS, 2015. [19] A. Nemirovski and D. Yudin. Problem complexity and method efficiency in optimization. Wiley, 1983. [20] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course, volume 87. Kluwer Academic Publishers, 2004. [21] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Prog., 103(1):127–152, 2005. [22] D. Prusa and T. Werner. Universality of the local marginal polytope. In CVPR, pages 1738–1743. IEEE, 2013. [23] P. Ravikumar, A. Agarwal, and M. J. Wainwright. Message-passing for graph-structured linear programs: Proximal methods and rounding schemes. JMLR, 11:1043–1080, 2010. [24] B. Savchynskyy, S. Schmidt, J. Kappes, and C. Schnorr. A study of Nesterov’s scheme for lagrangian decomposition and map labeling. CVPR, 2011. [25] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Dual MAP LP Relaxation Solvers using Fenchel-Young Margins. In Proc. NIPS, 2012. [26] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Parallel MAP LP Relaxation Solver using the Frank-Wolfe Algorithm. In Proc. ICML, 2014. [27] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. In ICML, 2014. [28] D. Sontag, A. Globerson, and T. Jaakkola. Introduction to dual decomposition for inference. In Optimization for Machine Learning, pages 219–254. MIT Press, 2011. [29] D. Tarlow, I. Givoni, and R. Zemel. Hop-map: Efficient message passing with high order potentials. In AISTATS, volume 9, pages 812–819. JMLR: W&CP, 2010. [30] M. Wainwright, T. Jaakkola, and A. Willsky. MAP estimation via agreement on trees: message-passing and linear programming. IEEE Transactions on Information Theory, 51(11):3697–3717, 2005. [31] T. Werner. A linear programming approach to max-sum problem: A review. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(7):1165–1179, 2007. [32] T. Werner. Revisiting the linear programming relaxation approach to gibbs energy minimization and weighted constraint satisfaction. IEEE PAMI, 32(8):1474–1488, 2010. [33] C. Yanover, T. Meltzer, and Y. Weiss. Linear programming relaxations and belief propagation – an empirical study. Journal of Machine Learning Research, 7:1887–1907, 2006. 9 | 2015 | 317 |
5,833 | Efficient Compressive Phase Retrieval with Constrained Sensing Vectors Sohail Bahmani, Justin Romberg School of Electrical and Computer Engineering. Georgia Institute of Technology Atlanta, GA 30332 {sohail.bahmani,jrom}@ece.gatech.edu Abstract We propose a robust and efficient approach to the problem of compressive phase retrieval in which the goal is to reconstruct a sparse vector from the magnitude of a number of its linear measurements. The proposed framework relies on constrained sensing vectors and a two-stage reconstruction method that consists of two standard convex programs that are solved sequentially. In recent years, various methods are proposed for compressive phase retrieval, but they have suboptimal sample complexity or lack robustness guarantees. The main obstacle has been that there is no straightforward convex relaxations for the type of structure in the target. Given a set of underdetermined measurements, there is a standard framework for recovering a sparse matrix, and a standard framework for recovering a low-rank matrix. However, a general, efficient method for recovering a jointly sparse and low-rank matrix has remained elusive. Deviating from the models with generic measurements, in this paper we show that if the sensing vectors are chosen at random from an incoherent subspace, then the low-rank and sparse structures of the target signal can be effectively decoupled. We show that a recovery algorithm that consists of a low-rank recovery stage followed by a sparse recovery stage will produce an accurate estimate of the target when the number of measurements is O(k log d k), where k and d denote the sparsity level and the dimension of the input signal. We also evaluate the algorithm through numerical simulation. 1 Introduction 1.1 Problem setting The problem of Compressive Phase Retrieval (CPR) is generally stated as the problem of estimating a k-sparse vector x⋆∈Rd from noisy measurements of the form yi = |⟨ai, x⋆⟩|2 + zi (1) for i = 1, 2, . . . , n, where ai is the sensing vector and zi denotes the additive noise. In this paper, we study the CPR problem with specific sensing vectors ai of the form ai = Ψ Twi, (2) where Ψ ∈Rm×d and wi ∈Rm are known. In words, the measurement vectors live in a fixed low-dimensional subspace (i.e, the row space of Ψ). These types of measurements can be applied in imaging systems that have control over how the scene is illuminated; examples include systems that use structured illumination with a spatial light modulator or a scattering medium [1, 2]. 1 By a standard lifting of the signal x⋆to X⋆= x⋆x⋆T, the quadratic measurements (1) can be expressed as yi = aiaT i , X⋆ + zi = D Ψ TwiwT i Ψ, X⋆E + zi. (3) With the linear operator W and A defined as W :B 7→ wiwT i , B n i=1 and A : X 7→W ΨXΨ T , we can write the measurements compactly as y = A (X⋆) + z. Our goal is to estimate the sparse, rank-one, and positive semidefinite matrix X⋆from the measurements (3), which also solves the CPR problem and provides an estimate for the sparse signal x⋆up to the inevitable global phase ambiguity. Assumptions We make the following assumptions throughout the paper. A1. The vectors wi are independent and have the standard Gaussian distribution on Rm: wi ∼ N (0, I) . A2. The matrix Ψ is a restricted isometry matrix for 2k-sparse vectors and for a constant δ2k ∈ [0, 1]. Namely, it obeys (1 −δ2k) ∥x∥2 2 ≤∥Ψx∥2 2 ≤(1 + δ2k) ∥x∥2 2 , (4) for all 2k-sparse vectors x ∈Rd. A3. The noise vector z is bounded as ∥z∥2 ≤ε. As will be seen in Theorem 1 and its proof below, the Gaussian distribution imposed by the assumption A1 will be used merely to guarantee successful estimation of a rank-one matrix through trace norm minimization. However, other distributions (e.g., uniform distribution on the unit sphere) can also be used to obtain similar guarantees. Furthermore, the restricted isometry condition imposed by the assumption A2 is not critical and can be replaced by weaker assumptions. However, the guarantees obtained under these weaker assumptions usually require more intricate derivations, provide weaker noise robustness, and often do not hold uniformly for all potential target signals. Therefore, to keep the exposition simple and straightforward we assume (4) which is known to hold (with high probability) for various ensembles of random matrices (e.g., Gaussian, Rademacher, partial Fourier, etc). Because in many scenarios we have the flexibility of selecting Ψ, the assumption (4) is realistic as well. Notation Let us first set the notation used throughout the paper. Matrices and vectors are denoted by bold capital and small letters, respectively. The set of positive integers less than or equal to n is denoted by [n]. The notation f = O (g) is used when f = cg for some absolute constant c > 0. For any matrix M, the Frobenius norm, the nuclear norm, the entrywise ℓ1-norm, and the largest entrywise absolute value of the entries are denoted by ∥M∥F , ∥M∥∗, ∥M∥1, and ∥M∥∞, respectively. To indicate that a matrix M is positive semidefinite we write M ≽0. 1.2 Contributions The main challenge in the CPR problem in its general formulation is to design an accurate estimator that has optimal sample complexity and computationally tractable. In this paper we address this challenge in the special setting where the sensing vectors can be factored as (2). Namely, we propose an algorithm that • provably produces an accurate estimate of the lifted target X⋆from only n = O k log d k measurements, and • can be computed in polynomial time through efficient convex optimization methods. 2 1.3 Related work Several papers including [3, 4, 5, 6, 7] have already studied the application of convex programming for (non-sparse) phase retrieval (PR) in various settings and have established estimation accuracy through different mathematical techniques. These phase retrieval methods attain nearly optimal sample complexities that scales with the dimension of the target signal up to a constant factor [4, 5, 6] or at most a logarithmic factor [3]. However, to the best of our knowledge, the exiting methods for CPR either lack accuracy and robustness guarantees or have suboptimal sample complexities. The problem of recovering a sparse signal from the magnitude of its subsampled Fourier transforms is cast in [8] as an ℓ1-minimization with non-convex constraints. While [8] shows that a sufficient number of measurements would grow quadratically in k (i.e., the sparsity of the signal), the numerical simulations suggest that the non-convex method successfully estimates the sparse signal with only about k log d k measurements. Another non-convex approach to CPR is considered in [9] which poses the problem as finding a k-sparse vector that minimizes the residual error that takes a quartic form. A local search algorithm called GESPAR [10] is then applied to (approximate) the solution to the formulated sparsity-constrained optimization. This approach is shown to be effective through simulations, but it also lacks global convergence or statistical accuracy guarantees. An alternating minimization method for both PR and CPR is studied in [11]. This method is appealing in large scale problems because of computationally inexpensive iterations. More importantly, [11] proposes a specific initialization using which the alternating minimization method is shown to converge linearly in noise-free PR and CPR. However, the number of measurements required to establish this convergence is effectively quadratic in k. In [12] and [13] the ℓ1-regularized form of the trace minimization argmin X≽0 trace (X) + λ ∥X∥1 subject to A (X) = y (5) is proposed for the CPR problem. The guarantees of [13] are based on the restricted isometry property of the sensing operator X 7→[⟨aia∗ i , X⟩]n i=1 for sparse matrices. In [12], however, the analysis is based on construction of a dual certificate through an adaptation of the golfing scheme [14]. Assuming standard Gaussian sensing vectors ai and with appropriate choice of the regularization parameter λ, it is shown in [12] that (5) solves the CPR when n = O k2 log d . Furthermore, this method fails to recover the target sparse and rank-one matrix if n is dominated by k2. Estimation of simultaneously structured matrices through convex relaxations similar to (5) is also studied in [15] where it is shown that these methods do not attain optimal sample complexity. More recently, assuming that the sparse target has a Bernoulli-Gaussian distribution, a generalized approximate message passing framework is proposed in [16] to solve the CPR problem. Performance of this method is evaluated through numerical simulations for standard Gaussian sensing matrices which show the empirical phase transition for successful estimation occurs at n = O k log d k and also the algorithms can have a significantly lower runtime compared to some of the competing algorithms including GESPAR [10] and CPRL [13]. The PhaseCode algorithm is proposed in [17] to solve the CPR problem with sensing vectors designed using sparse graphs and techniques adapted from coding theory. Although PhaseCode is shown to achieve the optimal sample complexity, it lacks robustness guarantees. While preparing the final version of the current paper, we became aware of [18] which has independently proposed an approach similar to ours to address the CPR problem. 2 Main Results 2.1 Algorithm We propose a two-stage algorithm outlined in Algorithm 1. Each stage of the algorithm is a convex program for which various efficient numerical solvers exists. In the first stage we solve (6) to obtain a low-rank matrix bB which is an estimator of the matrix B⋆= ΨX⋆Ψ T. 3 Then bB is used in the second stage of the algorithm as the measurements for a sparse estimation expressed by (7). The constraint of (7) depends on an absolute constant C > 0 that should be sufficiently large. Algorithm 1: input : the measurements y, the operator W, and the matrix Ψ output: the estimate c X 1 Low-rank estimation stage: bB ∈argmin B≽0 trace (B) subject to ∥W (B) −y∥2 ≤ε (6) 2 Sparse estimation stage: c X ∈argmin X ∥X∥1 subject to
ΨXΨ T −bB
F ≤Cε √n (7) Post-processing. The result of the low-rank estimation stage (6) is generally not rank-one. Similarly, the sparse estimation stage does not necessarily produce a c X that is k × k-sparse (i.e., it has at most k nonzero rows and columns) and rank-one. In fact, since we have not imposed the positive semidefiniteness constraint (i.e., X ≽0) in (7), the estimate c X is not even guaranteed to be positive semidefinite (PSD). However, we can enforce the rank-one or the sparsity structure in postprocessing steps simply by projecting the produced estimate on the set of rank-one or k × k-sparse PSD matrices. The simple but important observation is that projecting c X onto the desired sets at most doubles the estimation error. This fact is shown by Lemma 2 in Section 4 in a general setting. Alternatives. There are alternative convex relaxations for the low-rank estimation and the sparse estimation stages of Algorithm (1). For example, (6) can be replaced by its regularized least squares analog bB ∈argmin B≽0 1 2 ∥W (B) −y∥2 2 + λ ∥B∥∗, for an appropriate choice of the regularization parameter λ. Similarly, instead of (7) we can use an ℓ1-regularized least squares. Furthermore, to perform the low-rank estimation and the sparse estimation we can use non-convex greedy type algorithms that typically have lower computational costs. For example, the low-rank estimation stage can be performed via the Wirtinger flow method proposed in [19]. Furthermore, various greedy compressive sensing algorithms such as the Iterative Hard Thresholding [20] and CoSaMP [21] can be used to solve the desired sparse estimation. To guarantee the accuracy of these compressive sensing algorithms, however, we might need to adjust the assumption A2 to have the restricted isometry property for ck-sparse vectors with c being some small positive integer. 2.2 Accuracy guarantees The following theorem shows that any solution of the proposed algorithm is an accurate estimator of X⋆. Theorem 1. Suppose that the assumptions A1, A2, and A3 hold with a sufficiently small constant δ2k. Then, there exist positive absolute constants C1, C2, and C3 such that if n ≥C1m, (8) then any estimate c X of the Algorithm 1 obeys
c X −X⋆
F ≤C2ε √n , 4 for all rank-one and k × k-sparse matrices X⋆≽0 with probability exceeding 1 −e−C3n. The proof of Theorem 1 is straightforward and is provided in Section 4. The main idea is first to show the low-rank estimation stage produces an accurate estimate of B⋆. Because this stage can be viewed as a standard phase retrieval through lifting, we can simply use accuracy guarantees that are already established in the literature (e.g., [3, 6, 5]). In particular, we use [5, Theorem 2] which established an error bound that holds uniformly for all valid B⋆. Thus we can ensure that X⋆is feasible in the sparse estimation stage. Then the accuracy of the sparse estimation stage can also be established by a simple adaptation of the analyses based on the restricted isometry property such as [22]. The dependence of n (i.e., the number of measurements) and k (i.e., the sparsity of the signal) is not explicit in Theorem 1. This dependence is absorbed in m which must be sufficiently large for Assumption A2 to hold. Considering a Gaussian matrix Ψ, the following corollary gives a concrete example where the dependence of non k through m is exposed. Corollary 1. Suppose that the assumptions of Theorem 1 including (8) hold. Furthermore, suppose that Ψ is a Gaussian matrix with iid N 0, 1 m entries and m ≥c1k log d k , (9) for some absolute constant c1 > 0. Then any estimate c X produced by Algorithm 1 obeys
c X −X⋆
F ≤C2ε √n , for all rank-one and k×k-sparse matrices X⋆≽0 with probability exceeding 1−3e−c2m for some constant c2 > 0. Proof. It is well-known that if Ψ has iid N 0, 1 m and we have (9) then (4) holds with high probability. For example, using a standard covering argument and a union bound [23] shows that if (9) holds for a sufficiently large constant c1 > 0 then we have (4) for a sufficiently small constant δ2k with probability exceeding 1 −2e−cm for some constant c > 0 that depends only on δ2k. Therefore, Theorem 1 yields the desired result which holds with probability exceeding 1 −2e−cm −e−C3n ≥1 −3e−c2m for some constant c2 > 0 depending only on δ2k. 3 Numerical Experiments We evaluated the performance of Algorithm 1 through some numerical simulations. The low-rank estimation stage and the sparse estimation stage are implemented using the TFOCS package [24]. We considered the target k-sparse signal x⋆to be in R256 (i.e., d = 256). The support set of of the target signal is selected uniformly at random and the entry values on this support are drawn independently from N (0, 1). The noise vector z is also Gaussian with independent N 0, 10−4 . The operator W and the matrix Ψ are drawn from some Gaussian ensembles as described in Corollary 1. We measured the relative error ∥b X−X⋆∥F ∥X⋆∥F of achieved by the compared methods over 100 trials with sparsity level (i.e., k) varying in the set {2, 4, 6, . . . , 20}. In the first experiment, for each value of k, the pair (m, n) that determines the size W and Ψ are selected from {(8k, 24k) , (8k, 32k) , (12k, 36k) , (12k, 48k) , (16k, 48k)}. Figure 1 illustrates the 0.9 quantiles of the relative error versus k for the mentioned choices of m. In the second experiment we compared the performance of Algorithm 1 to the convex optimization methods that do not exploit the structure of the sensing vectors. The setup for this experiment is the same as in the first experiment except for the size of W and Ψ; we chose m = 2k 1 + log d k and n = 3m, where ⌈r⌉denotes the smallest integer greater than r. Figure 2 illustrates the 0.9 quantiles of the measured relative errors for Algorithm 1, the semidefinite program (5) for λ = 0 and λ = 0.2, and the ℓ1-minimization argmin X ∥X∥1 subject to A (X) = y, 5 Figure 1: The empirical 0.9 quantile of the relative estimation error vs. sparsity for various choices of m and n with d = 256. Figure 2: The empirical 0.9 quantile of the relative estimation error vs. sparsity for Algorithm 1 and different trace- and/or ℓ1- minimization methods with d = 256, m = 2k 1 + log d k , and n = 3m. which are denoted by 2-stage, SDP, SDP+ℓ1, and ℓ1, respectively. The SDP-based method did not perform significantly different for other values of λ in our complementary simulations. The relative error for each trial is also overlaid in Figure 2 visualize its empirical distribution. The empirical performance of the algorithms are in agreement with the theoretical results. Namely in a regime where n = O (m) = O k log d k , Algorithm 1 can produce accurate estimates whereas while the other approaches fail in this regime. The SDP and SDP+ℓ1 show nearly identical performance. The ℓ1-minimization, however, competes with Algorithm 1 for small values of k. This observation can be explained intuitively by the fact that the ℓ1-minimization succeeds with n = O k2 measurements which for small values of k can be sufficiently close to the considered n = 3 2k 1 + log d k measurements. 6 4 Proofs Proof of Theorem 1. Clearly, B⋆= ΨX⋆Ψ T is feasible in 6 because of A3. Therefore, we can show that any solution bB of (6) accurately estimates B⋆using existing results on nuclear-norm minimization. In particular, we can invoke [5, Theorem 2 and Section 4.3] which guarantees that for some positive absolute constants C1, C′ 2, and C3 if (8) holds then
bB −B⋆
F ≤C′ 2ε √n , holds for all valid B⋆, thereby for all valid X⋆, with probability exceeding 1 −e−C3n. Therefore, with C = C′ 2, the target matrix X⋆would be feasible in (7). Now, it suffices to show that the sparse estimation stage can produce an accurate estimate of X⋆. Recall that by A2, the matrix Ψ is restricted isometry for 2k-sparse vectors. Let X be a matrix that is 2k × 2k-sparse, i.e., a matrix whose entries except for some 2k × 2k submatrix are all zeros. Applying (4) to the columns of X and adding the inequalities yield (1 −δ2k) ∥X∥2 F ≤∥ΨX∥2 F ≤(1 + δ2k) ∥X∥2 F . (10) Because the columns of XTΨ T are also 2k-sparse we can repeat the same argument and obtain (1 −δ2k)
XTΨ T
2 F ≤
ΨXTΨ T
2 F ≤(1 + δ2k)
XTΨ T
2 F . (11) Using the facts that
XTΨ T
F = ∥ΨX∥F and
ΨXTΨ T
F =
ΨXΨ T
F , the inequalities (10) and (11) imply that (1 −δ2k)2 ∥X∥2 F ≤
ΨXΨ T
2 F ≤(1 + δ2k)2 ∥X∥2 F . (12) The proof proceeds with an adaptation of the arguments used to prove accuracy of ℓ1-minimization in compressive sensing based on the restricted isometry property (see, e.g., [22]). Let E = c X −X⋆. Furthermore, let S0 ⊆[d] × [d] denote the support set of the k × k-sparse target X⋆. Define E0 to be a d × d matrix that is identical to E over the index set S0 and zero elsewhere. By optimality of c X and feasibility of X⋆in (7) we have ∥X⋆∥1 ≥
c X
1 = ∥X⋆+ E −E0 + E0∥1 ≥∥X⋆+ E −E0∥1 −∥E0∥1 = ∥X⋆∥1 + ∥E −E0∥1 −∥E0∥1 , where the last line follows from the fact that X⋆and E −E0 have disjoint supports. Thus, we have ∥E −E0∥1 ≤∥E0∥1 ≤k ∥E0∥F . (13) Now consider a decomposition of E −E0 as the sum E −E0 = J X j=1 Ej, (14) such that for j ≥0 the d × d matrices Ej have disjoint support sets of size k × k except perhaps for the last few matrices that might have smaller supports. More importantly, the partitioning matrices Ej are chosen to have a decreasing Frobenius norm (i.e., ∥Ej∥F ≥∥Ej+1∥F ) for j ≥1. We have
J X j=2 Ej
F ≤ J X j=2 ∥Ej∥F ≤1 k J X j=2 ∥Ej−1∥1 ≤1 k ∥E −E0∥1 ≤∥E0∥F ≤∥E0 + E1∥F , (15) where the chain of inequalities follow from the triangle inequality, the fact that ∥Ej∥∞≤ 1 k2 ∥Ej−1∥1 by construction, the fact that the matrices Ej have disjoint support and satisfy (14), the bound (13), and the fact that E0 and E1 are orthogonal. Furthermore, we have
Ψ (E0 + E1) Ψ T
2 F = * Ψ (E0 + E1) Ψ T, Ψ E − J X j=2 Ej Ψ T + ≤
Ψ (E0 + E1) Ψ T
F
ΨEΨ T
F + 1 X i=0 J X j=2 D ΨEiΨ T, ΨEjΨ TE , (16) 7 where the first term is obtained by the Cauchy-Schwarz inequality and the summation is obtained by the triangle inequality. Because E = c X −X⋆by definition, the triangle inequality and the fact that X⋆and c X are feasible in (7) imply that
ΨEΨ T
F ≤
Ψc XΨ T −bB
F +
ΨX⋆Ψ T −bB
F ≤ 2Cε √n . Furthermore, Lemma 1 below which is adapted from [22, Lemma 2.1] guarantees that for i ∈{0, 1} and j ≥2 we have D ΨEiΨ T, ΨEjΨ TE ≤2δ2k ∥Ei∥F ∥Ej∥F . Therefore, we obtain (1 −δ2k)2 ∥E0 + E1∥2 F ≤
Ψ (E0 + E1) Ψ T
2 F ≤2Cε √n
Ψ (E0 + E1) Ψ T
F + 2δ2k 1 X i=0 J X j=2 ∥Ei∥F ∥Ej∥F ≤2Cε √n (1 + δ2k) ∥E0 + E1∥F + 2δ2k 1 X i=0 J X j=2 ∥Ei∥F ∥Ej∥F ≤2Cε √n (1 + δ2k) ∥E0 + E1∥F + 2δ2k (∥E0∥F + ∥E1∥F ) ∥E0 + E1∥F ≤∥E0 + E1∥F 2Cε √n (1 + δ2k) + 2 √ 2δ2k ∥E0 + E1∥F where the chain of inequalities follow from the lower bound in (12), the bound (16), the upper bound in (12), the bound (15), and the fact that ∥E0∥F + ∥E1∥F ≤ √ 2 ∥E0 + E1∥F . If δ2k < 1 + √ 2 1 − p 1 + √ 2 ≈0.216, then we have γ := (1 −δ2k)2 −2 √ 2δ2k > 0 and thus ∥E0 + E1∥F ≤2C (1 + δ2k) ε γ√n . Adding the above inequality to (13) and applying the triangle then yields the desired result. Lemma 1. Let Ψ be a matrix obeying (4). Then for any pair of k × k-sparse matrices X and X′ with disjoint supports we have D ΨXΨ T, ΨX′Ψ TE ≤2δ2k ∥X∥F
X′
F . Proof. Suppose that X and X′ have unit Frobenius norm. Using the identity D ΨXΨ T, ΨX′Ψ TE = 1 4
Ψ X + X′ Ψ T
2 F −
Ψ X −X′ Ψ T
2 F and the fact that X and X′ have disjoint supports, it follows from (12) that −2δ2k = (1 −δ2k)2 −(1 + δ2k)2 2 ≤ D ΨXΨ T, ΨX′Ψ TE ≤(1 + δ2k)2 −(1 −δ2k)2 2 = 2δ2k. The general result follows immediately as the desired inequality is homogeneous in the Frobenius norms of X and X′. Lemma 2 (Projected estimator). Let S be a closed nonempty subset of a normed vector space (V, ∥·∥). Suppose that for v⋆∈S we have an estimator bv ∈V, not necessarily in S, that obeys ∥bv −v⋆∥≤ϵ. If ev denotes a projection of bv onto S, then we have ∥ev −v⋆∥≤2ϵ. Proof. By definition ev ∈argminv∈S ∥v −bv∥. Therefore, because v⋆∈S we have ∥ev −v⋆∥≤∥bv −v⋆∥+ ∥ev −bv∥≤2 ∥bv −v⋆∥≤2ϵ. Acknowledgements This work was supported by ONR grant N00014-11-1-0459, and NSF grants CCF-1415498 and CCF-1422540. 8 References [1] Jacopo Bertolotti, Elbert G. van Putten, Christian Blum, Ad Lagendijk, Willem L. Vos, and Allard P. Mosk. Non-invasive imaging through opaque scattering layers. Nature, 491(7423):232–234, Nov. 2012. [2] Antoine Liutkus, David Martina, Sébastien Popoff, Gilles Chardon, Ori Katz, Geoffroy Lerosey, Sylvain Gigan, Laurent Daudet, and Igor Carron. Imaging with nature: Compressive imaging using a multiply scattering medium. Scientific Reports, volume 4, article no. 5552, Jul. 2014. [3] Emmanuel J. Candès, Thomas Strohmer, and Vladislav Voroninski. PhaseLift: Exact and stable signal recovery from magnitude measurements via convex programming. Communications on Pure and Applied Mathematics, 66(8):1241–1274, 2013. [4] Emmanuel J. Candès and Xiaodong Li. Solving quadratic equations via PhaseLift when there are about as many equations as unknowns. Foundations of Computational Mathematics, 14(5):1017–1026, 2014. [5] R. Kueng, H. Rauhut, and U. Terstiege. Low rank matrix recovery from rank one measurements. Applied and Computational Harmonic Analysis, 2015. In press. Preprint arXiv:1410.6913 [cs.IT]. [6] Joel A. Tropp. Convex recovery of a structured signal from independent random linear measurements. Preprint arXiv:1405.1102 [cs.IT], 2014. [7] Irène Waldspurger, Alexandre d’Aspremont, and Stéphane Mallat. Phase recovery, MaxCut and complex semidefinite programming. Mathematical Programming, 149(1-2):47–81, 2015. [8] Matthew L. Moravec, Justin K. Romberg, and Richard G. Baraniuk. Compressive phase retrieval. In Proceedings of SPIE Wavelets XII, volume 6701, pages 670120 1–11, 2007. [9] Yoav Shechtman, Yonina C. Eldar, Alexander Szameit, and Mordechai Segev. Sparsity based subwavelength imaging with partially incoherent light via quadratic compressed sensing. Optics Express, 19(16):14807–14822, Aug. 2011. [10] Yoav Shechtman, Amir Beck, and Yonina C. Eldar. GESPAR: Efficient phase retrieval of sparse signals. Signal Processing, IEEE Transactions on, 62(4):928–938, Feb. 2014. [11] Praneeth Netrapalli, Prateek Jain, and Sujay Sanghavi. Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems 26 (NIPS 2013), pages 2796–2804, 2013. [12] Xiaodong Li and Vladislav Voroninski. Sparse signal recovery from quadratic measurements via convex programming. SIAM Journal on Mathematical Analysis, 45(5):3019–3033, 2013. [13] Henrik Ohlsson, Allen Yang, Roy Dong, and Shankar Sastry. CPRL–an extension of compressive sensing to the phase retrieval problem. In Advances in Neural Information Processing Systems 25 (NIPS 2012), pages 1367–1375, 2012. [14] David Gross. Recovering low-rank matrices from few coefficients in any basis. Information Theory, IEEE Transactions on, 57(3):1548–1566, Mar. 2011. [15] Samet Oymak, Amin Jalali, Maryam Fazel, Yonina Eldar, and Babak Hassibi. Simultaneously structured models with application to sparse and low-rank matrices. Information Theory, IEEE Transactions on, 61(5):2886–2908, 2015. [16] P. Schniter and S. Rangan. Compressive phase retrieval via generalized approximate message passing. Signal Processing, IEEE Transactions on, 63(4):1043–1055, February 2015. [17] Ramtin Pedarsani, Kangwook Lee, and Kannan Ramchandran. Phasecode: Fast and efficient compressive phase retrieval based on sparse-graph codes. In Communication, Control, and Computing (Allerton), 52nd Annual Allerton Conference on, pages 842–849, Sep. 2014. Extended preprint arXiv:1408.0034 [cs.IT]. [18] Mark Iwen, Aditya Viswanathan, and Yang Wang. Robust sparse phase retrieval made easy. Applied and Computational Harmonic Analysis, 2015. In press. Preprint arXiv:1410.5295 [math.NA]. [19] Emmanuel J. Candès, Xiaodong Li, and Mahdi Soltanolkotabi. Phase retrieval via Wirtinger flow: Theory and algorithms. Information Theory, IEEE Transactions on, 61(4):1985–2007, Apr. 2015. [20] Thomas Blumensath and Mike E. Davies. Iterative hard thresholding for compressed sensing. Applied and Computational Harmonic Analysis, 27(3):265–274, 2009. [21] Deanna Needell and Joel A. Tropp. CoSaMP: Iterative signal recovery from incomplete and inaccurate samples. Applied and Computational Harmonic Analysis, 26(3):301–321, 2009. [22] Emmanuel J. Candès. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9-10):589–592, 2008. [23] Richard Baraniuk, Mark Davenport, Ronald DeVore, and Michael Wakin. A simple proof of the restricted isometry property for random matrices. Constructive Approximation, 28(3):253–263, 2008. [24] Stephen R. Becker, Emmanuel J. Candès, and Michael C. Grant. Templates for convex cone problems with applications to sparse signal recovery. Mathematical Programming Computation, 3(3):165–218, 2011. 9 | 2015 | 318 |
5,834 | Convolutional Spike-triggered Covariance Analysis for Neural Subunit Models Anqi Wu1 Il Memming Park2 Jonathan W. Pillow1 1 Princeton Neuroscience Institute, Princeton University {anqiw, pillow}@princeton.edu 2 Department of Neurobiology and Behavior, Stony Brook University memming.park@stonybrook.edu Abstract Subunit models provide a powerful yet parsimonious description of neural responses to complex stimuli. They are defined by a cascade of two linear-nonlinear (LN) stages, with the first stage defined by a linear convolution with one or more filters and common point nonlinearity, and the second by pooling weights and an output nonlinearity. Recent interest in such models has surged due to their biological plausibility and accuracy for characterizing early sensory responses. However, fitting poses a difficult computational challenge due to the expense of evaluating the log-likelihood and the ubiquity of local optima. Here we address this problem by providing a theoretical connection between spike-triggered covariance analysis and nonlinear subunit models. Specifically, we show that a “convolutional” decomposition of a spike-triggered average (STA) and covariance (STC) matrix provides an asymptotically efficient estimator for class of quadratic subunit models. We establish theoretical conditions for identifiability of the subunit and pooling weights, and show that our estimator performs well even in cases of model mismatch. Finally, we analyze neural data from macaque primary visual cortex and show that our moment-based estimator outperforms a highly regularized generalized quadratic model (GQM), and achieves nearly the same prediction performance as the full maximum-likelihood estimator, yet at substantially lower cost. 1 Introduction A central problem in systems neuroscience is to build flexible and accurate models of the sensory encoding process. Neurons are often characterized as responding to a small number of features in the high-dimensional space of natural stimuli. This motivates the idea of using dimensionality reduction methods to identify the features that affect the neural response [1–9]. However, many neurons in the early visual pathway pool signals from a small population of upstream neurons, each of which integrates and nolinearly transforms the light from a small region of visual space. For such neurons, stimulus selectivity is often not accurately described with a small number of filters [10]. A more accurate description can be obtained by assuming that such neurons pool inputs from an earlier stage of shifted, identical nonlinear “subunits” [11–13]. Recent interest in subunit models has surged due to their biological plausibility and accuracy for characterizing early sensory responses. In the visual system, linear pooling of shifted rectified linear filters was first proposed to describe sensory processing in the cat retina [14, 15], and more recent work has proposed similar models for responses in other early sensory areas [16–18]. Moreover, recent research in machine learning and computer vision has focused on hierarchical stacks of such subunit models, often referred to as Convolutional Neural Networks (CNN) [19–21]. The subunit models we consider here describe neural responses in terms of an LN-LN cascade, that is, a cascade of two linear-nonlinear (LN) processing stages, each of which involves linear projection and a nonlinear transformation. The first LN stage is convolutional, meaning it is formed from one or 1 stimulus output nonlinearity response pooling weights subunit nonliearity subunit filter Poisson spiking W3 W4 W5 W6 W7 W1 W2 1st LN stage 2nd LN stage Figure 1: Schematic of subunit LN-LNP cascade model. For simplicity, we show only 1 subunit type. more banks of identical, spatially shifted subunit filters, with outputs transformed by a shared subunit nonlinearity. The second LN stage consists of a set of weights for linearly pooling the nonlinear subunits, an output nonlinearity for mapping the output into the neuron’s response range, and finally, an noise source for capturing the stochasticity of neural responses (typically assumed to be Gaussian, Bernoulli or Poisson). Vintch et al proposed one variant of this type of subunit model, and showed that it could account parsimoniously for the multi-dimensional input-output properties revealed by spike-triggered analysis of V1 responses [12, 13]. However, fitting such models remains a challenging problem. Simple LN models with Gaussian or Poisson noise can be fit very efficiently with spiketriggered-moment based estimators [6–8], but there is no equivalent theory for LN-LN or subunit models. This paper aims to fill that gap. We show that a convolutional decomposition of the spike-triggered average (STA) and covariance (STC) provides an asymptotically efficient estimator for a Poisson subunit model under certain technical conditions: the stimulus is Gaussian, the subunit nonlinearity is well described by a second-order polynomial, and the final nonlinearity is exponential. In this case, the subunit model represents a special case of a canonical Poisson generalized quadratic model (GQM), which allows us to apply the expected log-likelihood trick [7, 8] to reduce the log-likelihood to a form involving only the moments of the spike-triggered stimulus distribution. Estimating the subunit model from these moments, an approach we refer to as convolutional STC, has fixed computational cost that does not scale with the dataset size after a single pass through the data to compute sufficient statistics. We also establish theoretical conditions under which the model parameters are identifiable. Finally, we show that convolutional STC is robust to modest degrees of model mismatch, and is nearly as accurate as the full maximum likelihood estimator when applied to neural data from V1 simple and complex cells. 2 Subunit Model We begin with a general definition of the Poisson convolutional subunit model (Fig. 1). The model is specified by: subunit outputs: smi = f(km · xi) (1) spike rate: λ = g ⇣X m X i wmi smi ⌘ (2) spike count: y|λ ⇠Poiss(λ), (3) where km is the filter for the m’th type of subunit, xi is the vectorized stimulus segment in the i’th position of the shifted filter during convolution, and f is the nonlinearity governing subunit outputs. For the second stage, wmi is a linear pooling weight from the m’th subunit at position i, and g is the neuron’s output nonlinearity. Spike count y is conditionally Poisson with rate λ. Fitting subunit models with arbitrary g and f poses significant computational challenges. However, if we set g to exponential and f takes the form of second-order polynomial, the model reduces to λ = exp ⇣ 1 2 X wmi (km · xi)2+ X wmi (km · xi) + a ⌘ (4) = exp ⇣ 1 2 x>C[w,k]x + b> [w,k]x + a ⌘ (5) where C[w,k] = X m K> m diag(wm)Km, b[w,k] = X m K> mwm, (6) 2 and Km is a Toeplitz matrix consisting of shifted copies of km satisfying Kmx = [x1, x2, x3, . . .]>km. In essence, these restrictions on the two nonlinearities reduce the subunit model to a (canonicalform) Poisson generalized quadratic model (GQM) [7, 8, 22], that is, a model in which the Poisson spike rate takes the form of an exponentiated quadratic function of the stimulus. We will pursue the implications of this mapping below. We assume that k is a spatial filter vector without time expansion. If we have a spatio-temporal stimulus-response, k should be a spatial-temporal filter, but the subunit convolution (across filter position i) involves only the spatial dimension(s). From (eqs. 4 and 5) it can be seen that the subunit model contains fewer parameters than a full GLM, making it a more parsimonious description for neurons with multi-dimensional stimulus selectivity. 3 Estimators for Subunit Model With the above definitions and formulations, we now present three estimators for the model parameters {w, k}. To simplify the notation, we omit the subscript in C[w,k] and b[w,k], but their dependence on the model parameters is assumed throughout. Maximum Log-Likelihood Estimator The maximum log-likelihood estimator (MLE) has excellent asymptotic properties, though it comes with the high computational cost. The log-likelihood function can be written: LMLE(✓) = X i yi log λi − X i λi (7) = X yi( 1 2x> i Cxi + b>xi + a) − X exp( 1 2x> i Cxi + b>xi + a) (8) = Tr[C⇤] + b>µ + ansp − "X i exp( 1 2x> i Cxi + b>xi + a) # (9) where µ = P i yixi is the spike-triggered average (STA) and ⇤= P i yixix> i is the spike-triggered covariance (STC) and nsp = P i yi is the total number of spikes. We denote the MLE as ✓MLE. Moment-based Estimator with Expected Log-Likelihood Fitting If the stimuli are drawn from x ⇠N(0, Φ), a zero-mean Gaussian with covariance Φ, then the expression in square brackets divided by N in (eq. 9) will converge to its expectation, given by E ⇥ exp( 1 2x> i Cxi + b>xi + a) ⇤ = |I −ΦC|−1 2 exp ) 1 2b>(Φ−1 −C)−1b + a * (10) Substituting this expectation into (9) yields a quantity called expected log-likelihood, with the objective function as, LELL(✓) = Tr[C⇤] + b>µ + ansp −N|I −ΦC|−1 2 exp ) 1 2b>(Φ−1 −C)−1b + a * (11) where N is the number of time bins. We refer to ✓MELE = arg max✓LELL(✓) as the MELE (maximum expected log-likelihood estimator) [7, 8, 22]. Moment-based Estimator with Least Squares Fitting Maximizing (11) w.r.t {C, b, a} yields analytical expected maximum likelihood estimates [7]: Cmele = Φ−1 −⇤−1, bmele = ⇤−1µ, amele = log( nsp N |Φ⇤−1| 1 2 ) −1 2µ>Φ−1⇤−1µ (12) With these analytical estimates, it is straightforward and to optimize w and k by directly minimizing squared error: LLS(✓) = ||Cmele −K> diag(w)K||2 2 + ||bmele −K>w||2 2 (13) which corresponds to an optimal “convolutional” decomposition of the moment-based estimates. This formulation shows that the eigenvectors of Cmele are spanned by shifted copies of k. We denote this estimate ✓LS. All three estimators, ✓MLE, ✓MELE and ✓LS should provide consistent estimates for the subunit model parameters due to consistency of ML and MELE estimates. However, the moment-based estimates 3 (MELE and LS) are computationally much simpler, and scale much better to large datasets, due to the fact that they depend on the data only via the spike-triggered moments. In fact their only dependence on the dataset size is the cost of computing the STA and STC in one pass through the data. As for efficiency, ✓LS has the drawback of being sensitive to noise in the Cmele estimate, which has far more free parameters than in the two vectors w and k (for a 1-subunit model). Therefore, accurate estimation of Cmele should be a precondition for good performance of ✓LS, and we expect ✓MELE to perform better for small datasets. 4 Identifiability The equality C = C[w,k] = K> diag(w)K is a core assumption to bridge the theoretical connection between a subunit model and the spike-triggered moments (STA & STC). In case we care about recovering the underlying biological structure, we maybe interested to know when the solution is unique and naively interpretable. Here we address the identifiability of the convolution decomposition of C for k and w estimation. Specifically, we briefly study the uniqueness of the form C = K> diag(w)K for a single subunit and multiple subunits respectively. We provide the proof for the single subunit case in the main text, and the proof for multiple subunits sharing the same pooling weight w in the supplement. Note that failure of identifiability only indicates that there are possible symmetries in the solution space so that there are multiple equivalent optima, which is a question of theoretical interest, but it holds no implications for practical performance. 4.1 Identifiability for Single Subunit Model We will frequently make use of frequency domain representation. Let B 2 Rd⇥d denote the discrete Fourier transform (DFT) matrix with j-th column is, bj = h 1, e−2⇡ d (j−1), e−2⇡ d 2(j−1), e−2⇡ d 3(j−1), . . . , e−2⇡ d (d−1)(j−1)i> . (14) Let ek be a d-dimensional vector resulting from a discrete Fourier transform, that is, ek = Bkk where Bk is a d ⇥dk DFT matrix, and similarly ew 2 Rd be a Fourier representation of w. We assume that k and w have full support in the frequency domain. Assumption 1. No element in ek or ew is zero. Theorem. Suppose Assumption 1 holds, the convolution decomposition C = K> diag(w)K is uniquely identifiable up to shift and scale, where C 2 Rd⇥d and d = dk + dw −1. Proof. We fix k (and thus ek) to be a unit vector to deal with the obvious scale invariance. First note that we can rewrite the convolution operator K using DFT matrices as, K = BH diag(Bkk)Bw (15) where B 2 Rd⇥d is the DFT matrix and (·)H denotes conjugate transpose operation. Thus, C = BH diag(ek)H Bw diag(w)BH w diag(ek)B (16) Note that f W := Bw diag(w)BH w is a circulant matrix, f W := circulant(ew) = 0 B B B B @ ew1 ewd · · · ew3 ew2 ew2 ew1 · · · ew4 ew3 ... ... ... ... ... ewd−1 ewd−2 · · · ew1 ewd ewd ewd−1 · · · ew2 ew1 1 C C C C A (17) Hence, we can rewrite (16) in the frequency domain as, eC = BCBH = diag(ek)H f W diag(ek) = f W ⊙(ekekH)> (18) Since B is invertible, the uniqueness of the original C decomposition is equivalent to the uniqueness of eC decomposition. The newly defined decomposition is eC = f W ⊙(ekekH)>. (19) 4 Suppose there are two distinct decompositions {f W, ek} and {eV , eg}, where both {k, ek} and {g, eg} are unit vectors, such that eC = f W ⊙(ekekH)> = eV ⊙(egegH)>. Since both f W and eV have no zero, define the element-wise ratio R := (f W./eV )> 2 Rd⇥d, then we have R ⊙ekekH = egegH (20) Note that rank(R ⊙ekekH) = rank(egegH) = 1. R is also a circulant matrix which can be diagonalized by DFT [23]: R = B diag (r1, . . . , rd)BH. We can express R as R = Pd i=1 ribibH i . Using the identity for Hadamard product that for any vector a and b, (aaH) ⊙(bbH) = (a ⊙b)(a ⊙b)H, we get R ⊙ekekH = d X i=1 ri(bibH i ) ⊙(ekekH) = d X i=1 ri(bi ⊙ek)(bi ⊙ek)H (21) By Lemma 1 (in the appendix), {b1 ⊙ek, b2 ⊙ek, . . . , bd ⊙ek} is a linearly independent set. Therefore, to satisfy the rank constraint rank(R ⊙ekekH) = 1, ri can be non-zero at most a single i. Without loss of generality, let ri 6= 0 and all other r· to be zero, then we have, ri(bibH i ) ⊙ekekH = egegH =) ri diag(bi)ekekH diag(bi)H = egegH (22) Because bi, ek and eg are unit vectors, ri = 1. By recognizing that ⇣ diag(bi)ek ⌘ is the Fourier transform of i −1 positions shifted k, denoted as ki−1, we have, ki−1(ki−1)> = gg>. Therefore, g = ki−1. Moreover, from (20) and (22), (bibH i ) ⊙eV = f W thus, vi−1 = w. that is, v must also be a shifted version of w. If restricting k and g to be unit vectors, then any solution v and g would satisfy w = vi−1 and g = ki−1. Therefore, the two decompositions are identical up to scale and shift. 4.2 Identifiability for Multiple Subunits Model Multiple subunits model (with m > 1 subunits) is far more complicated to analyze due to large degree of hidden invariances. In this study, we only provide the analysis under a specific condition when all subunits share a common pooling weight w. Assumption 2. All models share a common w. We make a few additional assumptions. We would like to consider a tight parameterization where no combination of subunits can take over another subunit’s task. Assumption 3. K := [k1, k2, k3, . . . , km] spans an m-dimensional subspace where ki is the subunit filter for i-th subunit and K 2 Rdk⇥m. In addition, K has orthogonal columns. We denote K with p positions shifted along the column as Kp := [kp 1, kp 2, kp 3, . . . , kp m]. Also, note that trivially, m dk < dk + dw −1 < d since dw > 1. To allow arbitrary scale corresponding to each unit vector ki, we introduce coefficient ↵i to the i-th subunit, thus extending (19) to, C = m X i=1 f W ⊙(↵iekiekH i )> = f W ⊙ m X i=1 ↵iekiekH i !> = f W ⊙( eKA eKH)> (23) where A 2 Rm⇥m is a diagonal matrix of ↵i and eK 2 Rd⇥m is the DFT of K. Assumption 4. @⌦2 Rm⇥m such that Ki⌦= PKi, 8i, where P 2 Rdk⇥dk is the permutation matrix from Ki to Kj by shifting rows, namely Kj = PKi, 8i, j, and ⌦is a linear projection coefficient matrix satisfying Kj = Ki⌦. Assumption 5. A has all positive or all negative values on the diagonal. Given these assumptions, we establish the proposition for multiple subunits model. Proposition. Under Assumptions (1-5), the convolutional decomposition C = f W ⊙( eKA eKH)> is uniquely identifiable up to shift and scale. The proof for the proposition and illustrations of Assumption 4-5 are in the supplement. 5 smoothMELE true parameters MELE subunit nonlinearity quadratic sigmoid soft-rectifier exponential output nonlinearity a) b) c) 10 3 10 4 10 5 sample size MSE 10 3 10 4 10 5 0 3.5 7 sample size run time (sec) 0 10 20 30 0 -0.4 0.4 0 10 20 30 0 0.2 0.4 smoothLS smoothMLE smoothMELE smoothLS smoothMLE smoothMELE 0.03 0.45 0.88 0.05 0.39 0.74 0.07 0.38 0.7 0.17 0.39 0.6 0.14 0.64 1.13 0.37 0.56 0.76 0.09 0.4 0.7 0.14 0.43 0.71 Figure 2: a) True parameters and MELE and smoothMELE estimations. b) Speed performance for smoothLS, smoothMELE and smoothMLE. The slightly decreasing running time along with a larger size is resulted from a more and more fully supported subspace, which makes optimization require fewer iterations. c) Accuracy performance for all combinations of subunit and output nonlinearities for smoothLS, smoothMELE and smoothMLE. Top left is the subunit model matching the data; others are model mismatch. 5 Experiments 5.1 Initialization All three estimators are non-convex and contain many local optima, thus the selection of model initialization would affect the optimization substantially. Similar to [12] using ‘convolutional STC’ for initialization, we also use a simple moment based method with some assumptions. For simplicity, we assume all subunit models sharing the same w with different scaling factors as in eq. (23). Our initializer is generated from a shallow bilinear regression. Firstly, initialize w with a wide Gaussian profile, then estimate eKA eKH from element-wise division of Cmele by f W. Secondly, use SVD to decompose eKA eKH into an orthogonal base set eK and a positive diagonal matrix A, where eK and A contain information about ki’s and ↵’s respectively, hypothesizing that k’s are orthogonal to each other and ↵’s are all positive (Assumptions 3 and 5). Based on the ki’s and ↵i’s we estimated from the rough Gaussian profile of w, now we fix those and re-estimate w with the same elementwise division for f W. This bilinear iterative procedure proceeds only a few times in order to avoid overfitting to Cmele which is a coarse estimate of C. 5.2 Smoothing prior Neural receptive fields are generally smooth, thus a prior smoothing out high frequency fluctuations would improve the performance of estimators, unless the data likelihood provides sufficient evidence for jaggedness. We apply automatic smoothness determination (ASD [24]) to both w and k, each with an associated balancing hyper parameter λw and λk. Assuming w ⇠N(0, Cw) with Cw = exp ✓ −⇢w −k∆χk2 2σ2w ◆ (24) where ∆χ is the vector of differences between neighboring locations in w. ⇢w and σ2 w are variance and length scale of Cw that belong to the hyper parameter set. k also has the same ASD prior with hyper parameters ⇢k and σ2 k. For multiple subunits, each wi and ki would have its own ASD prior. 6 4 5 −3 −2 −1 0 10 4 10 5 −0.18 −0.12 −0.06 0 50 100 150 200 250 performance speed low−rank, smooth, expected GQM low−rank, smooth GQM smoothLS(#1) smoothLS(#2) smoothMELE(#1) smoothMELE(#2) smoothMLE(#1) smoothMLE(#2) 10 10 4 10 5 10 training size training size running time (sec) goodness-of-fit (nats/spk) Figure 3: Goodness-of-model fits from various estimators and their running speeds (without GQM comparisons). Black curves are regularized GQM (with and without expected log-likelihood trick); blue is smooth LS; green is smooth MELE; red is smooth MLE. All the subunit estimators have results for 1 subunit and 2 subunits. The inset figure in performance is the enlarged view for large goodness-of-fit values. The right figure is the speed result showing that MLE-based methods require exponentially increasing running time when increasing the training size, but our moment-based ones have quite consistent speed. Fig. 2a shows the true w and k and the estimations from MELE and smoothMELE (MELE with smoothing prior). From now on, we use smoothing prior by default. 5.3 Simulations To illustrate the performance of our moment-based estimators, we generated Gaussian stimuli from an LNP neuron with exponentiated-quadratic nonlinearity and 1 subunit model with 8-element filter k and 33-element pooling weights w. Mean firing rate is 0.91 spk/s. In our estimation, each time bin stimulus with 40 dimensions is treated as one sample to generate spike response. Fig. 2 b and c show the speed and accuracy performance of three estimators LS, MELE and MLE (with smoothing prior). LS and MELE are comparable with baseline MLE in terms of accuracy but are exponentially faster. Although LNP with exponential nonlinearity has been widely adapted in neuroscience for its simplicity, the actual nonlinearity of neural systems is often sub-exponential, such as soft-rectifier nonlinearity. But exponential is favored as a convenient approximation of soft-rectifier within a small regime around the origin. Also generally, LNP neuron leans towards sigmoid subunit nonlinearity rather than quadratic. Quadratic could well approximate a sigmoid within a small nonlinear regime before the linear regime of the sigmoid. Therefore, in order to check the generalization performance of LS and MELE on mismatch models, we stimulated data from a neuron with sigmoid subunit nonlinearity or soft-rectifier output nonlinearity as shown in Fig. 2c. All the full MLEs formulated with no model mismatch provide a baseline for inspecting the performance of the ELL methods. Despite the model-mismatch, our estimators (LS and MELE) are on par with MLE when the subunit nonlinearity is quadratic, but the performance is notably worse for the sigmoid nonlinearity. Even so, in real applications, we will explore fits with different subunit nonlinearities using full MLE, where the exponential and quadratic assumption is thus primarily useful for a reasonable and extremely fast initializer. Moreover, the running time for moment-based estimators is always exponentially faster. 5.4 Application to neural data In order to show the predictive performance more comprehensively in real neural dataset, we applied LS, MELE and MLE estimators to data from a population of 57 V1 simple and complex cells (data published in [11]). The stimulus consisted of oriented binary white noise (“flickering bar”) aligned with the cell’s preferred orientation. The size of receptive field was chosen to be # of bars d ⇥10 time bins, yielding a 10d-dimensional stimulus space. The time bin size is 10 ms and the number of bars (d) is 16 in our experiment. We compared moment-based estimators and MLE with smoothed low-rank expected GQM and smoothed low-rank GQM [7, 8]. Models are trained on stimuli with size varying from 6.25 ⇥103 to 105 and tested on 5 ⇥104 samples. Each subunit filter has a length of 5. All hyper parameters are chosen by cross validation. Fig. 3 shows that GQM is weakly better than LS but its running time is far more than LS (data not shown). Both MELE and MLE (but not LS) outfight GQM and 7 subunit model V1 responses STA excitatory STC filters suppressive STC filters subunit #1 subunit #1 subunit #2 subunit #2 a) b) -0.2 -0.1 0 0 20 10 0 20 10 0 0.2 0.1 Figure 4: Estimating visual receptive fields from a complex cell (544l029.p21). a) k and w by fitting smoothMELE(#2). Subunit #1 is suppressive (negative w) and #2 is excitatory (positive w). Form the y-axis we can tell from w that both imply that middle subunits contribute more than the ends. b) Qualitative analysis. Each image corresponds to a normalized 24 dimensions spatial pixels (horizontal) by 10 time bins (vertical) filter. Top row: STA/STC from true data; Bottom row: simulated response from 2-subunit MELE model given true stimuli and applied the same subspace analysis. expected GQM with both 1 subunit and 2 subunits. Especially the improvement is the greatest with 1 subunit, which results from the average over all simple and complex cells. Generally, the more “complex” the cell is, the higher probability that multiple subunits would fit better. Outstandingly, MELE outperforms others with best goodness-of-fit and flat speed curve. The goodness-of-fit is defined to be the log-likelihood on the test set divided by spike count. For qualitative analysis, we ran smoothMELE(#2) for a complex cell and learned the optimal subunit filters and pooling weights (Fig. 4a), and then simulated V1 response by fitting 2-subunit MELE generative model given the optimal parameters. STA/STC analysis is applied to both neural data and simulated V1 response data. The quality of the filters trained on 105 stimuli are qualitatively close to that obtained by STA/STC (Fig. 4b). Subunit models can recover STA, the first six excitatory STC filters and the last four suppressive ones but with a considerably parsimonious parameter space. 6 Conclusion We proposed an asymptotically efficient estimator for quadratic convolutional subunit models, which forges an important theoretical link between spike-triggered covariance analysis and nonlinear subunit models. We have shown that the proposed method works well even when the assumptions about model specification (nonlinearity and input distribution) were violated. Our approach reduces the difficulty of fitting subunit models because computational cost does not depend on dataset size (beyond the cost of a single pass through the data to compute the spike-triggered moments). We also proved conditions for identifiability of the convolutional decomposition, which reveals that for most cases the parameters are indeed identifiable. We applied our estimators to the neural data from macaque primary visual cortex, and showed that they outperform a highly regularized form of the GQM and achieve similar performance to the subunit model MLE at substantially lower computational cost. References [1] R. R. de Ruyter van Steveninck and W. Bialek. Real-time performance of a movement-senstivive neuron in the blowfly visual system: coding and information transmission in short spike sequences. Proc. R. Soc. Lond. B, 234:379–414, 1988. 8 [2] J. Touryan, B. Lau, and Y. Dan. Isolation of relevant visual features from random stimuli for cortical complex cells. Journal of Neuroscience, 22:10811–10818, 2002. [3] B. Aguera y Arcas and A. L. Fairhall. What causes a neuron to spike? Neural Computation, 15(8):1789– 1807, 2003. [4] Tatyana Sharpee, Nicole C. Rust, and William Bialek. Analyzing neural responses to natural signals: maximally informative dimensions. Neural Comput, 16(2):223–250, Feb 2004. [5] O. Schwartz, J. W. Pillow, N. C. Rust, and E. P. Simoncelli. Spike-triggered neural characterization. Journal of Vision, 6(4):484–507, 7 2006. [6] J. W. Pillow and E. P. Simoncelli. Dimensionality reduction in neural models: An information-theoretic generalization of spike-triggered average and covariance analysis. Journal of Vision, 6(4):414–428, 4 2006. [7] Il Memming Park and Jonathan W. Pillow. Bayesian spike-triggered covariance analysis. In J. ShaweTaylor, R.S. Zemel, P. Bartlett, F.C.N. Pereira, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 1692–1700, 2011. [8] Il M. Park, Evan W. Archer, Nicholas Priebe, and Jonathan W. Pillow. Spectral methods for neural characterization using generalized quadratic models. In Advances in Neural Information Processing Systems 26, pages 2454–2462, 2013. [9] Ross S. Williamson, Maneesh Sahani, and Jonathan W. Pillow. The equivalence of information-theoretic and likelihood-based methods for neural dimensionality reduction. PLoS Comput Biol, 11(4):e1004141, 04 2015. [10] Kanaka Rajan, Olivier Marre, and Gaˇsper Tkaˇcik. Learning quadratic receptive fields from neural responses to natural stimuli. Neural Computation, 25(7):1661–1692, 2013/06/19 2013. [11] Nicole C. Rust, Odelia Schwartz, J. Anthony Movshon, and Eero P. Simoncelli. Spatiotemporal elements of macaque v1 receptive fields. Neuron, 46(6):945–956, Jun 2005. [12] B Vintch, A Zaharia, J A Movshon, and E P Simoncelli. Efficient and direct estimation of a neural subunit model for sensory coding. In Adv. Neural Information Processing Systems (NIPS*12), volume 25, Cambridge, MA, 2012. MIT Press. To be presented at Neural Information Processing Systems 25, Dec 2012. [13] Brett Vintch, Andrew Zaharia, J Movshon, and Eero P Simoncelli. A convolutional subunit model for neuronal responses in macaque v1. J. Neursoci, page in press, 2015. [14] HB Barlow and W Ro Levick. The mechanism of directionally selective units in rabbit’s retina. The Journal of physiology, 178(3):477, 1965. [15] S. Hochstein and R. Shapley. Linear and nonlinear spatial subunits in y cat retinal ganglion cells. J. Physiol., 262:265–284, 1976. [16] Jonathan B Demb, Kareem Zaghloul, Loren Haarsma, and Peter Sterling. Bipolar cells contribute to nonlinear spatial summation in the brisk-transient (y) ganglion cell in mammalian retina. The Journal of neuroscience, 21(19):7447–7454, 2001. [17] Joanna D Crook, Beth B Peterson, Orin S Packer, Farrel R Robinson, John B Troy, and Dennis M Dacey. Y-cell receptive field and collicular projection of parasol ganglion cells in macaque monkey retina. The Journal of neuroscience, 28(44):11277–11291, 2008. [18] PX Joris, CE Schreiner, and A Rees. Neural processing of amplitude-modulated sounds. Physiological reviews, 84(2):541–577, 2004. [19] Kunihiko Fukushima. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biological cybernetics, 36(4):193–202, 1980. [20] T. Serre, L. Wolf, S. Bileschi, M. Riesenhuber, and T. Poggio. Robust object recognition with cortex-like mechanisms. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 29(3):411–426, 2007. [21] Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [22] AlexandroD. Ramirez and Liam Paninski. Fast inference in generalized linear models via expected loglikelihoods. Journal of Computational Neuroscience, pages 1–20, 2013. [23] Philip J Davis. Circulant matrices. American Mathematical Soc., 1979. [24] M. Sahani and J. Linden. Evidence optimization techniques for estimating stimulus-response functions. NIPS, 15, 2003. 9 | 2015 | 319 |
5,835 | Efficient and Robust Automated Machine Learning Matthias Feurer Aaron Klein Katharina Eggensperger Jost Tobias Springenberg Manuel Blum Frank Hutter Department of Computer Science University of Freiburg, Germany {feurerm,kleinaa,eggenspk,springj,mblum,fh}@cs.uni-freiburg.de Abstract The success of machine learning in a broad range of applications has led to an ever-growing demand for machine learning systems that can be used off the shelf by non-experts. To be effective in practice, such systems need to automatically choose a good algorithm and feature preprocessing steps for a new dataset at hand, and also set their respective hyperparameters. Recent work has started to tackle this automated machine learning (AutoML) problem with the help of efficient Bayesian optimization methods. Building on this, we introduce a robust new AutoML system based on scikit-learn (using 15 classifiers, 14 feature preprocessing methods, and 4 data preprocessing methods, giving rise to a structured hypothesis space with 110 hyperparameters). This system, which we dub AUTO-SKLEARN, improves on existing AutoML methods by automatically taking into account past performance on similar datasets, and by constructing ensembles from the models evaluated during the optimization. Our system won the first phase of the ongoing ChaLearn AutoML challenge, and our comprehensive analysis on over 100 diverse datasets shows that it substantially outperforms the previous state of the art in AutoML. We also demonstrate the performance gains due to each of our contributions and derive insights into the effectiveness of the individual components of AUTO-SKLEARN. 1 Introduction Machine learning has recently made great strides in many application areas, fueling a growing demand for machine learning systems that can be used effectively by novices in machine learning. Correspondingly, a growing number of commercial enterprises aim to satisfy this demand (e.g., BigML.com, Wise.io, SkyTree.com, RapidMiner.com, Dato.com, Prediction.io, DataRobot.com, Microsoft’s Azure Machine Learning, Google’s Prediction API, and Amazon Machine Learning). At its core, every effective machine learning service needs to solve the fundamental problems of deciding which machine learning algorithm to use on a given dataset, whether and how to preprocess its features, and how to set all hyperparameters. This is the problem we address in this work. More specifically, we investigate automated machine learning (AutoML), the problem of automatically (without human input) producing test set predictions for a new dataset within a fixed computational budget. Formally, this AutoML problem can be stated as follows: Definition 1 (AutoML problem). For i = 1, . . . , n+m, let xi ∈Rd denote a feature vector and yi ∈ Y the corresponding target value. Given a training dataset Dtrain = {(x1, y1), . . . , (xn, yn)} and the feature vectors xn+1, . . . , xn+m of a test dataset Dtest = {(xn+1, yn+1), . . . , (xn+m, yn+m)} drawn from the same underlying data distribution, as well as a resource budget b and a loss metric L(·, ·), the AutoML problem is to (automatically) produce test set predictions ˆyn+1, . . . , ˆyn+m. The loss of a solution ˆyn+1, . . . , ˆyn+m to the AutoML problem is given by 1 m Pm j=1 L(ˆyn+j, yn+j). 1 In practice, the budget b would comprise computational resources, such as CPU and/or wallclock time and memory usage. This problem definition reflects the setting of the ongoing ChaLearn AutoML challenge [1]. The AutoML system we describe here won the first phase of that challenge. Here, we follow and extend the AutoML approach first introduced by AUTO-WEKA [2] (see http://automl.org). At its core, this approach combines a highly parametric machine learning framework F with a Bayesian optimization [3] method for instantiating F well for a given dataset. The contribution of this paper is to extend this AutoML approach in various ways that considerably improve its efficiency and robustness, based on principles that apply to a wide range of machine learning frameworks (such as those used by the machine learning service providers mentioned above). First, following successful previous work for low dimensional optimization problems [4, 5, 6], we reason across datasets to identify instantiations of machine learning frameworks that perform well on a new dataset and warmstart Bayesian optimization with them (Section 3.1). Second, we automatically construct ensembles of the models considered by Bayesian optimization (Section 3.2). Third, we carefully design a highly parameterized machine learning framework from high-performing classifiers and preprocessors implemented in the popular machine learning framework scikit-learn [7] (Section 4). Finally, we perform an extensive empirical analysis using a diverse collection of datasets to demonstrate that the resulting AUTO-SKLEARN system outperforms previous state-of-the-art AutoML methods (Section 5), to show that each of our contributions leads to substantial performance improvements (Section 6), and to gain insights into the performance of the individual classifiers and preprocessors used in AUTO-SKLEARN (Section 7). 2 AutoML as a CASH problem We first review the formalization of AutoML as a Combined Algorithm Selection and Hyperparameter optimization (CASH) problem used by AUTO-WEKA’s AutoML approach. Two important problems in AutoML are that (1) no single machine learning method performs best on all datasets and (2) some machine learning methods (e.g., non-linear SVMs) crucially rely on hyperparameter optimization. The latter problem has been successfully attacked using Bayesian optimization [3], which nowadays forms a core component of an AutoML system. The former problem is intertwined with the latter since the rankings of algorithms depend on whether their hyperparameters are tuned properly. Fortunately, the two problems can efficiently be tackled as a single, structured, joint optimization problem: Definition 2 (CASH). Let A = {A(1), . . . , A(R)} be a set of algorithms, and let the hyperparameters of each algorithm A(j) have domain Λ(j). Further, let Dtrain = {(x1, y1), . . . , (xn, yn)} be a training set which is split into K cross-validation folds {D(1) valid, . . . , D(K) valid} and {D(1) train, . . . , D(K) train} such that D(i) train = Dtrain\D(i) valid for i = 1, . . . , K. Finally, let L(A(j) λ , D(i) train, D(i) valid) denote the loss that algorithm A(j) achieves on D(i) valid when trained on D(i) train with hyperparameters λ. Then, the Combined Algorithm Selection and Hyperparameter optimization (CASH) problem is to find the joint algorithm and hyperparameter setting that minimizes this loss: A⋆, λ⋆∈ argmin A(j)∈A,λ∈Λ(j) 1 K K X i=1 L(A(j) λ , D(i) train, D(i) valid). (1) This CASH problem was first tackled by Thornton et al. [2] in the AUTO-WEKA system using the machine learning framework WEKA [8] and tree-based Bayesian optimization methods [9, 10]. In a nutshell, Bayesian optimization [3] fits a probabilistic model to capture the relationship between hyperparameter settings and their measured performance; it then uses this model to select the most promising hyperparameter setting (trading off exploration of new parts of the space vs. exploitation in known good regions), evaluates that hyperparameter setting, updates the model with the result, and iterates. While Bayesian optimization based on Gaussian process models (e.g., Snoek et al. [11]) performs best in low-dimensional problems with numerical hyperparameters, tree-based models have been shown to be more successful in high-dimensional, structured, and partly discrete problems [12] – such as the CASH problem – and are also used in the AutoML system HYPEROPT-SKLEARN [13]. Among the tree-based Bayesian optimization methods, Thornton et al. [2] found the random-forestbased SMAC [9] to outperform the tree Parzen estimator TPE [10], and we therefore use SMAC to solve the CASH problem in this paper. Next to its use of random forests [14], SMAC’s main distinguishing feature is that it allows fast cross-validation by evaluating one fold at a time and discarding poorly-performing hyperparameter settings early. 2 AutoML system ML framework {Xtrain, Ytrain, Xtest, b, L} metalearning data preprocessor feature preprocessor classifier build ensemble ˆYtest Bayesian optimizer Figure 1: Our improved AutoML approach. We add two components to Bayesian hyperparameter optimization of an ML framework: meta-learning for initializing the Bayesian optimizer and automated ensemble construction from configurations evaluated during optimization. 3 New methods for increasing efficiency and robustness of AutoML We now discuss our two improvements of the AutoML approach. First, we include a meta-learning step to warmstart the Bayesian optimization procedure, which results in a considerable boost in efficiency. Second, we include an automated ensemble construction step, allowing us to use all classifiers that were found by Bayesian optimization. Figure 1 summarizes the overall AutoML workflow, including both of our improvements. We note that we expect their effectiveness to be greater for flexible ML frameworks that offer many degrees of freedom (e.g., many algorithms, hyperparameters, and preprocessing methods). 3.1 Meta-learning for finding good instantiations of machine learning frameworks Domain experts derive knowledge from previous tasks: They learn about the performance of machine learning algorithms. The area of meta-learning [15] mimics this strategy by reasoning about the performance of learning algorithms across datasets. In this work, we apply meta-learning to select instantiations of our given machine learning framework that are likely to perform well on a new dataset. More specifically, for a large number of datasets, we collect both performance data and a set of meta-features, i.e., characteristics of the dataset that can be computed efficiently and that help to determine which algorithm to use on a new dataset. This meta-learning approach is complementary to Bayesian optimization for optimizing an ML framework. Meta-learning can quickly suggest some instantiations of the ML framework that are likely to perform quite well, but it is unable to provide fine-grained information on performance. In contrast, Bayesian optimization is slow to start for hyperparameter spaces as large as those of entire ML frameworks, but can fine-tune performance over time. We exploit this complementarity by selecting k configurations based on meta-learning and use their result to seed Bayesian optimization. This approach of warmstarting optimization by meta-learning has already been successfully applied before [4, 5, 6], but never to an optimization problem as complex as that of searching the space of instantiations of a full-fledged ML framework. Likewise, learning across datasets has also been applied in collaborative Bayesian optimization methods [16, 17]; while these approaches are promising, they are so far limited to very few meta-features and cannot yet cope with the highdimensional partially discrete configuration spaces faced in AutoML. More precisely, our meta-learning approach works as follows. In an offline phase, for each machine learning dataset in a dataset repository (in our case 140 datasets from the OpenML [18] repository), we evaluated a set of meta-features (described below) and used Bayesian optimization to determine and store an instantiation of the given ML framework with strong empirical performance for that dataset. (In detail, we ran SMAC [9] for 24 hours with 10-fold cross-validation on two thirds of the data and stored the resulting ML framework instantiation which exhibited best performance on the remaining third). Then, given a new dataset D, we compute its meta-features, rank all datasets by their L1 distance to D in meta-feature space and select the stored ML framework instantiations for the k = 25 nearest datasets for evaluation before starting Bayesian optimization with their results. To characterize datasets, we implemented a total of 38 meta-features from the literature, including simple, information-theoretic and statistical meta-features [19, 20], such as statistics about the number of data points, features, and classes, as well as data skewness, and the entropy of the targets. All meta-features are listed in Table 1 of the supplementary material. Notably, we had to exclude the prominent and effective category of landmarking meta-features [21] (which measure the performance of simple base learners), because they were computationally too expensive to be helpful in the online evaluation phase. We note that this meta-learning approach draws its power from the availability of 3 a repository of datasets; due to recent initiatives, such as OpenML [18], we expect the number of available datasets to grow ever larger over time, increasing the importance of meta-learning. 3.2 Automated ensemble construction of models evaluated during optimization While Bayesian hyperparameter optimization is data-efficient in finding the best-performing hyperparameter setting, we note that it is a very wasteful procedure when the goal is simply to make good predictions: all the models it trains during the course of the search are lost, usually including some that perform almost as well as the best. Rather than discarding these models, we propose to store them and to use an efficient post-processing method (which can be run in a second process on-the-fly) to construct an ensemble out of them. This automatic ensemble construction avoids to commit itself to a single hyperparameter setting and is thus more robust (and less prone to overfitting) than using the point estimate that standard hyperparameter optimization yields. To our best knowledge, we are the first to make this simple observation, which can be applied to improve any Bayesian hyperparameter optimization method. It is well known that ensembles often outperform individual models [22, 23], and that effective ensembles can be created from a library of models [24, 25]. Ensembles perform particularly well if the models they are based on (1) are individually strong and (2) make uncorrelated errors [14]. Since this is much more likely when the individual models are different in nature, ensemble building is particularly well suited for combining strong instantiations of a flexible ML framework. However, simply building a uniformly weighted ensemble of the models found by Bayesian optimization does not work well. Rather, we found it crucial to adjust these weights using the predictions of all individual models on a hold-out set. We experimented with different approaches to optimize these weights: stacking [26], gradient-free numerical optimization, and the method ensemble selection [24]. While we found both numerical optimization and stacking to overfit to the validation set and to be computationally costly, ensemble selection was fast and robust. In a nutshell, ensemble selection (introduced by Caruana et al. [24]) is a greedy procedure that starts from an empty ensemble and then iteratively adds the model that maximizes ensemble validation performance (with uniform weight, but allowing for repetitions). Procedure 1 in the supplementary material describes it in detail. We used this technique in all our experiments – building an ensemble of size 50. 4 A practical automated machine learning system data preprocessor estimator feature preprocessor classifier AdaBoost · · · RF kNN # estimators learning rate max. depth preprocessing · · · None PCA fast ICA rescaling · · · min/max standard one hot enc. · · · imputation mean · · · median balancing weighting None Figure 2: Structured configuration space. Squared boxes denote parent hyperparameters whereas boxes with rounded edges are leaf hyperparameters. Grey colored boxes mark active hyperparameters which form an example configuration and machine learning pipeline. Each pipeline comprises one feature preprocessor, classifier and up to three data preprocessor methods plus respective hyperparameters. To design a robust AutoML system, as our underlying ML framework we chose scikit-learn [7], one of the best known and most widely used machine learning libraries. It offers a wide range of well established and efficiently-implemented ML algorithms and is easy to use for both experts and beginners. Since our AutoML system closely resembles AUTO-WEKA, but – like HYPEROPT-SKLEARN – is based on scikit-learn, we dub it AUTO-SKLEARN. Figure 2 depicts AUTO-SKLEARN’s overall components. It comprises 15 classification algorithms, 14 preprocessing methods, and 4 data preprocessing methods. We parameterized each of them, which resulted in a space of 110 hyperparameters. Most of these are conditional hyperparameters that are only active if their respective component is selected. We note that SMAC [9] can handle this conditionality natively. All 15 classification algorithms in AUTO-SKLEARN are listed in Table 1a (and described in detail in Section A.1 of the supplementary material). They fall into different categories, such as general linear models (2 algorithms), support vector machines (2), discriminant analysis (2), nearest neighbors (1), na¨ıve Bayes (3), decision trees (1) and ensembles (4). In contrast to AUTO-WEKA [2], we 4 name #λ cat (cond) cont (cond) AdaBoost (AB) 4 1 (-) 3 (-) Bernoulli na¨ıve Bayes 2 1 (-) 1 (-) decision tree (DT) 4 1 (-) 3 (-) extreml. rand. trees 5 2 (-) 3 (-) Gaussian na¨ıve Bayes gradient boosting (GB) 6 6 (-) kNN 3 2 (-) 1 (-) LDA 4 1 (-) 3 (1) linear SVM 4 2 (-) 2 (-) kernel SVM 7 2 (-) 5 (2) multinomial na¨ıve Bayes 2 1 (-) 1 (-) passive aggressive 3 1 (-) 2 (-) QDA 2 2 (-) random forest (RF) 5 2 (-) 3 (-) Linear Class. (SGD) 10 4 (-) 6 (3) (a) classification algorithms name #λ cat (cond) cont (cond) extreml. rand. trees prepr. 5 2 (-) 3 (-) fast ICA 4 3 (-) 1 (1) feature agglomeration 4 3 () 1 (-) kernel PCA 5 1 (-) 4 (3) rand. kitchen sinks 2 2 (-) linear SVM prepr. 3 1 (-) 2 (-) no preprocessing nystroem sampler 5 1 (-) 4 (3) PCA 2 1 (-) 1 (-) polynomial 3 2 (-) 1 (-) random trees embed. 4 4 (-) select percentile 2 1 (-) 1 (-) select rates 3 2 (-) 1 (-) one-hot encoding 2 1 (-) 1 (1) imputation 1 1 (-) balancing 1 1 (-) rescaling 1 1 (-) (b) preprocessing methods Table 1: Number of hyperparameters for each possible classifier (left) and feature preprocessing method (right) for a binary classification dataset in dense representation. Tables for sparse binary classification and sparse/dense multiclass classification datasets can be found in the Section E of the supplementary material, Tables 2a, 3a, 4a, 2b, 3b and 4b. We distinguish between categorical (cat) hyperparameters with discrete values and continuous (cont) numerical hyperparameters. Numbers in brackets are conditional hyperparameters, which are only relevant when another parameter has a certain value. focused our configuration space on base classifiers and excluded meta-models and ensembles that are themselves parameterized by one or more base classifiers. While such ensembles increased AUTO-WEKA’s number of hyperparameters by almost a factor of five (to 786), AUTO-SKLEARN “only” features 110 hyperparameters. We instead construct complex ensembles using our post-hoc method from Section 3.2. Compared to AUTO-WEKA, this is much more data-efficient: in AUTOWEKA, evaluating the performance of an ensemble with 5 components requires the construction and evaluation of 5 models; in contrast, in AUTO-SKLEARN, ensembles come largely for free, and it is possible to mix and match models evaluated at arbitrary times during the optimization. The preprocessing methods for datasets in dense representation in AUTO-SKLEARN are listed in Table 1b (and described in detail in Section A.2 of the supplementary material). They comprise data preprocessors (which change the feature values and are always used when they apply) and feature preprocessors (which change the actual set of features, and only one of which [or none] is used). Data preprocessing includes rescaling of the inputs, imputation of missing values, one-hot encoding and balancing of the target classes. The 14 possible feature preprocessing methods can be categorized into feature selection (2), kernel approximation (2), matrix decomposition (3), embeddings (1), feature clustering (1), polynomial feature expansion (1) and methods that use a classifier for feature selection (2). For example, L1-regularized linear SVMs fitted to the data can be used for feature selection by eliminating features corresponding to zero-valued model coefficients. As with every robust real-world system, we had to handle many more important details in AUTOSKLEARN; we describe these in Section B of the supplementary material. 5 Comparing AUTO-SKLEARN to AUTO-WEKA and HYPEROPT-SKLEARN As a baseline experiment, we compared the performance of vanilla AUTO-SKLEARN (without our improvements) to AUTO-WEKA and HYPEROPT-SKLEARN, reproducing the experimental setup with 21 datasets of the paper introducing AUTO-WEKA [2]. We describe this setup in detail in Section G in the supplementary material. Table 2 shows that AUTO-SKLEARN performed statistically significantly better than AUTO-WEKA in 6/21 cases, tied it in 12 cases, and lost against it in 3. For the three datasets where AUTOWEKA performed best, we found that in more than 50% of its runs the best classifier it chose is not implemented in scikit-learn (trees with a pruning component). So far, HYPEROPT-SKLEARN is more of a proof-of-concept – inviting the user to adapt the configuration space to her own needs – than a full AutoML system. The current version crashes when presented with sparse data and missing values. It also crashes on Cifar-10 due to a memory limit which we set for all optimizers to enable a 5 Abalone Amazon Car Cifar-10 Cifar-10 Small Convex Dexter Dorothea German Credit Gisette KDD09 Appetency KR-vs-KP Madelon MNIST Basic MRBI Secom Semeion Shuttle Waveform Wine Quality Yeast AS 73.50 16.00 0.39 51.70 54.81 17.53 5.56 5.51 27.00 1.62 1.74 0.42 12.44 2.84 46.92 7.87 5.24 0.01 14.93 33.76 40.67 AW 73.50 30.00 0.00 56.95 56.20 21.80 8.33 6.38 28.33 2.29 1.74 0.31 18.21 2.84 60.34 8.09 5.24 0.01 14.13 33.36 37.75 HS 76.21 16.22 0.39 57.95 19.18 27.67 2.29 0.42 14.74 2.82 55.79 5.87 0.05 14.07 34.72 38.45 Table 2: Test set classification error of AUTO-WEKA (AW), vanilla AUTO-SKLEARN (AS) and HYPEROPTSKLEARN (HS), as in the original evaluation of AUTO-WEKA [2]. We show median percent error across 100 000 bootstrap samples (based on 10 runs), simulating 4 parallel runs. Bold numbers indicate the best result. Underlined results are not statistically significantly different from the best according to a bootstrap test with p = 0.05. 500 1000 1500 2000 2500 3000 3500 time [sec] 1.8 2.0 2.2 2.4 2.6 2.8 3.0 average rank vanilla auto-sklearn auto-sklearn + ensemble auto-sklearn + meta-learning auto-sklearn + meta-learning + ensemble Figure 3: Average rank of all four AUTO-SKLEARN variants (ranked by balanced test error rate (BER)) across 140 datasets. Note that ranks are a relative measure of performance (here, the rank of all methods has to add up to 10), and hence an improvement in BER of one method can worsen the rank of another. The supplementary material shows the same plot on a log-scale to show the time overhead of meta-feature and ensemble computation. fair comparison. On the 16 datasets on which it ran, it statistically tied the best optimizer in 9 cases and lost against it in 7. 6 Evaluation of the proposed AutoML improvements In order to evaluate the robustness and general applicability of our proposed AutoML system on a broad range of datasets, we gathered 140 binary and multiclass classification datasets from the OpenML repository [18], only selecting datasets with at least 1000 data points to allow robust performance evaluations. These datasets cover a diverse range of applications, such as text classification, digit and letter recognition, gene sequence and RNA classification, advertisement, particle classification for telescope data, and cancer detection in tissue samples. We list all datasets in Table 7 and 8 in the supplementary material and provide their unique OpenML identifiers for reproducibility. Since the class distribution in many of these datasets is quite imbalanced we evaluated all AutoML methods using a measure called balanced classification error rate (BER). We define balanced error rate as the average of the proportion of wrong classifications in each class. In comparison to standard classification error (the average overall error), this measure (the average of the class-wise error) assigns equal weight to all classes. We note that balanced error or accuracy measures are often used in machine learning competitions (e.g., the AutoML challenge [1] uses balanced accuracy). We performed 10 runs of AUTO-SKLEARN both with and without meta-learning and with and without ensemble prediction on each of the datasets. To study their performance under rigid time constraints, and also due to computational resource constraints, we limited the CPU time for each run to 1 hour; we also limited the runtime for a single model to a tenth of this (6 minutes). To not evaluate performance on data sets already used for meta-learning, we performed a leave-one-dataset-out validation: when evaluating on dataset D, we only used meta-information from the 139 other datasets. Figure 3 shows the average ranks over time of the four AUTO-SKLEARN versions we tested. We observe that both of our new methods yielded substantial improvements over vanilla AUTO-SKLEARN. The most striking result is that meta-learning yielded drastic improvements starting with the first 6 OpenML dataset ID AUTOSKLEARN AdaBoost Bernoulli na¨ıve Bayes decision tree extreml. rand. trees Gaussian na¨ıve Bayes gradient boosting kNN LDA linear SVM kernel SVM multinomial na¨ıve Bayes passive aggresive QDA random forest Linear Class. (SGD) 38 2.15 2.68 50.22 2.15 18.06 11.22 1.77 50.00 8.55 16.29 17.89 46.99 50.00 8.78 2.34 15.82 46 3.76 4.65 5.62 4.74 7.88 3.49 7.57 8.67 8.31 5.36 7.55 9.23 7.57 4.20 7.31 179 16.99 17.03 19.27 18.31 17.09 21.77 17.00 22.23 18.93 17.30 17.57 18.97 22.29 19.06 17.24 17.01 184 10.32 10.52 17.46 11.10 64.74 10.42 31.10 35.44 15.76 12.52 27.13 20.01 47.18 10.98 12.76 554 1.55 2.42 12.00 2.91 10.52 3.86 2.68 3.34 2.23 1.50 10.37 100.00 2.75 3.08 2.50 772 46.85 49.68 47.90 47.75 45.62 48.83 48.15 48.00 46.74 48.38 48.66 47.21 48.75 47.67 47.71 47.93 917 10.22 9.11 25.83 11.00 10.22 33.94 10.11 11.11 34.22 18.67 6.78 25.50 20.67 30.44 10.83 18.33 1049 12.93 12.53 15.50 19.31 17.18 26.23 13.38 23.80 25.12 17.28 21.44 26.40 29.25 21.38 13.75 19.92 1111 23.70 23.16 28.40 24.40 24.47 29.59 22.93 50.30 24.11 23.99 23.56 27.67 43.79 25.86 28.06 23.36 1120 13.81 13.54 18.81 17.45 13.86 21.50 13.61 17.23 15.48 14.94 14.17 18.33 16.37 15.62 13.70 14.66 1128 4.21 4.89 4.71 9.30 3.89 4.77 4.58 4.59 4.58 4.83 4.59 4.46 5.65 5.59 3.83 4.33 293 2.86 4.07 24.30 5.03 3.59 32.44 24.48 4.86 24.40 14.16 100.00 24.20 21.34 28.68 2.57 15.54 389 19.65 22.98 33.14 19.38 29.18 19.20 30.87 19.68 17.95 22.04 20.04 20.14 39.57 20.66 17.99 Table 3: Median balanced test error rate (BER) of optimizing AUTO-SKLEARN subspaces for each classification method (and all preprocessors), as well as the whole configuration space of AUTO-SKLEARN, on 13 datasets. All optimization runs were allowed to run for 24 hours except for AUTO-SKLEARN which ran for 48 hours. Bold numbers indicate the best result; underlined results are not statistically significantly different from the best according to a bootstrap test using the same setup as for Table 2. OpenML dataset ID AUTOSKLEARN densifier extreml. rand. trees prepr. fast ICA feature agglomeration kernel PCA rand. kitchen sinks linear SVM prepr. no preproc. nystroem sampler PCA polynomial random trees embed. select percentile classification select rates truncatedSVD 38 2.15 4.03 7.27 2.24 5.84 8.57 2.28 2.28 7.70 7.23 2.90 18.50 2.20 2.28 46 3.76 4.98 7.95 4.40 8.74 8.41 4.25 4.52 8.48 8.40 4.21 7.51 4.17 4.68 179 16.99 17.83 17.24 16.92 100.00 17.34 16.84 16.97 17.30 17.64 16.94 17.05 17.09 16.86 184 10.32 55.78 19.96 11.31 36.52 28.05 9.92 11.43 25.53 21.15 10.54 12.68 45.03 10.47 554 1.55 1.56 2.52 1.65 100.00 100.00 2.21 1.60 2.21 1.65 100.00 3.48 1.46 1.70 772 46.85 47.90 48.65 48.62 47.59 47.68 47.72 48.34 48.06 47.30 48.00 47.84 47.56 48.43 917 10.22 8.33 16.06 10.33 20.94 35.44 8.67 9.44 37.83 22.33 9.11 17.67 10.00 10.44 1049 12.93 20.36 19.92 13.14 19.57 20.06 13.28 15.84 18.96 17.22 12.95 18.52 11.94 14.38 1111 23.70 23.36 24.69 23.73 100.00 25.25 23.43 22.27 23.95 23.25 26.94 26.68 23.53 23.33 1120 13.81 16.29 14.22 13.73 14.57 14.82 14.02 13.85 14.66 14.23 13.22 15.03 13.65 13.67 1128 4.21 4.90 4.96 4.76 4.21 5.08 4.52 4.59 4.08 4.59 50.00 9.23 4.33 4.08 293 2.86 24.40 3.41 100.00 19.30 3.01 2.66 20.94 8.05 2.86 2.74 4.05 389 19.65 20.63 21.40 17.50 19.66 19.89 20.87 18.46 44.83 20.17 19.18 21.58 Table 4: Like Table 3, but instead optimizing subspaces for each preprocessing method (and all classifiers). configuration it selected and lasting until the end of the experiment. We note that the improvement was most pronounced in the beginning and that over time, vanilla AUTO-SKLEARN also found good solutions without meta-learning, letting it catch up on some datasets (thus improving its overall rank). Moreover, both of our methods complement each other: our automated ensemble construction improved both vanilla AUTO-SKLEARN and AUTO-SKLEARN with meta-learning. Interestingly, the ensemble’s influence on the performance started earlier for the meta-learning version. We believe that this is because meta-learning produces better machine learning models earlier, which can be directly combined into a strong ensemble; but when run longer, vanilla AUTO-SKLEARN without meta-learning also benefits from automated ensemble construction. 7 Detailed analysis of AUTO-SKLEARN components We now study AUTO-SKLEARN’s individual classifiers and preprocessors, compared to jointly optimizing all methods, in order to obtain insights into their peak performance and robustness. Ideally, we would have liked to study all combinations of a single classifier and a single preprocessor in isolation, but with 15 classifiers and 14 preprocessors this was infeasible; rather, when studying the performance of a single classifier, we still optimized over all preprocessors, and vice versa. To obtain a more detailed analysis, we focused on a subset of datasets but extended the configuration budget for optimizing all methods from one hour to one day and to two days for AUTO-SKLEARN. Specifically, we clustered our 140 datasets with g-means [27] based on the dataset meta-features and used one dataset from each of the resulting 13 clusters (see Table 6 in the supplementary material for the list of datasets). We note that, in total, these extensive experiments required 10.7 CPU years. Table 3 compares the results of the various classification methods against AUTO-SKLEARN. Overall, as expected, random forests, extremely randomized trees, AdaBoost, and gradient boosting, showed 7 101 102 103 104 time [sec] 0 2 4 6 8 10 Balanced Error Rate auto-sklearn gradient boosting kernel SVM random forest (a) MNIST (OpenML dataset ID 554) 101 102 103 104 time [sec] 15 20 25 30 35 40 45 50 Balanced Error Rate auto-sklearn gradient boosting kernel SVM random forest (b) Promise pc4 (OpenML dataset ID 1049) Figure 4: Performance of a subset of classifiers compared to AUTO-SKLEARN over time. We show median test error rate and the fifth and 95th percentile over time for optimizing three classifiers separately with optimizing the joint space. A plot with all classifiers can be found in Figure 4 in the supplementary material. While AUTO-SKLEARN is inferior in the beginning, in the end its performance is close to the best method. the most robust performance, and SVMs showed strong peak performance for some datasets. Besides a variety of strong classifiers, there are also several models which could not compete: The decision tree, passive aggressive, kNN, Gaussian NB, LDA and QDA were statistically significantly inferior to the best classifier on most datasets. Finally, the table indicates that no single method was the best choice for all datasets. As shown in the table and also visualized for two example datasets in Figure 4, optimizing the joint configuration space of AUTO-SKLEARN led to the most robust performance. A plot of ranks over time (Figure 2 and 3 in the supplementary material) quantifies this across all 13 datasets, showing that AUTO-SKLEARN starts with reasonable but not optimal performance and effectively searches its more general configuration space to converge to the best overall performance over time. Table 4 compares the results of the various preprocessors against AUTO-SKLEARN. As for the comparison of classifiers above, AUTO-SKLEARN showed the most robust performance: It performed best on three of the datasets and was not statistically significantly worse than the best preprocessor on another 8 of 13. 8 Discussion and Conclusion We demonstrated that our new AutoML system AUTO-SKLEARN performs favorably against the previous state of the art in AutoML, and that our meta-learning and ensemble improvements for AutoML yield further efficiency and robustness. This finding is backed by the fact that AUTOSKLEARN won the auto-track in the first phase of ChaLearn’s ongoing AutoML challenge. In this paper, we did not evaluate the use of AUTO-SKLEARN for interactive machine learning with an expert in the loop and weeks of CPU power, but we note that that mode has also led to a third place in the human track of the same challenge. As such, we believe that AUTO-SKLEARN is a promising system for use by both machine learning novices and experts. The source code of AUTO-SKLEARN is available under an open source license at https://github.com/automl/auto-sklearn. Our system also has some shortcomings, which we would like to remove in future work. As one example, we have not yet tackled regression or semi-supervised problems. Most importantly, though, the focus on scikit-learn implied a focus on small to medium-sized datasets, and an obvious direction for future work will be to apply our methods to modern deep learning systems that yield state-ofthe-art performance on large datasets; we expect that in that domain especially automated ensemble construction will lead to tangible performance improvements over Bayesian optimization. Acknowledgments This work was supported by the German Research Foundation (DFG), under Priority Programme Autonomous Learning (SPP 1527, grant HU 1900/3-1), under Emmy Noether grant HU 1900/2-1, and under the BrainLinksBrainTools Cluster of Excellence (grant number EXC 1086). 8 References [1] I. Guyon, K. Bennett, G. Cawley, H. Escalante, S. Escalera, T. Ho, N.Maci`a, B. Ray, M. Saeed, A. Statnikov, and E. Viegas. Design of the 2015 ChaLearn AutoML Challenge. In Proc. of IJCNN’15, 2015. [2] C. Thornton, F. Hutter, H. Hoos, and K. Leyton-Brown. Auto-WEKA: combined selection and hyperparameter optimization of classification algorithms. In Proc. of KDD’13, pages 847–855, 2013. [3] E. Brochu, V. Cora, and N. de Freitas. A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. CoRR, abs/1012.2599, 2010. [4] M. Feurer, J. Springenberg, and F. Hutter. Initializing Bayesian hyperparameter optimization via metalearning. In Proc. of AAAI’15, pages 1128–1135, 2015. [5] Reif M, F. Shafait, and A. Dengel. Meta-learning for evolutionary parameter optimization of classifiers. Machine Learning, 87:357–380, 2012. [6] T. Gomes, R. Prudˆencio, C. Soares, A. Rossi, and A. Carvalho. Combining meta-learning and search techniques to select parameters for support vector machines. Neurocomputing, 75(1):3–13, 2012. [7] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. JMLR, 12:2825–2830, 2011. [8] M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, and I. Witten. The WEKA data mining software: An update. SIGKDD, 11(1):10–18, 2009. [9] F. Hutter, H. Hoos, and K. Leyton-Brown. Sequential model-based optimization for general algorithm configuration. In Proc. of LION’11, pages 507–523, 2011. [10] J. Bergstra, R. Bardenet, Y. Bengio, and B. K´egl. Algorithms for hyper-parameter optimization. In Proc. of NIPS’11, pages 2546–2554, 2011. [11] J. Snoek, H. Larochelle, and R. P. Adams. Practical Bayesian optimization of machine learning algorithms. In Proc. of NIPS’12, pages 2960–2968, 2012. [12] K. Eggensperger, M. Feurer, F. Hutter, J. Bergstra, J. Snoek, H. Hoos, and K. Leyton-Brown. Towards an empirical foundation for assessing Bayesian optimization of hyperparameters. In NIPS Workshop on Bayesian Optimization in Theory and Practice, 2013. [13] B. Komer, J. Bergstra, and C. Eliasmith. Hyperopt-sklearn: Automatic hyperparameter configuration for scikit-learn. In ICML workshop on AutoML, 2014. [14] L. Breiman. Random forests. MLJ, 45:5–32, 2001. [15] P. Brazdil, C. Giraud-Carrier, C. Soares, and R. Vilalta. Metalearning: Applications to Data Mining. Springer, 2009. [16] R. Bardenet, M. Brendel, B. K´egl, and M. Sebag. Collaborative hyperparameter tuning. In Proc. of ICML’13 [28], pages 199–207. [17] D. Yogatama and G. Mann. Efficient transfer learning method for automatic hyperparameter tuning. In Proc. of AISTATS’14, pages 1077–1085, 2014. [18] J. Vanschoren, J. van Rijn, B. Bischl, and L. Torgo. OpenML: Networked science in machine learning. SIGKDD Explorations, 15(2):49–60, 2013. [19] D. Michie, D. Spiegelhalter, C. Taylor, and J. Campbell. Machine Learning, Neural and Statistical Classification. Ellis Horwood, 1994. [20] A. Kalousis. Algorithm Selection via Meta-Learning. PhD thesis, University of Geneve, 2002. [21] B. Pfahringer, H. Bensusan, and C. Giraud-Carrier. Meta-learning by landmarking various learning algorithms. In Proc. of (ICML’00), pages 743–750, 2000. [22] I. Guyon, A. Saffari, G. Dror, and G. Cawley. Model selection: Beyond the Bayesian/Frequentist divide. JMLR, 11:61–87, 2010. [23] A. Lacoste, M. Marchand, F. Laviolette, and H. Larochelle. Agnostic Bayesian learning of ensembles. In Proc. of ICML’14, pages 611–619, 2014. [24] R. Caruana, A. Niculescu-Mizil, G. Crew, and A. Ksikes. Ensemble selection from libraries of models. In Proc. of ICML’04, page 18, 2004. [25] R. Caruana, A. Munson, and A. Niculescu-Mizil. Getting the most out of ensemble selection. In Proc. of ICDM’06, pages 828–833, 2006. [26] D. Wolpert. Stacked generalization. Neural Networks, 5:241–259, 1992. [27] G. Hamerly and C. Elkan. Learning the k in k-means. In Proc. of NIPS’04, pages 281–288, 2004. [28] Proc. of ICML’13, 2014. 9 | 2015 | 32 |
5,836 | Recovering Communities in the General Stochastic Block Model Without Knowing the Parameters Emmanuel Abbe Department of Electrical Engineering and PACM Princeton University Princeton, NJ 08540 eabbe@princeton.edu Colin Sandon Department of Mathematics Princeton University Princeton, NJ 08540 sandon@princeton.edu Abstract The stochastic block model (SBM) has recently gathered significant attention due to new threshold phenomena. However, most developments rely on the knowledge of the model parameters, or at least on the number of communities. This paper introduces efficient algorithms that do not require such knowledge and yet achieve the optimal information-theoretic tradeoffs identified in Abbe-Sandon ’15. In the constant degree regime, an algorithm is developed that requires only a lower-bound on the relative sizes of the communities and achieves the optimal accuracy scaling for large degrees. This lower-bound requirement is removed for the regime of diverging degrees. For the logarithmic degree regime, this is further enhanced into a fully agnostic algorithm that simultaneously learns the model parameters, achieves the optimal CH-limit for exact recovery, and runs in quasilinear time. These provide the first algorithms affording efficiency, universality and information-theoretic optimality for strong and weak consistency in the SBM. 1 Introduction This paper studies the problem of recovering communities in the general stochastic block model with linear size communities, for constant and logarithmic degree regimes. In contrast to [1], this paper does not require knowledge of the parameters. It shows how to learn these from the graph toplogy. We next provide some motivations on the problem and further background on the model. Detecting communities (or clusters) in graphs is a fundamental problem in networks, computer science and machine learning. This applies to a large variety of complex networks (e.g., social and biological networks) as well as to data sets engineered as networks via similarly graphs, where one often attempts to get a first impression on the data by trying to identify groups with similar behavior. In particular, finding communities allows one to find like-minded people in social networks, to improve recommendation systems, to segment or classify images, to detect protein complexes, to find genetically related sub-populations, or discover new tumor subclasses. See [1] for references. While a large variety of community detection algorithms have been deployed in the past decades, the understanding of the fundamental limits of community detection has only appeared more recently, in particular for the SBM [1–7]. The SBM is a canonical model for community detection. We use here the notation SBM(n, p, W) to refer to a random graph ensemble on the vertex-set V = [n], where each vertex v ∈V is assigned independently a hidden (or planted) label σv in [k] under a probability distribution p = (p1, . . . , pk) on [k], and each unordered pair of nodes (u, v) ∈V × V is connected independently with probability Wσu,σv, where W is a symmetric k × k matrix with entries in [0, 1]. Note that G ∼SBM(n, p, W) denotes a random graph drawn under this model, without the hidden (or planted) clusters (i.e., the labels σv) revealed. The goal is to recover these labels by observing only the graph. 1 Recently the SBM came back at the center of the attention at both the practical level, due to extensions allowing overlapping communities that have proved to fit well real data sets in massive networks [8], and at the theoretical level due to new phase transition phenomena [2–6]. The latter works focus exclusively on the SBM with two symmetric communities, i.e., each community is of the same size and the connectivity in each community is identical. Denoting by p the intra- and q the extra-cluster probabilities, most of the results are concerned with two figure of merits: (i) recovery (also called exact recovery or strong consistency), which investigates the regimes of p and q for which there exists an algorithm that recovers with high probability the two communities completely [7,9–19], (ii) detection, which investigates the regimes for which there exists an algorithm that recovers with high probability a positively correlated partition [2–4]. The sharp threshold for exact recovery was obtained in [5, 6], showing1 that for p = a log(n)/n, q = b log(n)/n, a, b > 0, exact recovery is solvable if and only if |√a − √ b| ≥ √ 2, with efficient algorithms achieving the threshold. In addition, [5] introduces an SDP, proved to achieve the threshold in [20, 21], while [22] shows that a spectral algorithm also achieves the threshold. The sharp threshold for detection was obtained in [3,4], showing that detection is solvable (and so efficiently) if and only if (a −b)2 > 2(a + b), when p = a/n, q = b/n, settling a conjecture from [2]. Besides the detection and the recovery properties, one may ask about the partial recovery of the communities, studied in [1, 19, 23–25]. Of particular interest to this paper is the case of strong recovery (also called weak consistency), where only a vanishing fraction of the nodes is allowed to be misclassified. For two-symmetric communities, [6] shows that strong recovery is possible if and only if n(p −q)2/(p + q) diverges, extended in [1] for general SBMs. In the next section, we discuss the results for the general SBM of interest in this paper and the problem of learning the model parameters. We conclude this section by providing motivations on the problem of achieving the threshold with an efficient and universal algorithm. Threshold phenomena have long been studied in fields such as information theory (e.g., Shannon’s capacity) and constrained satisfaction problems (e.g., the SAT threshold). In particular, the quest of achieving the threshold has generated major algorithmic developments in these fields (e.g., LDPC codes, polar codes, survey propagation to name a few). Likewise, identifying thresholds in community detection models is key to benchmark and guide the development of clustering algorithms. However, it is particularly crucial to develop benchmarks that do not depend sensitively on the knowledge of the model parameters. A natural question is hence whether one can solve the various recovery problems in the SBM without having access to the parameters. This paper answers this question in the affirmative for the exact and strong recovery of the communities. 1.1 Prior results on the general SBM with known parameters Most of the previous works are concerned with the SBM having symmetric communities (mainly 2 or sometimes k), with the exception of [19] which provides the first general achievability results for the SBM.2 Recently, [1] studied fundamental limits for the general model SBM(n, p, W), with p independent of n. The results are summarized below. Recall first the recovery requirements: Definition 1. (Recovery requirements.) An algorithm recovers or detects communities in SBM(n, p, W) with an accuracy of α ∈[0, 1], if it outputs a labelling of the nodes {σ′(v), v ∈V }, which agrees with the true labelling σ on a fraction α of the nodes with probability 1 −on(1). The agreement is maximized over relabellings of the communities. Strong recovery refers to α = 1 −on(1) and exact recovery refers to α = 1. The problem is solvable information-theoretically if there exists an algorithm that solves it, and efficiently if the algorithm runs in polynomial-time in n. Note that exact recovery in SBM(n, p, W) requires the graph not to have vertices of degree 0 in multiple communities with high probability. Therefore, for exact recovery, we focus on W = ln(n)Q/n where Q is fixed. I. Partial and strong recovery in the general SBM. The first result of [1] concerns the regime where the connectivity matrix W scales as Q/n for a positive symmetric matrix Q (i.e., the node 1 [6] generalizes this to a, b = Θ(1). 2 [24] also study variations of the k-symmetric model. 2 average degree is constant). The following notion of SNR is first introduced SNR = |λmin|2/λmax (1) where λmin and λmax are respectively the smallest3 and largest eigenvalues of diag(p)Q. The algorithm Sphere-comparison is proposed that solves partial recovery with exponential accuracy and quasi-linear complexity when the SNR diverges. Theorem 1. [1] Given any k ∈Z, p ∈(0, 1)k with |p| = 1, and symmetric matrix Q with no two rows equal, let λ be the largest eigenvalue of PQ, and λ′ be the eigenvalue of PQ with the smallest nonzero magnitude. If SNR := |λ′|2 λ > 4, λ7 < (λ′)8, and 4λ3 < (λ′)4, for some ε = ε(λ, λ′) and C = C(p, Q) > 0, Sphere-comparison detects communities in graphs drawn from SBM(n, p, Q/n) with accuracy 1 −4ke−Cρ 16k /(1 −exp(−Cρ 16k (λ′)4 λ3 −1 )), provided that the above is larger than 1 −mini pi 2 ln(4k), and runs in O(n1+ϵ) time. Moreover, ε can be made arbitrarily small with 8 ln(λ √ 2/|λ′|)/ ln(λ), and C(p, αQ) is independent of α. Note that for k symmetric clusters, SNR reduces to (a−b)2 k(a+(k−1)b), which is the quantity of interest for detection [2, 26]. Moreover, the SNR must diverge to ensure strong recovery in the symmetric case [1]. The following is an important consequence of the previous theorem, stating that Sphere-comparison solves strong recovery when the entries of Q are amplified. Corollary 1. [1] For any k ∈Z, p ∈(0, 1)a with |p| = 1, and symmetric matrix Q with no two rows equal, there exist ϵ(c) = O(1/ ln(c)) such that for all sufficiently large c, Sphere-comparison detects communities in SBM(n, p, cQ/n) with accuracy 1 −e−Ω(c) and complexity On(n1+ϵ(c)). The above gives the optimal scaling both in accuracy and complexity. II. Exact recovery in the general SBM. The second result in [1] is for the regime where the connectivity matrix scales as ln(n)Q/n, Q independent of n, where it is shown that exact recovery has a sharp threshold characterized by the divergence function D+(f, g) = max t∈[0,1] X x∈[k] tf(x) + (1 −t)g(x) −f(x)tg(x)1−t , named the CH-divergence in [1]. Specifically, if all pairs of columns in diag(p)Q are at D+-distance at least 1 from each other, then exact recovery is solvable in the general SBM. We refer to Section 2.3 in [1] for discussion on the connection with Shannon’s channel coding theorem (and CH vs. KL divergence). An algorithm (Degree-profiling) is also developed in [1] that solves exact recovery down to the D+ limit in quasi-linear time, showing that exact recovery has no informational to computational gap. Theorem 2. [1] (i) Exact recovery is solvable in SBM(n, p, ln(n)Q/n) if and only if min i,j∈[k],i̸=j D+((PQ)i||(PQ)j) ≥1. (ii) The Degree-profiling algorithm (see [1]) solves exact recovery whenever it is information-theoretically solvable and runs in o(n1+ϵ) time for all ϵ > 0. Exact and strong recovery are thus solved for the general SBM with linear-size communities, when the parameters are known. We next remove the latter assumption. 1.2 Estimating the parameters For the estimation of the parameters, some results are known for two-symmetric communities. In the logarithmic degree regime, since the SDP is agnostic to the parameters (it is a relaxation of the min-bisection), the parameters can be estimated by recovering the communities [5,20,21]. For the constant-degree regime, [26] shows that the parameters can be estimated above the threshold by counting cycles (which is efficiently approximated by counting non-backtracking walks). These are, however, for 2 communities. We also became aware of a parallel work [27], which considers private graphon estimation (including SBMs). In particular, for the logarithmic degree regime, [27] obtains a (non-efficient) procedure to estimate parameters of graphons in an appropriate version of the L2 norm. For the general SBM, learning the model was to date mainly open. 3The smallest eigenvalue of diag(p)Q is the one with least magnitude. 3 2 Results Agnostic algorithms are developed for the constant and diverging node degrees (with p, k independent of n). These afford optimal accuracy and complexity scaling for large node degrees and achieve the CH-divergence limit for logarithmic node degrees. In particular, the SBM can be learned efficiently for any diverging degrees. Note that the assumptions on p and k being independent of n could be slightly relaxed, for example to slowly growing k, but we leave this for future work. 2.1 Partial recovery Our main result for partial recovery holds in the constant degree regime and requires a lower bound δ on the least relative size of the communities. This requirement is removed when working with diverging degrees, as stated in the corollary below. Theorem 3. Given δ > 0 and for any k ∈Z, p ∈(0, 1)k with P pi = 1 and 0 < δ ≤min pi, and any symmetric matrix Q with no two rows equal such that every entry in Qk is positive (in other words, Q such that there is a nonzero probability of a path between vertices in any two communities in a graph drawn from SBM(n, p, Q/n)), there exist ϵ(c) = O(1/ ln(c)) such that for all sufficiently large α, Agnostic-sphere-comparison detects communities in graphs drawn from SBM(n, p, αQ/n) with accuracy at least 1 −e−Ω(α) in On(n1+ϵ(α)) time. Note that a vertex in community i has degree 0 with probability exponential in c, and there is no way to differentiate between vertices of degree 0 from different communities. So, an error rate that decreases exponentially with c is optimal. In [28], we provide a more detailed version of this theorem, which yields a quantitate statement on the accuracy of the algorithm in terms of the SNR (λ′)2/λ for general SBM(n, p, Q/n). Corollary 2. If α = ω(1) in Theorem 3, the knowledge requirement on δ can be removed. 2.2 Exact recovery Recall that from [1], exact recovery is information-theoretically and computationally solvable in SBM(n, p, ln(n)Q/n) if and only if, min i<j D+((PQ)i, (PQ)j) ≥1. (2) We next show that this can be achieved without any knowledge on the parameters for SBM(n, p, ln(n)Q/n). Theorem 4. The Agnostic-degree-profiling algorithm (see Section 3.2) solves exact recovery in any SBM(n, p, ln(n)Q/n) for which exact recovery is solvable, using no input except the graph in question, and runs in o(n1+ϵ) time for all ϵ > 0. In particular, exact recovery is efficiently and universally solvable whenever it is information-theoretically solvable. 3 Proof Techniques and Algorithms 3.1 Partial recovery and the Agnostic-sphere-comparison algorithm 3.1.1 Simplified version of the algorithm for the symmetric case To ease the presentation of the algorithm, we focus first on the symmetric case, i.e., the SBM with k communities of relative size 1/k, probability of connecting a n inside communities and b n across communities. Let d = (a + (k −1)b)/k be the average degree. Definition 2. For any vertex v, let Nr[G](v) be the set of all vertices with shortest path in G to v of length r. We often drop the subscript G if the graph in question is the original SBM. We also refer to ¯Nr(v) as the vector whose i-th entry is the number of vertices in Nr(v) that are in community i. For an arbitrary vertex v and reasonably small r, there will be typically about dr vertices in Nr(v), and about ( a−b k )r more of them will be in v’s community than in each other community. Of course, 4 this only holds when r < log n/ log d because there are not enough vertices in the graph otherwise. The obvious way to try to determine whether or not two vertices v and v′ are in the same community is to guess that they are in the same community if |Nr(v) ∩Nr(v′)| > d2r/n and different communities otherwise. Unfortunately, whether or not a vertex is in Nr(v) is not independent of whether or not it is in Nr(v′), which compromises this plan. Instead, we propose to rely on the following graph-splitting step: Randomly assign every edge in G to some set E with a fixed probability c and then count the number of edges in E that connect Nr[G\E] and Nr′[G\E]. Formally: Definition 3. For any v, v′ ∈G, r, r′ ∈Z, and subset of G’s edges E, let Nr,r′[E](v · v′) be the number of pairs (v1, v2) such that v1 ∈Nr[G\E](v), v2 ∈Nr′[G\E](v′), and (v1, v2) ∈E. Note that E and G\E are disjoint. However, in SBM(n, p, Q/n), G is sparse enough that even if the two graphs were generated independently, a given pair of vertices would have an edge in both graphs with probability O( 1 n2 ). So, E is approximately independent of G\E. Thus, given v, r, and denoting by λ1 = (a + (k −1)b)/k and λ2 = (a −b)/k the two eigvenvalues of PQ in the symmetric case, the expected number of intra-community neighbors at depth r from v is approximately 1 k(λr 1 + (k −1)λr 2), whereas the expected number of extra-community neighbors at depth r from v is approximately 1 k(λr 1 −λr 2) for each of the other (k −1) communities. All of these are scaled by 1 −c if we do the computations in G\E. Using now the emulated independence between E and G\E, and assuming v and v′ to be in the same community, the expected number of edges in E connecting Nr[G\E](v) to Nr′[G\E](v′) is approximately given by the inner product ut(c · PQ)u, where u = 1 k(λr 1 + (k −1)λr 2, λr 1 −λr 2, . . . , λr 1 −λr 2) and (PQ) is the matrix with a on the diagonal and b elsewhere. When v and v′ are in different communities, the inner product is between u and a permutation of u. After simplifications, this gives Nr,r′[E](v · v′) ≈c(1 −c)r+r′ n " dr+r′+1 + a −b k r+r′+1 (kδσv,σv′ −1) # (3) where δσv,σv′ is 1 if v and v′ are in the same community and 0 otherwise. In order for Nr,r′[E](v·v′) to depend on the relative communities of v and v′, it must be that c(1 −c)r+r′| a−b k |r+r′+1k is large enough, i.e., more than n, so r + r′ needs to be at least log n/ log | a−b k |. A difficulty is that for a specific pair of vertices, the dr+r′+1 term will be multiplied by a random factor dependent on the degrees of v, v′, and the nearby vertices. So, in order to stop the variation in the dr+r′+1 term from drowning out the a−b k r+r′+1 (kδσv,σv′ −1) term, it is necessary to cancel out the dominant term. This brings us to introduce the following sign-invariant statistics: Ir,r′[E](v · v′) := Nr+2,r′[E](v · v′) · Nr,r′[E](v · v′) −N 2 r+1,r′[E](v · v′) ≈c2(1 −c)2r+2r′+2 n2 · d −a −b k 2 · dr+r′+1 a −b k r+r′+1 (kδσv,σv′ −1) In particular, for r + r′ odd, Ir,r′[E](v · v′) will tend to be positive if v and v′ are in the same community and negative otherwise, irrespective of the specific values of a, b, k. That suggests the following algorithm for partial recovery, it requires knowledge of δ < 1/k in the constant degree regime, but not in the regime where a, b scale with n. 1. Set r = 3 4 log n/ log d and put each of the graph’s edges in E with probability 1/10. 2. Set kmax = 1/δ and select kmax ln(4kmax) random vertices, v1, ..., vkmax ln(4kmax). 3. Compute Ir,r′[E](vi · vj) for each i and j. 4. If there is a possible assignment of these vertices to communities such that Ir,r′[E](vi·vj) > 0 if and only if vi and vj are in the same community, then randomly select one vertex from each apparent community, v[1], v[2], ...v[k′]. Otherwise, fail. 5. For every v′ in the graph, guess that v′ is in the same community as the v[i] that maximizes the value of Ir,r′[E](v[i] · v′). 5 This algorithm succeeds as long as |a −b|/k > (10/9)1/6((a + (k −1)b)/k)5/6, to ensure that the above estimates on Nr,r′[E](v · v′) are reliable. Further, if a, b are scaled by α = ω(1), setting δ = 1/ log log α allows removal of the knowledge requirement on δ. One alternative to our approach could be to count the non-backtracking walks of a given length between v and v′, like in [4,29], instead of using Nr,r′[E](v · v′). However, proving that the number of non-backtracking walks is close to its expected value is difficult. Proving that Nr,r′[E](v · v′) is within a desired range is substantially easier because for any v1 and v2, whether or not there is an edge between v1 and v2 directly effects Nr(v) for at most one value of r. Algorithms based on shortest path have also been studied in [30]. 3.1.2 The general case In the general case, define Nr(v), ¯Nr(v) and Nr,r′[E](v · v′) as in the previous section. Now, for any v1 ∈Nr[G/E](v) and v2 ∈Nr′[G/E](v′), (v1, v2) ∈E with a probability of approximately cQσv1,σv2 /n. As a result, Nr,r′[E](v · v′) ≈¯Nr[G\E](v) · cQ n ¯Nr′[G\E](v′) ≈((1 −c)PQ)reσv · cQ n ((1 −c)PQ)r′eσv′ = c(1 −c)r+r′eσv · Q(PQ)r+r′eσv′ /n. E Nr[G\E](v) Nr0[G\E](v0) . . . . . . v v0 Figure 1: The purple edges represent the edges counted by Nr,r′[E](v · v′). Let λ1, ..., λh be the distinct eigenvalues of PQ, ordered so that |λ1| ≥|λ2| ≥... ≥|λh| ≥0. Also define h′ so that h′ = h if λh ̸= 0 and h′ = h −1 if λh = 0. If Wi is the eigenspace of PQ corresponding to the eigenvalue λi, and PWi is the projection operator on to Wi, then Nr,r′[E](v · v′) ≈c(1 −c)r+r′eσv · Q(PQ)r+r′eσv′ /n (4) = c(1 −c)r+r′ n X i λr+r′+1 i PWi(eσv) · P −1PWi(eσv′ ) (5) where the final equality holds because for all i ̸= j, λiPWi(eσv) · P −1PWj(eσv′ ) = (PQPWi(eσv)) · P −1PWj(eσv′ ) = PWi(eσv) · QPWj(eσv′ ) = PWi(eσv) · P −1λjPWj(eσv′ ), and since λi ̸= λj, this implies that PWi(eσv) · P −1PWj(eσv′ ) = 0. Definition 4. Let ζi(v · v′) = PWi(eσv) · P −1PWi(eσv′ ) for all i, v, and v′. Equation (5) is dominated by the λr+r′+1 1 term, so getting good estimate of the λr+r′+1 2 through λr+r′+1 h′ terms requires cancelling it out somehow. As a start, if λ1 > λ2 > λ3 then Nr+2,r′[E](v · v′) · Nr,r′[E](v · v′) −N 2 r+1,r′[E](v · v′) ≈c2(1 −c)2r+2r′+2 n2 (λ2 1 + λ2 2 −2λ1λ2)λr+r′+1 1 λr+r′+1 2 ζ1(v · v′)ζ2(v · v′) Note that the left hand side of this expression is equal to det Nr,r′[E](v · v′) Nr+1,r′[E](v · v′) Nr+1,r′[E](v · v′) Nr+2,r′[E](v · v′) . Definition 5. Let Mm,r,r′[E](v · v′) be the m × m matrix such that Mm,r,r′[E](v · v′)i,j = Nr+i+j,r′[E](v · v′) for each i and j. 6 As shown in [28], there exists constant γ(λ1, ..., λm) such that det(Mm,r,r′[E](v · v′)) ≈cm(1 −c)m(r+r′) nm γ(λ1, ..., λm) m Y i=1 λr+r′+1 i ζi(v · v′) (6) where we assumed that |λm| > |λm+1| above to simplify the discussion (the case |λm| = |λm+1| is similar). This suggests the following plan for estimating the eigenvalues corresponding to a graph. First, pick several vertices at random. Then, use the fact that |Nr[G\E](v)| ≈((1 −c)λ1)r for any good vertex v to estimate λ1. Next, take ratios of (6) for m and m −1 (with r = r′), and look for the smallest m making that ratio small enough (this will use the estimate on λ1), estimating h′ by this value minus one. Then estimate consecutively all of PQ’s eigenvalues for each selected vertex using ratios of (6). Finally, take the median of these estimates. In general, whether |λm| > |λm+1| or |λm| = |λm+1|, det(Mm,r+1,r′[E](v · v′)) −(1 −c)mλm+1 Qm−1 i=1 λi det(Mm,r,r′[E](v · v′)) det(Mm−1,r+1,r′[E](v · v′)) −(1 −c)m−1λm Qm−2 i=1 λi det(Mm−1,r,r′[E](v · v′)) ≈c n γ(λ1, ..., λm) γ(λ1, ..., λm−1) λm−1(λm −λm+1) λm(λm−1 −λm) ((1 −c)λm)r+r′+2ζm(v · v′). This fact can be used to approximate ζi(v · v′) for arbitrary v, v′, and i. Of course, this requires r and r′ to be large enough that c(1−c)r+r′ n λr+r′+1 i ζi(v · v′) is large relative to the error terms for all i ≤h′. This requires at least |(1 −c)λi|r+r′+1 = ω(n) for all i ≤h′. Moreover, for any v and v′, 0 ≤PWi(eσv −eσv′ ) · P −1PWi(eσv −eσv′ ) = ζi(v · v) −2ζi(v · v′) + ζi(v′ · v′) with equality for all i if and only if σv = σv′, so sufficiently good approximations of ζi(v·v), ζi(v·v′) and ζi(v′ · v′) can be used to determine which pairs of vertices are in the same community. One could generate a reasonable classification based solely on this method of comparing vertices (with an appropriate choice of the parameters, as later detailed). However, that would require computing Nr,r′[E](v · v) for every vertex in the graph with fairly large r + r′, which would be slow. Instead, we use the fact that for any vertices v, v′, and v′′ with σv = σv′ ̸= σv′′, ζi(v′ · v′) −2ζi(v · v′) + ζi(v · v) = 0 ≤ζi(v′′ · v′′) −2ζi(v · v′′) + ζi(v · v) for all i, and the inequality is strict for at least one i. So, subtracting ζi(v · v) from both sides, ζi(v′ · v′) −2ζi(v · v′) ≤ζi(v′′ · v′′) −2ζi(v · v′′) for all i, and the inequality is still strict for at least one i. So, given a representative vertex in each community, we can determine which of them a given vertex, v, is in the same community as without needing to know the value of ζi(v · v). This runs fairly quickly if r is large and r′ is small because the algorithm only requires focusing on |Nr′(v′)| vertices. This leads to the following plan for partial recovery. First, randomly select a set of vertices that is large enough to contain at least one vertex from each community with high probability. Next, compare all of the selected vertices in an attempt to determine which of them are in the same communities. Then, pick one in each community. Call these anchor nodes. After that, use the algorithm referred to above to determine which community each of the remaining vertices is in. As long as there actually was at least one vertex from each community in the initial set and none of the approximations were particularly bad, this should give a reasonable classification. The risk that this randomly gives a bad classification due to a bad set of initial vertices can be mitigated by repeating the previous classification procedure several times as discussed in [28]. This completes the Agnostic-sphere-comparison algorithm. We refer to [28] for the details. 3.2 Exact recovery and the Agnostic-degree-profiling algorithm The exact recovery part is similar to [1] and uses the fact that once a good enough clustering has been obtained from Agnostic-sphere-comparison, the classification can be finished by making local improvements based on the node’s neighborhoods. Similar techniques have been used in [5, 11,19,31,32]. However, we establish here a sharp characterization of the local procedure error. 7 The key result is that, when testing between two multivariate Poisson distributions of means log(n)λ1 and log(n)λ2 respectively, where λ1, λ2 ∈Zk +, the probability of error (of maximum a posteriori decoding) is n−D+(λ1,λ2)+o(1). (7) This is proved in [1]. In the case of unknown parameters, the algorithmic approach is largely unchanged, adding a step where the best known classification is used to estimate p and Q prior to any local improvement step. The analysis of the algorithm requires however some careful handling. First, it is necessary to prove that given a labelling of the graph’s vertices with an error rate of x, one can compute approximations of p and Q that are within O(x + log(n)/√n) of their true values with probability 1 −o(1). Secondly, one needs to modify the above hypothesis testing estimates to control the error probability. In attempting to determine vertices’ communities based on estimates of p and Q that are off by at most δ, say p′ and Q′, one must show that a classification of its neighbors that has an error rate of δ classifies the vertices with an error rate only eO(δ log n) times higher than it would be if the parameter really were p′ and Q′ and the vertices’ neighbors were all classified correctly. Thirdly, one needs to show that since D+((PQ)i, (PQ)j) is differentiable with respect to any element of PQ, the error rate if the parameters really were p′ and Q′ is at worst eO(δ log n) as high as the error rate with the actual parameters. Combining these yields the conclusion that any errors in the estimates of the SBM’s parameters do not disrupt vertex classification any worse than the errors in the preliminary classifications already were. The Agnostic-degree-profiling algorithm. The inputs are (G, γ), where G is a graph, and γ ∈[0, 1] (see [28] for how to set γ specifically). The algorithm outputs each node’s label. (1) Define the graph g′ on the vertex set [n] by selecting each edge in g independently with probability γ, and define the graph g′′ that contains the edges in g that are not in g′. (2) Run Agnostic-sphere-comparison on g′ with δ = 1/ log log(n) to obtain the classification σ′ ∈[k]n. (3) Determine the size of each alleged community, and the edge density between each pair of alleged communities. (4) For each node v ∈[n], determine the most likely community label of node v based on its degree profile ¯N1(v) computed from the preliminary classification σ′, and call it σ′′ v. (5) Use σ′′ v to get new estimates of p and Q. (6) For each node v ∈[n], determine the most likely community label of node v based on its degree profile ¯N1(v) computed from σ′′. Output this labelling. In step (3) and (6), the most likely label is the one that maximizes the probability that the degree profile comes from a multivariate distribution of mean ln(n)(PQ)i for i ∈[k]. Note that this algorithm does not require a lower bound on min pi because setting δ to a slowly decreasing function of n results in δ being within an acceptable range for all sufficiently large n. 4 Data implementation and open problems We tested a simplified version of our algorithm on real data (see [28]), for the blog network of Adamic and Glance ’05. We obtained an error rate of about 60/1222 (best trial was 57, worst 67), achieving the state-of-the-art (as described in [32]). The results in this paper should extend quite directly to a slowly growing number of communities (e.g., up to logarithmic). It would be interesting to extend the current approach to smaller sized or more communities, watching the complexity scaling, as well as to corrected-degrees, labeled-edges, or overlapping communities (though the approach in this paper already applies to linear-sized overlaps). References [1] E. Abbe and C. Sandon. Community detection in general stochastic block models: fundamental limits and efficient recovery algorithms. arXiv:1503.00609. To appear in FOCS15., March 2015. [2] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborov´a. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Phys. Rev. E, 84:066106, December 2011. [3] L. Massouli´e. Community detection thresholds and the weak Ramanujan property. In STOC 2014: 46th Annual Symposium on the Theory of Computing, pages 1–10, New York, United States, June 2014. 8 [4] E. Mossel, J. Neeman, and A. Sly. A proof of the block model threshold conjecture. Available online at arXiv:1311.4115 [math.PR], January 2014. [5] E. Abbe, A. S. Bandeira, and G. Hall. Exact recovery in the stochastic block model. To appear in IEEE Transactions on Information Theory. Available at ArXiv:1405.3267, May 2014. [6] E. Mossel, J. Neeman, and A. Sly. Consistency thresholds for binary symmetric block models. Arxiv:arXiv:1407.1591. To appear in STOC15., July 2014. [7] J. Xu Y. Chen. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. arXiv:1402.1267, February 2014. [8] P. K. Gopalan and D. M. Blei. Efficient discovery of overlapping communities in massive networks. Proceedings of the National Academy of Sciences, 2013. [9] P. W. Holland, K. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109–137, 1983. [10] T.N. Bui, S. Chaudhuri, F.T. Leighton, and M. Sipser. Graph bisection algorithms with good average case behavior. Combinatorica, 7(2):171–191, 1987. [11] M.E. Dyer and A.M. Frieze. The solution of some random NP-hard problems in polynomial expected time. Journal of Algorithms, 10(4):451 – 489, 1989. [12] Mark Jerrum and Gregory B. Sorkin. The metropolis algorithm for graph bisection. Discrete Applied Mathematics, 82(13):155 – 175, 1998. [13] A. Condon and R. M. Karp. Algorithms for graph partitioning on the planted partition model. Lecture Notes in Computer Science, 1671:221–232, 1999. [14] T. A. B. Snijders and K. Nowicki. Estimation and Prediction for Stochastic Blockmodels for Graphs with Latent Block Structure. Journal of Classification, 14(1):75–100, January 1997. [15] F. McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537, 2001. [16] P. J. Bickel and A. Chen. A nonparametric view of network models and newmangirvan and other modularities. Proceedings of the National Academy of Sciences, 2009. [17] K. Rohe, S. Chatterjee, and B. Yu. Spectral clustering and the high-dimensional stochastic blockmodel. The Annals of Statistics, 39(4):1878–1915, 08 2011. [18] D. S. Choi, P. J. Wolfe, and E. M. Airoldi. Stochastic blockmodels with a growing number of classes. Biometrika, pages 1–12, 2012. [19] V. Vu. A simple svd algorithm for finding hidden partitions. Available online at arXiv:1404.3918, 2014. [20] J. Xu B. Hajek, Y. Wu. Achieving exact cluster recovery threshold via semidefinite programming. arXiv:1412.6156, November 2014. [21] A. S. Bandeira. Random laplacian matrices and convex relaxations. arXiv:1504.03987, 2015. [22] S. Yun and A. Proutiere. Accurate community detection in the stochastic block model via spectral algorithms. arXiv:1412.7335, December 2014. [23] E. Mossel, J. Neeman, and A. Sly. Belief propagation, robust reconstruction, and optimal recovery of block models. Arxiv:arXiv:1309.1380, 2013. [24] O. Gu´edon and R. Vershynin. Community detection in sparse networks via Grothendieck’s inequality. ArXiv:1411.4686, November 2014. [25] P. Chin, A. Rao, and V. Vu. Stochastic block model and community detection in the sparse graphs: A spectral algorithm with optimal rate of recovery. arXiv:1501.05021, January 2015. [26] E. Mossel, J. Neeman, and A. Sly. Stochastic block models and reconstruction. Available online at arXiv:1202.1499 [math.PR], 2012. [27] C. Borgs, J. Chayes, and A. Smith. Private graphon estimation for sparse graphs. In preparation, 2015. [28] E. Abbe and C. Sandon. Recovering communities in the general stochastic block model without knowing the parameters. arXiv:1506.03729, June 2015. [29] C. Bordenave, M. Lelarge, and L. Massouli´e. Non-backtracking spectrum of random graphs: community detection and non-regular ramanujan graphs. Available at arXiv:1501.06087, 2015. [30] S. Bhattacharyya and P. J. Bickel. Community Detection in Networks using Graph Distance. ArXiv e-prints, January 2014. [31] N. Alon and N. Kahale. A spectral technique for coloring random 3-colorable graphs. In SIAM Journal on Computing, pages 346–355, 1994. [32] A. Y. Zhang H. H. Zhou C. Gao, Z. Ma. Achieving optimal misclassification proportion in stochastic block model. arXiv:1505.03772, 2015. 9 | 2015 | 320 |
5,837 | On Variance Reduction in Stochastic Gradient Descent and its Asynchronous Variants Sashank J. Reddi Carnegie Mellon University sjakkamr@cs.cmu.edu Ahmed Hefny Carnegie Mellon University ahefny@cs.cmu.edu Suvrit Sra Massachusetts Institute of Technology suvrit@mit.edu Barnab´as P´oczos Carnegie Mellon University bapoczos@cs.cmu.edu Alex Smola Carnegie Mellon University alex@smola.org Abstract We study optimization algorithms based on variance reduction for stochastic gradient descent (SGD). Remarkable recent progress has been made in this direction through development of algorithms like SAG, SVRG, SAGA. These algorithms have been shown to outperform SGD, both theoretically and empirically. However, asynchronous versions of these algorithms—a crucial requirement for modern large-scale applications—have not been studied. We bridge this gap by presenting a unifying framework for many variance reduction techniques. Subsequently, we propose an asynchronous algorithm grounded in our framework, and prove its fast convergence. An important consequence of our general approach is that it yields asynchronous versions of variance reduction algorithms such as SVRG and SAGA as a byproduct. Our method achieves near linear speedup in sparse settings common to machine learning. We demonstrate the empirical performance of our method through a concrete realization of asynchronous SVRG. 1 Introduction There has been a steep rise in recent work [6, 7, 9–12, 25, 27, 29] on “variance reduced” stochastic gradient algorithms for convex problems of the finite-sum form: min x2Rd f(x) := 1 n Xn i=1 fi(x). (1.1) Under strong convexity assumptions, such variance reduced (VR) stochastic algorithms attain better convergence rates (in expectation) than stochastic gradient descent (SGD) [18, 24], both in theory and practice.1 The key property of these VR algorithms is that by exploiting problem structure and by making suitable space-time tradeoffs, they reduce the variance incurred due to stochastic gradients. This variance reduction has powerful consequences: it helps VR stochastic methods attain linear convergence rates, and thereby circumvents slowdowns that usually hit SGD. 1Though we should note that SGD also applies to the harder stochastic optimization problem min F(x) = E[f(x; ⇠)], which need not be a finite-sum. 1 Although these advances have great value in general, for large-scale problems we still require parallel or distributed processing. And in this setting, asynchronous variants of SGD remain indispensable [2, 8, 13, 21, 28, 30]. Therefore, a key question is how to extend the synchronous finite-sum VR algorithms to asynchronous parallel and distributed settings. We answer one part of this question by developing new asynchronous parallel stochastic gradient methods that provably converge at a linear rate for smooth strongly convex finite-sum problems. Our methods are inspired by the influential SVRG [10], S2GD [12], SAG [25] and SAGA [6] family of algorithms. We list our contributions more precisely below. Contributions. Our paper makes two core contributions: (i) a formal general framework for variance reduced stochastic methods based on discussions in [6]; and (ii) asynchronous parallel VR algorithms within this framework. Our general framework presents a formal unifying view of several VR methods (e.g., it includes SAGA and SVRG as special cases) while expressing key algorithmic and practical tradeoffs concisely. Thus, it yields a broader understanding of VR methods, which helps us obtain asynchronous parallel variants of VR methods. Under sparse-data settings common to machine learning problems, our parallel algorithms attain speedups that scale near linearly with the number of processors. As a concrete illustration, we present a specialization to an asynchronous SVRG-like method. We compare this specialization with non-variance reduced asynchronous SGD methods, and observe strong empirical speedups that agree with the theory. Related work. As already mentioned, our work is closest to (and generalizes) SAG [25], SAGA [6], SVRG [10] and S2GD [12], which are primal methods. Also closely related are dual methods such as SDCA [27] and Finito [7], and in its convex incarnation MISO [16]; a more precise relation between these dual methods and VR stochastic methods is described in Defazio’s thesis [5]. By their algorithmic structure, these VR methods trace back to classical non-stochastic incremental gradient algorithms [4], but by now it is well-recognized that randomization helps obtain much sharper convergence results (in expectation). Proximal [29] and accelerated VR methods have also been proposed [20, 26]; we leave a study of such variants of our framework as future work. Finally, there is recent work on lower-bounds for finite-sum problems [1]. Within asynchronous SGD algorithms, both parallel [21] and distributed [2, 17] variants are known. In this paper, we focus our attention on the parallel setting. A different line of methods is that of (primal) coordinate descent methods, and their parallel and distributed variants [14, 15, 19, 22, 23]. Our asynchronous methods share some structural assumptions with these methods. Finally, the recent work [11] generalizes S2GD to the mini-batch setting, thereby also permitting parallel processing, albeit with more synchronization and allowing only small mini-batches. 2 A General Framework for VR Stochastic Methods We focus on instances of (1.1) where the cost function f(x) has an L-Lipschitz gradient, so that krf(x) −rf(y)k Lkx −yk, and it is λ-strongly convex, i.e., for all x, y 2 Rd, f(x) ≥f(y) + hrf(y), x −yi + λ 2 kx −yk2. (2.1) While our analysis focuses on strongly convex functions, we can extend it to just smooth convex functions along the lines of [6, 29]. Inspired by the discussion on a general view of variance reduced techniques in [6], we now describe a formal general framework for variance reduction in stochastic gradient descent. We denote the collection {fi}n i=1 of functions that make up f in (1.1) by F. For our algorithm, we maintain an additional parameter ↵t i 2 Rd for each fi 2 F. We use At to denote {↵t i}n i=1. The general iterative framework for updating the parameters is presented as Algorithm 1. Observe that the algorithm is still abstract, since it does not specify the subroutine SCHEDULEUPDATE. This subroutine determines the crucial update mechanism of {↵t i} (and thereby of At). As we will see different schedules give rise to different fast first-order methods proposed in the literature. The part of the update based on At is the key for these approaches and is responsible for variance reduction. Next, we provide different instantiations of the framework and construct a new algorithm derived from it. In particular, we consider incremental methods SAG [25], SVRG [10] and SAGA [6], and classic gradient descent GRADIENTDESCENT for demonstrating our framework. 2 ALGORITHM 1: GENERIC STOCHASTIC VARIANCE REDUCTION ALGORITHM Data: x0 2 Rd, ↵0 i = x0 8i 2 [n] , {1, . . . , n}, step size ⌘> 0 Randomly pick a IT = {i0, . . . , iT } where it 2 {1, . . . , n} 8 t 2 {0, . . . , T} ; for t = 0 to T do Update iterate as xt+1 xt −⌘ " rfit(xt) −rfit(↵t it) + 1 n P i rfi(↵t i) $ ; At+1 = SCHEDULEUPDATE({xi}t+1 i=0, At, t, IT ) ; end return xT Figure 1 shows the schedules for the aforementioned algorithms. In case of SVRG, SCHEDULEUPDATE is triggered every m iterations (here m denotes precisely the number of inner iterations used in [10]); so At remains unchanged for the m iterations and all ↵t i are updated to the current iterate at the mth iteration. For SAGA, unlike SVRG, At changes at the tth iteration for all t 2 [T]. This change is only to a single element of At, and is determined by the index it (the function chosen at iteration t). The update of SAG is similar to SAGA insofar that only one of the ↵i is updated at each iteration. However, the update for At+1 is based on it+1 rather than it. This results in a biased estimate of the gradient, unlike SVRG and SAGA. Finally, the schedule for gradient descent is similar to SAG, except that all the ↵i’s are updated at each iteration. Due to the full update we end up with the exact gradient at each iteration. This discussion highlights how the scheduler determines the resulting gradient method. To motivate the design of another schedule, let us consider the computational and storage costs of each of these algorithms. For SVRG, since we update At after every m iterations, it is enough to store a full gradient, and hence, the storage cost is O(d). However, the running time is O(d) at each iteration and O(nd) at the end of each epoch (for calculating the full gradient at the end of each epoch). In contrast, both SAG and SAGA have high storage costs of O(nd) and running time of O(d) per iteration. Finally, GRADIENTDESCENT has low storage cost since it needs to store the gradient at O(d) cost, but very high computational costs of O(nd) at each iteration. SVRG has an additional computation overhead at the end of each epoch due to calculation of the whole gradient. This is avoided in SAG and SAGA at the cost of additional storage. When m is very large, the additional computational overhead of SVRG amortized over all the iterations is small. However, as we will later see, this comes at the expense of slower convergence to the optimal solution. The tradeoffs between the epoch size m, additional storage, frequency of updates, and the convergence to the optimal solution are still not completely resolved. SVRG:SCHEDULEUPDATE({xi}t+1 i=0, At, t, IT ) for i = 1 to n do ↵t+1 i = (m | t)xt + (m6 | t)↵t i ; end return At+1 SAGA:SCHEDULEUPDATE({xi}t+1 i=0, At, t, IT ) for i = 1 to n do ↵t+1 i = (it = i)xt + (it 6= i)↵t i ; end return At+1 SAG:SCHEDULEUPDATE({xi}t+1 i=0, At, t, IT ) for i = 1 to n do ↵t+1 i = (it+1 = i)xt+1 + (it+1 6= i)↵t i ; end return At+1 GD:SCHEDULEUPDATE({xi}t+1 i=0, At, t, IT ) for i = 1 to n do ↵t+1 i = xt+1 ; end return At+1 Figure 1: SCHEDULEUPDATE function for SVRG (top left), SAGA (top right), SAG (bottom left) and GRADIENTDESCENT (bottom right). While SVRG is epoch-based, rest of algorithms perform updates at each iteration. Here a|b denotes that a divides b. A straightforward approach to design a new scheduler is to combine the schedules of the above algorithms. This allows us to tradeoff between the various aforementioned parameters of our interest. We call this schedule hybrid stochastic average gradient (HSAG). Here, we use the schedules of SVRG and SAGA to develop HSAG. However, in general, schedules of any of these algorithms can 3 HSAG:SCHEDULEUPDATE(xt, At, t, IT ) for i = 1 to n do ↵t+1 i = ⇢ (it = i)xt + (it 6= i)↵t i if i 2 S (si | t)xt + (si6 | t)↵t i if i /2 S end return At+1 Figure 2: SCHEDULEUPDATE for HSAG. This algorithm assumes access to some index set S and the schedule frequency vector s. Recall that a|b denotes a divides b be combined to obtain a hybrid algorithm. Consider some S ✓[n], the indices that follow SAGA schedule. We assume that the rest of the indices follow an SVRG-like schedule with schedule frequency si for all i 2 S , [n] \ S. Figure 2 shows the corresponding update schedule of HSAG. If S = [n] then HSAG is equivalent to SAGA, while at the other extreme, for S = ; and si = m for all i 2 [n], it corresponds to SVRG. HSAG exhibits interesting storage, computational and convergence trade-offs that depend on S. In general, while large cardinality of S likely incurs high storage costs, the computational cost per iteration is relatively low. On the other hand, when cardinality of S is small and si’s are large, storage costs are low but the convergence typically slows down. Before concluding our discussion on the general framework, we would like to draw the reader’s attention to the advantages of studying Algorithm 1. First, note that Algorithm 1 provides a unifying framework for many incremental/stochastic gradient methods proposed in the literature. Second, and more importantly, it provides a generic platform for analyzing this class of algorithms. As we will see in Section 3, this helps us develop and analyze asynchronous versions for different finite-sum algorithms under a common umbrella. Finally, it provides a mechanism to derive new algorithms by designing more sophisticated schedules; as noted above, one such construction gives rise to HSAG. 2.1 Convergence Analysis In this section, we provide convergence analysis for Algorithm 1 with HSAG schedules. As observed earlier, SVRG and SAGA are special cases of this setup. Our analysis assumes unbiasedness of the gradient estimates at each iteration, so it does not encompass SAG. For ease of exposition, we assume that all si = m for all i 2 [n]. Since HSAG is epoch-based, our analysis focuses on the iterates obtained after each epoch. Similar to [10] (see Option II of SVRG in [10]), our analysis will be for the case where the iterate at the end of (k + 1)st epoch, xkm+m, is replaced with an element chosen randomly from {xkm, . . . , xkm+m−1} with probability {p1, · · · , pm}. For brevity, we use ˜xk to denote the iterate chosen at the kth epoch. We also need the following quantity for our analysis: ˜Gk , 1 n X i2S " fi(↵km i ) −fi(x⇤) −hrfi(x⇤), ↵km i −x⇤i $ . Theorem 1. For any positive parameters c, β, > 1, step size ⌘and epoch size m, we define the following quantities: γ = 1 − ✓ 1 −1 ◆m) ✓ 2c⌘(1 −L⌘(1 + β)) −1 n −2c λ ◆ ✓= max ⇢2c γλ ✓ 1 −1 ◆m + 2Lc⌘2 γ ✓ 1 + 1 β ◆ 1 − ✓ 1 −1 ◆m)) , ✓ 1 −1 ◆m* . Suppose the probabilities pi / (1−1 )m−i, and that c, β, , step size ⌘and epoch size m are chosen such that the following conditions are satisfied: 1 + 2Lc⌘2 ✓ 1 + 1 β ◆ 1 n, γ > 0, ✓< 1. Then, for iterates of Algorithm 1 under the HSAG schedule, we have E h f(˜xk+1) −f(x⇤) + 1 γ ˜Gk+1 i ✓E h f(˜xk) −f(x⇤) + 1 γ ˜Gk i . 4 As a corollary, we immediately obtain an expected linear rate of convergence for HSAG. Corollary 1. Note that ˜Gk ≥0 and therefore, under the conditions specified in Theorem 1 and with ¯✓= ✓(1 + 1/γ) < 1 we have E ⇥ f(˜xk) −f(x⇤) ⇤ ¯✓k ⇥ f(x0) −f(x⇤) ⇤ . We emphasize that there exist values of the parameters for which the conditions in Theorem 1 and Corollary 1 are easily satisfied. For instance, setting ⌘= 1/16(λn + L), = 4/λ⌘, β = (2λn + L)/L and c = 2/⌘n, the conditions in Theorem 1 are satisfied for sufficiently large m. Additionally, in the high condition number regime of L/λ = n, we can obtain constant ✓< 1 (say 0.5) with m = O(n) epoch size (similar to [6, 10]). This leads to a computational complexity of O(n log(1/✏)) for HSAG to achieve ✏accuracy in the objective function as opposed to O(n2 log(1/✏)) for batch gradient descent method. Please refer to the appendix for more details on the parameters in Theorem 1. 3 Asynchronous Stochastic Variance Reduction We are now ready to present asynchronous versions of the algorithms captured by our general framework. We first describe our setup before delving into the details of these algorithms. Our model of computation is similar to the ones used in Hogwild! [21] and AsySCD [14]. We assume a multicore architecture where each core makes stochastic gradient updates to a centrally stored vector x in an asynchronous manner. There are four key components in our asynchronous algorithm; these are briefly described below. 1. Read: Read the iterate x and compute the gradient rfit(x) for a randomly chosen it. 2. Read schedule iterate: Read the schedule iterate A and compute the gradients required for update in Algorithm 1. 3. Update: Update the iterate x with the computed incremental update in Algorithm 1. 4. Schedule Update: Run a scheduler update for updating A. Each processor repeatedly runs these procedures concurrently, without any synchronization. Hence, x may change in between Step 1 and Step 3. Similarly, A may change in between Steps 2 and 4. In fact, the states of iterates x and A can correspond to different time-stamps. We maintain a global counter t to track the number of updates successfully executed. We use D(t) 2 [t] and D0(t) 2 [t] to denote the particular x-iterate and A-iterate used for evaluating the update at the tth iteration. We assume that the delay in between the time of evaluation and updating is bounded by a non-negative integer ⌧, i.e., t −D(t) ⌧and t −D0(t) ⌧. The bound on the staleness captures the degree of parallelism in the method: such parameters are typical in asynchronous systems (see e.g., [3, 14]). Furthermore, we also assume that the system is synchronized after every epoch i.e., D(t) ≥km for t ≥km. We would like to emphasize that the assumption is not strong since such a synchronization needs to be done only once per epoch. For the purpose of our analysis, we assume a consistent read model. In particular, our analysis assumes that the vector x used for evaluation of gradients is a valid iterate that existed at some point in time. Such an assumption typically amounts to using locks in practice. This problem can be avoided by using random coordinate updates as in [21] (see Section 4 of [21]) but such a procedure is computationally wasteful in practice. We leave the analysis of inconsistent read model as future work. Nonetheless, we report results for both locked and lock-free implementations (see Section 4). 3.1 Convergence Analysis The key ingredients to the success of asynchronous algorithms for multicore stochastic gradient descent are sparsity and “disjointness” of the data matrix [21]. More formally, suppose fi only depends on xei where ei ✓[d] i.e., fi acts only on the components of x indexed by the set ei. Let kxk2 i denote P j2ei kxjk2; then, the convergence depends on ∆, the smallest constant such that Ei[kxk2 i ] ∆kxk2. Intuitively, ∆denotes the average frequency with which a feature appears in the data matrix. We are interested in situations where ∆⌧1. As a warm up, let us first discuss convergence analysis for asynchronous SVRG. The general case is similar, but much more involved. Hence, it is instructive to first go through the analysis of asynchronous SVRG. 5 Theorem 2. Suppose step size ⌘, epoch size m are chosen such that the following condition holds: 0 < ✓s := ⇣ 1 λ⌘m + 4L ⇣ ⌘+L∆⌧2⌘2 1−2L2∆⌘2⌧2 ⌘⌘ ⇣ 1 −4L ⇣ ⌘+L∆⌧2⌘2 1−2L2∆⌘2⌧2 ⌘⌘ < 1. Then, for the iterates of an asynchronous variant of Algorithm 1 with SVRG schedule and probabilities pi = 1/m for all i 2 [m], we have E[f(˜xk+1) −f(x⇤)] ✓s E[f(˜xk) −f(x⇤)]. The bound obtained in Theorem 2 is useful when ∆is small. To see this, as earlier, consider the indicative case where L/λ = n. The synchronous version of SVRG obtains a convergence rate of ✓= 0.5 for step size ⌘= 0.1/L and epoch size m = O(n). For the asynchronous variant of SVRG, by setting ⌘= 0.1/2(max{1, ∆1/2⌧}L), we obtain a similar rate with m = O(n + ∆1/2⌧n). To obtain this, set ⌘= ⇢/L where ⇢= 0.1/2(max{1, ∆1/2⌧}) and ✓s = 0.5. Then, a simple calculation gives the following: m n = 2 ⇢ ✓ 1 −2∆⌧2⇢2 1 −12⇢−14∆⌧2⇢2 ◆ c0 max{1, ∆1/2⌧}, where c0 is some constant. This follows from the fact that ⇢= 0.1/2(max{1, ∆1/2⌧}). Suppose ⌧< 1/∆1/2. Then we can achieve nearly the same guarantees as the synchronous version, but ⌧ times faster since we are running the algorithm asynchronously. For example, consider the sparse setting where ∆= o(1/n); then it is possible to get near linear speedup when ⌧= o(n1/2). On the other hand, when ∆1/2⌧> 1, we can obtain a theoretical speedup of 1/∆1/2. We finally provide the convergence result for the asynchronous algorithm in the general case. The proof is complicated by the fact that set A, unlike in SVRG, changes during the epoch. The key idea is that only a single element of A changes at each iteration. Furthermore, it can only change to one of the iterates in the epoch. This control provides a handle on the error obtained due to the staleness. Due to space constraints, the proof is relegated to the appendix. Theorem 3. For any positive parameters c, β, > 1, step size ⌘and epoch size m, we define the following quantities: ⇣= c⌘2 + ✓ 1 −1 ◆−⌧ cL∆⌧2⌘3 ! , γa = 1 − ✓ 1 −1 ◆m) " 2c⌘−8⇣L(1 + β) −2c λ −96⇣L⌧ n ✓ 1 −1 ◆−⌧ −1 n # , ✓a = max 8 < : 2 4 2c γaλ ✓ 1 −1 ◆m + 8⇣L ⇣ 1 + 1 β ⌘ γa 1 − ✓ 1 −1 ◆m)3 5 , ✓ 1 −1 ◆m 9 = ; . Suppose probabilities pi / (1 −1 )m−i, parameters β, , step-size ⌘, and epoch size m are chosen such that the following conditions are satisfied: 1 + 8⇣L ✓ 1 + 1 β ◆ + 96⇣L⌧ n ✓ 1 −1 ◆−⌧ 1 n, ⌘2 ✓ 1 −1 ◆m−1 1 12L2∆⌧2 , γa > 0, ✓a < 1. Then, for the iterates of asynchronous variant of Algorithm 1 with HSAG schedule we have E f(˜xk+1) −f(x⇤) + 1 γa ˜Gk+1 ) ✓aE f(˜xk) −f(x⇤) + 1 γa ˜Gk ) . Corollary 2. Note that ˜Gk ≥0 and therefore, under the conditions specified in Theorem 3 and with ¯✓a = ✓a (1 + 1/γa) < 1, we have E ⇥ f(˜xk) −f(x⇤) ⇤ ¯✓k a ⇥ f(x0) −f(x⇤) ⇤ . 6 Threads 0 5 10 Speedup 1 2 3 Lock-Free SVRG Locked SVRG Threads 0 5 10 Speedup 1 2 3 4 5 Lock-Free SVRG Locked SVRG Threads 0 5 10 Speedup 1 2 3 4 5 Lock-Free SVRG Locked SVRG Threads 0 5 10 Speedup 1 2 3 4 5 Lock-Free SVRG Locked SVRG Figure 3: l2-regularized logistic regression. Speedup curves for Lock-Free SVRG and Locked SVRG on rcv1 (left), real-sim (left center), news20 (right center) and url (right) datasets. We report the speedup achieved by increasing the number of threads. By using step size normalized by ∆1/2⌧(similar to Theorem 2) and parameters similar to the ones specified after Theorem 1 we can show speedups similar to the ones obtained in Theorem 2. Please refer to the appendix for more details on the parameters in Theorem 3. Before ending our discussion on the theoretical analysis, we would like to highlight an important point. Our emphasis throughout the paper was on generality. While the results are presented here in full generality, one can obtain stronger results in specific cases. For example, in the case of SAGA, one can obtain per iteration convergence guarantees (see [6]) rather than those corresponding to per epoch presented in the paper. Also, SAGA can be analyzed without any additional synchronization per epoch. However, there is no qualitative difference in these guarantees accumulated over the epoch. Furthermore, in this case, our analysis for both synchronous and asynchronous cases can be easily modified to obtain convergence properties similar to those in [6]. 4 Experiments We present our empirical results in this section. For our experiments, we study the problem of binary classification via l2-regularized logistic regression. More formally, we are interested in the following optimization problem: min x 1 n n X i=1 " log(1 + exp(−yiz> i x)) + λkxk2$ , (4.1) where zi 2 Rd and yi is the corresponding label for each i 2 [n]. In all our experiments, we set λ = 1/n. Note that such a choice leads to high condition number. A careful implementation of SVRG is required for sparse gradients since the implementation as stated in Algorithm 1 will lead to dense updates at each iteration. For an efficient implementation, a scheme like the ‘just-in-time’ update scheme, as suggested in [25], is required. Due to lack of space, we provide the implementation details in the appendix. We evaluate the following algorithms for our experiments: • Lock-Free SVRG: This is the lock-free asynchronous variant of Algorithm 1 using SVRG schedule; all threads can read and update the parameters with any synchronization. Parameter updates are performed through atomic compare-and-swap instruction [21]. A constant step size that gives the best convergence is chosen for the dataset. • Locked SVRG: This is the locked version of the asynchronous variant of Algorithm 1 using SVRG schedule. In particular, we use a concurrent read exclusive write locking model, where all threads can read the parameters but only one threads can update the parameters at a given time. The step size is chosen similar to Lock-Free SVRG. • Lock-Free SGD: This is the lock-free asynchronous variant of the SGD algorithm (see [21]). We compare two different versions of this algorithm: (i) SGD with constant step size (referred to as CSGD). (ii) SGD with decaying step size ⌘0 p σ0/(t + σ0) (referred to as DSGD), where constants ⌘0 and σ0 specify the scale and speed of decay. For each of these versions, step size is tuned for each dataset to give the best convergence progress. 7 Time(seconds) 0 0.5 1 1.5 Objective Value - Optimal 10 -10 10 -5 Lock-Free SVRG DSGD CSGD Time(seconds) 0 2 4 6 8 Objective Value - Optimal 10 -10 10 -5 10 0 Lock-Free SVRG DSGD CSGD Time(seconds) 0 5 10 Objective Value-Optimal 10 -10 10 -5 10 0 Lock-Free SVRG DSGD CSGD Time(seconds) 0 50 100 Objective Value - Optimal 10 -10 10 -5 Lock-Free SVRG DSGD CSGD Figure 4: l2-regularized logistic regression. Training loss residual f(x) −f(x⇤) versus time plot of Lock-Free SVRG, DSGD and CSGD on rcv1 (left), real-sim (left center), news20 (right center) and url (right) datasets. The experiments are parallelized over 10 cores. All the algorithms were implemented in C++ 2. We run our experiments on datasets from LIBSVM website3. Similar to [29], we normalize each example in the dataset so that kzik2 = 1 for all i 2 [n]. Such a normalization leads to an upper bound of 0.25 on the Lipschitz constant of the gradient of fi. The epoch size m is chosen as 2n (as recommended in [10]) in all our experiments. In the first experiment, we compare the speedup achieved by our asynchronous algorithm. To this end, for each dataset we first measure the time required for the algorithm to each an accuracy of 10−10 (i.e., f(x) −f(x⇤) < 10−10). The speedup with P threads is defined as the ratio of the runtime with a single thread to the runtime with P threads. Results in Figure 3 show the speedup on various datasets. As seen in the figure, we achieve significant speedups for all the datasets. Not surprisingly, the speedup achieved by Lock-free SVRG is much higher than ones obtained by locking. Furthermore, the lowest speedup is achieved for rcv1 dataset. Similar speedup behavior was reported for this dataset in [21]. It should be noted that this dataset is not sparse and hence, is a bad case for the algorithm (similar to [21]). For the second set of experiments we compare the performance of Lock-Free SVRG with stochastic gradient descent. In particular, we compare with the variants of stochastic gradient descent, DSGD and CSGD, described earlier in this section. It is well established that the performance of variance reduced stochastic methods is better than that of SGD. We would like to empirically verify that such benefits carry over to the asynchronous variants of these algorithms. Figure 4 shows the performance of Lock-Free SVRG, DSGD and CSGD. Since the computation complexity of each epoch of these algorithms is different, we directly plot the objective value versus the runtime for each of these algorithms. We use 10 cores for comparing the algorithms in this experiment. As seen in the figure, Lock-Free SVRG outperforms both DSGD and CSGD. The performance gains are qualitatively similar to those reported in [10] for the synchronous versions of these algorithms. It can also be seen that the DSGD, not surprisingly, outperforms CSGD in all the cases. In our experiments, we observed that Lock-Free SVRG, in comparison to SGD, is relatively much less sensitive to the step size and more robust to increasing threads. 5 Discussion & Future Work In this paper, we presented a unifying framework based on [6], that captures many popular variance reduction techniques for stochastic gradient descent. We use this framework to develop a simple hybrid variance reduction method. The primary purpose of the framework, however, was to provide a common platform to analyze various variance reduction techniques. To this end, we provided convergence analysis for the framework under certain conditions. More importantly, we propose an asynchronous algorithm for the framework with provable convergence guarantees. The key consequence of our approach is that we obtain asynchronous variants of several algorithms like SVRG, SAGA and S2GD. Our asynchronous algorithms exploits sparsity in the data to obtain near linear speedup in settings that are typically encountered in machine learning. For future work, it would be interesting to perform an empirical comparison of various schedules. In particular, it would be worth exploring the space-time-accuracy tradeoffs of these schedules. We would also like to analyze the effect of these tradeoffs on the asynchronous variants. Acknowledgments. SS was partially supported by NSF IIS-1409802. 2All experiments were conducted on a Google Compute Engine n1-highcpu-32 machine with 32 processors and 28.8 GB RAM. 3http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/binary.html 8 Bibliography [1] A. Agarwal and L. Bottou. A lower bound for the optimization of finite sums. arXiv:1410.0723, 2014. [2] A. Agarwal and J. C. Duchi. Distributed delayed stochastic optimization. In Advances in Neural Information Processing Systems, pages 873–881, 2011. [3] D. Bertsekas and J. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice-Hall, 1989. [4] D. P. Bertsekas. Incremental gradient, subgradient, and proximal methods for convex optimization: A survey. Optimization for Machine Learning, 2010:1–38, 2011. [5] A. Defazio. New Optimization Methods for Machine Learning. PhD thesis, Australian National University, 2014. [6] A. Defazio, F. Bach, and S. Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In NIPS 27, pages 1646–1654. 2014. [7] A. J. Defazio, T. S. Caetano, and J. Domke. Finito: A faster, permutable incremental gradient method for big data problems. arXiv:1407.2710, 2014. [8] O. Dekel, R. Gilad-Bachrach, O. Shamir, and L. Xiao. Optimal distributed online prediction using minibatches. The Journal of Machine Learning Research, 13(1):165–202, 2012. [9] M. G¨urb¨uzbalaban, A. Ozdaglar, and P. Parrilo. A globally convergent incremental Newton method. Mathematical Programming, 151(1):283–313, 2015. [10] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS 26, pages 315–323. 2013. [11] J. Koneˇcn´y, J. Liu, P. Richt´arik, and M. Tak´aˇc. Mini-Batch Semi-Stochastic Gradient Descent in the Proximal Setting. arXiv:1504.04407, 2015. [12] J. Koneˇcn´y and P. Richt´arik. Semi-Stochastic Gradient Descent Methods. arXiv:1312.1666, 2013. [13] M. Li, D. G. Andersen, A. J. Smola, and K. Yu. Communication Efficient Distributed Machine Learning with the Parameter Server. In NIPS 27, pages 19–27, 2014. [14] J. Liu, S. Wright, C. R´e, V. Bittorf, and S. Sridhar. An asynchronous parallel stochastic coordinate descent algorithm. In ICML 2014, pages 469–477, 2014. [15] J. Liu and S. J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM Journal on Optimization, 25(1):351–376, 2015. [16] J. Mairal. Optimization with first-order surrogate functions. arXiv:1305.3120, 2013. [17] A. Nedi´c, D. P. Bertsekas, and V. S. Borkar. Distributed asynchronous incremental subgradient methods. Studies in Computational Mathematics, 8:381–407, 2001. [18] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [19] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [20] A. Nitanda. Stochastic Proximal Gradient Descent with Acceleration Techniques. In NIPS 27, pages 1574–1582, 2014. [21] B. Recht, C. Re, S. Wright, and F. Niu. Hogwild!: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. In NIPS 24, pages 693–701, 2011. [22] S. Reddi, A. Hefny, C. Downey, A. Dubey, and S. Sra. Large-scale randomized-coordinate descent methods with non-separable linear constraints. In UAI 31, 2015. [23] 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-2):1–38, 2014. [24] H. Robbins and S. Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22:400–407, 1951. [25] M. W. Schmidt, N. L. Roux, and F. R. Bach. Minimizing Finite Sums with the Stochastic Average Gradient. arXiv:1309.2388, 2013. [26] S. Shalev-Shwartz and T. Zhang. Accelerated mini-batch stochastic dual coordinate ascent. In NIPS 26, pages 378–385, 2013. [27] 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. [28] O. Shamir and N. Srebro. On distributed stochastic optimization and learning. In Proceedings of the 52nd Annual Allerton Conference on Communication, Control, and Computing, 2014. [29] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 24(4):2057–2075, 2014. [30] M. Zinkevich, M. Weimer, L. Li, and A. J. Smola. Parallelized stochastic gradient descent. In NIPS, pages 2595–2603, 2010. 9 | 2015 | 321 |
5,838 | Galileo: Perceiving Physical Object Properties by Integrating a Physics Engine with Deep Learning Jiajun Wu∗ EECS, MIT jiajunwu@mit.edu Ilker Yildirim∗ BCS MIT, The Rockefeller University ilkery@mit.edu Joseph J. Lim EECS, MIT lim@csail.mit.edu William T. Freeman EECS, MIT billf@mit.edu Joshua B. Tenenbaum BCS, MIT jbt@mit.edu Abstract Humans demonstrate remarkable abilities to predict physical events in dynamic scenes, and to infer the physical properties of objects from static images. We propose a generative model for solving these problems of physical scene understanding from real-world videos and images. At the core of our generative model is a 3D physics engine, operating on an object-based representation of physical properties, including mass, position, 3D shape, and friction. We can infer these latent properties using relatively brief runs of MCMC, which drive simulations in the physics engine to fit key features of visual observations. We further explore directly mapping visual inputs to physical properties, inverting a part of the generative process using deep learning. We name our model Galileo, and evaluate it on a video dataset with simple yet physically rich scenarios. Results show that Galileo is able to infer the physical properties of objects and predict the outcome of a variety of physical events, with an accuracy comparable to human subjects. Our study points towards an account of human vision with generative physical knowledge at its core, and various recognition models as helpers leading to efficient inference. 1 Introduction Our visual system is designed to perceive a physical world that is full of dynamic content. Consider yourself watching a Rube Goldberg machine unfold: as the kinetic energy moves through the machine, you may see objects sliding down ramps, colliding with each other, rolling, entering other objects, falling — many kinds of physical interactions between objects of different masses, materials and other physical properties. How does our visual system recover so much content from the dynamic physical world? What is the role of experience in interpreting a novel dynamical scene? Recent behavioral and computational studies of human physical scene understanding push forward an account that people’s judgments are best explained as probabilistic simulations of a realistic, but mental, physics engine [2, 8]. Specifically, these studies suggest that the brain carries detailed but noisy knowledge of the physical attributes of objects and the laws of physical interactions between objects (i.e., Newtonian mechanics). To understand a physical scene, and more crucially, to predict the future dynamical evolution of a scene, the brain relies on simulations from this mental physics engine. Even though the probabilistic simulation account is very appealing, there are missing practical and conceptual leaps. First, as a practical matter, the probabilistic simulation approach is shown to work only with synthetically generated stimuli: either in 2D worlds, or in 3D worlds but each ∗Indicates equal contribution. The authors are listed in the alphabetical order. 1 object is constrained to be a block and the joint inference of the mass and friction coefficient is not handled [2]. Second, as a conceptual matter, previous research rarely clarifies how a mental physics engine could take advantage of previous experience of the agent [11]. It is the case that humans have a life long experience with dynamical scenes, and a fuller account of human physical scene understanding should address it. Here, we build on the idea that humans utilize a realistic physics engine as part of a generative model to interpret real-world physical scenes. We name our model Galileo. The first component of our generative model is the physical object representations, where each object is a rigid body and represented not only by its 3D geometric shape (or volume) and its position in space, but also by its mass and its friction. All of these object attributes are treated as latent variables in the model, and are approximated or estimated on the basis of the visual input. The second part is a fully-fledged realistic physics engine — in this paper, specifically the Bullet physics engine [4]. The physics engine takes a scene setup as input (e.g., specification of each of the physical objects in the scene, which constitutes a hypothesis in our generative model), and physically simulates it forward in time, generating simulated velocity profiles and positions for each object. The third part of Galileo is the likelihood function. We evaluate the observed real-world videos with respect to the model’s hypotheses using the velocity vectors of objects in the scene. We use a standard tracking algorithm to map the videos to the velocity space. Now, given a video as observation to the model, physical scene understanding in the model corresponds to inverting the generative model by probabilistic inference to recover the underlying physical object properties in the scene. Here, we build a video dataset to evaluate our model and humans on real-world data, which contains 150 videos of different objects with a range of materials and masses over a simple yet physically rich scenario: an object sliding down an inclined surface, and potentially collide with another object on the ground. Note that in the fields of computer vision and robotics, there have been studies on predicting physical interactions or inferring 3D properties of objects for various purposes including 3D reasoning [6, 13] and tracking [9]. However, none of them focused on learning physical properties directly, and nor they have incorporated a physics engine with representation learning. Based on the estimates we derived from visual input with a physics engine, a natural extension is to generate or synthesize training data for any automatic learning systems by bootstrapping from the videos already collected, and labeling them with estimates of Galileo. This is a self-supervised learning algorithm for inferring generic physical properties, and relates to the wake/sleep phases in Helmholtz machines [5], and to the cognitive development of infants. Extensive studies suggest that infants either are born with or can learn quickly physical knowledge about objects when they are very young, even before they acquire more advanced high-level knowledge like semantic categories of objects [3, 1]. Young babies are sensitive to physics of objects mainly from the motion of foreground objects from background [1]; in other words, they learn by watching videos of moving objects. But later in life, and clearly in adulthood, we can perceive physical attributes in just static scenes without any motion. Here, building upon the idea of Helmholtz machiness [5], our approach suggests one potential computational path to the development of the ability to perceive physical content in static scenes. Following the recent work [12], we train a recognition model (i.e., sleep cycle) that is in the form of a deep convolutional network, where the training data is generated in a self-supervised manner by the generative model itself (i.e., wake cycle: real-world videos observed by our model and the resulting physical inferences). Interestingly, this computational solution asserts that the infant starts with a relatively reliable mental physics engine, or acquires it soon after birth. Our work makes three contributions. First, we propose Galileo, a novel model for estimating physical properties of objects from visual inputs by incorporating the feedback of a physics engine in the loop. We demonstrate that it achieves encouraging performance on a real-world video dataset. Second, we train a deep learning based recognition model that leads to efficient inference in the generative model, and enables the generative model to predict future dynamical evolution of static scenes (e.g., how would that scene unfold in time). Third, we test our model and compare it to humans on a variety of physical judgment tasks. Our results indicate that humans are quite successful in these tasks, and our model closely matches humans in performance, but also consistently makes 2 IB A IA B GA NA RA NB GB GA NA RA NB GB GA NA NB GB (a) 1 Physical object i - Mass (m) - Friction coefficient (k) - 3D shape (S) - Position offset (x) Draw two physical objects 2 3D Physics engine ... Tracking algorithm Observed velocities Simulated velocities Likelihood function (b) Figure 1: (a) Snapshots of the dataset. (b) Overview of the model. Our model formalizes a hypothesis space of physical object representations, where each object is defined by its mass, friction coefficient, 3D shape, and a positional offset w.r.t. an origin. To model videos, we draw exactly two objects from that hypothesis space into the physics engine. The simulations from the physics engine are compared to observations in the velocity space, a much “nicer” space than pixels. similar errors as humans do, providing further evidence in favor of the probabilistic simulation account of human physical scene understanding. 2 Scenario We seek to learn physical properties of objects by observing videos. Among many scenarios, we consider an introductory setup: an object is put on an inclined surface; it may either slide down or keep static due to gravity and friction, and may hit another object if it slides down. This seemingly simple scenario is physically highly involved. The observed outcome of these scenario are physical values which help to describe the scenario, such as the velocity and moving distance of objects. Causally underlying these observations are the latent physical properties of objects such as the material, density, mass and friction coefficient. As shown in Section 3, our Galileo model intends to model the causal generative relationship between these observed and unobserved variables. We collect a real-world video dataset of about 100 objects sliding down a ramp, possibly hitting another object. Figure 1a provides some exemplar videos in the dataset. The results of collisions, including whether it will happen or not, are determined by multiple factors, such as material (density and friction coefficient), size and shape (volume), and slope of surface (gravity). Videos in our dataset vary in all these parameters. Specifically, there are 15 different materials — cardboard, dough, foam, hollow rubber, hollow wood, metal coin, metal pole, plastic block, plastic doll, plastic ring, plastic toy, porcelain, rubber, wooden block, and wooden pole. For each material, there are 4 to 12 objects of different sizes and shapes. The angle between the inclined surface and the ground is either 10o or 20o. When an object slides down, it may hit either a cardboard box, or a piece of foam, or neither. 3 3 Galileo: A Physical Object Model The gist of our model can be summarized as probabilistically inverting a physics engine in order to recover unobserved physical properties of objects. We collectively refer to the unobserved latent variables of an object as its physical representation T. For each object i, Ti consists of its mass mi, friction coefficient ki, 3D shape Vi, and position offset pi w.r.t. an origin in 3D space. We place uniform priors over the mass and the friction coefficient for each object: mi ∼ Uniform(0.001, 1) and ki ∼Uniform(0, 1), respectively. For 3D shape Vi, we have four variables: a shape type ti, and the scaling factors for three dimensions xi, yi, zi. We simplify the possible shape space in our model by constraining each shape type ti to be one of the three with equal probability: a box, a cylinder, and a torus. Note that applying scaling differently on each dimension to these three basic shapes results in a large space of shapes.1 The scaling factors are chosen to be uniform over the range of values to capture the extent of different shapes in the dataset. Remember that our scenario consists of an object on the ramp and another on the ground. The position offset, pi, for each object is uniform over the set {0, ±1, ±2, · · · , ±5}. This indicates that for the object on the ramp, its position can be perturbed along the ramp (i.e., in 2D) at most 5 units upwards or downwards from its starting position, which is 30 units upwards on the ramp from the ground. The next component of our generative model is a fully-fledged realistic physics engine that we denote as ρ. Specifically we use the Bullet physics engine [4] following the earlier related work. The physics engine takes a specification of each of the physical objects in the scene within the basic ramp setting as input, and simulates it forward in time, generating simulated velocity vectors for each object in the scene, vs1 and vs2 respectively – among other physical properties such as position, rendered image of each simulation step, etc. In light of initial qualitative analysis, we use velocity vectors as our feature representation in evaluating the hypothesis generated by the model against data. We employ a standard tracking algorithm (KLT point tracker [10]) to “lift” the visual observations to the velocity space. That is, for each video, we first run the tracking algorithm, and we obtain velocities by simply using the center locations of each of the tracked moving objects between frames. This gives us the velocity vectors for the object on the ramp and the object on the ground, vo1 and vo2, respectively. Given a pair of observed velocity vectors, vo1 and vo2, the recovery of the physical object representations T1 and T2 for the two objects via physics-based simulation can be formalized as: P(T1, T2|vo1, vo2, ρ(·)) ∝P(vo1, vo2|vs1, vs2) · P(vs1, vs2|T1, T2, ρ(·)) · P(T1, T2). (1) where we define the likelihood function as P(vo1, vo2|vs1, vs2) = N(vo|vs, Σ), where vo is the concatenated vector of vo1, vo2, and vs is the concatenated vector of vs1, vs2. The dimensionality of vo and vs are kept the same for a video by adjusting the number of simulation steps we use to obtain vo according to the length of the video. But from video to video, the length of these vectors may vary. In all of our simulations, we fix Σ to 0.05, which is the only free parameter in our model. 3.1 Tracking algorithm as a recognition model The posterior distribution in Equation 1 is intractable. In order to alleviate the burden of posterior inference, we use the output of our recognition model to predict and fix some of the latent variables in the model. Specifically, we determine the Vi, or {ti, xi, yi, zi}, using the output of the tracking algorithm, and fix these variables without further sampling them. Furthermore, we fix values of pis also on the basis of the output of the tracking algorithm. 1For shape type box, xi, yi, and zi could all be different values; for shape type torus, we constrained the scaling factors such that xi = zi; and for shape type cylinder, we constrained the scaling factors such that yi = zi. 4 Cardboard Dough Pole (a) (b) (c) (d) (e) (f) Figure 2: Simulation results. Each row represents one video in the data: (a) the first frame of the video, (b) the last frame of the video, (c) the first frame of the simulated scene generated by Bullet, (d) the last frame of the simulated scene, (e) the estimated object with larger mass, (f) the estimated object with larger friction coefficient. 3.2 Inference Once we initialize and fix the latent variables using the tracking algorithm as our recognition model, we then perform single-site Metropolis Hasting updates on the remaining four latent variables, m1, m2, k1 and k2. At each MCMC sweep, we propose a new value for one of these random variables, where the proposal distribution is Uniform(−0.05, 0.05). In order to help with mixing, we also use a broader proposal distribution, Uniform(−0.5, 0.5) at every 20 MCMC sweeps. 4 Simulations For each video, as mentioned earlier, we use the tracking algorithm to initialize and fix the shapes of the objects, S1 and S2, and the position offsets, p1 and p2. We also obtain the velocity vector for each object using the tracking algorithm. We determine the length of the physics engine simulation by the length of the observed video — that is, the simulation runs until it outputs a velocity vector for each object that is as long as the input velocity vector from the tracking algorithm. As mentioned earlier, we collect 150 videos, uniformly distributed across different object categories. We perform 16 MCMC simulations for a single video, each of which was 75 MCMC sweeps long. We report the results with the highest log-likelihood score across the 16 chains (i.e., the MAP estimate). In Figure 2, we illustrate the results for three individual videos. Every two frame of the top row shows the first and the last frame of a video, and the bottom row images show the corresponding frames from our model’s simulations with the MAP estimate. We quantify different aspects of our model in the following behavioral experiments, where we compare our model against human subjects’ judgments. Furthermore, we use the inferences made by our model here on the 150 videos to train a recognition model to arrive at physical object perception in static scenes with the model. Importantly, note that our model can generalize across a broad range of tasks beyond the ramp scenario. For example, once we infer the density of our object, we can make a buoyancy prediction about it by simulating a scenario in which we drop the object into a liquid. We test some of the generalizations in Section 6. 5 Bootstrapping to efficiently see physical objects in static scenes Based on the estimates we derived from the visual input with a physics engine, we bootstrap from the videos already collected, by labeling them with estimates of Galileo. This is a self-supervised learning algorithm for inferring generic physical properties. As discussed in Section 1, this formulation is also related to the wake/sleep phases in Helmholtz machines, and to the cognitive development of infants. 5 Methods Mass MSE Corr Oracle 0.042 0.71 Galileo 0.052 0.44 Uniform 0.081 0 Figure 3: Mean squared errors of oracle estimation, our estimation, and uniform estimations of mass on a log-normalized scale, and the correlations between estimations and ground truths -2e+05 -1e+05 0e+00 0 20 40 60 Number of MCMC sweeps Log Likelihood initialization with recognition model random initialization Figure 4: The log-likelihood traces of several chains with and without recognition-model (LeNet) based initializations. Here we focus on two physical properties: mass and friction coefficient. To do this, we first estimate these physical properties using the method described in earlier sections. Then, we train LeNet [7], a widely used deep neural network for small-scale datasets, using image patches cropped from videos based on the output of the tracker as data, and estimated physical properties as labels. The trained model can then be used to predict these physical properties of objects based on purely visual cues, even though they might have never appeared in the training set. We also measure masses of all objects in the dataset, which makes it possible for us to quantitatively evaluate the predictions of the deep network. We choose one object per material as our test cases, use all data of those objects as test data, and the others as training data. We compare our model with a baseline, which always outputs a uniform estimate calculated by averaging the masses of all objects in the test data, and with an oracle algorithm, which is a LeNet trained using the same training data, but has access to the ground truth masses of training objects as labels. Apparently, the performance of the oracle model can be viewed as an upper bound of our Galileo system. Table 3 compares the performance of Galileo, the oracle algorithm, and the baseline. We can observe that Galileo is much better than baseline, although there is still some space for improvement. Because we trained LeNet using static images to predict physical object properties such as friction and mass ratios, we can use it to recognize those attributes in a quick bottom-up pass at the very first frame of the video. To the extent that the trained LeNet is accurate, if we initialize the MCMC chains with these bottom-up predictions, we expect to see an overall boost in our log-likelihood traces. We test by running several chains with and without LeNet-based initializations. Results can be seen in Figure 4. Despite the fact that LeNet is not achieving perfect performance by itself, we indeed get a boost in speed and quality in the inference. 6 Experiments In this section, we conduct experiments from multiple perspectives to evaluate our model. Specifically, we use the model to predict how far objects will move after the collision; whether the object will remain stable in a different scene; and which of the two objects is heavier based on observations of collisions. For every experiment, we also conduct behavioral experiments on Amazon Mechanical Turk so that we may compare the performance of human and machine on these tasks. 6.1 Outcome Prediction In the outcome prediction experiment, our goal is to measure and compare how well human and machines can predict the moving distance of an object if only part of the video can be observed. 6 cardboard dough hollow wood metal coin metal pole plastic block plastic doll plastic toy porcelain wooden block wooden pole Mean 0 50 100 150 200 250 Error in pixels Human Galileo Uniform Figure 5: Mean errors in numbers of pixels of human predictions, Galileo outputs, and a uniform estimate calculated by averaging ground truth ending points over all test cases Figure 6: Heat maps of user predictions, Galileo outputs (orange crosses), and ground truths (white crosses). Specifically, for behavioral experiments on Amazon Mechanical Turk, we first provide users four full videos of objects made of a certain material, which contain complete collisions. In this way, users may infer the physical properties associated with that material in their mind. We select a different object, but made of the same material, show users a video of the object, but only to the moment of collision. We finally ask users to label where they believe the target object (either cardboard or foam) will be after the collision, i.e., how far the target will move. We tested 30 users per case. Given a partial video, for Galileo to generate predicted destinations, we first run it to fit the part of the video to derive our estimate of its friction coefficient. We then estimate its density by averaging the density values we derived from other objects with that material by observing collisions that they are involved. We further estimate the density (mass) and friction coefficient of the target object by averaging our estimates from other collisions. We now have all required information for the model to predict the ending point of the target after the collision. Note that the information available to Galileo is exactly the same as that available to humans. We compare three kinds of predictions: human feedback, Galileo output, and, as a baseline, a uniform estimate calculated by averaging ground truth ending points over all test cases. Figure 5 shows the Euclidean distance in pixels between each of them and the ground truth. We can see that human predictions are much better than the uniform estimate, but still far from perfect. Galileo performs similar to human in the average on this task. Figure 6 shows, for some test cases, heat maps of user predictions, Galileo outputs (orange crosses), and ground truths (white crosses). 6.2 Mass Prediction The second experiment is to predict which of two objects is heavier, after observing a video of a collision of them. For this task, we also randomly choose 50 objects, we test each of them on 50 users. For Galileo, we can directly obtain its guess based on the estimates of the masses of the objects. Figure 7 demonstrates that human and our model achieve about the same accuracy on this task. We also calculate correlations between different outputs. Here, as the relation is highly nonlinear, we 7 Mass "Will it move" 0 0.2 0.4 0.6 0.8 1 Human Galileo Figure 7: Average accuracy of human predictions and Galileo outputs on the tasks of mass prediction and “will it move” prediction. Error bars indicate standard deviations of human accuracies. Mass Spearman’s Coeff Human vs Galileo 0.51 Human vs Truth 0.68 Galileo vs Truth 0.52 “Will it move” Pearson’s Coeff Human vs Galileo 0.56 Human vs Truth 0.42 Galileo vs Truth 0.20 Table 1: Correlations between pairs of outputs in the mass prediction experiment (in Spearman’s coefficient) and in the “will it move” prediction experiment (in Pearson’s coefficient). calculate Spearman’s coefficients. From Table 1, we notice that human responses, machine outputs, and ground truths are all positively correlated. 6.3 “Will it move” prediction in a novel setup Our third experiment is to predict whether a certain object will move in a different scene, after observing one of its collisions. On Amazon Mechanical Turk, we show users a video containing a collision of two objects. In this video, the angle between the inclined surface and the ground is 20 degrees. We then show users the first frame of a 10-degree video of the same object, and ask them to predict whether the object will slide down the surface in this case. We randomly choose 50 objects for the experiment, and divide them into lists of 10 objects per user, and get each of the item tested on 50 users overall. For Galileo, it is straightforward to predict the stability of an object in the 10-degree case using estimates from the 20-degree video. Interestingly, both humans and the model are at chance on this task (Figure 7), and their responses are reasonably correlated (Table 1). Moreover, both subjects and the model show a bias towards saying “it will move.” Future controlled experimentation and simulations will investigate what underlies this correspondence. 7 Conclusion This paper accomplishes three goals: first, it shows that a generative vision system with physical object representations and a realistic 3D physics engine at its core can efficiently deal with real-world data when proper recognition models and feature spaces are used. Second, it shows that humans’ intuitions about physical outcomes are often accurate, and our model largely captures these intuitions — but crucially, humans and the model make similar errors. Lastly, the experience of the model, that is, the inferences it makes on the basis of dynamical visual scenes, can be used to train a deep learning model, which leads to more efficient inference and to the ability to see physical properties in the static images. Our study points towards an account of human vision with generative physical knowledge at its core, and various recognition models as helpers to induce efficient inference. Acknowledgements This work was supported by NSF Robust Intelligence 1212849 Reconstructive Recognition and the Center for Brains, Minds, and Machines (funded by NSF STC award CCF-1231216). 8 References [1] Ren´ee Baillargeon. Infants’ physical world. Current directions in psychological science, 13(3):89–94, 2004. [2] Peter W Battaglia, Jessica B Hamrick, and Joshua B Tenenbaum. Simulation as an engine of physical scene understanding. PNAS, 110(45):18327–18332, 2013. [3] Susan Carey. The origin of concepts. Oxford University Press, 2009. [4] Erwin Coumans. Bullet physics engine. Open Source Software: http://bulletphysics. org, 2010. [5] Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The helmholtz machine. Neural computation, 7(5):889–904, 1995. [6] Zhaoyin Jia, Andy Gallagher, Ashutosh Saxena, and Tsuhan Chen. 3d reasoning from blocks to stability. IEEE TPAMI, 2014. [7] Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [8] Adam N Sanborn, Vikash K Mansinghka, and Thomas L Griffiths. Reconciling intuitive physics and newtonian mechanics for colliding objects. Psychological review, 120(2):411, 2013. [9] John Schulman, Alex Lee, Jonathan Ho, and Pieter Abbeel. Tracking deformable objects with point clouds. In Robotics and Automation (ICRA), 2013 IEEE International Conference on, pages 1130–1137. IEEE, 2013. [10] Carlo Tomasi and Takeo Kanade. Detection and tracking of point features. International Journal of Computer Vision, 1991. [11] Tomer Ullman, Andreas Stuhlm¨uller, Noah Goodman, and Josh Tenenbaum. Learning physics from dynamical scenes. In CogSci, 2014. [12] Ilker Yildirim, Tejas D Kulkarni, Winrich A Freiwald, and Joshua B Tenenbaum. Efficient analysis-by-synthesis in vision: A computational framework, behavioral tests, and modeling neuronal representations. In Thirty-Seventh Annual Conference of the Cognitive Science Society, 2015. [13] Bo Zheng, Yibiao Zhao, Joey C Yu, Katsushi Ikeuchi, and Song-Chun Zhu. Detecting potential falling objects by inferring human action and natural disturbance. In ICRA, 2014. 9 | 2015 | 322 |
5,839 | Optimal Rates for Random Fourier Features Bharath K. Sriperumbudur∗ Department of Statistics Pennsylvania State University University Park, PA 16802, USA bks18@psu.edu Zolt´an Szab´o∗ Gatsby Unit, CSML, UCL Sainsbury Wellcome Centre, 25 Howland Street London - W1T 4JG, UK zoltan.szabo@gatsby.ucl.ac.uk Abstract Kernel methods represent one of the most powerful tools in machine learning to tackle problems expressed in terms of function values and derivatives due to their capability to represent and model complex relations. While these methods show good versatility, they are computationally intensive and have poor scalability to large data as they require operations on Gram matrices. In order to mitigate this serious computational limitation, recently randomized constructions have been proposed in the literature, which allow the application of fast linear algorithms. Random Fourier features (RFF) are among the most popular and widely applied constructions: they provide an easily computable, low-dimensional feature representation for shift-invariant kernels. Despite the popularity of RFFs, very little is understood theoretically about their approximation quality. In this paper, we provide a detailed finite-sample theoretical analysis about the approximation quality of RFFs by (i) establishing optimal (in terms of the RFF dimension, and growing set size) performance guarantees in uniform norm, and (ii) presenting guarantees in Lr (1 ≤r < ∞) norms. We also propose an RFF approximation to derivatives of a kernel with a theoretical study on its approximation quality. 1 Introduction Kernel methods [17] have enjoyed tremendous success in solving several fundamental problems of machine learning ranging from classification, regression, feature extraction, dependency estimation, causal discovery, Bayesian inference and hypothesis testing. Such a success owes to their capability to represent and model complex relations by mapping points into high (possibly infinite) dimensional feature spaces. At the heart of all these techniques is the kernel trick, which allows to implicitly compute inner products between these high dimensional feature maps, λ via a kernel function k: k(x, y) = ⟨λ(x), λ(y)⟩. However, this flexibility and richness of kernels has a price: by resorting to implicit computations these methods operate on the Gram matrix of the data, which raises serious computational challenges while dealing with large-scale data. In order to resolve this bottleneck, numerous solutions have been proposed, such as low-rank matrix approximations [25, 6, 1], explicit feature maps designed for additive kernels [23, 11], hashing [19, 9], and random Fourier features (RFF) [13] constructed for shift-invariant kernels, the focus of the current paper. RFFs implement an extremely simple, yet efficient idea: instead of relying on the implicit feature map λ associated with the kernel, by appealing to Bochner’s theorem [24]—any bounded, continuous, shift-invariant kernel is the Fourier transform of a probability measure—-[13] proposed an explicit low-dimensional random Fourier feature map φ obtained by empirically approximating the Fourier integral so that k(x, y) ≈⟨φ(x), φ(y)⟩. The advantage of this explicit low-dimensional feature representation is that the kernel machine can be efficiently solved in the primal form through fast linear solvers, thereby enabling to handle large-scale data. Through numerical experiments, it has also been demonstrated that kernel algorithms constructed using the approximate kernel do not ∗Contributed equally. 1 suffer from significant performance degradation [13]. Another advantage with the RFF approach is that unlike low rank matrix approximation approach [25, 6] which also speeds up kernel machines, it approximates the entire kernel function and not just the kernel matrix. This property is particularly useful while dealing with out-of-sample data and also in online learning applications. The RFF technique has found wide applicability in several areas such as fast function-to-function regression [12], differential privacy preserving [2] and causal discovery [10]. Despite the success of the RFF method, surprisingly, very little is known about its performance guarantees. To the best of our knowledge, the only paper in the machine learning literature providing certain theoretical insight into the accuracy of kernel approximation via RFF is [13, 22]:1 it shows that Am := sup{|k(x, y) −⟨φ(x), φ(y)⟩R2m| : x, y ∈S} = Op( p log(m)/m) for any compact set S ⊂Rd, where m is the number of random Fourier features. However, since the approximation proposed by the RFF method involves empirically approximating the Fourier integral, the RFF estimator can be thought of as an empirical characteristic function (ECF). In the probability literature, the systematic study of ECF-s was initiated by [7] and followed up by [5, 4, 27]. While [7] shows the almost sure (a.s.) convergence of Am to zero, [5, Theorems 1 and 2] and [27, Theorems 6.2 and 6.3] show that the optimal rate is m−1/2. In addition, [7] shows that almost sure convergence cannot be attained over the entire space (i.e., Rd) if the characteristic function decays to zero at infinity. Due to this, [5, 27] study the convergence behavior of Am when the diameter of S grows with m and show that almost sure convergence of Am is guaranteed as long as the diameter of S is eo(m). Unfortunately, all these results (to the best of our knowledge) are asymptotic in nature and the only known finite-sample guarantee by [13, 22] is non-optimal. In this paper (see Section 3), we present a finite-sample probabilistic bound for Am that holds for any m and provides the optimal rate of m−1/2 for any compact set S along with guaranteeing the almost sure convergence of Am as long as the diameter of S is eo(m). Since convergence in uniform norm might sometimes be a too strong requirement and may not be suitable to attain correct rates in the generalization bounds associated with learning algorithms involving RFF,2 we also study the behavior of k(x, y) −⟨φ(x), φ(y)⟩R2m in Lr-norm (1 ≤r < ∞) and obtain an optimal rate of m−1/2. The RFF approach to approximate a translation-invariant kernel can be seen as a special of the problem of approximating a function in the barycenter of a family (say F) of functions, which was considered in [14]. However, the approximation guarantees in [14, Theorem 3.2] do not directly apply to RFF as the assumptions on F are not satisfied by the cosine function, which is the family of functions that is used to approximate the kernel in the RFF approach. While a careful modification of the proof of [14, Theorem 3.2] could yield m−1/2 rate of approximation for any compact set S, this result would still be sub-optimal by providing a linear dependence on |S| similar to the theorems in [13, 22], in contrast to the optimal logarithmic dependence on |S| that is guaranteed by our results. Traditionally, kernel based algorithms involve computing the value of the kernel. Recently, kernel algorithms involving the derivatives of the kernel (i.e., the Gram matrix consists of derivatives of the kernel computed at training samples) have been used to address numerous machine learning tasks, e.g., semi-supervised or Hermite learning with gradient information [28, 18], nonlinear variable selection [15, 16], (multi-task) gradient learning [26] and fitting of distributions in an infinite-dimensional exponential family [20]. Given the importance of these derivative based kernel algorithms, similar to [13], in Section 4, we propose a finite dimensional random feature map approximation to kernel derivatives, which can be used to speed up the above mentioned derivative based kernel algorithms. We present a finite-sample bound that quantifies the quality of approximation in uniform and Lr-norms and show the rate of convergence to be m−1/2 in both these cases. A summary of our contributions are as follows. We 1. provide the first detailed finite-sample performance analysis of RFFs for approximating kernels and their derivatives. 2. prove uniform and Lr convergence on fixed compacts sets with optimal rate in terms of the RFF dimension (m); 3. give sufficient conditions for the growth rate of compact sets while preserving a.s. convergence uniformly and in Lr; specializing our result we match the best attainable asymptotic growth rate. 1[22] derived tighter constants compared to [13] and also considered different RFF implementations. 2For example, in applications like kernel ridge regression based on RFF, it is more appropriate to consider the approximation guarantee in L2 norm than in the uniform norm. 2 Various notations and definitions that are used throughout the paper are provided in Section 2 along with a brief review of RFF approximation proposed by [13]. The missing proofs of the results in Sections 3 and 4 are provided in the supplementary material. 2 Notations & preliminaries In this section, we introduce notations that are used throughout the paper and then present preliminaries on kernel approximation through random feature maps as introduced by [13]. Definitions & Notation: For a topological space X, C(X) (resp. Cb(X)) denotes the space of all continuous (resp. bounded continuous) functions on X. For f ∈Cb(X), ∥f∥X := supx∈X |f(x)| is the supremum norm of f. Mb(X) and M 1 +(X) is the set of all finite Borel and probability measures on X, respectively. For µ ∈Mb(X), Lr(X, µ) denotes the Banach space of r-power (r ≥1) µ-integrable functions. For X ⊆Rd, we will use Lr(X) for Lr(X, µ) if µ is a Lebesgue measure on X. For f ∈Lr(X, µ), ∥f∥Lr(X,µ) := R X |f|r dµ 1/r denotes the Lr-norm of f for 1 ≤r < ∞ and we write it as ∥·∥Lr(X) if X ⊆Rd and µ is the Lebesgue measure. For any f ∈L1(X, P) where P ∈M 1 +(X), we define Pf := R X f(x) dP(x) and Pmf := 1 m Pm i=1 f(Xi) where (Xi)m i=1 i.i.d. ∼P, Pm := 1 m Pm i=1 δXi is the empirical measure and δx is a Dirac measure supported on x ∈X. supp(P) denotes the support of P. Pm := ⊗m j=1P denotes the m-fold product measure. For v := (v1, . . . , vd) ∈Rd, ∥v∥2 := qPd i=1 v2 i . The diameter of A ⊆Y where (Y, ρ) is a metric space is defined as |A|ρ := sup{ρ(x, y) : x, y ∈Y}. If Y = Rd with ρ = ∥·∥2, we denote the diameter of A as |A|; |A| < ∞if A is compact. The volume of A ⊆Rd is defined as vol(A) = R A 1 dx. For A ⊆Rd, we define A∆:= A −A = {x −y : x, y ∈A}. conv(A) is the convex hull of A. For a function g defined on open set B ⊆Rd × Rd, ∂p,qg(x, y) := ∂|p|+|q|g(x,y) ∂xp1 1 ···∂x pd d ∂yq1 1 ···∂y qd d , (x, y) ∈B, where p, q ∈Nd are multi-indices, |p| = Pd j=1 pj and N := {0, 1, 2, . . .}. Define vp = Qd j=1 vpj j . For positive sequences (an)n∈N, (bn)n∈N, an = o(bn) if limn→∞ an bn = 0. Xn = Op(rn) (resp. Oa.s.(rn)) denotes that Xn rn is bounded in probability (resp. almost surely). Γ(t) = R ∞ 0 xt−1e−x dx is the Gamma function, Γ 1 2 = √π and Γ(t + 1) = tΓ(t). Random feature maps: Let k : Rd × Rd →R be a bounded, continuous, positive definite, translation-invariant kernel, i.e., there exists a positive definite function ψ : Rd →R such that k(x, y) = ψ(x −y), x, y ∈Rd where ψ ∈Cb(Rd). By Bochner’s theorem [24, Theorem 6.6], ψ can be represented as the Fourier transform of a finite non-negative Borel measure Λ on Rd, i.e., k(x, y) = ψ(x −y) = Z Rd e √−1ωT (x−y)dΛ(ω) (⋆) = Z Rd cos ωT (x −y) dΛ(ω), (1) where (⋆) follows from the fact that ψ is real-valued and symmetric. Since Λ(Rd) = ψ(0), k(x, y) = ψ(0) R e √−1ωT (x−y) dP(ω) where P := Λ ψ(0) ∈M 1 +(Rd). Therefore, w.l.o.g., we assume throughout the paper that ψ(0) = 1 and so Λ ∈M 1 +(Rd). Based on (1), [13] proposed an approximation to k by replacing Λ with its empirical measure, Λm constructed from (ωi)m i=1 i.i.d. ∼Λ so that resultant approximation can be written as the Euclidean inner product of finite dimensional random feature maps, i.e., ˆk(x, y) = 1 m m X i=1 cos ωT i (x −y) (∗) = ⟨φ(x), φ(y)⟩R2m , (2) where φ(x) = 1 √m(cos(ωT 1 x), . . . , cos(ωT mx), sin(ωT 1 x), . . . , sin(ωT mx)) and (∗) holds based on the basic trigonometric identity: cos(a−b) = cos a cos b+sin a sin b. This elegant approximation to k is particularly useful in speeding up kernel-based algorithms as the finite-dimensional random feature map φ can be used to solve these algorithms in the primal thereby offering better computational complexity (than by solving them in the dual) while at the same time not lacking in performance. Apart from these practical advantages, [13, Claim 1] (and similarly, [22, Prop. 1]) provides a theoretical guarantee that ∥ˆk −k∥S×S →0 as m →∞for any compact set S ⊂Rd. Formally, [13, Claim 3 1] showed that—note that (3) is slightly different but more precise than the one in the statement of Claim 1 in [13]—for any ǫ > 0, Λm n (ωi)m i=1 : ∥ˆk −k∥S×S ≥ǫ o ≤Cd |S|σǫ−1 2d d+2 e− mǫ2 4(d+2) , (3) where σ2 := R ∥ω∥2 dΛ(ω) and Cd := 2 6d+2 d+2 2 d d d+2 + d 2 2 d+2 ≤27d 2 d+2 when d ≥2. The condition σ2 < ∞implies that ψ (and therefore k) is twice differentiable. From (3) it is clear that the probability has polynomial tails if ǫ < |S|σ (i.e., small ǫ) and Gaussian tails if ǫ ≥|S|σ (i.e., large ǫ) and can be equivalently written as Λm n (ωi)m i=1 : ∥ˆk −k∥S×S ≥C d+2 2d d |S|σ p m−1 log m o ≤m α 4(d+2) (log m)− d d+2 , (4) where α := 4d −C d+2 d d |S|2σ2. For |S| sufficiently large (i.e., α < 0), it follows from (4) that ∥ˆk −k∥S×S = Op |S| p m−1 log m . (5) While (5) shows that ˆk is a consistent estimator of k in the topology of compact convergence (i.e., ˆk convergences to k uniformly over compact sets), the rate of convergence of p (log m)/m is not optimal. In addition, the order of dependence on |S| is not optimal. While a faster rate (in fact, an optimal rate) of convergence is desired—better rates in (5) can lead to better convergence rates for the excess error of the kernel machine constructed using ˆk—, the order of dependence on |S| is also important as it determines the the number of RFF features (i.e., m) that are needed to achieve a given approximation accuracy. In fact, the order of dependence on |S| controls the rate at which |S| can be grown as a function of m when m →∞(see Remark 1(ii) for a detailed discussion about the significance of growing |S|). In the following section, we present an analogue of (4)—see Theorem 1—that provides optimal rates and has correct dependence on |S|. 3 Main results: approximation of k As discussed in Sections 1 and 2, while the random feature map approximation of k introduced by [13] has many practical advantages, it does not seem to be theoretically well-understood. The existing theoretical results on the quality of approximation do not provide a complete picture owing to their non-optimality. In this section, we first present our main result (see Theorem 1) that improves upon (4) and provides a rate of m−1/2 with logarithm dependence on |S|. We then discuss the consequences of Theorem 1 along with its optimality in Remark 1. Next, in Corollary 2 and Theorem 3, we discuss the Lr-convergence (1 ≤r < ∞) of ˆk to k over compact subsets of Rd. Theorem 1. Suppose k(x, y) = ψ(x −y), x, y ∈Rd where ψ ∈Cb(Rd) is positive definite and σ2 := R ∥ω∥2 dΛ(ω) < ∞. Then for any τ > 0 and non-empty compact set S ⊂Rd, Λm ( (ωi)m i=1 : ∥ˆk −k∥S×S ≥h(d, |S|, σ) + √ 2τ √m )! ≤e−τ, where h(d, |S|, σ) := 32 p 2d log(2|S| + 1) + 32 p 2d log(σ + 1) + 16 p 2d[log(2|S| + 1)]−1. Proof (sketch). Note that ∥ˆk −k∥S×S = supx,y∈S |ˆk(x, y) −k(x, y)| = supg∈G |Λmg −Λg|, where G := {gx,y(ω) = cos(ωT (x −y)) : x, y ∈S}, which means the object of interest is the suprema of an empirical process indexed by G. Instead of bounding supg∈G |Λmg −Λg| by using Hoeffding’s inequality on a cover of G and then applying union bound as carried out in [13, 22], we use the refined technique of applying concentration via McDiarmid’s inequality, followed by symmetrization and bound the Rademacher average by Dudley entropy bound. The result is obtained by carefully bounding the L2(Λm)-covering number of G. The details are provided in Section B.1 of the supplementary material. Remark 1. (i) Theorem 1 shows that ˆk is a consistent estimator of k in the topology of compact convergence as m →∞with the rate of a.s. convergence being p m−1 log |S| (almost sure convergence is guaranteed by the first Borel-Cantelli lemma). In comparison to (4), it is clear that Theorem 1 4 provides improved rates with better constants and logarithmic dependence on |S| instead of a linear dependence. The logarithmic dependence on |S| ensures that we need m = O(ǫ−2 log |S|) random features instead of O(ǫ−2|S|2 log(|S|/ǫ)) random features, i.e., significantly fewer features to achieve the same approximation accuracy of ǫ. (ii) Growing diameter: While Theorem 1 provides almost sure convergence uniformly over compact sets, one might wonder whether it is possible to achieve uniform convergence over Rd. [7, Section 2] showed that such a result is possible if Λ is a discrete measure but not possible for Λ that is absolutely continuous w.r.t. the Lebesgue measure (i.e., if Λ has a density). Since uniform convergence of ˆk to k over Rd is not possible for many interesting k (e.g., Gaussian kernel), it is of interest to study the convergence on S whose diameter grows with m. Therefore, as mentioned in Section 2, the order of dependence of rates on |S| is critical. Suppose |Sm| →∞as m →∞ (we write |Sm| instead of |S| to show the explicit dependence on m). Then Theorem 1 shows that ˆk is a consistent estimator of k in the topology of compact convergence if m−1 log |Sm| →0 as m →∞(i.e., |Sm| = eo(m)) in contrast to the result in (4) which requires |Sm| = o( p m/ log m). In other words, Theorem 1 ensures consistency even when |Sm| grows exponentially in m whereas (4) ensures consistency only if |Sm| does not grow faster than p m/ log m. (iii) Optimality: Note that ψ is the characteristic function of Λ ∈M 1 +(Rd) since ψ is the Fourier transform of Λ (by Bochner’s theorem). Therefore, the object of interest ∥ˆk −k∥S×S = ∥ˆψ −ψ∥S∆, is the uniform norm of the difference between ψ and the empirical characteristic function ˆψ = 1 m Pm i=1 cos(⟨ωi, ·⟩), when both are restricted to a compact set S∆⊂Rd. The question of the convergence behavior of ∥ˆψ−ψ∥S∆is not new and has been studied in great detail in the probability and statistics literature (e.g., see [7, 27] for d = 1 and [4, 5] for d > 1) where the characteristic function is not just a real-valued symmetric function (like ψ) but is Hermitian. [27, Theorems 6.2 and 6.3] show that the optimal rate of convergence of ∥ˆψ −ψ∥S∆is m−1/2 when d = 1, which matches with our result in Theorem 1. Also Theorems 1 and 2 in [5] show that the logarithmic dependence on |Sm| is optimal asymptotically. In particular, [5, Theorem 1] matches with the growing diameter result in Remark 1(ii), while [5, Theorem 2] shows that if Λ is absolutely continuous w.r.t. the Lebesgue measure and if lim supm→∞m−1 log |Sm| > 0, then there exists a positive ε such that lim supm→∞Λm(∥ˆψ −ψ∥Sm,∆≥ε) > 0. This means the rate |Sm| = eo(m) is not only the best possible in general for almost sure convergence, but if faster sequence |Sm| is considered then even stochastic convergence cannot be retained for any characteristic function vanishing at infinity along at least one path. While these previous results match with that of Theorem 1 (and its consequences), we would like to highlight the fact that all these previous results are asymptotic in nature whereas Theorem 1 provides a finite-sample probabilistic inequality that holds for any m. We are not aware of any such finite-sample result except for the one in [13, 22]. ■ Using Theorem 1, one can obtain a probabilistic inequality for the Lr-norm of ˆk −k over any compact set S ⊂Rd, as given by the following result. Corollary 2. Suppose k satisfies the assumptions in Theorem 1. Then for any 1 ≤r < ∞, τ > 0 and non-empty compact set S ⊂Rd, Λm (ωi)m i=1 : ∥ˆk −k∥Lr(S) ≥ πd/2|S|d 2dΓ( d 2 + 1) !2/r h(d, |S|, σ) + √ 2τ √m ≤e−τ, where ∥ˆk −k∥Lr(S) := ∥ˆk −k∥Lr(S×S) = R S R S |ˆk(x, y) −k(x, y)|r dx dy 1 r . Proof. Note that ∥ˆk −k∥Lr(S) ≤∥ˆk −k∥S×Svol2/r(S). The result follows by combining Theorem 1 and the fact that vol(S) ≤vol(A) where A := n x ∈Rd : ∥x∥2 ≤|S| 2 o and vol(A) = πd/2|S|d 2dΓ( d 2 +1) (which follows from [8, Corollary 2.55]). Corollary 2 shows that ∥ˆk −k∥Lr(S) = Oa.s.(m−1/2|S|2d/rp log |S|) and therefore if |Sm| →∞as m →∞, then consistency of ˆk in Lr(Sm)-norm is achieved as long as m−1/2|Sm|2d/rp log |Sm| → 5 0 as m →∞. This means, in comparison to the uniform norm in Theorem 1 where |Sm| can grow exponential in mδ (δ < 1), |Sm| cannot grow faster than m r 4d (log m)−r 4d −θ (θ > 0) to achieve consistency in Lr-norm. Instead of using Theorem 1 to obtain a bound on ∥ˆk −k∥Lr(S) (this bound may be weak as ∥ˆk − k∥Lr(S) ≤∥ˆk −k∥S×Svol2/r(S) for any 1 ≤r < ∞), a better bound (for 2 ≤r < ∞) can be obtained by directly bounding ∥ˆk −k∥Lr(S), as shown in the following result. Theorem 3. Suppose k(x, y) = ψ(x −y), x, y ∈Rd where ψ ∈Cb(Rd) is positive definite. Then for any 1 < r < ∞, τ > 0 and non-empty compact set S ⊂Rd, Λm (ωi)m i=1 : ∥ˆk −k∥Lr(S) ≥ πd/2|S|d 2dΓ( d 2 + 1) !2/r C′ r m1−max{ 1 2 , 1 r } + √ 2τ √m ! ≤e−τ, where C′ r is the Khintchine constant given by C′ r = 1 for r ∈(1, 2] and C′ r = √ 2 Γ r+1 2 /√π 1 r for r ∈[2, ∞). Proof (sketch). As in Theorem 1, we show that ∥k −ˆk∥Lr(S) satisfies the bounded difference property, hence by the McDiarmid’s inequality, it concentrates around its expectation E∥k − ˆk∥Lr(S). By symmetrization, we then show that E∥k −ˆk∥Lr(S) is upper bounded in terms of Eε ∥Pm i=1 εi cos(⟨ωi, · −·⟩)∥Lr(S), where ε := (εi)m i=1 are Rademacher random variables. By exploiting the fact that Lr(S) is a Banach space of type min{r, 2}, the result follows. The details are provided in Section B.2 of the supplementary material. Remark 2. Theorem 3 shows an improved dependence on |S| without the extra p log |S| factor given in Corollary 2 and therefore provides a better rate for 2 ≤r < ∞when the diameter of S grows, i.e., ∥ˆk −k∥Lr(Sm) a.s. →0 if |Sm| = o(m r 4d ) as m →∞. However, for 1 < r < 2, Theorem 3 provides a slower rate than Corollary 2 and therefore it is appropriate to use the bound in Corollary 2. While one might wonder why we only considered the convergence of ∥ˆk −k∥Lr(S) and not ∥ˆk −k∥Lr(Rd), it is important to note that the latter is not well-defined because ˆk /∈Lr(Rd) even if k ∈Lr(Rd). ■ 4 Approximation of kernel derivatives In the previous section we focused on the approximation of the kernel function where we presented uniform and Lr convergence guarantees on compact sets for the random Fourier feature approximation, and discussed how fast the diameter of these sets can grow to preserve uniform and Lr convergence almost surely. In this section, we propose an approximation to derivatives of the kernel and analyze the uniform and Lr convergence behavior of the proposed approximation. As motivated in Section 1, the question of approximating the derivatives of the kernel through finite dimensional random feature map is also important as it enables to speed up several interesting machine learning tasks that involve the derivatives of the kernel [28, 18, 15, 16, 26, 20], see for example the recent infinite dimensional exponential family fitting technique [21], which implements this idea. To this end, we consider k as in (1) and define ha := cos( πa 2 + ·), a ∈N (in other words h0 = cos, h1 = −sin, h2 = −cos, h3 = sin and ha = ha mod 4). For p, q ∈Nd, assuming R |ωp+q| dΛ(ω) < ∞, it follows from the dominated convergence theorem that ∂p,qk(x, y) = Z Rd ωp(−ω)qh|p+q| ωT (x −y) dΛ(ω) = Z Rd ωp+q h|p|(ωT x)h|q|(ωT y) + h3+|p|(ωT x)h3+|q|(ωT y) dΛ(ω), so that ∂p,qk(x, y) can be approximated by replacing Λ with Λm, resulting in \ ∂p,qk(x, y) := sp,q(x, y) = 1 m m X j=1 ωp j (−ωj)qh|p+q| ωT j (x −y) = ⟨φp(x), φq(y)⟩R2m , (6) 6 where φp(u) := 1 √m ωp 1 h|p|(ωT 1 u), · · · , ωp mh|p|(ωT mu), ωp 1 h3+|p|(ωT 1 u), · · · , ωp mh3+|p|(ωT mu) and (ωj)m j=1 i.i.d. ∼ Λ. Now the goal is to understand the behavior of ∥sp,q −∂p,qk∥S×S and ∥sp,q −∂p,qk∥Lr(S) for r ∈[1, ∞), i.e., obtain analogues of Theorems 1 and 3. As in the proof sketch of Theorem 1, while ∥sp,q−∂p,qk∥S×S can be analyzed as the suprema of an empirical process indexed by a suitable function class (say G), some technical issues arise because G is not uniformly bounded. This means McDiarmid or Talagrand’s inequality cannot be applied to achieve concentration and bounding Rademacher average by Dudley entropy bound may not be reasonable. While these issues can be tackled by resorting to more technical and refined methods, in this paper, we generalize (see Theorem 4 which is proved in Section B.1 of the supplement) Theorem 1 to derivatives under the restrictive assumption that supp(Λ) is bounded (note that many popular kernels including the Gaussian do not satisfy this assumption). We also present another result (see Theorem 5) by generalizing the proof technique3 of [13] to unbounded functions where the boundedness assumption of supp(Λ) is relaxed but at the expense of a worse rate (compared to Theorem 4). Theorem 4. Let p, q ∈Nd, Tp,q := supω∈supp(Λ) |ωp+q|, Cp,q := Eω∼Λ h |ωp+q| ∥ω∥2 2 i , and assume that C2p,2q < ∞. Suppose supp(Λ) is bounded if p ̸= 0 and q ̸= 0. Then for any τ > 0 and non-empty compact set S ⊂Rd, Λm ( (ωi)m i=1 : ∥∂p,qk −sp,q∥S×S ≥H(d, p, q, |S|) + Tp,q √ 2τ √m )! ≤e−τ, where H(d, p, q, |S|) = 32 p 2d T2p,2q " p U(p, q, |S|) + 1 2 p U(p, q, |S|) + q log( p C2p,2q + 1) # , U(p, q, |S|) = log 2|S|T −1/2 2p,2q + 1 . Remark 3. (i) Note that Theorem 4 reduces to Theorem 1 if p = q = 0, in which case Tp,q = T2p,2q = 1. If p ̸= 0 or q ̸= 0, then the boundedness of supp(Λ) implies that Tp,q < ∞ and T2p,2q < ∞. (ii) Growth of |Sm|: By the same reasoning as in Remark 1(ii) and Corollary 2, it follows that ∥∂p,qk −sp,q∥Sm×Sm a.s. −→0 if |Sm| = eo(m) and ∥∂p,qk −sp,q∥Lr(Sm) a.s. −→0 if m−1/2|Sm|2d/rp log |Sm| →0 (for 1 ≤r < ∞) as m →∞. An exact analogue of Theorem 3 can be obtained (but with different constants) under the assumption that supp(Λ) is bounded and it can be shown that for r ∈[2, ∞), ∥∂p,qk −sp,q∥Lr(Sm) a.s. −→0 if |Sm| = o(m r 4d ). ■ The following result relaxes the boundedness of supp(Λ) by imposing certain moment conditions on Λ but at the expense of a worse rate. The proof relies on applying Bernstein inequality at the elements of a net (which exists by the compactness of S) combined with a union bound, and extending the approximation error from the anchors by a probabilistic Lipschitz argument. Theorem 5. Let p, q ∈Nd, ψ be continuously differentiable, z 7→∇z [∂p,qk(z)] be continuous, S ⊂Rd be any non-empty compact set, Dp,q,S := supz∈conv(S∆) ∥∇z [∂p,qk(z)]∥2 and Ep,q := Eω∼Λ [|ωp+q| ∥ω∥2]. Assume that Ep,q < ∞. Suppose ∃L > 0, σ > 0 such that Eω∼Λ |f(z; ω)|M ≤M! σ2LM−2 2 (∀M ≥2, ∀z ∈S∆), (7) 3We also correct some technical issues in the proof of [13, Claim 1], where (i) a shift-invariant argument was applied to the non-shift invariant kernel estimator ˆk(x, y) = 1 m Pm j=1 2 cos(ωT j x + bj) cos(ωT j y + bj) = 1 m Pm j=1 cos(ωT j (x −y)) + cos(ωT j (x + y) + 2bj) , (ii) the convexity of S was not imposed leading to possibly undefined Lipschitz constant (L) and (iii) the randomness of ∆∗= arg max∆∈S∆
∇[k(∆) − ˆk(∆)]
2 was not taken into account, thus the upper bound on the expectation of the squared Lipschitz constant (E[L2]) does not hold. 7 where f(z; ω) = ∂p,qk(z) −ωp(−ω)qh|p+q| ωT z . Define Fd := d− d d+1 + d 1 d+1 .4 Then Λm ({(ωi)m i=1 : ∥∂p,qk −sp,q∥S×S ≥ǫ}) ≤ ≤2d−1e − mǫ2 8σ2(1+ ǫL 2σ2 ) + Fd2 4d−1 d+1 |S|(Dp,q,S + Ep,q) ǫ d d+1 e − mǫ2 8(d+1)σ2(1+ ǫL 2σ2 ) . (8) Remark 4. (i) The compactness of S implies that of S∆. Hence, by the continuity of z 7→ ∇z [∂p,qk(z)], one gets Dp,q,S < ∞. (7) holds if |f(z; ω)| ≤L 2 and Eω∼Λ |f(z; ω)|2 ≤σ2 (∀z ∈S∆). If supp(Λ) is bounded, then the boundedness of f is guaranteed (see Section B.4 in the supplement). (ii) In the special case when p = q = 0, our requirement boils down to the continuously differentiability of ψ, E0,0 = Eω∼Λ ∥ω∥2 < ∞, and (7). (iii) Note that (8) is similar to (3) and therefore based on the discussion in Section 2, one has ∥∂p,qk −sp,q∥S×S = Oa.s.(|S| p m−1 log m). But the advantage with Theorem 5 over [13, Claim 1] and [22, Prop. 1] is that it can handle unbounded functions. In comparison to Theorem 4, we obtain worse rates and it will be of interest to improve the rates of Theorem 5 while handling unbounded functions. ■ 5 Discussion In this paper, we presented the first detailed theoretical analysis about the approximation quality of random Fourier features (RFF) that was proposed by [13] in the context of improving the computational complexity of kernel machines. While [13, 22] provided a probabilistic bound on the uniform approximation (over compact subsets of Rd) of a kernel by random features, the result is not optimal. We improved this result by providing a finite-sample bound with optimal rate of convergence and also analyzed the quality of approximation in Lr-norm (1 ≤r < ∞). We also proposed an RFF approximation for derivatives of a kernel and provided theoretical guarantees on the quality of approximation in uniform and Lr-norms over compact subsets of Rd. While all the results in this paper (and also in the literature) dealt with the approximation quality of RFF over only compact subsets of Rd, it is of interest to understand its behavior over entire Rd. However, as discussed in Remark 1(ii) and in the paragraph following Theorem 3, RFF cannot approximate the kernel uniformly or in Lr-norm over Rd. By truncating the Taylor series expansion of the exponential function, [3] proposed a non-random finite dimensional representation to approximate the Gaussian kernel which also enjoys the computational advantages of RFF. However, this representation also does not approximate the Gaussian kernel uniformly over Rd. Therefore, the question remains whether it is possible to approximate a kernel uniformly or in Lr-norm over Rd but still retaining the computational advantages associated with RFF. Acknowledgments Z. Szab´o wishes to thank the Gatsby Charitable Foundation for its generous support. References [1] A. E. Alaoui and M. Mahoney. Fast randomized kernel ridge regression with statistical guarantees. In NIPS, 2015. [2] K. Chaudhuri, C. Monteleoni, and A. D. Sarwate. Differentially private empirical risk minimization. Journal of Machine Learning Research, 12:1069–1109, 2011. [3] A. Cotter, J. Keshet, and N. Srebro. Explicit approximations of the Gaussian kernel. Technical report, 2011. http://arxiv.org/pdf/1109.4603.pdf. [4] S. Cs¨org˝o. Multivariate empirical characteristic functions. Zeitschrift f¨ur Wahrscheinlichkeitstheorie und Verwandte Gebiete, 55:203–229, 1981. [5] S. Cs¨org˝o and V. Totik. On how long interval is the empirical characteristic function uniformly consistent? Acta Scientiarum Mathematicarum, 45:141–149, 1983. 4Fd is monotonically decreasing in d, F1 = 2. 8 [6] P. Drineas and M. W. Mahoney. On the Nystr¨om method for approximating a Gram matrix for improved kernel-based learning. Journal of Machine Learning Research, 6:2153–2175, 2005. [7] A. Feuerverger and R. A. Mureika. The empirical characteristic function and its applications. Annals of Statistics, 5(1):88–98, 1977. [8] G. B. Folland. Real Analysis: Modern Techniques and Their Applications. Wiley-Interscience, 1999. [9] B. Kulis and K. Grauman. Kernelized locality-sensitive hashing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34:1092–1104, 2012. [10] D. Lopez-Paz, K. Muandet, B. Sch¨olkopf, and I. Tolstikhin. Towards a learning theory of cause-effect inference. JMLR W&CP – ICML, pages 1452–1461, 2015. [11] S. Maji, A. C. Berg, and J. Malik. Efficient classification for additive kernel SVMs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35:66–77, 2013. [12] J. Oliva, W. Neiswanger, B. P´oczos, E. Xing, and J. Schneider. Fast function to function regression. JMLR W&CP – AISTATS, pages 717–725, 2015. [13] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pages 1177–1184, 2007. [14] A. Rahimi and B. Recht. Uniform approximation of functions with random bases. In Allerton, pages 555–561, 2008. [15] L. Rosasco, M. Santoro, S. Mosci, A. Verri, and S. Villa. A regularization approach to nonlinear variable selection. JMLR W&CP – AISTATS, 9:653–660, 2010. [16] L. Rosasco, S. Villa, S. Mosci, M. Santoro, and A. Verri. Nonparametric sparsity and regularization. Journal of Machine Learning Research, 14:1665–1714, 2013. [17] B. Sch¨olkopf and A. J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, 2002. [18] L. Shi, X. Guo, and D.-X. Zhou. Hermite learning with gradient data. Journal of Computational and Applied Mathematics, 233:3046–3059, 2010. [19] Q. Shi, J. Petterson, G. Dror, J. Langford, A. Smola, A. Strehl, and V. Vishwanathan. Hash kernels. AISTATS, 5:496–503, 2009. [20] B. K. Sriperumbudur, K. Fukumizu, A. Gretton, A. Hyv¨arinen, and R. Kumar. Density estimation in infinite dimensional exponential families. Technical report, 2014. http://arxiv.org/pdf/1312.3516.pdf. [21] H. Strathmann, D. Sejdinovic, S. Livingstone, Z. Szab´o, and A. Gretton. Gradient-free Hamiltonian Monte Carlo with efficient kernel exponential families. In NIPS, 2015. [22] D. J. Sutherland and J. Schneider. On the error of random Fourier features. In UAI, pages 862–871, 2015. [23] A. Vedaldi and A. Zisserman. Efficient additive kernels via explicit feature maps. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34:480–492, 2012. [24] H. Wendland. Scattered Data Approximation. Cambridge University Press, 2005. [25] C. K. I. Williams and M. Seeger. Using the Nystr¨om method to speed up kernel machines. In NIPS, pages 682–688, 2001. [26] Y. Ying, Q. Wu, and C. Campbell. Learning the coordinate gradients. Advances in Computational Mathematics, 37:355–378, 2012. [27] J. E. Yukich. Some limit theorems for the empirical process indexed by functions. Probability Theory and Related Fields, 74:71–90, 1987. [28] D.-X. Zhou. Derivative reproducing properties for kernel methods in learning theory. Journal of Computational and Applied Mathematics, 220:456–463, 2008. 9 | 2015 | 323 |
5,840 | Deep learning with Elastic Averaging SGD Sixin Zhang Courant Institute, NYU zsx@cims.nyu.edu Anna Choromanska Courant Institute, NYU achoroma@cims.nyu.edu Yann LeCun Center for Data Science, NYU & Facebook AI Research yann@cims.nyu.edu Abstract We study the problem of stochastic optimization for deep learning in the parallel computing environment under communication constraints. A new algorithm is proposed in this setting where the communication and coordination of work among concurrent processes (local workers), is based on an elastic force which links the parameters they compute with a center variable stored by the parameter server (master). The algorithm enables the local workers to perform more exploration, i.e. the algorithm allows the local variables to fluctuate further from the center variable by reducing the amount of communication between local workers and the master. We empirically demonstrate that in the deep learning setting, due to the existence of many local optima, allowing more exploration can lead to the improved performance. We propose synchronous and asynchronous variants of the new algorithm. We provide the stability analysis of the asynchronous variant in the round-robin scheme and compare it with the more common parallelized method ADMM. We show that the stability of EASGD is guaranteed when a simple stability condition is satisfied, which is not the case for ADMM. We additionally propose the momentum-based version of our algorithm that can be applied in both synchronous and asynchronous settings. Asynchronous variant of the algorithm is applied to train convolutional neural networks for image classification on the CIFAR and ImageNet datasets. Experiments demonstrate that the new algorithm accelerates the training of deep architectures compared to DOWNPOUR and other common baseline approaches and furthermore is very communication efficient. 1 Introduction One of the most challenging problems in large-scale machine learning is how to parallelize the training of large models that use a form of stochastic gradient descent (SGD) [1]. There have been attempts to parallelize SGD-based training for large-scale deep learning models on large number of CPUs, including the Google’s Distbelief system [2]. But practical image recognition systems consist of large-scale convolutional neural networks trained on few GPU cards sitting in a single computer [3, 4]. The main challenge is to devise parallel SGD algorithms to train large-scale deep learning models that yield a significant speedup when run on multiple GPU cards. In this paper we introduce the Elastic Averaging SGD method (EASGD) and its variants. EASGD is motivated by quadratic penalty method [5], but is re-interpreted as a parallelized extension of the averaging SGD algorithm [6]. The basic idea is to let each worker maintain its own local parameter, and the communication and coordination of work among the local workers is based on an elastic force which links the parameters they compute with a center variable stored by the master. The center variable is updated as a moving average where the average is taken in time and also in space over the parameters computed by local workers. The main contribution of this paper is a new algorithm that provides fast convergent minimization while outperforming DOWNPOUR method [2] and other 1 baseline approaches in practice. Simultaneously it reduces the communication overhead between the master and the local workers while at the same time it maintains high-quality performance measured by the test error. The new algorithm applies to deep learning settings such as parallelized training of convolutional neural networks. The article is organized as follows. Section 2 explains the problem setting, Section 3 presents the synchronous EASGD algorithm and its asynchronous and momentum-based variants, Section 4 provides stability analysis of EASGD and ADMM in the round-robin scheme, Section 5 shows experimental results and Section 6 concludes. The Supplement contains additional material including additional theoretical analysis. 2 Problem setting Consider minimizing a function F(x) in a parallel computing environment [7] with p ∈N workers and a master. In this paper we focus on the stochastic optimization problem of the following form min x F(x) := E[f(x, ξ)], (1) where x is the model parameter to be estimated and ξ is a random variable that follows the probability distribution P over Ωsuch that F(x) = R Ωf(x, ξ)P(dξ). The optimization problem in Equation 1 can be reformulated as follows min x1,...,xp,˜x p X i=1 E[f(xi, ξi)] + ρ 2∥xi −˜x∥2, (2) where each ξi follows the same distribution P (thus we assume each worker can sample the entire dataset). In the paper we refer to xi’s as local variables and we refer to ˜x as a center variable. The problem of the equivalence of these two objectives is studied in the literature and is known as the augmentability or the global variable consensus problem [8, 9]. The quadratic penalty term ρ in Equation 2 is expected to ensure that local workers will not fall into different attractors that are far away from the center variable. This paper focuses on the problem of reducing the parameter communication overhead between the master and local workers [10, 2, 11, 12, 13]. The problem of data communication when the data is distributed among the workers [7, 14] is a more general problem and is not addressed in this work. We however emphasize that our problem setting is still highly non-trivial under the communication constraints due to the existence of many local optima [15]. 3 EASGD update rule The EASGD updates captured in resp. Equation 3 and 4 are obtained by taking the gradient descent step on the objective in Equation 2 with respect to resp. variable xi and ˜x, xi t+1 = xi t −η(gi t(xi t) + ρ(xi t −˜xt)) (3) ˜xt+1 = ˜xt + η p X i=1 ρ(xi t −˜xt), (4) where gi t(xi t) denotes the stochastic gradient of F with respect to xi evaluated at iteration t, xi t and ˜xt denote respectively the value of variables xi and ˜x at iteration t, and η is the learning rate. The update rule for the center variable ˜x takes the form of moving average where the average is taken over both space and time. Denote α = ηρ and β = pα, then Equation 3 and 4 become xi t+1 = xi t −ηgi t(xi t) −α(xi t −˜xt) (5) ˜xt+1 = (1 −β)˜xt + β 1 p p X i=1 xi t ! . (6) Note that choosing β = pα leads to an elastic symmetry in the update rule, i.e. there exists an symmetric force equal to α(xi t −˜xt) between the update of each xi and ˜x. It has a crucial influence on the algorithm’s stability as will be explained in Section 4. Also in order to minimize the staleness [16] of the difference xi t −˜xt between the center and the local variable, the update for the master in Equation 4 involves xi t instead of xi t+1. 2 Note also that α = ηρ, where the magnitude of ρ represents the amount of exploration we allow in the model. In particular, small ρ allows for more exploration as it allows xi’s to fluctuate further from the center ˜x. The distinctive idea of EASGD is to allow the local workers to perform more exploration (small ρ) and the master to perform exploitation. This approach differs from other settings explored in the literature [2, 17, 18, 19, 20, 21, 22, 23], and focus on how fast the center variable converges. In this paper we show the merits of our approach in the deep learning setting. 3.1 Asynchronous EASGD We discussed the synchronous update of EASGD algorithm in the previous section. In this section we propose its asynchronous variant. The local workers are still responsible for updating the local variables xi’s, whereas the master is updating the center variable ˜x. Each worker maintains its own clock ti, which starts from 0 and is incremented by 1 after each stochastic gradient update of xi as shown in Algorithm 1. The master performs an update whenever the local workers finished τ steps of their gradient updates, where we refer to τ as the communication period. As can be seen in Algorithm 1, whenever τ divides the local clock of the ith worker, the ith worker communicates with the master and requests the current value of the center variable ˜x. The worker then waits until the master sends back the requested parameter value, and computes the elastic difference α(x −˜x) (this entire procedure is captured in step a) in Algorithm 1). The elastic difference is then sent back to the master (step b) in Algorithm 1) who then updates ˜x. The communication period τ controls the frequency of the communication between every local worker and the master, and thus the trade-off between exploration and exploitation. Algorithm 1: Asynchronous EASGD: Processing by worker i and the master Input: learning rate η, moving rate α, communication period τ ∈N Initialize: ˜x is initialized randomly, xi = ˜x, ti = 0 Repeat x ←xi if (τ divides ti) then a) xi ←xi −α(x −˜x) b) ˜x ←˜x + α(x −˜x) end xi ←xi −ηgi ti(x) ti ←ti + 1 Until forever Algorithm 2: Asynchronous EAMSGD: Processing by worker i and the master Input: learning rate η, moving rate α, communication period τ ∈N, momentum term δ Initialize: ˜x is initialized randomly, xi = ˜x, vi = 0, ti = 0 Repeat x ←xi if (τ divides ti) then a) xi ←xi −α(x −˜x) b) ˜x ←˜x + α(x −˜x) end vi ←δvi −ηgi ti(x + δvi) xi ←xi + vi ti ←ti + 1 Until forever 3.2 Momentum EASGD The momentum EASGD (EAMSGD) is a variant of our Algorithm 1 and is captured in Algorithm 2. It is based on the Nesterov’s momentum scheme [24, 25, 26], where the update of the local worker of the form captured in Equation 3 is replaced by the following update vi t+1 = δvi t −ηgi t(xi t + δvi t) (7) xi t+1 = xi t + vi t+1 −ηρ(xi t −˜xt), where δ is the momentum term. Note that when δ = 0 we recover the original EASGD algorithm. As we are interested in reducing the communication overhead in the parallel computing environment where the parameter vector is very large, we will be exploring in the experimental section the asynchronous EASGD algorithm and its momentum-based variant in the relatively large τ regime (less frequent communication). 4 Stability analysis of EASGD and ADMM in the round-robin scheme In this section we study the stability of the asynchronous EASGD and ADMM methods in the roundrobin scheme [20]. We first state the updates of both algorithms in this setting, and then we study 3 their stability. We will show that in the one-dimensional quadratic case, ADMM algorithm can exhibit chaotic behavior, leading to exponential divergence. The analytic condition for the ADMM algorithm to be stable is still unknown, while for the EASGD algorithm it is very simple1. The analysis of the synchronous EASGD algorithm, including its convergence rate, and its averaging property, in the quadratic and strongly convex case, is deferred to the Supplement. In our setting, the ADMM method [9, 27, 28] involves solving the following minimax problem2, max λ1,...,λp min x1,...,xp,˜x p X i=1 F(xi) −λi(xi −˜x) + ρ 2∥xi −˜x∥2, (8) where λi’s are the Lagrangian multipliers. The resulting updates of the ADMM algorithm in the round-robin scheme are given next. Let t ≥0 be a global clock. At each t, we linearize the function F(xi) with F(xi t) + ∇F(xi t), xi −xi t + 1 2η
xi −xi t
2 as in [28]. The updates become λi t+1 = λi t −(xi t −˜xt) if mod (t, p) = i −1; λi t if mod (t, p) ̸= i −1. (9) xi t+1 = ( xi t−η∇F (xi t)+ηρ(λi t+1+˜xt) 1+ηρ if mod (t, p) = i −1; xi t if mod (t, p) ̸= i −1. (10) ˜xt+1 = 1 p p X i=1 (xi t+1 −λi t+1). (11) Each local variable xi is periodically updated (with period p). First, the Lagrangian multiplier λi is updated with the dual ascent update as in Equation 9. It is followed by the gradient descent update of the local variable as given in Equation 10. Then the center variable ˜x is updated with the most recent values of all the local variables and Lagrangian multipliers as in Equation 11. Note that since the step size for the dual ascent update is chosen to be ρ by convention [9, 27, 28], we have re-parametrized the Lagrangian multiplier to be λi t ←λi t/ρ in the above updates. The EASGD algorithm in the round-robin scheme is defined similarly and is given below xi t+1 = xi t −η∇F(xi t) −α(xi t −˜xt) if mod (t, p) = i −1; xi t if mod (t, p) ̸= i −1. (12) ˜xt+1 = ˜xt + X i: mod (t,p)=i−1 α(xi t −˜xt). (13) At time t, only the i-th local worker (whose index i−1 equals t modulo p) is activated, and performs the update in Equations 12 which is followed by the master update given in Equation 13. We will now focus on the one-dimensional quadratic case without noise, i.e. F(x) = x2 2 , x ∈R. For the ADMM algorithm, let the state of the (dynamical) system at time t be st = (λ1 t, x1 t, . . . , λp t , xp t , ˜xt) ∈R2p+1. The local worker i’s updates in Equations 9, 10, and 11 are composed of three linear maps which can be written as st+1 = (F i 3 ◦F i 2 ◦F i 1)(st). For simplicity, we will only write them out below for the case when i = 1 and p = 2: F 1 1= 1 −1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 , F 1 2= 1 0 0 0 0 ηρ 1+ηρ 1−η 1+ηρ 0 0 ηρ 1+ηρ 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 , F 1 3= 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 −1 p 1 p −1 p 1 p 0 . For each of the p linear maps, it’s possible to find a simple condition such that each map, where the ith map has the form F i 3 ◦F i 2 ◦F i 1, is stable (the absolute value of the eigenvalues of the map are 1This condition resembles the stability condition for the synchronous EASGD algorithm (Condition 17 for p = 1) in the analysis in the Supplement. 2The convergence analysis in [27] is based on the assumption that “At any master iteration, updates from the workers have the same probability of arriving at the master.”, which is not satisfied in the round-robin scheme. 4 smaller or equal to one). However, when these non-symmetric maps are composed one after another as follows F = F p 3 ◦F p 2 ◦F p 1 ◦. . .◦F 1 3 ◦F 1 2 ◦F 1 1 , the resulting map F can become unstable! (more precisely, some eigenvalues of the map can sit outside the unit circle in the complex plane). We now present the numerical conditions for which the ADMM algorithm becomes unstable in the round-robin scheme for p = 3 and p = 8, by computing the largest absolute eigenvalue of the map F. Figure 1 summarizes the obtained result. η (eta) ρ (rho) p=3 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 x 10 −3 0.991 0.992 0.993 0.994 0.995 0.996 0.997 0.998 0.999 1 1.001 η (eta) ρ (rho) p=8 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 x 10 −3 0.992 0.994 0.996 0.998 1 1.002 Figure 1: The largest absolute eigenvalue of the linear map F = F p 3 ◦F p 2 ◦F p 1 ◦. . . ◦F 1 3 ◦F 1 2 ◦F 1 1 as a function of η ∈(0, 10−2) and ρ ∈(0, 10) when p = 3 and p = 8. To simulate the chaotic behavior of the ADMM algorithm, one may pick η = 0.001 and ρ = 2.5 and initialize the state s0 either randomly or with λi 0 = 0, xi 0 = ˜x0 = 1000, ∀i. Figure should be read in color. On the other hand, the EASGD algorithm involves composing only symmetric linear maps due to the elasticity. Let the state of the (dynamical) system at time t be st = (x1 t, . . . , xp t , ˜xt) ∈Rp+1. The activated local worker i’s update in Equation 12 and the master update in Equation 13 can be written as st+1 = F i(st). In case of p = 2, the map F 1 and F 2 are defined as follows F 1= 1 −η −α 0 α 0 1 0 α 0 1 −α ! , F 2= 1 0 0 0 1 −η −α α 0 α 1 −α ! For the composite map F p ◦. . . ◦F 1 to be stable, the condition that needs to be satisfied is actually the same for each i, and is furthermore independent of p (since each linear map F i is symmetric). It essentially involves the stability of the 2 × 2 matrix 1 −η −α α α 1 −α , whose two (real) eigenvalues λ satisfy (1 −η −α −λ)(1 −α −λ) = α2. The resulting stability condition (|λ| ≤1) is simple and given as 0 ≤η ≤2, 0 ≤α ≤4−2η 4−η . 5 Experiments In this section we compare the performance of EASGD and EAMSGD with the parallel method DOWNPOUR and the sequential method SGD, as well as their averaging and momentum variants. All the parallel comparator methods are listed below3: • DOWNPOUR [2], the pseudo-code of the implementation of DOWNPOUR used in this paper is enclosed in the Supplement. • Momentum DOWNPOUR (MDOWNPOUR), where the Nesterov’s momentum scheme is applied to the master’s update (note it is unclear how to apply it to the local workers or for the case when τ > 1). The pseudo-code is in the Supplement. • A method that we call ADOWNPOUR, where we compute the average over time of the center variable ˜x as follows: zt+1 = (1 −αt+1)zt + αt+1˜xt, and αt+1 = 1 t+1 is a moving rate, and z0 = ˜x0. t denotes the master clock, which is initialized to 0 and incremented every time the center variable ˜x is updated. • A method that we call MVADOWNPOUR, where we compute the moving average of the center variable ˜x as follows: zt+1 = (1 −α)zt + α˜xt, and the moving rate α was chosen to be constant, and z0 = ˜x0. t denotes the master clock and is defined in the same way as for the ADOWNPOUR method. 3We have compared asynchronous ADMM [27] with EASGD in our setting as well, the performance is nearly the same. However, ADMM’s momentum variant is not as stable for large communication periods. 5 All the sequential comparator methods (p = 1) are listed below: • SGD [1] with constant learning rate η. • Momentum SGD (MSGD) [26] with constant momentum δ. • ASGD [6] with moving rate αt+1 = 1 t+1. • MVASGD [6] with moving rate α set to a constant. We perform experiments in a deep learning setting on two benchmark datasets: CIFAR-10 (we refer to it as CIFAR) 4 and ImageNet ILSVRC 2013 (we refer to it as ImageNet) 5. We focus on the image classification task with deep convolutional neural networks. We next explain the experimental setup. The details of the data preprocessing and prefetching are deferred to the Supplement. 5.1 Experimental setup For all our experiments we use a GPU-cluster interconnected with InfiniBand. Each node has 4 Titan GPU processors where each local worker corresponds to one GPU processor. The center variable of the master is stored and updated on the centralized parameter server [2]6. To describe the architecture of the convolutional neural network, we will first introduce a notation. Let (c, y) denotes the size of the input image to each layer, where c is the number of color channels and y is both the horizontal and the vertical dimension of the input. Let C denotes the fully-connected convolutional operator and let P denotes the max pooling operator, D denotes the linear operator with dropout rate equal to 0.5 and S denotes the linear operator with softmax output non-linearity. We use the cross-entropy loss and all inner layers use rectified linear units. For the ImageNet experiment we use the similar approach to [4] with the following 11-layer convolutional neural network (3,221)C(96,108)P(96,36)C(256,32)P(256,16)C(384,14) C(384,13)C(256,12)P(256,6)D(4096,1)D(4096,1)S(1000,1). For the CIFAR experiment we use the similar approach to [29] with the following 7-layer convolutional neural network (3,28)C(64,24)P(64,12)C(128,8)P(128,4)C(64,2)D(256,1)S(10,1). In our experiments all the methods we run use the same initial parameter chosen randomly, except that we set all the biases to zero for CIFAR case and to 0.1 for ImageNet case. This parameter is used to initialize the master and all the local workers7. We add l2-regularization λ 2 ∥x∥2 to the loss function F(x). For ImageNet we use λ = 10−5 and for CIFAR we use λ = 10−4. We also compute the stochastic gradient using mini-batches of sample size 128. 5.2 Experimental results For all experiments in this section we use EASGD with β = 0.98 , for all momentum-based methods we set the momentum term δ = 0.99 and finally for MVADOWNPOUR we set the moving rate to α = 0.001. We start with the experiment on CIFAR dataset with p = 4 local workers running on a single computing node. For all the methods, we examined the communication periods from the following set τ = {1, 4, 16, 64}. For comparison we also report the performance of MSGD which outperformed SGD, ASGD and MVASGD as shown in Figure 6 in the Supplement. For each method we examined a wide range of learning rates (the learning rates explored in all experiments are summarized in Table 1, 2, 3 in the Supplement). The CIFAR experiment was run 3 times independently from the same initialization and for each method we report its best performance measured by the smallest achievable test error. From the results in Figure 2, we conclude that all DOWNPOURbased methods achieve their best performance (test error) for small τ (τ ∈{1, 4}), and become highly unstable for τ ∈{16, 64}. While EAMSGD significantly outperforms comparator methods for all values of τ by having faster convergence. It also finds better-quality solution measured by the test error and this advantage becomes more significant for τ ∈{16, 64}. Note that the tendency to achieve better test performance with larger τ is also characteristic for the EASGD algorithm. 4Downloaded from http://www.cs.toronto.edu/˜kriz/cifar.html. 5Downloaded from http://image-net.org/challenges/LSVRC/2013. 6Our implementation is available at https://github.com/sixin-zh/mpiT. 7On the contrary, initializing the local workers and the master with different random seeds ’traps’ the algorithm in the symmetry breaking phase. 8Intuitively the ’effective β’ is β/τ = pα = pηρ (thus ρ = β τpη ) in the asynchronous setting. 6 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) τ=1 MSGD DOWNPOUR ADOWNPOUR MVADOWNPOUR MDOWNPOUR EASGD EAMSGD 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) τ=1 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) τ=1 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) τ=4 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) τ=4 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) τ=4 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) τ=16 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) τ=16 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) τ=16 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) τ=64 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) τ=64 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) τ=64 Figure 2: Training and test loss and the test error for the center variable versus a wallclock time for different communication periods τ on CIFAR dataset with the 7-layer convolutional neural network. We next explore different number of local workers p from the set p = {4, 8, 16} for the CIFAR experiment, and p = {4, 8} for the ImageNet experiment9. For the ImageNet experiment we report the results of one run with the best setting we have found. EASGD and EAMSGD were run with τ = 10 whereas DOWNPOUR and MDOWNPOUR were run with τ = 1. The results are in Figure 3 and 4. For the CIFAR experiment, it’s noticeable that the lowest achievable test error by either EASGD or EAMSGD decreases with larger p. This can potentially be explained by the fact that larger p allows for more exploration of the parameter space. In the Supplement, we discuss further the trade-off between exploration and exploitation as a function of the learning rate (section 9.5) and the communication period (section 9.6). Finally, the results obtained for the ImageNet experiment also shows the advantage of EAMSGD over the competitor methods. 6 Conclusion In this paper we describe a new algorithm called EASGD and its variants for training deep neural networks in the stochastic setting when the computations are parallelized over multiple GPUs. Experiments demonstrate that this new algorithm quickly achieves improvement in test error compared to more common baseline approaches such as DOWNPOUR and its variants. We show that our approach is very stable and plausible under communication constraints. We provide the stability analysis of the asynchronous EASGD in the round-robin scheme, and show the theoretical advantage of the method over ADMM. The different behavior of the EASGD algorithm from its momentumbased variant EAMSGD is intriguing and will be studied in future works. 9For the ImageNet experiment, the training loss is measured on a subset of the training data of size 50,000. 7 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) p=4 MSGD DOWNPOUR MDOWNPOUR EASGD EAMSGD 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) p=4 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) p=4 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) p=8 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) p=8 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) p=8 50 100 150 0.5 1 1.5 2 wallclock time (min) training loss (nll) p=16 50 100 150 1 1.5 2 wallclock time (min) test loss (nll) p=16 50 100 150 16 18 20 22 24 26 28 wallclock time (min) test error (%) p=16 Figure 3: Training and test loss and the test error for the center variable versus a wallclock time for different number of local workers p for parallel methods (MSGD uses p = 1) on CIFAR with the 7-layer convolutional neural network. EAMSGD achieves significant accelerations compared to other methods, e.g. the relative speed-up for p = 16 (the best comparator method is then MSGD) to achieve the test error 21% equals 11.1. 0 50 100 150 1 2 3 4 5 6 wallclock time (hour) training loss (nll) p=4 MSGD DOWNPOUR EASGD EAMSGD 0 50 100 150 2 3 4 5 6 wallclock time (hour) test loss (nll) p=4 0 50 100 150 42 44 46 48 50 52 54 wallclock time (hour) test error (%) p=4 0 50 100 150 1 2 3 4 5 6 wallclock time (hour) training loss (nll) p=8 0 50 100 150 2 3 4 5 6 wallclock time (hour) test loss (nll) p=8 0 50 100 150 42 44 46 48 50 52 54 wallclock time (hour) test error (%) p=8 Figure 4: Training and test loss and the test error for the center variable versus a wallclock time for different number of local workers p (MSGD uses p = 1) on ImageNet with the 11-layer convolutional neural network. Initial learning rate is decreased twice, by a factor of 5 and then 2, when we observe that the online predictive loss [30] stagnates. EAMSGD achieves significant accelerations compared to other methods, e.g. the relative speed-up for p = 8 (the best comparator method is then DOWNPOUR) to achieve the test error 49% equals 1.8, and simultaneously it reduces the communication overhead (DOWNPOUR uses communication period τ = 1 and EAMSGD uses τ = 10). Acknowledgments The authors thank R. Power, J. Li for implementation guidance, J. Bruna, O. Henaff, C. Farabet, A. Szlam, Y. Bakhtin for helpful discussion, P. L. Combettes, S. Bengio and the referees for valuable feedback. 8 References [1] Bottou, L. Online algorithms and stochastic approximations. In Online Learning and Neural Networks. Cambridge University Press, 1998. [2] Dean, J, Corrado, G, Monga, R, Chen, K, Devin, M, Le, Q, Mao, M, Ranzato, M, Senior, A, Tucker, P, Yang, K, and Ng, A. Large scale distributed deep networks. In NIPS. 2012. [3] Krizhevsky, A, Sutskever, I, and Hinton, G. E. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pages 1106–1114, 2012. [4] Sermanet, P, Eigen, D, Zhang, X, Mathieu, M, Fergus, R, and LeCun, Y. OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks. ArXiv, 2013. [5] Nocedal, J and Wright, S. Numerical Optimization, Second Edition. Springer New York, 2006. [6] Polyak, B. T and Juditsky, A. B. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. [7] Bertsekas, D. P and Tsitsiklis, J. N. Parallel and Distributed Computation. Prentice Hall, 1989. [8] Hestenes, M. R. Optimization theory: the finite dimensional case. Wiley, 1975. [9] Boyd, S, Parikh, N, Chu, E, Peleato, B, and Eckstein, J. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. Learn., 3(1):1–122, 2011. [10] Shamir, O. Fundamental limits of online and distributed algorithms for statistical learning and estimation. In NIPS. 2014. [11] Yadan, O, Adams, K, Taigman, Y, and Ranzato, M. Multi-gpu training of convnets. In Arxiv. 2013. [12] Paine, T, Jin, H, Yang, J, Lin, Z, and Huang, T. Gpu asynchronous stochastic gradient descent to speed up neural network training. In Arxiv. 2013. [13] Seide, F, Fu, H, Droppo, J, Li, G, and Yu, D. 1-bit stochastic gradient descent and application to dataparallel distributed training of speech dnns. In Interspeech 2014, September 2014. [14] Bekkerman, R, Bilenko, M, and Langford, J. Scaling up machine learning: Parallel and distributed approaches. Camridge Universityy Press, 2011. [15] Choromanska, A, Henaff, M. B, Mathieu, M, Arous, G. B, and LeCun, Y. The loss surfaces of multilayer networks. In AISTATS, 2015. [16] Ho, Q, Cipar, J, Cui, H, Lee, S, Kim, J. K, Gibbons, P. B, Gibson, G. A, Ganger, G, and Xing, E. P. More effective distributed ml via a stale synchronous parallel parameter server. In NIPS. 2013. [17] Azadi, S and Sra, S. Towards an optimal stochastic alternating direction method of multipliers. In ICML, 2014. [18] Borkar, V. Asynchronous stochastic approximations. SIAM Journal on Control and Optimization, 36(3):840–851, 1998. [19] Nedi´c, A, Bertsekas, D, and Borkar, V. Distributed asynchronous incremental subgradient methods. In Inherently Parallel Algorithms in Feasibility and Optimization and their Applications, volume 8 of Studies in Computational Mathematics, pages 381 – 407. 2001. [20] Langford, J, Smola, A, and Zinkevich, M. Slow learners are fast. In NIPS, 2009. [21] Agarwal, A and Duchi, J. Distributed delayed stochastic optimization. In NIPS. 2011. [22] Recht, B, Re, C, Wright, S. J, and Niu, F. Hogwild: A Lock-Free Approach to Parallelizing Stochastic Gradient Descent. In NIPS, 2011. [23] Zinkevich, M, Weimer, M, Smola, A, and Li, L. Parallelized stochastic gradient descent. In NIPS, 2010. [24] Nesterov, Y. Smooth minimization of non-smooth functions. Math. Program., 103(1):127–152, 2005. [25] Lan, G. An optimal method for stochastic composite optimization. Mathematical Programming, 133(12):365–397, 2012. [26] Sutskever, I, Martens, J, Dahl, G, and Hinton, G. On the importance of initialization and momentum in deep learning. In ICML, 2013. [27] Zhang, R and Kwok, J. Asynchronous distributed admm for consensus optimization. In ICML, 2014. [28] Ouyang, H, He, N, Tran, L, and Gray, A. Stochastic alternating direction method of multipliers. In Proceedings of the 30th International Conference on Machine Learning, pages 80–88, 2013. [29] Wan, L, Zeiler, M. D, Zhang, S, LeCun, Y, and Fergus, R. Regularization of neural networks using dropconnect. In ICML, 2013. [30] Cesa-Bianchi, N, Conconi, A, and Gentile, C. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, 2004. [31] Nesterov, Y. Introductory lectures on convex optimization, volume 87. Springer Science & Business Media, 2004. 9 | 2015 | 324 |
5,841 | Online F-Measure Optimization R´obert Busa-Fekete Department of Computer Science University of Paderborn, Germany busarobi@upb.de Bal´azs Sz¨or´enyi Technion, Haifa, Israel / MTA-SZTE Research Group on Artificial Intelligence, Hungary szorenyibalazs@gmail.com Krzysztof Dembczy´nski Institute of Computing Science Pozna´n University of Technology, Poland kdembczynski@cs.put.poznan.pl Eyke H¨ullermeier Department of Computer Science University of Paderborn, Germany eyke@upb.de Abstract The F-measure is an important and commonly used performance metric for binary prediction tasks. By combining precision and recall into a single score, it avoids disadvantages of simple metrics like the error rate, especially in cases of imbalanced class distributions. The problem of optimizing the F-measure, that is, of developing learning algorithms that perform optimally in the sense of this measure, has recently been tackled by several authors. In this paper, we study the problem of F-measure maximization in the setting of online learning. We propose an efficient online algorithm and provide a formal analysis of its convergence properties. Moreover, first experimental results are presented, showing that our method performs well in practice. 1 Introduction Being rooted in information retrieval [16], the so-called F-measure is nowadays routinely used as a performance metric in various prediction tasks. Given predictions by = (by1, . . . , byt) 2 {0, 1}t of t binary labels y = (y1, . . . , yt), the F-measure is defined as F(y, by) = 2 Pt i=1 yibyi Pt i=1 yi + Pt i=1 byi = 2 · precision(y, by) · recall(y, by) precision(y, by) + recall(y, by) 2 [0, 1] , (1) where precision(y, by) = Pt i=1 yibyi/Pt i=1 byi, recall(y, by) = Pt i=1 yibyi/Pt i=1 yi, and where 0/0 = 1 by definition. Compared to measures like the error rate in binary classification, maximizing the F-measure enforces a better balance between performance on the minority and majority class; therefore, it is more suitable in the case of imbalanced data. Optimizing for such an imbalanced measure is very important in many real-world applications where positive labels are significantly less frequent than negative ones. It can also be generalized to a weighted harmonic average of precision and recall. Yet, for the sake of simplicity, we stick to the unweighted mean, which is often referred to as the F1-score or the F1-measure. Given the importance and usefulness of the F-measure, it is natural to look for learning algorithms that perform optimally in the sense of this measure. However, optimizing the F-measure is a quite challenging problem, especially because the measure is not decomposable over the binary predictions. This problem has received increasing attention in recent years and has been tackled by several authors [19, 20, 18, 10, 11]. However, most of this work has been done in the standard setting of batch learning. 1 In this paper, we study the problem of F-measure optimization in the setting of online learning [4, 2], which is becoming increasingly popular in machine learning. In fact, there are many applications in which training data is arriving progressively over time, and models need to be updated and maintained incrementally. In our setting, this means that in each round t the learner first outputs a prediction byt and then observes the true label yt. Formally, the protocol in round t is as follows: 1. first an instance xt 2 X is observed by the learner, 2. then the predicted label byt for xt is computed on the basis of the first t instances (x1, . . . , xt), the t−1 labels (y1, . . . , yt−1) observed so far, and the corresponding predictions (by1, . . . , byt−1), 3. finally, the label yt is revealed to the learner. The goal of the learner is then to maximize F(t) = F((y1, . . . , yt), (by1, . . . , byt)) (2) over time. Optimizing the F-measure in an online fashion is challenging mainly because of the non-decomposability of the measure, and the fact that the byt cannot be changed after round t. As a potential application of online F-measure optimization consider the recommendation of news from RSS feeds or tweets [1]. Besides, it is worth mentioning that online methods are also relevant in the context of big data and large-scale learning, where the volume of data, despite being finite, prevents from processing each data point more than once [21, 7]. Treating the data as a stream, online algorithms can then be used as single-pass algorithms. Note, however, that single-pass algorithms are evaluated only at the end of the training process, unlike online algorithms that are supposed to learn and predict simultaneously. We propose an online algorithm for F-measure optimization, which is not only very efficient but also easy to implement. Unlike other methods, our algorithm does not require extra validation data for tuning a threshold (that separates between positive and negative predictions), and therefore allows the entire data to be used for training. We provide a formal analysis of the convergence properties of our algorithm and prove its statistical consistency under different assumptions on the learning process. Moreover, first experimental results are presented, showing that our method performs well in practice. 2 Formal Setting In this paper, we consider a stochastic setting in which (x1, y1), . . . , (xt, yt) are assumed to be i.i.d. samples from some unknown distribution ⇢(·) on X ⇥Y, where Y = {0, 1} is the label space and X is some instance space. We denote the marginal distribution of the feature vector X by µ(·).1 Then, the posterior probability of the positive class, i.e., the conditional probability that Y = 1 given X = x, is ⌘(x) = P(Y = 1 | X = x) = ⇢(x,1) ⇢(x,0)+⇢(x,1). The prior distribution of class 1 can be written as ⇡1 = P(Y = 1) = R x2X ⌘(x) dµ(x). Let B = {f : X −! {0, 1}} be the set of all binary classifiers over the set X. The F-measure of a binary classifier f 2 B is calculated as F(f) = 2 R X ⌘(x)f(x) dµ(x) R X ⌘(x) dµ(x) + R X f(x) dµ(x) = 2E [⌘(X)f(X)] E [⌘(X)] + E [f(X)]. According to [19], the expected value of (1) converges to F(f) with t ! 1 when f is used to calculate by, i.e., byt = f(xt). Thus, limt!1 E ⇥ F % (y1, . . . , yt), (f(x1), . . . , f(xt)) &⇤ = F(f). Now, let G = {g : X −! [0, 1]} denote the set of all probabilistic binary classifiers over the set X, and let T ✓B denote the set of binary classifiers that are obtained by thresholding a classifier g 2 G—that is, classifiers of the form g⌧(x) = Jg(x) ≥⌧K (3) for some threshold ⌧2 [0, 1], where J·K is the indicator function that evaluates to 1 if its argument is true and 0 otherwise. 1X is assumed to exhibit the required measurability properties. 2 According to [19], the optimal F-score computed as maxf2B F(f) can be achieved by a thresholded classifier. More precisely, let us define the thresholded F-measure as F(⌧) = F(⌘⌧) = 2 R X ⌘(x) J⌘(x) ≥⌧K dµ(x) R X ⌘(x) dµ(x) + R X J⌘(x) ≥⌧K dµ(x) = 2E [⌘(X) J⌘(X) ≥⌧K] E [⌘(X)] + E [J⌘(X) ≥⌧K] (4) Then the optimal threshold ⌧⇤can be obtained as ⌧⇤= argmax 0⌧1 F(⌧) . (5) Clearly, for the classifier in the form of (3) with g(x) = ⌘(x) and ⌧= ⌧⇤, we have F(g⌧) = F(⌧⇤). Then, as shown by [19] (see their Theorem 4), the performance of any binary classifier f 2 B cannot exceed F(⌧⇤), i.e., F(f) F(⌧⇤) for all f 2 B. Therefore, estimating posteriors first and adjusting a threshold afterward appears to be a reasonable strategy. In practice, this seems to be the most popular way of maximizing the F-measure in a batch mode; we call it the 2-stage F-measure maximization approach, or 2S for short. More specifically, the 2S approach consists of two steps: first, a classifier is trained for estimating the posteriors, and second, a threshold is tuned on the posterior estimates. For the time being, we are not interested in the training of this classifier but focus on the second step, that is, the labelling of instances via thresholding posterior probabilities. For doing this, suppose a finite set DN = {(xi, yi)}N i=1 of labeled instances are given as training information. Moreover, suppose estimates bpi = g(xi) of the posterior probabilities pi = ⌘(xi) are provided by a classifier g 2 G. Next, one might define the F-score obtained by applying the threshold classifier g⌧on the data DN as follows: F(⌧; g, DN) = PN i=1 yi J⌧g(xi)K PN i=1 yi + PN i=1 J⌧g(xi)K (6) In order to find an optimal threshold ⌧N 2 argmax0⌧1 F(⌧; g, DN), it suffices to search the finite set {bp1, . . . , bpN}, which requires time O(N log N). In [19], it is shown that F(⌧; g, DN) P −! F(g⌧) as N ! 1 for any ⌧2 (0, 1), and [11] provides an even stronger result: If a classifier gDN is induced from DN by an L1-consistent learner,2 and a threshold ⌧N is obtained by maximizing (6) on an independent set D0 N, then F(g⌧N DN ) P −! F(⌧⇤) as N −! 1 (under mild assumptions on the data distribution). 3 Maximizing the F-Measure on a Population Level In this section we assume that the data distribution is known. According to the analysis in the previous section, optimizing the F-measure boils down to finding the optimal threshold ⌧⇤. At this point, an observation is in order. Remark 1. In general, the function F(⌧) is neither convex nor concave. For example, when X is finite, then the denominator and enumerator of (4) are step functions, whence so is F(⌧). Therefore, gradient methods cannot be applied for finding ⌧⇤. Nevertheless, ⌧⇤can be found based on a recent result of [20], who show that finding the root of h(⌧) = Z x2X max (0, ⌘(x) −⌧) dµ(x) −⌧⇡1 (7) is a necessary and sufficient condition for optimality. Note that h(⌧) is continuous and strictly decreasing, with h(0) = ⇡1 and h(1) = −⇡1. Therefore, h(⌧) = 0 has a unique solution which is ⌧⇤. Moreover, [20] also prove an interesting relationship between the optimal threshold and the F-measure induced by that threshold: F(⌧⇤) = 2⌧⇤. The marginal distribution of the feature vectors, µ(·), induces a distribution ⇣(·) on the posteriors: ⇣(p) = R x2X J⌘(x) = pK dµ(x) for all p 2 [0, 1]. By definition, J⌘(x) = pK is the Radon-Nikodym derivative of dµ d⇣, and ⇣(p) the density of observing an instance x for which the probability of the 2A learning algorithm, viewed as a map from samples DN to classifiers gDN , is called L1-consistent w.r.t. the data distribution ⇢if limN!1 PDN ⇠⇢ ⇣R x2X |gDN (x) −⌘(x)| dµ(x) > ✏ ⌘ = 0 for all ✏> 0. 3 positive label is p. We shall write concisely d⌫(p) = ⇣(p) dp. Since ⌫(·) is an induced probability measure, the measurable transformation allows us to rewrite the notions introduced above in terms of ⌫(·) instead of µ(·)—see, for example, Section 1.4 in [17]. For example, the prior probability R X ⌘(x) dµ can be written equivalently as R 1 0 p d⌫(p). Likewise, (7) can be rewritten as follows: h(⌧) = Z 1 0 max (0, p −⌧) d⌫(p) −⌧ Z 1 0 p d⌫(p) = Z 1 ⌧ p −⌧d⌫(p) −⌧ Z 1 0 p d⌫(p) = Z 1 ⌧ p d⌫(p) −⌧ Z 1 ⌧ 1 d⌫(p) − Z 1 0 p d⌫(p) * (8) Equation (8) will play a central role in our analysis. Note that precise knowledge of ⌫(·) suffices to find the maxima of F(⌧). This is illustrated by two examples presented in Appendix E, in which we assume specific distributions for ⌫(·), namely uniform and Beta distributions. 4 Algorithmic Solution In this section, we provide an algorithmic solution to the online F-measure maximization problem. For this, we shall need in each round t some classifier gt 2 G that provides us with some estimate bpt = gt(xt) of the probability ⌘(xt). We would like to stress again that the focus of our analysis is on optimal thresholding instead of classifier learning. Thus, we assume the sequence of classifiers g1, g2, . . . to be produced by an external online learner, for example, logistic regression trained by stochastic gradient descent. As an aside, we note that F-measure maximization is not directly comparable with the task that is most often considered and analyzed in online learning, namely regret minimization [4]. This is mainly because the F-measure is a non-decomposable performance metric. In fact, the cumulative regret is a summation of a per-round regret rt, which only depends on the prediction byt and the true outcome yt [11]. In the case of the F-measure, the score F(t), and therefore the optimal prediction byt, depends on the entire history, that is, all observations and decisions made by the learner till time t. This is discussed in more detail in Section 6. The most naive way of forecasting labels is to implement online learning as repeated batch learning, that is, to apply a batch learner (such as 2S) to Dt = {(xi, yi)}t i=1 in each time step t. Obviously, however, this strategy is prohibitively expensive, as it requires storage of all data points seen so far (at least in mini-batches), as well as optimization of the threshold ⌧t and re-computation of the classifier gt on an ever growing number of examples. In the following, we propose a more principled technique to maximize the online F-measure. Our approach is based on the observation that h(⌧⇤) = 0 and h(⌧)(⌧−⌧⇤) < 0 for any ⌧2 [0, 1] such that ⌧6= ⌧⇤[20]. Moreover, it is a monotone decreasing continuous function. Therefore, finding the optimal threshold ⌧⇤can be viewed as a root finding problem. In practice, however, h(⌧) is not known and can only be estimated. Let us define h % ⌧, y, by & = yby−⌧(y + by) . For now, assume ⌘(x) to be known and write concisely bh(⌧) = h(⌧, y, J⌘(x) ≥⌧K). We can compute the expectation of bh(⌧) with respect to the data distribution for a fixed threshold ⌧as follows: E h bh(⌧) i = E [h(⌧, y, J⌘(x) ≥⌧K)] = E [y J⌘(x) ≥⌧K −⌧(y + J⌘(x) ≥⌧K)] = Z 1 0 p Jp ≥⌧K d⌫(p) −⌧ ✓Z 1 0 p + Jp ≥⌧K d⌫(p) ◆ = Z 1 ⌧ p d⌫(p) −⌧ Z 1 0 p d⌫(p) + Z 1 ⌧ 1 d⌫(p) * = h(⌧) (9) Thus, an unbiased estimate of h(⌧) can be obtained by evaluating bh(⌧) for an instance x. This suggests designing a stochastic approximation algorithm that is able to find the root of h(·) similarly to the Robbins-Monro algorithm [12]. Exploiting the relationship between the optimal F-measure and the optimal threshold, F(⌧⇤) = 2⌧⇤, we define the threshold in time step t as ⌧t = 1 2F(t) = at bt where at = t X i=1 yibyi, bt = t X i=1 yi + t X i=1 byi . (10) 4 With this threshold, the first differences between thresholds, i.e. ⌧t+1 −⌧t, can be written as follows. Proposition 2. If thresholds ⌧t are defined according to (10) and byt+1 as J⌘(xt+1) > ⌧tK, then (⌧t+1 −⌧t)bt+1 = h(⌧t, yt+1, byt+1) . (11) The proof of Prop. 2 is deferred to Appendix A. According to (11), the method we obtain “almost” coincides with the update rule of the Robbins-Monro algorithm. There are, however, some notable differences. In particular, the sequence of coefficients, namely the values 1/bt+1, does not consist of predefined real values converging to zero (as fast as 1/t). Instead, it consists of random quantities that depend on the history, namely the observed labels y1, . . . , yt and the predicted labels by1, . . . , byt. Moreover, these “coefficients” are not independent of h(⌧t, yt+1, byt+1) either. In spite of these additional difficulties, we shall present a convergence analysis of our algorithm in the next section. Algorithm 1 OFO 1: Select g0 from B, and set ⌧0 = 0 2: for t = 1 ! 1 do 3: Observe the instance xt 4: bpt gt−1(xt) . estimate posterior 5: byt Jbpt ≥⌧t−1K . current prediction 6: Observe label yt 7: Calculate F(t) = 2at bt and ⌧t = at bt 8: gt A(gt−1, xt, yt) . update the classifier 9: return ⌧T The pseudo-code of our online F-measure optimization algorithm, called Online F-measure Optimizer (OFO), is shown in Algorithm 1. The forecast rule can be written in the form of byt = Jpt ≥⌧t−1K for xt where the threshold is defined in (10) and pt = ⌘(xt). In practice, we use bpt = gt−1(xt) as an estimate of the true posterior pt. In line 8 of the code, an online learner A : G ⇥X ⇥Y −! G is assumed, which produces classifiers gt by incrementally updating the current classifier with the newly observed example, i.e., gt = A(gt−1, xt, yt). In our experimental study, we shall test and compare various state-of-the-art online learners as possible choices for A. 5 Consistency In this section, we provide an analysis of the online F-measure optimizer proposed in the previous section. More specifically, we show the statistical consistency of the OFO algorithm: The sequence of online thresholds and F-scores produced by this algorithm converge, respectively, to the optimal threshold ⌧⇤and the optimal thresholded F-score F(⌧⇤) in probability. As a first step, we prove this result under the assumption of knowledge about the true posterior probabilities; then, in a second step, we consider the case of estimated posteriors. Theorem 3. Assume the posterior probabilities pt = ⌘(xt) of the positive class to be known in each step of the online learning process. Then, the sequences of thresholds ⌧t and online F-scores F(t) produced by OFO both converge in probability to their optimal values ⌧⇤and F(⌧⇤), respectively: For any ✏> 0, we have limt!1 P % |⌧t −⌧⇤| > ✏ & = 0 and limt!1 P % |F(t) −F(⌧⇤)| > ✏ & = 0. Here is a sketch of the proof of this theorem, the details of which can be found in the supplementary material (Appendix B): • We focus on {⌧t}1 t=1, which is a stochastic process the filtration of which is defined as Ft = {y1, . . . , yt, by1, . . . , byt}. For this filtration, one can show that bh(⌧t) is Ft-measurable and E h bh(⌧t)|Ft i = h(⌧t) based on (9). • As a first step, we can decompose the update rule given in (11) as follows: E h 1 bt+1 bh(⌧t) 000Ft i = 1 bt+2h(⌧t) + O ⇣ 1 b2 t ⌘ conditioned on the filtration Ft (see Lemma 7). • Next, we show that the sequence 1/bt behaves similarly to 1/t, in the sense that P1 t=1 E ⇥ 1/b2 t ⇤ < 1 (see Lemma 8). Moreover, one can show that P1 t=1 E [1/bt] ≥P1 t=1 1 2t = 1. • Although h(⌧) is not differentiable on [0, 1] in general (it can be piecewise linear, for example), one can show that its finite difference is between −1 −⇡1 and −⇡1 (see Proposition 9 in the appendix). As a consequence of this result, our process defined in (11) does not get stuck even close to ⌧⇤. • The main part of the proof is devoted to analyzing the properties of the sequence of βt = E ⇥ (⌧t −⌧⇤)2⇤ for which we show that limt!1 βt = 0, which is sufficient for the statement 5 of the theorem. Our proof follows the convergence analysis of [12]. Nevertheless, our analysis essentially differs from theirs, since in our case, the coefficients cannot be chosen freely. Instead, as explained before, they depend on the labels observed and predicted so far. In addition, the noisy estimation of h(·) depends on the labels, too, but the decomposition step allows us to handle this undesired effect. Remark 4. In principle, the Robbins-Monro algorithm can be applied for finding the root of h(·) as well. This yields an update rule similar to (11), with 1/bt+1 replaced by C/t for a constant C > 0. In this case, however, the convergence of the online F-measure is difficult to analyze (if at all), because the empirical process cannot be written in a nice form. Moreover, as it has been found in the analysis, the coefficient C should be set ⇡1/⇡1 (see Proposition 9 and the choice of {kt} at the end of the proof of Theorem 3). Yet, since ⇡1 is not known beforehand, it needs to be estimated from the samples, which implies that the coefficients are not independent of the noisy evaluations of h(·)—just like in the case of the OFO algorithm. Interestingly, OFO seems to properly adjust the values 1/bt+1 in an adaptive manner (bt is a sum of two terms, the first of which is t⇡1 in expectation), which is a very nice property of the algorithm. Empirically, based on synthetic data, we found the performance of the original Robbins-Monro algorithm to be on par with OFO. As already announced, we are now going to relax the assumption of known posterior probabilities pt = ⌘(xt). Instead, estimates bpt = gt(xt) ⇡pt of these probabilities are obtained by classifiers gt that are provided by the external online learner in Algorithm 1. More concretely, assume an online learner A : G ⇥X ⇥Y −! G, where G is the set of probabilistic classifiers. Given a current model gt and a new example (xt, yt), this learner produces an updated classifier gt+1 = A(gt, xt, yt). Showing a consistency result for this scenario requires some assumptions on the online learner. With this formal definition of online learner, a statistical consistency result similar to Theorem 3 can be shown. The proof of the following theorem is again deferred to supplementary material (Appendix C). Theorem 5. Assume that the classifiers (gt)1 t=1 in the OFO framework are provided by an online learner for which the following holds: There is a λ > 0 such that E ⇥R x2X |⌘(x) −gt(x)| dµ(x) ⇤ = O(t−λ) . Then, F(t) P! F(⌧⇤) and ⌧t P! ⌧⇤. This theorem’s requirement on the online learner is stronger than what is assumed by [11] and recalled in Footnote 2. First, the learner is trained online and not in a batch mode. Second, we also require that the L1 error of the learner goes to 0 with a convergence rate of order t−λ. It might be interesting to note that a universal rate of convergence cannot be established without assuming regularity properties of the data distribution, such as smoothness via absolute continuity. Results of that kind are beyond the scope of this study. Instead, we refer the reader to [5, 6] for details on L1 consistency and its connection to the rate of convergence. 6 Discussion Regret optimization and stochastic approximation: Stochastic approximation algorithms can be applied for finding the optimum of (4) or, equivalently, to find the unique root of (8) based on noisy evaluations—the latter formulation is better suited for the classic version of the Robbins-Monro root finding algorithm [12]. These algorithms are iterative methods whose analysis focuses on the difference of F(⌧t) from F(⌧⇤), where ⌧t denotes the estimate of ⌧⇤in iteration t, whereas our online setting is concerned with the distance of F((y1, . . . , yt), (by1, . . . , byt)) from F(⌧⇤), where byi is the prediction for yi in round i. This difference is crucial because F(⌧t) only depends on ⌧t and in addition, if ⌧t is close to ⌧⇤then F(⌧t) is also close to F(⌧⇤) (see [19] for concentration properties), whereas in the online F-measure optimization setup, F((y1, . . . , yt), (by1, . . . , byt)) can be very different from F(⌧⇤) even if the current estimate ⌧t is close to ⌧⇤in case the number of previous incorrect predictions is large. In online learning and online optimization it is common to work with the notion of (cumulative) regret. In our case, this notion could be interpreted either as Pt i=1 |F((y1, . . . , yi), (by1, . . . , byi)) − F(⌧⇤)| or as Pt i=1 |yi −byi|. After division by t, the former becomes the average accuracy of the F-measure over time and the latter the accuracy of our predictions. The former is hard to interpret because |F((y1, . . . , yi), (by1, . . . , byi)) −F(⌧⇤)| itself is an aggregate measure of our performance 6 Table 1: Main statistics of the benchmark datasets and one pass F-scores obtained by OFO and 2S methods on various datasets. The bold numbers indicate when the difference is significant between the performance of OFO and 2S methods. The significance level is set to one sigma that is estimated based on the repetitions. Learner: LogReg Pegasos Perceptron Dataset #instances #pos #neg #features OFO 2S OFO 2S OFO 2S gisette 7000 3500 3500 5000 0.954 0.955 0.950 0.935 0.935 0.920 news20.bin 19996 9997 9999 1355191 0.879 0.876 0.879 0.883 0.908 0.930 Replab 45671 10797 34874 353754 0.924 0.923 0.926 0.928 0.914 0.914 WebspamUni 350000 212189 137811 254 0.912 0.918 0.914 0.910 0.927 0.912 epsilon 500000 249778 250222 2000 0.878 0.872 0.884 0.886 0.862 0.872 covtype 581012 297711 283301 54 0.761 0.762 0.754 0.760 0.732 0.719 url 2396130 792145 1603985 3231961 0.962 0.963 0.951 0.950 0.971 0.972 SUSY 5000000 2287827 2712173 18 0.762 0.762 0.754 0.745 0.710 0.720 kdda 8918054 7614730 1303324 20216830 0.927 0.926 0.921 0.926 0.913 0.927 kddb 20012498 17244034 2768464 29890095 0.934 0.934 0.930 0.929 0.923 0.928 over the first t rounds, which thus makes no sense to aggregate again. The latter, on the other hand, differs qualitatively from our ultimate goal; in fact, |F((y1, . . . , yt), (by1, . . . , byt)) −F(⌧⇤)| is the alternate measure that we are aiming to optimize for instead of the accuracy. Online optimization of non-decomposable measures: Online optimization of the F-measure can be seen as a special case of optimizing non-decomposable loss functions as recently considered by [9]. Their framework essentially differs from ours in several points. First, regarding the data generation process, the adversarial setup with oblivious adversary is assumed, unlike our current study where a stochastic setup is assumed. From this point of view, their assumption is more general since the oblivious adversary captures the stochastic setup. Second, the set of classifiers is restricted to differentiable parametric functions, which may not include the F-measure maximizer. Therefore, their proof of vanishing regret does in general not imply convergence to the optimal F-score. Seen from this point of view, their result is weaker than our proof of consistency (i.e., convergence to the optimal F-measure in probability if the posterior estimates originate from a consistent learner). There are some other non-decomposable performance measures which are intensively used in many practical applications. Their optimization had already been investigated in the online or one-pass setup. The most notable such measure might be the area under the ROC curve (AUC) which had been investigated in an online learning framework by [21, 7]. 7 Experiments In this section, the performance of the OFO algorithm is evaluated in a one-pass learning scenario on benchmark datasets, and compared with the performance of the 2-stage F-measure maximization approach (2S) described in Section 2. We also assess the rate of convergence of the OFO algorithm in a pure online learning setup.3 The online learner A in OFO was implemented in different ways, using Logistic Regression (LOGREG), the classical Perceptron algorithm (PERCEPTRON) [13] and an online linear SVM called PEGASOS [14]. In the case of LOGREG, we applied the algorithm introduced in [15] which handles L1 and L2 regularization. The hyperparameters of the methods and the validation procedures are described below and in more detail in Appendix D. If necessary, the raw outputs of the learners were turned into probability estimates, i.e., they were rescaled to [0, 1] using logistic transform. We used in the experiments nine datasets taken from the LibSVM repository of binary classification tasks.4 Many of these datasets are commonly used as benchmarks in information retrieval where the F-score is routinely applied for model selection. In addition, we also used the textual data released in the Replab challenge of identifying relevant tweets [1]. We generated the features used by the winner team [8]. The main statistics of the datasets are summarized in Table 1. 3Additional results of experiments conducted on synthetic data are presented in Appendix F. 4http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/binary.html 7 10 0 10 2 10 4 10 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 SUSY Num. of samples (Online) F−score One−pass+LogReg Online+LogReg One−pass+Pegasos Online+Pegasos One−pass+Perceptron Online+Peceptron 10 0 10 1 10 2 10 3 10 4 10 5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 WebspamUni Num. of samples (Online) F−score One−pass+LogReg Online+LogReg One−pass+Pegasos Online+Pegasos One−pass+Perceptron Online+Peceptron 10 0 10 2 10 4 10 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 kdda Num. of samples (Online) F−score One−pass+LogReg Online+LogReg One−pass+Pegasos Online+Pegasos One−pass+Perceptron Online+Peceptron 10 0 10 2 10 4 10 6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 url Num. of samples (Online) F−score One−pass+LogReg Online+LogReg One−pass+Pegasos Online+Pegasos One−pass+Perceptron Online+Peceptron Figure 1: Online F-scores obtained by OFO algorithm on various dataset. The dashed lines represent the one-pass performance of the OFO algorithm from Table 1 which we considered as baseline. One-pass learning. In one-pass learning, the learner is allowed to read the training data only once, whence online learners are commonly used in this setting. We run OFO along with the three classifiers trained on 80% of the data. The learner obtained by OFO is of the form g⌧t t , where t is the number of training samples. The rest 20% of the data was used to evaluate g⌧t t in terms of the F-measure. We run every method on 10 randomly shuffled versions of the data and averaged results. The means of the F-scores computed on the test data are shown in Table 1. As a baseline, we applied the 2S approach. More concretely, we trained the same set of learners on 60% of the data and validated the threshold on 20% by optimizing (6). Since both approaches are consistent, the performance of OFO should be on par with the performance of 2S. This is confirmed by the results, in which significant differences are observed in only 7 of 30 cases. These differences in performance might be explained by the finiteness of the data. The advantage of our approach over 2S is that there is no need of validation and the data needs to be read only once, therefore it can be applied in a pure one-pass learning scenario. The hyperparameters of the learning methods are chosen based on the performance of 2S. We tuned the hyperparameters in a wide range of values which we report in Appendix D. Online learning. The OFO algorithm has also been evaluated in the online learning scenario in terms of the online F-measure (2). The goal of this experiment is to assess the convergence rate of OFO. Since the optimal F-measure is not known for the datasets, we considered the test F-scores reported in Table 1. The results are plotted in Figure 1 for four benchmark datasets (the plots for the remaining datasets can be found in Appendix G). As can be seen, the online F-score converges to the test F-score obtained in one-pass evalaution in almost every case. There are some exceptions in the case of PEGASOS and PERCEPTRON. This might be explained by the fact that SVM-based methods as well as the PERCEPTRON tend to produce poor probability estimates in general (which is a main motivation for calibration methods turning output scores into valid probabilities [3]). 8 Conclusion and Future Work This paper studied the problem of online F-measure optimization. Compared to many conventional online learning tasks, this is a specifically challenging problem, mainly because of the nondecomposable nature of the F-measure. We presented a simple algorithm that converges to the optimal F-score when the posterior estimates are provided by a sequence of classifiers whose L1 error converges to zero as fast as t−λ for some λ > 0. As a key feature of our algorithm, we note that it is a purely online approach; moreover, unlike approaches such as 2S, there is no need for a hold-out validation set in batch mode. Our promising results from extensive experiments validate the empirical efficacy of our algorithm. For future work, we plan to extend our online optimization algorithm to a broader family of complex performance measures which can be expressed as ratios of linear combinations of true positive, false positive, false negative and true negative rates [10]; the F-measure also belongs to this family. Moreover, going beyond consistency, we plan to analyze the rate of convergence of our OFO algorithm. This might be doable thanks to several nice properties of the function h(⌧). Finally, an intriguing question is what can be said about the case when some bias is introduced because the classifier gt does not converge to ⌘. Acknowledgments. Krzysztof Dembczy´nski is supported by the Polish National Science Centre under grant no. 2013/09/D/ST6/03917. 8 References [1] E. Amig´o, J. C. de Albornoz, I. Chugur, A. Corujo, J. Gonzalo, T. Mart´ın-Wanton, E. Meij, M. de Rijke, and D. Spina. Overview of RepLab 2013: Evaluating online reputation monitoring systems. In CLEF, volume 8138, pages 333–352, 2013. [2] S. Bubeck and N. Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012. [3] R. Busa-Fekete, B. K´egl, T. ´Eltet˝o, and Gy. Szarvas. Tune and mix: Learning to rank using ensembles of calibrated multi-class classifiers. Machine Learning, 93(2–3):261–292, 2013. [4] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [5] L. Devroye and L. Gy¨orfi. Nonparametric Density Estimation: The L1 View. Wiley, NY, 1985. [6] L. Devroye, L. Gy¨orfi, and G. Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, NY, 1996. [7] W. Gao, R. Jin, S. Zhu, and Z.-H. Zhou. One-pass AUC optimization. In ICML, volume 30:3, pages 906–914, 2013. [8] V. Hangya and R. Farkas. Filtering and polarity detection for reputation management on tweets. In Working Notes of CLEF 2013 Evaluation Labs and Workshop, 2013. [9] P. Kar, H. Narasimhan, and P. Jain. Online and stochastic gradient methods for nondecomposable loss functions. In NIPS, 2014. [10] N. Nagarajan, S. Koyejo, R. Ravikumar, and I. Dhillon. Consistent binary classification with generalized performance metrics. In NIPS, pages 2744–2752, 2014. [11] H. Narasimhan, R. Vaish, and Agarwal S. On the statistical consistency of plug-in classifiers for non-decomposable performance measures. In NIPS, 2014. [12] H. Robbins and S. Monro. A stochastic approximation method. Ann. Math. Statist., 22(3):400– 407, 1951. [13] F. Rosenblatt. The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review, 65(6):386–408, 1958. [14] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In ICML, pages 807–814, 2007. [15] Y. Tsuruoka, J. Tsujii, and S. Ananiadou. Stochastic gradient descent training for L1regularized log-linear models with cumulative penalty. In ACL, pages 477–485, 2009. [16] C.J. van Rijsbergen. Foundation and evalaution. Journal of Documentation, 30(4):365–373, 1974. [17] S. R. S. Varadhan. Probability Theory. New York University, 2000. [18] W. Waegeman, K. Dembczy´nski, A. Jachnik, W. Cheng, and E. H¨ullermeier. On the Bayesoptimality of F-measure maximizers. Journal of Machine Learning Research, 15(1):3333– 3388, 2014. [19] N. Ye, K. M. A. Chai, W. S. Lee, and H. L. Chieu. Optimizing F-measure: A tale of two approaches. In ICML, 2012. [20] M. Zhao, N. Edakunni, A. Pocock, and G. Brown. Beyond Fano’s inequality: Bounds on the optimal F-score, BER, and cost-sensitive risk and their implications. JMLR, pages 1033–1090, 2013. [21] P. Zhao, S. C. H. Hoi, R. Jin, and T. Yang. Online AUC maximization. In ICML, pages 233–240, 2011. 9 | 2015 | 325 |
5,842 | Bayesian Manifold Learning: The Locally Linear Latent Variable Model Mijung Park, Wittawat Jitkrittum, Ahmad Qamar∗, Zolt´an Szab´o, Lars Buesing†, Maneesh Sahani Gatsby Computational Neuroscience Unit University College London {mijung, wittawat, zoltan.szabo}@gatsby.ucl.ac.uk atqamar@gmail.com, lbuesing@google.com, maneesh@gatsby.ucl.ac.uk Abstract We introduce the Locally Linear Latent Variable Model (LL-LVM), a probabilistic model for non-linear manifold discovery that describes a joint distribution over observations, their manifold coordinates and locally linear maps conditioned on a set of neighbourhood relationships. The model allows straightforward variational optimisation of the posterior distribution on coordinates and locally linear maps from the latent space to the observation space given the data. Thus, the LL-LVM encapsulates the local-geometry preserving intuitions that underlie non-probabilistic methods such as locally linear embedding (LLE). Its probabilistic semantics make it easy to evaluate the quality of hypothesised neighbourhood relationships, select the intrinsic dimensionality of the manifold, construct out-of-sample extensions and to combine the manifold model with additional probabilistic models that capture the structure of coordinates within the manifold. 1 Introduction Many high-dimensional datasets comprise points derived from a smooth, lower-dimensional manifold embedded within the high-dimensional space of measurements and possibly corrupted by noise. For instance, biological or medical imaging data might reflect the interplay of a small number of latent processes that all affect measurements non-linearly. Linear multivariate analyses such as principal component analysis (PCA) or multidimensional scaling (MDS) have long been used to estimate such underlying processes, but cannot always reveal low-dimensional structure when the mapping is non-linear (or, equivalently, the manifold is curved). Thus, there has been substantial recent interest in algorithms to identify non-linear manifolds in data. Many more-or-less heuristic methods for non-linear manifold discovery are based on the idea of preserving the geometric properties of local neighbourhoods within the data, while embedding, unfolding or otherwise transforming the data to occupy fewer dimensions. Thus, algorithms such as locally-linear embedding (LLE) and Laplacian eigenmap attempt to preserve local linear relationships or to minimise the distortion of local derivatives [1, 2]. Others, like Isometric feature mapping (Isomap) or maximum variance unfolding (MVU) preserve local distances, estimating global manifold properties by continuation across neighbourhoods before embedding to lower dimensions by classical methods such as PCA or MDS [3]. While generally hewing to this same intuitive path, the range of available algorithms has grown very substantially in recent years [4, 5]. ∗Current affiliation: Thread Genius †Current affiliation: Google DeepMind 1 However, these approaches do not define distributions over the data or over the manifold properties. Thus, they provide no measures of uncertainty on manifold structure or on the low-dimensional locations of the embedded points; they cannot be combined with a structured probabilistic model within the manifold to define a full likelihood relative to the high-dimensional observations; and they provide only heuristic methods to evaluate the manifold dimensionality. As others have pointed out, they also make it difficult to extend the manifold definition to out-of-sample points in a principled way [6]. An established alternative is to construct an explicit probabilistic model of the functional relationship between low-dimensional manifold coordinates and each measured dimension of the data, assuming that the functions instantiate draws from Gaussian-process priors. The original Gaussian process latent variable model (GP-LVM) required optimisation of the low-dimensional coordinates, and thus still did not provide uncertainties on these locations or allow evaluation of the likelihood of a model over them [7]; however a recent extension exploits an auxiliary variable approach to optimise a more general variational bound, thus retaining approximate probabilistic semantics within the latent space [8]. The stochastic process model for the mapping functions also makes it straightforward to estimate the function at previously unobserved points, thus generalising out-of-sample with ease. However, the GP-LVM gives up on the intuitive preservation of local neighbourhood properties that underpin the non-probabilistic methods reviewed above. Instead, the expected smoothness or other structure of the manifold must be defined by the Gaussian process covariance function, chosen a priori. Here, we introduce a new probabilistic model over high-dimensional observations, low-dimensional embedded locations and locally-linear mappings between high and low-dimensional linear maps within each neighbourhood, such that each group of variables is Gaussian distributed given the other two. This locally linear latent variable model (LL-LVM) thus respects the same intuitions as the common non-probabilistic manifold discovery algorithms, while still defining a full-fledged probabilistic model. Indeed, variational inference in this model follows more directly and with fewer separate bounding operations than the sparse auxiliary-variable approach used with the GP-LVM. Thus, uncertainty in the low-dimensional coordinates and in the manifold shape (defined by the local maps) is captured naturally. A lower bound on the marginal likelihood of the model makes it possible to select between different latent dimensionalities and, perhaps most crucially, between different definitions of neighbourhood, thus addressing an important unsolved issue with neighbourhooddefined algorithms. Unlike existing probabilistic frameworks with locally linear models such as mixtures of factor analysers (MFA)-based and local tangent space analysis (LTSA)-based methods [9, 10, 11], LL-LVM does not require an additional step to obtain the globally consistent alignment of low-dimensional local coordinates.1 This paper is organised as follows. In section 2, we introduce our generative model, LL-LVM, for which we derive the variational inference method in section 3. We briefly describe out-of-sample extension for LL-LVM and mathematically describe the dissimilarity between LL-LVM and GPLVM at the end of section 3. In section 4, we demonstrate the approach on several real world problems. Notation: In the following, a diagonal matrix with entries taken from the vector v is written diag(v). The vector of n ones is 1n and the n × n identity matrix is In. The Euclidean norm of a vector is ∥v∥, the Frobenius norm of a matrix is ∥M∥F . The Kronecker delta is denoted by δij (= 1 if i = j, and 0 otherwise). The Kronecker product of matrices M and N is M ⊗N. For a random vector w, we denote the normalisation constant in its probability density function by Zw. The expectation of a random vector w with respect to a density q is ⟨w⟩q. 2 The model: LL-LVM Suppose we have n data points {y1, . . . , yn} ⊂Rdy, and a graph G on nodes {1 . . . n} with edge set EG = {(i, j) | yi and yj are neighbours}. We assume that there is a low-dimensional (latent) representation of the high-dimensional data, with coordinates {x1, . . . , xn} ⊂Rdx, dx < dy. It will be helpful to concatenate the vectors to form y = [y1⊤, . . . , yn⊤]⊤and x = [x1⊤, . . . , xn⊤]⊤. 1This is also true of one previous MFA-based method [12] which finds model parameters and global coordinates by variational methods similar to our own. 2 high-dimensional space low-dimensional space yi yj T xi M xi xj x Ci T M yi y Figure 1: Locally linear mapping Ci for ith data point transforms the tangent space, TxiMx at xi in the lowdimensional space to the tangent space, TyiMy at the corresponding data point yi in the high-dimensional space. A neighbouring data point is denoted by yj and the corresponding latent variable by xj. Our key assumption is that the mapping between high-dimensional data and low-dimensional coordinates is locally linear (Fig. 1). The tangent spaces are approximated by {yj −yi}(i,j)∈EG and {xj −xi}(i,j)∈EG, the pairwise differences between the ith point and neighbouring points j. The matrix Ci ∈Rdy×dx at the ith point linearly maps those tangent spaces as yj −yi ≈Ci(xj −xi). (1) Under this assumption, we aim to find the distribution over the linear maps C = [C1, · · · , Cn] ∈ Rdy×ndx and the latent variables x that best describe the data likelihood given the graph G: log p(y|G) = log ZZ p(y, C, x|G) dx dC. (2) The joint distribution can be written in terms of priors on C, x and the likelihood of y as p(y, C, x|G) = p(y|C, x, G)p(C|G)p(x|G). (3) In the following, we highlight the essential components the Locally Linear Latent Variable Model (LL-LVM). Detailed derivations are given in the Appendix. Adjacency matrix and Laplacian matrix The edge set of G for n data points specifies a n × n symmetric adjacency matrix G. We write ηij for the i, jth element of G, which is 1 if yj and yi are neighbours and 0 if not (including on the diagonal). The graph Laplacian matrix is then L = diag(G 1n) −G. Prior on x We assume that the latent variables are zero-centered with a bounded expected scale, and that latent variables corresponding to neighbouring high-dimensional points are close (in Euclidean distance). Formally, the log prior on the coordinates is then log p({x1 . . . xn}|G, α) = −1 2 n X i=1 (α∥xi∥2 + n X j=1 ηij∥xi −xj∥2) −log Zx, where the parameter α controls the expected scale (α > 0). This prior can be written as multivariate normal distribution on the concatenated x: p(x|G, α) = N(0, Π), where Ω−1 = 2L ⊗Idx, Π−1 = αIndx + Ω−1. Prior on C We assume that the linear maps corresponding to neighbouring points are similar in terms of Frobenius norm (thus favouring a smooth manifold of low curvature). This gives log p({C1 . . . Cn}|G) = −ϵ 2
n X i=1 Ci
2 F −1 2 n X i=1 n X j=1 ηij∥Ci −Cj∥2 F −log Zc = −1 2Tr (ϵJJ⊤+ Ω−1)C⊤C −log Zc, (4) where J := 1n ⊗Idx. The second line corresponds to the matrix normal density, giving p(C|G) = MN(C|0, Idy, (ϵJJ⊤+ Ω−1)−1) as the prior on C. In our implementation, we fix ϵ to a small value2, since the magnitude of the product Ci(xi −xj) is determined by optimising the hyperparameter α above. 2ϵ sets the scale of the average linear map, ensuring the prior precision matrix is invertible. 3 x α G C y V Figure 2: Graphical representation of generative process in LLLVM. Given a dataset, we construct a neighbourhood graph G. The distribution over the latent variable x is controlled by the graph G as well as the parameter α. The distribution over the linear map C is also governed by the graph G. The latent variable x and the linear map C together determine the data likelihood. Likelihood Under the local-linearity assumption, we penalise the approximation error of Eq. (1), which yields the log likelihood log p(y|C, x, V, G) = −ϵ 2∥ n X i=1 yi∥2 −1 2 n X i=1 n X j=1 ηij(∆yj,i −Ci∆xj,i)⊤V−1(∆yj,i −Ci∆xj,i)−log Zy, (5) where ∆yj,i = yj −yi and ∆xj,i = xj −xi.3 Thus, y is drawn from a multivariate normal distribution given by p(y|C, x, V, G) = N(µy, Σy), with Σ−1 y = (ϵ1n1n⊤) ⊗Idy + 2L ⊗V−1, µy = Σye, and e = [e1⊤, · · · , en⊤]⊤∈Rndy; ei = −Pn j=1 ηjiV−1(Cj + Ci)∆xj,i . For computational simplicity, we assume V−1 = γIdy. The graphical representation of the generative process underlying the LL-LVM is given in Fig. 2. 3 Variational inference Our goal is to infer the latent variables (x, C) as well as the parameters θ = {α, γ} in LL-LVM. We infer them by maximising the lower bound L of the marginal likelihood of the observations log p(y|G, θ) ≥ ZZ q(C, x) log p(y, C, x|G, θ) q(C, x) dxdC := L(q(C, x), θ). (6) Following the common treatment for computational tractability, we assume the posterior over (C, x) factorises as q(C, x) = q(x)q(C) [13]. We maximise the lower bound w.r.t. q(C, x) and θ by the variational expectation maximization algorithm [14], which consists of (1) the variational expectation step for computing q(C, x) by q(x) ∝exp Z q(C) log p(y, C, x|G, θ)dC , (7) q(C) ∝exp Z q(x) log p(y, C, x|G, θ)dx , (8) then (2) the maximization step for estimating θ by ˆθ = arg maxθ L(q(C, x), θ). Variational-E step Computing q(x) from Eq. (7) requires rewriting the likelihood in Eq. (5) as a quadratic function in x p(y|C, x, θ, G) = 1 ˜ Zx exp −1 2(x⊤Ax −2x⊤b) , where the normaliser ˜Zx has all the terms that do not depend on x from Eq. (5). Let ˜L := (ϵ1n1⊤ n + 2γL)−1. The matrix A is given by A := A⊤ EΣyAE = [Aij]n i,j=1 ∈Rndx×ndx where the i, jth dx × dx block is Aij = Pn p=1 Pn q=1 ˜L(p, q)AE(p, i)⊤AE(q, j) and each i, jth (dy × dx) block of AE ∈Rndy×ndx is given by AE(i, j) = −ηijV−1(Cj + Ci) + δij P k ηikV−1(Ck + Ci) . The vector b is defined as b = [b1⊤, · · · , bn⊤]⊤∈Rndx with the component dx-dimensional vectors given by bi = Pn j=1 ηij(Cj⊤V−1(yi −yj) −Ci⊤V−1(yj −yi)). The likelihood combined with the prior on x gives us the Gaussian posterior over x (i.e., solving Eq. (7)) q(x) = N(x|µx, Σx), where Σ−1 x = ⟨A⟩q(C) + Π−1, µx = Σx⟨b⟩q(C). (9) 3The ϵ term centers the data and ensures the distribution can be normalised. It applies in a subspace orthogonal to that modelled by x and C and so its value does not affect the resulting manifold model. 4 post mean of x 6 7 8 9 10 11 900 1000 average lwbs k true x A E C B D posterior mean of C 400 datapoints Figure 3: A simulated example. A: 400 data points drawn from Swiss Roll. B: true latent points (x) in 2D used for generating the data. C: Posterior mean of C and D: posterior mean of x after 50 EM iterations given k = 9, which was chosen by maximising the lower bound across different k’s. E: Average lower bounds as a function of k. Each point is an average across 10 random seeds. Similarly, computing q(C) from Eq. (8) requires rewriting the likelihood in Eq. (5) as a quadratic function in C p(y|C, x, G, θ) = 1 ˜ ZC exp[−1 2Tr(ΓC⊤C −2C⊤V−1H)], (10) where the normaliser ˜ZC has all the terms that do not depend on C from Eq. (5), and Γ := Q˜LQ⊤. The matrix Q = [q1 q2 · · · qn] ∈Rndx×n where the jth subvector of the ith column is qi(j) = ηijV−1(xi −xj) + δij P k ηikV−1(xi −xk) ∈Rdx. We define H = [H1, · · · , Hn] ∈Rdy×ndx whose ith block is Hi = Pn j=1 ηij(yj −yi)(xj −xi)⊤. The likelihood combined with the prior on C gives us the Gaussian posterior over C (i.e., solving Eq. (8)) q(C) = MN(µC, I, ΣC), where Σ−1 C := ⟨Γ⟩q(x) + ϵJJ⊤+ Ω−1 and µC = V−1⟨H⟩q(x)Σ⊤ C. (11) The expected values of A, b, Γ and H are given in the Appendix. Variational-M step We set the parameters by maximising L(q(C, x), θ) w.r.t. θ which is split into two terms based on dependence on each parameter: (1) expected log-likelihood for updating V by arg maxV Eq(x)q(C)[log p(y|C, x, V, G)]; and (2) negative KL divergence between the prior and the posterior on x for updating α by arg maxα Eq(x)q(C)[log p(x|G, α)−log q(x)]. The update rules for each hyperparameter are given in the Appendix. The full EM algorithm4 starts with an initial value of θ. In the E-step, given q(C), compute q(x) as in Eq. (9). Likewise, given q(x), compute q(C) as in Eq. (11). The parameters θ are updated in the M-step by maximising Eq. (6). The two steps are repeated until the variational lower bound in Eq. (6) saturates. To give a sense of how the algorithm works, we visualise fitting results for a simulated example in Fig. 3. Using the graph constructed from 3D observations given different k, we run our EM algorithm. The posterior means of x and C given the optimal k chosen by the maximum lower bound resemble the true manifolds in 2D and 3D spaces, respectively. Out-of-sample extension In the LL-LVM model one can formulate a computationally efficient out-of-sample extension technique as follows. Given n data points denoted by D = {y1, · · · , yn}, the variational EM algorithm derived in the previous section converts D into the posterior q(x, C): D 7→ q(x)q(C). Now, given a new high-dimensional data point y∗, one can first find the neighbourhood of y∗without changing the current neighbourhood graph. Then, it is possible to compute the distributions over the corresponding locally linear map and latent variable q(C∗, x∗) via simply performing the E-step given q(x)q(C) (freezing all other quantities the same) as D ∪{y∗} 7→q(x)q(C)q(x∗)q(C∗). 4An implementation is available from http://www.gatsby.ucl.ac.uk/resources/lllvm. 5 400 samples (in 3D) 2D representation posterior mean of x in 2D space A B C 29 28 28 29 G without shortcut G with shortcut LB: 1119.4 LB: 1151.5 Figure 4: Resolving short-circuiting problems using variational lower bound. A: Visualization of 400 samples drawn from a Swiss Roll in 3D space. Points 28 (red) and 29 (blue) are close to each other (dotted grey) in 3D. B: Visualization of the 400 samples on the latent 2D manifold. The distance between points 28 and 29 is seen to be large. C: Posterior mean of x with/without shortcircuiting the 28th and the 29th data points in the graph construction. LLLVM achieves a higher lower bound when the shortcut is absent. The red and blue parts are mixed in the resulting estimate in 2D space (right) when there is a shortcut. The lower bound is obtained after 50 EM iterations. Comparison to GP-LVM A closely related probabilistic dimensionality reduction algorithm to LL-LVM is GP-LVM [7]. GP-LVM defines the mapping from the latent space to data space using Gaussian processes. The likelihood of the observations Y = [y1, . . . , ydy] ∈Rn×dy (yk is the vector formed by the kth element of all n high dimensional vectors) given latent variables X = [x1, . . . , xdx] ∈Rn×dx is defined by p(Y|X) = Qdy k=1 N(yk|0, Knn + β−1In), where the i, jth element of the covariance matrix is of the exponentiated quadratic form: k(xi, xj) = σ2 f exp h −1 2 Pdx q=1 αq(xi,q −xj,q)2i with smoothness-scale parameters {αq} [8]. In LL-LVM, once we integrate out C from Eq. (5), we also obtain the Gaussian likelihood given x, p(y|x, G, θ) = Z p(y|C, x, G, θ)p(C|G, θ) dC = 1 ZYy exp −1 2y⊤K−1 LL y . In contrast to GP-LVM, the precision matrix K−1 LL = (2L ⊗V−1) −(W ⊗V−1) Λ (W⊤⊗ V−1) depends on the graph Laplacian matrix through W and Λ. Therefore, in LL-LVM, the graph structure directly determines the functional form of the conditional precision. 4 Experiments 4.1 Mitigating the short-circuit problem Like other neighbour-based methods, LL-LVM is sensitive to misspecified neighbourhoods; the prior, likelihood, and posterior all depend on the assumed graph. Unlike other methods, LLLVM provides a natural way to evaluate possible short-circuits using the variational lower bound of Eq. (6). Fig. 4 shows 400 samples drawn from a Swiss Roll in 3D space (Fig. 4A). Two points, labelled 28 and 29, happen to fall close to each other in 3D, but are actually far apart on the latent (2D) surface (Fig. 4B). A k-nearest-neighbour graph might link these, distorting the recovered coordinates. However, evaluating the model without this edge (the correct graph) yields a higher variational bound (Fig. 4C). Although it is prohibitive to evaluate every possible graph in this way, the availability of a principled criterion to test specific hypotheses is of obvious value. In the following, we demonstrate LL-LVM on two real datasets: handwritten digits and climate data. 4.2 Modelling USPS handwritten digits As a first real-data example, we test our method on a subset of 80 samples each of the digits 0, 1, 2, 3, 4 from the USPS digit dataset, where each digit is of size 16×16 (i.e., n = 400, dy = 256). We follow [7], and represent the low-dimensional latent variables in 2D. 6 30 3 4 5 x 104 variational lower bound A # EM iterations 0 true Y* estimate k=n/80 posterior mean of x (k=n/80) B digit 1 digit 2 digit 3 digit 0 digit 4 query (0) query (1) GP-LVM C ISOMAP D LLE E Classifcation error F LLE ISOMAP GPLVM LLLVM k=n/100 k=n/50 k=n/40 query (2) query (3) 0 0.2 0.4 query (4) Figure 5: USPS handwritten digit dataset described in section 4.2. A: Mean (in solid) and variance (1 standard n deviation shading) of the variational lower bound across 10 different random starts of EM algorithm with different k’s. The highest lower bound is achieved when k = n/80. B: The posterior mean of x in 2D. Each digit is colour coded. On the right side are reconstructions of y∗for randomly chosen query points x∗. Using neighbouring y and posterior means of C we can recover y∗successfully (see text). C: Fitting results by GP-LVM using the same data. D: ISOMAP (k = 30) and E: LLE (k=40). Using the extracted features (in 2D), we evaluated a 1-NN classifier for digit identity with 10-fold cross-validation (the same data divided into 10 training and test sets). The classification error is shown in F. LL-LVM features yield the comparably low error with GP-LVM and ISOMAP. Fig. 5A shows variational lower bounds for different values of k, using 9 different EM initialisations. The posterior mean of x obtained from LL-LVM using the best k is illustrated in Fig. 5B. Fig. 5B also shows reconstructions of one randomly-selected example of each digit, using its 2D coordinates x∗as well as the posterior mean coordinates ˆxi, tangent spaces ˆCi and actual images yi of its k = n/80 closest neighbours. The reconstruction is based on the assumed tangent-space structure of the generative model (Eq. (5)), that is: ˆy∗= 1 k Pk i=1 h yi + ˆCi(x∗−ˆxi) i . A similar process could be used to reconstruct digits at out-of-sample locations. Finally, we quantify the relevance of the recovered subspace by computing the error incurred using a simple classifier to report digit identity using the 2D features obtained by LL-LVM and various competing methods (Fig. 5C-F). Classification with LL-LVM coordinates performs similarly to GP-LVM and ISOMAP (k = 30), and outperforms LLE (k = 40). 4.3 Mapping climate data In this experiment, we attempted to recover 2D geographical relationships between weather stations from recorded monthly precipitation patterns. Data were obtained by averaging month-by-month annual precipitation records from 2005–2014 at 400 weather stations scattered across the US (see Fig. 6) 5. Thus, the data set comprised 400 12-dimensional vectors. The goal of the experiment is to recover the two-dimensional topology of the weather stations (as given by their latitude and longi5The dataset is made available by the National Climatic Data Center at http://www.ncdc.noaa. gov/oa/climate/research/ushcn/. We use version 2.5 monthly data [15]. 7 −120 −110 −100 −90 −80 −70 30 35 40 45 Longitude Latitude (a) 400 weather stations (b) LLE (c) LTSA (d) ISOMAP (e) GP-LVM (f) LL-LVM Figure 6: Climate modelling problem as described in section 4.3. Each example corresponding to a weather station is a 12-dimensional vector of monthly precipitation measurements. Using only the measurements, the projection obtained from the proposed LL-LVM recovers the topological arrangement of the stations to a large degree. tude) using only these 12-dimensional climatic measurements. As before, we compare the projected points obtained by LL-LVM with several widely used dimensionality reduction techniques. For the graph-based methods LL-LVM, LTSA, ISOMAP, and LLE, we used 12-NN with Euclidean distance to construct the neighbourhood graph. The results are presented in Fig. 6. LL-LVM identified a more geographically-accurate arrangement for the weather stations than the other algorithms. The fully probabilistic nature of LL-LVM and GPLVM allowed these algorithms to handle the noise present in the measurements in a principled way. This contrasts with ISOMAP which can be topologically unstable [16] i.e. vulnerable to shortcircuit errors if the neighbourhood is too large. Perhaps coincidentally, LL-LVM also seems to respect local geography more fully in places than does GP-LVM. 5 Conclusion We have demonstrated a new probabilistic approach to non-linear manifold discovery that embodies the central notion that local geometries are mapped linearly between manifold coordinates and high-dimensional observations. The approach offers a natural variational algorithm for learning, quantifies local uncertainty in the manifold, and permits evaluation of hypothetical neighbourhood relationships. In the present study, we have described the LL-LVM model conditioned on a neighbourhood graph. In principle, it is also possible to extend LL-LVM so as to construct a distance matrix as in [17], by maximising the data likelihood. We leave this as a direction for future work. Acknowledgments The authors were funded by the Gatsby Charitable Foundation. 8 References [1] S. T. Roweis and L. K. Saul. Nonlinear Dimensionality Reduction by Locally Linear Embedding. Science, 290(5500):2323–2326, 2000. [2] M. Belkin and P. Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. In NIPS, pages 585–591, 2002. [3] J. B. Tenenbaum, V. Silva, and J. C. Langford. A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science, 290(5500):2319–2323, 2000. [4] L.J.P. van der Maaten, E. O. Postma, and H. J. van den Herik. Dimensionality reduction: A comparative review, 2008. http://www.iai.uni-bonn.de/˜jz/ dimensionality_reduction_a_comparative_review.pdf. [5] L. Cayton. Algorithms for manifold learning. Univ. of California at San Diego Tech. Rep, pages 1–17, 2005. http://www.lcayton.com/resexam.pdf. [6] J. Platt. Fastmap, metricmap, and landmark MDS are all Nystr¨om algorithms. In Proceedings of 10th International Workshop on Artificial Intelligence and Statistics, pages 261–268, 2005. [7] N. Lawrence. Gaussian process latent variable models for visualisation of high dimensional data. In NIPS, pages 329–336, 2003. [8] M. K. Titsias and N. D. Lawrence. Bayesian Gaussian process latent variable model. In AISTATS, pages 844–851, 2010. [9] S. Roweis, L. Saul, and G. Hinton. Global coordination of local linear models. In NIPS, pages 889–896, 2002. [10] M. Brand. Charting a manifold. In NIPS, pages 961–968, 2003. [11] Y. Zhan and J. Yin. Robust local tangent space alignment. In NIPS, pages 293–301. 2009. [12] J. Verbeek. Learning nonlinear image manifolds by global alignment of local linear models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(8):1236–1250, 2006. [13] C. Bishop. Pattern recognition and machine learning. Springer New York, 2006. [14] M. J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, Gatsby Unit, University College London, 2003. [15] M. Menne, C. Williams, and R. Vose. The U.S. historical climatology network monthly temperature data, version 2.5. Bulletin of the American Meteorological Society, 90(7):993–1007, July 2009. [16] Mukund Balasubramanian and Eric L. Schwartz. The isomap algorithm and topological stability. Science, 295(5552):7–7, January 2002. [17] N. Lawrence. Spectral dimensionality reduction via maximum entropy. In AISTATS, pages 51–59, 2011. 9 | 2015 | 326 |
5,843 | Smooth Interactive Submodular Set Cover Bryan He Stanford University bryanhe@stanford.edu Yisong Yue California Institute of Technology yyue@caltech.edu Abstract Interactive submodular set cover is an interactive variant of submodular set cover over a hypothesis class of submodular functions, where the goal is to satisfy all sufficiently plausible submodular functions to a target threshold using as few (cost-weighted) actions as possible. It models settings where there is uncertainty regarding which submodular function to optimize. In this paper, we propose a new extension, which we call smooth interactive submodular set cover, that allows the target threshold to vary depending on the plausibility of each hypothesis. We present the first algorithm for this more general setting with theoretical guarantees on optimality. We further show how to extend our approach to deal with realvalued functions, which yields new theoretical results for real-valued submodular set cover for both the interactive and non-interactive settings. 1 Introduction In interactive submodular set cover (ISSC) [10, 11, 9], the goal is to interactively satisfy all plausible submodular functions in as few actions as possible. ISSC is a wide-encompassing framework that generalizes both submodular set cover [24] by virtue of being interactive, as well as some instances of active learning by virtue of many active learning criteria being submodular [12, 9]. A key characteristic of ISSC is the a priori uncertainty regarding the correct submodular function to optimize. For example, in personalized recommender systems, the system does not know the user’s preferences a priori, but can learn them interactively via user feedback. Thus, any algorithm must choose actions in order to disambiguate between competing hypotheses as well as optimize for the most plausible ones – this issue is also known as the exploration-exploitation tradeoff. In this paper, we propose the smooth interactive submodular set cover problem, which addresses two important limitations of previous work. The first limitation is that conventional ISSC [10, 11, 9] only allows for a single threshold to satisfy, and this “all or nothing” nature can be inflexible for settings where the covering goal should vary smoothly (e.g., based on plausibility). In smooth ISSC, one can smoothly vary the target threshold of the candidate submodular functions according to their plausibility. In other words, the less plausible a hypothesis is, the less we emphasize maximizing its associated utility function. We present a simple greedy algorithm for smooth ISSC with provable guarantees on optimality. We also show that our smooth ISSC framework and algorithm fully generalize previous instances of and algorithms for ISSC by reducing back to just one threshold. One consequence of smooth ISSC is the need to optimize for real-valued functions, which leads to the second limitation of previous work. Many natural classes of submodular functions are realvalued (cf. [25, 5, 17, 21]). However, submodular set cover (both interactive and non-interactive) has only been rigorously studied for integral or rational functions with fixed denominator, which highlights a significant gap between theory and practice. We propose a relaxed version of smooth ISSC using an approximation tolerance ϵ, such that one needs only to satisfy the set cover criterion to within ϵ. We extend our greedy algorithm to provably optimize for real-valued submodular functions within this ϵ tolerance. To the best of our knowledge, this yields the first theoretically rigorous algorithm for real-valued submodular set cover (both interactive and non-interactive). 1 Problem 1 Smooth Interactive Submodular Set Cover 1: Given: 1. Hypothesis class H (does not necessarily contain h∗) 2. Query set Q and response set R with known q(h) ⊆R for q ∈Q, h ∈H 3. Modular query cost function c defined over Q 4. Monotone submodular objective functions Fh : 2Q×R →R≥0 for h ∈H 5. Monotone submodular distance functions Gh : 2Q×R →R≥0 for h ∈H, with Gh(S⊕(q, r))− Gh(S) = 0 for any S if r ∈q(h) 6. Threshold function α : R≥0 →R≥0 mapping a distance to required objective function value 2: Protocol: For i = 1, . . . , ∞: ask a question ˆqi ∈Q and receive a response ˆri ∈ˆqi(h∗). 3: Goal: Using minimal cost P i c(ˆqi), terminate when Fh( ˆS) ≥α(Gh(S∗)) for all h ∈H, where ˆS = {(ˆqi, ˆri)}i and S∗△= S q∈Q,r∈q(h∗){(q, r)}. 2 Background Submodular Set Cover. In the basic submodular set cover problem [24], we are given an action set Q and a monotone submodular set function F : 2Q →R≥0 that maps subsets A ⊆Q to non-negative scalar values. A set function F is monotone and submodular if and only if: ∀A ⊆B ⊆Q, q ∈Q : F(A ⊕q) ≥F(A) and F(A ⊕q) −F(A) ≥F(B ⊕q) −F(B), respectively, where ⊕denotes set addition (i.e., A ⊕q ≡A ∪{q}). In other words, monotonicity implies that adding a set always yields non-negative gain, and submodularity implies that adding to a smaller set A results in a larger gain than adding to a larger set B. We also assume that F(∅) = 0. Each q ∈Q is associated with a modular or additive cost c(q). Given a target threshold α, the goal is to select a set A that satisfies F(A) ≥α with minimal cost c(A) = P q∈A c(q). This problem is NPhard; but for integer-valued F, simple greedy forward selection can provably achieve near-optimal cost of at most (1 + ln(maxa∈Q F({a}))OPT [24], and is typically very effective in practice. One motivating application is content recommendation [5, 4, 25, 11, 21], where Q are items to recommend, F(A) captures the utility of A ⊆Q, and α is the satisfaction goal. Monotonicity of F captures the property that total utility never decreases as one recommends more items, and submodularity captures the the diminishing returns property when recommending redundant items. Interactive Submodular Set Cover. In the basic interactive setting [10], the decision maker must optimize over a hypothesis class H of submodular functions Fh. The setting is interactive, whereby the decision maker chooses an action (or query) q ∈Q, and the environment provides a response r ∈ R. Each query q is now a function mapping hypotheses H to responses R (i.e., q(h) ∈R), and the environment provides responses according to an unknown true hypothesis h∗∈H (i.e., r ≡q(h∗)). This process iterates until Fh∗(S) ≥α, where S denotes the set of observed question/response pairs: S = {(q, r)} ⊆Q×R. The goal is to satisfy Fh∗(S) ≥α with minimal cost c(S) = P (q,r)∈S c(q). For example, when recommending movies to a new user with unknown interests (cf. [10, 11]), H can be a set of user types or movie genres (e.g., H = {Action, Drama, Horror, . . .}). Then Q would contain individual movies that can be recommended, and R would be a “yes” or “no” response or an integer rating representing how interested the user (modeled as h∗) is in a given movie. The interactive setting is both a learning and covering problem, as opposed to just a covering problem. The decision maker must balance between disambiguating between hypotheses in H (i.e., identifying which is the true h∗) and satisfying the covering goal Fh∗(S) ≥α; this issue is also known as the exploration-exploitation tradeoff. Noisy ISSC [11] extends basic ISSC by no longer assuming the true h∗is in H, and uses a distance function Gh and tolerance κ such that the goal is to satisfy Fh(S) ≥α for all sufficiently plausible h, where plausibility is defined as Gh(S) ≤κ. 3 Problem Statement We now present the smooth interactive submodular set cover problem, which generalizes basic and noisy ISSC [10, 11] (described in Section 2). Like basic ISSC, each hypothesis h ∈H is associated with a utility function Fh : 2Q×R →R≥0 that maps sets of query/response pairs to 2 α1 α2 α3 κ1κ2 κ3 Fh Gh (a) α1 α2 α3 κ1κ2 κ3 ϵ Fh Gh (b) Fh Gh (c) ϵ Fh Gh (d) Figure 1: Examples of (a) multiple thresholds, (b) approximate multiple thresholds, (c) a continuous convex threshold, and (d) an approximate continuous convex threshold. For the approximate setting, we essentially allow for satisfying any threshold function that resides in the yellow region. non-negative scalars. Like noisy ISSC, the hypothesis class H does not necessarily contain the true h∗(i.e., the agnostic setting). Each h ∈H is associated with a distance or disagreement function Gh : 2Q×R →R≥0 which maps sets of question/response pairs to a disagreement score (i.e., the larger Gh(S) is, the more h disagrees with S). We further require that Fh(∅) = 0 and Gh(∅) = 0. Problem 1 describes the general problem setting. Let S∗△= S q∈Q,r∈q(h∗){(q, r)} denote the set of all possible question/responses pairs given by h∗. The goal is to construct a question/response set ˆS with minimal cost such that, for every h ∈H we have Fh( ˆS) ≥α(Gh(S∗)), where α(·) maps disagreement values to desired utilities. In general, α(·) is a non-increasing function, since the goal is to optimize more the most plausible hypotheses in H. We describe two versions of α(·) below. Version 1: Step Function (Multiple Thresholds). The first version uses a decreasing step function (see Figure 1(a)). Given a pair of sequences α1 > . . . > αN > 0 and 0 < κ1 < . . . < κN, the threshold function is α(v) = αnκ(v) where nκ(v) = min{n ∈{0, . . . , N + 1}|v < κn}, and α0 △= ∞, αN+1 △= 0, κ0 △= 0, κN+1 △= ∞. The goal in Problem 1 is equivalently: “ ∀h ∈H and n = 1, . . . , N: satisfy Fh( ˆS) ≥αn whenever Gh(S∗) < κn.” This version is a strict generalization of noisy ISSC, which uses only a single α and κ. Version 2: Convex Threshold Curve. The second version uses a convex α(·) that decreases continuously as Gh(S∗) increases (see Figure 1(c)), and is not a strict generalization of noisy ISSC. Approximate Thresholds. Finally, we also consider a relaxed version of smooth ISSC, whereby we only require that the objectives Fh be satisfied to within some tolerance ϵ ≥0. More formally, we say that we approximately solve Problem 1 with tolerance ϵ if its goal is redefined as: “using minimal cost, P i c(ˆqi), guarantee Fh( ˆS) ≥α(Gh(S∗)) −ϵ for all h ∈H.” See Figure 1(b) & 1(d) for the approximate versions of the multiple tresholds and convex versions, respectively. ISSC has only been rigorously studied when the utility functions are Fh are rational-valued with a fixed denominator. We show in Section 4.3 how to efficiently solve the approximate version of smooth ISSC when Fh are real-valued, which also yields a new approach for approximately solving the classical non-interactive submodular set cover problem with real-valued objective functions. 4 Algorithm & Main Results A key question in the study of interactive optimization is how to balance the exploration-exploitation tradeoff. On the one hand, one should exploit current knowledge to efficiently satisfy the plausible submodular functions. However, hypotheses that seem plausible might actually not be due to imperfections in the algorithm’s knowledge. One should thus explore by playing actions that disambiguate the plausibility of competing hypotheses. Our setting is further complicated due to also solving a combinatorial optimization problem (submodular set cover), which is in general intractable. 4.1 Approach Outline We present a general greedy algorithm, described in Algorithm 1 below, for solving smooth ISSC with provably near-optimal cost. Algorithm 1 requires as input a submodular meta-objective ¯F 3 Algorithm 1 Worst Case Greedy Algorithm for Smooth Interactive Submodular Set Cover 1: input: ¯F // Submodular Meta-Objective 2: input: ¯Fmax // Termination Threshold for ¯F 3: input: Q // Query or Action Set 4: input: R // Response Set 5: S ←∅ 6: while ¯F(S) < ¯Fmax do 7: ˆq ←argmaxq∈Q minr∈R ¯F(S ⊕(q, r)) −¯F(S) /c(q) 8: Play ˆq, observe ˆr 9: S ←S ⊕(ˆq, ˆr) 10: end while Variable Definition H Set of hypotheses Q Set of actions or queries R Set of responses Fh Monotone non-decreasing submodular utility function Gh Monotone non-decreasing submodular distance function ¯F Monotone non-decreasing submodular function unifying Fh, Gh and the thresholds ¯Fmax Maximum value held by ¯F DF Denominator for Fh (when rational) DG Denominator for Gh (when rational) α(·) Continuous convex threshold αi Thresholds for F (α1 is largest) κi Thresholds for G (κ1 is smallest) N Number of thresholds ϵ Approximation tolerance for the real-valued case F ′ h Surrogate utility function for the approximate version α′ n Surrogate thresholds for the approximate version Figure 2: Summary of notation used. The top portion is used in all settings. The middle portion is used for the multiple thresholds setting. The bottom portion is used for real-valued functions. that quantifies the exploration-exploitation trade-off, and the specific instantiation of ¯F depends on which version of smooth ISSC is being solved. Algorithm 1 greedily optimizes for the worst case outcome at each iteration (Line 7) until a termination condition ¯F ≥¯Fmax has been met (Line 6). The construction of ¯F is essentially a reduction of smooth ISSC to a simpler submodular set cover problem, and generalizes the reduction approach in [11]. In particular, we first lift the analysis of [11] to deal with multiple thresholds (Section 4.2). We then show how to deal with approximate thresholds in the real-valued setting (Section 4.3), which finally allows us to address the continuous threshold setting (Section 4.4). Our cost guarantees are stated relative to the general cover cost (GCC), which lower bounds the optimal cost, as stated in Definition 4.1 and Lemma 4.2 below. Via this reduction, we can show that our approach achieves cost bounded by (1 + ln ¯Fmax)GCC ≤ (1 + ln ¯Fmax)OPT. For clarity of exposition, all proofs are deferred to the supplementary material. Definition 4.1 (General Cover Cost (GCC)). Define oracles T ∈RQ to be functions mapping questions to responses and T( ˆQ) ∆= S ˆqi∈ˆ Q{(ˆqi, T(ˆqi))}. T( ˆQ) is the set of question-response pairs given by T for the set of questions ˆQ. Define the General Cover Cost as: GCC ∆= max T ∈RQ min ˆ Q: ¯ F (T ( ˆ Q))≥¯ Fmax c( ˆQ) . Lemma 4.2 (Lemma 3 from [11]). If there is a question asking strategy for satisfying ¯F( ˆS) ≥¯Fmax with worst case cost C∗, then GCC ≤C∗. Thus GCC ≤OPT. 4.2 Multiple Thresholds Version We begin with the multiple thresholds version. In this section, we assume that each Fh and Gh are rational-valued with fixed denominators DF and DG, respectively.1 We first define a doubly 1When each Fh and/or Gh are integer-valued, then DF = 1 and/or DG = 1, respectively. 4 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ¯F ≥¯Fmax C ^ ¯Fh1 ≥¯Fhmax · · · ¯Fhi ≥¯Fhmax · · · ¯Fh|H| ≥¯Fhmax B · · · · · · ^ ¯Fhi,1 ≥¯Fh,1max · · · ¯Fhi,N ≥¯Fh,N max A _ · · · _ Fhi ≥↵1 Ghi ≥1 · · · Fhi ≥↵N Ghi ≥N Figure 2: This figure shows the relationship between the terms defined in Definition 4.3. (A) For ¯Fhi,n ≥¯Fhi,nmax = (↵n −↵n+1)(n −n−1), either Fhi ≥↵n or Ghi ≥n. This generates the tradeoff between satisfying the either of the two thresholds. (B) For ¯Fhi ≥¯Fhmax, ¯Fhi,n ≥¯Fhi,nmax for all i 2 {1, . . . , N}. This creates the requirement that all of the thresholds must be satisfied. (C) For ¯F ≥¯Fmax, ¯Fh ≥¯Fhmax for all h 2 H. This creates the requirement that all of the hypotheses must be satisfied. Using (1) and (2), we define the general forms of ¯F and ¯Fmax used in Sections 4.2, 4.3, and 4.4. Each of these sections will apply this definition to different choices of Fh, Gh, N, ↵1, . . . , ↵N, and 1, . . . , N to solve their variants of the problem. In this definition, X is a constant to make ¯Fh to be integer-valued, Y is the contribution to the maximum value from Fh and ↵n, and Z is the contribution to the maximum value from Gh and n. Definition 4.3 (General ¯F and ¯Fmax). ¯Fh,n( ˆS) 4= ⇣ (n −n−1) −Gh,n,n−1( ˆS) ⌘ Fh,↵n,↵n+1( ˆS) + Gh,n,n−1( ˆS)(↵n −↵n+1), ¯Fh( ˆS) 4= X N X n=1 2 4 0 @Y j6=n (j −j−1) 1 A ¯Fh,n( ˆS) 3 5 , ¯F( ˆS) 4= X h2H ¯Fh( ˆS), ¯Fmax 4= |H|Y Z Definition 4.4 (Multiple Thresholds). To solve the multiple thresholds version of the problem, Fh, Gh, N, ↵1, . . . , ↵N, and 1, . . . , N are used without modification. The constants are set as the following: X = DF DN G , Y = DF ↵1, Z = DN G N Y n=1 (n −n−1) This definition of ¯F trades off between exploitation (maximizing the most plausible Fh) and exploration (distinguishing between more and less plausible Fh) by allowing each ¯Fi to reach its maximum value either by having Fh reach ↵i or having Gh reach i. In other words, each of the thresholds can be satisfied with either a sufficiently large utility Fh or a sufficiently large distance Gh. Figure 2 shows the logical relationships between these components. We prove in Appendix A that ¯F is monotone submodular, and that finding a S such that ¯F(S) ≥ ¯Fmax is equivalent to solving Problem 1. For Definition 4.4, we also require that ↵n and n thresholds satisfy Condition 4.5 for ¯F to be submodular. Condition 4.5. The sequence h ↵i−↵n+1 n−n−1 iN i=1 is non-increasing. Theorem 4.6. Let Fh and Gh be monotone submodular and rational-valued with fixed denominator DF and DG, respectively. Then, if Condition 4.5 holds, then applying Algorithm 1 using ¯F and ¯Fmax from Definition 4.4 solves the multiple thresholds version of Problem 1 with cost at most ⇣ 1 + ln ⇣ |H|DF DN G ↵1 QN n=1(n −n−1) ⌘⌘ GCC. 5 Figure 3: Depicting the relationship between the terms defined in Definition 4.3. (A) If ¯Fhi,n ≥ ¯Fhi,nmax = (αn−αn+1)(κn−κn−1), then either Fhi ≥αn or Ghi ≥κn; this generates the tradeoff between satisfying the either of the two thresholds. (B) If ¯Fhi ≥¯Fhmax, then ¯Fhi,n ≥¯Fhi,nmax ∀i ∈{1, . . . , N}; this enforces that all i, at least one of the thresholds αi or κi must be satisfied. (C) If ¯F ≥¯Fmax, then ¯Fh ≥¯Fhmax ∀h ∈H; this enforces that all hypotheses must be satisfied. truncated version of each hypothesis submodular utility and distance function: Fh,αn,αj( ˆS) △= max(min(Fh( ˆS), αn), αj) −αj, (1) Gh,κn,κj( ˆS) △= max(min(Gh( ˆS), κn), κj) −κj. (2) In other words, Fh,αn,αj is truncated from below at αj and from above at αn (it is assumed that αn > αj), and is offset by −αj so that Fh,αn,αj(∅) = 0. Gh,κn,κj is constructed analogously. Using (1) and (2), we can define the general forms of ¯F and ¯Fmax, which can be instantiated to address different versions of smooth ISSC. Definition 4.3 (General form of ¯F and ¯Fmax). ¯Fh,n( ˆS) △= (κn −κn−1) −Gh,κn,κn−1( ˆS) Fh,αn,αn+1( ˆS) + Gh,κn,κn−1( ˆS)(αn −αn+1), ¯Fh( ˆS) △= C ¯ F N X n=1 Y j̸=n (κj −κj−1) ¯Fh,n( ˆS) , ¯F( ˆS) △= X h∈H ¯Fh( ˆS), ¯Fmax △= |H|CF CG. The coefficient C ¯ F converts each ¯Fh to be integer-valued, CF is the contribution to ¯Fmax from Fh and αn, and CG is the contribution to ¯Fmax from Gh and κn. Definition 4.4 (Multiple Thresholds Version of ISSC). Given α1, . . . , αN and κ1, . . . , κN, we instantiate ¯F and ¯Fmax in Definition 4.3 via: C ¯ F = DF DN G , CF = DF α1, CG = DN G N Y n=1 (κn −κn−1). ¯F in Definition 4.4 trades off between exploitation (maximizing the plausible Fh’s) and exploration (disambiguating plausibility in Fh’s) by allowing each ¯Fh to reach its maximum by either Fh reaching αi or Gh reaching κi. In other words, each ¯Fh can be satisfied with either a sufficiently large utility Fh or large distance Gh. Figure 3 shows the logical relationships between these components. We prove in Appendix A that ¯F is monotone submodular, and that finding an S such that ¯F(S) ≥ ¯Fmax is equivalent to solving Problem 1. For ¯F to be submodular, we also require Condition 4.5, which is essentially a discrete analogue to the condition that a continuous α(·) should be convex. Condition 4.5. The sequence ⟨αn−αn+1 κn−κn−1 ⟩N n=1 is non-increasing. Theorem 4.6. Given Condition 4.5, Algorithm 1 using Definition 4.4 solves the multiple thresholds version of Problem 1 using cost at most 1 + ln |H|DF DN G α1 QN n=1(κn −κn−1) GCC. If each Gh is integral and κn = κn−1 + 1, then the bound simplifies to (1 + ln (|H|DF α1)) GCC. We present an alternative formulation in Appendix D.2 that has better bounds when DG is large, but is less flexible and cannot be easily extended to the real-valued and convex threshold curve settings. 5 4.3 Approximate Thresholds for Real-Valued Functions Solving even non-interactive submodular set cover is extremely challenging when the utility functions Fh are real-valued. For example, Appendix B.1 describes a setting where the greedy algorithm performs arbitrarily poorly. We now extend the results from Section 4.2 to real-valued Fh and α1, . . . , αN. Rather than trying to solve the problem exactly, we instead solve a relaxed or approximate version, which will be useful for the convex threshold curve setting. Let ϵ > 0 denote a pre-specified approximation tolerance for Fh, ⌈·⌉γ denote rounding up to the nearest multiple of γ, and ⌊·⌋γ denote rounding down to the nearest multiple of γ. We define a surrogate problem: Definition 4.7 (Approximate Thresholds for Real-Valued Functions). Define the following approximations to Fh and αn: F ′ h( ˆS) △= D ϵ Fh( ˆS) + ϵ D | ˆ S| X i=1 (|Q| + 1 −i) ϵ D , α′ n △= D ϵ $ αn −ϵ D n X i=1 " (2N −2i)DN−i+1 G N Y j=i (κj −κj−1) #% ϵ D D △= |Q| X i=1 (|Q| + 1 −i) + N X i=1 " (2N −2i)DN−i+1 G N Y j=i (κj −κj−1) # + 2 Instantiate ¯F and ¯Fmax in Definition 4.3 using F ′ h, α′ n above, Gh, κn and: C ¯ F = DN G , CF = α′ 1, CG = DN G N Y n=1 (κn −κn−1). We prove in Appendix B that Definition 4.7 is an instance of a smooth ISSC problem, and that solving Definition 4.7 will approximately solve the original real-valued smooth ISSC problem. Theorem 4.8. Given Condition 4.5, Algorithm 1 using Definition 4.7 will approximately solve the real-valued multiple thresholds version of Problem 1 with tolerance ϵ using cost at most 1 + ln |H|α′ 1DN G QN n=1(κn −κn−1) GCC. We show in Appendix B.2 how to apply this result to approximately solve the basic submodular set cover problem with real-valued objectives. Note that if ϵ is selected as the smallest distinct difference between values in Fh, then the approximation will be exact. 4.4 Convex Threshold Curve Version We now address the setting where the threshold curve α(·) is continuous and convex. We again solve the approximate version, since the threshold curve α(·) is necessarily real-valued. Let ϵ > 0 be the pre-specified tolerance for F ′ h. Let N be defined so that NDG is the maximal value of Gh. We convert the continuous version α(·) to a multiple threshold version (with N thresholds) that is within an ϵ-approximation of the former, as shown below. Definition 4.9 (Equivalent Multiple Thresholds for Continuous Convex Curve). Instantiate ¯F and ¯Fmax in Definition 4.3 using Gh without modification, and a sequence of thresholds: F ′ h( ˆS) △= D ϵ Fh( ˆS) + ϵ D | ˆ S| X i=1 (|Q| + 1 −i) ϵ D , α′ n △= D ϵ $ α(n) −ϵ D n X i=1 " (2N −2i)DN−i+1 G N Y j=i (κj −κj−1) #% ϵ D κn △= DGn 6 with constants set as: C ¯ F = 1, CF = α′ 1, CG = DN G N Y n=1 (κn −κn−1) = DN G . Note that the F ′ h are not too expensive to compute. We prove in Appendix C that satisfying this set of thresholds is equivalent to satisfying the original curve α(·) within ϵ-error. Note also that Definition 4.9 uses the same form as Definition 4.7 to handle the approximation of real-valued functions. Theorem 4.10. Applying Algorithm 1 using Definition 4.9 approximately solves the convex threshold version of Problem 1 with tolerance ϵ using cost at most: 1 + ln |H|α′ 1DN G GCC. Note that if ϵ is sufficiently large, then N could in principle be smaller, which can lead to less conservative approximations. There may also be more precise approximations by reducing to other formulations for the multi-threshold setting (e.g., Appendix D.2). 5 Simulation Experiments Comparison of Methods to Solve Multiple Thresholds. We compared our multiple threshold method against multiple baselines (see Appendix D for more details) in a range of simulation settings (see Appendix E.1). Figure 4 shows the results. We see that our approach is consistently amongst the best performing methods. The primary competitor is the circuit of constraints approach from [11] (see Appendix D.3 for a comparison of the theoretical guarantees). We also note that all approaches dramatically outperform their worst-case guarantees. Percentile 0 50 100 Cost 25 30 35 40 45 50 Cost for Setting A Percentile 0 50 100 Cost 20 25 30 35 Cost for Setting B Percentile 0 50 100 Cost 20 25 30 35 Cost for Setting C Multiple Threshold (Def 4.4) Alternative (Def D.1) Circuit (Def D.6) Forward (Sec D.1) Backward (Sec D.1) Figure 4: Comparison against baselines in three simulation settings. Validating Approximation Tolerances. We also validated the efficacy of our approximate thresholds relaxation (see Appendix E.2 for more details of the setup). Figure 5 shows the results. We see that the actual deviation from the original smooth ISSC problem is much smaller than the specified ϵ, which suggests that our guarantees are rather conservative. For instance, at ϵ = 15, the algorithm is allowed to terminate immediately. We also see that the cost to completion steadily decreases as ϵ increases, which agrees with our theoretical results. 0 5 10 15 20 25 Cost 26 28 30 32 34 Cost vs 0 0 5 10 15 20 25 Deviation 0 0.5 1 1.5 2 Deviation vs 0 Figure 5: Comparing cost and deviation from the exact function for varying ϵ. 6 Summary of Results & Discussion Figure 6 summarizes the size of ¯Fmax (or ¯F ′ max for real-valued functions) for the various settings. Recall that our cost guarantees take the form (1 + ln ¯Fmax)OPT. When Fh are real-valued, then we instead solve the smooth ISSC problem approximately with cost guarantee (1 + ln ¯F ′ max)OPT. Our results are well developed for many different versions of the utility functions Fh, but are less flexible for the distance functions Gh. For example, even for rational-valued Gh, ¯Fmax scales as DN G , which is not desirable. The restriction of Gh to be rational (or integral) leads to a relatively straightforward reduction of the continuous convex version of α(·) to a multiple thresholds version. 7 In fact, our formulation can be extended to deal with real-valued Gh and κn in the multiple thresholds version; however the resulting ¯F is no longer guaranteed to be submodular. It is possible that a different assumption than the one imposed in Condition 4.5 is required to prove more general results. F G Multiple Thresholds Convex Threshold Curve Rational Rational |H|α1DF DN G QN i=1(κi −κi−1) |H|α1DF DN G Real Rational |H|α′ 1DN G QN i=1 (κi −κi−1) |H|α′ 1DN G Figure 6: Summarizing ¯Fmax. When Fh are real-valued, we show ¯F ′ max instead. Our analysis appears to be overly conservative for many settings. For instance, all the approaches we evaluated empirically achieved much better performance than their worst-case guarantees. It would be interesting to identify ways to constrain the problem and develop tighter theoretical guarantees. 7 Other Related Work Submodular optimization is an important problem that arises across many settings, including sensor placements [16, 15], summarization [26, 17, 23], inferring latent influence networks [8], diversified recommender systems [5, 4, 25, 21], and multiple solution prediction [1, 3, 22, 19]. However, the majority of previous work has focused on offline submodular optimization whereby the submodular function to be optimized is fixed a priori (i.e., does not vary depending on feedback). There are two typical ways that a submodular optimization problem can be made interactive. The first is in online submodular optimization, where an unknown submodular function must be reoptimized repeatedly over many sessions in an online or repeated-games fashion [20, 25, 21]. In this setting, feedback is typically provided only at the conclusion of a session, and so adapting from feedback is performed between sessions. In other words, each session consists of a non-interactive submodular optimization problem, and the technical challenge stems from the fact that the submodular function is unknown a priori and must be learned from feedback provided post optimization in each session – this setting is often referred to as inter-session interactive optimization. The other way to make submodular optimization interactive, which we consider in this paper, is to make feedback available immediately after each action taken. In this way, one can simultaneously learn about and optimize for the unknown submodular function within a single optimization session – this setting is often referred to as intra-session interactive optimization. One can also consider settings that allow for both intra-session and inter-session interactive optimization. Perhaps the most well-studied application of intra-session interactive submodular optimization is active learning [10, 7, 11, 9, 2, 14, 13], where the goal is to quickly reduce the hypothesis class to some target residual uncertainty for planning or decision making. Many instances of noisy and approximate active learning can be formulated as an interactive submodular set cover problem [9]. A related setting is adaptive submodularity [7, 2, 6, 13], which is a probabilistic setting that essentially requires that the conditional expectation over the hypothesis set of submodular functions is itself a submodular function. In contrast, we require that the hypothesis class be pointwise submodular (i.e., each hypothesis corresponds to a different submodular utility function). Although neither adaptive submodularity nor pointwise submodularity is a strict generalization of the other (cf. [7, 9]), in practice it can often be easier to model application settings using pointwise submodularity. The “flipped” problem is to maximize utility with a bounded budget, which is commonly known as the budgeted submodular maximization problem [18]. Interactive budgeted maximization has been analyzed rigorously for adaptive submodular problems [7], but it remains a challenge to develop provably near-optimal interactive algorithms for pointwise submodular utility functions. 8 Conclusions We introduced smooth interactive submodular set cover, a smoothed generalization of previous ISSC frameworks. Smooth ISSC allows for the target threshold to vary based on the plausibility of the hypothesis. Smooth ISSC also introduces an approximate threshold solution concept that can be applied to real-valued functions, which also applies to basic submodular set cover with real-valued objectives. We developed the first provably near-optimal algorithm for this setting. 8 References [1] Dhruv Batra, Payman Yadollahpour, Abner Guzman-Rivera, and Gregory Shakhnarovich. Diverse m-best solutions in markov random fields. In European Conference on Computer Vision (ECCV), 2012. [2] Yuxin Chen and Andreas Krause. Near-optimal batch mode active learning and adaptive submodular optimization. In International Conference on Machine Learning (ICML), 2013. [3] Debadeepta Dey, Tommy Liu, Martial Hebert, and J. Andrew Bagnell. Contextual sequence prediction via submodular function optimization. In Robotics: Science and Systems Conference (RSS), 2012. [4] Khalid El-Arini and Carlos Guestrin. Beyond keyword search: discovering relevant scientific literature. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2011. [5] Khalid El-Arini, Gaurav Veda, Dafna Shahaf, and Carlos Guestrin. Turning down the noise in the blogosphere. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2009. [6] Victor Gabillon, Branislav Kveton, Zheng Wen, Brian Eriksson, and S. Muthukrishnan. Adaptive submodular maximization in bandit setting. In Neural Information Processing Systems (NIPS), 2013. [7] Daniel Golovin and Andreas Krause. Adaptive submodularity: A new approach to active learning and stochastic optimization. In Conference on Learning Theory (COLT), 2010. [8] Manuel Gomez Rodriguez, Jure Leskovec, and Andreas Krause. Inferring networks of diffusion and influence. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2010. [9] Andrew Guillory. Active Learning and Submodular Functions. PhD thesis, University of Washington, 2012. [10] Andrew Guillory and Jeff Bilmes. Interactive submodular set cover. In International Conference on Machine Learning (ICML), 2010. [11] Andrew Guillory and Jeff Bilmes. Simultaneous learning and covering with adversarial noise. In International Conference on Machine Learning (ICML), 2011. [12] Steve Hanneke. The complexity of interactive machine learning. Master’s thesis, Carnegie Mellon University, 2007. [13] Shervin Javdani, Yuxin Chen, Amin Karbasi, Andreas Krause, J. Andrew Bagnell, and Siddhartha Srinivasa. Near optimal bayesian active learning for decision making. In Conference on Artificial Intelligence and Statistics (AISTATS), 2014. [14] Shervin Javdani, Matthew Klingensmith, J. Andrew Bagnell, Nancy Pollard, and Siddhartha Srinivasa. Efficient touch based localization through submodularity. In IEEE International Conference on Robotics and Automation (ICRA), 2013. [15] Andreas Krause, Ajit Singh, and Carlos Guestrin. Near-optimal sensor placements in gaussian processes. In International Conference on Machine Learning (ICML), 2005. [16] Jure Leskovec, Andreas Krause, Carlos Guestrin, Christos Faloutsos, Jeanne VanBriesen, and Natalie Glance. Cost-effective outbreak detection in networks. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2007. [17] Hui Lin and Jeff Bilmes. Learning mixtures of submodular shells with application to document summarization. In Conference on Uncertainty in Artificial Intelligence (UAI), 2012. [18] George Nemhauser, Laurence Wolsey, and Marshall Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14(1):265–294, 1978. [19] Adarsh Prasad, Stefanie Jegelka, and Dhruv Batra. Submodular meets structured: Finding diverse subsets in exponentially-large structured item sets. In Neural Information Processing Systems (NIPS), 2014. [20] Filip Radlinski, Robert Kleinberg, and Thorsten Joachims. Learning diverse rankings with multi-armed bandits. In International Conference on Machine Learning (ICML), 2008. [21] Karthik Raman, Pannaga Shivaswamy, and Thorsten Joachims. Online learning to diversify from implicit feedback. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2012. [22] Stephane Ross, Jiaji Zhou, Yisong Yue, Debadeepta Dey, and J. Andrew Bagnell. Learning policies for contextual submodular prediction. In International Conference on Machine Learning (ICML), 2013. [23] Sebastian Tschiatschek, Rishabh Iyer, Haochen Wei, and Jeff Bilmes. Learning mixtures of submodular functions for image collection summarization. In Neural Information Processing Systems (NIPS), 2014. [24] Laurence A Wolsey. An analysis of the greedy algorithm for the submodular set covering problem. Combinatorica, 2(4):385–393, 1982. [25] Yisong Yue and Carlos Guestrin. Linear submodular bandits and their application to diversified retrieval. In Neural Information Processing Systems (NIPS), 2011. [26] Yisong Yue and Thorsten Joachims. Predicting diverse subsets using structural svms. In International Conference on Machine Learning (ICML), 2008. 9 | 2015 | 327 |
5,844 | Column Selection via Adaptive Sampling Saurabh Paul Global Risk Sciences, Paypal Inc. saupaul@paypal.com Malik Magdon-Ismail CS Dept., Rensselaer Polytechnic Institute magdon@cs.rpi.edu Petros Drineas CS Dept., Rensselaer Polytechnic Institute drinep@cs.rpi.edu Abstract Selecting a good column (or row) subset of massive data matrices has found many applications in data analysis and machine learning. We propose a new adaptive sampling algorithm that can be used to improve any relative-error column selection algorithm. Our algorithm delivers a tighter theoretical bound on the approximation error which we also demonstrate empirically using two well known relative-error column subset selection algorithms. Our experimental results on synthetic and real-world data show that our algorithm outperforms non-adaptive sampling as well as prior adaptive sampling approaches. 1 Introduction In numerous machine learning and data analysis applications, the input data are modelled as a matrix A ∈Rm×n, where m is the number of objects (data points) and n is the number of features. Often, it is desirable to represent your solution using a few features (to promote better generalization and interpretability of the solutions), or using a few data points (to identify important coresets of the data), for example PCA, sparse PCA, sparse regression, coreset based regression, etc. [1, 2, 3, 4]. These problems can be reduced to identifying a good subset of the columns (or rows) in the data matrix, the column subset selection problem (CSSP). For example, finding an optimal sparse linear encoder for the data (dimension reduction) can be explicitly reduced to CSSP [5]. Motivated by the fact that in many practical applications, the left and right singular vectors of a matrix A lacks any physical interpretation, a long line of work [6, 7, 8, 9, 10, 11, 12, 13, 14, 15], focused on extracting a subset of columns of the matrix A, which are approximately as good as Ak at reconstructing A. To make our discussion more concrete, let us formally define CSSP. Column Subset Selection Problem, CSSP: Find a matrix C ∈Rm×c containing c columns of A for which
A −CC+A
F is small.1 In the prior work, one measures the quality of a CSSPsolution against Ak, the best rank-k approximation to A obtained via the singular value decomposition (SVD), where k is a user specified target rank parameter. For example, [15] gives efficient algorithms to find C with c ≈2k/ϵ columns, for which
A −CC+A
F ≤(1 + ϵ) ∥A −Ak∥F . Our contribution is not to directly attack CSSP. We present a novel algorithm that can improve an existing CSSP algorithm by adaptively invoking it, in a sense actively learning which columns to sample next based on the columns you have already sampled. If you use the CSSP-algorithm from [15] as a strawman benchmark, you can obtain c columns all at once and incur an error roughly (1 + 2k/c) ∥A −Ak∥F . Or, you can invoke the algorithm to obtain, for example, c/2 columns, and then allow the algorithm to adapt to the columns already chosen (for example by modifying A) before choosing the remaining c/2 columns. We refer to the former as continued sampling and to the 1CC+A is the best possible reconstruction of A by projection into the space spanned by the columns of C. 1 latter as adaptive sampling. We prove performance guarantees which show that adaptive sampling improves upon continued sampling, and we present experiments on synthetic and real data that demonstrate significant empirical performance gains. 1.1 Notation A, B, . . . denote matrices and a, b, . . . denote column vectors; In is the n × n identity matrix. [A, B] and [A; B] denote matrix concatenation operations in a column-wise and row-wise manner, respectively. Given a set S ⊆{1, . . . n}, AS is the matrix that contains the columns of A ∈Rm×n indexed by S. Let rank(A) = ρ ≤min {m, n}. The (economy) SVD of A is A = (Uk Uρ−k) Σk 0 0 Σρ−k VT k VT ρ−k = ρ X i=1 σi(A)uivT i where Uk ∈Rm×k and Uρ−k ∈Rm×(ρ−k) contain the left singular vectors ui, Vk ∈Rn×k and Vρ−k ∈Rn×(ρ−k) contain the right singular vectors vi, and Σ ∈Rρ×ρ is a diagonal matrix containing the singular values σ1(A) ≥. . . ≥σρ(A) > 0. The Frobenius norm of A is ∥A∥2 F = P i,j A2 ij; Tr(A) is the trace of A; the pseudoinverse of A is A+ = VΣ−1UT ; and, Ak, the best rank-k approximation to A under any unitarily invariant norm is Ak = UkΣkVT k = Pk i=1 σiuivT i . 1.2 Our Contribution: Adaptive Sampling We design a novel CSSP-algorithm that adaptively selects columns from the matrix A in rounds. In each round we remove from A the information that has already been “captured” by the columns that have been thus far selected. Algorithm 1 selects tc columns of A in t rounds, where in each round c columns of A are selected using a relative-error CSSP-algorithm from prior work. Input: A ∈Rm×n; target rank k; # rounds t; columns per round c Output: C ∈Rm×tc, tc columns of A and S, the indices of those columns. 1: S = {}; E0 = A 2: for ℓ= 1, · · · , t do 3: Sample indices Sℓof c columns from Eℓ−1 using a CSSP-algorithm. 4: S ←S ∪Sℓ. 5: Set C = AS and Eℓ= A −(CC+A)ℓk. 6: return C, S Algorithm 1: Adaptive Sampling At round ℓin Step 3, we compute column indices S (and C = AS) using a CSSP-algorithm on the residual Eℓ−1 of the previous round. To compute this residual, remove from A the best rank-(ℓ−1)k approximation to A in the span of the columns selected from the first ℓ−1 rounds, Eℓ−1 = A −(CC+A)(ℓ−1)k. A similar strategy was developed in [8] with sequential adaptive use of (additive error) CSSPalgorithms. These (additive error) CSSP-algorithms select columns according to column norms [11]. In [8], the residual in step 5 is defined differently, as Eℓ= A −CC+A. To motivate our result, it helps to take a closer look at the reconstruction error E = A −CC+A after t adaptive rounds of the strategy in [8] with the CSSP-algorithm in [11]. # rounds Continued sampling: tc columns using CSSP-algorithm from [11]. (ϵ = k/c) Adaptive sampling: t rounds of the strategy in [8] with the CSSP-algorithm from [11]. t = 2 ∥E∥2 F ≤∥A −Ak∥2 F + ϵ 2 ∥A∥2 F ∥E∥2 F ≤(1 + ϵ) ∥A −Ak∥2 F + ϵ2 ∥A∥2 F t ∥E∥2 F ≤∥A −Ak∥2 F + ϵ t ∥A∥2 F ∥E∥2 F ≤(1 + O(ϵ)) ∥A −Ak∥2 F +ϵt ∥A∥2 F 2 Typically ∥A∥2 F ≫∥A −Ak∥2 F and ϵ is small (i.e., c ≫k), so adaptive sampling `a la [8] wins over continued sampling for additive error CSSP-algorithms. This is especially apparent after t rounds, where continued sampling only attenuates the big term ∥A∥2 F by ϵ/t, but adaptive sampling exponentially attenuates this term by ϵt. Recently, powerful CSSP-algorithms have been developed which give relative-error guarantees [15]. We can use the adaptive strategy from [8] together with these newer relative error CSSP-algorithms. If one carries out the analysis from [8] by replacing the additive error CSSP-algorithm from [11] with the relative error CSSP-algorithm in [15], the comparison of continued and adaptive sampling using the strategy from [8] becomes (t = 2 rounds suffices to see the problem): # rounds Continued sampling: tc columns using CSSP-algorithm from [15]. (ϵ = 2k/c) Adaptive sampling: t rounds of the strategy in [8] with the CSSP-algorithm from [15]. t = 2 ∥E∥2 F ≤ 1 + ϵ 2 ∥A −Ak∥2 F ∥E∥2 F ≤ 1 + ϵ 2 + ϵ2 2 ∥A −Ak∥2 F Adaptive sampling from [8] gives a worse theoretical guarantee than continued sampling for relative error CSSP-algorithms. In a nutshell, no matter how many rounds of adaptive sampling you do, the theoretical bound will not be better than (1 + k/c)∥A −Ak∥2 F if you are using a relative error CSSP-algorithm. This raises an obvious question: is it possible to combine relative-error CSSPalgorithms with adaptive sampling to get (provably and empirically) improved CSSP-algorithms? The approach of [8] does not achieve this objective. We provide a positive answer to this question. Our approach is a subtle modification to the approach in [8]: in Step 5 of Algorithm 1. When we compute the residual matrix in round ℓ, we subtract (CC+A)ℓk from A, the best rank-ℓk approximation to the projection of A onto the current columns selected, as opposed to subtracting the full projection CC+A. This subtle change, is critical in our new analysis which gives a tighter bound on the final error, allowing us to boost relative-error CSSP-algorithms. For t = 2 rounds of adaptive sampling, we get a reconstruction error of ∥E∥2 F ≤(1 + ϵ) ∥A −A2k∥2 F + ϵ(1 + ϵ) ∥A −Ak∥2 F , where ϵ = 2k/c. The critical improvement in the bound is that the dominant O(1)-term depends on ∥A −A2k∥2 F , and the dependence on ∥A −Ak∥2 F is now O(ϵ). To highlight this improved theoretical bound in an extreme case, consider a matrix A that has rank exactly 2k, then ∥A −A2k∥F = 0. Continued sampling gives an error-bound (1+ ϵ 2)∥A −Ak∥2 F , where as our adaptive sampling gives an error-bound (ϵ + ϵ2)∥A −Ak∥2 F , which is clearly better in this extreme case. In practice, data matrices have rapidly decaying singular values, so this extreme case is not far from reality (See Figure 1). 0 20 40 60 80 100 0 200 400 600 800 1000 Singular Values of TechTC−300 avgd over 49 datasets Singular Values 0 200 400 600 800 1000 1200 0 200 400 600 800 Singular Values of HGDP avgd over 22 chromosomes Singular Values Figure 1: Figure showing the singular value decay for two real world datasets. To state our main theoretical result, we need to more formally define a relative error CSSP-algorithm. Definition 1 (Relative Error CSSP-algorithm A(X, k, c)). A relative error CSSP-algorithm A takes as input a matrix X, a rank parameter k < rank(X) and a number of columns c, and outputs column indices S with |S| = c, so that the columns C = XS satisfy: EC h ∥X −(CC+X)k∥ 2 F i ≤(1 + ϵ(c, k))∥X −Xk∥2 F , 3 where ϵ(c, k) depends on A and the expectation is over random choices made in the algorithm.2 Our main theorem bounds the reconstruction error when our adaptive sampling approach is used to boost A. The boost in performance depends on the decay of the spectrum of A. Theorem 1. Let A ∈Rm×n be a matrix of rank ρ and let k < ρ be a target rank. If, in Step 3 of Algorithm 1, we use the relative error CSSP-algorithm A with ϵ(c, k) = ϵ < 1, then EC h ∥A −(CC+A)tk∥ 2 F i ≤(1 + ϵ) ∥A −Atk∥2 F + ϵ t−1 X i=1 (1 + ϵ)t−i ∥A −Aik∥2 F . Comments. 1. The dominant O(1) term in our bound is ∥A −Atk∥F , not ∥A −Ak∥F . This is a major improvement since the former is typically much smaller than the latter in real data. Further, we need a bound on the reconstruction error ∥A −CC+A∥F . Our theorem give a stronger result than needed because ∥A −CC+A∥F ≤∥A −(CC+A)tk∥F . 2. We presented our result for the case of a relative error CSSP-algorithm with a guarantee on the expected reconstruction error. Clearly, if the CSSP-algorithm is deterministic, then Theorem 1 will also hold deterministically. The result in Theorem 1 can also be boosted to hold with high probability, by repeating the process log 1 δ times and picking the columns which performed best. Then, with probability at least 1 −δ, ∥A −(CC+A)tk∥ 2 F ≤(1 + 2ϵ) ∥A −Atk∥2 F + 2ϵ t−1 X i=1 (1 + ϵ)t−i ∥A −Aik∥2 F . If the CSSP-algorithm itself only gives a high-probability (at least 1−δ) guarantee, then the bound in Theorem 1 also holds with high probability, at least 1 −tδ, which is obtained by applying a union bound to the probability of failure in each round. 3. Our results hold for any relative error CSSP-algorithm combined with our adaptive sampling strategy. The relative error CSSP-algorithm in [15] has ϵ(c, k) ≈2k/c. The relative error CSSPalgorithm in [16] has ϵ(c, k) = O(k log k/c). Other algorithms can be found in [8, 9, 17]. We presented the simplest form of the result, which can be generalized to sample a different number of columns in each round, or even use a different CSSP-algorithm in each round. We have not optimized the sampling schedule, i.e. how many columns to sample in each round. At the moment, this is largely dictated by the CSSP algorithm itself, which requires a minimum number of samples in each round to give a theoretical guarantee. From the empirical perspective (for example using leverage score sampling to select columns), strongest performance may be obtained by adapting after every column is selected. 4. In the context of the additive error CSSP-algorithm from [11], our adaptive sampling strategy gives a theoretical performance guarantee which is at least as good as the adaptive sampling strategy from [8]. Lastly, we also provide the first empirical evaluation of adaptive sampling algorithms. We implemented our algorithm using two relative-error column selection algorithms (the near-optimal column selection algorithm of [18, 15] and the leverage-score sampling algorithm of [19]) and compared it against the adaptive sampling algorithm of [8] on synthetic and real-world data. The experimental results show that our algorithm outperforms prior approaches. 1.3 Related Work Column selection algorithms have been extensively studied in prior literature. Such algorithms include rank-revealing QR factorizations [6, 20] for which only weak performance guarantees can be derived. The QR approach was improved in [21] where the authors proposed a memory efficient implementation. The randomized additive error CSSP-algorithm [11] was a breakthrough, which led to a series of improvements producing relative CSSP-algorithms using a variety of randomized and 2For an additive-error CSSP algorithm, EC h ∥X −(CC+X)k∥ 2 F i ≤∥X −Xk∥2 F + ϵ(c, k)∥X∥2 F . 4 deterministic techniques. These include leverage score sampling [19, 16], volume sampling [8, 9, 17], the two-stage hybrid sampling approach of [22], the near-optimal column selection algorithms of [18, 15], as well as deterministic variants presented in [23]. We refer the reader to Section 1.5 of [15] for a detailed overview of prior work. Our focus is not on CSSP-algorithms per se, but rather on adaptively invoking existing CSSP-algorithms. The only prior adaptive sampling with a provable guarantee was introduced in [8] and further analyzed in [24, 9, 25]; this strategy is specifically boosts the additive error CSSP-algorithm, but does not work with relative error CSSP-algorithms which are currently in use. Our modification of the approach in [8] is delicate, but crucial to the new analysis we perform in the context of relative error CSSP-algorithms. Our work is motivated by relative error CSSP-algorithms satisfying definition 1. Such algorithms exist which give expected guarantees [15] as well as high probability guarantees [19]. Specifically, given X ∈Rm×n and a target rank k, the leverage-score sampling approach of [19] selects c = O k/ϵ2 log k/ϵ2 columns of A to form a matrix C ∈Rm×c to give a (1+ϵ)-relative error with probability at least 1 −δ. Similarly, [18, 15] proposed near-optimal relative error CSSP-algorithms selecting c ≈2c/ϵ columns and giving a (1 + ϵ)-relative error guarantee in expectation, which can be boosted to a high probability guarantee via independent repetition. 2 Proof of Theorem 1 We now prove the main result which analyzes the performance of our adaptive sampling in Algorithm 1 for a relative error CSSP-algorithm. We will need the following linear algebraic Lemma. Lemma 1. Let X, Y ∈Rm×n and suppose that rank(Y) = r. Then, σi(X −Y) ≥σr+i(X). Proof. Observe that σi(X −Y) = ∥(X −Y) −(X −Y)i−1∥2. The claim is now immediate from the Eckart-Young theorem because Y + (X −Y)i−1 has rank at most r + i −1, therefore σi(X −Y) = ∥X −(Y + (X −Y)i−1)∥2 ≥∥X −Xr+i−1∥2 = σr+i(X). We are now ready to prove Theorem 1 by induction on t, the number of rounds of adaptive sampling. When t = 1, the claim is that E h ∥A −(CC+A)k∥ 2 F i ≤(1 + ϵ) ∥A −Ak∥2 F , which is immediate from the definition of the relative error CSSP-algorithm. Now for the induction. Suppose that after t rounds, columns Ct are selected, and we have the induction hypothesis that ECt h ∥A −(CtCt+A)tk∥ 2 F i ≤(1 + ϵ) ∥A −Atk∥2 F + ϵ t−1 X i=1 (1 + ϵ)t−i ∥A −Aik∥2 F . (1) In the (t + 1)th round, we use the residual Et = A −(CtCt+A)tk to select new columns C′. Our relative error CSSP-algorithm A gives the following guarantee: EC′ h ∥Et −(C′C′+Et)k∥ 2 F Eti ≤ (1 + ϵ)
Et −Et k
2 F = (1 + ϵ)
Et
2 F − k X i=1 σ2 i (Et) ! ≤ (1 + ϵ)
Et
2 F − k X i=1 σ2 tk+i(A) ! . (2) (The last step follows because σ2 i (Et) = σ2 i (A −(CtCt+A)tk) and we can apply Lemma 1 with X = A, Y = (CtCt+A)tk and r = rank(Y) = tk, to obtain σ2 i (Et) ≥σ2 tk+i(A).) We now take 5 the expectation of both sides with respect to the columns Ct, ECt h EC′ h ∥Et −(C′C′+Et)k∥ 2 F Etii ≤ (1 + ϵ) ECt h
Et
2 F i − k X i=1 σ2 tk+i(A) ! . (a) ≤ (1 + ϵ)2∥A −Atk∥2 F + ϵ t−1 X i=1 (1 + ϵ)t+1−i ∥A −Aik∥2 F −(1 + ϵ) k X i=1 σ2 tk+i(A) = (1 + ϵ) ∥A −Atk∥2 F − k X i=1 σ2 tk+i(A) ! + ϵ(1 + ϵ)∥A −Atk∥2 F +ϵ t−1 X i=1 (1 + ϵ)t+1−i ∥A −Aik∥2 F = (1 + ϵ)∥A −A(t+1)k∥2 F + ϵ t X i=1 (1 + ϵ)t+1−i ∥A −Aik∥2 F (3) (a) follows, because of the induction hypothesis (eqn. 1). The columns chosen after round t + 1 are Ct+1 = [Ct, C′]. By the law of iterated expectation, ECt h EC′ h ∥Et −(C′C′+Et)k∥ 2 F Etii = ECt+1 h ∥Et −(C′C′+Et)k∥ 2 F i . Observe that Et −(C′C′+Et)k = A −(CtCt+A)tk −(C′C′+Et)k = A −Y, where Y is in the column space of Ct+1 = [Ct, C′]; further, rank(Y) ≤(t+1)k. Since (Ct+1Ct+1+A)(t+1)k is the best rank-(t + 1)k approximation to A in the column space of Ct+1, for any realization of Ct+1, ∥A −(Ct+1Ct+1+A)(t+1)k∥ 2 F ≤∥Et −(C′C′+Et)k∥ 2 F . (4) Combining (4) with (3), we have that ECt+1 ∥A −(Ct+1Ct+1+A)(t+1)k∥ 2 F ≤(1+ϵ)∥A −A(t+1)k∥2 F +ϵ t X i=1 (1+ϵ)t+1−i ∥A −Aik∥2 F . This is the desired bound after t + 1 rounds, concluding the induction. It is instructive to understand where our new adaptive sampling strategy is needed for the proof to go through. The crucial step is (2) where we use Lemma 1 – it is essential that the residual was a low-rank perturbation of A. 3 Experiments We compared three adaptive column sampling methods, using two real and two synthetic data sets.3 Adaptive Sampling Methods ADP-AE: the prior adaptive method which uses the additive error CSSP-algorithm [8]. ADP-LVG: our new adaptive method using the relative error CSSP-algorithm [19]. ADP-Nopt: our adaptive method using the near optimal relative error CSSP-algorithm [15]. Data Sets HGDP 22 chromosomes: SNPs human chromosome data from the HGDP database [26]. We use all 22 chromosome matrices (1043 rows; 7,334-37,493 columns) and report the average. Each matrix contains +1, 0, −1 entries, and we randomly filled in missing entries. TechTC-300: 49 document-term matrices [27] (150-300 rows (documents); 10,000-40,000 columns (words)). We kept 5-letter or larger words and report averages over 49 data-sets. Synthetic 1: Random 1000 × 10000 matrices with σi = i−0.3 (power law). Synthetic 2: Random 1000 × 10000 matrices with σi = exp(1−i)/10 (exponential). 3ADP-Nopt: has two stages. The first stage is a deterministic dual set spectral-Frobenius column selection in which ties could occur. We break ties in favor of the column not already selected with the maximum norm. 6 For randomized algorithms, we repeat the experiments five times and take the average. We use the synthetic data sets to provide a controlled environment in which we can see performance for different types of singular value spectra on very large matrices. In prior work it is common to report on the quality of the columns selected C by comparing the best rank-k approximation within the columnspan of C to Ak. Hence, we report the relative error
A −(CC+A)k
F / ∥A −Ak∥F when comparing the algorithms. We set the target rank k = 5 and the number of columns in each round to c = 2k. We have tried several choices for k and c and the results are qualitatively identical so we only report on one choice. Our first set of results in Figure 2 is to compare the prior adaptive algorithm ADP-AE with the new adaptive ones ADP-LVG and ADP-Nopt which boose relative error CSSPalgorithms. Our two new algorithms are both performing better the prior existing adaptive sampling algorithm. Further, ADP-Nopt is performing better than ADP-LVG, and this is also not surprising, because ADP-Nopt produces near-optimal columns – if you boost a better CSSP-algorithm, you get better results. Further, by comparing the performance on Synthetic 1 with Synthetic 2, we see that our algorithm (as well as prior algorithms) gain significantly in performance for rapidly decaying singular values; our new theoretical analysis reflects this behavior, whereas prior results do not. 1 2 3 4 5 1 1.02 1.04 1.06 HGDP 22 chromosomes, k:10,c=2k # of rounds ||A−(CC+A)k||F/||A−Ak||F ADP−AE ADP−LVG ADP−Nopt The theory bound depends on ϵ = c/k. The figure to the right shows a result for k = 10; c = 2k (k increases but ϵ is constant). Comparing the figure with the HGDP plot in Figure 2, we see that the quantitative performance is approximately the same, as the theory predicts (since c/k has not changed). The percentage error stays the same even though we are sampling more columns because the benchmark ∥A −Ak∥F also get smaller when k increases. Since ADP-Nopt is the superior algorithm, we continue with results only for this algorithm. 1 2 3 4 5 # of rounds 1 1.05 1.1 1.15 1.2 ||A-(CC+A)k||F/||A-Ak||F TechTC-300 49 Datasets, k:5,c=2k ADP-AE ADP-LVG ADP-Nopt Our next experiment is to test which adaptive strategy works better in practice given the same initial selection of columns. That is, in Figure 2, ADP-AE uses an adaptive sampling based on the residual A −CC+A and then adaptively samples according to the adaptive strategy in [8]; the initial columns are chosen with the additive error algorithm. Our approach chooses initial columns with the relative error CSSP-algorithm and then continues to sample adaptively based on the relative error CSSP-algorithm and the residual A − (CC+A)tk. We now give all the adaptive sampling algorithms the benefit of the near-optimal initial columns chosen in the first round by the algorithm from [15]. The result shown to the right confirms that ADP-Nopt is best even if all adaptive strategies start from the same initial near-optimal columns. 1 2 3 4 5 # of rounds 1 1.005 1.01 1.015 1.02 ||A-(CC+A)k||F/||A-Ak||F TechTC300 49 datasets, k:5,c:2k ADP-Nopt SEQ-Nopt Adaptive versus Continued Sequential Sampling. Our last experiment is to demonstrate that adaptive sampling works better than continued sequential sampling. We consider the relative error CSSP-algorithm in [15] in two modes. The first is ADP-Nopt, which is our adaptive sampling algorithms which selects tc columns in t rounds of c columns each. The second is SEQ-Nopt, which is just the relative error CSSP-algorithm in [15] sampling tc columns, all in one go. The results are shown on the right. The adaptive boosting of the relative error CSSP-algorithm can gives up to a 1% improvement in this data set. 7 1 2 3 4 5 1 1.02 1.04 1.06 HGDP 22 chromosomes, k:5,c=2k # of rounds ||A−(CC+A)k||F/||A−Ak||F ADP−AE ADP−LVG ADP−Nopt 1 2 3 4 5 1 1.05 1.1 1.15 TechTC−300 49 Datasets, k:5,c=2k # of rounds ||A−(CC+A)k||F/||A−Ak||F ADP−AE ADP−LVG ADP−Nopt 1 2 3 4 5 1 1.01 1.02 1.03 1.04 Synthetic Data 1, k:5,c=2k # of rounds ||A−(CC+A)k||F/||A−Ak||F ADP−AE ADP−LVG ADP−Nopt 1 2 3 4 5 1 1.05 1.1 Synthetic Data 2, k:5,c=2k # of rounds ||A−(CC+A)k||F/||A−Ak||F ADP−AE ADP−LVG ADP−Nopt Figure 2: Plots of relative error ratio
A −(CC+A)k
F / ∥A −Ak∥F for various adaptive sampling algorithms for k = 5 and c = 2k. In all cases, performance improves with more rounds of sampling, and rapidly converges to a relative reconstruction error of 1. This is most so in data matrices with singular values that decay quickly (such as TectTC and Synthetic 2). The HGDP singular values decay slowly because missing entries are selected randomly, and Synthetic 1 has slowly decaying power-law singular values by construction. 4 Conclusion We present a new approach for adaptive sampling algorithms which can boost relative error CSSPalgorithms, in particular the near optimal CSSP-algorithm in [15]. We showed theoretical and experimental evidence that our new adaptively boosted CSSP-algorithm is better than the prior existing adaptive sampling algorithm which is based on the additive error CSSP-algorithm in [11]. We also showed evidence (theoretical and empirical) that our adaptive sampling algorithms are better than sequentially sampling all the columns at once. In particular, our theoretical bounds give a result which is tighter for matrices whose singular values decay rapidly. Several interesting questions remain. We showed that the simplest adaptive sampling algorithm which samples a constant number of columns in each round improves upon sequential sampling all at once. What is the optimal sampling schedule, and does it depend on the singular value spectrum of the data matric? In particular, can improved theoretical bounds or empirical performance be obtained by carefully choosing how many columns to select in each round? It would also be interesting to see the improved adaptive sampling boosting of CSSP-algorithms in the actual applications which require column selection (such as sparse PCA or unsupervised feature selection). How do the improved theoretical estimates we have derived carry over to these problems (theoretically or empirically)? We leave these directions for future work. Acknowledgements Most of the work was done when SP was a graduate student at RPI. PD was supported by IIS1447283 and IIS-1319280. 8 References [1] Christos Boutsidis, Petros Drineas, and Malik Magdon-Ismail. Near optimal coresets for least-squares regression. IEEE Transactions on Information Theory, 59(10), October 2013. [2] C. Boutsidis and M. Magdon-Ismail. A note on sparse least-squares regression. Information Processing Letters, 115(5):273–276, 2014. [3] Christos Boutsidis and Malik Magdon-Ismail. Deterministic feature selection for k-means clustering. IEEE Transactions on Information Theory, 59(9), September 2013. [4] Christos Boutsidis, Petros Drineas, and Malik Magdon-Ismail. Sparse features for pca-like regression. In Proc. 25th Annual Conference on Neural Information Processing Systems (NIPS), 2011. to appear. [5] Malik Magdon-Ismail and Christos Boutsidis. Optimal sparse linear auto-encoders and sparse pca. arXiv:1502.06626, 2015. [6] T. F. Chan and P. C. Hansen. Some applications of the rank revealing QR factorization. SIAM J. Sci. Stat. Comput., 13(3):727–741, 1992. [7] A. Deshpande and L. Rademacher. Efficient volume sampling for row/column subset selection. In Proceedings of the IEEE 51st FOCS, pages 329–338, 2010. [8] A. Deshpande and S. Vempala. Adaptive sampling and fast low-rank matrix approximation. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 292–303. Springer, 2006. [9] A. Deshpande, L. Rademacher, S. Vempala, and G. Wang. Matrix approximation and projective clustering via volume sampling. Theory of Computing, 2(1):225–247, 2006. [10] P. Drineas, I. Kerenidis, and P. Raghavan. Competitive recommendation systems. In Proceedings of the 34th STOC, pages 82–90, 2002. [11] A. Frieze, R. Kannan, and S. Vempala. Fast monte-carlo algorithms for finding low-rank approximations. Journal of the ACM (JACM), 51(6):1025–1041, 2004. [12] N. Halko, P. G. Martinsson, and J. A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Rev., 53(2):217–288, May 2011. [13] E. Liberty, F. Woolfe, P.G. Martinsson, V. Rokhlin, and M. Tygert. Randomized algorithms for the lowrank approximation of matrices. PNAS, 104(51):20167–20172, 2007. [14] Michael W Mahoney and Petros Drineas. CUR matrix decompositions for improved data analysis. PNAS, 106(3):697–702, 2009. [15] C. Boutsidis, P. Drineas, and M. Magdon-Ismail. Near-optimal column-based matrix reconstruction. SIAM Journal of Computing, 43(2):687–717, 2014. [16] P. Drineas, M. W Mahoney, and S Muthukrishnan. Subspace sampling and relative-error matrix approximation: Column-based methods. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 316–326. Springer, 2006. [17] Venkatesan Guruswami and Ali Kemal Sinop. Optimal column-based low-rank matrix reconstruction. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1207–1214, 2012. [18] C. Boutsidis, P. Drineas, and M. Magdon-Ismail. Near optimal column-based matrix reconstruction. In IEEE 54th Annual Symposium on FOCS, pages 305–314, 2011. [19] Petros Drineas, Michael W Mahoney, and S Muthukrishnan. Relative-error cur matrix decompositions. SIAM Journal on Matrix Analysis and Applications, 30(2):844–881, 2008. [20] T.F. Chan. Rank revealing QR factorizations. Linear Algebra and its Applications, 8889(0):67 – 82, 1987. [21] Crystal Maung and Haim Schweitzer. Pass-efficient unsupervised feature selection. In Advances in Neural Information Processing Systems, pages 1628–1636, 2013. [22] C. Boutsidis, M. W Mahoney, and P. Drineas. An improved approximation algorithm for the column subset selection problem. In Proceedings of the 20th SODA, pages 968–977, 2009. [23] D. Papailiopoulos, A. Kyrillidis, and C. Boutsidis. Provable deterministic leverage score sampling. In Proc. SIGKDD, pages 997–1006, 2014. [24] A. Deshpande, L. Rademacher, S. Vempala, and G. Wang. Matrix approximation and projective clustering via volume sampling. In Proc. SODA, pages 1117–1126, 2006. [25] P. Drineas and M. W Mahoney. A randomized algorithm for a tensor-based generalization of the singular value decomposition. Linear algebra and its applications, 420(2):553–571, 2007. [26] P. Paschou, J. Lewis, A. Javed, and P. Drineas. Ancestry informative markers for fine-scale individual assignment to worldwide populations. Journal of Medical Genetics, 47(12):835–47, 2010. [27] D. Davidov, E. Gabrilovich, and S. Markovitch. Parameterized generation of labeled datasets for text categorization based on a hierarchical directory. In Proc. SIGIR, pages 250–257, 2004. 9 | 2015 | 328 |
5,845 | Parallel Multi-Dimensional LSTM, With Application to Fast Biomedical Volumetric Image Segmentation Marijn F. Stollenga*123, Wonmin Byeon*1245, Marcus Liwicki4, and Juergen Schmidhuber123 *Shared first authors, both Authors contribruted equally to this work. Corresponding authors: marijn@idsia.ch, wonmin.byeon@dfki.de 1Istituto Dalle Molle di Studi sull’Intelligenza Artificiale (The Swiss AI Lab IDSIA) 2Scuola universitaria professionale della Svizzera italiana (SUPSI), Switzerland 3Universit´a della Svizzera italiana (USI), Switzerland 4University of Kaiserslautern, Germany 5German Research Center for Artificial Intelligence (DFKI), Germany Abstract Convolutional Neural Networks (CNNs) can be shifted across 2D images or 3D videos to segment them. They have a fixed input size and typically perceive only small local contexts of the pixels to be classified as foreground or background. In contrast, Multi-Dimensional Recurrent NNs (MD-RNNs) can perceive the entire spatio-temporal context of each pixel in a few sweeps through all pixels, especially when the RNN is a Long Short-Term Memory (LSTM). Despite these theoretical advantages, however, unlike CNNs, previous MD-LSTM variants were hard to parallelise on GPUs. Here we re-arrange the traditional cuboid order of computations in MD-LSTM in pyramidal fashion. The resulting PyraMiD-LSTM is easy to parallelise, especially for 3D data such as stacks of brain slice images. PyraMiD-LSTM achieved best known pixel-wise brain image segmentation results on MRBrainS13 (and competitive results on EM-ISBI12). 1 Introduction Long Short-Term Memory (LSTM) networks [1, 2] are recurrent neural networks (RNNs) initially designed for sequence processing. They achieved state-of-the-art results on challenging tasks such as handwriting recognition [3], large vocabulary speech recognition [4] and machine translation [5]. Their architecture contains gates to store and read out information from linear units called error carousels that retain information over long time intervals, which is hard for traditional RNNs. Multi-Dimensional LSTM networks (MD-LSTM [6]) connect hidden LSTM units in grid-like fashion1. Two dimensional MD-LSTM is applicable to image segmentation [6, 7, 8] where each pixel is assigned to a class such as background or foreground. Each LSTM unit sees a pixel and receives input from predecessing LSTM units, thus recursively gathering information about all other pixels in the image. There are many biomedical 3D volumetric data sources, such as computed tomography (CT), magnetic resonance (MR), and electron microscopy (EM). Most previous approaches process each 2D slice separately, using image segmentation algorithms such as snakes [9], random forests [10] and Convolutional Neural Networks [11]. 3D-LSTM, however, can process the full context of each pixel in such a volume through 8 sweeps over all pixels by 8 different LSTMs, each sweep in the general direction of one of the 8 directed volume diagonals. 1For example, in two dimensions this yields 4 directions; up, down, left and right. 1 Due to the sequential nature of RNNs, however, MD-LSTM parallelisation was difficult, especially for volumetric data. The novel Pyramidal Multi-Dimensional LSTM (PyraMiD-LSTM) networks introduced in this paper use a rather different topology and update strategy. They are easier to parallelise, need fewer computations overall, and scale well on GPU architectures. PyraMiD-LSTM is applied to two challenging tasks involving segmentation of biological volumetric images. Competitive results are achieved on EM-ISBI12 [12]; best known results are achieved on MRBrainS13 [13]. 2 Method We will first describe standard one-dimensional LSTM [2]. Then we introduce the MD-LSTM and topology changes to construct the PyraMiD-LSTM, which is formally described and discussed. A one-dimensional LSTM unit consists of an input gate (i), forget gate2 (f), output gate (o), and memory cell (c) which control what should be remembered or forgotten over potentially long periods of time. The input x and all gates and activations are real-valued vectors: x, i, f, ˜c, c, o, h ∈RT , where T is the length of the input. The gates and activations at discrete time t (t=1,2,...) are computed as follows: it = σ(xt · θxi + ht-1 · θhi + θibias), (1) ft = σ(xt · θxf + ht-1 · θhf + θfbias), (2) ˜ct = tanh(xt · θx˜c + ht-1 · θh˜c + θ˜cbias), (3) ct = ˜ct ⊙it + ct-1 ⊙ft, (4) ot = σ(xt · θxo + ht-1 · θho + θobias), (5) ht = ot ⊙tanh(ct) (6) where (·) is a (matrix) multiplication, (⊙) an element-wise multiplication, and θ denotes the weights. ˜c is the input to the ’cell’ c, which is gated by the input gate, and h is the output. The non-linear functions σ and tanh are applied element-wise, where σ(x) = 1 1+e−x . Equations (1, 2) determine gate activations, Equation (3) cell inputs, Equation (4) the new cell states (here ‘memories’ are stored or forgotten), Equation (5) output gate activations which appear in Equation (6), the final output. 2.1 Pyramidal Connection Topology (b) 'Turned' MD-LSTM (c) PyraMiD LSTM (a) Standard MD-LSTM Figure 1: The standard MD-LSTM topology (a) evaluates the context of each pixel recursively from neighbouring pixel contexts along the axes, that is, pixels on a simplex can be processed in parallel. Turning this order by 45◦ (b) causes the simplex to become a plane (a column vector in the 2D case here). The resulting gaps are filled by adding extra connections, to process more than 2 elements of the context (c). The multi-dimensional LSTM (MD-LSTM; [6]) aligns LSTM-units in a grid and connects them over the axis. Multiple grids are needed to process information from all directions. A 2D-LSTM adds the pixel-wise outputs of 4 LSTMs: one scanning the image pixel by pixel from north-west to south-east, one from north-east to south-west, one from south-west to north-east, and one from south-east to north-west. Figure 1–a shows one of these directions. 2Although the forget gate output is inverted and actually ‘remembers’ when it is on, and forgets when it is off, the traditional nomenclature is kept. 2 However, a small change in connections can greatly facilitate parallelisations: If the connections are rotated by 45◦, all inputs to all units come from either left, right, up, or down (left in case of Figure 1–b), and all elements of a row in the grid row can be computed independently. However, this introduces context gaps as in Figure 1–b. By adding an extra input, these gaps are filled as in Figure 1–c. Extending this approach in 3 dimensions results in a Pyramidal Connection Topology, meaning the context of a pixel is formed by a pyramid in each direction. Figure 2: On the left we see the context scanned so far by one of the 8 LSTMs of a 3D-LSTM: a cube. In general, given d dimensions, 2d LSTMs are needed. On the right we see the context scanned so far by one of the 6 LSTMs of a 3D-PyraMiD-LSTM: a pyramid. In general, 2 × d LSTMs are needed. One of the striking differences between PyraMiD-LSTM and MD-LSTM is the shape of the scanned contexts. Each LSTM of an MD-LSTM scans rectangle-like contexts in 2D or cuboids in 3D. Each LSTM of a PyraMiD-LSTM scans triangles in 2D and pyramids in 3D (see Figure 2). An MD-LSTM needs 8 LSTMs to scan a volume, while a PyraMiD-LSTM needs only 6, since it takes 8 cubes or 6 pyramids to fill a volume. Given dimension d, the number of LSTMs grows as 2d for an MD-LSTM (exponentially) and 2 × d for a PyraMiD-LSTM (linearly). A similar connection strategy has been previously used to speed up non-Euclidian distance computations on surfaces [14]. There are however important differences: • We can exploit efficient GPU-based CUDA convolution operations, but in a way unlike what is done in CNNs, as will be explained below. • As a result of these operations, input filters that are bigger than the necessary 3 × 3 filters arise naturally, creating overlapping contexts. Such redundancy turns out to be beneficial and is used in our experiments. • We apply several layers of complex processing with multi-channelled outputs and several state-variables for each pixel, instead of having a single value per pixel as in distance computations. • Our application is focused on volumetric data. 2.2 PyraMiD-LSTM C-LSTM C-LSTM Σ PyraMiD-LSTM C-LSTM C-LSTM C-LSTM Fully Connected Layer tanh Fully Connected Layer softmax C-LSTM Input Data Figure 3: PyraMiD-LSTM network architecture. Randomly rotated and flipped inputs are sampled from random locations, then fed to six C-LSTMs over three axes. The outputs from all C-LSTMs are combined and sent to the fully-connected layer. tanh is used as a squashing function in the hidden layer. Several PyraMiD-LSTM layers can be applied. The last layer is fully-connected and uses a softmax function to compute probabilities for each class for each pixel. Here we explain the PyraMiD-LSTM network architecture for 3D volumes (see Figure 3). The working horses are six convolutional LSTMs (C-LSTM) layers, one for each direction to create the full context of each pixel. Note that each of these C-LSTMs is a entire LSTM RNN, processing the 3 entire volume in one direction. The directions D are formally defined over the three axes (x, y, z): D = {(·, ·, 1), (·, ·, −1), (·, 1, ·), (·, −1, ·), (1, ·, ·), (−1, ·, ·)}. They essentially choose which axis is the time direction; i.e. with (·, ·, 1) the positive direction of the z-axis represents the time. Each C-LSTM performs computations in a plane moving in the defined direction. The input is x ∈RW ×H×D×C, where W is the width, H the height, D the depth, and C the number of channels of the input, or hidden units in the case of second- and higher layers. Similarly, we define the volumes f d, id, od, ˜cd, cd, hd, h ∈RW ×H×D×O, where d ∈D is a direction and O is the number of hidden units per pixel. Since each direction needs a separate volume, we denote volumes with (·)d. The time index t selects a slice in direction d. For instance, for direction d = (·, ·, 1), vd t refers to the plane x, y, z, c for x = 1..X, y = 1..Y, c = 1..C, and z = t. For a negative direction d = (·, ·, −1), the plane is the same but moves in the opposite direction: z = Z −t. A special case is the first plane in each direction, which does not have a previous plane, hence we omit the corresponding computation. C-LSTM equations: id t = σ(xd t ∗θd xi + hd t-1 ∗θd hi + θd ibias), (7) f d t = σ(xd t ∗θd xf + hd t-1 ∗θd hf + θd fbias), (8) ˜cd t = tanh(xd t ∗θd x˜c + hd t-1 ∗θd h˜c + θd ˜cbias), (9) cd t = ˜cd t ⊙id t + cd t-1 ⊙f d t , (10) od t = σ(xd t ∗θd xo + hd t-1 ∗θd ho + θd obias), (11) hd t = od t ⊙tanh(cd t ), (12) h = X d∈D hd, (13) where (∗) is a convolution3, and h is the output of the layer. All biases are the same for all LSTM units (i.e., no positional biases are used). The outputs hd for all directions are summed together. Fully-Connected Layer: The output of our PyraMiD-LSTM layer is connected to a pixel-wise fully-connected layer, which output is squashed by the hyperbolic tangent (tanh) function. This step is used to increase the number of channels for the next layer. The final classification is done using a pixel-wise softmax function: y(x, y, z, c) = e−h(x,y,z,c) P c e−h(x,y,z,c) giving pixel-wise probabilities for each class. 3 Experiments We evaluate our approach on two 3D biomedical image segmentation datasets: electron microscopy (EM) and MR Brain images. EM dataset The EM dataset [12] is provided by the ISBI 2012 workshop on Segmentation of Neuronal Structures in EM Stacks [15]. Two stacks consist of 30 slices of 512 × 512 pixels obtained from a 2 × 2 × 1.5 µm3 microcube with a resolution of 4 × 4 × 50 nm3/pixel and binary labels. One stack is used for training, the other for testing. Target data consists of binary labels (membrane and non-membrane). MR Brain dataset The MR Brain images are provided by the ISBI 2015 workshop on Neonatal and Adult MR Brain Image Segmentation (ISBI NEATBrainS15) [13]. The dataset consists of twenty fully annotated high-field (3T) multi-sequences: 3D T1-weighted scan (T1), T1-weighted inversion recovery scan (IR), and fluid-attenuated inversion recovery scan (FLAIR). The dataset is divided into a training set with five volumes and a test set with fifteen volumes. All scans are bias-corrected and aligned. Each volume includes 48 slices with 240 × 240 pixels (3mm slice thickness). The slices 3In 3D volumes, convolutions are performed in 2D; in general an n-D volume requires n-1-D convolutions. All convolutions have stride 1, and their filter sizes should at least be 3 × 3 in each dimension to create the full context. 4 are manually segmented through nine labels: cortical gray matter, basal ganglia, white matter, white matter lesions, cerebrospinal fluid in the extracerebral space, ventricles, cerebellum, brainstem, and background. Following the ISBI NEATBrainS15 workshop procedure, all labels are grouped into four classes and background: 1) cortical gray matter and basal ganglia (GM), 2) white matter and white matter lesions (WM), 3) cerebrospinal fluid and ventricles (CSF), and 4) cerebellum and brainstem. Class 4) is ignored for the final evaluation as required. Sub-volumes and Augmentation The full dataset requires more than the 12 GB of memory provided by our GPU, hence we train and test on sub-volumes. We randomly pick a position in the full data and extract a smaller cube (see the details in Bootstrapping). This cube is possibly rotated at a random angle over some axis and can be flipped over any axis. For EM images, we rotate over the z-axis and flipped sub-volumes with 50% chance along x, y, and z axes. For MR brain images, rotation is disabled; only flipping along the x direction is considered, since brains are (mostly) symmetric in this direction. During test-time, rotations and flipping are disabled and the results of all sub-volumes are stitched together using a Gaussian kernel, providing the final result. Pre-processing We normalise each input slice towards a mean of zero and variance of one, since the imaging methods sometimes yield large variability in contrast and brightness. We do not apply the complex pre-processing common in biomedical image segmentation [10]. We apply simple pre-processing on the three datatypes of the MR Brain dataset, since they contain large brightness changes under the same label (even within one slice; see Figure 5). From all slices we subtract the Gaussian smoothed images (filter size: 31 × 31, σ = 5.0), then a Contrast-Limited Adaptive Histogram Equalisation (CLAHE) [16] is applied to enhance the local contrast (tile size: 16 × 16, contrast limit: 2.0). An example of the images after pre-processing is shown in Figure 5. The original and pre-processed images are all used, except the original IR images (Figure 5b), which have high variability. Training We apply RMS-prop [17] with momentum. We define a ρ ←−b to be an = ρan +(1−ρ)bn, where a, b ∈RN. The following equations hold for every epoch: E = (y∗−y)2, (14) MSE ρMSE ←−−−∇2 θE, (15) G = ∇θE √ MSE + ϵ , (16) M ρM ←−−G, (17) θ = θ −λlrM, (18) where y∗is the target, y is the output from the networks, E is the squared loss, MSE a running average of the variance of the gradient, ∇2 is the element-wise squared gradient, G the normalised gradient, M the smoothed gradient, and θ the weights. The squared loss was chosen as it produced better results than using the log-likelihood as an error function. This algorithm normalises the gradient of each weight, such that even weights with small gradients get updated. This also helps to deal with vanishing gradients [18]. We use a decaying learning rate: λlr = 10−6 + 10−2 · 1 2 epoch 100 , which starts at λlr ≈10−2 and halves every 100 epochs asymptotically towards λlr = 10−6. Other hyper-parameters used are ϵ = 10−5, ρMSE = 0.9, and ρM = 0.9. Bootstrapping To speed up training, we run three learning procedures with increasing sub-volume sizes: first, 3000 epochs with size 64 × 64 × 8, then 2000 epochs with size 128 × 128 × 15. Finally, for the EM-dataset, we train 1000 epochs with size 256 × 256 × 20, and for the MR Brain dataset 1000 epochs with size 240 × 240 × 25. After each epoch, the learning rate λlr is reset. 5 Table 1: Performance comparison on EM images. Some of the competing methods reported in the ISBI 2012 website are not yet published. Comparison details can be found under http://brainiac2.mit.edu/ isbi_challenge/leaders-board. Group Rand Err. Warping Err.(×10−3) Pixel Err. Human 0.002 0.0053 0.001 Simple Thresholding 0.450 17.14 0.225 IDSIA [11] 0.050 0.420 0.061 DIVE 0.048 0.374 0.058 PyraMiD-LSTM 0.047 0.462 0.062 IDSIA-SCI 0.0189 0.617 0.103 DIVE-SCI 0.0178 0.307 0.058 Experimental Setup All experiments are performed on a desktop computer with an NVIDIA GTX TITAN X 12GB GPU. Due to the pyramidal topology all major computations can be done using convolutions with NVIDIA’s cuDNN library [19], which has reported 20× speedup over an optimised implementation on a modern 16 core CPU. On the MR brain dataset, training took around three days, and testing per volume took around 2 minutes. We use exactly the same hyper-parameters and architecture for both datasets. Our networks contain three PyraMiD-LSTM layers. The first PyraMiD-LSTM layer has 16 hidden units followed by a fully-connected layer with 25 hidden units. In the next PyraMiD-LSTM layer, 32 hidden units are connected to a fully-connected layer with 45 hidden units. In the last PyraMiD-LSTM layer, 64 hidden units are connected to the fully-connected output layer whose size equals the number of classes. The convolutional filter size for all PyraMiD-LSTM layers is set to 7×7. The total number of weights is 10,751,549, and all weights are initialised according to a uniform distribution: U(−0.1, 0.1). 3.1 Neuronal Membrane Segmentation (a) Input (b) PyraMiD-LSTM Figure 4: Segmentation results on EM dataset (slice 26) Membrane segmentation is evaluated through an online system provided by the ISBI 2012 organisers. The measures used are the Rand error, warping error and pixel error [15]. Comparisons to other methods are reported in Table 1. The teams IDSIA and DIVE provide membrane probability maps for each pixel. The IDSIA team uses a state-of-the-art deep convolutional network [11], the method of DIVE was not provided. These maps are adapted by the post-processing technique of the teams SCI [20], which directly optimises the rand error (DIVE-SCI (top-1) and IDSIA-SCI (top-2)); this is most important in this particular segmentation task. 6 Table 2: The performance comparison on MR brain images. Structure GM WM CSF Metric DC MD AVD DC MD AVD DC MD AVD Rank (%) (mm) (%) (%) (mm) (%) (%) (mm) (%) BIGR2 84.65 1.88 6.14 88.42 2.36 6.02 78.31 3.19 22.8 6 KSOM GHMF 84.12 1.92 5.44 87.96 2.49 6.59 82.10 2.71 12.8 5 MNAB2 84.50 1.69 7.10 88.04 2.12 7.73 82.30 2.27 8.73 4 ISI-Neonatology 85.77 1.62 6.62 88.66 2.06 6.96 81.08 2.66 9.77 3 UNC-IDEA 84.36 1.62 7.04 88.69 2.06 6.46 82.81 2.35 10.5 2 PyraMiD-LSTM 84.82 1.69 6.77 88.33 2.07 7.05 83.72 2.14 7.10 1 Without post-processing, PyraMiD-LSTM networks outperform other methods in rand error, and are competitive in wrapping and pixel errors. Of course, performance could be further improved by applying post-processing techniques. Figure 4 shows an example segmentation result. 3.2 MR Brain Segmentation The results are compared using the DICE overlap (DC), the modified Hausdorff distance (MD), and the absolute volume difference (AVD) [13]. MR brain image segmentation results are evaluated by the ISBI NEATBrain15 organisers [13] who provided the extensive comparison to other approaches on http://mrbrains13.isi.uu.nl/results.php. Table 2 compares our results to those of the top five teams. The organisers compute nine measures in total and rank all teams for each of them separately. These ranks are then summed per team, determining the final ranking (ties are broken using the standard deviation). PyraMiD-LSTM leads the final ranking with a new state-of-the-art result and outperforms other methods for CSF in all metrics. We also tried regularisation through dropout [21]. Following earlier work [22], the dropout operator is applied only to non-recurrent connections (50% dropout on fully connected layers and/or 20% on input layer). However, this did not improve performance. 4 Conclusion Since 2011, GPU-trained max-pooling CNNs have dominated classification contests [23, 24, 25] and segmentation contests [11]. MD-LSTM, however, may pose a serious challenge to such CNNs, at least for segmentation tasks. Unlike CNNs, MD-LSTM has an elegant recursive way of taking each pixel’s entire spatio-temporal context into account, in both images and videos. Previous MD-LSTM implementations, however, could not exploit the parallelism of modern GPU hardware. This has changed through our work presented here. Although our novel highly parallel PyraMiD-LSTM has already achieved state-of-the-art segmentation results in challenging benchmarks, we feel we have only scratched the surface of what will become possible with such PyraMiD-LSTM and other MD-RNNs. 5 Acknowledgements We would like to thank Klaus Greff and Alessandro Giusti for their valuable discussions, and Jan Koutnik and Dan Ciresan for their useful feedback. We also thank the ISBI NEATBrain15 organisers [13] and the ISBI 2012 organisers, in particular Adri¨enne Mendrik and Ignacio ArgandaCarreras. Lastly we thank NVIDIA for generously providing us with hardware to perform our research. This research was funded by the NASCENCE EU project (EU/FP7-ICT-317662). 7 (a) T1 (b) IR (c) FLAIR (d) T1 (pre-processed) (e) IR (pre-processed) (f) FLAIR (pre-processed) (g) segmentation result from PyraMiD-LSTM Figure 5: Slice 19 of the test image 1. (a)-(c) are examples of three scan methods used in the MR brain dataset, and (d)-(f) show the corresponding images after our pre-processing procedure (see pre-processing in Section ). Input (b) is omitted due to strong artefacts in the data — the other datatypes are all used as input to the PyraMiD-LSTM. The segmentation result is shown in (g). References [1] S. Hochreiter and J. Schmidhuber. “Long Short-Term Memory”. In: Neural Computation 9.8 (1997). Based on TR FKI-207-95, TUM (1995), pp. 1735–1780. 8 [2] F. A. Gers, J. Schmidhuber, and F. Cummins. “Learning to Forget: Continual Prediction with LSTM”. In: ICANN. 1999. [3] A. Graves, M. Liwicki, S. Fernandez, R. Bertolami, H. Bunke, and J. Schmidhuber. “A Novel Connectionist System for Improved Unconstrained Handwriting Recognition”. In: PAMI 31.5 (2009). [4] H. Sak, A. Senior, and F. Beaufays. “Long Short-Term Memory Recurrent Neural Network Architectures for Large Scale Acoustic Modeling”. In: Proc. Interspeech. 2014. [5] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to Sequence Learning with Neural Networks. Tech. rep. NIPS. 2014. [6] A. Graves, S. Fern´andez, and J. Schmidhuber. “Multi-dimensional Recurrent Neural Networks”. In: ICANN. 2007. [7] A. Graves and J. Schmidhuber. “Offline Handwriting Recognition with Multidimensional Recurrent Neural Networks”. In: NIPS. 2009. [8] W. Byeon, T. M. Breuel, F. Raue, and M. Liwicki. “Scene Labeling With LSTM Recurrent Neural Networks”. In: CVPR. 2015. [9] M. Kass, A. Witkin, and D. Terzopoulos. “Snakes: Active contour models”. In: International Journal of Computer Vision (1988). [10] L. Wang, Y. Gao, F. Shi, G. Li, J. H. Gilmore, W. Lin, and D. Shen. “LINKS: Learning-based multi-source IntegratioN frameworK for Segmentation of infant brain images”. In: NeuroImage (2015). [11] D. C. Ciresan, A. Giusti, L. M. Gambardella, and J. Schmidhuber. “Deep Neural Networks Segment Neuronal Membranes in Electron Microscopy Images”. In: NIPS. 2012. [12] A. Cardona, S. Saalfeld, S. Preibisch, B. Schmid, A. Cheng, J. Pulokas, P. Tomancak, and V. Hartenstein. “An integrated micro-and macroarchitectural analysis of the Drosophila brain by computer-assisted serial section electron microscopy”. In: PLoS biology 8.10 (2010), e1000502. [13] A. M. Mendrik, K. L. Vincken, H. J. Kuijf, G. J. Biessels, and M. A. Viergever (organizers). MRBrainS Challenge: Online Evaluation Framework for Brain Image Segmentation in 3T MRI Scans, http://mrbrains13.isi.uu.nl. 2015. [14] O. Weber, Y. S. Devir, A. M. Bronstein, M. M. Bronstein, and R. Kimmel. “Parallel algorithms for approximation of distance maps on parametric surfaces”. In: ACM Transactions on Graphics (2008). [15] Segmentation of Neuronal Structures in EM Stacks Challenge. IEEE International Symposium on Biomedical Imaging (ISBI), http://tinyurl.com/d2fgh7g. 2012. [16] S. M. Pizer, E. P. Amburn, J. D. Austin, R. Cromartie, A. Geselowitz, T. Greer, B. T. H. Romeny, and J. B. Zimmerman. “Adaptive Histogram Equalization and Its Variations”. In: Comput. Vision Graph. Image Process. (1987). [17] 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 4 (2012). [18] S. Hochreiter. Untersuchungen zu dynamischen neuronalen Netzen. Diploma thesis, Institut f¨ur Informatik, Lehrstuhl Prof. Brauer, Technische Universit¨at M¨unchen. Advisor: J. Schmidhuber. 1991. [19] S. Chetlur, C. Woolley, P. Vandermersch, J. Cohen, J. Tran, B. Catanzaro, and E. Shelhamer. “cuDNN: Efficient Primitives for Deep Learning”. In: CoRR abs/1410.0759 (2014). [20] T. Liu, C. Jones, M. Seyedhosseini, and T. Tasdizen. “A modular hierarchical approach to 3D electron microscopy image segmentation”. In: Journal of Neuroscience Methods (2014). [21] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. “Dropout: A Simple Way to Prevent Neural Networks from Overfitting”. In: Journal of Machine Learning Research (2014). [22] V. Pham, T. Bluche, C. Kermorvant, and J. Louradour. “Dropout improves recurrent neural networks for handwriting recognition”. In: ICFHR. 2014. [23] D. C. Ciresan, U. Meier, J. Masci, and J. Schmidhuber. “A Committee of Neural Networks for Traffic Sign Classification”. In: IJCNN. 2011. [24] A. Krizhevsky, I Sutskever, and G. E Hinton. “ImageNet Classification with Deep Convolutional Neural Networks”. In: NIPS. 2012. [25] M. D. Zeiler and R. Fergus. Visualizing and Understanding Convolutional Networks. Tech. rep. arXiv:1311.2901 [cs.CV]. NYU, 2013. 9 | 2015 | 329 |
5,846 | Time-Sensitive Recommendation From Recurrent User Activities Nan Du⋄, Yichen Wang⋄, Niao He∗, Le Song⋄ ⋄College of Computing, Georgia Tech ∗H. Milton Stewart School of Industrial & System Engineering, Georgia Tech dunan@gatech.edu, yichen.wang@gatech.edu, nhe6@gatech.edu lsong@cc.gatech.edu Abstract By making personalized suggestions, a recommender system is playing a crucial role in improving the engagement of users in modern web-services. However, most recommendation algorithms do not explicitly take into account the temporal behavior and the recurrent activities of users. Two central but less explored questions are how to recommend the most desirable item at the right moment, and how to predict the next returning time of a user to a service. To address these questions, we propose a novel framework which connects self-exciting point processes and low-rank models to capture the recurrent temporal patterns in a large collection of user-item consumption pairs. We show that the parameters of the model can be estimated via a convex optimization, and furthermore, we develop an efficient algorithm that maintains O(1/ϵ) convergence rate, scales up to problems with millions of user-item pairs and hundreds of millions of temporal events. Compared to other state-of-the-arts in both synthetic and real datasets, our model achieves superb predictive performance in the two time-sensitive recommendation tasks. Finally, we point out that our formulation can incorporate other extra context information of users, such as profile, textual and spatial features. 1 Introduction Delivering personalized user experiences is believed to play a crucial role in the long-term engagement of users to modern web-services [26]. For example, making recommendations on proper items at the right moment can make personal assistant services on mainstream mobile platforms more competitive and usable, since people tend to have different activities depending on the temporal/spatial contexts such as morning vs. evening, weekdays vs. weekend (see for example Figure 1(a)). Unfortunately, most existing recommendation techniques are mainly optimized at predicting users’ onetime preference (often denoted by integer ratings) on items, while users’ continuously time-varying preferences remain largely under explored. Besides, traditional user feedback signals (e.g. user-item ratings, click-through-rates, etc.) have been increasingly argued to be ineffective to represent real engagement of users due to the sparseness and nosiness of the data [26]. The temporal patterns at which users return to the services (items) thus becomes a more relevant metric to evaluate their satisfactions [12]. Furthermore, successful predictions of the returning time not only allows a service to keep track of the evolving user preferences, but also helps a service provider to improve their marketing strategies. For most web companies, if we can predict when users will come back next, we could make ads bidding more economic, allowing marketers to bid on time slots. After all, marketers need not blindly bid all time slots indiscriminately. In the context of modern electronic health record data, patients may have several diseases that have complicated dependencies on each other shown at the bottom of Figure 1(a). The occurrence of one disease could trigger the progression of another. Predicting the returning time on certain disease can effectively help doctors to take proactive steps to reduce the potential risks. However, since most models in literature are particularly optimized for predicting ratings [16, 23, 15, 3, 25, 13, 21], 1 next event prediction time Disease 1 ? time Disease n ? patient predict the next activity at time t ? time Church t ? time Grocery t ? user (a) Predictions from recurrent events. time (b) User-item-event model. Figure 1: Time-sensitive recommendation. (a) in the top figure, one wants to predict the most desirable activity at a given time t for a user; in the bottom figure, one wants to predict the returning time to a particular disease of a patient. (b) The sequence of events induced from each user-item pair (u, i) is modeled as a temporal point process along time. exploring the recurrent temporal dynamics of users’ returning behaviors over time becomes more imperative and meaningful than ever before. Although the aforementioned applications come from different domains, we seek to capture them in a unified framework by addressing the following two related questions: (1) how to recommend the most relevant item at the right moment, and (2) how to accurately predict the next returningtime of users to existing services. More specifically, we propose a novel convex formulation of the problems by establishing an under explored connection between self-exciting point processes and low-rank models. We also develop a new optimization algorithm to solve the low rank point process estimation problem efficiently. Our algorithm blends proximal gradient and conditional gradient methods, and achieves the optimal O(1/t) convergence rate. As further demonstrated by our numerical experiments, the algorithm scales up to millions of user-item pairs and hundreds of millions of temporal events, and achieves superb predictive performance on the two time-sensitive problems on both synthetic and real datasets. Furthermore, our model can be readily generalized to incorporate other contextual information by making the intensity function explicitly depend on the additional spatial, textual, categorical, and user profile information. Related Work. The very recent work of Kapoor et al. [12, 11] is most related to our approach. They attempt to predict the returning time for music streaming service based on survival analysis [1] and hidden semi-markov model. Although these methods explicitly consider the temporal dynamics of user-item pairs, a major limitation is that the models cannot generalize to recommend any new item in future time, which is a crucial difference compared to our approach. Moreover, survival analysis is often suitable for modeling a single terminal event [1], such as infection and death, by assuming that the inter-event time to be independent. However, in many cases this assumption might not hold. 2 Background on Temporal Point Processes This section introduces necessary concepts from the theory of temporal point processes [4, 5, 6]. A temporal point process is a random process of which the realization is a sequence of events {ti} with ti ∈R+ and i ∈Z+ abstracted as points on the time line. Let the history T be the list of event time {t1, t2, . . . , tn} up to but not including the current time t. An important way to characterize temporal point processes is via the conditional intensity function, which is the stochastic model for the next event time given all previous events. Within a small window [t, t + dt), λ(t)dt = P {event in [t, t + dt)|T } is the probability for the occurrence of a new event given the history T . The functional form of the intensity λ(t) is designed to capture the phenomena of interests [1]. For instance, a homogeneous Poisson process has a constant intensity over time, i.e., λ(t) = λ0 ⩾ 0, which is independent of the history T . The inter-event gap thus conforms to the exponential distribution with the mean being 1/λ0. Alternatively, for an inhomogeneous Poisson process, its intensity function is also assumed to be independent of the history T but can be a simple function of time, i.e., λ(t) = g(t) ⩾0. Given a sequence of events T = {t1, . . . , tn}, for any t > tn, we characterize the conditional probability that no event happens during [tn, t) and the conditional density f(t|T ) that an event occurs at time t as S(t|T ) = exp − R t tn λ(τ) dτ and f(t|T ) = 2 λ(t) S(t|T ) [1]. Then given a sequence of events T = {t1, . . . , tn}, we express its likelihood by ℓ({t1, . . . , tn}) = Y ti∈T λ(ti) · exp − Z T 0 λ(τ) dτ ! . (1) 3 Low Rank Hawkes Processes In this section, we present our model in terms of low-rank self-exciting Hawkes processes, discuss its possible extensions and provide solutions to our proposed time-sensitive recommendation problems. 3.1 Modeling Recurrent User Activities with Hawkes Processes Figure 1(b) highlights the basic setting of our model. For each observed user-item pair (u, i), we model the occurrences of user u’s past consumption events on item i as a self-exciting Hawkes process [10] with the intensity: λ(t) = γ0 + α X ti∈T γ(t, ti), (2) where γ(t, ti) ⩾0 is the triggering kernel capturing temporal dependencies, α ⩾0 scales the magnitude of the influence of each past event, γ0 ⩾0 is a baseline intensity, and the summation of the kernel terms is history dependent and thus a stochastic process by itself. We have a twofold rationale behind this modeling choice. First, the baseline intensity γ0 captures users’ inherent and long-term preferences to items, regardless of the history. Second, the triggering kernel γ(t, ti) quantifies how the influence from each past event evolves over time, which makes the intensity function depend on the history T . Thus, a Hawkes process is essentially a conditional Poisson process [14] in the sense that conditioned on the history T , the Hawkes process is a Poisson process formed by the superposition of a background homogeneous Poisson process with the intensity γ0 and a set of inhomogeneous Poisson processes with the intensity γ(t, ti). However, because the events in the past can affect the occurrence of the events in future, the Hawkes process in general is more expressive than a Poisson process, which makes it particularly useful for modeling repeated activities by keeping a balance between the long and the short term aspects of users’ preferences. 3.2 Transferring Knowledge with Low Rank Models So far, we have shown modeling a sequence of events from a single user-item pair. Since we cannot observe the events from all user-item pairs, the next step is to transfer the learned knowledge to unobserved pairs. Given m users and n items, we represent the intensity function between user u and item i as λu,i(t) = λu,i 0 + αu,i P tu,i j ∈T u,i γ(t, tu,i j ), where λu,i 0 and αu,i are the (u, i)-th entry of the m-by-n non-negative base intensity matrix Λ0 and the self-exciting matrix A, respectively. However, the two matrices of coefficients Λ0 and A contain too many parameters. Since it is often believed that users’ behaviors and items’ attributes can be categorized into a limited number of prototypical types, we assume that Λ0 and A have low-rank structures. That is, the nuclear norms of these parameter matrices are small ∥Λ0∥∗⩽λ′, ∥A∥∗⩽β′. Some researchers also explicitly assume that the two matrices factorize into products of low rank factors. Here we assume the above nuclear norm constraints in order to obtain convex parameter estimation procedures later. 3.3 Triggering Kernel Parametrization and Extensions Because it is only required that the triggering kernel should be nonnegative and bounded, feature ψu,i in 3 often has analytic forms when γ(t, tu,i j ) belongs to many flexible parametric families, such as the Weibull and Log-logistic distributions [1]. For the simplest case, γ(t, tu,i j ) takes the exponential form γ(t, tu,i j ) = exp(−(t−tu,i j )/σ). Alternatively, we can make the intensity function λu,i(t) depend on other additional context information associated with each event. For instance, we can make the base intensity Λ0 depend on user-profiles and item-contents [9, 7]. We might also extend Λ0 and A into tensors to incorporate the location information. Furthermore, we can even learn the triggering kernel directly using nonparametric methods [8, 30]. Without loss of generality, we stick with the exponential form in later sections. 3.4 Time-Sensitive Recommendation Once we have learned Λ0 and A, we are ready to solve our proposed problems as follows : 3 (a) Item recommendation. At any given time t, for each user-item pair (u, i), because the intensity function λu,i(t) indicates the tendency that user u will consume item i at time t, for each user u, we recommend the proper items by the following procedures : 1. Calculate λu,i(t) for each item i. 2. Sort the items by the descending order of λu,i(t). 3. Return the top-k items. (b) Returning-time prediction: for each user-item pair (u, i), the intensity function λu,i(t) dominates the point patterns along time. Given the history T u,i = {t1, t2, . . . , tn}, we calculate the density of the next event time by f(t|T u,i) = λu,i(t) exp − R t tn λu,i(t)dt , so we can use the expectation to predict the next event. Unfortunately, this expectation often does not have analytic forms due to the complexity of λu,i(t) for Hawkes process, so we approximate the returning-time as following : 1. Draw samples t1 n+1, . . . , tm n+1 ∼f(t|T u,i) by Ogata’s thinning algorithm [19]. 2. Estimate the returning-time by the sample average 1 m Pm i=1 ti n+1 4 Parameter Estimation Having presented our model, in this section, we develop a new algorithm which blends proximal gradient and conditional gradient methods to learn the model efficiently. 4.1 Convex Formulation Let T u,i be the set of events induced between u and i. We express the log-likelihood of observing each sequence T u,i based on Equation 1 as : ℓ T u,i|Λ0, A = X tu,i j ∈T u,i log(w⊤ u,iφu,i j ) −w⊤ u,iψu,i, (3) where wu,i = (Λ0(u, i), A(u, i))⊤, φu,i j = (1, P tu,i k <tu,i j γ(tu,i j , tu,i k ))⊤and ψu,i = (T, P tu,i j ∈T u,i R T tu,i j γ(t, tu,i j )dt)⊤. When γ(t, tu,i j ) is the exponential kernel, ψu,i can be expressed as ψu,i = (T, P tu,i j ∈T u,i σ(1 −exp(−(T −tu,i j )/σ)))⊤. Then, the log-likelihood of observing all event sequences O = T u,i u,i is simply a summation of each individual term by ℓ(O) = P T u,i∈O ℓ T u,i . Finally, we can have the following convex formulation : OPT = min Λ0,A −1 |O| X T u,i∈O ℓ T u,i|Λ0, A + λ∥Λ0∥∗+ β∥A∥∗subject to Λ0, A ⩾0, (4) where the matrix nuclear norm ∥·∥∗, which is a summation of all singular values, is commonly used as a convex surrogate for the matrix rank function [24]. One off-the-shelf solution to 4 is proposed in [29] based on ADMM. However, the algorithm in [29] requires, at each iteration, a full SVD for computing the proximal operator, which is often prohibitive with large matrices. Alternatively, we might turn to more efficient conditional gradient algorithms [28], which require instead, the much cheaper linear minimization oracles. However, the non-negativity constraints in our problem prevent the linear minimization from having a simple analytical solution. 4.2 Alternative Formulation The difficulty of directly solving the original formulation 4 is caused by the fact that the nonnegative constraints are entangled with the non-smooth nuclear norm penalty. To address this challenge, we approximate 4 using a simple penalty method. Specifically, given ρ > 0, we arrive at the next formulation 5 by introducing two auxiliary variables Z1 and Z2 with some penalty function, such as the squared Frobenius norm. [ OPT = min Λ0,A,Z1,Z2 −1 |O| X T u,i∈O ℓ T u,i|Λ0, A + λ∥Z1∥∗+ β∥Z2∥∗+ ρ∥Λ0 −Z1∥2 F + ρ∥A −Z2∥2 F subject to Λ0, A ⩾0. (5) 4 Algorithm 1: Learning Hawkes-Recommender Input: O = T u,i , ρ > 0 Output: Y1 = [Λ0; A] Choose to initialize X0 1 and X0 2 = X0 1 ; Set Y 0 = X0; for k = 1, 2, . . . do δk = 2 k+1; U k−1 = (1 −δk)Y k−1 + δkXk−1 ; Xk 1 = ProxUk−1 ηk∇1(f(U k−1)) ; Xk 2 = LMOψ ∇2(f(U k−1)) ; Y k = (1 −δk)Y k−1 + δkXk; end Algorithm 2: ProxU k−1 ηk∇1(f(U k−1)) Xk 1 = U k−1 −ηk∇1(f(U k−1)) +; Algorithm 3: LMOψ ∇2(f(U k−1)) (u1, v1), (u2, v2) top singular vector pairs of −∇2(f(U k−1))[Z1] and −∇2(f(U k−1))[Z2]; Xk 2 [Z1] = u1v⊤ 1 , Xk 2 [Z2] = u2v⊤ 2 ; Find αk 1 and αk 2 by solving (6); Xk 2 [Z1] = αk 1Xk 2 [Z1]; Xk 2 [Z2] = αk 2Xk 2 [Z2]; We show in Theorem 1 that when ρ is properly chosen, these two formulations lead to the same optimum. See appendix for the complete proof. More importantly, the new formulation 5 allows us to handle the non-negativity constraints and nuclear norm regularization terms separately. Theorem 1. With the condition ρ ⩾ρ∗, the optimal value [ OPT of the problem 5 coincides with the optimal value OPT in the problem 4 of interest, where ρ∗is a problem dependent threshold, ρ∗= max λ (∥Λ∗ 0∥∗−∥Z∗ 1∥∗) + β (∥A∗∥∗−∥Z∗ 2∥∗) ∥Λ∗ 0 −Z∗ 1∥2 F + ∥A∗−Z∗ 2∥2 F . 4.3 Efficient Optimization: Proximal Method Meets Conditional Gradient Now, we are ready to present Algorithm 1 for solving 5 efficiently. Denote X1 = [Λ0; A], X2 = [Z1; Z2] and X = [X1; X2]. We use the bracket [·] notation X1[Λ0], X1[A], X2[Z1], X2[Z2] to represent the respective part for simplicity. Let f(X) := f(Λ0, A, Z1, Z2) = −1 |O| P T u,i∈O ℓ T u,i|Λ0, A + ρ∥Λ0 −Z1∥2 F + ρ∥A −Z2∥2 F . The course of our action is straightforward: at each iteration, we apply cheap projection gradient for block X1 and cheap linear minimization for block X2 and maintain three interdependent sequences U k k⩾1, Y k k⩾1 and Xk k⩾1 based on the accelerated scheme in [17, 18]. To be more specific, the algorithm consists of two main subroutines: Proximal Gradient. When updating X1, we compute directly the associated proximal operator, which in our case, reduces to the simple projection Xk 1 = U k−1 −ηk∇1f(U k−1) +, where (·)+ simply sets the negative coordinates to zero. Conditional Gradient. When updating X2, instead of computing the proximal operator, we call the linear minimization oracle (LMOψ): Xk 2 [Z1] = argmin {⟨pk[Z1], Z1⟩+ ψ(Z1)} where pk = ∇2(f(U k−1)) is the partial derivative with respect to X2 and ψ(Z1) = λ∥Z1∥∗. We do similar updates for Xk 2 [Z2]. The overall performance clearly depends on the efficiency of this LMO, which can be solved efficiently in our case as illustrated in Algorithm 3. Following [27], the linear minimization for our situation requires only : (i) computing Xk 2 [Z1] = argmin∥Z1∥∗⩽1 ⟨pk[Z1], Z1⟩, where the minimizer is readily given by Xk 2 [Z1] = u1v⊤ 1 , and u1, v1 are the top singular vectors of −pk[Z1]; and (ii) conducting a line-search that produces a scaling factor αk 1 = argminα1⩾0 h(α1) h(α1) := ρ∥Y k−1 1 [Λ0] −(1 −δk)Y k−1 2 [Z1] −δk(α1Xk 2 [Z1])∥2 F + λδkα1 + C, (6) where C = λ(1 −δk)∥Y k−1 2 [Z1]∥∗. The quadratic problem (6) admits a closed-form solution and thus can be computed efficiently. We repeat the same process for updating αk 2 accordingly. 4.4 Convergence Analysis Denote F(X) = f(X)+ψ(X2) as the objective in formulation 5, where X = [X1; X2]. We establish the following convergence results for Algorithm 1 described above when solving formulation 5. Please refer to Appendix for complete proof. 5 Theorem 2. Let Y k be the sequence generated by Algorithm 1 by setting δk = 2/(k + 1), and ηk = (δk)−1/L. Then for k ⩾1, we have F(Y k) −[ OPT ⩽ 4LD1 k(k + 1) + 2LD2 k + 1 . (7) where L corresponds to the Lipschitz constant of ∇f(X) and D1 and D2 are some problem dependent constants. Remark. Let g(Λ0, A) denote the objective in formulation 4, which is the original problem of our interest. By invoking Theorem 1, we further have, g(Y k[Λ0], Y k[A]) −OPT ⩽ 4LD1 k(k+1) + 2LD2 k+1 . The analysis builds upon the recursions from proximal gradient and conditional gradient methods. As a result, the overall convergence rate comes from two parts, as reflected in (7). Interestingly, one can easily see that for both the proximal and the conditional gradient parts, we achieve the respective optimal convergence rates. When there is no nuclear norm regularization term, the results recover the well-known optimal O(1/t2) rate achieved by proximal gradient method for smooth convex optimization. When there is no nonnegative constraint, the results recover the well-known O(1/t) rate attained by conditional gradient method for smooth convex minimization. When both nuclear norm and non-negativity are in present, the proposed algorithm, up to our knowledge, is first of its kind, that achieves the best of both worlds, which could be of independent interest. 5 Experiments We evaluate our algorithm by comparing with state-of-the-art competitors on both synthetic and real datasets. For each user, we randomly pick 20-percent of all the items she has consumed and hold out the entire sequence of events. Besides, for each sequence of the other 80-percent items, we further split it into a pair of training/testing subsequences. For each testing event, we evaluate the predictive accuracy on two tasks : (a) Item Recommendation: suppose the testing event belongs to the user-item pair (u, i). Ideally item i should rank top at the testing moment. We record its predicted rank among all items. Smaller value indicates better performance. (b) Returning-Time Prediction: we predict the returning-time from the learned intensity function and compute the absolute error with respect to the true time. We repeat these two evaluations on all testing events. Because the predictive tasks on those entirely held-out sequences are much more challenging, we report the total mean absolute error (MAE) and that specific to the set of entirely heldout sequences, separately. 5.1 Competitors Poisson process is a relaxation of our model by assuming each user-item pair (u, i) has only a constant base intensity Λ0(u, i), regardless of the history. For task (a), it gives static ranks regardless of the time. For task (b), it produces an estimate of the average inter-event gaps. In many cases, the Poisson process is a hard baseline in that the most popular items often have large base intensity, and recommending popular items is often a strong heuristic. STiC [11] fits a semi-hidden Markov model to each observed user-item pair. Since it can only make recommendations specific to the few observed items visited before, instead of the large number of new items, we only evaluate its performance on the returning time prediction task. For the set of entirely held-out sequences, we use the average predicted inter-event time from each observed item as the final prediction. SVD is the classic matrix factorization model. The implicit user feedback is converted into an explicit rating using the frequency of item consumptions [2]. Since it is not designed for predicting the returning time, we report its performance on the time-sensitive recommendation task as a reference. Tensor factorization generalizes matrix factorization to include time. We compare with the stateof-art method [3] which considers poisson regression as the loss function to fit the number of events in each discretized time slot and shows better performance compared to other alternatives with the squared loss [25, 13, 22, 21]. We report the performance by (1) using the parameters fitted only in the last interval, and (2) using the average parameters over all time intervals. We denote these two variants with varying number of intervals as Tensor-#-Last and Tensor-#-Avg. 6 0.10 0.15 0.20 0.25 0.30 0 100 200 300 400 500 #iterations MAE Parameters A Λ 0 (a) Convergence by iterations 0.08 0.10 0.12 0.14 0 25000 50000 75000 100000 #events MAE Parameters A Λ 0 (b) Convergence by #user-item 0.08 0.10 0.12 0.14 0 2500 5000 7500 10000 #events MAE Parameters A Λ 0 (c) Convergence by #events 102 103 102 103 104 105 #entries time(s) (d) Scalability 59.9 213.5 242.6 261.9 398.3 43.3 193.4 210.5 234.7 351.3 0 100 200 300 400 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2 Tensor90 SVD (e) Item recommendation 68.3 163.4 169.5 169.7 182.4 182.8 319.3 54.7 141.2 151.5 153.7 171.3 171.9 312.7 0 100 200 300 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2Last Tensor2Avg Tensor90Last Tensor90Avg STiC (f) Returning-time prediction Figure 2: Estimation error (a) by #iterations, (b) by #entries (1,000 events per entry), and (c) by #events per entry (10,000 entries); (d) scalability by #entries (1,000 events per entry, 500 iterations); (e) MAE of the predicted ranking; and (f) MAE of the predicted returning time. 5.2 Results Synthetic data. We generate two 1,024-by-1,204 user-item matrices Λ0 and A with rank five as the ground-truth. For each user-item pair, we simulate 1,000 events by Ogata’s thinning algorithm [19] with an exponential triggering kernel and get 100 million events in total. The bandwidth for the triggering kernel is fixed to one. By theorem 1, it is inefficient to directly estimate the exact value of the threshold value for ρ. Instead, we tune ρ, λ and β to give the best performance. How does our algorithm converge ? Figure 2(a) shows that it only requires a few hundred iterations to descend to a decent error for both Λ0 and A, indicating algorithm 1 converges very fast. Since the true parameters are low-rank, Figure 2(b-c) verify that it only requires a modest number of observed entries, each of which induces a small number of events (1,000) to achieve a good estimation performance. Figure 2(d) further illustrates that algorithm 1 scales linearly as the training set grows. What is the predictive performance ? Figure 2(e-f) confirm that algorithm 1 achieves the best predictive performance compared to other baselines. In Figure 2(e), all temporal methods outperform the static SVD since this classic baseline does not consider the underlying temporal dynamics of the observed sequences. In contrast, although the Poisson regression also produces static rankings of the items, it is equivalent to recommending the most popular items over time. This simple heuristic can still give competitive performance. In Figure 2(f), since the occurrence of a new event depends on the whole past history instead of the last one, the performance of STiC deteriorates vastly. The other tensor methods predict the returning time with the information from different time intervals. However, because our method automatically adapts different contributions of each past event to the prediction of the next event, it can achieve the best prediction performance overall. Real data. We also evaluate the proposed method on real datasets. last.fm consists of the music streaming logs between 1,000 users and 3,000 artists. There are around 20,000 observed user-artist pairs with more than one million events in total. tmall.com contains around 100K shopping events between 26,376 users and 2,563 stores. The unit time for both dataset is hour. MIMIC II medical dataset is a collection of de-identified clinical visit records of Intensive Care Unit patients for seven years. We filtered out 650 patients and 204 diseases. Each event records the time when a patient was diagnosed with a specific disease. The time unit is week. All model parameters ρ, λ, β, the kernel bandwidth and the latent rank of other baselines are tuned to give the best performance. Does the history help ? Because the true temporal dynamics governing the event patterns are unobserved, we first investigate whether our model assumption is reasonable. Our Hawkes model considers the self-exciting effects from past user activities, while the survival analysis applied in [11] 7 Quantile-plot Item recommendation Returning-time prediction last.fm Hawkes Poisson Rayleigh 0 2 4 6 8 0 2 4 6 8 Theoretical Quantiles Quantiles of Real Data 201.7 807.5 896.7 903.7 1085.7 191.6 615.6 889.4 896.4 1043.7 0 300 600 900 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2 Tensor90 SVD 95.1 111.6 174.7 168.2 173.5 176.7 379.1 140.6 147.1 158.7 162.3 160.3 163.8 372.9 0 100 200 300 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2Last Tensor2Avg Tensor90Last Tensor90Avg STiC tmall.com Hawkes Poisson Rayleigh 0 1 2 3 4 0 1 2 3 4 Theoretical Quantiles Quantiles of Real Data 43.65 111.27 132.06 174.01 204 11.28 87.23 115.15 164.78 183.43 0 50 100 150 200 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2 Tensor90 SVD 134.2 140.5 192.3 188.1 187.4 189.4 297.8 163.7 165.6 185.9 184.3 180.9 180.7 292.6 0 100 200 300 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2Last Tensor2Avg Tensor90Last Tensor90Avg STiC MIMIC II Hawkes Poisson Rayleigh 0 2 4 6 8 0 2 4 6 8 Theoretical Quantiles Quantiles of Real Data 18.3 25.9 21.3 22.4 34.5 3.9 10.4 20.1 22.2 34.2 0 10 20 30 Heldout Total Groups MAE Methods Hawkes Poisson Tensor2 Tensor90 SVD 139.6 162.1 224.3 218.9 271.7 268.8 246 41.6 75.8 235.4 230.6 274.9 270.4 238 0 100 200 Heldout Total Groups MAE Methods Hawkes Poisson T2Last T2Avg T90Last T90Avg STiC Figure 3: The quantile plots of different fitted processes, the MAE of predicted rankings and returning-time on the last.fm (top), tmall.com (middle) and the MIMIC II (bottom), respectively. assumes i.i.d. inter-event gaps which might conform to an exponential (Poisson process) or Rayleigh distribution. According to the time-change theorem [6], given a sequence T = {t1, . . . , tn} and a particular point process with intensity λ(t), the set of samples nR ti ti−1 λ(t)dt on i=1 should conform to a unit-rate exponential distribution if T is truly sampled from the process. Therefore, we compare the theoretical quantiles from the exponential distribution with the fittings of different models to a real sequence of (listening/shopping/visiting) events. The closer the slope goes to one, the better a model matches the event patterns. Figure 3 clearly shows that our Hawkes model can better explain the observed data compared to the other survival analysis models. What is the predictive performance ? Finally, we evaluate the prediction accuracy in the 2nd and 3rd column of Figure 3. Since holding-out an entire testing sequence is more challenging, the performance on the Heldout group is a little lower than that on the average Total group. However, across all cases, since the proposed model is able to better capture the temporal dynamics of the observed sequences of events, it can achieve a better performance on both tasks in the end. 6 Conclusions We propose a novel convex formulation and an efficient learning algorithm to recommend relevant services at any given moment, and to predict the next returning-time of users to existing services. Empirical evaluations on large synthetic and real data demonstrate its superior scalability and predictive performance. Moreover, our optimization algorithm can be used for solving general nonnegative matrix rank minimization problem with other convex losses under mild assumptions, which may be of independent interest. Acknowledge The research was supported in part by NSF IIS-1116886, NSF/NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983. 8 References [1] O. Aalen, O. Borgan, and H. Gjessing. Survival and event history analysis: a process point of view. Springer, 2008. [2] L. Baltrunas and X. Amatriain. Towards time-dependant recommendation based on implicit feedback, 2009. [3] E. C. Chi and T. G. Kolda. On tensors, sparsity, and nonnegative factorizations, 2012. [4] D. Cox and V. Isham. Point processes, volume 12. Chapman & Hall/CRC, 1980. [5] D. Cox and P. Lewis. Multivariate point processes. Selected Statistical Papers of Sir David Cox: Volume 1, Design of Investigations, Statistical Methods and Applications, 1:159, 2006. [6] D. Daley and D. Vere-Jones. An introduction to the theory of point processes: volume II: general theory and structure, volume 2. Springer, 2007. [7] N. Du, M. Farajtabar, A. Ahmed, A. J. Smola, and L. Song. Dirichlet-hawkes processes with applications to clustering continuous-time document streams. In KDD’15, 2015. [8] N. Du, L. Song, A. Smola, and M. Yuan. Learning networks of heterogeneous influence. In Advances in Neural Information Processing Systems 25, pages 2789–2797, 2012. [9] N. Du, L. Song, H. Woo, and H. Zha. Uncover topic-sensitive information diffusion networks. In Artificial Intelligence and Statistics (AISTATS), 2013. [10] A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971. [11] K. Kapoor, K. Subbian, J. Srivastava, and P. Schrater. Just in time recommendations: Modeling the dynamics of boredom in activity streams. WSDM, pages 233–242, 2015. [12] K. Kapoor, M. Sun, J. Srivastava, and T. Ye. A hazard based approach to user return time prediction. In KDD’14, pages 1719–1728, 2014. [13] A. Karatzoglou, X. Amatriain, L. Baltrunas, and N. Oliver. Multiverse recommendation: N-dimensional tensor factorization for context-aware collaborative filtering. In Proceeedings of the 4th ACM Conference on Recommender Systems (RecSys), 2010. [14] J. Kingman. On doubly stochastic poisson processes. Mathematical Proceedings of the Cambridge Philosophical Society, pages 923–930, 1964. [15] N. Koenigstein, G. Dror, and Y. Koren. Yahoo! music recommendations: Modeling music ratings with temporal dynamics and item taxonomy. In Proceedings of the Fifth ACM Conference on Recommender Systems, RecSys ’11, pages 165–172, 2011. [16] Y. Koren. Collaborative filtering with temporal dynamics. In Knowledge discovery and data mining KDD, pages 447–456, 2009. [17] G. Lan. An optimal method for stochastic composite optimization. Mathematical Programming, 2012. [18] G. Lan. The complexity of large-scale convex programming under a linear optimization oracle. arXiv preprint arxiv:1309.5550v2, 2014. [19] Y. Ogata. On lewis’ simulation method for point processes. Information Theory, IEEE Transactions on, 27(1):23–31, 1981. [20] H. Ouyang, N. He, L. Q. Tran, and A. Gray. Stochastic alternating direction method of multipliers. In ICML, 2013. [21] J. Z. J. L. Preeti Bhargava, Thomas Phan. Who, what, when, and where: Multi-dimensional collaborative recommendations using tensor factorization on sparse user-generated data. In WWW, 2015. [22] Y. Wang, R. Chen, J. Ghosh, J. Denny, A. Kho, Y. Chen, B. Malin, and J. Sun. Rubik: Knowledge guided tensor factorization and completion for health data analytics. In KDD, 2015. [23] S. Rendle. Time-Variant Factorization Models Context-Aware Ranking with Factorization Models. volume 330 of Studies in Computational Intelligence, chapter 9, pages 137–153. 2011. [24] S. Sastry. Some np-complete problems in linear algebra. Honors Projects, 1990. [25] L. Xiong, X. Chen, T.-K. Huang, J. G. Schneider, and J. G. Carbonell. Temporal collaborative filtering with bayesian probabilistic tensor factorization. In SDM, pages 211–222. SIAM, 2010. [26] X. Yi, L. Hong, E. Zhong, N. N. Liu, and S. Rajan. Beyond clicks: Dwell time for personalization. In Proceedings of the 8th ACM Conference on Recommender Systems, RecSys ’14, pages 113–120, 2014. [27] A. W. Yu, W. Ma, Y. Yu, J. G. Carbonell, and S. Sra. Efficient structured matrix rank minimization. In NIPS, 2014. [28] A. N. Zaid Harchaoui, Anatoli Juditsky. Conditional gradient algorithms for norm-regularized smooth convex optimization. Mathematical Programming, 2013. [29] K. Zhou, H. Zha, and L. Song. Learning social infectivity in sparse low-rank networks using multidimensional hawkes processes. In Artificial Intelligence and Statistics (AISTATS), 2013. [30] K. Zhou, H. Zha, and L. Song. Learning triggering kernels for multi-dimensional hawkes processes. In International Conference on Machine Learning (ICML), 2013. 9 | 2015 | 33 |
5,847 | Discriminative Robust Transformation Learning Jiaji Huang Qiang Qiu Guillermo Sapiro Robert Calderbank Department of Electrical Engineering, Duke University Durham, NC 27708 {jiaji.huang,qiang.qiu,guillermo.sapiro,robert.calderbank}@duke.edu Abstract This paper proposes a framework for learning features that are robust to data variation, which is particularly important when only a limited number of training samples are available. The framework makes it possible to tradeoff the discriminative value of learned features against the generalization error of the learning algorithm. Robustness is achieved by encouraging the transform that maps data to features to be a local isometry. This geometric property is shown to improve (K, ϵ)-robustness, thereby providing theoretical justification for reductions in generalization error observed in experiments. The proposed optimization framework is used to train standard learning algorithms such as deep neural networks. Experimental results obtained on benchmark datasets, such as labeled faces in the wild, demonstrate the value of being able to balance discrimination and robustness. 1 Introduction Learning features that are able to discriminate is a classical problem in data analysis. The basic idea is to reduce the variance within a class while increasing it between classes. One way to implement this is by regularizing a certain measure of the variance, while assuming some prior knowledge about the data. For example, Linear Discriminant Analysis (LDA) [4] measures sample covariance and implicitly assumes that each class is Gaussian distributed. The Low Rank Transform (LRT) [10], instead uses nuclear norm to measure the variance and assumes that each class is near a low-rank subspace. A different approach is to regularize the pairwise distances between data points. Examples include the seminal work on metric learning [17] and its extensions [5,6,16]. While great attention has been paid to designing objectives to encourage discrimination, less effort has been made in understanding and encouraging robustness to data variation, which is especially important when a limited number of training samples are available. One exception is [19], which promotes robustness by regularizing the traditional metric learning objective using prior knowledge from an auxiliary unlabeled dataset. In this paper we develop a general framework for balancing discrimination and robustness. Robustness is achieved by encouraging the learned data-to-features transform to be locally an isometry within each class. We theoretically justify this approach using (K, ϵ)-robustness [1,18] and give an example of the proposed formulation, incorporating it in deep neural networks. Experiments validate the capability to trade-off discrimination against robustness. Our main contributions are the following: 1) prove that locally near isometry leads to robustness; 2) propose a practical framework that allows to robustify a wide class of learned transforms, both linear and nonlinear; 3) provide an explicit realization of the proposed framework, achieving competitive results on difficult face verification tasks. The paper is organized as follows. Section 2 motivates the proposed study and proposes a general formulation for learning a Discriminative Robust Transform (DRT). Section 3 provides a theoretical justification for the framework by making an explicit connection to robustness. Section 4 gives a 1 specific example of DRT, denoted as Euc-DRT. Section 5 provides experimental validation of EucDRT, and section 6 presents conclusions. 1 2 Problem Formulation Consider an L-way classification problem. The training set is denoted by T = {(xi, yi)}, where xi ∈Rn is the data and yi ∈{1, . . . , L} is the class label. We want to learn a feature transform fα(·) such that a datum x becomes more discriminative when it is transformed to feature fα(x). The transform fα is parametrized by a vector α, a framework that includes linear transforms and neural networks where the entries of α are the learned network parameters. 2.1 Motivation The transform fα promotes discriminability by reducing intra-class variance and enlarging interclass variance. This aim is expressed in the design of objective functions [5, 10] or the structure of the transform fα [7, 11]. However the robustness of the learned transform is an important issue that is often overlooked. When training samples are scarce, statistical learning theory [15] predicts overfitting to the training data. The result of overfitting is that discrimination achieved on test data will be significantly worse than that on training data. Our aim in this paper is the design of robust transforms fα for which the training-to-testing degradation is small [18]. We formally measure robustness of the learned transform fα in terms of (K, ϵ)-robustness [1]. Given a distance metric ρ, a learning algorithm is said to be (K, ϵ)-robust if the input data space can be partitioned into K disjoint sets Sk, k = 1, ..., K, such that for all training sets T , the learned parameter αT determines a loss for which the value on pairs of training samples taken from different sets Sj and Sk is very close to the value of any pair of data samples taken from Sj and Sk. (K, ϵ)-robustness is illustrated in Fig. 1, where S1 and S2 are both of diameter γ and |e −e′| = |ρ(fα(x1), fα(x2)) −ρ(fα(x′ 1), fα(x′ 2))|. If the transform fα preserves all distances within S1 and S2, then |e −e′| cannot deviate much from |d −d′| ≤2γ. Figure 1: (K, ϵ)-robustness: Here d = ρ(x1, x2), d′ = ρ(x′ 1, x′ 2), e = ρ(fα(x1), fα(x2)), and e′ = ρ(fα(x′ 1), fα(x′ 2)). The difference |e −e′| cannot deviate too much from |d −d′|. 2.2 Formulation and Discussion Motivated by the above reasoning, we now present our proposed framework. First we define a pair label ℓi,j ≜ 1 if yi = yj −1 otherwise . Given a metric ρ, we use the following hinge loss to encourage high inter-class distance and small intra-class distance. 1 |P| X i,j∈P max {0, ℓi,j [ρ (fα(xi), fα(xj)) −t(ℓi,j)]} , (1) Here P = {(i, j|i ̸= j)} is the set of all data pairs. t(ℓi,j) ≥0 is a function of ℓi,j and t(1) < t(−1). Similar to metric learning [17], this loss function connects pairwise distance to discrimination. However traditional metric learning typically assumes squared Euclidean distance and here the metric ρ can be arbitrary. For robustness, as discussed above, we may want fα(·) to be distance-preserving within each small local region. In particular, we define the set of all local neighborhoods as NB ≜{(i, j)|ℓi,j = 1, ρ(xi, xj) ≤γ} . 1A note on the notations: matrices (vectors) are denoted in upper (lower) case bold letters. Scalars are denoted in plain letters. 2 Therefore, we minimize the following objective function 1 |NB| X (i,j)∈N B |ρ(fα(xi), fα(xj)) −ρ(xi, xj)| . (2) Note that we do not need to have the same metric in both the input and the feature space, they do not even have in general the same dimension. With a slight abuse of notation we use the same symbol to denote both metrics. To achieve discrimination and robustness simultaneously, we formulate the objective function as a weighted linear combination of the two extreme cases in (1) and (2) λ |P| X i,j∈P max {0, ℓi,j [ρ (fα(xi), fα(xj)) −t(ℓi,j)]}+1 −λ |NB| X (i,j)∈N B |ρ(fα(xi), fα(xj)) −ρ(xi, xj)| (3) where λ ∈[0, 1]. The formulation (3) balances discrimination and robustness. When λ = 1 it seeks discrimination, and as λ decreases it starts to encourage robustness. We shall refer to a transform that is learned by solving (3) as a Discriminative Robust Transform (DRT). The DRT framework provides opportunity to select both the distance measure and the transform family. 3 Theoretical Analysis In this section, we provide a theoretical explanation for robustness. In particular, we show that if the solution to (1) yields a transform fα that is locally a near isometry, then fα is robust. 3.1 Theoretical Framework Let X denote the original data, let Y = {1, ..., L} denote the set of class labels, and let Z = X × Y. The training samples are pairs zi = (xi, yi), i = 1, . . . , n drawn from some unknown distribution D defined on Z. The indicator function is defined as ℓi,j = 1 if yi = yj and −1 otherwise. Let fα be a transform that maps a low-level feature x to a more discriminative feature fα(x), and let F denote the space of transformed features. For simplicity we consider an arbitrary metric ρ defined on both X and F (the general case of different metrics is a straightforward extension), and a loss function g(ρ(fα(xi), fα(xj)), ℓi,j) that encourages ρ(fα(xi), fα(xj)) to be small (big) if ℓi,j = 1 (−1). We shall require the Lipschtiz constant of g(·, 1) and g(·, −1) to be upper bounded by A > 0. Note that the loss function in Eq. (1) has a Lipschtiz constant of 1. We abbreviate g(ρ(fα(xi), fα(xj)), ℓi,j) ≜hα(zi, zj). The empirical loss on the training set is a function of α given by Remp(α) ≜ 2 n(n−1) Pn i,j=1 i̸=j hα(zi, zj), (4) and the expected loss on the test data is given by R(α) ≜ Ez′ 1,z′ 2∼D [hα(z′ 1, z′ 2)] . (5) The algorithm operates on pairs of training samples and finds parameters αT ≜arg min α Remp(α), (6) that minimize the empirical loss on the training set T . The difference Remp −R between expected loss on the test data and empirical loss on the training data is the generalization error of the algorithm. 3.2 (K, ϵ)-robustness and Covering Number We work with the following definition of (K, ϵ)-robustness [1]. Definition 1. A learning algorithm is (K, ϵ)-robust if Z = X ×Y can be partitioned into K disjoint sets Zk, k = 1, . . . , K such that for all training sets T ∈Zn, the learned parameter αT determines a loss function where the value on pairs of training samples taken from sets Zp and Zq is “very close” to the value of any pair of data samples taken from Zp and Zq. Formally, assume zi, zj ∈T , with zi ∈Zp and zj ∈Zq, if z′ i ∈Zp and z′ j ∈Zq, then hαT (zi, zj) −hαT (z′ i, z′ j) ≤ϵ. 3 Remark 1. (K, ϵ)-robustness means that the loss incurred by a testing pair (z′ i, z′ j) in Zp × Zq is very close to the loss incurred by any training pair (zi, zj) in Zp × Zq. It is shown in [1] that the generalization error of (K, ϵ)-robust algorithms is bounded as R(αT ) −Remp(αT ) ≤ϵ + O r K n ! . (7) Therefore the smaller ϵ, the smaller is the generalization error, and the more robust is the learning algorithm. Given a metric space, the covering number specifies how many balls of a given radius are needed to cover the space. The more complex the metric space, the more balls are needed to cover it. Covering number is formally defined as follows. Definition 2 (Covering number). Given a metric space (S, ρ), we say that a subset ˆS of S is a γ-cover of S, if for every element s ∈S, there exists ˆs ∈ˆS such that ρ(s,ˆs) ≤γ. The γ-covering number of S is Nγ(S, ρ) = min{| ˆS| : ˆS is a γ-cover of S}. Remark 2. The covering number is a measure of the geometric complexity of (S, ρ). A set S with covering number Nγ/2(S, ρ) can be partitioned into Nγ/2(S, ρ) disjoint subsets, such that any two points within the same subset are separated by no more than γ. Lemma 1. The metric space Z = X × Y can be partitioned into LNγ/2(X, ρ) subsets, denoted as Z1, . . . , ZLNγ/2(X,ρ), such that any two points z1 ≜(x1, y1), z2 ≜(x2, y2) in the same subset satisfy y1 = y2 and ρ(x1, x2) ≤γ. Proof. Assuming the metric space (X, ρ) is compact, we can partition X into Nγ/2(X, ρ) subsets, each with diameter at most γ. Since Y is a finite set of size L, we can partition Z = X × Y into LNγ/2(X, ρ) subsets with the property that two samples (x1, y1), (x2, y2) in the same subset satisfy y1 = y2 and ρ(x1, x2) ≤γ. It follows from Lemma 1 that we may partition X into subsets X1, . . . , XLNγ/2(X,ρ), such that pairs of points x1, x2 from the same subset have the same label and satisfy ρ(xi, xj) ≤γ. Before we connect local geometry to robustness we need one more definition. We say that a learned transform fα is a δ-isometry if the metric is distorted by at most δ: Definition 3 (δ-isometry). Let A, B be metric spaces with metrics ρA and ρB. A map f : A 7→B is a δ-isometry if for any a1, a2 ∈A, |ρA(f(a1), f(a2)) −ρB(a1, a2)| ≤δ. Theorem 1. Let fα be a transform derived via Eq. (6) and let X1, . . . , XLNγ/2(X,ρ) be a cover of X as described above. If fα is a δ-isometry, then it is (LNγ/2(X, ρ), 2A(γ + δ))-robust. Proof sketch. Consider training samples zi, zj and testing samples z′ i, z′ j such that zi, z′ i ∈Zp and zj, z′ j ∈Zq for some p, q ∈{1, . . . , LNγ/2(X, ρ)}. Then by Lemma 1, ρ(xi, x′ i) ≤γ and ρ(xj, x′ j) ≤γ, yi = y′ i and yj = y′ j, and xi, x′ i ∈Xp and xj, x′ j ∈Xq. By definition of δ-isometry, |ρ(fαT (xi), fαT (x′ i)) −ρ(xi, x′ i)| ≤δ and |ρ(fαT (xj), fαT (x′ j)) −ρ(xj, x′ j)| ≤δ. Rearranging the terms gives ρ(fαT (xi), fαT (x′ i)) ≤ρ(xi, x′ i)+δ ≤γ +δ and ρ(fαT (xj), fαT (x′ j)) ≤ρ(xj, x′ j)+δ ≤γ +δ. Figure 2: Proof without words. 4 In order to bound the generalization error, we need to bound the difference between ρ(fαT (xi), fαT (xj)) and ρ(fαT (x′ i), fαT (x′ j)). The details can be found in [9]; here we appeal to the proof schematic in Fig. 2. We need to bound |e −e′| and it cannot exceed twice the diameter of a local region in the transformed domain. Robustness of the learning algorithm depends on the granularity of the cover and the degree to which the learned transform fα distorts distances between pairs of points in the same covering subset. The subsets in the cover constitute regions where the local geometry makes it possible to bound generalization error. It now follows from [1] that the generalization error satisfies R(αT ) − Remp(αT ) ≤2A(γ + δ) + O q K n . The DRT proposed here is a particular example of a local isometry, and Theorem 1 explains why the generalization error is smaller than that of pure metric learning. The transform described in [9] partitions the metric space X into exactly L subsets, one for each class. The experiments reported in Section 5 demonstrate that the performance improvements derived from working with a finer partition can be worth the cost of learning finer grained local regions. 4 An Illustrative Realization of DRT Having justified robustness, we now provide a realization of the proposed general DRT where the metric ρ is Euclidean distance. We use Gaussian random variables to initialize α, then, on the randomly transformed data, we set t(1) (t(−1)) to be the average intra-class (inter-class) pairwise distance. In all our experiments, the solution satisfied the condition t(1) < t(−1) required in Eq. (1). We calculate the diameter γ of the local regions NB indirectly, using the κ-nearest neighbors of each training sample to define a local neighborhood. We leave the question of how best to initialize the indicator t and the diameter γ for future research. We denote this particular example as Euc-DRT and use gradient descent to solve for α. Denoting the objective by J, we define yi ≜fα(xi), δi,j ≜fα(xi) −fα(xj), and ρ0 i.j ≜∥xi −xj∥. Then ∂J ∂yi = X (i,j)∈P ℓi,j(∥δi,j∥−t(ℓi,j))>0 λ |P| · ℓi,j · δi,j ∥δi,j∥+ X (i,j)∈N B 1 −λ |NB| · sgn(∥δi,j∥−ρ0 i,j) · δi,j ∥δi,j∥. (8) In general, fα defines a D-layer neural network (when D = 1 it defines a linear transform). Let α(d) be the linear weights at the d-th layer, and let x(d) be the output of the d-th layer, so that yi = x(D) i . Then the gradients are computed as, ∂J ∂α(D) = X i ∂J ∂yi · ∂yi ∂α(D) , and ∂J ∂α(d) = X i ∂J ∂x(d+1) i · ∂x(d+1) i ∂x(d) i · ∂x(d) i ∂α(d) for 1 ≤d ≤D−1. (9) Algorithm 1 provides a summary, and we note that the extension to stochastic training using minbatches is straightforward. 5 Experimental Results In this section we report on experiments that confirm robustness of Euc-DRT. Recall that empirical loss is given by Eq. (4) where α is learned as αT from the training set T , and |T | = N. The generalization error is R −Remp where the expected loss R is estimated using a large test set. 5.1 Toy Example This illustrative example is motivated by the discussion in Section 2.1. We first generate a 2D dataset consisting of two noisy half-moons, then use a random 100 × 2 matrix to embed the data in a 100-dimensional space. We learn a linear transform fα that maps the 100 dimensional data to 2 dimensional features, and we use κ = 5 nearest neighbors to construct the set NB. We consider λ = 1, 0.5, 0.25, representing the most discriminative, balanced, and more robust scenarios. When λ = 1 the transformed training samples are rather discriminative (Fig. 3a), but when the transform is applied to testing data, the two classes are more mixed (Fig. 3d). When λ = 0.5, the 5 Algorithm 1 Gradient descent solver for Euc-DRT Input: λ ∈[0, 1], training pairs {(xi, xj, ℓi,j)}, a pre-defined D-layer network (D = 1 as linear transform), stepsize η, neighborhood size κ. Output: α 1: Randomly initialize α, compute yi = fα(xi). 2: On the yi, compute the average intra and inter-class pairwise distances, assign to t(1), t(−1) 3: For each training datum, find its κ nearest neighbor and define the set NB. 4: while stable objective not achieved do 5: Compute yi = fα(xi) by a forward pass. 6: Compute objective J. 7: Compute ∂J ∂yi as Eq. (8). 8: for l = D down to 1 do 9: Compute ∂J ∂α(d) as Eq. (9). 10: α(d) ←α(d) −η ∂J ∂α(d) . 11: end for 12: end while -20 0 20 -30 -20 -10 0 10 20 30 (a) λ = 1 Transformed training samples. (discriminative case) -20 0 20 -30 -20 -10 0 10 20 30 (b) λ = 0.5 transformed training samples. (balanced case) -20 0 20 -30 -20 -10 0 10 20 30 (c) λ = 0.25 Transformed training samples. (robust case) -20 0 20 -30 -20 -10 0 10 20 30 (d) λ = 1 Transformed testing samples. (discriminative case) -20 0 20 -30 -20 -10 0 10 20 30 (e) λ = 0.5 transformed testing samples. (balanced case) -20 0 20 -30 -20 -10 0 10 20 30 (f) λ = 0.25 Transformed testing samples. (robust case) Figure 3: Original and transformed training/testing samples embedded in 2-dimensional space with different colors representing different classes. transformed training data are more dispersed within each class (Fig. 3b), hence less easily separated than when λ = 1. However Fig. 3e shows that it is easier to separate the two classes on the test data. When λ = 0.25, robustness is preferred to discriminative power as shown in Figs. 3c and 3f. Tab. 1 quantifies empirical loss Remp, generalization error, and classification performance (by 1-nn) for λ = 1, 0.5 and 0.25. As λ decreases, Remp increases, indicating loss of discrimination on the training set. However, generalization error decreases, implying more robustness. We conclude that by varying λ, we can balance discrimination and robustness. 5.2 MNIST Classfication Using a Very Small Training Set The transform fα learned in the previous section was linear, and we now apply a more sophisticated convolutional neural network to the MNIST dataset. The network structure is similar to LeNet, and is 6 Table 1: Varying λ on a toy dataset. λ 1 0.5 0.25 Remp 1.5983 1.6025 1.9439 generalization error 10.5855 9.5071 8.8040 1-nn accuracy 92.20% 98.30% 91.55% (original data 93.35%) Table 2: Classification error on MNIST. Training/class 30 50 70 100 original pixels 81.91% 86.18% 86.86% 88.49% LeNet 87.51% 89.89% 91.24% 92.75% DML 92.32% 94.45% 95.67% 96.19% Euc-DRT 94.14% 95.20% 96.05% 96.21% Table 3: Implementation details of the neural network for MNIST classification. name parameters conv1 size: 5 × 5 × 1 × 20 stride: 1, pad: 0 pool1 size: 2 × 2 conv2 size: 5 × 5 × 20 × 50 stride: 1, pad: 0 pool2 size: 2 × 2 conv3 size: 4 × 4 × 50 × 128 stride: 1, pad: 0 made up of alternating convolutional layers and pooling layers, with parameters detailed in Table 3. We map the original 784-dimensional pixel values (28x28 image) to 128-dimensional features. While state-of-art results often use the full training set (6,000 training samples per class), here we are interested in small training sets. We use only 30 training samples per class, and we use κ = 7 nearest neighbors to define local regions in Euc-DRT. We vary λ and study empirical error, generalization error, and classification accuracy (1-nn). We observe in Fig. 4 that when λ decreases, the empirical error also decreases, but that the generalization error actually increases. By balancing between these two factors, a peak classification accuracy is achieved at λ = 0.25. Next, we use 30, 50, 70, 100 λ 0 0.25 0.5 0.75 1 Remp 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 (a) λ 0 0.25 0.5 0.75 1 R-R emp 1.5 2 2.5 3 3.5 4 4.5 (b) λ 0 0.25 0.5 0.75 1 1-nn accuracy(%) 92 92.5 93 93.5 94 94.5 (c) Figure 4: MNIST test: with only 30 training samples per class. We vary λ and assess (a) Remp; (b) generalization error; and (c) 1-nn classification accuracy. Peak accuracy is achieved at λ = 0.25. training samples per class and compare the performance of Euc-DRT with LeNet and Deep Metric Learning (DML) [7]. DML minimizes a hinge loss on the squared Euclidean distances. It shares the same spirit with our Euc-DRT using λ = 1. All methods use the same network structure, Tab. 3, to map to the features. For classification, LeNet uses a linear softmax classifier on top of the “conv3” layer and minimizes the standard cross-entropy loss during training. DML and Euc-DRT both use a 1-nn classifier on the learned features. Classification accuracies are reported in Tab. 2. In Tab. 2, we see that all the learned features improve upon the original ones. DML is very discriminative and achieves higher accuracy than LeNet. However, when the training set is very small, robustness becomes more important and Euc-DRT significantly outperforms DML. 5.3 Face Verification on LFW We now present face verification on the more challenging Labeled Faces in the Wild (LFW) benchmark, where our experiments will show that there is an advantage to balancing disciminability and robustness. Our goal is not to reproduce the success of deep learning in face verification [7, 14], but to stress the importance of robust training and to compare the proposed Euc-DRT objective with popular alternatives. Note also that it is difficult to compare with deep learning methods when training sets are proprietary [12–14]. 7 We adopt the experimental framework used in [2], and train a deep network on the WDRef dataset, where each face is described using a high dimensional LBP feature [3] (available at 2) that is reduced to a 5000-dimensional feature using PCA. The WDRef dataset is significantly smaller than the proprietary datasets typical of deep learning, such as the 4.4 million labeled faces from 4030 individuals in [14], or the 202,599 labeled faces from 10,177 individuals in [12]. It contains 2,995 subjects with about 20 samples per subject. We compare the Euc-DRT objective with DeepFace (DF) [14] and Deep Metric Learning (DML) [7], two state-of-the-art deep learning objectives. For a fair comparison, we employ the same network structure and train on the same input data. DeepFace feeds the output of the last network layer to an L-way soft-max to generate a probability distribution over L classes, then minimizes a cross entropy loss. The Euc-DRT feature fα is implemented as a two-layer fully connected network with tanh as the squash function. Weight decay (conventional Frobenius norm regularization) is employed in both DF and DML, and results are only reported for the best weight decay factor. After a network is trained on WDRef, it is tested on the LFW benchmark. Verification simply consists of comparing the cosine distance between a given pair of faces to a threshold. Fig. 5 displays ROC curves and Table 4 reports area under the ROC curve (AUC) and verification accuracy. High-Dim LBP refers to verification using the initial LBP features. DeepFace (DF) optimizes for a classification objective by minimizing a softmax loss, and it successfully separates samples from different classes. However the constraint that assigns similar representations to the same class is weak, and this is reflected in the true positive rate displayed in Fig. 5. In Deep Metric Learning (DML) this same constraint is strong, but robustness is a concern when the training set is small. The proposed Euc-DRT improves upon both DF and DML by balancing disciminability and robustness. It is less conservative than DF for better discriminability, and more responsive to local geometry than DML for smaller generalization error. Face verification accuracy for Euc-DRT was obtained by varying the regularization parameter λ between 0.4 and 1 (as shown in Fig 6), then reporting the peak accuracy observed at λ = 0.9. 0 0.5 1 0.5 0.6 0.7 0.8 0.9 1 HD-LBP deepFace DML Euc-DRT Figure 5: Comparison of ROCs for all methods λ 0.4 0.6 0.8 1 verification accuracy (%) 91.4 91.6 91.8 92 92.2 92.4 Figure 6: Verification accuracy of Euc-DRT as λ varies Table 4: Verification accuracy and AUCs on LFW Method Accuracy AUC (%) (×10−2) HD-LBP 74.73 82.22±1.00 deepFace 88.72 95.50± 0.29 DML 90.28 96.74±0.33 Euc-DRT 92.33 97.77± 0.25 6 Conclusion We have proposed an optimization framework within which it is possible to tradeoff the discriminative value of learned features with robustness of the learning algorithm. Improvements to generalization error predicted by theory are observed in experiments on benchmark datasets. Future work will investigate how to initialize and tune the optimization, also how the Euc-DRT algorithm compares with other methods that reduce generalization error. 7 Acknowledgement The work of Huang and Calderbank was supported by AFOSR under FA 9550-13-1-0076 and by NGA under HM017713-1-0006. The work of Qiu and Sapiro is partially supported by NSF and DoD. 2http://home.ustc.edu.cn/chendong/ 8 References [1] A. Bellet and A. Habrard. Robustness and generalization for metric learning. Neurocomputing, 151(14):259–267, 2015. [2] D. Chen, X. Cao, L. Wang, F. Wen, and J. Sun. Bayesian face revisited: A joint formulation. In European Conference on Computer Vision (ECCV), 2012. [3] D. Chen, X. Cao, F. Wen, and J. Sun. Blessing of dimensionality: High-dimensional feature and its efficient compression for face verification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. [4] K. Fukunaga. Introduction to Statistical Pattern Recognition. San Diego: Academic Press, 1990. [5] A. Globerson and S. Roweis. Metric learning by collapsing classes. In Advances in Neural Information Processing Systems (NIPS), 2005. [6] J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In Advances in Neural Information Processing Systems (NIPS), 2004. [7] J. Hu, J. Lu, and Y. Tan. Discriminative deep metric learning for face verification in the wild. In Computer Vision and Pattern Recognition (CVPR), pages 1875–1882, 2014. [8] 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 0749, University of Massachusetts, Amherst, October 2007. [9] J. Huang, Q. Qiu, R. Calderbank, and G. Sapiro. Geometry-aware deep transform. In International Conference on Computer Vision, 2015. [10] G. Sapiro Q. Qiu. Learning transformations for clustering and classification. Journal of Machine Learning Research (JMLR), pages 187–225, 2015. [11] C. Sumit, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 1, pages 539–546, 2005. [12] Y. Sun, Y. Chen, X. Wang, and X. Tang. Deep learning face representation by joint identification-verification. In Advances in Neural Information Processing Systems (NIPS), pages 1988–1996, 2014. [13] Y. Sun, X. Wang, and X. Tang. Deep learning face representation from predicting 10,000 classes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1891–1898, 2014. [14] Y. Taigman, M. Yang, M. A. Ranzato, and L. Wolf. Deepface: Closing the gap to humanlevel performance in face verification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1701–1708, 2014. [15] V. N. Vapnik. An overview of statistical learning theory. IEEE Transactions on Neural Networks, 10(5):988–999, 1999. [16] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. [17] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In Advances in Neural Information Processing Systems (NIPS), 2002. [18] H. Xu and S. Mannor. Robustness and generalization. Machine Learning, 86(3):391–423, 2012. [19] Z. Zha, T. Mei, M. Wang, Z. Wang, and X. Hua. Robust distance metric learning with auxiliary knowledge. In International Joint Conference on Artificial Intelligence (IJCAI), 2009. 9 | 2015 | 330 |
5,848 | Deep Poisson Factor Modeling Ricardo Henao, Zhe Gan, James Lu and Lawrence Carin Department of Electrical and Computer Engineering Duke University, Durham, NC 27708 {r.henao,zhe.gan,james.lu,lcarin}@duke.edu Abstract We propose a new deep architecture for topic modeling, based on Poisson Factor Analysis (PFA) modules. The model is composed of a Poisson distribution to model observed vectors of counts, as well as a deep hierarchy of hidden binary units. Rather than using logistic functions to characterize the probability that a latent binary unit is on, we employ a Bernoulli-Poisson link, which allows PFA modules to be used repeatedly in the deep architecture. We also describe an approach to build discriminative topic models, by adapting PFA modules. We derive efficient inference via MCMC and stochastic variational methods, that scale with the number of non-zeros in the data and binary units, yielding significant efficiency, relative to models based on logistic links. Experiments on several corpora demonstrate the advantages of our model when compared to related deep models. 1 Introduction Deep models, understood as multilayer modular networks, have been gaining significant interest from the machine learning community, in part because of their ability to obtain state-of-the-art performance in a wide variety of tasks. Their modular nature is another reason for their popularity. Commonly used modules include, but are not limited to, Restricted Boltzmann Machines (RBMs) [10], Sigmoid Belief Networks (SBNs) [22], convolutional networks [18], feedforward neural networks, and Dirichlet Processes1 (DPs). Perhaps the two most well-known deep model architectures are the Deep Belief Network (DBN) [11] and the Deep Boltzmann Machine (DBM) [25], the former composed of RBM and SBN modules, whereas the latter is purely built using RBMs. Deep models are often employed in topic modeling. Specifically, hierarchical tree-structured models have been widely studied over the last decade, often composed of DP modules. Examples of these include the nested Chinese Restaurant Process (nCRP) [1], the hierarchical DP (HDP) [27], and the nested HDP (nHDP) [23]. Alternatively, topic models built using modules other than DPs have been proposed recently, for instance the Replicated Softmax Model (RSM) [12] based on RBMs, the Neural Autoregressive Density Estimator (NADE) [17] based on neural networks, the Overreplicated Softmax Model (OSM) [26] based on DBMs, and Deep Poisson Factor Analysis (DPFA) [6] based on SBNs. DP-based models have attractive characteristics from the standpoint of interpretability, in the sense that their generative mechanism is parameterized in terms of distributions over topics, with each topic characterized by a distribution over words. Alternatively, non-DP-based models, in which modules are parameterized by a deep hierarchy of binary units [12, 17, 26], do not have parameters that are as readily interpretable in terms of topics of this type, although model performance is often excellent. The DPFA model in [6] is one of the first representations that characterizes documents based on distributions over topics and words, while simultaneously employing a deep architecture based on binary units. Specifically, [6] integrates the capabilities of Poisson Factor Analysis (PFA) 1Deep models based on DP priors are usually called hierarchical models. 1 [32] with a deep architecture composed of SBNs [7]. PFA is a nonnegative matrix factorization framework closely related to DP-based models. Results in [6] show that DPFA outperforms other well-known deep topic models. Building upon the success of DPFA, this paper proposes a new deep architecture for topic modeling, based entirely on PFA modules. Our model fundamentally merges two key aspects of DP and non-DP-based architectures, namely: (i) its fully nonnegative formulation relies on Dirichlet distributions, and is thus readily interpretable throughout all its layers, not just at the base layer as in DPFA [6]; (ii) it adopts the rationale of traditional non-DP-based models such as DBNs and DBMs, by connecting layers via binary units, to enable learning of high-order statistics and structured correlations. The probability of a binary unit being on is controlled by a Bernoulli-Poisson link [30] (rather than a logistic link, as in the SBN), allowing repeated application of PFA modules at all layers of the deep architecture. The main contributions of this paper are: (i) A deep architecture for topic models based entirely on PFA modules. (ii) Unlike DPFA, which is based on SBNs, our model has inherent shrinkage in all its layers, thanks to the DP-like formulation of PFA. (iii) DPFA requires sequential updates for its binary units, while in our formulation these are updated in block, greatly improving mixing. (iv) We show how PFA modules can be used to easily build discriminative topic models. (v) An efficient MCMC inference procedure is developed, that scales as a function of the number of non-zeros in the data and binary units. In contrast, models based on RBMs and SBNs scale with the size of the data and binary units. (vi) We also employ a scalable Bayesian inference algorithm based on the recently proposed Stochastic Variational Inference (SVI) framework [15]. 2 Model 2.1 Poisson factor analysis as a module We present the model in terms of document modeling and word counts, but the basic setup is applicable to other problems characterized by vectors of counts (and we consider such a non-document application when presenting results). Assume xn is an M-dimensional vector containing word counts for the n-th of N documents, where M is the vocabulary size. We impose the model, xn ∼Poisson (Ψ(θn ◦hn)), where Ψ ∈RM×K + is the factor loadings matrix with K factors, θn ∈RK + are factor intensities, hn ∈{0, 1}K is a vector of binary units indicating which factors are active for observation n, and ◦represents the element-wise (Hadamard) product. One possible prior specification for this model, recently introduced in [32], is xmn = PK k=1xmkn , xmkn ∼Poisson(λmkn) , λmkn = ψmkθknhkn , ψk ∼Dirichlet(η1M) , θkn ∼Gamma(rk, (1 −b)b−1) , hkn ∼Bernoulli(πkn) , (1) where 1M is an M-dimensional vector of ones, and we have used the additive property of the Poisson distribution to decompose the m-th observed count of xn as K latent counts, {xmkn}K k=1. Here, ψk is column k of Ψ, xmn is component m of xn, θkn is component k of θn, and hkn is component k of hn. Furthermore, we let η = 1/K, b = 0.5 and rk ∼Gamma(1, 1). Note that η controls for the sparsity of Ψ, while rk accommodates for over-dispersion in xn via θn (see [32] for details). There is one parameter in (1) for which we have not specified a prior distribution, specifically E[p(hkn = 1)] = πkn. In [32], hkn is provided with a beta-Bernoulli process prior by letting πkn = πk ∼Beta(cǫ, c(1 −ǫ)), meaning that every document has on average the same probability of seeing a particular topic as active, based on corpus-wide popularity. It further assumes topics are independent of each other. These two assumptions are restrictive because: (i) in practice, documents belong to a rather heterogeneous population, in which themes naturally occur within a corpus; letting documents have individual topic activation probabilities will allow the model to better accommodate for heterogeneity in the data. (ii) Some topics are likely to co-occur systematically, so being able to harness such correlation structures can improve the ability of the model for fitting the data. The hierarchical model in (1), which in the following we denote as xn ∼PFA(Ψ, θn, hn; η, rk, b), short for Poisson Factor Analysis (PFA), represents documents, xn, as purely additive combinations of up to K topics (distributions over words), where hn indicates what topics are active and θn, is the intensity of each one of the active topics that is manifested in document xn. It is also worth noting that the model in (1) is closely related to other widely known topic model approaches, such as Latent Dirichlet Allocation (LDA) [3], HDP [27] and Focused Topic Modeling (FTM) [29]. Connections between these models are discussed in Section 4. 2 2.2 Deep representations with PFA modules Several models have been proposed recently to address the limitations described above [1, 2, 6, 27]. In particular, [6] proposed using multilayer SBNs [22], to impose correlation structure across topics, while providing each document with the ability to control its topic activation probabilities, without the need of a global beta-Bernoulli process [32]. Here we follow the same rationale as [6], but without SBNs. We start by noting that for a binary vector hn with elements hkn, we can write hkn = 1(zkn ≥1), zkn ∼Poisson(˜λkn) , (2) where zkn is a latent count for variable hkn, parameterized by a Poisson distribution with rate ˜λkn; 1(·) = 1 if the argument is true, and 1(·) = 0 otherwise. The model in (2), recently proposed in [30], is known as the Bernoulli-Poisson Link (BPL) and is denoted hn ∼BPL(˜λn), for ˜λn ∈RK + . After marginalizing out the latent count zkn [30], the model in (2) has the interesting property that p(hkn = 1) = Bernoulli(πkn), where πkn = 1 −exp(−˜λkn). Hence, rather than using the logistic function to represent binary unit probabilities, we employ πkn = 1 −exp(−˜λkn). In (1) and (2) we have represented the Poisson rates as λmkn and ˜λkn, respectively, to distinguish between the two. However, the fact that the count vector in (1) and the binary variable in (2) are both represented in terms of Poisson distributions suggests the following deep model, based on PFA modules (see graphical model in Supplementary Material): xn ∼PFA Ψ(1), θ(1) n , h(1) n ; η(1), r(1) k , b(1) , h(1) n = 1 z(2) n , z(2) n ∼PFA Ψ(2), θ(2) n , h(2) n ; η(2), r(2) k , b(2) , ... ... h(L−1) n = 1 z(L) n , z(L) n ∼PFA Ψ(L), θ(L) n , h(L) n ; η(L), r(L) k , b(L) , h(L) n = 1 z(L+1) n , (3) where L is the number of layers in the model, and 1(·) is a vector operation in which each component imposes the left operation in (2). In this Deep Poisson Factor Model (DPFM), the binary units at layer ℓ∈{1, . . . , L} are drawn h(ℓ) n ∼BPL(λ(ℓ+1) n ), for λ(ℓ) n = Ψ(ℓ)(θ(ℓ) n ◦h(ℓ) n ). The form of the model in (3) introduces latent variables {z(ℓ) n }L+1 ℓ=2 and the element-wise function 1(·), rather than explicitly drawing {h(ℓ) n }L ℓ=1 from the BPL distribution. Concerning the top layer, we let z(L+1) kn ∼Poisson(λ(L+1) k ) and λ(L+1) k ∼Gamma(a0, b0). 2.3 Model interpretation Consider layer 1 of (3), from which xn is drawn. Assuming h(1) n is known, this corresponds to a focused topic model [29]. The columns of Ψ(1) correspond to topics, with the k-th column ψ(1) k defining the probability with which words are manifested for topic k (each ψ(1) k is drawn from a Dirichlet distribution, as in (1)). Generalizing the notation from (1), λ(1) kn = ψ(1) k θ(1) kn h(1) kn ∈RM + is the rate vector associated with topic k and document n, and it is active when h(1) kn = 1. The wordcount vector for document n manifested from topic k is xkn ∼Poisson(λ(1) kn), and xn = PK1 k=1 xkn, where K1 is the number of topics in the model. The columns of Ψ(1) define correlation among the words associated with the topics; for a given topic (column of Ψ(1)), some words co-occur with high probability, and other words are likely jointly absent. We now consider a two-layer model, with h(2) n assumed known. To generate h(1) n , we first draw z(2) n , which, analogous to above, may be expressed as z(2) n = PK2 k=1 z(2) kn, with z(2) kn ∼Poisson(λ(2) kn) and λ(2) kn = ψ(2) k θ(2) kn h(2) kn. Column k of Ψ(2) corresponds to a meta-topic, with ψ(2) k a K1-dimensional probability vector, denoting the probability with which each of the layer-1 topics are “on” when layer-2 “meta-topic” k is on (i.e., when h(2) kn = 1). The columns of Ψ(2) define correlation among the layer-1 topics; for a given layer-2 meta-topic (column of Ψ(2)), some layer-1 topics co-occur with high probability, and other layer-1 topics are likely jointly absent. 3 As one moves up the hierarchy, to layers ℓ> 2, the meta-topics become increasingly more abstract and sophisticated, manifested in terms of probabilisitic combinations of topics and meta-topics at the layers below. Because of the properties of the Dirichlet distribution, each column of a particular Ψ(ℓ) is encouraged to be sparse, implying that a column of Ψ(ℓ) encourages use of a small subset of columns of Ψ(ℓ−1), with this repeated all the way down to the data layer, and the topics reflected in the columns of Ψ(1). This deep architecture imposes correlation across the layer-1 topics, and it does it through use of PFA modules at all layers of the deep architecture, unlike [6] which uses an SBN for layers 2 through L, and a PFA at the bottom layer. In addition to the elegance of using a single class of modules at each layer, the proposed deep model has important computational benefits, as later discussed in Section 3. 2.4 PFA modules for discriminative tasks Assume that there is a label yn ∈{1, . . . , C} associated with document n. We seek to learn the model for mapping xn →yn simultaneously with learning the above deep topic representation. In fact, the mapping xn →yn is based on the deep generative process for xn in (3). We represent yn via the C-dimensional one-hot vector byn, which has all elements equal to zero except one, with the non-zero value (which is set to one) located at the position of the label. We impose the model byn ∼Multinomial(1, bλn) , bλcn = λcn/ PC c=1 λcn , (4) where bλcn is element c of bλn, λn = B(θ(1) n ◦h(1) n ) and B ∈RC×K + , is a matrix of nonnegative classification weights, with prior distribution bk ∼Dirichlet(ζ1C), where bk is a column of B. Combining (3) with (4) allows us to learn the mapping xn →yn via the shared first-layer local representation, θ(1) n ◦h(1) n , that encodes topic usage for document n. This sharing mechanism allows the model to learn topics, Ψ(1), and meta-topics, {Ψ(ℓ)}L ℓ=2, biased towards discrimination, as opposed to just explaining the data, xn. We call this construction discriminative deep Poisson factor modeling. It is worth noting that this is the first time that PFA and multi-class classification have been combined into a joint model. Although other DP-based discriminative topic models have been proposed [16, 21], they rely on approximations in order to combine the topic model, usually LDA, with softmax-based classification approaches. 3 Inference A very convenient feature of the model in (3) is that all its conditional posterior distributions can be written in closed form due to local conjugacy. In this section, we focus on Markov chain Monte Carlo (MCMC) via Gibbs sampling as reference implementation and a stochastic variational inference approach for large datasets, where the fully Bayesian treatment becomes prohibitive. Other alternatives for scaling up inference in Bayesian models such as the parameter server [13, 19], conditional density filtering [9] and stochastic gradient-based approaches [4, 5, 28] are left as interesting future work. MCMC Due to local conjugacy, Gibbs sampling for the model in (3) amounts to sampling in sequence from the conditional posterior of all the parameters of the model, namely {Ψ(ℓ), θ(ℓ) n , h(ℓ) n , r(ℓ) k }L ℓ=1 and λ(L+1). The remaining parameters of the model are set to fixed values: η = 1/K, b = 0.5 and a0 = b0 = 1. We note that priors for η, b, a0 and b0 exist that result in Gibbs-style updates, and can be easily incorporated into the model if desired; however, we opted to keep the model as simple as possible, without compromising flexibility. The most unique conditional posteriors are shown below, without layer index for clarity, ψk ∼Dirichlet(η + x1k·, . . . , η + xMk·) , θkn ∼Gamma(rkhkn + x·kn, b−1) , hkn ∼δ(x·kn = 0)Bernoulli(˜πkn(˜πkn + 1 −πkn)−1) + δ(x·kn ≥1) , (5) where xmk· = PN n=1 xmkn, x·kn = PM m=1 xmkn and ˜πkn = πkn(1 −b)rk. Omitted details, including those for the discriminative DPFM in Section 2.4, are given in the Supplementary Material. 4 Initialization is done at random from prior distributions, followed by layer-wise fitting (pre-training). In the experiments, we run 100 Gibbs sampling cycles per layer. In preliminary trials we observed that 50 cycles are usually enough to obtain good initial values of the global parameters of the model, namely {Ψ(ℓ), r(ℓ) k }L ℓ=1 and λ(L+1). Stochastic variational inference (SVI) SVI is a scalable algorithm for approximating posterior distributions consisting of EM-style local-global updates, in which subsets of a dataset (minibatches) are used to update in closed-form the variational parameters controlling both the local and global structure of the model in an iterative fashion [15]. This is done by using stochastic optimization with noisy natural gradients to optimize the variational objective function. Additional details and theoretical foundations of SVI can be found in [15]. In practice the algorithm proceeds as follows, where again we have omitted the layer index for clarity: (i) let {Ψ(t), r(t) k , λ(t)} be the global variables at iteration t. (ii) Sample a mini-batch from the full dataset. (iii) Compute updates for the variational parameters of the local variables using φmkn ∝exp(E[log ψmk] + E[log θkn]) , θkn ∼Gamma(E[rk]E[hkn] + PM m=1φmkn, b−1) , hkn ∼E[p(x·kn = 0)]Bernoulli(E[˜πkn](E[˜πkn] + 1 −E[πkn])−1) + E[p(x·kn ≥1)] , where E[xmkn] = φmkn and E[˜πkn] = E[πkn](1 −b)E[rk]. In practice, expectations for θkn and hkn are computed in log-domain. (iv) Compute a local update for the variational parameters of the global variables (only Ψ is shown) using bψmk = η + NN −1 B PNB n=1φmkn , (6) where N and NB are sizes of the corpus and mini-batch, respectively. Finally, we update the global variables as ψ(t+1) k = (1 −ρt)ψ(t) k + ρt b ψk, where ρt = (t + τ)−κ. The forgetting rate, κ ∈ (0.5, 1] controls how fast previous information is forgotten and the delay, τ ≥0, down-weights early iterations. These conditions for κ and τ guarantee that the iterative algorithm converges to a local optimum of the variational objective function. In the experiments, we set κ = 0.7 and τ = 128. Additional details of the SVI algorithm for the model in (3) are given in the Supplementary Material. Importance of computations scaling as a function of number of non-zeros From a practical standpoint, the most important feature of the model in (3) is that inference does not scale as a function of the size of the corpus, but as a function of its number of non-zero elements, which is advantageous in cases where the input data is sparse (often the case). For instance, 2% of the entries in the widely studied 20 Newsgroup corpus are non-zero; similar proportions are also observed in the Reuters and Wikipedia data. Furthermore, this feature also extends to all the layers of the model regardless of {h(ℓ) n } being latent. Similarly, for the discriminative DPFM in Section 2.4, inference scales with N, not CN, because the binary vector byn has a single non-zero entry. This is particularly appealing in cases where C is large. In order to show that this scaling behavior holds, it is enough to see that by construction, from (1), if xmn = PK k=1 xmkn = 0 (or z(ℓ) mn for ℓ> 1), thus xmkn = 0, ∀k with probability 1. Besides, from (2) we see that if hkn = 0 then zkn = 0 with probability 1. As a result, update equations for all parameters of the model except for {h(ℓ) n }, depend only on non-zero elements of xn and {z(ℓ) n }. Updates for the binary variables can be cheaply obtained in block from h(ℓ) kn ∼Bernoulli(π(ℓ) kn) via ˜λ(ℓ) kn, as previously described. It is worth mentioning that models based on multinomial or Poisson likelihoods such as LDA [3], HDP [27], FTM [29] and PFA [32], also enjoy this property. However, the recently proposed deep PFA [6], does not use PFA modules on layers other than the first one. It uses SBNs or RBMs that are known to scale with the number of binary variables as opposed to their non-zero elements. 4 Related work Connections to other DP-based topic models PFA is a nonnegative matrix factorization model with Poisson link that is closely related to other DP-based models. Specifically, [32] showed that 5 by making p(hkn = 1) = 1 and letting θkn have a Dirichlet, instead of a Gamma distribution as in (1), we can recover LDA by using the equivalence between Poisson and multinomial distributions. By looking at (5)-(6), we see that PFA and LDA have the same blocked Gibbs [3] and SVI [14] updates, respectively, when Dirichlet distributions for θkn are used. In [32], the authors showed that using the Poisson-gamma representation of the negative binomial distribution and a beta-Bernoulli specification for p(hkn) in (1), we can recover the FTM formulation and inference in [29]. More recently, [31] showed that PFA is comparable to HDP in that the former builds group-specific DPs with normalized gamma processes. A more direct relationship between a three-layer HDP [27] and a two-layer version of (3) can be established by grouping documents by categories. In the HDP, three DPs are set for topics, document-wise topic usage and category-wise topic usage. In our model, Ψ(1) represent K1 topics, θ(1) n ◦h(1) n encodes document-wise topic usage and Ψ(2) encodes topic usage for K2 categories. In HDP, documents are assigned to categories a priori, but in our model document-category soft assignments are estimated and encoded via θ(2) n ◦h(2) n . As a result, the model in (3) is a more flexible alternative to HDP in that it groups documents into categories in an unsupervised manner. Similar models Non-DP-based deep models for topic modeling employed in the deep learning literature typically utilize RBMs or SBNs as building blocks. For instance, [12] and [20] extended RBMs via DBNs to topic modeling and [26] proposed the over-replicated softmax model, a deep version of RSM that generalizes RBMs. Recently, [24] proposed a framework for generative deep models using exponential family modules. Although they consider Poisson-Poisson and Gamma-Gamma factorization modules akin to our PFA modules, their model lacks the explicit binary unit linking between layers commonly found in traditional deep models. Besides, their inference approach, black-box variational inference, is not as conceptually simple, but it scales with the number of non-zeros as our model. DPFA, proposed in [6], is the model closest to ours. Nevertheless, our proposed model has a number of key differentiating features. (i) Both of them learn topic correlations by building a multilayer modular representation on top of PFA. Our model uses PFA modules throughout all layers in a conceptually simple and easy to interpret way. DPFA uses Gaussian distributed weight matrices within SBN modules; these are hard to interpret in the context of topic modeling. (ii) SBN architectures have the shortcoming of not having block closed-form conditional posteriors for their binary variables, making them difficult to estimate, especially as the number of variables increases. (iii) Factor loading matrices in PFAs have natural shrinkage to counter overfitting, thanks to the Dirichlet prior used for their columns. In SBN-based models, shrinkage has to be added via variable augmentation at the cost of increasing inference complexity. (iv) Inference for SBN modules scales with the number of hidden variables in the model, not with the number of non-zero elements, as in our case. 5 Experiments Benchmark corpora We present experiments on three corpora: 20 Newsgroups (20 News), Reuters corpus volume I (RCV1) and Wikipedia (Wiki). 20 News is composed of 18,845 documents and 2,000 words, partitioned into a 11,315 training set and a 7,531 test set. RCV1 has 804,414 newswire articles containing 10,000 words. A random 10,000 subset of documents is used for testing. For Wiki, we obtained 107 random documents, from which a subset of 1,000 is set aside for testing. Following [14], we keep a vocabulary consisting of 7,702 words taken from the top 10,000 words in the Project Gutenberg Library. As performance measure we use held-out perplexity, defined as the geometric mean of the inverse marginal likelihood of every word in the set. We cannot evaluate the intractable marginal for our model, thus we compute the predictive perplexity on a 20% subset of the held-out set. The remaining 80% is used to learn document-specific variables of the model. The training set is used to estimate the global parameters of the model. Further details on perplexity evaluation for PFA models can be found in [6, 32]. We compare our model (denoted DPFM) against LDA [3], FTM [29], RSM [12], nHDP [23] and DPFA with SBNs (DPFA-SBN) and RBMs (DPFA-RBM) [6]. For all these models we use the settings described in [6]. Inference methods for RSM and DPFA are contrastive divergence with 6 Table 1: Held-out perplexities for 20 News, RCV1 and Wiki. Size indicates number of topics and/or binary units, accordingly. Model Method Size 20 News RCV1 Wiki DPFM SVI 128-64 818 961 791 DPFM MCMC 128-64 780 908 783 DPFA-SBN SGNHT 1024-512-256 —– 942 770 DPFA-SBN SGNHT 128-64-32 827 1143 876 DPFA-RBM SGNHT 128-64-32 896 920 942 nHDP SVI (10,10,5) 889 1041 932 LDA Gibbs 128 893 1179 1059 FTM Gibbs 128 887 1155 991 RSM CD5 128 877 1171 1001 step size 5 (CD5) and stochastic gradient Nse-Hoover thermostats (SGNHT) [5], respectively. For our model, we run 3,000 samples (first 2,000 as burnin) for MCMC and 4,000 iterations with 200document mini-batches for SVI. For the Wiki corpus, MCMC-based DPFM is run on a random subset of 106 documents. The code used, implemented in Matlab, will be made publicly available. Table 1 show results for the corpora being considered. Figures for methods other than DPFM were taken from [6]. We see that multilayer models (DPFM, DPFA and nHDP) consistently outperform single layer ones (LDA, FTM and RSM), and that DPFM has the best performance across all corpora for models of comparable size. OSM result (not shown) are about 20 units better than RSM in 20 News and RCV1, see [26]. We also see that MCMC yields better perplexities when compared to SVI. The difference in performance between these two inference methods is likely due to the mean-field approximation and the online nature of SVI. We verified empirically (results not shown) that doubling the number of hidden units, adding a third layer or increasing the number of samples/iterations for DPFM does not significantly change the results in Table 1. As a note on computational complexity, one iteration of the two-layer model on the 20 News corpus takes approximately 3 and 2 seconds, for MCMC and SVI, respectively. For comparison, we also ran the DPFA-SBN model in [6] using a two-layer model of the same size; in their case it takes about 24, 4 and 5 seconds to run one iteration using MCMC, conditional density filtering (CDF) and SGNHT, respectively. Runtimes for DPFA-RBM are similar to those of DPFA-SBN, LDA and RSM are faster than 1-layer DPFM, FTM is comparable to the latter, and nHDP is slower than DPFM. Figure 1 shows a representative meta-topic, ψ(2) k , from the two-layer model for 20 News. For the five largest weights in ψ(2) k (y-axis), which correspond to layer-1 topic indices (x-axis), we also show the top five words in their layer-1 topic, ψ(1) k . We observe that this meta-topic is loaded with religion specific topics, judging by the words in them. Additional graphs, and tables showing the top words in each topic for 20 News and RCV1 are provided in the Supplementary Material. 20 40 60 80 100 120 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 god jesus christ christians bible god religion christians christianity christian true fact wrong people point god exist existence exists universe point thing people idea writes M13 ψ(2) k First layer topic index 10 20 30 40 50 60 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 Albuterol salmeterol Ipratropium tiotropium Prednisone Cetirizine montelukast Amitriptyline olopatadine rizatriptan Amoxicillin Diltiazem Clavulanate cefdinir desloratadine fluticasone fexofenadine Propranolol Carbamazepine Methimazole NA rabeprazole alcaftadine Lactobacillus rhamnosus GG Multivitamin preparation M22 ψ(2) k First layer topic index Figure 1: Representative meta-topics obtained from (left) 20 News and (right) medical records. Meta-topic weights ψ(2) k vs. layer-1 topics indices, with word lists corresponding to the top five words in layer-1 topics, ψ(1) k . Classification We use 20 News for document classification, to evaluate the discriminative DPFM model described in Section 2.4. We use test set accuracy on the 20-class task as performance measure and compare our model against LDA, DocNADE [17], RSM and OSM. Results for these four models were obtained from [26], where multinomial logistic regression with cross-entropy loss func7 Table 2: Test accuracy on 20 News. Subscript accompanying model names indicate their size. Model LDA128 DocNADE512 RSM512 OSM512 DPFM128 DPFM128−64 Accuracy (%) 65.7 68.4 67.7 69.1 72.11 72.67 tion was used as classification module. Test accuracies in Table 2 show that our model significantly outperforms the others being considered. Note as well that our one-layer model still improves upon the four times larger OSM, by more than 3%. We verified that our two-layer model outperforms well known supervised methods like multinomial logistic regression, SVM, supervised LDA and two-layer feedforward neural networks, for which test accuracies ranged from 67% to 72.14%, using term frequency-inverse document frequency features. We could not improve results by increasing the size of our model, however, we may be able to do so by following the approach of [33], where a single classification module (SVM) is shared by 20 one-layer topic models (LDAs). Exploration of more sophisticated deep model architectures for discriminative DPFMs is left as future work. Medical records The Duke University Health System medical records database used here, is a 5 year dataset generated within a large health system including three hospitals and an extensive network of outpatient clinics. For this analysis, we utilized self-reported medication usage from over 240,000 patients that had over 4.4 million patient visits. These patients reported over 34,000 different types of medications which were then mapped to one of 1,691 pharmaceutical active ingredients (AI) taken from RxNorm, a depository of medication information maintained by the National Library of Medicine that includes trade names, brand names, dosage information and active ingredients. Counts for patient-medication usage reflected the number of times an AI appears in a patients record. Compound medications that include multiple active ingredients incremented counts for all AI in that medication. Removing AIs with less than 10 overall occurrences and patients lacking medication information, results in a 1,019×131,264 matrix of AIs vs. patients. Results for a MCMC-based DPFM of size 64-32, with the same setting used for the first experiment, indicate that pharmaceutical topics derived from this analysis form clinically reasonable clusters of pharmaceuticals, that may be prescribed to patients for various ailments. In particular, we found that layer-1 topic 46 includes a cluster of insulin products: Insulin Glargine, Insulin Lispro, Insulin Aspart, NPH Insulin and Regular Insulin. Insulin dependent type-2 diabetes patients often rely on tailored mixtures of insulin products with different pharmacokinetic profiles to ensure glycemic control. In another example, we found in layer-1 topic 22, an Angiotensin Receptor Blocker (ARB), Losartan with a HMGCoA Reductase inhibitor, Atorvastatin and a heart specific beta blocker, Carvedilol. This combination of medications is commonly used to control hypertension and hyperlipidemia in patients with cardiovascular risk. The second layer correlation structure between topics of drug products also provide interesting composites of patient types based on the first-layer pharmaceutical topics. Specifically, layer-2 factor 22 in Figure 1 reveals correlation between layer-1 drug factors that would be used to treat types of respiratory patients that had chronic obstructive respiratory disease and/or asthma (Albuterol, Montelukast) and seasonal allergies. Additional graphs, including top medications for all pharmaceutical topics found by our model are provided in the Supplementary Material. 6 Conclusion We presented a new deep model for topic modeling based on PFA modules. We have combined the interpretability of DP-based specifications found in traditional topic models with deep hierarchies of hidden binary units. Our model is elegant in that a single class of modules is used at each layer, but at the same time, enjoys the computational benefit of scaling as a function of the number of zeros in the data and binary units. We described a discriminative extension for our deep architecture, and two inference methods: MCMC and SVI, the latter for large datasets. Compelling experimental results on several corpora and on a new medical records database demonstrated the advantages of our model. Future directions include working towards alternatives for scaling up inference algorithms based on gradient-based approaches, extending the use of PFA modules in deep architectures to more sophisticated discriminative models, multi-modal tasks with mixed data types, and time series modeling using ideas similar to [8]. Acknowledgements This research was supported in part by ARO, DARPA, DOE, NGA and ONR. 8 References [1] D. M. Blei, D. M. Griffiths, M. I. Jordan, and J. B. Tenenbaum. Hierarchical topic models and the nested Chinese restaurant process. In NIPS, 2004. [2] D. M. Blei and J. D. Lafferty. A correlated topic model of science. AOAS, 2007. [3] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. JMLR, 2003. [4] T. Chen, E. B. Fox, and C. Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In ICML, 2014. [5] N. Ding, Y. Fang, R. Babbush, C. Chen, R. D. Skeel, and H. Neven. Bayesian sampling using stochastic gradient thermostats. In NIPS, 2014. [6] Z. Gan, C. Chen, R. Henao, D. Carlson, and L. Carin. Scalable deep Poisson factor analysis for topic modeling. In ICML, 2015. [7] Z. Gan, R. Henao, D. Carlson, and L. Carin. Learning deep sigmoid belief networks with data augmentation. In AISTATS, 2015. [8] Z. Gan, C. Li, R. Henao, D. Carlson, and L. Carin. Deep temporal sigmoid belief networks for sequence modeling. In NIPS, 2015. [9] R. Guhaniyogi, S. Qamar, and D. B. Dunson. Bayesian conditional density filtering. arXiv:1401.3632, 2014. [10] G. Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 2002. [11] G. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation, 2006. [12] G. E. Hinton and R. R. Salakhutdinov. Replicated softmax: an undirected topic model. In NIPS, 2009. [13] Q. Ho, J. Cipar, H. Cui, S. Lee, J. K. Kim, P. B. Gibbons, G. A. Gibson, G. Ganger, and E. P. Xing. More effective distributed ML via a stale synchronous parallel parameter server. In NIPS, 2013. [14] M. Hoffman, F. R. Bach, and D. M. Blei. Online learning for latent Dirichlet allocation. In NIPS, 2010. [15] M. D. Hoffman, D. M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. JMLR, 2013. [16] S. Lacoste-Julien, F. Sha, and M. I. Jordan. DiscLDA: Discriminative learning for dimensionality reduction and classification. In NIPS, 2009. [17] H. Larochelle and S. Lauly. A neural autoregressive topic model. In NIPS, 2012. [18] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [19] M. Li, D. G. Andersen, A. J. Smola, and K. Yu. Communication efficient distributed machine learning with the parameter server. In NIPS, 2014. [20] L. Maaloe, M. Arngren, and O. Winther. Deep belief nets for topic modeling. arXiv:1501.04325, 2015. [21] J. D. Mcauliffe and D. M. Blei. Supervised topic models. In NIPS, 2008. [22] R. M. Neal. Connectionist learning of belief networks. Artificial Intelligence, 1992. [23] J. Paisley, C. Wang, D. M. Blei, and M. I. Jordan. Nested hierarchical Dirichlet processes. PAMI, 2015. [24] R. Ranganath, L. Tang, L. Charlin, and D. M. Blei. Deep exponential families. In AISTATS, 2014. [25] R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In AISTATS, 2009. [26] R. R. S. Srivastava, Nitish and G. E. Hinton. Modeling documents with deep Boltzmann machines. In UAI, 2013. [27] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. JASA, 2006. [28] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. [29] S. Williamson, C. Wang, K. Heller, and D. Blei. The IBP compound Dirichlet process and its application to focused topic modeling. In ICML, 2010. [30] M. Zhou. Infinite edge partition models for overlapping community detection and link prediction. In AISTATS, 2015. [31] M. Zhou and L. Carin. Negative binomial process count and mixture modeling. PAMI, 2015. [32] M. Zhou, L. Hannah, D. Dunson, and L. Carin. Beta-negative binomial process and Poisson factor analysis. In AISTATS, 2012. [33] J. Zhu, A. Ahmed, and E. P. Xing. MedLDA: maximum margin supervised topic models. JMLR, 2012. 9 | 2015 | 331 |
5,849 | Max-Margin Majority Voting for Learning from Crowds Tian Tian, Jun Zhu Department of Computer Science & Technology; Center for Bio-Inspired Computing Research Tsinghua National Lab for Information Science & Technology State Key Lab of Intelligent Technology & Systems; Tsinghua University, Beijing 100084, China tiant13@mails.tsinghua.edu.cn; dcszj@tsinghua.edu.cn Abstract Learning-from-crowds aims to design proper aggregation strategies to infer the unknown true labels from the noisy labels provided by ordinary web workers. This paper presents max-margin majority voting (M3V) to improve the discriminative ability of majority voting and further presents a Bayesian generalization to incorporate the flexibility of generative methods on modeling noisy observations with worker confusion matrices. We formulate the joint learning as a regularized Bayesian inference problem, where the posterior regularization is derived by maximizing the margin between the aggregated score of a potential true label and that of any alternative label. Our Bayesian model naturally covers the Dawid-Skene estimator and M3V. Empirical results demonstrate that our methods are competitive, often achieving better results than state-of-the-art estimators. 1 Introduction Many learning tasks require labeling large datasets. Though reliable, it is often too expensive and time-consuming to collect labels from domain experts or well-trained workers. Recently, online crowdsourcing platforms have dramatically decreased the labeling cost by dividing the workload into small parts, then distributing micro-tasks to a crowd of ordinary web workers [17, 20]. However, the labeling accuracy of web workers could be lower than expected due to their various backgrounds or lack of knowledge. To improve the accuracy, it is usually suggested to label every task multiple times by different workers, then the redundant labels can provide hints on resolving the true labels. Much progress has been made in designing effective aggregation mechanisms to infer the true labels from noisy observations. From a modeling perspective, existing work includes both generative approaches and discriminative approaches. A generative method builds a flexible probabilistic model for generating the noisy observations conditioned on the unknown true labels and some behavior assumptions, with examples of the Dawid-Skene (DS) estimator [5], the minimax entropy (Entropy) estimator1 [24, 25], and their variants. In contrast, a discriminative approach does not model the observations; it directly identifies the true labels via some aggregation rules. Examples include majority voting and the weighted majority voting that takes worker reliability into consideration [10, 11]. In this paper, we present a max-margin formulation of the most popular majority voting estimator to improve its discriminative ability, and further present a Bayesian generalization that conjoins the advantages of both generative and discriminative approaches. The max-margin majority voting (M3V) directly maximizes the margin between the aggregated score of a potential true label and that of any alternative label, and the Bayesian model consists of a flexible probabilistic model to generate the noisy observations by conditioning on the unknown true labels. We adopt the same approach as the 1A maximum entropy estimator can be understood as a dual of the MLE of a probabilistic model [6]. 1 classical Dawid-Skene estimator to build the probabilistic model by considering worker confusion matrices, though many other generative models are also possible. Then, we strongly couple the generative model and M3V by formulating a joint learning problem under the regularized Bayesian inference (RegBayes) [27] framework, where the posterior regularization [7] enforces a large margin between the potential true label and any alternative label. Naturally, our Bayesian model covers both the David-Skene estimator and M3V as special cases by setting the regularization parameter to its extreme values (i.e., 0 or ∞). We investigate two choices on defining the max-margin posterior regularization: (1) an averaging model with a variational inference algorithm; and (2) a Gibbs model with a Gibbs sampler under a data augmentation formulation. The averaging version can be seen as an extension to the MLE learner of Dawid-Skene model. Experiments on real datasets suggest that max-margin learning can significantly improve the accuracy of majority voting, and that our Bayesian estimators are competitive, often achieving better results than state-of-the-art estimators on true label estimation tasks. 2 Preliminary We consider the label aggregation problem with a dataset consisting of M items (e.g., pictures or paragraphs). Each item i has an unknown true label yi ∈[D], where [D] := {1, . . . , D}. The task ti is to label item i. In crowdsourcing, we have N workers assigning labels to these items. Each worker may only label a part of the dataset. Let Ii ⊆[N] denote the workers who have done task ti. We use xij to denote the label of ti provided by worker j, xi to denote the labels provided to task ti, and X is the collection of these worker labels, which is an incomplete matrix. The goal of learning-from-crowds is to estimate the true labels of items from the noisy observations X. 2.1 Majority Voting Estimator Majority voting (MV) is arguably the simplest method. It posits that for every task the true label is always most commonly given. Thus, it selects the most frequent label for each task as its true label, by solving the problem: ˆyi = argmax d∈[D] N X j=1 I(xij = d), ∀i ∈[M], (1) where I(·) is an indicator function. It equals to 1 whenever the predicate is true, otherwise it equals to 0. Previous work has extended this method to weighted majority voting (WMV) by putting different weights on workers to measure worker reliability [10, 11]. 2.2 Dawid-Skene Estimator The method of Dawid and Skene [5] is a generative approach by considering worker confusability. It posits that the performance of a worker is consistent across different tasks, as measured by a confusion matrix whose diagonal entries denote the probability of assigning correct labels while offdiagonal entries denote the probability of making specific mistakes to label items in one category as another. Formally, let φj be the confusion matrix of worker j. Then, φjkd denotes the probability that worker j assigns label d to an item whose true label is k. Under the basic assumption that workers finish each task independently, the likelihood of observed labels can be expressed as p(X|Φ, y) = M Y i=1 N Y j=1 D Y d,k=1 φjkd ni jkd = N Y j=1 D Y d,k=1 φjkd njkd, (2) where ni jkd = I(xij = d, yi = k), and njkd = PM i=1 ni jkd is the number of tasks with true label k but being labeled to d by worker j. The unknown labels and parameters can be estimated by maximum-likelihood estimation (MLE), {ˆy, ˆΦ} = argmaxy,Φ log p(X|Φ, y), via an expectation-maximization (EM) algorithm that iteratively updates the true labels y and the parameters Φ. The learning procedure is often initialized by majority voting to avoid bad local optima. If we assume some structure of the confusion matrix, various variants of the DS estimator have been studied, including the homogenous DS model [15] and the class-conditional DS model [11]. We can also put a prior over worker confusion matrices and transform the inference into a standard inference problem in graphical models [12]. Recently, spectral methods have also been applied to better initialize the DS model [23]. 2 3 Max-Margin Majority Voting Majority voting is a discriminative model that directly finds the most likely label for each item. In this section, we present max-margin majority voting (M3V), a novel extension of (weighted) majority voting with a new notion of margin (named crowdsourcing margin). 3.1 Geometric Interpretation of Crowdsourcing Margin 𝑥𝑖2 𝑥𝑖1 𝒈𝒙𝑖, 1 : (𝟎, 𝟏)𝑻 𝒈𝒙𝑖, 2 : (𝟎, 𝟎)𝑻 𝒈𝒙𝑖, 3 : (𝟏, 𝟎)𝑻 Figure 1: A geometric interpretation of the crowdsourcing margin. Let g(xi, d) be a N-dimensional vector, with the element j equaling to I(j ∈Ii, xij = d). Then, the estimation of the vanilla majority voting in Eq. (1) can be formulated as finding solutions {yi}i∈[M] that satisfy the following constraints: 1⊤ Ng(xi, yi) −1⊤ Ng(xi, d) ≥0, ∀i, d, (3) where 1N is the N-dimensional all-one vector and 1⊤ Ng(xi, k) is the aggregated score of the potential true label k for task ti. By using the all-one vector, the aggregated score has an intuitive interpretation — it denotes the number of workers who have labeled ti as class k. Apparently, the all-one vector treats all workers equally, which may be unrealistic in practice due to the various backgrounds of the workers. By simply choosing what the majority of workers agree on, the vanilla MV is prone to errors when many workers give low quality labels. One way to tackle this problem is to take worker reliability into consideration. Let η denote the worker weights. When these values are known, we can get the aggregated score η⊤g(xi, k) of a weighted majority voting (WMV), and estimate the true labels by the rule: ˆyi = argmaxd∈[D] η⊤g(xi, d). Thus, reliable workers contribute more to the decisions. Geometrically, g(xi, d) is a point in the N-dimensional space for each task ti. The aggregated score 1⊤ Ng(xi, d) measures the distance (up to a constant scaling) from this point to the hyperplane 1⊤ Nx = 0. So the MV estimator actually finds a point that has the largest distance to that hyperplane for each task, and the decision boundary of majority voting is another hyperplane 1⊤ Nx−b = 0 which separates the point g(xi, ˆyi) from the other points g(xi, k), k ̸= ˆyi. By introducing the worker weights η, we relax the constraint of the all-one vector to allow for more flexible decision boundaries η⊤x−b = 0. All the possible decision boundaries with the same orientation are equivalent. Inspired by the generalized notion of margin in multi-class SVM [4], we define the crowdsourcing margin as the minimal difference between the aggregated score of the potential true label and the aggregated scores of other alternative labels. Then, one reasonable choice of the best hyperplane (i.e. η) is the one that represents the largest margin between the potential true label and other alternatives. Fig. 1 provides an illustration of the crowdsourcing margin for WMV with D = 3 and N = 2, where each axis represents the label of a worker. Assume that both workers provide labels 3 and 1 to item i. Then, the vectors g(xi, y), y ∈[3] are three points in the 2D plane. Given the worker weights η, the estimated label should be 1, since g(xi, 1) has the largest distance to line P0. Line P1 and line P2 are two boundaries that separate g(xi, 1) and other points. The margin is the distance between them. In this case, g(xi, 1) and g(xi, 3) are support vectors that decide the margin. 3.2 Max-Margin Majority Voting Estimator Let ℓbe the minimum margin between the potential true label and all other alternatives. We define the max-margin majority voting (M3V) as solving the constrained optimization problem to estimate the true labels y and weights η: inf η,y 1 2∥η∥2 2 (4) s. t. : η⊤g∆ i (d) ≥ℓ∆ i (d), ∀i ∈[M], d ∈[D], where g∆ i (d) := g(xi, yi) −g(xi, d) 2 and ℓ∆ i (d) = ℓI(yi ̸= d). And in practice, the worker labels are often linearly inseparable by a single hyperplane. Therefore, we relax the hard constraints 2The offset b is canceled out in the margin constraints. 3 by introducing non-negative slack variables {ξi}M i=1, one for each task, and define the soft-margin max-margin majority voting as inf ξi≥0,η,y 1 2∥η∥2 2 + c X i ξi (5) s. t. : η⊤g∆ i (d) ≥ℓ∆ i (d) −ξi, ∀i ∈[M], d ∈[D], where c is a positive regularization parameter and ℓ−ξi is the soft-margin for task ti. The value of ξi reflects the difficulty of task ti — a small ξi suggests a large discriminant margin, indicating that the task is easy with a rare chance to make mistakes; while a large ξi suggests that the task is hard with a higher chance to make mistakes. Note that our max-margin majority voting is significantly different from the unsupervised SVMs (or max-margin clustering) [21], which aims to assign cluster labels to the data points by maximizing some different notion of margin with balance constraints to avoid trivial solutions. Our M3V does not need such balance constraints. Albeit not jointly convex, problem (5) can be solved by iteratively updating η and y to find a local optimum. For η, the solution can be derived as η = PM i=1 PD d=1 ωd i g∆ i (d) by the fact that the subproblem is convex. The parameters ω are obtained by solving the dual problem sup 0≤ωd i ≤c −1 2η⊤η + X i X d ωd i ℓ∆ i (d), (6) which is exactly the QP dual problem in standard SVM [4]. So it can be efficiently solved by welldeveloped SVM solvers like LIBSVM [2]. For updating y, we define (x)+ := max(0, x), and then it is a weighted majority voting with a margin gap constraint: ˆyi = argmax yi∈[D] −c max d∈[D] ℓ∆ i (d) −ˆη⊤g∆ i (d) + , (7) Overall, the algorithm is a max-margin iterative weighted majority voting (MM-IWMV). Comparing with the iterative weighted majority voting (IWMV) [11], which tends to maximize the expected gap of the aggregated scores under the Homogenous DS model, our M3V directly maximizes the data specified margin without further assumption on data model. Empirically, as we shall see, our M3V could have more powerful discriminative ability with better accuracy than IWMV. 4 Bayesian Max-Margin Estimator With the intuitive and simple max-margin principle, we now present a more sophisticated Bayesian max-margin estimator, which conjoins the discriminative ability of M3V and the flexibility of the generative DS estimator. Though slightly more complicated in learning and inference, the Bayesian models retain the intuitive simplicity of M3V and the flexibility of DS, as explained below. 4.1 Model Definition We adopt the same DS model to generate observations conditioned on confusion matrices, with the full likelihood in Eq. (2). We further impose a prior p0(Φ, η) for Bayesian inference. Assuming that the true labels y are given, we aim to get the target posterior p(Φ, η|X, y), which can be obtained by solving an optimization problem: inf q(Φ,η) L (q(Φ, η); y) , (8) where L(q; y) := KL(q∥p0(Φ, η)) −Eq[log p(X|Φ, y)] measures the Kullback-Leibler (KL) divergence between a desired post-data posterior q and the original Bayesian posterior, and p0(Φ, η) is the prior, often factorized as p0(Φ)p0(η). As we shall see, this Bayesian DS estimator often leads to better performance than the vanilla DS. Then, we explore the ideas of regularized Bayesian inference (RegBayes) [27] to incorporate max-margin majority voting constraints as posterior regularization on problem (8), and define the Bayesian max-margin estimator (denoted by CrowdSVM) as solving: inf ξi≥0,q∈P,y L(q(Φ, η); y) + c · X i ξi (9) s. t. : Eq[η⊤g∆ i (d)] ≥ℓ∆ i (d) −ξi, ∀i ∈[M], d ∈[D], 4 where P is the probabilistic simplex, and we take expectation over q to define the margin constraints. Such posterior constraints will influence the estimates of y and Φ to get better aggregation, as we shall see. We use a Dirichlet prior on worker confusion matrices, φmk|α ∼Dir(α), and a spherical Gaussian prior on η, η ∼N(0, vI). By absorbing the slack variables, CrowdSVM solves the equivalent unconstrained problem: inf q∈P,y L(q(Φ, η); y) + c · Rm(q(Φ, η); y), (10) where Rm(q; y)=PM i=1maxD d=1 ℓ∆ i (d)−Eq[η⊤g∆ i (d)] + is the posterior regularization. Remark 1. From the above definition, we can see that both the Bayesian DS estimator and the maxmargin majority voting are special cases of CrowdSVM. Specifically, when c →0, it is equivalent to the DS model. If we set v = v′/c for some positive parameter v′, then when c →∞CrowdSVM reduces to the max-margin majority voting. 4.2 Variational Inference Algorithm 1: The CrowdSVM algorithm 1. Initialize y by majority voting. while Not converge do 2. For each worker j and category k: q(φjk) ←Dir(njk + α). 3. Solve the dual problem (11). 4. For each item i: ˆyi ←argmaxyi∈[D] f(yi, xi; q). end Since it is intractable to directly solve problem (9) or (10), we introduce the structured mean-field assumption on the post-data posterior, q(Φ, η) = q(Φ)q(η), and solve the problem by alternating minimization as outlined in Alg. 1. The algorithm iteratively performs the following steps until a local optimum is reached: Infer q(Φ): Fixing the distribution q(η) and the true labels y, the problem in Eq. (9) turns to a standard Bayesian inference problem with the closed-form solution: q∗(Φ) ∝p0(Φ)p(X|Φ, y). Since the prior is a Dirichlet distribution, the inferred distribution is also Dirichlet, q∗(φjk) = Dir(njk + α), where njk is a D-dimensional vector with element d being njkd. Infer q(η) and solve for ω: Fixing the distribution q(Φ) and the true labels y, we optimize Eq. (9) over q(η), which is also convex. We can derive the optimal solution: q∗(η) ∝ p0(η) exp η⊤P i P d ωd i g∆ i (d) , where ω = {ωd i } are Lagrange multipliers. With the normal prior, p0(η) = N (0, vI), the posterior is a normal distribution: q∗(η) = N (µ, vI) , whose mean is µ = v PM i=1 PD d=1 ωd i g∆ i (d). Then the parameters ω are obtained by solving the dual problem sup 0≤ωd i ≤c −1 2v µ⊤µ + X i X d ωd i ℓ∆ i (d), (11) which is same as the problem (6) in max-margin majority voting. Infer y: Fixing the distributions of Φ and η at their optimum q∗, we find y by solving problem (10). To make the prediction more efficient, we approximate the distribution q∗(Φ) by a Dirac delta mass δ(Φ −ˆΦ), where ˆΦ is the mean of q∗(Φ). Then since all tasks are independent, we can derive the discriminant function of yi as f(yi, xi; q∗) = log p(xi| ˆΦ, yi) −c max d∈[D] (ℓ∆ i (d) −ˆµ⊤g∆ i (d))+ , (12) where ˆµ is the mean of q∗(η). Then we can make predictions by maximize this function. Apparently, the discriminant function (12) represents a strong coupling between the generative model and the discriminative margin constraints. Therefore, CrowdSVM jointly considers these two factors when estimating true labels. We also note that the estimation rule used here reduces to the rule (7) of MM-IWMV by simply setting c = ∞. 5 Gibbs CrowdSVM Estimator CrowdSVM adopts an averaging model to define the posterior constraints in problem (9). Here, we further provide an alternative strategy which leads to a full Bayesian model with a Gibbs sampler. The resulting Gibbs-CrowdSVM does not need to make the mean-field assumption. 5 5.1 Model Definition Suppose the target posterior q(Φ, η) is given, we perform the max-margin majority voting by drawing a random sample η. This leads to the crowdsourcing hinge-loss R(η, y) = M X i=1 max d∈[D] ℓ∆ i (d) −η⊤g∆ i (d) + , (13) which is a function of η. Since η are random, we define the overall hinge-loss as the expectation over q(η), that is, R′m(q(Φ, η); y) = Eq [R(η, y)]. Due to the convexity of max function, the expected loss is in fact an upper bound of the average loss, i.e., R′m(q(Φ, η); y) ≥Rm(q(Φ, η); y). Differing from CrowdSVM, we also treat the hidden true labels y as random variables with a uniform prior. Then we define Gibbs-CrowdSVM as solving the problem: inf q∈P L q(Φ, η, y) + Eq " M X i=1 2c(ζisi)+ # , (14) where ζid = ℓ∆ i (d) −η⊤g∆ i (d), si = argmaxd̸=yi ζid, and the factor 2 is introduced for simplicity. Data Augmentation In order to build an efficient Gibbs sampler for this problem, we derive the posterior distribution with the data augmentation [3, 26] for the max-margin regularization term. We let ψ(yi|xi, η) = exp(−2c(ζisi)+) to represent the regularizer. According to the equality: ψ(yi|xi, η) = R ∞ 0 ψ(yi, λi|xi, η)dλi, where ψ(yi, λi|xi, η) = (2πλi)−1 2 exp( −1 2λi (λi + cζisi)2) is a (unnormalized) joint distribution of yi and the augmented variable λi [14], the posterior of GibbsCrowdSVM can be expressed as the marginal of a higher dimensional distribution, i.e., q(Φ, η, y) = R q(Φ, η, y, λ)dλ, where q(Φ, η, y, λ) ∝p0(Φ, η, y) M Y i=1 p(xi|Φ, yi)ψ(yi, λi|xi, η). (15) Putting the last two terms together, we can view q(Φ, η, y, λ) as a standard Bayesian posterior, but with the unnormalized likelihood ep(xi, λi|Φ, η, yi) ∝p(xi|Φ, yi)ψ(yi, λi|xi, η), which jointly considers the noisy observations and the large margin discrimination between the potential true labels and alternatives. 5.2 Posterior Inference With the augmented representation, we can do Gibbs sampling to infer the posterior distribution q(Φ, η, y, λ) and thus q(Φ, η, y) by discarding λ. The conditional distributions for {Φ, η, λ, y} are derived in Appendix A. Note that when sample λ from the inverse Gaussian distribution, a fast sampling algorithm [13] can be applied with O(1) time complexity. And for the hidden variables y, we initially set them as the results of majority voting. After removing burn-in samples, we use their most frequent values of as the final outputs. 6 Experiments We now present experimental results to demonstrate the strong discriminative ability of max-margin majority voting and the promise of our Bayesian models, by comparing with various strong competitors on multiple real datasets. 6.1 Datasets and Setups We use four real world crowd labeling datasets as summarized in Table 1. Web Search [24]: 177 workers are asked to rate a set of 2,665 query-URL pairs on a relevance rating scale from 1 to 5. Each task is labeled by 6 workers on average. In total 15,567 labels are collected. Age [8]: It consists of 10,020 labels of age estimations for 1,002 face images. Each image was labeled by 10 workers. And there are 165 workers involved in these tasks. The final estimations are discretized into 7 bins. Bluebirds [19]: It consists of 108 bluebird pictures. There are 2 breeds among all the images, and each image is labeled by all 39 workers. 4,214 labels in total. Flowers [18]: It contains 2,366 binary labels for a dataset with 200 flower pictures. Each worker is asked to answer whether the flower in picture is peach flower. 36 workers participate in these tasks. 6 Table 1: Datasets Overview. DATASET LABELS ITEMS WORKERS WEB SEARCH 15,567 2,665 177 AGE 10,020 1,002 165 BLUEBIRDS 4,214 108 39 FLOWERS 2,366 200 36 We compare M3V, as well as its Bayesian extensions CrowdSVM and Gibbs-CrowdSVM, with various baselines, including majority voting (MV), iterative weighted majority voting (IWMV) [11], the Dawid-Skene (DS) estimator [5], and the minimax entropy (Entropy) estimator [25]. For Entropy estimator, we use the implementation provided by the authors, and show both the performances of its multiclass version (Entropy (M)) and the ordinal version (Entropy (O)). All the estimators that require an iterative updating are initialized by majority voting to avoid bad local minima. All experiments were conducted on a PC with Intel Core i5 3.00GHz CPU and 12.00GB RAM. 6.2 Model Selection Due to the special property of crowdsourcing, we cannot simply split the training data into multiple folds to cross-validate the hyperparameters by using accuracy as the selection criterion, which may bias to over-optimistic models. Instead, we adopt the likelihood p(X| ˆΦ, ˆy) as the criterion to select parameters, which is indirectly related to our evaluation criterion (i.e., accuracy). Specifically, we test multiple values of c and ℓ, and select the value that produces a model with the maximal likelihood on the given dataset. This method ensures us to select model without any prior knowledge on the true labels. For the special case of M3V, we fix the learned true labels y after training the model with certain parameters, and learn confusion matrices that optimize the full likelihood in Eq. (2). Note that the likelihood-based cross-validation strategy [25] is not suitable for CrowdSVM, because this strategy uses marginal likelihood p(X|Φ) to select model and ignores the label information of y, through which the effect of constraints is passed for CrowdSVM. If we use this strategy on CrowdSVM, it will tend to optimize the generative component without considering the discriminant constraints, thus resulting in c →0, which is a trivial solution for model selection. 6.3 Experimental Results We first test our estimators on the task of estimating true labels. For CrowdSVM, we set α = 1 and v = 1 for all experiments, since we find that the results are insensitive to them. For M3V, CrowdSVM and Gibbs-CrowdSVM, the regularization parameters (c, ℓ) are selected from c = 2ˆ[−8 : 0] and ℓ= [1, 3, 5] by the method in Sec. 6.2. As for Gibbs-CrowdSVM, we generate 50 samples in each run and discard the first 10 samples as burn-in steps, which are sufficiently large to reach convergence of the likelihood. The reported error rate is the average over 5 runs. Table 2 presents the error rates of various estimators. We group the comparisons into three parts: I. All the MV, IWMV and M3V are purely discriminative estimators. We can see that our M3V produces consistently lower error rates on all the four datasets compared with the vanilla MV and IWMV, which show the effectiveness of max-margin principle for crowdsourcing; II. This part analyzes the effects of prior and max-margin regularization on improving the DS model. We can see that DS+Prior is better than the vanilla DS model on the two larger datasets by using a Dirichlet prior. Furthermore, CrowdSVM consistently improves the performance of DS+Prior by considering the max-margin constraints, again demonstrating the effectiveness of max-margin learning; III. This part compares our Gibbs-CrowdSVM estimator to the state-of-the-art minimax entropy estimators. We can see that Gibbs-CrowdSVM performs better than CrowdSVM on Web-Search, Age and Flowers datasets, while worse on the small Bluebuirds dataset. And it is comparable to the minimax entropy estimators, sometimes better with faster running speed as shown in Fig. 2 and explained below. Note that we only test Entropy (O) on two ordinal datasets, since this method is specifically designed for ordinal labels, while not always effective. Fig. 2 summarizes the training time and error rates after each iteration for all estimators on the largest Web-Search dataset. It shows that the discriminative methods (e.g., IWMV and M3V) run fast but converge to high error rates. Compared to the minimax entropy estimator, CrowdSVM is 7 Table 2: Error-rates (%) of different estimators on four datasets. METHODS WEB SEARCH AGE BLUEBIRDS FLOWERS MV 26.90 34.88 24.07 22.00 I IWMV 15.04 34.53 27.78 19.00 M3V 12.74 33.33 20.37 13.50 DS 16.92 39.62 10.19 13.00 II DS+PRIOR 13.26 34.53 10.19 13.50 CROWDSVM 9.42 33.33 10.19 13.50 ENTROPY (M) 11.10 31.14 8.33 13.00 III ENTROPY (O) 10.40 37.32 − − G-CROWDSVM 7.99 ± 0.26 32.98 ± 0.36 10.37±0.41 12.10 ± 1.07 10 0 10 1 10 2 0.10 0.14 0.18 Time (Seconds) Error rate IWMV M3V Dawid−Skene Entropy (M) Entropy (O) CrowdSVM Gibbs−CrowdSVM Figure 2: Error rates per iteration of various estimators on the web search dataset. computationally more efficient and also converges to a lower error rate. Gibbs-CrowdSVM runs slower than CrowdSVM since it needs to compute the inversion of matrices. The performance of the DS estimator seems mediocre — its estimation error rate is large and slowly increases when it runs longer. Perhaps this is partly because the DS estimator cannot make good use of the initial knowledge provided by majority voting. We further investigate the effectiveness of the generative component and the discriminative component of CrowdSVM again on the largest DS CSVM G−CSVM M^3V 22.5 22.6 22.7 22.8 NLL ( x103 ) 22.84 22.55 22.62 22.65 (a) MV IWMV CSVM G−CSVM M^3V 0.1 0.2 0.3 Error rate 0.2693 0.1504 0.1069 0.1021 0.1274 (b) Figure 3: NLLs and ERs when separately test the generative and discriminative components. Web-Search dataset. For the generative part, we compared CrowdSVM (c = 0.125, ℓ= 3) with DS and M3V (c = 0.125, ℓ= 3). Fig. 3(a) compares the negative log likelihoods (NLL) of these models, computed with Eq. (2). For M3V, we fix its estimated true labels and find the confusion matrices to optimize the likelihood. The results show that CrowdSVM achieves a lower NLL than DS; this suggests that by incorporating M3V constraints, CrowdSVM finds a better solution of the true labels as well as the confusion matrices than that found by the original EM algorithm. For the discriminative part, we use the mean of worker weights ˆµ to estimate the true labels as yi = argmaxd∈[D] ˆµ⊤g(xi, d), and show the error rates in Fig. 3(b). Apparently, the weights learned by CrowdSVM are also better than those learned by the other MV estimators. Overall, these results suggest that CrowdSVM can achieve a good balance between the generative modeling and the discriminative prediction. 7 Conclusions and Future Work We present a simple and intuitive max-margin majority voting estimator for learning-from-crowds as well as its Bayesian extension that conjoins the generative modeling and discriminative prediction. By formulating as a regularized Bayesian inference problem, our methods naturally cover the classical Dawid-Skene estimator. Empirical results demonstrate the effectiveness of our methods. Our model is flexible to fit specific complicated application scenarios [22]. One seminal feature of Bayesian methods is their sequential updating. We can extend our Bayesian estimators to the online setting where the crowdsourcing labels are collected in a stream and more tasks are distributed. We have some preliminary results as shown in Appendix B. It would also be interesting to investigate more on active learning, such as selecting reliable workers to reduce costs [9]. 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 National Laboratory for Information Science and Technology Big Data Initiative, and Tsinghua Initiative Scientific Research Program (Nos. 20121088071, 20141080934). 8 References [1] A. Carlson, J. Betteridge, B. Kisiel, B. Settles, E. R. Hruschka Jr, and T. M. Mitchell. Toward an architecture for never-ending language learning. In AAAI, 2010. [2] C. C. Chang and C. J. Lin. LIBSVM: A library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1–27:27, 2011. [3] C. Chen, J. Zhu, and X. Zhang. Robust Bayesian max-margin clustering. In NIPS, 2014. [4] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, 2:265–292, 2002. [5] A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the EM algorithm. Applied Statistics, pages 20–28, 1979. [6] M. Dud´ık, S. J. Phillips, and R. E. Schapire. Maximum entropy density estimation with generalized regularization and an application to species distribution modeling. JMLR, 8(6), 2007. [7] K. Ganchev, J. Grac¸a, J. Gillenwater, and B. Taskar. Posterior regularization for structured latent variable models. JMLR, 11:2001–2049, 2010. [8] Otto C. Liu X. Han, H. and A. Jain. Demographic estimation from face images: Human vs. machine performance. IEEE Trans. on PAMI, 2014. [9] S. Jagabathula, L. Subramanian, and A. Venkataraman. Reputation-based worker filtering in crowdsourcing. In NIPS, 2014. [10] D. R. Karger, S. Oh, and D. Shah. Iterative learning for reliable crowdsourcing systems. In NIPS, 2011. [11] H. Li and B. Yu. Error rate bounds and iterative weighted majority voting for crowdsourcing. arXiv preprint arXiv:1411.4086, 2014. [12] Q. Liu, J. Peng, and A. Ihler. Variational inference for crowdsourcing. In NIPS, 2012. [13] J. R. Michael, W. R. Schucany, and R. W. Haas. Generating random variates using transformations with multiple roots. The American Statistician, 30(2):88–90, 1976. [14] N. G. Polson and S. L. Scott. Data augmentation for support vector machines. Bayesian Analysis, 6(1):1–23, 2011. [15] V. C. Raykar, S. Yu, L. H. Zhao, G. H. Valadez, C. Florin, L. Bogoni, and L. Moy. Learning from crowds. JMLR, 11:1297–1322, 2010. [16] T. Shi and J. Zhu. Online Bayesian passive-aggressive learning. In ICML, 2014. [17] R. Snow, B. O’Connor, D. Jurafsky, and A. Y. Ng. Cheap and fast—but is it good?: evaluating non-expert annotations for natural language tasks. In EMNLP, 2008. [18] T. Tian and J. Zhu. Uncovering the latent structures of crowd labeling. In PAKDD, 2015. [19] P. Welinder, S. Branson, P. Perona, and S. J. Belongie. The multidimensional wisdom of crowds. In NIPS, 2010. [20] J. Whitehill, T. F. Wu, J. Bergsma, J. R. Movellan, and P. L. Ruvolo. Whose vote should count more: Optimal integration of labels from labelers of unknown expertise. In NIPS, 2009. [21] L. Xu and D. Schuurmans. Unsupervised and semi-supervised multi-class support vector machines. In AAAI, 2005. [22] O. F. Zaidan and C. Callison-Burch. Crowdsourcing translation: Professional quality from non-professionals. In ACL, 2011. [23] Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet EM: A provably optimal algorithm for crowdsourcing. In NIPS, 2014. [24] D. Zhou, S. Basu, Y. Mao, and J. C. Platt. Learning from the wisdom of crowds by minimax entropy. In NIPS, 2012. [25] D. Zhou, Q. Liu, J. Platt, and C. Meek. Aggregating ordinal labels from crowds by minimax conditional entropy. In ICML, 2014. [26] J. Zhu, N. Chen, H. Perkins, and B. Zhang. Gibbs max-margin topic models with data augmentation. JMLR, 15:1073–1110, 2014. [27] J. Zhu, N. Chen, and E. P. Xing. Bayesian inference with posterior regularization and applications to infinite latent svms. JMLR, 15:1799–1847, 2014. 9 | 2015 | 332 |
5,850 | Competitive Distribution Estimation: Why is Good-Turing Good Alon Orlitsky UC San Diego alon@ucsd.edu Ananda Theertha Suresh UC San Diego asuresh@ucsd.edu Abstract Estimating distributions over large alphabets is a fundamental machine-learning tenet. Yet no method is known to estimate all distributions well. For example, add-constant estimators are nearly min-max optimal but often perform poorly in practice, and practical estimators such as absolute discounting, Jelinek-Mercer, and Good-Turing are not known to be near optimal for essentially any distribution. We describe the first universally near-optimal probability estimators. For every discrete distribution, they are provably nearly the best in the following two competitive ways. First they estimate every distribution nearly as well as the best estimator designed with prior knowledge of the distribution up to a permutation. Second, they estimate every distribution nearly as well as the best estimator designed with prior knowledge of the exact distribution, but as all natural estimators, restricted to assign the same probability to all symbols appearing the same number of times. Specifically, for distributions over k symbols and n samples, we show that for both comparisons, a simple variant of Good-Turing estimator is always within KL divergence of (3 + on(1))/n1/3 from the best estimator, and that a more involved estimator is within ˜ On(min(k/n, 1/√n)). Conversely, we show that any estimator must have a KL divergence at least ˜Ωn(min(k/n, 1/n2/3)) over the best estimator for the first comparison, and at least ˜Ωn(min(k/n, 1/√n)) for the second. 1 Introduction 1.1 Background Many learning applications, ranging from language-processing staples such as speech recognition and machine translation to biological studies in virology and bioinformatics, call for estimating large discrete distributions from their samples. Probability estimation over large alphabets has therefore long been the subject of extensive research, both by practitioners deriving practical estimators [1, 2], and by theorists searching for optimal estimators [3]. Yet even after all this work, provably-optimal estimators remain elusive. The add-constant estimators frequently analyzed by theoreticians are nearly min-max optimal, yet perform poorly for many practical distributions, while common practical estimators, such as absolute discounting [4], Jelinek-Mercer [5], and Good-Turing [6], are not well understood and lack provable performance guarantees. To understand the terminology and approach a solution we need a few definitions. The performance of an estimator q for an underlying distribution p is typically evaluated in terms of the Kullback1 Leibler (KL) divergence [7], D(p||q) def = X x px log px qx , reflecting the expected increase in the ambiguity about the outcome of p when it is approximated by q. KL divergence is also the increase in the number of bits over the entropy that q uses to compress the output of p, and is also the log-loss of estimating p by q. It is therefore of interest to construct estimators that approximate a large class of distributions to within small KL divergence. We now describe one of the problem’s simplest formulations. 1.2 Min-max loss A distribution estimator over a support set X associates with any observed sample sequence x∗∈ X ∗a distribution q(x∗) over X. Given n samples Xn def = X1, X2, . . . , Xn, generated independently according to a distribution p over X, the expected KL loss of q is rn(q, p) = E Xn∼pn [D(p||q(Xn))]. Let P be a known collection of distributions over a discrete set X. The worst-case loss of an estimator q over all distributions in P is rn(q, P) def = max p∈P rn(q, p), (1) and the lowest worst-case loss for P, achieved by the best estimator, is the min-max loss rn(P) def = min q rn(q, P) = min q max p∈P rn(q, p). (2) Min-max performance can be viewed as regret relative to an oracle that knows the underlying distribution. Hence from here on we refer to it as regret. The most natural and important collection of distributions, and the one we study here, is the set of all discrete distributions over an alphabet of some size k, which without loss of generality we assume to be [k] = {1, 2, . . . k}. Hence the set of all distributions is the simplex in k dimensions, ∆k def = {(p1, . . . , pk) : pi ≥0 and P pi = 1}. Following [8], researchers have studied rn(∆k) and related quantities, for example see [9]. We outline some of the results derived. 1.3 Add-constant estimators The add-β estimator assigns to a symbol that appeared t times a probability proportional to t+β. For example, if three coin tosses yield one heads and two tails, the add-1/2 estimator assigns probability 1.5/(1.5 + 2.5) = 3/8 to heads, and 2.5/(1.5 + 2.5) = 5/8 to tails. [10] showed that as for every k, as n →∞, an estimator related to add-3/4 is near optimal and achieves rn(∆k) = k −1 2n · (1 + o(1)). (3) The more challenging, and practical, regime is where the sample size n is not overwhelmingly larger than the alphabet size k. For example in English text processing, we need to estimate the distribution of words following a context. But the number of times a context appears in a corpus may not be much larger than the vocabulary size. Several results are known for other regimes as well. When the sample size n is linear in the alphabet size k, rn(∆k) can be shown to be a constant, and [3] showed that as k/n →∞, add-constant estimators achieve the optimal rn(∆k) = log k n · (1 + o(1)), (4) While add-constant estimators are nearly min-max optimal, the distributions attaining the min-max regret are near uniform. In practice, large-alphabet distributions are rarely uniform, and instead, tend to follow a power-law. For these distributions, add-constant estimators under-perform the estimators described in the next subsection. 2 1.4 Practical estimators For real applications, practitioners tend to use more sophisticated estimators, with better empirical performance. These include the Jelinek-Mercer estimator that cross-validates the sample to find the best fit for the observed data. Or the absolute-discounting estimators that rather than add a positive constant to each count, do the opposite, and subtract a positive constant. Perhaps the most popular and enduring have been the Good-Turing estimator [6] and some of its variations. Let nx def = nx(xn) be the number of times a symbol x appears in xn and let ϕt def = ϕt(xn) be the number of symbols appearing t times in xn. The basic Good-Turing estimator posits that if nx = t, qx(xn) = ϕt+1 ϕt · t + 1 n , surprisingly relating the probability of an element not just to the number of times it was observed, but also to the number other elements appearing as many, and one more, times. It is easy to see that this basic version of the estimator may not work well, as for example it assigns any element appearing ≥n/2 times 0 probability. Hence in practice the estimator is modified, for example, using empirical frequency to elements appearing many times. The Good-Turing Estimator was published in 1953, and quickly adapted for language-modeling use, but for half a century no proofs of its performance were known. Following [11], several papers, e.g., [12, 13], showed that Good-Turing variants estimate the combined probability of symbols appearing any given number of times with accuracy that does not depend on the alphabet size, and [14] showed that a different variation of Good-Turing similarly estimates the probabilities of each previously-observed symbol, and all unseen symbols combined. However, these results do not explain why Good-Turing estimators work well for the actual probability estimation problem, that of estimating the probability of each element, not of the combination of elements appearing a certain number of times. To define and derive uniformly-optimal estimators, we take a different, competitive, approach. 2 Competitive optimality 2.1 Overview To evaluate an estimator, we compare its performance to the best possible performance of two estimators designed with some prior knowledge of the underlying distribution. The first estimator is designed with knowledge of the underlying distribution up to a permutation of the probabilities, namely knowledge of the probability multiset, e.g., {.5, .3, .2}, but not of the association between probabilities and symbols. The second estimator is designed with exact knowledge of the distribution, but like all natural estimators, forced to assign the same probabilities to symbols appearing the same number of times. For example, upon observing the sample a, b, c, a, b, d, e, the estimator must assign the same probability to a and b, and the same probability to c, d, and e. These estimators cannot be implemented in practice as in reality we do not have prior knowledge of the estimated distribution. But the prior information is chosen to allow us to determine the best performance of any estimator designed with that information, which in turn is better than the performance of any data-driven estimator designed without prior information. We then show that certain variations of the Good-Turing estimators, designed without any prior knowledge, approach the performance of both prior-knowledge estimators for every underlying distribution. 2.2 Competing with near full information We first define the performance of an oracle-aided estimator, designed with some knowledge of the underlying distribution. Suppose that the estimator is designed with the aid of an oracle that knows the value of f(p) for some given function f over the class ∆k of distributions. The function f partitions ∆k into subsets, each corresponding to one possible value of f. We denote the subsets by P, and the partition by P, and as before, denote the individual distributions by p. Then the oracle knows the unique partition part P such that p ∈P ∈P. For example, if f(p) is 3 the multiset of p, then each subset P corresponds to set of distributions with the same probability multiset, and the oracle knows the multiset of probabilities. For every partition part P ∈P, an estimator q incurs the worst-case regret in (1), rn(q, P) = max p∈P rn(q, p). The oracle, knowing the unique partition part P, incurs the least worst-case regret (2), rn(P) = min q rn(q, P). The competitive regret of q over the oracle, for all distributions in P is rn(q, P) −rn(P), the competitive regret over all partition parts and all distributions in each is rP n(q, ∆k) def = max P ∈P (rn(q, P) −rn(P)) , and the best possible competitive regret is rP n(∆k) def = min q rP n(q, ∆k). Consolidating the intermediate definitions, rP n(∆k) = min q max P ∈P max p∈P rn(q, p) −rn(P) . Namely, an oracle-aided estimator who knows the partition part incurs a worst-case regret rn(P) over each part P, and the competitive regret rP n(∆k) of data-driven estimators is the least overall increase in the part-wise regret due to not knowing P. In Appendix A.1, we give few examples of such partitions. A partition P′ refines a partition P if every part in P is partitioned by some parts in P′. For example {{a, b}, {c}, {d, e}} refines {{a, b, c}, {d, e}}. In Appendix A.2, we show that if P′ refines P then for every q rP′ n (q, ∆k) ≥rP n(q, ∆k). (5) Considering the collection ∆k of all distributions over [k], it follows that as we start with single-part partition {∆k} and keep refining it till the oracle knows p, the competitive regret of estimators will increase from 0 to rn(q, ∆k). A natural question is therefore how much information can the oracle have and still keep the competitive regret low? We show that the oracle can know the distribution exactly up to permutation, and still the regret will be very small. Two distributions p and p′ permutation equivalent if for some permutation σ of [k], p′ σ(i) = pi, for all 1 ≤i ≤k. For example, (0.5, 0.3, 0.2) and (0.3, 0.5, 0.2) are permutation equivalent. Permutation equivalence is clearly an equivalence relation, and hence partitions the collection of distributions over [k] into equivalence classes. Let Pσ be the corresponding partition. We construct estimators q that uniformly bound rPσ n (q, ∆k), thus the same estimator uniformly bounds rP n(q, ∆k) for any coarser partition of ∆k, such as partitions into classes of distributions with the same support size, or entropy. Note that the partition Pσ corresponds to knowing the underlying distribution up to permutation, hence rPσ n (∆k) is the additional KL loss compared to an estimator designed with knowledge of the underlying distribution up to permutation. This notion of competitiveness has appeared in several contexts. In data compression it is called twice-redundancy [15, 16, 17, 18], while in statistics it is often called adaptive or local minmax [19, 20, 21, 22, 23], and recently in property testing it is referred as competitive [24, 25, 26] or instance-by-instance [27]. Subsequent to this work, [28] studied competitive estimation in ℓ1 distance, however their regret is poly(1/ log n), compared to our ˜O(1/√n). 4 2.3 Competing with natural estimators Our second comparison is with an estimator designed with exact knowledge of p, but forced to be natural, namely, to assign the same probability to all symbols appearing the same number of times in the sample. For example, for the observed sample a, b, c, a, b, d, e, the same probability must be assigned to a and b, and the same probability to c, d, and e. Since data-driven estimators derive all their knowledge of the distribution from the data, we expect them to be natural. We compare the regret of data-driven estimators to that of natural oracle-aided estimators. Let Qnat be the set of all natural estimators. For a distribution p, the lowest regret of a natural estimator, designed with prior knowledge of p is r nat n (p) def = min q∈Qnat rn(q, p), and the regret of an estimator q relative to the least-regret natural-estimator is r nat n (q, p) = rn(q, p) −r nat n (p). Thus the regret of an estimator q over all distributions in ∆k is r nat n (q, ∆k) = max p∈∆k r nat n (q, p), and the best possible competitive regret is rnat n (∆k) = minq rnat n (q, ∆k). In the next section we state the results, showing in particular that rnat n (∆k) is uniformly bounded. In Section 5, we outline the proofs, and in Section 4 we describe experiments comparing the performance of competitive estimators to that of min-max motivated estimators. 3 Results Good-Turing estimators are often used in conjunction with empirical frequency, where Good-Turing estimates low probabilities and empirical frequency estimates large probabilities. We first show that even this simple Good-Turing version, defined in Appendix C and denoted q′, is uniformly optimal for all distributions. For simplicity we prove the result when the number of samples is n′ ∼poi(n), a Poisson random variable with mean n. Let rPσ poi(n)(q′, ∆k) and rnat poi(n)(q′, ∆k) be the regrets in this sampling process. A similar result holds with exactly n samples, but the proof is more involved as the multiplicities are dependent. Theorem 1 (Appendix C). For any k and n, rPσ poi(n)(q′, ∆k) ≤r nat poi(n)(q′, ∆k) ≤3 + on(1) n1/3 . Furthermore, a lower bound in [13] shows that this bound is optimal up to logarithmic factors. A more complex variant of Good-Turing, denoted q′′, was proposed in [13]. We show that its regret diminishes uniformly in both the partial-information and natural-estimator formulations. Theorem 2 (Section 5). For any k and n, rPσ n (q′′, ∆k) ≤r nat n (q′′, ∆k) ≤˜On min 1 √n, k n . Where ˜On, and below also ˜Ωn, hide multiplicative logarithmic factors in n. Lemma 6 in Section 5 and a lower bound in [13] can be combined to prove a matching lower bound on the competitive regret of any estimator for the second formulation, r nat n (∆k) ≥˜Ωn min 1 √n, k n . Hence q′′ has near-optimal competitive regret relative to natural estimators. Fano’s inequality usually yields lower bounds on KL loss, not regret. By carefully constructing distribution classes, we lower bound the competitive regret relative to the oracle-aided estimators. Theorem 3 (Appendix D). For any k and n, rPσ n (∆k) ≥˜Ωn min 1 n2/3 , k n . 5 3.1 Illustration and implications Figure 1 demonstrates some of the results. The horizontal axis reflects the set ∆k of distributions illustrated on one dimension. The vertical axis indicates the KL loss, or absolute regret, for clarity, shown for k ≫n. The blue line is the previously-known min-max upper bound on the regret, which by (4) is very high for this regime, log(k/n). The red line is the regret of the estimator designed with prior knowledge of the probability multiset. Observe that while for some probability multisets the regret approaches the log(k/n) min-max upper bound, for other probability multisets it is much lower, and for some, such as uniform over 1 or over k symbols, where the probability multiset determines the distribution it is even 0. For many practically relevant distributions, such as power-law distributions and sparse distributions, the regret is small compared to log(k/n). The green line is an upper bound on the absolute regret of the data-driven estimator q′′. By Theorem 2, it is always at most 1/√n larger than the red line. It follows that for many distributions, possibly for distributions with more structure, such as those occurring in nature, the regret of q′′ is significantly smaller than the pessimistic min-max bound implies. rn(∆k) = log k n Uniform distribution KL loss Distributions ≤˜O min( 1 √n, k n Figure 1: Qualitative behavior of the KL loss as a function of distributions in different formulations We observe a few consequences of these results. • Theorems 1 and 2 establish two uniformly-optimal estimators q′ and q′′. Their relative regrets diminish to zero at least as fast as 1/n1/3, and 1/√n respectively, independent of how large the alphabet size k is. • Although the results are for relative regret, as shown in Figure 1, they lead to estimator with smaller absolute regret, namely, the expected KL divergence. • The same regret upper bounds hold for all coarser partitions of ∆k i.e., where instead of knowing the multiset, the oracle knows some property of multiset such as entropy. 4 Experiments Recall that for a sequence xn, nx denotes the number of times a symbol x appears and ϕt denotes the number of symbols appearing t times. For small values of n and k, the estimator proposed in [13] simplifies to a combination of Good-Turing and empirical estimators. By [13, Lemmas 10 and 11], for symbols appearing t times, if ϕt+1 ≥˜Ω(t), then the Good-Turing estimate is close to the underlying total probability mass, otherwise the empirical estimate is closer. Hence, for a symbol appearing t times, if ϕt+1 ≥t we use the Good-Turing estimator, otherwise we use the empirical estimator. If nx = t, qx = ( t N if t > ϕt+1, ϕt+1+1 ϕt · t+1 N else, where N is a normalization factor. Note that we have replaced ϕt+1 in the Good-Turing estimator by ϕt+1 + 1 to ensure that every symbol is assigned a non-zero probability. 6 Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (a) Uniform Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (b) Step Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (c) Zipf with parameter 1 Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (d) Zipf with parameter 1.5 Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (e) Uniform prior (Dirichlet 1) Number of samples #10 4 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Expected KL divergence 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Best-natural Laplace Braess-Sauer Krichevsky-Trofimov Good-Turing + empirical (f) Dirichlet 1/2 prior Figure 2: Simulation results for support 10000, number of samples ranging from 1000 to 50000, averaged over 200 trials. We compare the performance of this estimator to four estimators: three popular add-β estimators and the optimal natural estimator. An add-beta estimator ˆS has the form q ˆS x = nx + β ˆS nx N( ˆS) , where N( ˆS) is a normalization factor to ensure that the probabilities add up to 1. The Laplace estimator, βL t = 1 ∀t, minimizes the expected loss when the underlying distribution is generated by a uniform prior over ∆k. The Krichevsky-Trofimov estimator, βKT t = 1/2 ∀t, is asymptotically min-max optimal for the cumulative regret, and minimizes the expected loss when the underlying distribution is generated according to a Dirichlet-1/2 prior. The Braess-Sauer estimator, βBS 0 = 1/2, βBS 1 = 1, βBS t = 3/4 ∀t > 1, is asymptotically min-max optimal for rn(∆k). Finally, as shown in Lemma 10, the optimal estimator qx = Snx ϕnx achieves the lowest loss of any natural estimator designed with knowledge of the underlying distribution. We compare the performance of the proposed estimator to that of the four estimators above. We consider six distributions: uniform distribution, step distribution with half the symbols having probability 1/2k and the other half have probability 3/2k, Zipf distribution with parameter 1 (pi ∝i−1), Zipf distribution with parameter 1.5 (pi ∝i−1.5), a distribution generated by the uniform prior on ∆k, and a distribution generated from Dirichlet-1/2 prior. All distributions have support size k = 10000. n ranges from 1000 to 50000 and the results are averaged over 200 trials. Figure 2 shows the results. Observe that the proposed estimator performs similarly to the best natural estimator for all six distributions. It also significantly outperforms the other estimators for Zipf, uniform, and step distributions. The performance of other estimators depends on the underlying distribution. For example, since Laplace is the optimal estimator when the underlying distribution is generated from the uniform prior, it performs well in Figure 2(e), however performs poorly on other distributions. Furthermore, even though for distributions generated by Dirichlet priors, all the estimators have similar looking regrets (Figures 2(e), 2(f)), the proposed estimator performs better than estimators which are not designed specifically for that prior. 7 5 Proof sketch of Theorem 2 The proof consists of two parts. We first show that for every estimator q, rPσ n (q, ∆k) ≤rnat n (q, ∆k) and then upper bound rnat n (q, ∆k) using results on combined probability mass. Lemma 4 (Appendix B.1). For every estimator q, rPσ n (q, ∆k) ≤r nat n (q, ∆k). The proof of the above lemma relies on showing that the optimal estimator for every class in P ∈Pσ is natural. 5.1 Relation between rnat n (q, ∆k) and combined probability estimation We now relate the regret in estimating distribution to that of estimating the combined or total probability mass, defined as follows. Recall that ϕt denotes the number of symbols appearing t times. For a sequence xn, let St def = St(xn) denote the total probability of symbols appearing t times. For notational convenience, we use St to denote both St(xn) and St(Xn) and the usage becomes clear in the context. Similar to KL divergence between distributions, we define KL divergence between S and their estimates ˆS as D(S|| ˆS) = n X t=0 St log St ˆSt . Since the natural estimator assigns same probability to symbols that appear the same number of times, estimating probabilities is same as estimating the total probability of symbols appearing a given number of times. We formalize it in the next lemma. Lemma 5 (Appendix B.2). For a natural estimator q let ˆSt(xn) = P x:nx=t qx(xn), then r nat n (q, p) = E[D(S|| ˆS)]. In Lemma 11(Appendix B.3), we show that there is a natural estimator that achieves rnat n (∆k). Taking maximum over all distributions p and minimum over all estimators q results in Lemma 6. For a natural estimator q let ˆSt(xn) = P x:nx=t qx(xn), then r nat n (q, ∆k) = max p∈∆k E[D(S|| ˆS)]. Furthermore, r nat n (∆k) = min ˆS max p∈∆k E[D(S|| ˆS)]. Thus finding the best competitive natural estimator is same as finding the best estimator for the combined probability mass S. [13] proposed an algorithm for estimating S such that for all k and for all p ∈∆k, with probability ≥1 −1/n , D(S|| ˆS) = ˜On 1 √n . The result is stated in Theorem 2 of [13]. One can convert this result to a result on expectation easily using the property that their estimator is bounded below by 1/2n and show that max p∈∆k E[D(S|| ˆS)] = ˜On 1 √n . A slight modification of their proofs for Lemma 17 and Theorem 2 in their paper using Pn t=1 √ϕt ≤ Pn t=1 ϕt ≤k shows that their estimator ˆS for the combined probability mass S satisfies max p∈∆k E[D(S|| ˆS)] = ˜On min 1 √n, k n . The above equation together with Lemmas 4 and 6 results in Theorem 2. 6 Acknowledgements We thank Jayadev Acharya, Moein Falahatgar, Paul Ginsparg, Ashkan Jafarpour, Mesrob Ohannessian, Venkatadheeraj Pichapati, Yihong Wu, and the anonymous reviewers for helpful comments. 8 References [1] William A. Gale and Geoffrey Sampson. Good-turing frequency estimation without tears. Journal of Quantitative Linguistics, 2(3):217–237, 1995. [2] S. F. Chen and J. Goodman. An empirical study of smoothing techniques for language modeling. In ACL, 1996. [3] Liam Paninski. Variational minimax estimation of discrete distributions under KL loss. In NIPS, 2004. [4] Hermann Ney, Ute Essen, and Reinhard Kneser. On structuring probabilistic dependences in stochastic language modelling. Computer Speech & Language, 8(1):1–38, 1994. [5] Fredrick Jelinek and Robert L. Mercer. Probability distribution estimation from sparse data. IBM Tech. Disclosure Bull., 1984. [6] Irving J. Good. The population frequencies of species and the estimation of population parameters. Biometrika, 40(3-4):237–264, 1953. [7] Thomas M. Cover and Joy A. Thomas. Elements of information theory (2. ed.). Wiley, 2006. [8] R. Krichevsky. Universal Compression and Retrieval. Dordrecht,The Netherlands: Kluwer, 1994. [9] Sudeep Kamath, Alon Orlitsky, Dheeraj Pichapati, and Ananda Theertha Suresh. On learning distributions from their samples. In COLT, 2015. [10] Dietrich Braess and Thomas Sauer. Bernstein polynomials and learning theory. Journal of Approximation Theory, 128(2):187–206, 2004. [11] David A. McAllester and Robert E. Schapire. On the convergence rate of Good-Turing estimators. In COLT, 2000. [12] Evgeny Drukh and Yishay Mansour. Concentration bounds for unigrams language model. In COLT, 2004. [13] Jayadev Acharya, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. Optimal probability estimation with applications to prediction and classification. In COLT, 2013. [14] Alon Orlitsky, Narayana P. Santhanam, and Junan Zhang. Always Good Turing: Asymptotically optimal probability estimation. In FOCS, 2003. [15] Boris Yakovlevich Ryabko. Twice-universal coding. Problemy Peredachi Informatsii, 1984. [16] Boris Yakovlevich Ryabko. Fast adaptive coding algorithm. Problemy Peredachi Informatsii, 26(4):24– 37, 1990. [17] Dominique Bontemps, St´ephane Boucheron, and Elisabeth Gassiat. About adaptive coding on countable alphabets. IEEE Transactions on Information Theory, 60(2):808–821, 2014. [18] St´ephane Boucheron, Elisabeth Gassiat, and Mesrob I. Ohannessian. About adaptive coding on countable alphabets: Max-stable envelope classes. CoRR, abs/1402.6305, 2014. [19] David L Donoho and Jain M Johnstone. Ideal spatial adaptation by wavelet shrinkage. Biometrika, 81(3):425–455, 1994. [20] Felix Abramovich, Yoav Benjamini, David L Donoho, and Iain M Johnstone. Adapting to unknown sparsity by controlling the false discovery rate. The Annals of Statistics, 2006. [21] Peter J Bickel, Chris A Klaassen, YA’Acov Ritov, and Jon A Wellner. Efficient and adaptive estimation for semiparametric models. Johns Hopkins University Press Baltimore, 1993. [22] Andrew Barron, Lucien Birg´e, and Pascal Massart. Risk bounds for model selection via penalization. Probability theory and related fields, 113(3):301–413, 1999. [23] Alexandre B. Tsybakov. Introduction to Nonparametric Estimation. Springer, 2004. [24] Jayadev Acharya, Hirakendu Das, Ashkan Jafarpour, Alon Orlitsky, and Shengjun Pan. Competitive closeness testing. COLT, 2011. [25] Jayadev Acharya, Hirakendu Das, Ashkan Jafarpour, Alon Orlitsky, Shengjun Pan, and Ananda Theertha Suresh. Competitive classification and closeness testing. In COLT, 2012. [26] Jayadev Acharya, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. A competitive test for uniformity of monotone distributions. In AISTATS, 2013. [27] Gregory Valiant and Paul Valiant. An automatic inequality prover and instance optimal identity testing. In FOCS, 2014. [28] Gregory Valiant and Paul Valiant. Instance optimal learning. CoRR, abs/1504.05321, 2015. [29] Michael Mitzenmacher and Eli Upfal. Probability and computing: Randomized algorithms and probabilistic analysis. Cambridge University Press, 2005. 9 | 2015 | 333 |
5,851 | Embedding Inference for Structured Multilabel Prediction Farzaneh Mirzazadeh Siamak Ravanbakhsh University of Alberta {mirzazad,mravanba}@ualberta.ca Nan Ding Google dingnan@google.com Dale Schuurmans University of Alberta daes@ualberta.ca Abstract A key bottleneck in structured output prediction is the need for inference during training and testing, usually requiring some form of dynamic programming. Rather than using approximate inference or tailoring a specialized inference method for a particular structure—standard responses to the scaling challenge— we propose to embed prediction constraints directly into the learned representation. By eliminating the need for explicit inference a more scalable approach to structured output prediction can be achieved, particularly at test time. We demonstrate the idea for multi-label prediction under subsumption and mutual exclusion constraints, where a relationship to maximum margin structured output prediction can be established. Experiments demonstrate that the benefits of structured output training can still be realized even after inference has been eliminated. 1 Introduction Structured output prediction has been an important topic in machine learning. Many prediction problems involve complex structures, such as predicting parse trees for sentences [28], predicting sequence labellings for language and genomic data [1], or predicting multilabel taggings for documents and images [7, 8, 13, 20]. Initial breakthroughs in this area arose from tractable discriminative training methods—conditional random fields [19, 27] and structured large margin training [26, 29]—that compare complete output configurations against given target structures, rather than simply learning to predict each component in isolation. More recently, search based approaches that exploit sequential prediction methods have also proved effective for structured prediction [4, 21]. Despite these improvements, the need to conduct inference or search over complex outputs both during the training and testing phase proves to be a significant bottleneck in practice. In this paper we investigate an alternative approach that eliminates the need for inference or search at test time. The idea is to shift the burden of coordinating predictions to the training phase, by embedding constraints in the learned representation that ensure prediction relationships are satisfied. The primary benefit of this approach is that prediction cost can be significantly reduced without sacrificing the desired coordination of structured output components. We demonstrate the proposed approach for the problem of multilabel classification with hierarchical and mutual exclusion constraints on output labels [8]. Multilabel classification is an important subfield of structured output prediction where multiple labels must be assigned that respect semantic relationships such as subsumption, mutual exclusion or weak forms of correlation. The problem is of growing importance as larger tag sets are being used to annotate images and documents on the Web. Research in this area can be distinguished by whether the relationships between labels are assumed to be known beforehand or whether such relationships need to be inferred during training. In the latter case, many works have developed tailored training losses for multilabel prediction that penalize joint prediction behavior [6, 9, 30] without assuming any specific form of prior knowledge. More recently, several works have focused on coping with large label spaces by using low dimensional 1 projections to label subspaces [3, 17, 22]. Other work has focused on exploiting weak forms of prior knowledge expressed as similarity information between labels that can be obtained from auxiliary sources [11]. Unfortunately, none of these approaches strictly enforce prior logical relationships between label predictions. By contrast, other research has sought to exploit known prior relationships between labels. The most prominent such approaches have been to exploit generative or conditional graphical model structures over the label set [5, 16]. Unfortunately, the graphical model structures are either limited to junction trees with small treewidth [5] or require approximation [12]. Other work, using output kernels, has also been shown able to model complex relationships between labels [15] but is hampered by an intractable pre-image problem at test time. In this paper, we focus on tractable methods and consider the scenario where a set of logical label relationships is given a priori; in particular, implication and mutual exclusion relationships. These relationships have been the subject of extensive work on multilabel prediction, where it is known that if the implication/subsumption relationships form a tree [25] or a directed acyclic graph [2, 8] then efficient dynamic programming algorithms can be developed for tractable inference during training and testing, while for general pairwise models [32] approximate inference is required. Our main contribution is to show how these relationships can be enforced without the need for dynamic programming. The idea is to embed label relationships as constraints on the underlying score model during training so that a trivial labelling algorithm can be employed at test time, a process that can be viewed as pre-compiling inference during the training phase. The literature on multivariate prediction has considered many other topics not addressed by this paper, including learning from incomplete labellings, exploiting hierarchies and embeddings for multiclass prediction [31], exploiting multimodal data, deriving generalization bounds for structured and multilabel prediction problems, and investigating the consistency of multilabel losses. 2 Background We consider a standard prediction model where a score function s : X × Y →R with parameters θ is used to determine the prediction for a given input x via ˆy = arg max y∈Y s(x, y). (1) Here y is a configuration of assignments over a set of components (that might depend on x). Since Y is a combinatorial set, (1) cannot usually be solved by enumeration; some structure required for efficient prediction. For example, s might decompose as s(x, y) = P c∈C s(x, yc) over a set of cliques C that form a junction tree, where yc denotes the portion of y covered by clique c. Y might also encode constraints to aid tractability, such as y forming a consistent matching in a bipartite graph, or a consistent parse tree [28]. The key practical requirement is that s and Y allow an efficient solution to (1). The operation of maximizing or summing over all y ∈Y is referred to as inference, and usually involves a dynamic program tailored to the specific structure encoded by s and Y. For supervised learning one attempts to infer a useful score function given a set of t training pairs (x1, y1), (x2, y2), ..., (xt, yt) that specify the correct output associated with each input. Conditional random fields [19] and structured large margin training (below with margin scaling) [28, 29] can both be expressed as optimizations over the score model parameters θ respectively: min θ∈Θ r(θ) + t X i=1 log X y∈Y exp(sθ(xi, y)) −sθ(xi, yi) (2) min θ∈Θ r(θ) + t X i=1 max y∈Y ∆(y, yi) + sθ(xi, y) −sθ(xi, yi), (3) where r(θ) is a regularizer over θ ∈Θ. Equations (1), (2) and (3) suggest that inference over y ∈Y is required at each stage of training and testing, however we show this is not necessarily the case. Multilabel Prediction To demonstrate how inference might be avoided, consider the special case of multilabel prediction with label constraints. Multilabel prediction specializes the previous set up by assuming y is a boolean assignment to a fixed set of variables, where y = (y1, y2, ..., yℓ) and yi ∈{0, 1}, i.e. each label is assigned 1 (true) or 0 (false). As noted, an extensive literature that 2 has investigated various structural assumptions on the score function to enable tractable prediction. For simplicity we adopt the factored form that has been reconsidered in recent work [8, 11] (and originally [13]): s(x, y) = P k s(x, yk). This form allows (1) to be simplified to ˆy = arg max y∈Y X k s(x, yk) = arg max y∈Y X k yksk(x) (4) where sk(x) := s(x, yk = 1) −s(x, yk = 0) gives the decision function associated with label yk ∈ {0, 1}. That is, based on (4), if the constraints in Y were ignored, one would have the relationship ˆyk = 1 ⇔sk(x) ≥0. The constraints in Y play an important role however: it has been shown in [8] that imposing prior implications and mutual exclusions as constraints in Y yields state of the art accuracy results for image tagging on the ILSVRC corpus. This result was achieved in [8] by developing a novel and rather sophisticated dynamic program that can efficiently solve (4) under these constraints. Here we show how such a dynamic program can be eliminated. 3 Embedding Label Constraints Consider the two common forms of logical relationships between labels: implication and mutual exclusion. For implication one would like to enforce relationships of the form y1 ⇒y2, meaning that whenever the label y1 is set to 1 (true) then the label y2 must also be set to 1 (true). For mutual exclusion one would like to enforce relationships of the form ¬y1 ∨¬y2, meaning that at least one of the labels y1 and y2 must be set to 0 (false) (i.e., not both can be simultaneously true). These constraints arise naturally in multilabel classification, where label sets are increasingly large and embody semantic relationships between categories [2, 8, 32]. For example, images can be tagged with labels “dog”, “cat” and “Siamese” where “Siamese” implies “cat”, while “dog” and “cat” are mutually exclusive (but an image could depict neither). These implication and mutual exclusion constraints constitute the “HEX” constraints considered in [8]. Our goal is to express the logical relationships between label assignments as constraints on the score function that hold universally over all x ∈X. In particular, using the decomposed representation (4), the desired label relationships correspond to the following constraints Implication y1 ⇒y2: s1(x) ≥−δ ⇒ s2(x) ≥δ ∀x ∈X (5) Mutual exclusion ¬y1 ∨¬y2: s1(x) < −δ or s2(x) < −δ ∀x ∈X (6) where we have introduced the additional margin quantity δ ≥0 for subsequent large margin training. 3.1 Score Model The first key consideration is representing the score function in a manner that allows the desired relationships to be expressed. Unfortunately, the standard linear form s(x, y) = ⟨θ, f(x, y)⟩cannot allow the needed constraints to be enforced over all x ∈X without further restricting the form of the feature representation f; a constraint we would like to avoid. More specifically, consider a standard set up where there is a mapping f(x, yk) that produces a feature representation for an input-label pair (x, yk). For clarity, we additionally make the standard assumption that the inputs and outputs each have independent feature representations [11], hence f(x, yk) = φ(x) ⊗ψk for an input feature map φ and label feature representation ψk. In this case, a bi-linear score function has the form sk(x) = φ(x)⊤Aψk + b⊤φ(x) + c⊤ψk + d for parameters θ = (A, b, c, d). Unfortunately, such a score function does not allow sk(x) ≥δ (e.g., in Condition (5)) to be expressed over all x ∈X without either assuming A = 0 and b = 0, or special structure in φ. To overcome this restriction we consider a more general scoring model that extends the standard bi-linear form to a form that is linear in the parameters but quadratic in the feature representations: −sk(x) = " φ(x) ψk 1 #⊤ P A b A⊤ Q c b⊤ c⊤ r " φ(x) ψk 1 # for θ = P A b A⊤ Q c b⊤ c⊤ r . (7) Here θ = θ⊤and sk is linear in θ for each k. The benefit of a quadratic form in the features is that it allows constraints over x ∈X to be easily imposed on label scores via convex constraints on θ. 3 Lemma 1 If θ ⪰0 then −sk(x) = ∥Uφ(x) + u −V ψk∥2 for some U, V and u. Proof: First expand (7), obtaining −sk(x) = φ(x)⊤Pφ(x)+2φ(x)⊤Aψk +2b⊤φ(x)+ψ⊤ k Qψk + 2c⊤ψk + r. Since θ ⪰0 there must exist U, V and u such that θ = [U ⊤, −V ⊤, u]⊤[U ⊤, −V ⊤, u], where U ⊤U = P, U ⊤V = −A, U ⊤u = b, V ⊤V = Q, V ⊤u = −c, and u⊤u = r. A simple substitution and rearrangement shows the claim. ■ The representation (7) generalizes both standard bi-linear and distance-based models. The standard bi-linear model is achieved by P = 0 and Q = 0. By Lemma 1, the semidefinite assumption θ ⪰0 also yields a model that has a co-embedding [24] interpretation: the feature representations φ(x) and ψk are both mapped (linearly) into a common Euclidean space where the score is determined by the squared distance between the embedded vectors (with an additional offset u). To aid the presentation below we simplify this model a bit further. Set b = 0 and observe that (7) reduces to sk(x) = γk − φ(x) ψk ⊤ P A A⊤ Q φ(x) ψk (8) where γk = −r −2c⊤ψk. In particular, we modify the parameterization to θ = {γk}ℓ k=1 ∪{θP AQ} such that θP AQ denotes the matrix of parameters in (8). Importantly, (8) remains linear in the new parameterization. Lemma 1 can then be modified accordingly for a similar convex constraint on θ. Lemma 2 If θP AQ ⪰0 then there exist U and V such that for all labels k and l sk(x) = γk −∥Uφ(x) −V ψk∥2 (9) ψ⊤ k Qψk −ψ⊤ k Qψl −ψ⊤ l Qψk + ψ⊤ l Qψl = ∥V ψk −V ψl∥2. (10) Proof: Similar to Lemma 1, since θP AQ ⪰0, there exist U and V such that θP AQ = [U ⊤, −V ⊤]⊤[U ⊤, −V ⊤] where U ⊤U = P, V ⊤V = Q and U ⊤V = −A. Expanding (8) and substituting gives (9). For (10) note ψ⊤ k Qψk −ψ⊤ k Qψl −ψ⊤ l Qψk +ψ⊤ l Qψl = (ψk −ψl)⊤Q(ψk −ψl). Expanding Q gives (ψk −ψl)⊤Q(ψk −ψl) = (ψk −ψl)⊤V ⊤V (ψk −ψl) = ∥V ψk −V ψl∥2. ■ This representation now allows us to embed the desired label relationships as simple convex constraints on the score model parameters θ. 3.2 Embedding Implication Constraints Theorem 3 Assume the quadratic-linear score model (8) and θP AQ ⪰0. Then for any δ ≥0 and α > 0, the implication constraint in (5) is implied for all x ∈X by: γ1 + δ + (1 + α)(ψ⊤ 1 Qψ1 −ψ⊤ 1 Qψ2 −ψ⊤ 2 Qψ1 + ψ⊤ 2 Qψ2) ≤ γ2 −δ (11) α 2 2 (ψ⊤ 1 Qψ1 −ψ⊤ 1 Qψ2 −ψ⊤ 2 Qψ1 + ψ⊤ 2 Qψ2) ≥ γ1 + δ. (12) Proof: First, since θP AQ ⪰0 we have the relationship (10), which implies that there must exist vectors ν1 = V ψ1 and ν2 = V ψ2 such that ψ⊤ 1 Qψ1 −ψ⊤ 1 Qψ2 −ψ⊤ 2 Qψ1 + ψ⊤ 2 Qψ2 = ∥ν1 −ν2∥2. Therefore, the constraints (11) and (12) can be equivalently re-expressed as γ1 + δ + (1 + α)∥ν1 −ν2∥2 ≤ γ2 −δ (13) α 2 2 ∥ν1 −ν2∥2 ≥ γ1 + δ (14) with respect to these vectors. Next let µ(x) := Uφ(x) (which exists by (9)) and observe that ∥µ(x) −ν2∥2 = ∥µ(x) −ν1 + ν1 −ν2∥2 = ∥µ(x) −ν1∥2 + ∥ν1 −ν2∥2 + 2⟨µ(x) −ν1, ν1 −ν2⟩, (15) Consider two cases. Case 1: 2⟨µ(x) −ν1, ν1 −ν2⟩> α∥ν1 −ν2∥2. In this case, by the Cauchy Schwarz inequality we have 2∥µ(x)−ν1∥∥ν1 −ν2∥≥2⟨µ(x)−ν1, ν1 −ν2⟩> α∥ν1 −ν2∥2, which implies ∥µ(x)−ν1∥> α 2 ∥ν1 −ν2∥, hence ∥µ(x) −ν1∥2 > α 2 2 ∥ν1 −ν2∥2 ≥γ1 + δ by constraint (14). But this implies that s1(x) < −δ therefore it does not matter what value s2(x) has. 4 Case 2: 2⟨µ(x) −ν1, ν1 −ν2⟩≤α∥ν1 −ν2∥2. In this case, assume that s1(x) ≥−δ, i.e. ∥µ(x) −ν1∥2 ≤γ1 + δ, otherwise it does not matter what value s2(x) has. Then from (15) it follows that ∥µ(x)−ν2∥2 ≤∥µ(x)−ν1∥2 +(1+α)∥ν1 −ν2∥2 ≤γ1 +δ+(1+α)∥ν1 −ν2∥2 ≤γ2 −δ by constraint (13). But this implies that s2(x) ≥δ, hence the implication is enforced. ■ 3.3 Embedding Mutual Exclusion Constraints Theorem 4 Assume the quadratic-linear score model (8) and θP AQ ⪰0. Then for any δ ≥0 the mutual exclusion constraint in (6) is implied for all x ∈X by: 1 2(ψ⊤ 1 Qψ1 −ψ⊤ 1 Qψ2 −ψ⊤ 2 Qψ1 + ψ⊤ 2 Qψ2) > γ1 + γ2 + 2δ. (16) Proof: As before, since θP AQ ⪰0 we have the relationship (10), which implies that there must exist vectors ν1 = V ψ1 and ν2 = V ψ2 such that ψ⊤ 1 Qψ1 −ψ⊤ 1 Qψ2 −ψ⊤ 2 Qψ1 + ψ⊤ 2 Qψ2 = ∥ν1 −ν2∥2. Observe that the constraint (16) can then be equivalently expressed as 1 2∥ν1 −ν2∥2 > γ1 + γ2 + 2δ, (17) and observe that ∥ν1 −ν2∥2 = ∥ν1 −µ(x) + µ(x) −ν2∥2 = ∥ν1 −µ(x)∥2 + ∥µ(x) −ν2∥2 + 2⟨ν1 −µ(x), µ(x) −ν2⟩ (18) using µ(x) := Uφ(x) as before (which exists by (9)). Therefore ∥µ(x) −ν1∥2 + ∥µ(x) −ν2∥2 = ∥ν1 −ν2∥2 −2⟨ν1 −µ(x), µ(x) −ν2⟩ = ∥(ν1−µ(x))+(µ(x)−ν2)∥2 −2⟨ν1−µ(x), µ(x)−ν2⟩(19) ≥ 1 2∥(ν1 −µ(x)) + (µ(x) −ν2)∥2 (20) = 1 2∥ν1 −ν2∥2. (21) (To prove the inequality (20) observe that, since 0 ≤1 2∥a −b∥2, we must have ⟨a, b⟩≤1 2∥a∥2 + 1 2∥b∥2, hence 2⟨a, b⟩≤ 1 2∥a∥2 + 1 2∥b∥2 + ⟨a, b⟩= 1 2∥a + b∥2, which establishes −2⟨a, b⟩≥ −1 2∥a + b∥2. The inequality (20) then follows simply by setting a = ν1 −µ(x) and b = µ(x) −ν2.) Now combining (21) with the constraint (17) implies that ∥µ(x) −ν1∥2 + ∥µ(x) −ν2∥2 ≥ 1 2∥ν1 −ν2∥2 > γ1 + γ2 + 2δ, therefore one of ∥µ(x) −ν1∥2 > γ1 + δ or ∥µ(x) −ν2∥2 > γ2 + δ must hold, hence at least one of s1(x) < −δ or s2(x) < −δ must hold. Therefore, the mutual exclusion is enforced. ■ Importantly, once θP AQ ⪰0 is imposed, the other constraints in Theorems 3 and 4 are all linear in the parameters Q and γ. 4 Properties We now establish that the above constraints on the parameters in (8) achieve the desired properties. In particular, we show that given the constraints, inference can be removed both from the prediction problem (4) and from structured large margin training (3). 4.1 Prediction Equivalence First note that the decision of whether a label yk is associated with x can be determined by s(x, yk = 1) > s(x, yk = 0) ⇔ max yk∈{0,1} yksk(x) > 0 ⇔ 1 = arg max yk∈{0,1} yksk(x). (22) Consider joint assignments y = (y1, ..., yl) ∈{0, 1}l and let Y denote the set of joint assignments that are consistent with a set of implication and mutual exclusion constraints. (It is assumed the constraints are satisfiable; that is, Y is not the empty set.) Then the optimal joint assignment for a given x can be specified by arg maxy∈Y Pl k=1 yksk(x). 5 Proposition 5 If the constraint set Y imposes the constraints in (5) and (6) (and is nonempty), and the score function s satisfies the corresponding constraints for some δ > 0, then max y∈Y l X k=1 yksk(x) = l X k=1 max yk yksk(x) (23) Proof: First observe that max y∈Y l X k=1 yksk(x) ≤ max y l X k=1 yksk(x) = l X k=1 max yk yksk(x) (24) so making local classifications for each label gives an upper bound. However, if the score function satisfies the constraints, then the concatenation of the local label decisions y = (y1, ..., yl) must be jointly feasible; that is, y ∈Y. In particular, for the implication y1 ⇒y2 the score constraint (5) ensures that if s1(x) > 0 ≥−δ (implying 1 = arg maxy1 y1s1(x)) then it must follow that s2(x) ≥δ, hence s2(x) > 0 (implying 1 = arg maxy2 y2s2(x)). Similarly, for the mutual exclusion ¬y1 ∨¬y2 the score constraint (6) ensures min(s1(x), s2(x)) < −δ ≤0, hence if s1(x) > 0 ≥−δ (implying 1 = arg maxy1 y1s1(x)) then it must follow that s2(x) < −δ ≤0 (implying 0 = arg maxy2 y2s2(x)), and vice versa. Therefore, since the maximizer y of (24) is feasible, we actually have that the leftmost term in (24) is equal to the rightmost. ■ Since the feasible set Y embodies non-trivial constraints over assignment vectors in (23), interchanging maximization with summation is not normally justified. However, Proposition 5 establishes that, if the score model also satisfies its respective constraints (e.g., as established in the previous section), then maximization and summation can be interchanged, and inference over predicted labellings can be replaced by greedy componentwise labelling, while preserving equivalence. 4.2 Re-expressing Large Margin Structured Output Training Given a target joint assignment over labels t = (t1, ..., tl) ∈{0, 1}l, and using the score model (8), the standard structured output large margin training loss (3) can then be written as X i max y∈Y ∆(y, ti) + l X k=1 s(xi, yk) −s(xi, tik) = X i max y∈Y ∆(y, ti) + l X k=1 (yk −tik)sk(xi), (25) using the simplified score function representation such that tik denotes the k-th label of the i-th training example. If we furthermore make the standard assumption that ∆(y, ti) decomposes as ∆(y, ti) = Pl k=1 δk(yk, tik), the loss can be simplified to X i max y∈Y l X k=1 δk(yk, tik) + (yk −tik)sk(xi). (26) Note also that since yk ∈{0, 1} and tik ∈{0, 1} the margin functions δk typically have the form δk(0, 0) = δk(1, 1) = 0 and δk(0, 1) = δk01 and δk(1, 0) = δk10 for constants δk01 and δk10, which for simplicity we will assume are equal, δk01 = δk10 = δ for all k (although label specific margins might be possible). This is the same δ used in the constraints (5) and (6). The difficulty in computing this loss is that it apparently requires an exponential search over y. When this exponential search can be avoided, it is normally avoided by developing a dynamic program. Instead, we can now see that the search over y can be eliminated. Proposition 6 If the score function s satisfies the constraints in (5) and (6) for δ > 0, then X i max y∈Y l X k=1 δ(yk, tik) + (yk −tik)sk(xi) = X i l X k=1 max yk δ(yk, tik) + (yk −tik)sk(xi).(27) 6 Proof: For a given x and t ∈Y, let fk(y) = δ(y, tk) + (y −tk)sk(x), hence yk = arg maxy∈{0,1} fk(y). It is easy to show that 1 ∈arg max y∈{0,1} fk(y) ⇐⇒ sk(x) ≥tkδ −(1 −tk)δ, (28) which can be verified by checking the two cases, tk = 0 and tk = 1. When tk = 0 we have fk(0) = 0 and fk(1) = δ + s(x), therefore 1 = yk ∈arg maxy∈{0,1} fk(y) iff δ + s(x) ≥0. Similarly, when tk = 1 we have fk(0) = δ −s(x) and fk(1) = 0, therefore 1 = yk ∈arg maxy∈{0,1} fk(y) iff δ −s(x) ≤0. Combining these two conditions yields (28). Next, we verify that if the score constraints hold, then the logical constraints over y are automatically satisfied even by locally assigning yk, which implies the optimal joint assignment is feasible, i.e. y ∈Y, establishing the claim. In particular, for the implication y1 ⇒y2, it is assumed that t1 ⇒t2 in the target labeling and also that score constraints hold, ensuring s1(x) ≥−δ ⇒s2(x) ≥δ. Consider the cases over possible assignments to t1 and t2: If t1 = 0 and t2 = 0 then y1 = 1 ⇒f1(1) ≥f1(0) ⇒δ + s1(x) ≥0 ⇒s1(x) ≥−δ ⇒s2(x) ≥δ (by assumption) ⇒s2(x) ≥−δ ⇒δ + s2(x) ≥0 ⇒f2(1) ≥f2(0) ⇒y2 = 1. If t1 = 0 and t2 = 1 then y1 = 1 ⇒f1(1) ≥f1(0) ⇒δ + s1(x) ≥0 ⇒s1(x) ≥−δ ⇒s2(x) ≥δ (by assumption) ⇒0 ≥δ −s2(x) ⇒f2(1) ≥f2(0) ⇒y2 = 1 (tight case). The case t1 = 1 and t2 = 0 cannot happen by the assumption that t ∈Y. If t1 = 1 and t2 = 1 then y1 = 1 ⇒f1(1) ≥f1(0) ⇒0 ≥δ −s1(x) ⇒s1(x) ≥−δ ⇒s2(x) ≥δ (by assumption) ⇒0 ≥δ −s2(x) ⇒f2(1) ≥f2(0) ⇒y2 = 1. Similarly, for the mutual exclusion ¬y1 ∨¬y2, it is assumed that ¬t1 ∨¬t2 in the target labeling and also that the score constraints hold, ensuring min(s1(x), s2(x)) < −δ. Consider the cases over possible assignments to t1 and t2: If t1 = 0 and t2 = 0 then y1 = 1 and y2 = 1 implies that s1(x) ≥−δ and s2(x) ≥−δ, which contradicts the constraint that min(s1(x), s2(x)) < −δ (tight case). If t1 = 0 and t2 = 1 then y1 = 1 and y2 = 1 implies that s1(x) ≥−δ and s2(x) ≥δ, which contradicts the same constraint. If t1 = 1 and t2 = 0 then y1 = 1 and y2 = 1 implies that s1(x) ≥δ and s2(x) ≥−δ, which again contradicts the same constraint. The case t1 = 1 and t2 = 1 cannot happen by the assumption that t ∈Y. Therefore, since the concatenation, y, of the independent maximizers of (27) is feasible, i.e. y ∈Y, we have that the rightmost term in (27) equals the leftmost. ■ Similar to Section 4.1, Proposition 6 demonstrates that if the constraints (5) and (6) are satisfied by the score model s, then structured large margin training (3) reduces to independent labelwise training under the standard hinge loss, while preserving equivalence. 5 Efficient Implementation Even though Section 3 achieves the primary goal of demonstrating how desired label relationships can be embedded as convex constraints on score model parameters, the linear-quadratic representation (8) unfortunately does not allow convenient scaling: the number of parameters in θP AQ (8) is n+ℓ 2 (accounting for symmetry), which is quadratic in the number of features, n, in φ and the number of labels, ℓ. Such a large optimization variable is not practical for most applications, where n and ℓcan be quite large. The semidefinite constraint θP AQ ⪰0 can also be costly in practice. Therefore, to obtain scalable training we require some further refinement. In our experiments below we obtained a scalable training procudure by exploiting trace norm regularization on θP AQ to reduce its rank. The key benefit of trace norm regularization is that efficient solution methods exist that work with a low rank factorization of the matrix variable while automatically ensuring positive semidefiniteness and still guaranteeing global optimality [10, 14]. Therefore, we conducted the main optimization in terms of a smaller matrix variable B such that BB⊤= θP AQ. Second, to cope with the constraints, we employed an augmented Lagrangian method that increasingly penalizes constraint violations, but otherwise allows simple unconstrained optimization. All optimizations for smooth problems were performed using LBFGS and nonsmooth problems were solved using a bundle method [23]. 7 Dataset Features Labels Depth # Training # Testing Reference Enron 1001 57 4 988 660 [18] WIPO 74435 183 5 1352 358 [25] Reuters 47235 103 5 3000 3000 [20] Table 1: Data set properties % test error Enron WIPO Reuters unconstrained 12.4 21.0 27.1 constrained 9.8 2.6 4.0 inference 6.8 2.7 29.3 test time (s) Enron WIPO Reuters unconstrained 0.054 0.070 0.60 constrained 0.054 0.070 0.60 inference 0.481 0.389 5.20 Table 2: (left) test set prediction error (percent); (right) test set prediction time (s) 6 Experimental Evaluation To evaluate the proposed approach we conducted experiments on multilabel text classification data that has a natural hierarchy defined over the label set. In particular, we investigated three multilabel text classification data sets, Enron, WIPO and Reuters, obtained from https://sites. google.com/site/hrsvmproject/datasets-hier (see Table 1 for details). Some preprocessing was performed on the label relations to ensure consistency with our assumptions. In particular, all implications were added to each instance to ensure consistency with the hierarchy, while mutual exclusions were defined between siblings whenever this did not create a contradiction. We conducted experiments to compare the effects of replacing inference with the constraints outlined in Section 3, using the score model (8). For comparison, we trained using the structured large margin formulation (3), and trained under a multilabel prediction loss without inference, but both including then excluding the constraints. For the multilabel training loss we used the smoothed calibrated separation ranking loss proposed in [24]. In each case, the regularization parameter was simply set to 1. For inference, we implemented the inference algorithm outlined in [8]. The results are given in Table 2, showing both the test set prediction error (using labelwise prediction error, i.e. Hamming loss) and the test prediction times. As expected, one can see benefits from incorporating known relationships between the labels when training a predictor. In each case, the addition of constraints leads to a significant improvement in test prediction error, versus training without any constraints or inference added. Training with inference (i.e., classical structured large margin training) still proves to be an effective training method overall, in one case improving the results over the constrained approach, but in two other cases falling behind. The key difference between the approach using constraints versus that using inference is in terms of the time it takes to produce predictions on test examples. Using inference to make test set predictions clearly takes significantly longer than applying labelwise predictions from either a constrained or unconstrained model, as shown in the right subtable of Table 2. 7 Conclusion We have demonstrated a novel approach to structured multilabel prediction where inference is replaced with constraints on the score model. On multilabel text classification data, the proposed approach does appear to be able to achieve competitive generalization results, while reducing the time needed to make predictions at test time. In cases where logical relationships are known to hold between the labels, using either inference or imposing constraints on the score model appear to yield benefits over generic training approaches that ignore the prior knowledge. For future work we are investigating extensions of the proposed approach to more general structured output settings, by combining the method with search based prediction methods. Other interesting questions include exploiting learned label relations and coping with missing labels. 8 References [1] G. Bakir, T. Hofmann, B. Sch¨olkopf, A. Smola, B. Taskar, and S. Vishwanathan. Predicting Structured Data. MIT Press, 2007. [2] W. Bi and J. Kwok. Mandatory leaf node prediction in hierarchical multilabel classification. In Neural Information Processing Systems (NIPS), 2012. [3] M. Ciss´e, N. Usunier, T. Artieres, and P. Gallinari. Robust bloom filters for large multilabel classification tasks. In Proceedings of Advances in Neural Information Processing Systems (NIPS), 2013. [4] H. Daume and J. Langford. Search-based structured prediction. Machine Learning, 75:297–325, 2009. [5] K. Dembczy´nski, W. Cheng, and E. H¨ullermeier. Bayes optimal multilabel classification via probabilistic classifier chains. In Proceedings ICML, 2010. [6] K. Dembczy´nski, W. Waegeman, W. Cheng, and E. H¨ullermeier. On label dependence and loss minimization in multi-label classification. Machine Learning, 88(1):5–45, 2012. [7] J. Deng, A. Berg, K. Li, and F. Li. What does classifying more than 10,000 image categories tell us? In Proceedings of the European Conference on Computer Vision (ECCV), 2010. [8] J. Deng, N. Ding, Y. Jia, A. Frome, K. Murphy, S. Bengio, Y. Li, H. Neven, and H. Adam. Large-scale object classification using label relation graphs. In Proceedings ECCV, 2014. [9] Y. Guo and D. Schuurmans. Adaptive large margin training for multilabel classification. In AAAI, 2011. [10] B. Haeffele, R. Vidal, and E. Young. Structured low-rank matrix factorization: Optimality, algorithm, and applications to image processing. In International Conference on Machine Learning (ICML), 2014. [11] B. Hariharan, S.V.N. Vishwanathan, and M. Varma. Efficient max-margin multi-label classification with applications to zero-shot learning. Machine Learning, 88:127–155, 2012. [12] J. Jancsary, S. Nowozin, and C. Rother. Learning convex QP relaxations for structured prediction. In Proceedings of the International Conference on Machine Learning (ICML), 2013. [13] T. Joachims. Transductive inference for text classification using support vector machines. In ICML, 1999. [14] M. Journ´ee, F. Bach, P. Absil, and R. Sepulchre. Low-rank optimization on the cone of positive semidefinite matrices. SIAM Journal on Optimization, 20(5):2327–2351, 2010. [15] H. Kadri, M. Ghavamzadeh, and P. Preux. A generalized kernel approach to structured output learning. In Proceedings of the International Conference on Machine Learning (ICML), 2013. [16] A. Kae, K. Sohn, H. Lee, and E. Learned-Miller. Augmenting CRFs with Boltzmann machine shape priors for image labeling. In Proceedings CVPR, 2013. [17] A. Kapoor, P. Jain, and R. Vishwanathan. Multilabel classification using Bayesian compressed sensing. In Proceedings of Advances in Neural Information Processing Systems (NIPS), 2012. [18] B. Klimt and Y. Yang. The Enron corpus: A new dataset for email classification. In ECML, 2004. [19] J. Lafferty, A. McCallum, and F. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In International Conference on Machine Learning (ICML), 2001. [20] D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [21] Q. Li, J. Wang, D. Wipf, and Z. Tu. Fixed-point model for structured prediction. In Proceedings of the International Conference on Machine Learning (ICML), 2013. [22] Z. Lin, G. Ding, M. Hu, and J. Wang. Multi-label classification via feature-aware implicit label space encoding. In Proceedings of the International Conference on Machine Learning (ICML), 2014. [23] M. M¨akel¨a. Multiobjective proximal bundle method for nonconvex nonsmooth optimization: Fortran subroutine MPBNGC 2.0. Technical report, U. of Jyv¨askyk¨a, 2003. [24] F. Mirzazadeh, Y. Guo, and D. Schuurmans. Convex co-embedding. In Proceedings AAAI, 2014. [25] J. Rousu, C. Saunders, S. Szedmak, and J. Shawe-Taylor. Kernel-based learning of hierarchical multilabel classification models. Journal of Machine Learning Research, 7:1601–1626, 2006. [26] V. Srikumar and C. Manning. Learning distributed representations for structured output prediction. In Proceedings of Advances in Neural Information Processing Systems (NIPS), 2014. [27] X. Sun. Structure regularization for structured prediction. In Proceedings NIPS, 2014. [28] B. Taskar. Learning structured prediction models: A large margin approach. PhD thesis, Stanford, 2004. [29] I. Tsochantaridis, T. Hofmann, T. Joachims, and Y. Altun. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6:1453–1484, 2005. [30] G. Tsoumakas, I. Katakis, and I. Vlahavas. Mining multi-label data. In Data Mining and Knowledge Discovery Handbook, 2nd edition. Springer, 2009. [31] K. Weinberger and O. Chapelle. Large margin taxonomy embedding for document categorization. In Neural Information Processing Systems (NIPS), 2008. [32] J. Weston, S. Bengio, and N. Usunier. WSABIE: scaling up to large vocabulary image annotation. In International Joint Conference on Artificial Intelligence (IJCAI), 2011. 9 | 2015 | 334 |
5,852 | Spectral Learning of Large Structured HMMs for Comparative Epigenomics Chicheng Zhang UC San Diego chz038@eng.ucsd.edu Jimin Song Rutgers University song@dls.rutgers.edu Kevin C Chen Rutgers University kcchen@dls.rutgers.edu Kamalika Chaudhuri UC San Diego kamalika@eng.ucsd.edu Abstract We develop a latent variable model and an efficient spectral algorithm motivated by the recent emergence of very large data sets of chromatin marks from multiple human cell types. A natural model for chromatin data in one cell type is a Hidden Markov Model (HMM); we model the relationship between multiple cell types by connecting their hidden states by a fixed tree of known structure. The main challenge with learning parameters of such models is that iterative methods such as EM are very slow, while naive spectral methods result in time and space complexity exponential in the number of cell types. We exploit properties of the tree structure of the hidden states to provide spectral algorithms that are more computationally efficient for current biological datasets. We provide sample complexity bounds for our algorithm and evaluate it experimentally on biological data from nine human cell types. Finally, we show that beyond our specific model, some of our algorithmic ideas can be applied to other graphical models. 1 Introduction In this paper, we develop a latent variable model and efficient spectral algorithm motivated by the recent emergence of very large data sets of chromatin marks from multiple human cell types [7, 9]. Chromatin marks are chemical modifications on the genome which are important in many basic biological processes. After standard preprocessing steps, the data consists of a binary vector (one bit for each chromatin mark) for each position in the genome and for each cell type. A natural model for chromatin data in one cell type is a Hidden Markov Model (HMM) [8, 13], for which efficient spectral algorithms are known. On biological data sets, spectral algorithms have been shown to have several practical advantages over maximum likelihood-based methods, including speed, prediction accuracy and biological interpretability [24]. Here we extend the approach by modeling multiple cell types together. We model the relationships between cell types by connecting their hidden states by a fixed tree, the standard model in biology for relationships between cell types. This comparative approach leverages the information shared between the different data sets in a statistically unified and biologically motivated manner. Formally, our model is an HMM where the hidden state zt at time t has a structure represented by a tree graphical model of known structure. For each tree node u we can associate an individual hidden state zu t that depends not only on the previous hidden state zu t−1 for the same tree node u but also on the individual hidden state of its parent node. Additionally, there is an observation variable xu t for each node u, and the observation xu t is independent of other state and observation variables 1 conditioned on the hidden state variable zu t . In the bioinformatics literature, [5] studied this model with the additional constraint that all tree nodes share the same emission parameters. In biological applications, the main outputs of interest are the learned observation matrices of the HMM and a segmentation of the genome into regions which can be used for further studies. A standard approach to unsupervised learning of HMMs is the Expectation-Maximization (EM) algorithm. When applied to HMMs with very large state spaces, EM is very slow. A recent line of work on spectral learning [18, 1, 23, 6] has produced much more computationally efficient algorithms for learning many graphical models under certain mild conditions, including HMMs. However, a naive application of these algorithms to HMMs with large state spaces results in computational complexity exponential in the size of the underlying tree. Here we exploit properties of the tree structure of the hidden states to provide spectral algorithms that are more computationally efficient for current biological datasets. This is achieved by three novel key ideas. Our first key idea is to show that we can treat each root-to-leaf path in the tree separately and learn its parameters using tensor decomposition methods. This step improves the running time because our trees typically have very low depth. Our second key idea is a novel tensor symmetrization technique that we call Skeletensor construction where we avoid constructing the full tensor over the entire root-to-leaf path. Instead we use carefully designed symmetrization matrices to reveal its range in a Skeletensor which has dimension equal to that of a single tree node. The third and final key idea is called Product Projections, where we exploit the independence of the emission matrices along the root-to-leaf path conditioned on the hidden states to avoid constructing the full tensors and instead construct compressed versions of the tensors of dimension equal to the number of hidden states, not the number of observations. Beyond our specific model, we also show that Product Projections can be applied to other graphical models and thus we contribute a general tool for developing efficient spectral algorithms. Finally we implement our algorithm and evaluate it on biological data from nine human cell types [7]. We compare our results with the results of [5] who used a variational EM approach. We also compare with spectral algorithms for learning HMMs for each cell type individually to assess the value of the tree model. 1.1 Related Work The first efficient spectral algorithm for learning HMM parameters was due to [18]. There has been an explosion of follow-up work on spectral algorithms for learning the parameters and structure of latent variable models [23, 6, 4]. [18] gives a spectral algorithm for learning an observable operator representation of an HMM under certain rank conditions. [23] and [3] extend this algorithm to the case when the transition matrix and the observation matrix respectively are rank-deficient. [19] extends [18] to Hidden Semi-Markov Models. [2] gives a general spectral algorithm for learning parameters of latent variable models that have a multi-view structure – there is a hidden node and three or more observable nodes that are not connected to any other nodes and are independent conditioned on the hidden node. Many latent variable models have this structure, including HMMs, tree graphical models, topic models and mixture models. [1] provides a simpler, more robust algorithm that involves decomposing a third order tensor. [21, 22, 25] provide algorithms for learning latent trees and of latent junction trees. Several algorithms have been designed for learning HMM parameters for chromatin modeling, including stochastic variational inference [16] and contrastive learning of two HMMs [26]. However, none of these methods extend directly to modeling multiple chromatin sequences simultaneously. 2 The Model Probabilistic Model. The natural probabilistic model for a single epigenomic sequence is a hidden Markov model (HMM), where time corresponds to position in the sequence. The observation at time t is the sequence value at position t, and the hidden state at t is the regulatory function in this position. 2 Figure 1: Left: A tree T with 3 nodes V = {r, u, v}. Right: A HMM whose hidden state has structure T. In comparative epigenomics, the goal is to jointly model epigenomic sequences from multiple species or cell-types. This is done by an HMM with a tree-structured hidden state [5](THS-HMM),1 where each node in the tree representing the hidden state has a corresponding observation node. Formally, we represent the model by a tuple H = (G, O, T , W); Figure 1 shows a pictorial representation. G = (V, E) is a directed tree with known structure whose nodes represent individual cell-types or species. The hidden state zt and the observation xt are represented by vectors {zu t } and {xu t } indexed by nodes u ∈V . If (v, u) ∈E, then v is the parent of u, denoted by π(u); if v is a parent of u, then for all t, zv t is a parent of zu t . In addition, the observations have the following product structure: if u = u, then conditioned on zu t , the observation xu t is independent of zu t and xu t as well as any zu t and xu t for t = t. O is a set of observation matrices Ou = P(xu t |zu t ) for each u ∈V and T is a set of transition tensors T u = P(zu t+1|zu t , zπ(u) t+1 ) for each u ∈V . Finally, W is the set of initial distributions where W u = P(zu 1 |zπ(u) 1 ) for each zu 1 . Given a tree structure and a number of iid observation sequences corresponding to each node of the tree, our goal is to determine the parameters of the underlying THS-HMM and then use these parameters to infer the most likely regulatory function at each position in the sequences. Below we use the notation D to denote the number of nodes in the tree and d to denote its depth. For typical epigenomic datasets, D is small to moderate (5-50) while d is very small (2 or 3) as it is difficult to obtain data with large d experimentally. Typically m, the number of possible values assumed by the hidden state at a single node, is about 6-25, while n, the number of possible observation values assumed by a single node is much larger (e.g. 256 in our dataset). Tensors. An order-3 tensor M ∈Rn1 ⊗Rn2 ⊗Rn3 is a 3-dimensional array with n1n2n3 entries, with its (i1, i2, i3)-th entry denoted as Mi1,i2,i3. Given ni ×1 vectors vi, i = 1, 2, 3, their tensor product, denoted by v1 ⊗v2 ⊗v3 is the n1 ×n2 ×n3 tensor whose (i1, i2, i3)-th entry is (v1)i1(v2)i2(v3)i3. A tensor that can be expressed as the tensor product of a set of vectors is called a rank 1 tensor. A tensor M is symmetric if and only if for any permutation π : [3] →[3], Mi1,i2,i3 = Mπ(i1),π(i2),π(i3). Let M ∈Rn1 ⊗Rn2 ⊗Rn3. If Vi ∈Rni×mi, then M(V1, V2, V3) is a tensor of size m1 ×m2 ×m3, whose (i1, i2, i3)-th entry is: M(V1, V2, V3)i1,i2,i3 = j1,j2,j3 Mj1,j2,j3(V1)j1,i1(V2)j2,i2(V3)j3,i3. Since a matrix is a order-2 tensor, we also use the following shorthand to denote matrix multiplication. Let M ∈Rn1 ⊗Rn2. If Vi ∈Rmi×ni, then M(V1, V2) is a matrix of size m1 × m2, whose (i1, i2)-th entry is: M(V1, V2)i1,i2 = j1,j2 Mj1,j2(V1)j1,i1(V2)j2,i2. This is equivalent to V 1 MV2. 1In the bioinformatics literature, this model is also known as a tree HMM. 3 Meta-States and Observations, Co-occurrence Matrices and Tensors. Given observations xu t and xu t at a single node u, we use the notation P u t,t to denote their expected co-occurence frequencies: P u,u t,t = E[xu t ⊗xu t], and ˆP u,u t,t to denote their corresponding empirical version. The tensor P u,u,u t,t,t = E[xu t ⊗xu t ⊗xu t] and its empirical version ˆP u,u,u t,t,t are defined similarly. Occasionally, we will consider the states or observations corresponding to a subset of nodes in G coalesced into a single meta-state or meta-observation. Given a connected subset S ⊆V of nodes in the tree G that includes the root, we use the notation zS t and xS t to denote the meta-state represented by (zu t , u ∈S) and the meta-observation represented by (xu t , u ∈S) respectively. We define the observation matrix for S as OS = P(xS t |zS t ) ∈Rn|S|×m|S| and the transition matrix for S as T S = P(zS t+1|zS t ) ∈Rm|S|×m|S|, respectively. For sets of nodes V1 and V2, we use the notation P V1,V2 t,t to denote the expected co-occurrence frequencies of the meta-observations xV1 t and xV2 t . Its empirical version is denoted by ˆP V1,V2 t,t . Similarly, we can define the notation P V1,V2,V3 t,t,t and its empirical version ˆP V1,V2,V3 t,t,t . Background on Spectral Learning for Latent Variable Models. Recent work by [1] has provided a novel elegant tensor decomposition method for learning latent variable models. Applied to HMMs, the main idea is to decompose a transformed version of the third order co-occurrence tensor of the first three observations to recover the parameters; [1] shows that given enough samples and under fairly mild conditions on the model, this provides an approximation to the globally optimal solution. The algorithm has three main steps. First, the third order tensor of the co-occurrences is symmetrized using the second order co-occurrence matrices to yield a symmetric tensor; this symmetric tensor is then orthogonalized by a whitening transformation. Finally, the resultant symmetric orthogonal tensor is decomposed via the tensor power method. In biological applications, instead of multiple independent sequences, we have a single long sequence in the steady state. In this case, following ideas from [23], we use the average over t of the third order co-occurence tensors of three consecutive observations starting at time t. The second order co-occurence tensor is also modified similarly. 3 Algorithm A naive approach for learning parameters of HMMs with tree-structured hidden states is to directly apply the spectral method of [1]. Since this method ignores the structure of the hidden state, its running time is very high, Ω(nDmD), even with optimized implementations. This motivates the design of more computationally efficient approaches. A plausible approach is to observe that at t = 1, the observations are generated by a tree graphical model; thus in principle one could learn the parameters of the underlying tree using existing algorithms [22, 21, 25]. However, this approach does not directly produce the HMM parameters; it also does not work for biological sequences because we do not have multiple independent samples at t = 1; instead we have a single long sequence at the steady state, and the steady state distribution of observations is not generated by a latent tree. Another plausible approach is to use the spectral junction tree algorithm of [25]; however, this algorithm does not provide the actual transition and observation matrix parameters which hold important biological information, and instead provides an observable operator representation. Our main contribution is to show that we can achieve a much better running time by exploiting the structure of the hidden state. Our algorithm is based on three key ideas – Partitioning, Skeletensor Construction and Product Projections. We explain these ideas next. Partitioning. Our first observation is that to learn the parameters at a node u, we can focus only on the unique path from the root to u. Thus we partition the learning problem on the tree into separate learning problems on these paths. This maintains correctness as proved in the Appendix. The Partitioning step reduces the computational complexity since we now need to learn an HMM with md states and nd observations, instead of the naive method where we learn an HMM with mD states and nD observations. As d D in biological data, this gives us significant savings. 4 Constructing the Skeletensor. A naive way to learn the parameters of the HMM corresponding to each root-to-node path is to work directly on the O(nd × nd × nd) co-occurrence tensor. Instead, we show that for each node u on a root-to-node path, a novel symmetrization method can be used to construct a much smaller skeleton tensor T u of size n × n × n, which nevertheless captures the effect of the entire root-to-node path and projects it into the skeleton tensor, thus revealing the range of Ou. We call this the skeletensor. Let Hu be the path from the root to a node u, and let ˆP Hu,u,Hu 1,2,3 be the empirical n|Hu| × n × n|Hu| tensor of co-occurrences of the meta-observations Hu, u and Hu at times 1, 2 and 3 respectively. Based on the data we construct the following symmetrization matrices: S1 ∼ˆP u,Hu 2,3 ( ˆP Hu,Hu 1,3 )†, S3 ∼ˆP u,Hu 2,1 ( ˆP Hu,Hu 3,1 )† Note that S1 and S3 are n × n|Hu| matrices. Symmetrizing ˆP Hu,u,Hu 1,2,3 with S1 and S3 gives us an n × n × n skeletensor, which can in turn be decomposed to give an estimate of Ou (see Lemma 3 in the Appendix). Even though naively constructing the symmetrization matrices and skeletensor takes O(Nn2d+1 + n3d) time, this procedure improves computational efficiency because tensor construction is a onetime operation, while the power method which takes many iterations is carried out on a much smaller tensor. Product Projections. We further reduce the computational complexity by using a novel algorithmic technique that we call Product Projections. The key observation is as follows. Let Hu = {u0, u1, . . . , ud−1} be any root-to-node path in the tree and consider the HMM that generates the observations (xu0 t , xu1 t , . . . , xud−1 t ) for t = 1, 2, . . .. Even though the individual observations xuj t , j = 0, 1, . . . , d −1 are highly dependent, the range of OHu, the emission matrix of the HMM describing the path Hu, is contained in the product of the ranges of Ouj, where Ouj is the emission matrix at node uj (Lemma 4 in the Appendix). Furthermore, even though the Ouj matrices are difficult to find, their ranges can be determined by computing the SVDs of the observation co-occurrence matrices at uj. Thus we can implicitly construct and store (an estimate of) the range of OHu. This also gives us estimates of the range of ˆP Hu,Hu 1,3 , the column spaces of ˆP u,Hu 2,1 and ˆP u,Hu 2,3 , and the range of the first and third modes of the tensor ˆP Hu,u,Hu 1,2,3 . Therefore during skeletensor construction we can avoid explicitly constructing S1, S3 and ˆP Hu,u,Hu 1,2,3 , and instead construct their projections onto their ranges. This reduces the time complexity of the skeletensor construction step to O(Nm2d+1 + m3d + dmn2) (recall that the range has dimension m.) While the number of hidden states m could be as high as n, this is a significant gain in practice, as n m in biological datasets (e.g. 256 observations vs. 6 hidden states). Product projections are more efficient than random projections [17] on the co-occurrence matrix of meta-observations: the co-occurrence matrices are nd × nd matrices, and random projections would take Ω(nd) time. Also, product projections differ from the suggestion of [15] since we exploit properties of the model to efficiently find good projections. The Product Projections technique is a general technique with applications beyond our model. Some examples are provided in Appendix C.3. 3.1 The Full Algorithm Our final algorithm follows from combining the three key ideas above. Algorithm 1 shows how to recover the observation matrices Ou at each node u. Once the Ous are recovered, one can use standard techniques to recover T and W; details are described in Algorithm 2 in the Appendix. 3.2 Performance Guarantees We now provide performance guarantees on our algorithm. Since learning parameters of HMMs and many other graphical models is NP-Hard, spectral algorithms make simplifying assumptions on the properties of the model generating the data. Typically these assumptions take the form of some 5 Algorithm 1 Algorithm for Observation Matrix Recovery 1: Input: N samples of the three consecutive observations (x1, x2, x3)N i=1 generated by an HMM with tree structured hidden state with known tree structure. 2: for u ∈V do 3: Perform SVD on ˆP u,u 1,2 to get the first m left singular vectors ˆU u. 4: end for 5: for u ∈V do 6: Let Hu denote the set of nodes on the unique path from root r to u. Let ˆU Hu = ⊗v∈Hu ˆU v. 7: Construct Projected Skeletensor. First, compute symmetrization matrices: ˆSu 1 = (( ˆU u) ˆP u,Hu 2,3 ˆU Hu)(( ˆU Hu) ˆP Hu,Hu 1,3 ˆU Hu)−1 ˆSu 3 = (( ˆU u) ˆP u,Hu 2,1 ˆU Hu)(( ˆU Hu) ˆP Hu,Hu 3,1 ˆU Hu)−1 8: Compute symmetrized second and third co-occurrences for u: ˆ M u 2 = ( ˆP Hu,u 1,2 ( ˆU Hu( ˆSu 1 ), ˆU u) + ˆP Hu,u 1,2 ( ˆU Hu( ˆSu 1 ), ˆU u))/2 ˆ M u 3 = ˆP Hu,u,Hu 1,2,3 ( ˆU Hu( ˆSu 1 ), ˆU u, ˆU Hu( ˆSu 3 )) 9: Orthogonalization and Tensor Decomposition. Orthogonalize ˆ M u 3 using ˆ M u 2 and decompose to recover (ˆθu 1 , . . . , ˆθu m) as in [1] (See Algorithm 3 in the Appendix for details). 10: Undo Projection onto Range. Estimate Ou as: ˆOu = ˆU u ˆΘu, where ˆΘu = (ˆθu 1 , . . . , ˆθu m). 11: end for conditions on the rank of certain parameter matrices. We state below the conditions needed for our algorithm to successfully learn parameters of a HMM with tree structured hidden states. Observe that we need two kinds of rank conditions – node-wise and path-wise – to ensure that we can recover the full set of parameters on a root-to-node path. Assumption 1 (Node-wise Rank Condition). For all u ∈V , the matrix Ou has rank m, and the joint probability matrix P u,u 2,1 has rank m. Assumption 2 (Path-wise Rank Condition). For any u ∈V , let Hu denote the path from root to u. Then, the joint probability matrix P Hu,Hu 1,2 has rank m|Hu|. Assumption 1 is required to ensure that the skeletensor can be decomposed, and that ˆU u indeed captures the range of Ou. Assumption 2 ensures that the symmetrization operation succeeds. This kind of assumption is very standard in spectral learning [18, 1]. [3] has provided a spectral algorithm for learning HMMs involving fourth and higher order moments when Assumption 1 does not hold. We believe similar approaches will apply to our problem as well, and we leave this as an avenue for future work. If Assumptions 1 and 2 hold, we can show that Algorithm 1 is consistent – provided enough samples are available, the model parameters learnt by the algorithms are close to the true model parameters. A finite sample guarantee is provided in the Appendix. Theorem 1 (Consistency). Suppose we run Algorithm 1 on the first three observation vectors {xi,1, xi,2, xi,3} from N iid sequences generated by an HMM with tree-structured hidden states. Then, for all nodes u ∈V , the recovered estimates ˆOu satisfy the following property: with high probability over the iid samples, there exists a permutation Πu of the columns of ˆOu such that as Ou −Πu ˆOu ≤ε(N) where ε(N) →0 as N →∞. Observe that the observation matrices (as well as the transition and initial probabilities) are recovered upto permutations of hidden states in a globally consistent manner. 6 4 Experiments Data and experimental settings. We ran our algorithm, which we call “Spectacle-Tree”, on a chromatin dataset on human chromosome 1 from nine cell types (H1-hESC, GM12878, HepG2, HMEC, HSMM, HUVEC, K562, NHEK, NHLF) from the ENCODE project [7]. Following [5], we used a biologically motivated tree structure of a star tree with H1-hESC, the embryonic stem cell type, as the root. There are data for eight chromatin marks for each cell type which we preprocessed into binary vectors using a standard Poisson background assumption [11]. The chromosome is divided into 1,246,253 segments of length 200, following [11]. The observed data consists of a binary vector of length eight for each segment, so the number of possible observations is the number of all combinations of presence or absence of the chromatin marks (i.e. n = 28 = 256). We set the number of hidden states, which we interpret as chromatin states, to m = 6, similar to the choice of ENCODE. Our goals are to discover chromatin states corresponding to biologically important functional elements such as promoters and enhancers, and to label each chromosome segment with the most probable chromatin state. Observe that instead of the first few observations from N iid sequences, we have a single long sequence in the steady state per cell type; thus, similar to [23], we calculate the empirical cooccurrence matrices and tensors used in the algorithm based on two and three successive observations respectively (so, more formally, instead of ˆP1,2, we use the average over t of ˆPt,t+1 and so on). Additionally, we use a projection procedure similar to [4] for rounding negative entries in the recovered observation matrices. Our experiments reveal that the rank conditions appear to be satisfied for our dataset. Run time and memory usage comparisons. First, we flattened the HMM with tree-structured hidden states into an ordinary HMM with an exponentially larger state space. Our Python implementation of the spectral algorithm for HMMs of [18] ran out of memory while performing singular value decomposition on the co-occurence matrix, even using sparse matrix libraries. This suggests that naive application of spectral HMM is not practical for biological data. Next we compared the performance of Spectacle-Tree to a similar model which additionally constrained all transition and observation parameters to be the same on each branch [5]. That work used several variational approximations to the EM algorithm and reported that SMF (structured mean field) performed the best in their tests. Although we implemented Spectacle-Tree in Matlab and did not optimize it for run-time efficiency, Spectacle-Tree took ∼2 hr, whereas the SMF algorithm took ∼13 hr for 13 iterations to convergence. This suggests that spectral algorithms may be much faster than variational EM for our model. Biological interpretation of the observation matrices. Having examined the efficiency of Spectacle-Tree, we next studied the accuracy of the learned parameters. We focused on the observation matrices which hold most of the interesting biological information. Since the full observation matrix is very large (28 × 6 where each row is a combination of chromatin marks), Figure 2 shows the 8×6 marginal distribution of each chromatin mark conditioned on each hidden state. SpectacleTree identified most of the major types of functional elements typically discovered from chromatin data: repressive, strong enhancer, weak enhancer, promoter, transcribed region and background state (states 1-6, respectively, in Figure 2b). In contrast, the SMF algorithm used three out of the six states to model the large background state (i.e. the state with no chromatin marks). It identified repressive, transcribed and promoter states (states 2, 4, 5, respectively, in Figure 2a) but did not identify any enhancer states, which are one of the most interesting classes for further biological studies. We believe these results are due to that fact that the background state in the data set is large: ∼62% of the segments do not have chromatin marks for any cell type. The background state has lower biological interest but is modeled well by the maximum likelihood approach. In contast, biologically interesting states such as promoters and enhancers comprise a relatively small fraction of the genome. We cannot simply remove background segments to make the classes balanced because it would change the length distribution of the hidden states. Finally, we observed that our model estimated significantly different parameters for each cell type which captures different chromatin states (Appendix Figure 3). For example, we found enhancer states with strong H3K27ac in all cell types except for H1-hESC, where both enhancer states (3 and 6) had low signal for this mark. This mark is known to be biologically important in these cells for distinguishing active from poised enhancers 7 (a) SMF (b) Spectacle-Tree Figure 2: The compressed observation matrices for the GM12878 cell type estimated by the SMF and Spectacle-Tree algorithms. The hidden states are on the X axis. [10]. This suggests that modeling the additional branch-specific parameters can yield interesting biological insights. Comparison of the chromosome segments labels. We computed the most probable state for each chromosome segment using a posterior decoding algorithm. We tested the accuracy of the predictions using an experimentally defined data set and compared it to SMF and the spectral algorithm for HMMs run for individual cell types without the tree (Spectral-HMM). Specifically we assessed promoter prediction accuracy (state 5 for SMF and state 4 for Spectacle-Tree in Figure 2) using CAGE data from [14] which was available for six of the nine cell types. We used the F1 score (harmonic mean of precision and recall) for comparison and found that Spectacle-Tree was much more accurate than SMF for all six cell types (Table 1). This was because the promoter predictions of SMF were biased towards the background state so those predictions had slightly higher recall but much lower specificity. Finally, we compared our predictions to Spectral-HMM to assess the value of the tree model. H1hESC is the root node so Spectral-HMM and Spectacle-Tree have the same model and obtain the same accuracy (Table 1). Spectacle-Tree predicts promoters more accurately than Spectral-HMM for all other cell types except HepG2. However, HepG2 is the most diverged from the root among the cell types based on the Hamming distance between the chromatin marks. We hypothesize that for HepG2, the tree is not a good model which slightly reduces the prediction accuracy. Cell type SMF Spectral-HMM Spectacle-Tree H1-hESC .0273 .1930 .1930 GM12878 .0220 .1230 .1703 HepG2 .0274 .1022 .0993 HUVEC .0275 .1221 .1621 K562 .0255 .0964 .1966 NHEK .0287 .1528 .1719 Table 1: F1 score for predicting promoters for six cell types. The highest F1 score for each cell type is emphasized in bold. Ground-truth labels for the other 3 cell-types are currently unavailable. Our experiments show that Spectacle-Tree has improved computational efficiency, biological interpretability and prediction accuracy on an experimentally-defined feature compared to variational EM for a similar tree HMM model and a spectral algorithm for single HMMs. A previous study showed improvements for spectral learning of single HMMs over the EM algorithm [24]. Thus our algorithms may be useful to the bioinformatics community in analyzing the large-scale chromatin data sets currently being produced. Acknowledgements. KC and CZ thank NSF under IIS 1162581 for research support. 8 References [1] Anima Anandkumar, Rong Ge, Daniel Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. CoRR, abs/1210.7559, 2012. [2] Animashree Anandkumar, Daniel Hsu, and Sham M. Kakade. A method of moments for mixture models and hidden Markov models. CoRR, abs/1203.0683, 2012. [3] B. Balle, X. Carreras, F. Luque, and A. Quattoni. Spectral learning of weighted automata - A forward-backward perspective. Machine Learning, 96(1-2), 2014. [4] B. Balle, W. L. Hamilton, and J. Pineau. Methods of moments for learning stochastic languages: Unified presentation and empirical comparison. In ICML, pages 1386–1394, 2014. [5] Jacob Biesinger, Yuanfeng Wang, and Xiaohui Xie. Discovering and mapping chromatin states using a tree hidden Markov model. BMC Bioinformatics, 14(Suppl 5):S4, 2013. [6] A. Chaganty and P. Liang. Estimating latent-variable graphical models using moments and likelihoods. In ICML, 2014. [7] ENCODE Project Consortium. An integrated encyclopedia of DNA elements in the human genome. Nature, 489:57–74, 2012. [8] Jason Ernst and Manolis Kellis. Discovery and characterization of chromatin states for systematic annotation of the human genome. Nature Biotechnology, 28(8):817–825, 2010. [9] Bernstein et. al. The NIH Roadmap Epigenomics Mapping Consortium. Nature Biotechnology, 28:1045–1048, 2010. [10] Creyghton et. al. Histone H3K27ac separates active from poised enhancers and predicts developmental state. Proc Natl Acad Sci, 107(50):21931–21936, 2010. [11] Ernst et. al. Mapping and analysis of chromatin state dynamics in nine human cell types. Nature, 473:43–49, 2011. [12] Jun Zhu et al. Characterizing dynamic changes in the human blood transcriptional network. PLoS Comput Biol, 6:e1000671, 2010. [13] M. Hoffman et al. Unsupervised pattern discovery in human chromatin structure through genomic segmentation. Nature Methods, 9(5):473–476, 2012. [14] S. Djebali et al. Landscape of transcription in human cells. Nature, 2012. [15] D. Foster, J. Rodu, and L. Ungar. Spectral dimensionality reduction for HMMs. In CoRR, 2012. [16] N. Foti, J. Xu, D. Laird, and E. Fox. Stochastic variational inference for hidden markov models. In NIPS, 2014. [17] N. Halko, P. Martinsson, and J. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53, 2011. [18] D. Hsu, S. Kakade, and T. Zhang. A spectral algorithm for learning hidden Markov models. In COLT, 2009. [19] I. Melnyk and A. Banerjee. A spectral algorithm for inference in hidden semi-Markov models. In AISTATS, 2015. [20] E. Mossel and S Roch. Learning non-singular phylogenies and hidden Markov models. Ann. Appl. Probab., 16(2), 05 2006. [21] A. Parikh, L. Song, and E. P. Xing. A spectral algorithm for latent tree graphical models. In ICML, pages 1065–1072, 2011. [22] A. P. Parikh, L. Song, M. Ishteva, G. Teodoru, and E. P. Xing. A spectral algorithm for latent junction trees. In UAI, 2012. [23] S. Siddiqi, B. Boots, and G. Gordon. Reduced-rank hidden Markov models. In AISTATS, 2010. [24] J. Song and K. C. Chen. Spectacle: fast chromatin state annotation using spectral learning. Genome Biology, 16:33, 2015. [25] L. Song, M. Ishteva, A. P. Parikh, E. P. Xing, and H. Park. Hierarchical tensor decomposition of latent tree graphical models. In ICML, 2013. [26] J. Zou, D. Hsu, D. Parkes, and R. Adams. Contrastive learning using spectral methods. In NIPS, 2013. 9 | 2015 | 335 |
5,853 | Deeply Learning the Messages in Message Passing Inference Guosheng Lin, Chunhua Shen, Ian Reid, Anton van den Hengel The University of Adelaide, Australia; and Australian Centre for Robotic Vision E-mail: {guosheng.lin,chunhua.shen,ian.reid,anton.vandenhengel}@adelaide.edu.au Abstract Deep structured output learning shows great promise in tasks like semantic image segmentation. We proffer a new, efficient deep structured model learning scheme, in which we show how deep Convolutional Neural Networks (CNNs) can be used to directly estimate the messages in message passing inference for structured prediction with Conditional Random Fields (CRFs). With such CNN message estimators, we obviate the need to learn or evaluate potential functions for message calculation. This confers significant efficiency for learning, since otherwise when performing structured learning for a CRF with CNN potentials it is necessary to undertake expensive inference for every stochastic gradient iteration. The network output dimension of message estimators is the same as the number of classes, rather than exponentially growing in the order of the potentials. Hence it is more scalable for cases that involve a large number of classes. We apply our method to semantic image segmentation and achieve impressive performance, which demonstrates the effectiveness and usefulness of our CNN message learning method. 1 Introduction Learning deep structured models has attracted considerable research attention recently. One popular approach to deep structured model is formulating conditional random fields (CRFs) using deep Convolutional Neural Networks (CNNs) for the potential functions. This combines the power of CNNs for feature representation learning and of the ability for CRFs to model complex relations. The typical approach for the joint learning of CRFs and CNNs [1, 2, 3, 4, 5], is to learn the CNN potential functions by optimizing the CRF objective, e.g., maximizing the log-likelihood. The CNN and CRF joint learning has shown impressive performance for semantic image segmentation. For the joint learning of CNNs and CRFs, stochastic gradient descent (SGD) is typically applied for optimizing the conditional likelihood. This approach requires the marginal inference for calculating the gradient. For loopy graphs, marginal inference is generally expensive even when using approximate solutions. Given that learning the CNN potential functions typically requires a large number of gradient iterations, repeated marginal inference would make the training intractably slow. Applying an approximate training objective is a solution to avoid repeat inference; pseudo-likelihood learning [6] and piecewise learning [7, 3] are examples of this kind of approach. In this work, we advocate a new direction for efficient deep structured model learning. In conventional CRF approaches, the final prediction is the result of inference based on the learned potentials. However, our ultimate goal is the final prediction (not the potentials themselves), so we propose to directly optimize the inference procedure for the final prediction. Our focus here is on the extensively studied message passing based inference algorithms. As discussed in [8], we can directly learn message estimators to output the required messages in the inference procedure, rather than learning the potential functions as in conventional CRF learning approaches. With the learned message estimators, we then obtain the final prediction by performing message passing inference. Our main contributions are as follows: 1) We explore a new direction for efficient deep structured learning. We propose to directly learn the messages in message passing inference as training deep CNNs in an end-to-end learning fashion. Message learning does not require any inference step for the gradient calculation, which allows efficient training. Furthermore, when cast as a tradiational classification task, the network output dimension for message estimation is the same as the number of classes (K), while the network output for general CNN potential functions in CRFs is Ka, which is exponential in the order (a) of the potentials (for example, a = 2 for pairwise potentials, a = 3 for triple-cliques, etc). Hence CNN based message learning has significantly fewer network parameters and thus is more scalable, especially in cases which involve a large number of classes. 2) The number of iterations in message passing inference can be explicitly taken into consideration in the message learning procedure. In this paper, we are particularly interested in learning messages that are able to offer high-quality CRF prediction results with only one message passing iteration, making the message passing inference very fast. 3) We apply our method to semantic image segmentation on the PASCAL VOC 2012 dataset and achieve impressive performance. Related work Combining the strengths of CNNs and CRFs for segmentation has been explored in several recent methods. Some methods resort to a simple combination of CNN classifiers and CRFs without joint learning. DeepLab-CRF in [9] first train fully CNN for pixel classification and applies a dense CRF [10] method as a post-processing step. Later the method in [2] extends DeepLab by jointly learning the dense CRFs and CNNs. RNN-CRF in [1] also performs joint learning of CNNs and the dense CRFs. They implement the mean-field inference as Recurrent Neural Networks which facilitates the end-to-end learning. These methods usually use CNNs for modelling the unary potentials only. The work in [3] trains CNNs to model both the unary and pairwise potentials in order to capture contextual information. Jointly learning CNNs and CRFs has also been explored for other applications like depth estimation [4, 11]. The work in [5] explores joint training of Markov random fields and deep networks for predicting words from noisy images and image classification. All these above-mentioned methods that combine CNNs and CRFs are based upon conventional CRF approaches. They aim to jointly learn or incorporate pre-trained CNN potential functions, and then perform inference/prediction using the potentials. In contrast, our method here directly learns CNN message estimators for the message passing inference, rather than learning the potentials. The inference machine proposed in [8] is relevant to our work in that it has discussed the idea of directly learning message estimators instead of learning potential functions for structured prediction. They train traditional logistic regressors with hand-crafted features as message estimators. Motivated by the tremendous success of CNNs, we propose to train deep CNNs based message estimators in an end-to-end learning style without using hand-crafted features. Unlike the approach in [8] which aims to learn variable-to-factor message estimators, our proposed method aims to learn the factor-to-variable message estimators. Thus we are able to naturally formulate the variable marginals – which is the ultimate goal for CRF inference – as the training objective (see Sec. 3.3). The approach in [12] jointly learns CNNs and CRFs for pose estimation, in which they learn the marginal likelihood of body parts but ignore the partition function in the likelihood. Message learning is not discussed in that work, and the exact relationship between this pose estimation approach and message learning remains unclear. 2 Learning CRF with CNN potentials Before describing our message learning method, we review the CRF-CNN joint learning approach and discuss limitations. An input image is denoted by x ∈X and the corresponding labeling mask is denoted by y ∈Y. The energy function is denoted by E(y, x), which measures the score of the prediction y given the input image x. We consider the following form of conditional likelihood: P(y|x) = 1 Z(x) exp [−E(y, x)] = exp [−E(y, x)] P y′ exp [−E(y′, x)]. (1) Here Z is the partition function. The CRF model is decomposed by a factor graph over a set of factors F. Generally, the energy function is written as a sum of potential functions (factor functions): E(y, x) = P F ∈F EF (yF , xF ). (2) Here F indexes one factor in the factor graph; yF denotes the variable nodes which are connected to the factor F; EF is the (log-) potential function (factor function). The potential function can be a unary, pairwise, or high-order potential function. The recent method in [3] describes examples of constructing general CNN based unary and pairwise potentials. Take semantic image segmentation as an example. To predict the pixel labels of a test image, we can find the mode of the joint label distribution by solving the maximum a posteriori (MAP) inference problem: y⋆= argmax y P(y|x). We can also obtain the final prediction by calculating the label marginal distribution of each variable, which requires to solve a marginal inference problem: ∀p ∈N : P(yp|x) = P y\yp P(y|x). (3) Here y\yp indicates the output variables y excluding yp. For a general CRF graph with cycles, the above inference problems is known to be NP-hard, thus approximate inference algorithms are applied. Message passing is a type of widely applied algorithms for approximate inference: loopy belief propagation (BP) [13], tree-reweighted message passing [14] and mean-field approximation [13] are examples of the message passing methods. CRF-CNN joint learning aims to learn CNN potential functions by optimizing the CRF objective, typically, the negative conditional log-likelihood, which is: −log P(y|x; θ) = E(y, x; θ) + log Z(x; θ). (4) The energy function E(y, x) is constructed by CNNs, for which all the network parameters are denoted by θ. Adding regularization, minimizing negative log-likelihood for CRF learning is: minθ λ 2 ∥θ∥2 2 + PN i=1[E(y(i), x(i); θ) + log Z(x(i); θ)]. (5) Here x(i), y(i) denote the i-th training image and its segmentation mask; N is the number of training images; λ is the weight decay parameter. We can apply stochastic gradient descent (SGD) to optimize the above problem for learning θ. The energy function E(y, x; θ) is constructed from CNNs, and its gradient ∇θE(y, x; θ) can be easily computed by applying the chain rule as in conventional CNNs. However, the partition function Z brings difficulties for optimization. Its gradient is: ∇θ log Z(x; θ) = X y exp [−E(y, x; θ)] P y′ exp [−E(y′, x; θ)]∇θ[−E(y, x; θ)] = −Ey∼P (y|x;θ)∇θE(y, x; θ). (6) Direct calculation of the above gradient is computationally infeasible for general CRF graphs. Usually it is necessary to perform approximate marginal inference to calculate the gradients at each SGD iteration [13]. However, repeated marginal inference can be extremely expensive, as discussed in [3]. CNN training usually requires a huge number of SGD iterations (hundreds of thousands, or even millions), hence this inference based learning approach is in general not scalable or even infeasible. 3 Learning CNN message estimators In conventional CRF approaches, the potential functions are first learned, and then inference is performed based on the learned potential functions to generate the final prediction. In contrast, our approach directly optimizes the inference procedure for final prediction. We propose to learn CNN estimators to directly output the required intermediate values in an inference algorithm. Here we focus on the message passing based inference algorithm which has been extensively studied and widely applied. In the CRF prediction procedure, the “message” vectors are recursively calculated based on the learned potentials. We propose to construct and learn CNNs to directly estimate these messages in the message passing procedure, rather than learning the potential functions. In particular, we directly learn factor-to-variable message estimators. Our message learning framework is general and can accommodate all message passing based algorithms such as loopy belief propagation (BP) [13], mean-field approximation [13] and their variants. Here we discuss using loopy BP for calculating variable marginals. As shown by Yedidia et al. [15], loopy BP has a close relation with Bethe free energy approximation. Typically, the message is a K-dimensional vector (K is the number of classes) which encodes the information of the label distribution. For each variable-factor connection, we need to recursively compute the variable-to-factor message: βp→F ∈RK, and the factor-to-variable message: βF →p ∈ RK. The unnormalized variable-to-factor message is computed as: ¯βp→F (yp) = P F ′∈Fp\F βF ′→p(yp). (7) Here Fp is a set of factors connected to the variable p; Fp\F is the set of factors Fp excluding the factor F. For loopy graphs, the variable-to-factor message is normalized at each iteration: βp→F (yp) = log exp ¯βp→F (yp) P y′p exp ¯βp→F (y′p). (8) The factor-to-variable message is computed as: βF →p(yp) = log X y′ F \y′p,y′p=yp exp −EF (y′ F ) + X q∈NF \p βq→F (y′ q) . (9) Here NF is a set of variables connected to the factor F; NF \p is the set of variables NF excluding the variable p. Once we get all the factor-to-variable messages of one variable node, we are able to calculate the marginal distribution (beliefs) of that variable: P(yp|x) = X y\yp P(y|x) = 1 Zp exp X F ∈Fp βF →p(yp) , (10) in which Zp is a normalizer: Zp = P yp exp [P F ∈Fp βF →p(yp)]. 3.1 CNN message estimators The calculation of factor-to-variable message βF →p depends on the variable-to-factor messages βp→F . Substituting the definition of βp→F in (8), βF →p can be re-written as: βF →p(yp) = log X y′ F \y′p,y′p=yp exp −EF (y′ F ) + X q∈NF \p log exp ¯βq→F (y′ q) P y′′ q exp ¯βq→F (y′′q ) = log X y′ F \y′q,y′p=yp exp −EF (y′ F ) + X q∈NF \p log exp P F ′∈Fq\F βF ′→q(y′ q) P y′′ q exp P F ′∈Fq\F βF ′→q(y′′q ) (11) Here q denotes the variable node which is connected to the node p by the factor F in the factor graph. We refer to the variable node q as a neighboring node of q. NF \p is a set of variables connected to the factor F excluding the node p. Clearly, for a pairwise factor which only connects to two variables, the set NF \p only contains one variable node. The above equations show that the factor-to-variable message βF →p depends on the potential EF and βF ′→q. Here βF ′→q is the factor-to-variable message which is calculated from a neighboring node q and a factor F ′ ̸= F. Conventional CRF learning approaches learn the potential function then follow the above equations to compute the messages for calculating marginals. As discussed in [8], given that the goal is to estimate the marginals, it is not necessary to exactly follow the above equations, which involve learning potential functions, to calculate messages. We can directly learn message estimators, rather than indirectly learning the potential functions as in conventional methods. Consider the calculation in (11). The message βF →p depends on the observation xpF and the messages βF ′→q. Here xpF denotes the observations that correspond to the node p and the factor F. We are able to formulate a factor-to-variable message estimator which takes xpF and βF ′→q as inputs and outputs the message vector, and we directly learn such estimators. Since one message βF →p depends on a number of previous messages βF ′→q, we can formulate a sequence of message estimators to model the dependence. Thus the output from a previous message estimator will be the input of the following message estimator. There are two message passing strategies for loopy BP: synchronous and asynchronous passing. We here focus on the synchronous message passing, for which all messages are computed before passing them to the neighbors. The synchronous passing strategy results in much simpler message dependences than the asynchronous strategy, which simplifies the training procedure. We define one inference iteration as one pass of the graph with the synchronous passing strategy. We propose to learn CNN based factor-to-variable message estimator. The message estimator models the interaction between neighboring variable nodes. We denote by M a message estimator. The factor-to-variable message is calculated as: βF →p(yp) = MF (xpF , dpF , yp). (12) We refer to dpF as the dependent message feature vector which encodes all dependent messages from the neighboring nodes that are connected to the node p by F. Note that the dependent messages are the output of message estimators at the previous inference iteration. In the case of running only one message passing iteration, there are no dependent messages for MF , and thus we do not need to incorporate dpF . To have a general exposition, we here describe the case of running arbitrarily many inference iterations. We can choose any effective strategy to generate the feature vector dpF from the dependent messages. Here we discuss a simple example. According to (11), we define the feature vector dpF as a K-dimensional vector which aggregates all dependent messages. In this case, dpF is computed as: dpF (y) = X q∈NF \p log exp P F ′∈Fq\F MF ′(xqF ′, dqF ′, y) P y′ exp P F ′∈Fq\F MF ′(xqF ′, dqF ′, y′) . (13) With the definition of dpF in (13) and βF →p in (12), it clearly shows that the message estimation requires evaluating a sequence of message estimators. Another example is to concatenate all dependent messages to construct the feature vector dpF . There are different strategies to formulate the message estimators in different iterations. One strategy is using the same message estimator across all inference iterations. In this case the message estimator becomes a recursive function, and thus the CNN based estimator becomes a recurrent neural network (RNN). Another strategy is to formulate different estimator for each inference iteration. 3.2 Details for message estimator networks We formulate the estimator MF as a CNN, thus the estimation is the network outputs: βF →p(yp) = MF (xpF , dpF , yp; θF ) = PK k=1δ(k = yp)zpF,k(x, dpF ; θF ). (14) Here θF denotes the network parameter which we need to learn. δ(·) is the indicator function, which equals 1 if the input is true and 0 otherwise. We denote by zpF ∈RK as the K-dimensional output vector (K is the number of classes) of the message estimator network for the node p and the factor F; zpF,k is the k-th value in the network output zpF corresponding to the k-th class. We can consider any possible strategies for implementing zpF with CNNs. For example, we here describe a strategy which is analogous to the network design in [3]. We denote by C(1) as a fully convolutional network (FCNN) [16] for convolutional feature generation, and C(2) as a traditional fully connected network for message estimation. Given an input image x, the network output C(1)(x) ∈RN1×N2×r is a convolutional feature map, in which N1 × N2 = N is the feature map size and r is the dimension of one feature vector. Each spatial position (each feature vector) in the feature map C(1)(x) corresponds to one variable node in the CRF graph. We denote by C(1)(x, p) ∈Rr, the feature vector corresponding to the variable node p. Likewise, C(1)(x, NF \p) ∈Rr is the averaged vector of the feature vectors that correspond to the set of nodes NF \p. Recall that NF \p is a set of nodes connected by the factor F excluding the node p. For pairwise factors, NF \p contains only one node. We construct the feature vector zC(1) pF ∈R2r for the node-factor pair (p, F) by concatenating C(1)(x, p) and C(1)(x, NF \p). Finally, we concatenate the node-factor feature vector zC(1) pF and the dependent message feature vector dpF as the input for the second network C(2). Thus the input dimension for C(2) is (2r +K). For running only one inference iteration, the input for C(2) is zC(1) pF alone. The final output from the second network C(2) is the K-dimensional message vector zpF . To sum up, we generate the final message vector zpF as: zpF = C(2){ [ C(1)(x, p)⊤; C(1)(x, NF \p )⊤; d⊤ pF ]⊤}. (15) For a general CNN based potential function in conventional CRFs, the potential network is usually required to have a large number of output units (exponential in the order of the potentials). For example, it requires K2 (K is the number of classes) outputs for the pairwise potentials [3]. A large number of output units would significantly increase the number of network parameters. It leads to expensive computations and tends to over-fit the training data. In contrast, for learning our CNN message estimator, we only need to formulate K output units for the network. Clearly it is more scalable in the cases of a large number of classes. 3.3 Training CNN message estimators Our goal is to estimate the variable marginals in (3), which can be re-written with the estimators: P(yp|x) = X y\yp P(y|x) = 1 Zp exp X F ∈Fp βF →p(yp) = 1 Zp exp X F ∈Fp MF (xpF , dpF , yp; θF ). Here Zp is the normalizer. The ideal variable marginal, for example, has the probability of 1 for the ground truth class and 0 for the remaining classes. Here we consider the cross entropy loss between the ideal marginal and the estimated marginal. J(x, ˆy; θ) = − X p∈N K X yp=1 δ(yp = ˆyp) log P(yp|x; θ) = − X p∈N K X yp=1 δ(yp = ˆyp) log exp P F ∈Fp MF (xpF , dpF , yp; θF ) P y′p exp P F ∈Fp MF (xpF , dpF , y′p; θF ), (16) in which ˆyp is the ground truth label for the variable node p. Given a set of N training images and label masks, the optimization problem for learning the message estimator network is: minθ λ 2 ∥θ∥2 2 + PN i=1 J(x(i), ˆy(i); θ). (17) The work in [8] proposed to learn the variable-to-factor message (βp→F ). Unlike their approach, we aim to learn the factor-to-variable message (βF →p), for which we are able to naturally formulate the variable marginals, which is the ultimate goal for prediction, as the training objective. Moreover, for learning βp→F in their approach, the message estimator will depend on all neighboring nodes (connected by any factors). Given that variable nodes will have different numbers of neighboring nodes, they only consider a fixed number of neighboring nodes (e.g., 20) and concatenate their features to generate a fixed-length feature vector for classification. In our case for learning βF →p, the message estimator only depends on a fixed number of neighboring nodes (connected by one factor), thus we do not have this problem. Most importantly, they learn message estimators by training traditional probabilistic classifiers (e.g., simple logistic regressors) with hand-craft features, and in contrast, we train deep CNNs in an end-to-end learning style without using hand-craft features. 3.4 Message learning with inference-time budgets One advantage of message learning is that we are able to explicitly incorporate the expected number of inference iterations into the learning procedure. The number of inference iterations defines the learning sequence of message estimators. This is particularly useful if we aim to learn the estimators which are capable of high-quality predictions within only a few inference iterations. In contrast, Table 1: Segmentation results on the PASCAL VOC 2012 “val” set. We compare with several recent CNN based methods with available results on the “val” set. Our method performs the best. method training set # train (approx.) IoU val set ContextDCRF [3] VOC extra 10k 70.3 Zoom-out [17] VOC extra 10k 63.5 Deep-struct [2] VOC extra 10k 64.1 DeepLab-CRF [9] VOC extra 10k 63.7 DeepLap-MCL [9] VOC extra 10k 68.7 BoxSup [18] VOC extra 10k 63.8 BoxSup [18] VOC extra + COCO 133k 68.1 ours VOC extra 10k 71.1 ours+ VOC extra 10k 73.3 conventional potential function learning in CRFs is not able to directly incorporate the expected number of inference iterations. We are particularly interested in learning message estimators for use with only one message passing iteration, because of the speed of such inference. In this case it might be preferable to have largerange neighborhood connections, so that large range interaction can be captured within one inference pass. 4 Experiments We evaluate the proposed CNN message learning method for semantic image segmentation. We use the publicly available PASCAL VOC 2012 dataset [19]. There are 20 object categories and one background category in the dataset. It contains 1464 images in the training set, 1449 images in the “val” set and 1456 images in the test set. Following the common practice in [20, 9], the training set is augmented to 10582 images by including the extra annotations provided in [21] for the VOC images. We use intersection-over-union (IoU) score [19] to evaluate the segmentation performance. For the learning and prediction of our method, we only use one message passing iteration. The recent work in [3] (referred to as ContextDCRF) learns multi-scale fully convolutional CNNs (FCNNs) for unary and pairwise potential functions to capture contextual information. We follow this CRF learning method and replace the potential functions by the proposed message estimators. We consider 2 types of spatial relations for constructing the pairwise connections of variable nodes. One is the “surrounding” spatial relation, for which one node is connected to its surround nodes. The other one is the “above/below” spatial relation, for which one node is connected to the nodes that lie above. For the pairwise connections, the neighborhood size is defined by a range box. We learn one type of unary message estimator and 3 types of pairwise message estimators in total. One type of pairwise message estimator is for the “surrounding” spatial relations, and the other two are for the “above/below” spatial relations. We formulate one network for one type of message estimator. We formulate our message estimators as multi-scale FCNNs, for which we apply a similar network configuration as in [3]. The network C(1) (see Sec. 3.2 for details) has 6 convolution blocks and C(2) has 2 fully connected layers (with K output units). Our networks are initialized using the VGG-16 model [22]. We train all layers using back-propagation. Our system is built on MatConvNet [23]. We first evaluate our method on the VOC 2012 “val” set. We compare with several recent CNN based methods with available results on the “val” set. Results are shown in Table 1. Our method achieves the best performance. The comparing method ContextDCRF follows a conventional CRF learning and prediction scheme: they first learn potentials and then perform inference based on the learned potentials to output final predictions. The result shows that learning the CNN message estimators is able to achieve similar performance compared to learning CNN potential functions in CRFs. Note that since here we only use one message passing iteration for the training and prediction, the inference is particularly efficient. To further improve the performance, we perform simple data augmentation in training. We generate extra 4 scales ([0.8, 0.9, 1.1, 1.2]) of the training images and their flipped images for training. This result is denoted by “ours+” in the result table. Table 2: Category results on the PASCAL VOC 2012 test set. Our method performs the best. method mean aero bike bird boat bottle bus car cat chair cow table dog horse mbike person potted sheep sofa train tv DeepLab-CRF [9] 66.4 78.4 33.1 78.2 55.6 65.3 81.3 75.5 78.6 25.3 69.2 52.7 75.2 69.0 79.1 77.6 54.7 78.3 45.1 73.3 56.2 DeepLab-MCL [9] 71.6 84.4 54.5 81.5 63.6 65.9 85.1 79.1 83.4 30.7 74.1 59.8 79.0 76.1 83.2 80.8 59.7 82.2 50.4 73.1 63.7 FCN-8s [16] 62.2 76.8 34.2 68.9 49.4 60.3 75.3 74.7 77.6 21.4 62.5 46.8 71.8 63.9 76.5 73.9 45.2 72.4 37.4 70.9 55.1 CRF-RNN [1] 72.0 87.5 39.0 79.7 64.2 68.3 87.6 80.8 84.4 30.4 78.2 60.4 80.5 77.8 83.1 80.6 59.5 82.8 47.8 78.3 67.1 ours 73.4 90.1 38.6 77.8 61.3 74.3 89.0 83.4 83.3 36.2 80.2 56.4 81.2 81.4 83.1 82.9 59.2 83.4 54.3 80.6 70.8 Table 3: Segmentation results on the PASCAL VOC 2012 test set. Compared to methods that use the same augmented VOC dataset, our method has the best performance. method training set # train (approx.) IoU test set ContextDCRF [3] VOC extra 10k 70.7 Zoom-out [17] VOC extra 10k 64.4 FCN-8s [16] VOC extra 10k 62.2 SDS [20] VOC extra 10k 51.6 DeconvNet-CRF [24] VOC extra 10k 72.5 DeepLab-CRF [9] VOC extra 10k 66.4 DeepLab-MCL [9] VOC extra 10k 71.6 CRF-RNN [1] VOC extra 10k 72.0 DeepLab-CRF [25] VOC extra + COCO 133k 70.4 DeepLab-MCL [25] VOC extra + COCO 133k 72.7 BoxSup (semi) [18] VOC extra + COCO 133k 71.0 CRF-RNN [1] VOC extra + COCO 133k 74.7 ours VOC extra 10k 73.4 We further evaluate our method on the VOC 2012 test set. We compare with recent state-of-the-art CNN methods with competitive performance. The results are described in Table 3. Since the ground truth labels are not available for the test set, we evaluate our method through the VOC evaluation server. We achieve very competitive performance on the test set: 73.4 IoU score1, which is to date the best performance amongst methods that use the same augmented VOC training dataset [21] (marked as “VOC extra” in the table). These results validate the effectiveness of direct message learning with CNNs. We also include a comparison with methods which are trained on the much larger COCO dataset (around 133K training images). Our performance is comparable with these methods, even though we make use of many fewer training images. The results for each category is shown in Table 2. We compare with several recent methods which transfer layers from the same VGG-16 model and use the same training data. Our method performs the best for 13 out of 20 categories. 5 Conclusion We have proposed a new deep message learning framework for structured CRF prediction. Learning deep message estimators for the message passing inference reveals a new direction for learning deep structured model. Learning CNN message estimators is efficient, which does not involve expensive inference steps for gradient calculation. The network output dimension for message estimation is the same as the number of classes, which does not increase with the order of the potentials, and thus CNN message learning has less network parameters and is more scalable in the number of classes compared to conventional potential function learning. Our impressive performance for semantic segmentation demonstrates the effectiveness and usefulness of the proposed deep message learning. Our framework is general and can be readily applied to other structured prediction applications. Acknowledgements This research was supported by the Data to Decisions Cooperative Research Centre and by the Australian Research Council through the ARC Centre for Robotic Vision CE140100016 and through a Laureate Fellowship FL130100102 to I. Reid. Correspondence should be addressed to C. Shen. 1 The result link provided by VOC evaluation server: http://host.robots.ox.ac.uk:8080/anonymous/DBD0SI.html References [1] 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,” 2015. [Online]. Available: http://arxiv.org/abs/1502.03240 [2] A. Schwing and R. Urtasun, “Fully connected deep structured networks,” 2015. [Online]. Available: http://arxiv.org/abs/1503.02351 [3] G. Lin, C. Shen, I. Reid, and A. van den Hengel, “Efficient piecewise training of deep structured models for semantic segmentation,” 2015. [Online]. Available: http://arxiv.org/abs/1504.01013 [4] F. Liu, C. Shen, and G. Lin, “Deep convolutional neural fields for depth estimation from a single image,” in Proc. IEEE Conf. Comp. Vis. Pattern Recogn., 2015. [5] L. Chen, A. Schwing, A. Yuille, and R. Urtasun, “Learning deep structured models,” 2014. [Online]. Available: http://arxiv.org/abs/1407.2538 [6] J. Besag, “Efficiency of pseudolikelihood estimation for simple Gaussian fields,” Biometrika, 1977. [7] C. Sutton and A. McCallum, “Piecewise training for undirected models,” in Proc. Conf. Uncertainty Artificial Intelli, 2005. [8] S. Ross, D. Munoz, M. Hebert, and J. Bagnell, “Learning message-passing inference machines for structured prediction,” in Proc. IEEE Conf. Comp. Vis. Pattern Recogn., 2011. [9] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. Yuille, “Semantic image segmentation with deep convolutional nets and fully connected CRFs,” 2014. [Online]. Available: http://arxiv.org/abs/1412.7062 [10] P. Kr¨ahenb¨uhl and V. Koltun, “Efficient inference in fully connected CRFs with Gaussian edge potentials,” in Proc. Adv. Neural Info. Process. Syst., 2012. [11] F. Liu, C. Shen, G. Lin, and I. Reid, “Learning depth from single monocular images using deep convolutional neural fields,” 2015. [Online]. Available: http://arxiv.org/abs/1502.07411 [12] J. Tompson, A. Jain, Y. LeCun, and C. Bregler, “Joint training of a convolutional network and a graphical model for human pose estimation,” in Proc. Adv. Neural Info. Process. Syst., 2014. [13] S. Nowozin and C. Lampert, “Structured learning and prediction in computer vision,” Found. Trends. Comput. Graph. Vis., 2011. [14] V. Kolmogorov, “Convergent tree-reweighted message passing for energy minimization,” IEEE T. Pattern Analysis & Machine Intelligence, 2006. [15] J. S. Yedidia, W. T. Freeman, Y. Weiss et al., “Generalized belief propagation,” in Proc. Adv. Neural Info. Process. Syst., 2000. [16] J. Long, E. Shelhamer, and T. Darrell, “Fully convolutional networks for semantic segmentation,” in Proc. IEEE Conf. Comp. Vis. Pattern Recogn., 2015. [17] M. Mostajabi, P. Yadollahpour, and G. Shakhnarovich, “Feedforward semantic segmentation with zoom-out features,” 2014. [Online]. Available: http://arxiv.org/abs/1412.0774 [18] J. Dai, K. He, and J. Sun, “BoxSup: exploiting bounding boxes to supervise convolutional networks for semantic segmentation,” 2015. [Online]. Available: http://arxiv.org/abs/1503.01640 [19] M. Everingham, L. V. Gool, C. Williams, J. Winn, and A. Zisserman, “The pascal visual object classes (VOC) challenge,” Int. J. Comp. Vis., 2010. [20] B. Hariharan, P. Arbel´aez, R. Girshick, and J. Malik, “Simultaneous detection and segmentation,” in Proc. European Conf. Computer Vision, 2014. [21] B. Hariharan, P. Arbelaez, L. Bourdev, S. Maji, and J. Malik, “Semantic contours from inverse detectors,” in Proc. Int. Conf. Comp. Vis., 2011. [22] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” 2014. [Online]. Available: http://arxiv.org/abs/1409.1556 [23] A. Vedaldi and K. Lenc, “Matconvnet – convolutional neural networks for matlab,” in Proceeding of the ACM Int. Conf. on Multimedia, 2015. [24] H. Noh, S. Hong, and B. Han, “Learning deconvolution network for semantic segmentation,” in Proc. IEEE Conf. Comp. Vis. Pattern Recogn., 2015. [25] G. Papandreou, L. Chen, K. Murphy, and A. Yuille, “Weakly-and semi-supervised learning of a DCNN for semantic image segmentation,” 2015. [Online]. Available: http://arxiv.org/abs/1502.02734 | 2015 | 336 |
5,854 | Bayesian Active Model Selection with an Application to Automated Audiometry Jacob R. Gardner CS, Cornell University Ithaca, NY 14850 jrg365@cornell.edu Gustavo Malkomes CSE, WUSTL St. Louis, MO 63130 luizgustavo@wustl.edu Roman Garnett CSE, WUSTL St. Louis, MO 63130 garnett@wustl.edu Kilian Q. Weinberger CS, Cornell University Ithaca, NY 14850 kqw4@cornell.edu Dennis Barbour BME, WUSTL St. Louis, MO 63130 dbarbour@wustl.edu John P. Cunningham Statistics, Columbia University New York, NY 10027 jpc2181@columbia.edu Abstract We introduce a novel information-theoretic approach for active model selection and demonstrate its effectiveness in a real-world application. Although our method can work with arbitrary models, we focus on actively learning the appropriate structure for Gaussian process (GP) models with arbitrary observation likelihoods. We then apply this framework to rapid screening for noise-induced hearing loss (NIHL), a widespread and preventible disability, if diagnosed early. We construct a GP model for pure-tone audiometric responses of patients with NIHL. Using this and a previously published model for healthy responses, the proposed method is shown to be capable of diagnosing the presence or absence of NIHL with drastically fewer samples than existing approaches. Further, the method is extremely fast and enables the diagnosis to be performed in real time. 1 Introduction Personalized medicine has long been a critical application area for machine learning [1–3], in which automated decision making and diagnosis are key components. Beyond improving quality of life, machine learning in diagnostic settings is particularly important because collecting additional medical data often incurs significant financial burden, time cost, and patient discomfort. In machine learning one often considers this problem to be one of active feature selection: acquiring each new feature (e.g., a blood test) incurs some cost, but will, with hope, better inform diagnosis, treatment, and prognosis. By careful analysis, we may optimize this trade off. However, many diagnostic settings in medicine do not involve feature selection, but rather involve querying a sample space to discriminate different models describing patient attributes. A particular, clarifying example that motivates this work is noise-induced hearing loss (NIHL), a prevalent disorder affecting 26 million working-age adults in the United States alone [4] and affecting over half of workers in particular occupations such as mining and construction. Most tragically, NIHL is entirely preventable with simple, low-cost solutions (e.g., earplugs). The critical requirement for prevention is effective early diagnosis. To be tested for NIHL, patients must complete a time-consuming audiometric exam that presents a series of tones at various frequencies and intensities; at each tone the patient indicates whether he/she hears the tone [5–7]. From the responses, the clinician infers the patient’s audible threshold on a set of discrete frequencies (the audiogram); this process requires the delivery of up to hundreds of tones. Audiologists scan the audiogram for a hearing deficit with a characteristic notch shape—a 1 narrow band that can be anywhere in the frequency domain that is indicative of NIHL. Unfortunately, at early stages of the disorder, notches can be small enough that they are undetectable in a standard audiogram, leaving many cases undiagnosed until the condition has become severe. Increasing audiogram resolution would require higher sample counts (more presented tones) and thus only lengthen an already burdensome procedure. We present here a better approach. Note that the NIHL diagnostic challenge is not one of feature selection (choosing the next test to run and classifying the result), but rather of model selection: is this patient’s hearing better described by a normal hearing model, or a notched NIHL model? Here we propose a novel active model selection algorithm to make the NIHL diagnosis in as few tones as possible, which directly reflects the time and personnel resources required to make accurate diagnoses in large populations. We note that this is a model-selection problem in the truest sense: a diagnosis corresponds to selecting between two or more sets of indexed probability distributions (models), rather than the more-common misnomer of choosing an index from within a model (i.e., hyperparameter optimization). In the NIHL case this distinction is critical. We are choosing between two models, the set of possible NIHL hearing functions and the set of normal hearing functions. This approach suggests a very different and more direct algorithm than first learning the most likely NIHL function and then accepting or rejecting it as different from normal, the standard approach. We make the following contributions: first, we design a completely general active-model-selection method based on maximizing the mutual information between the response to a tone and the posterior on the model class. Critically, we develop an analytical approximation of this criterion for Gaussian process (GP) models with arbitrary observation likelihoods, enabling active structure learning for GPs. Second, we extend the work of Gardner et al. [8] (which uses active learning to speed up audiogram inference) to the broader question of identifying which model—normal or NIHL—best fits a given patient. Finally, we develop a novel GP prior mean that parameterizes notched hearing loss for NIHL patients. To our knowledge, this is the first publication with an active model-selection approach that does not require updating each model for every candidate point, allowing audiometric diagnosis of NIHL to be performed in real time. Finally, using patient data from a clinical trial, we show empirically that our method typically automatically detects simulated noise-induced hearing loss with fewer than 15 query tones. This is vastly fewer than the number required to infer a conventional audiogram or even an actively learned audiogram [8], highlighting the importance of both the active-learning approach and our focus on model selection. 2 Bayesian model selection We consider supervised learning problems defined on an input space X and an output space Y. Suppose we are given a set of observed data D = (X, y), where X represents the design matrix of independent variables xi ∈X and y the associated vector of dependent variables yi = y(xi) ∈Y. Let M be a probabilistic model, and let θ be an element of the parameter space indexing M. Given a set of observations D, we wish to compute the probability of M being the correct model to explain D, compared to other models. The key quantity of interest to model selection is the model evidence: p(y | X, M) = Z p(y | X, θ, M)p(θ | M) dθ, (1) which represents the probability of having generating the observed data under the model, marginalized over θ to account for all possible members of that model under a prior p(θ | M) [9]. Given a set of M candidate models {Mi}M i=1, and the computed evidence for each, we can apply Bayes’ rule to compute the posterior probability of each model given the data: p(M | D) = p(y | X, M)p(M) p(y | X) = p(y | X, M)p(M) P i p(y | X, Mi)p(Mi), (2) where p(M) represents the prior probability distribution over the models. 2.1 Active Bayesian model selection Suppose that we have a mechanism for actively selecting new data—choosing x∗∈X and observing y∗= y(x∗)—to add to our dataset D = (X, y), in order to better distinguish the candidate models 2 {Mi}. After making this observation, we will form an augmented dataset D′ = D ∪ (x∗, y∗) , from which we can recompute a new model posterior p(M | D′). An approach motivated by information theory is to select the location maximizing the mutual information between the observation value y∗and the unknown model: I(y∗; M | x∗, D) = H[M | D] −Ey∗ H[M | D′] (3) = H[y∗| x∗, D] −EM H[y∗| x∗, D, M] , (4) where H indicates (differential) entropy. Whereas Equation (3) is computationally problematic (involving costly model retraining), the equivalent expression (4) is typically more tractable, has been applied fruitfully in various active-learning settings [10, 11, 8, 12, 13], and requires only computing the differential entropy of the model-marginal predictive distribution: p(y∗| x∗, D) = M X i=1 p(y∗| x∗, D, Mi)p(Mi | D) (5) and the model-conditional predictive distributions p(y∗| x∗, D, Mi) with all models trained with the currently available data. In contrast to (3), this does not involve any retraining cost. Although computing the entropy in (5) might be problematic, we note that this is a one-dimensional integral that can easily be resolved with quadrature. Our proposed approach, which we call Bayesian active model selection (BAMS) is then to compute, for each candidate location x∗, the mutual information between y∗and the unknown model, and query where this is maximized: arg max x∗ I(y∗; M | x∗, D). (6) 2.2 Related work Although active learning and model selection have been widely investigated, active model selection has received comparatively less attention. Ali et al. [14] proposed an active learning model selection method that requires leave-two-out cross validation when evaluating each candidate x∗, requiring O B2M|X∗| model updates per iteration, where B is the total budget. Kulick et al. [15] also considered an information-theoretic approach to active model selection, suggesting maximizing the expected cross entropy between the current model posterior p(M | D) and the updated distribution p(M | D′). This approach also requires extensive model retraining, with O M|X∗| model updates per iteration, to estimate this expectation for each candidate. These approaches become prohibitively expensive for real-time applications with large number of candidates. In our audiometric experiments, for example, we consider 10 000 candidate points, expending 1–2 seconds per iteration, whereas these mentioned techniques would take several hours to selected the next point to query. 3 Active model selection for Gaussian processes In the previous section, we proposed a general framework for performing sequential active Bayesian model selection, without making any assumptions about the forms of the models {Mi}. Here we will discuss specific details of our proposal when these models represent alternative structures for Gaussian process priors on a latent function. We assume that our observations are generated via a latent function f : X →R with a known observation model p(y | f), where fi = f(xi). A standard nonparametric Bayesian approach with such models is to place a Gaussian process (GP) prior distribution on f, p(f) = GP(f; µ, K), where µ: X →R is a mean function and K : X 2 →R is a positive-definite covariance function or kernel [16]. We condition on the observed data to form a posterior distribution p(f | D), which is typically an updated Gaussian process (making approximations if necessary). We make predictions at a new input x∗via the predictive distribution p(y∗| x∗, D) = R p(y∗| f ∗, D)p(f ∗| x∗, D) df ∗, where f ∗= f(x∗). The mean and kernel functions are parameterized by hyperparameters that we concatenate into a vector θ, and different choices of these hyperparameters imply that the functions drawn from the GP will have particular frequency, amplitude, and other properties. Together, µ and K define a model parametrized by the hyperparameters θ. Much attention is paid to learning these hyperparameters in a fixed model class, sometimes under the unfortunate term “model selection.” 3 Note, however, that the structural (not hyperparameter) choices made in the mean function µ and covariance function K themselves are typically done by selecting (often blindly!) from several off-the-shelf solutions (see, for example, [17, 16]; though also see [18, 19]), and this choice has substantial bearing on the resulting functions f we can model. Indeed, in many settings, choosing the nature of plausible functions is precisely the problem of model selection; for example, to decide whether the function has periodic structure, exhibits nonstationarity, etc. Our goal is to automatically and actively decide these structural choices during GP modeling through intelligent sampling. To connect to our active learning formulation, let {Mi} be a set of Gaussian process models for the latent function f. Each model comprises a mean function µi, covariance function Ki, and associated hyperparameters θi. Our approach outlined in Section 2.1 requires the computation of three quantities that are not typically encountered in GP modeling and inference: the hyperparameter posterior p(θ | D, M), the model evidence p(y | X, M), and the predictive distribution p(y∗| x∗, D, M), where we have marginalized over θ in the latter two quantities. The most-common approaches to GP inference are maximum likelihood–II (MLE) or maximum a posteriori–II (MAP) estimation, where we maximize the hyperparameter posterior [20, 16]:1 ˆθ = arg max θ log p(θ | D, M) = arg max θ log p(θ | M) + log(y | X, θ, M). (7) Typically, predictive distributions and other desired quantities are then reported at the MLE/MAP hyperparameters, implicitly making the assumption that p(θ | D, M) ≈δ(ˆθ). Although a computationally convenient choice, this does not account for uncertainty in the hyperparameters, which can be nontrivial with small datasets [9]. Furthermore, accounting correctly for model parameter uncertainty is crucial to model selection, where it naturally introduces a model-complexity penalty. We discuss less-drastic approximations to these quantities below. 3.1 Approximating the model evidence and hyperparameter posterior The model evidence p(y | X, M) and hyperparameter posterior distribution p(θ | D, M) are in general intractable for GPs, as there is no conjugate prior distribution p(θ | M) available. Instead, we will use a Laplace approximation, where we make a second-order Taylor expansion of log p(θ | D, M) around its mode ˆθ (7). The result is a multivariate Gaussian approximation: p(θ | D, M) ≈N(θ; ˆθ, Σ); Σ−1 = −∇2 log p(θ | D, M) θ=ˆθ. (8) The Laplace approximation also results in an approximation to the model evidence: log p(y | X, M) ≈log p(y | X, ˆθ, M) + log p(ˆθ | M) −1 2 log det Σ−1 + d 2 log 2π, (9) where d is the dimension of θ [21, 22]. The Laplace approximation to the model evidence can be interpreted as rewarding explaining the data well while penalizing model complexity. Note that the Bayesian information criterion (BIC), commonly used for model selection, can be seen as an approximation to the Laplace approximation [23, 24]. 3.2 Approximating the predictive distribution We next consider the predictive distribution: p(y∗| x∗, D, M) = Z p(y∗| f ∗) Z p(f ∗| x∗, D, θ, M)p(θ | D, M) dθ | {z } p(f ∗|x∗,D,M) df ∗. (10) The posterior p(f ∗| x∗, D, θ, M) in (10) is typically a known Gaussian distribution, derived analytically for Gaussian observation likelihoods or approximately using standard approximate GP inference techniques [25, 26]. However, the integral over θ in (10) is intractible, even with a Gaussian approximation to the hyperparameter posterior as in (8). Garnett et al. [11] introduced a mechanism for approximately marginalizing GP hyperparameters (called the MGP), which we will adopt here due to its strong empirical performance. The MGP assumes 1Using a noninformative prior p(θ | M) ∝1 in the case of maximum likelihood. 4 that we have a Gaussian approximation to the hyperparameter posterior, p(θ | D, M) ≈N(θ; ˆθ, Σ).2 We define the posterior predictive mean and variance functions as µ∗(θ) = E[f ∗| x∗, D, θ, M]; ν∗(θ) = Var[f ∗| x∗, D, θ, M]. The MGP works by making an expansion of the predictive distribution around the posterior mean hyperparameters ˆθ. The nature of this expansion is chosen so as to match various derivatives of the true predictive distribution; see [11] for details. The posterior distribution of f ∗is approximated by p(f ∗| x∗, D, M) ≈N f ∗; µ∗(ˆθ), σ2 MGP , (11) where σ2 MGP = 4 3ν∗(ˆθ) + ∇µ∗(ˆθ) ⊤Σ ∇µ∗(ˆθ) + 1 3ν∗(ˆθ) ∇ν∗(ˆθ) ⊤Σ ∇ν∗(ˆθ) . (12) The MGP thus inflates the predictive variance from the the posterior mean hyperparameters ˆθ by a term that is commensurate with the uncertainty in θ, measured by the posterior covariance Σ, and the dependence of the latent predictive mean and variance on θ, measured by the gradients ∇µ∗and ∇ν∗. With the Gaussian approximation in (11), the integral in (10) now reduces to integrating the observation likelihood against a univariate Gaussian. This integral is often analytic [16] and at worse requires one-dimensional quadrature. 3.3 Implementation Given the development above, we may now efficiently compute an approximation to the BAMS criterion for active GP model selection. Given currently observed data D, for each of our candidate models Mi, we first find the Laplace approximation to the hyperparameter posterior (8) and model evidence (9). Given the approximations to the model evidence, we may compute an approximation to the model posterior (2). Suppose we have a set of candidate points X∗from which we may select our next point. For each of our models, we compute the MGP approximation (11) to the latent posteriors p(f ∗| X∗, D, Mi) , from which we use standard techniques to compute the predictive distributions p(y∗| X∗, D, Mi) . Finally, with the ability to compute the differential entropies of these model-conditional predictive distributions, as well as the marginal predictive distribution (5), we may compute the mutual information of each candidate in parallel. See the Appendix for explicit formulas for common likelihoods and a description of general-purpose, reusable code we will release in conjunction with this manuscript to ease implementation. 4 Audiometric threshold testing Standard audiometric tests [5–7] are calibrated such that the average human subject has a 50% chance of hearing a tone at any frequency; this empirical unit of intensity is defined as 0 dB HL. Humans give binary reports (whether or not a tone was heard) in response to stimuli, and these observations are inherently noisy. Typical audiometric tests present tones in a predefined order on a grid, in increments of 5–10 dB HL at each of six octaves. Recently, Gardner et al. [8] demonstrated that Bayesian active learning of a patient’s audiometric function significantly improves the state-of-the-art in terms of accuracy and number of stimuli required. However, learning a patient’s entire audiometric function may not always be necessary. Audiometric testing is frequently performed on otherwise young and healthy patients to detect noise-induced hearing loss (NIHL). Noise-induced hearing loss occurs when an otherwise healthy individual is habitually subjected to high-intensity sound [27]. This can result in sharp, notch-shaped hearing loss in a narrow (sometimes less than one octave) frequency range. Early detection of NIHL is critical to desirable long-term clinical outcomes, so large-scale screenings of susceptible populations (for example, factory workers), is commonplace [28]. Noise-induced hearing loss is difficult to diagnose with standard audiometry, because a frequency–intensity grid must be very fine to ensure that a notch is detected. The full audiometric test of Gardner et al. [8] may also be inefficient if the only goal of testing is to determine whether a notch is present, as would be the case for large-scale screening. We cast the detection of noise-induced hearing loss as an active model selection problem. We will describe two Gaussian process models of audiometric functions: a baseline model of normal human 2This is arbitrary and need not be the Laplace approximation in (8), so this is a slight abuse of notation. 5 hearing, and a model reflecting NIHL. We then use the BAMS framework introduced above to, as rapidly as possible for a given patient, determine which model best describes his or her hearing. Normal-patient model. To model a healthy patient’s audiometric function, we use the model described in [8]. The GP prior proposed in that work combines a constant prior mean µhealthy = c (modeling a frequency-independent natural threshold) with a kernel taken to be the sum of two components: a linear covariance in intensity and a squared-exponential covariance in frequency. Let [i, φ] represent a tone stimulus, with i representing its intensity and φ its frequency. We define: K [i, φ], [i′, φ′] = αii′ + β exp −1 2ℓ2 |φ −φ′|2 , (13) where α, β > 0 weight each component and ℓ> 0 is a length scale of frequency-dependent random deviations from a constant hearing threshold. This kernel encodes two fundamental properties of human audiologic response. First, hearing is monotonic in intensity. The linear contribution αii′ ensures that the posterior probability of detecting a fixed frequency will be monotonically increasing after conditioning on a few tones. Second, human hearing ability is locally smooth in frequency, because nearby locations in the cochlea are mechanically coupled. The combination of µhealthy with K specifies our healthy model Mhealthy, with parameters θhealthy = [c, α, β, ℓ]⊤. Noise-induced hearing loss model. We extend the model above to create a second GP model reflecting a localized, notch-shaped hearing deficit characteristic of NIHL. We create a novel, flexible prior mean function for this purpose, the parameters of which specify the exact nature of the hearing loss. Our proposed notch mean is: µNIHL(i, φ) = c −d N ′(φ; ν, w2), (14) where N ′(φ; ν, w) denotes the unnormalized normal probability density function with mean ν and standard deviation w, which we scale by a depth parameter d > 0 to reflect the prominence of the hearing loss. This contribution results in a localized subtractive notch feature with tunable center, width, and height. We retain a constant offset c to revert to the normal-hearing model outside the vicinity of the localized hearing deficit. Note that we completely model the effect of NIHL on patient responses with this mean notch function; the kernel K above remains appropriate. The combination of µNIHL with K specifies our NIHL model MNIHL with, in addition to the parameters of our healthy model, the additional parameters θNIHL = [ν, w, d]⊤. 5 Results To test BAMS on our NIHL detection task, we evaluate our algorithm using audiometric data, comparing to several baselines. From the results of a small-scale clinical trial, we have examples of high-fidelity audiometric functions inferred for several human patients using the method of Gardner et al. [8]. We may use these to simulate audiometric examinations of healthy patients using different methods to select tone presentations. We simulate patients with NIHL by adjusting ground truth inferred from nine healthy patients with in-model samples from our notch mean prior. Recall that high-resolution audiogram data is extremely scarce. We first took a thorough pure-tone audiometric test of each of nine patients from our trial with normal hearing using 100 samples selected using the algorithm in [8] on the domain X = [250, 8000] Hz × [−10, 80] dB HL,3 typical ranges for audiometric testing [6]. We inferred the audiometric function over the entire domain from the measured responses, using the healthy-patient GP model Mhealthy with parameters learned via MLE–II inference. The observation model was p(y = 1 | f) = Φ(f), where Φ is the standard normal CDF, and approximate GP inference was performed via a Laplace approximation. We then used the approximate GP posterior p(f | D, ˆθ, Mhealthy) for this patient as ground-truth for simulating a healthy patient’s responses. The posterior probability of tone detection learned from one patient is shown in the background of Figure 1(a). We simulated a healthy patient’s response to a given query tone x∗= [i∗, φ∗] by sampling a conditionally independent Bernoulli random variable with parameter p(y∗= 1 | x∗, D, ˆθ, Mhealthy). We simulated a patient with NIHL by then drawing notch parameters (the parameters of (14)) from an expert-informed prior, adding the corresponding notch to the learned healthy ground-truth latent mean, recomputing the detection probabilities, and proceeding as above. Example NIHL ground-truth detection probabilities generated in this manner are depicted in the background of Figure 1(b). 3Inference was done in log-frequency domain. 6 8 9 10 11 12 13 0 20 40 60 80 frequency (log2 Hz) intensity (dB HL) (a) Normal hearing model ground truth. 8 9 10 11 12 13 0 20 40 60 80 frequency (log2 Hz) 0 0.2 0.4 0.6 0.8 1 (b) Notch model ground truth. Figure 1: Samples selected by BAMS (red) and the method of Gardner et al. [8] (white) when run on (a) the normal-hearing ground truth, and (b), the NIHL model ground truth. Contours denote probability of detection at 10% intervals. Circles indicate presentations that were heard by the simulated patient; exes indicate presentations that were not heard by the simulated patient. 5.1 Diagnosing NIHL To test our active model-selection approach to diagnosing NIHL, we simulated a series of audiometric tests, selecting tones using three alternatives: BAMS, the algorithm of [8], and random sampling.4 Each algorithm shared a candidate set of 10 000 quasirandom tones X∗generated using a scrambled Halton set so as to densely cover the two-dimensional search space. We simulated nine healthy patients and a total of 27 patients exhibiting a range of NIHL presentations, using independent draws from our notch mean prior in the latter case. For each audiometric test simulation, we initialized with five random tones, then allowed each algorithm to actively select a maximum of 25 additional tones, a very small fraction of the hundreds typically used in a regular audiometric test. We repeated this procedure for each of our nine healthy patients using the normal-patient ground-truth model. We further simulated, for each patient, three separate presentations of NIHL as described above. We plot the posterior probability of the correct model after each iteration for each method in Figure 2. In all runs with both ground-truth models, BAMS was able to rapidly achieve greater than 99% confidence in the correct model without expending the entire budget. Although all methods correctly inferred high healthy posterior probability for the healthy patient, BAMS wass more confident. For the NIHL patients, neither baseline inferred the correct model, whereas BAMS rarely required more than 15 actively chosen samples to confidently make the correct diagnosis. Note that, when BAMS was used on NIHL patients, there was often an initial period during which the healthy model was favored, followed by a rapid shift towards the correct model. This is because our method penalizes the increased complexity of the notch model until sufficient evidence for a notch is acquired. Figure 1 shows the samples selected by BAMS for typical healthy and NIHL patients. The fundamental strategy employed by BAMS in this application is logical: it samples in a row of relatively highintensity tones. The intuition for this design is that failure to recognize a normally heard, high-intensity sound is strong evidence of a notch deficit. Once the notch has been found (Figure 1(b)), BAMS continues to sample within the notch to confirm its existence and rule out the possibility of the miss (tone not heard) being due to the stochasticity of the process. Once satisfied, the BAMS approach then samples on the periphery of the notch to further solidify its belief. The BAMS algorithm sequentially makes observations where the healthy and NIHL model disagree the most, typically in the top-center of the MAP notch location. The exact intensity at which BAMS samples is determined by the prior over the notch-depth parameter d. When we changed the notch depth prior to support shallower or deeper notches (data not shown), BAMS sampled at lower or 4We also compared with uncertainty sampling and query by committee (QBC); the performance was comparable to random sampling and is omitted for clarity. 7 10 20 30 0 0.2 0.4 0.6 0.8 1 iteration Pr(correct model | D) BAMS I(y∗; f | D, Mhealthy) random (a) Notch model ground truth. 10 20 30 0 0.2 0.4 0.6 0.8 1 iteration (b) Normal hearing model ground truth. Figure 2: Posterior probability of the correct model as a function of iteration number. higher intensities, respectively, to continue to maximize model disagreement. Similarly, the spacing between samples is controlled by the prior over the notch-width parameter w. Finally, it is worth emphasizing the stark difference between the sampling pattern of BAMS and the audiometric tests of [8]; see Figure 1. Indeed, when the goal is learning the patient’s audiometric function, the audiometric testing algorithm proposed in that work typically has a very good estimate after 20 samples. However, when using BAMS, the primary goal is to detect or rule out NIHL. As a result, the samples selected by BAMS reveal little about the nuances of the patient’s audiometric function, while being highly informative about the correct model to explain the data. This is precisely the tradeoff one seeks in a large-scale diagnostic setting, highlighting the critical importance of focusing on the model-selection problem directly. 6 Conclusion We introduced a novel information-theoretic approach for active model selection, Bayesian active model selection, and successfully applied it to rapid screening for noise-induced hearing loss. Our method for active model selection does not require model retraining to evaluate candidate points, making it more feasible than previous approaches. Further, we provided an effective and efficient analytic approximation to our criterion that can be used for automatically learning the model class of Gaussian processes with arbitrary observation likelihoods, a rich and commonly used class of potential models. Acknowledgments This material is based upon work supported by the National Science Foundation (NSF) under award number IIA-1355406. Additionally, JRG and KQW are supported by NSF grants IIS-1525919, IIS-1550179, and EFMA-1137211; GM is supported by CAPES/BR; DB acknowledges NIH grant R01-DC009215 as well as the CIMIT; JPC acknowledges the Sloan Foundation. References [1] I. Kononenko. Machine Learning for Medical Diagnosis: History, State of the Art and Perspective. Artificial Intelligence in Medicine, 23(1):89–109, 2001. [2] S. Saria, A. K. Rajani, J. Gould, D. L. Koller, and A. A. Penn. Integration of Early Physiological Responses Predicts Later Illness Severity in Preterm Infants. Science Translational Medicine, 2(48):48ra65, 2010. 8 [3] T. C. Bailey, Y. Chen, Y. Mao, C. Lu, G. Hackmann, S. T. Micek, K. M. Heard, K. M. Faulkner, and M. H. Kollef. A Trial of a Real-Time Alert for Clinical Deterioration in Patients Hospitalized on General Medical Wards. Journal of Hospital Medicine, 8(5):236–242, 2013. [4] J. Shargorodsky, S. G. Curhan, G. C. Curhan, and R. Eavey. Change in Prevalence of Hearing Loss in US Adolescents. Journal of the American Medical Association, 304(7):772–778, 2010. [5] R. Carhart and J. Jerger. Preferred Method for Clinical Determination of Pure-Tone Thresholds. Journal of Speech and Hearing Disorders, 24(4):330–345, 1959. [6] W. Hughson and H. Westlake. Manual for program outline for rehabilitation of aural casualties both military and civilian. Transactions of the American Academy of Ophthalmology and Otolaryngology, 48 (Supplement):1–15, 1944. [7] M. Don, J. J. Eggermont, and D. E. Brackmann. Reconstruction of the audiogram using brain stem responses and high-pass noise masking. Annals of Otology, Rhinology and Laryngology., 88(3 Part 2, Supplement 57):1–20, 1979. [8] J. R. Gardner, X. Song, K. Q. Weinberger, D. Barbour, and J. P. Cunningham. Psychophysical Detection Testing with Bayesian Active Learning. In UAI, 2015. [9] D. J. MacKay. Information Theory, Inference, and Learning Algorithms. Cambridge University Press, 2003. [10] N. Houlsby, F. Huszar, Z. Ghahramani, and J. M. Hern´andez-Lobato. Collaborative Gaussian Processes for Preference Learning. In NIPS, pages 2096–2104, 2012. [11] R. Garnett, M. A. Osborne, and P. Hennig. Active Learning of Linear Embeddings for Gaussian Processes. In UAI, pages 230–239, 2014. [12] J. M. Hern´andez-Lobato, M. W. Hoffman, and Z. Ghahramani. Predictive Entropy Search for Efficient Global Optimization of Black-box Functions. In NIPS, pages 918–926, 2014. [13] N. Houlsby, J. M. Hern´andez-Lobato, and Z. Ghahramani. Cold-start Active Learning with Robust Ordinal Matrix Factorization. In ICML, pages 766–774, 2014. [14] A. Ali, R. Caruana, and A. Kapoor. Active Learning with Model Selection. In AAAI, 2014. [15] J. Kulick, R. Lieck, and M. Toussaint. Active Learning of Hyperparameters: An Expected Cross Entropy Criterion for Active Model Selection. CoRR, abs/1409.7552, 2014. [16] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [17] D. Duvenaud. Automatic Model Construction with Gaussian Processes. PhD thesis, Computational and Biological Learning Laboratory, University of Cambridge, 2014. [18] D. Duvenaud, J. R. Lloyd, R. Grosse, J. B. Tenenbaum, and Z. Ghahramani. Structure Discovery in Nonparametric Regression through Compositional Kernel Search. In ICML, pages 1166–1174, 2013. [19] A. G. Wilson, E. Gilboa, A. Nehorai, and J. P. Cunningham. Fast Kernel Learning for Multidimensional Pattern Extrapolation. In NIPS, pages 3626–3634, 2014. [20] C. Williams and C. Rasmussen. Gaussian processes for regression. In NIPS, 1996. [21] A. E. Raftery. Approximate Bayes Factors and Accounting for Model Uncertainty in Generalised Linear Models. Biometrika, 83(2):251–266, 1996. [22] J. Kuha. AIC and BIC: Comparisons of Assumptions and Performance. Sociological Methods and Research, 33(2):188–229, 2004. [23] G. Schwarz. Estimating the Dimension of a Model. Annals of Statistics, 6(2):461–464, 1978. [24] K. P. Murphy. Machine Learning: A Probabilistic Perspective. MIT Press, 2012. [25] M. Kuss and C. E. Rasmussen. Assessing Approximate Inference for Binary Gaussian Process Classification. Journal of Machine Learning Research, 6:1679–1704, 2005. [26] T. P. Minka. Expectation Propagation for Approximate Bayesian Inference. In UAI, pages 362–369, 2001. [27] D. McBride and S. Williams. Audiometric notch as a sign of noise induced hearing loss. Occupational Environmental Medicine, 58(1):46–51, 2001. [28] D. I. Nelson, R. Y. Nelson, M. Concha-Barrientos, and M. Fingerhut. The global burden of occupational noise-induced hearing loss. American Journal of Industrial Medicine, 48(6):446–458, 2005. 9 | 2015 | 337 |
5,855 | Collaboratively Learning Preferences from Ordinal Data Sewoong Oh , Kiran K. Thekumparampil University of Illinois at Urbana-Champaign {swoh,thekump2}@illinois.edu Jiaming Xu The Wharton School, UPenn jiamingx@wharton.upenn.edu Abstract In personalized recommendation systems, it is important to predict preferences of a user on items that have not been seen by that user yet. Similarly, in revenue management, it is important to predict outcomes of comparisons among those items that have never been compared so far. The MultiNomial Logit model, a popular discrete choice model, captures the structure of the hidden preferences with a low-rank matrix. In order to predict the preferences, we want to learn the underlying model from noisy observations of the low-rank matrix, collected as revealed preferences in various forms of ordinal data. A natural approach to learn such a model is to solve a convex relaxation of nuclear norm minimization. We present the convex relaxation approach in two contexts of interest: collaborative ranking and bundled choice modeling. In both cases, we show that the convex relaxation is minimax optimal. We prove an upper bound on the resulting error with finite samples, and provide a matching information-theoretic lower bound. 1 Introduction In recommendation systems and revenue management, it is important to predict preferences on items that have not been seen by a user or predict outcomes of comparisons among those that have never been compared. Predicting such hidden preferences would be hopeless without further assumptions on the structure of the preference. Motivated by the success of matrix factorization models on collaborative filtering applications, we model hidden preferences with low-rank matrices to collaboratively learn preference matrices from ordinal data. This paper considers the following scenarios: • Collaborative ranking. Consider an online market that collects each user’s preference as a ranking over a subset of items that are ‘seen’ by the user. Such data can be obtained by directly asking to compare some items, or by indirectly tracking online activities on which items are viewed, how much time is spent on the page, or how the user rated the items. In order to make personalized recommendations, we want a model which (a) captures how users who prefer similar items are also likely to have similar preferences on unseen items, (b) predicts which items a user might prefer, by learning from such ordinal data. • Bundled choice modeling. Discrete choice models describe how a user makes decisions on what to purchase. Typical choice models assume the willingness to buy an item is independent of what else the user bought. In many cases, however, we make ‘bundled’ purchases: we buy particular ingredients together for one recipe or we buy two connecting flights. One choice (the first flight) has a significant impact on the other (the connecting flight). In order to optimize the assortment (which flight schedules to offer) for maximum expected revenue, it is crucial to accurately predict the willingness of the consumers to purchase, based on past history. We consider a case where there are two types of products (e.g. jeans and shirts), and want (a) a model that captures such interacting preferences for pairs of items, one from each category; and (b) to predict the consumer’s choice probabilities on pairs of items, by learning such models from past purchase history. 1 We use a discrete choice model known as MultiNomial Logit (MNL) model [1] (described in Section 2.1) to represent the preferences. In collaborative ranking context, MNL uses a low-rank matrix to represent the hidden preferences of the users. Each row corresponds to a user’s preference over all the items, and when presented with a subset of items the user provides a ranking over those items, which is a noisy version of the hidden true preference. The low-rank assumption naturally captures the similarities among users and items, by representing each on a low-dimensional space. In bundled choice modeling context, the low-rank matrix now represents how pairs of items are matched. Each row corresponds to an item from the first category and each column corresponds to an item from the second category. An entry in the matrix represents how much the pair is preferred by a randomly chosen user from a pool of users. Notice that in this case we do not model individual preferences, but the preference of the whole population. The purchase history of the population is the record of which pair was chosen among a subsets of items that were presented, which is again a noisy version of the hidden true preference. The low-rank assumption captures the similarities and dis-similarities among the items in the same category and the interactions across categories. Contribution. A natural approach to learn such a low-rank model, from noisy observations, is to solve a convex relaxation of nuclear norm minimization (described in Section 2.2), since nuclear norm is the tightest convex surrogate for the rank function. We present such an approach for learning the MNL model from ordinal data, in two contexts: collaborative ranking and bundled choice modeling. In both cases, we analyze the sample complexity of the algorithm, and provide an upper bound on the resulting error with finite samples. We prove minimax-optimality of our approach by providing a matching information-theoretic lower bound (up to a poly-logarithmic factor). Technically, we utilize the Random Utility Model (RUM) [2, 3, 4] interpretation (outlined in Section 2.1) of the MNL model to prove both the upper bound and the fundamental limit, which could be of interest to analyzing more general class of RUMs. Related work. In the context of collaborative ranking, MNL models have been proposed to model partial rankings from a pool of users. Recently, there has been new algorithms and analyses of those algorithms to learn MNL models from samples, in the case when each user provides pair-wise comparisons [5, 6]. [6] proposes solving a convex relaxation of maximizing the likelihood over matrices with bounded nuclear norm. It is shown that this approach achieves statistically optimal generalization error rate, instead of Frobenius norm error that we analyze. Our analysis techniques are inspired by [5], which proposed the convex relaxation for learning MNL, but when the users provide only pair-wise comparisons. In this paper, we generalize the results of [5] by analyzing more general sampling models beyond pairwise comparisons. The remainder of the paper is organized as follows. In Section 2, we present the MNL model and propose a convex relaxation for learning the model, in the context of collaborative ranking. We provide theoretical guarantees for collaborative ranking in Section 3. In Section 4, we present the problem statement for bundled choice modeling, and analyze a similar convex relaxation approach. Notations. We use |||A|||F and |||A|||∞to denote the Frobenius norm and the ℓ∞norm, |||A|||nuc = P i σi(A) to denote the nuclear norm where σi(A) denote the i-th singular value, and |||A|||2 = σ1(A) for the spectral norm. We use ⟨⟨u, v⟩⟩= P i uivi and ∥u∥to denote the inner product and the Euclidean norm. All ones vector is denoted by 1 and I(A) is the indicator function of the event A. The set of the fist N integers are denoted by [N] = {1, . . . , N}. 2 Model and Algorithm In this section, we present a discrete choice modeling for collaborative ranking, and propose an inference algorithm for learning the model from ordinal data. 2.1 MultiNomial Logit (MNL) model for comparative judgment In collaborative ranking, we want to model how people who have similar preferences on a subset of items are likely to have similar tastes on other items as well. When users provide ratings, as in collaborative filtering applications, matrix factorization models are widely used since the low-rank structure captures the similarities between users. When users provide ordered preferences, we use a discrete choice model known as MultiNomial Logit (MNL) [1] model that has a similar low-rank structure that captures the similarities between users and items. 2 Let Θ∗be the d1 × d2 dimensional matrix capturing the preference of d1users on d2 items, where the rows and columns correspond to users and items, respectively. Typically, Θ∗is assumed to be low-rank, having a rank r that is much smaller than the dimensions. However, in the following we allow a more general setting where Θ∗might be only approximately low rank. When a user i is presented with a set of alternatives Si ⊆[d2], she reveals her preferences as a ranked list over those items. To simplify the notations we assume all users compare the same number k of items, but the analysis naturally generalizes to the case when the size might differ from a user to a user. Let vi,ℓ∈Si denote the (random) ℓ-th best choice of user i. Each user gives a ranking, independent of other users’ rankings, from P {vi,1, . . . , vi,k} = k Y ℓ=1 e Θ∗ i,vi,ℓ P j∈Si,ℓeΘ∗ i,j , (1) where with Si,ℓ≡Si \ {vi,1, . . . , vi,ℓ−1} and Si,1 ≡Si. For a user i, the i-th row of Θ∗represents the underlying preference vector of the user, and the more preferred items are more likely to be ranked higher. The probabilistic nature of the model captures the noise in the revealed preferences. The random utility model (RUM), pioneered by [2, 3, 4], describes the choices of users as manifestations of the underlying utilities. The MNL models is a special case of RUM where each decision maker and each alternative are represented by a r-dimensional feature vectors ui and vj respectively, such that Θ∗ ij = ⟨⟨ui, vj⟩⟩, resulting in a low-rank matrix. When presented with a set of alternatives Si, the decision maker i ranks the alternatives according to their random utility drawn from Uij = ⟨⟨ui, vj⟩⟩+ ξij , (2) for item j, where ξij follow the standard Gumbel distribution. Intuitively, this provides a justification for the MNL model as modeling the decision makers as rational being, seeking to maximize utility. Technically, this RUM interpretation plays a crucial role in our analysis, in proving restricted strong convexity in Appendix A.5 and also in proving fundamental limit in Appendix C. There are a few cases where the Maximum Likelihood (ML) estimation for RUM is tractable. One notable example is the Plackett-Luce (PL) model, which is a special case of the MNL model where Θ∗is rank-one and all users have the same features. PL model has been widely applied in econometrics [1], analyzing elections [7], and machine learning [8]. Efficient inference algorithms has been proposed [9, 10, 11], and the sample complexity has been analyzed for the MLE [12] and for the Rank Centrality [13]. Although PL is quite restrictive, in the sense that it assumes all users share the same features, little is known about inference in RUMs beyond PL. Recently, to overcome such a restriction, mixed PL models have been studied, where Θ∗is rank-r but there are only r classes of users and all users in the same class have the same features. Efficient inference algorithms with provable guarantees have been proposed by applying recent advances in tensor decomposition methods [14, 15], directly clustering the users [16, 17], or using sampling methods [18]. However, this mixture PL is still restrictive, and both clustering and tensor based approaches rely heavily on the fact that the distribution is a “mixture” and require additional incoherence assumptions on Θ∗. For more general models, efficient inference algorithms have been proposed [19] but no performance guarantee is known for finite samples. Although the MLE for the general MNL model in (1) is intractable, we provide a polynomial-time inference algorithm with provable guarantees. 2.2 Nuclear norm minimization Assuming Θ∗is well approximated by a low-rank matrix, we estimate Θ∗by solving the following convex relaxation given the observed preference in the form of ranked lists {(vi,1, . . . , vi,k)}i∈[d1]. bΘ ∈arg min Θ∈ΩL(Θ) + λ|||Θ|||nuc, (3) where the (negative) log likelihood function according to (1) is L(Θ) = −1 k d1 d1 X i=1 k X ℓ=1 ⟨⟨Θ, eieT vi,ℓ⟩⟩−log X j∈Si,ℓ exp ⟨⟨Θ, eieT j ⟩⟩ , (4) with Si = {vi,1, . . . , vi,k} and Si,ℓ≡Si\{vi,1, . . . , vi,ℓ−1}, and appropriately chosen set Ωdefined in (7). Since nuclear norm is a tight convex surrogate for the rank, the above optimization searches 3 for a low-rank solution that maximizes the likelihood. Nuclear norm minimization has been widely used in rank minimization problems [20], but provable guarantees typically exists only for quadratic loss function L(Θ) [21, 22]. Our analysis extends such analysis techniques to identify the conditions under which restricted strong convexity is satisfied for a convex loss function that is not quadratic. 3 Collaborative ranking from k-wise comparisons We first provide background on the MNL model, and then present main results on the performance guarantees. Notice that the distribution (1) is independent of shifting each row of Θ∗by a constant. Hence, there is an equivalent class of Θ∗that gives the same distributions for the ranked lists: [Θ∗] = {A ∈Rd1×d2 | A = Θ∗+ u 1T for some u ∈Rd1} . (5) Since we can only estimate Θ∗up to this equivalent class, we search for the one whose rows sum to zero, i.e. P j∈[d2] Θ∗ i,j = 0 for all i ∈[d1]. Let α ≡maxi,j1,j2 |Θ∗ ij1 −Θ∗ ij2| denote the dynamic range of the underlying Θ∗, such that when k items are compared, we always have 1 k e−α ≤ 1 1 + (k −1)eα ≤P {vi,1 = j} ≤ 1 1 + (k −1)e−α ≤1 k eα , (6) for all j ∈Si, all Si ⊆[d2] satisfying |Si| = k and all i ∈[d1]. We do not make any assumptions on α other than that α = O(1) with respect to d1 and d2. The purpose of defining the dynamic range in this way is that we seek to characterize how the error scales with α. Given this definition, we solve the optimization in (3) over Ωα = n A ∈Rd1×d2 |||A|||∞≤α, and ∀i ∈[d1] we have X j∈[d2] Aij = 0 o . (7) While in practice we do not require the ℓ∞norm constraint, we need it for the analysis. For a related problem of matrix completion, where the loss L(θ) is quadratic, either a similar condition on ℓ∞ norm is required or a different condition on incoherence is required. 3.1 Performance guarantee We provide an upper bound on the resulting error of our convex relaxation, when a multi-set of items Si presented to user i is drawn uniformly at random with replacement. Precisely, for a given k, Si = {ji,1, . . . , ji,k} where ji,ℓ’s are independently drawn uniformly at random over the d2 items. Further, if an item is sampled more than once, i.e. if there exists ji,ℓ1 = ji,ℓ2 for some i and ℓ1 ̸= ℓ2, then we assume that the user treats these two items as if they are two distinct items with the same MNL weights Θ∗ i,ji,ℓ1 = Θ∗ i,ji,ℓ2 .The resulting preference is therefore always over k items (with possibly multiple copies of the same item), and distributed according to (1). For example, if k = 3, it is possible to have Si = {ji,1 = 1, ji,2 = 1, ji,3 = 2}, in which case the resulting ranking can be (vi,1 = ji,1, vi,2 = ji,3, vi,3 = ji,2) with probability (eΘ∗ i,1)/(2 eΘ∗ i,1 + eΘ∗ i,2) × (eΘ∗ i,2)/(eΘ∗ i,1 + eΘ∗ i,2). Such sampling with replacement is necessary for the analysis, where we require independence in the choice of the items in Si in order to apply the symmetrization technique (e.g. [23]) to bound the expectation of the deviation (cf. Appendix A.5). Similar sampling assumptions have been made in existing analyses on learning low-rank models from noisy observations, e.g. [22]. Let d ≡(d1 + d2)/2, and let σj(Θ∗) denote the j-th singular value of the matrix Θ∗. Define λ0 ≡ e2α s d1 log d + d2 (log d)2(log 2d)4 k d2 1 d2 . Theorem 1. Under the described sampling model, assume 24 ≤k ≤min{d2 1 log d, (d2 1 + d2 2)/(2d1) log d, (1/e) d2(4 log d2+2 log d1)}, and λ ∈[480λ0, c0λ0] with any constant c0 = O(1) larger than 480. Then, solving the optimization (3) achieves 1 d1d2 bΘ −Θ∗ 2 F ≤288 √ 2 e4αc0λ0 √r bΘ −Θ∗ F + 288e4αc0λ0 min{d1,d2} X j=r+1 σj(Θ∗) , (8) for any r ∈{1, . . . , min{d1, d2}} with probability at least 1 −2d−3 −d−3 2 where d = (d1 + d2)/2. 4 A proof is provided in Appendix A. The above bound shows a natural splitting of the error into two terms, one corresponding to the estimation error for the rank-r component and the second one corresponding to the approximation error for how well one can approximate Θ∗with a rank-r matrix. This bound holds for all values of r and one could potentially optimize over r. We show such results in the following corollaries. Corollary 3.1 (Exact low-rank matrices). Suppose Θ∗has rank at most r. Under the hypotheses of Theorem 1, solving the optimization (3) with the choice of the regularization parameter λ ∈ [480λ0, c0λ0] achieves with probability at least 1 −2d−3 −d−3 2 , 1 √d1d2 bΘ −Θ∗ F ≤288 √ 2e6αc0 s r(d1 log d + d2 (log d)2(log 2d)4) k d1 . (9) The number of entries is d1d2 and we rescale the Frobenius norm error appropriately by 1/√d1d2. When Θ∗is a rank-r matrix, then the degrees of freedom in representing Θ∗is r(d1 + d2) −r2 = O(r(d1 +d2)). The above theorem shows that the total number of samples, which is (k d1), needs to scale as O(rd1(log d) + rd2 (log d)2(log 2d)4 in order to achieve an arbitrarily small error. This is only poly-logarithmic factor larger than the degrees of freedom. In Section 3.2, we provide a lower bound on the error directly, that matches the upper bound up to a logarithmic factor. The dependence on the dynamic range α, however, is sub-optimal. It is expected that the error increases with α, since the Θ∗scales as α, but the exponential dependence in the bound seems to be a weakness of the analysis, as seen from numerical experiments in the right panel of Figure 1. Although the error increase with α, numerical experiments suggests that it only increases at most linearly. However, tightening the scaling with respect to α is a challenging problem, and such suboptimal dependence is also present in existing literature for learning even simpler models, such as the Bradley-Terry model [13] or the Plackett-Luce model [12], which are special cases of the MNL model studied in this paper. A practical issue in achieving the above rate is the choice of λ, since the dynamic range α is not known in advance. Figure 1 illustrates that the error is not sensitive to the choice of λ for a wide range. Another issue is that the underlying matrix might not be exactly low rank. It is more realistic to assume that it is approximately low rank. Following [22] we formalize this notion with “ℓq-ball” of matrices defined as Bq(ρq) ≡ {Θ ∈Rd1×d2 | X j∈[min{d1,d2}] |σj(Θ∗)|q ≤ρq} . (10) When q = 0, this is a set of rank-ρ0 matrices. For q ∈(0, 1], this is set of matrices whose singular values decay relatively fast. Optimizing the choice of r in Theorem 1, we get the following result. Corollary 3.2 (Approximately low-rank matrices). Suppose Θ∗∈Bq(ρq) for some q ∈(0, 1] and ρq > 0. Under the hypotheses of Theorem 1, solving the optimization (3) with the choice of the regularization parameter λ ∈[480λ0, c0λ0] achieves with probability at least 1 −2d−3, 1 √d1d2 bΘ −Θ∗ F ≤ 2√ρq √d1d2 288 √ 2c0e6α s d1d2(d1 log d + d2 (log d)2(log 2d)2) k d1 2−q 2 . (11) This is a strict generalization of Corollary 3.1. For q = 0 and ρ0 = r, this recovers the exact low-rank estimation bound up to a factor of two. For approximate low-rank matrices in an ℓq-ball, we lose in the error exponent, which reduces from one to (2 −q)/2. A proof of this Corollary is provided in Appendix B. The left panel of Figure 1 confirms the scaling of the error rate as predicted by Corollary 3.1. The lines merge to a single line when the sample size is rescaled appropriately. We make a choice of λ = (1/2) p (log d)/(kd2), This choice is independent of α and is smaller than proposed in Theorem 1. We generate random rank-r matrices of dimension d × d, where Θ∗= UV T with U ∈Rd×r and V ∈Rd×r entries generated i.i.d from uniform distribution over [0, 1]. Then the 5 0.01 0.1 1 1000 10000 r=3,d=50 0.01 0.1 1 1000 10000 r=3,d=50 r=6,d=50 0.01 0.1 1 1000 10000 r=3,d=50 r=6,d=50 r=12,d=50 0.01 0.1 1 1000 10000 r=3,d=50 r=6,d=50 r=12,d=50 r=24,d=50 RMSE sample size k 0.1 1 1 10 100 1000 10000 100000 RMSE λ √ (log d)/(kd2) α = 15 α = 10 α = 5 Figure 1: The (rescaled) RMSE scales as p r(log d)/k as expected from Corollary 3.1 for fixed d = 50 (left). In the inset, the same data is plotted versus rescaled sample size k/(r log d). The (rescaled) RMSE is stable for a broad range of λ and α for fixed d = 50 and r = 3 (right). row-mean is subtracted form each row, and then the whole matrix is scaled such that the largest entry is α = 5. Note that this operation does not increase the rank of the matrix Θ. This is because this de-meaning can be written as Θ −Θ11T /d2 and both terms in the operation are of the same column space as Θ which is of rank r. The root mean squared error (RMSE) is plotted where RMSE = (1/d)|||Θ∗−bΘ|||F. We implement and solve the convex optimization (3) using proximal gradient descent method as analyzed in [24]. The right panel in Figure 1 illustrates that the actual error is insensitive to the choice of λ for a broad range of λ ∈[ p (log d)/(kd2), 28p (log d)/(kd2)], after which it increases with λ. 3.2 Information-theoretic lower bound for low-rank matrices For a polynomial-time algorithm of convex relaxation, we gave in the previous section a bound on the achievable error. We next compare this to the fundamental limit of this problem, by giving a lower bound on the achievable error by any algorithm (efficient or not). A simple parameter counting argument indicates that it requires the number of samples to scale as the degrees of freedom i.e., kd1 ∝r(d1 + d2), to estimate a d1 × d2 dimensional matrix of rank r. We construct an appropriate packing over the set of low-rank matrices with bounded entries in Ωα defined as (7), and show that no algorithm can accurately estimate the true matrix with high probability using the generalized Fano’s inequality. This provides a constructive argument to lower bound the minimax error rate, which in turn establishes that the bounds in Theorem 1 is sharp up to a logarithmic factor, and proves no other algorithm can significantly improve over the nuclear norm minimization. Theorem 2. Suppose Θ∗has rank r. Under the described sampling model, for large enough d1 and d2 ≥d1, there is a universal numerical constant c > 0 such that inf bΘ sup Θ∗∈Ωα E h 1 √d1d2 bΘ −Θ∗ F i ≥ c min ( αe−α r r d2 k d1 , αd2 √d1d2 log d ) , (12) where the infimum is taken over all measurable functions over the observed ranked lists {(vi,1, . . . , vi,k)}i∈[d1]. A proof of this theorem is provided in Appendix C. The term of primary interest in this bound is the first one, which shows the scaling of the (rescaled) minimax rate as p r(d1 + d2)/(kd1) (when d2 ≥d1), and matches the upper bound in (8). It is the dominant term in the bound whenever the number of samples is larger than the degrees of freedom by a logarithmic factor, i.e., kd1 > r(d1+d2) log d, ignoring the dependence on α. This is a typical regime of interest, where the sample size is comparable to the latent dimension of the problem. In this regime, Theorem 2 establishes that the upper bound in Theorem 1 is minimax-optimal up to a logarithmic factor in the dimension d. 6 4 Choice modeling for bundled purchase history In this section, we use the MNL model to study another scenario of practical interest: choice modeling from bundled purchase history. In this setting, we assume that we have bundled purchase history data from n users. Precisely, there are two categories of interest with d1 and d2 alternatives in each category respectively. For example, there are d1 tooth pastes to choose from and d2 tooth brushes to choose from. For the i-th user, a subset Si ⊆[d1] of alternatives from the first category is presented along with a subset Ti ⊆[d2] of alternatives from the second category. We use k1 and k2 to denote the number of alternatives presented to a single user, i.e. k1 = |Si| and k2 = |Ti|, and we assume that the number of alternatives presented to each user is fixed, to simplify notations. Given these sets of alternatives, each user makes a ‘bundled’ purchase and we use (ui, vi) to denote the bundled pair of alternatives (e.g. a tooth brush and a tooth paste) purchased by the i-th user. Each user makes a choice of the best alternative, independent of other users’s choices, according to the MNL model as P {(ui, vi) = (j1, j2)} = eΘ∗ j1,j2 P j′ 1∈Si,j′ 2∈Ti e Θ∗ j′ 1,j′ 2 , (13) for all j1 ∈Si and j2 ∈Ti. The distribution (13) is independent of shifting all the values of Θ∗by a constant. Hence, there is an equivalent class of Θ∗that gives the same distribution for the choices: [Θ∗] ≡{A ∈Rd1×d2 | A = Θ∗+ c11T for some c ∈R} . Since we can only estimate Θ∗up to this equivalent class, we search for the one that sum to zero, i.e. P j1∈[d1],j2∈[d2] Θ∗ j1,j2 = 0. Let α = maxj1,j′ 1∈[d1],j2,j′ 2∈[d2] |Θ∗ j1,j2 −Θ∗ j′ 1,j′ 2|, denote the dynamic range of the underlying Θ∗, such that when k1 × k2 alternatives are presented, we always have 1 k1k2 e−α ≤P {(ui, vi) = (j1, j2)} ≤ 1 k1k2 eα , (14) for all (j1, j2) ∈Si × Ti and for all Si ⊆[d1] and Ti ⊆[d2] such that |Si| = k1 and |Ti| = k2. We do not make any assumptions on α other than that α = O(1) with respect to d1 and d2. Assuming Θ∗is well approximate by a low-rank matrix, we solve the following convex relaxation, given the observed bundled purchase history {(ui, vi, Si, Ti)}i∈[n]: bΘ ∈ arg min Θ∈Ω′α L(Θ) + λ|||Θ|||nuc , (15) where the (negative) log likelihood function according to (13) is L(Θ) = −1 n n X i=1 ⟨⟨Θ, euieT vi⟩⟩−log X j1∈Si,j2∈Ti exp ⟨⟨Θ, ej1eT j2⟩⟩ , and (16) Ω′ α ≡ n A ∈Rd1×d2 |||A|||∞≤α, and X j1∈[d1],j2∈[d2] Aj1,j2 = 0 o . (17) Compared to collaborative ranking, (a) rows and columns of Θ∗correspond to an alternative from the first and second category, respectively; (b) each sample corresponds to the purchase choice of a user which follow the MNL model with Θ∗; (c) each person is presented subsets Si and Ti of items from each category; (d) each sampled data represents the most preferred bundled pair of alternatives. 4.1 Performance guarantee We provide an upper bound on the error achieved by our convex relaxation, when the multi-set of alternatives Si from the first category and Ti from the second category are drawn uniformly at random with replacement from [d1] and [d2] respectively. Precisely, for given k1 and k2, we let Si = {j(i) 1,1, . . . , j(i) 1,k1} and Ti = {j(i) 2,1, . . . , j(i) 2,k2}, where j(i) 1,ℓ’s and j(i) 2,ℓ’s are independently drawn uniformly at random over the d1 and d2 alternatives, respectively. Similar to the previous section, this sampling with replacement is necessary for the analysis. Define λ1 = s e2α max{d1, d2} log d n d1 d2 . (18) 7 Theorem 3. Under the described sampling model, assume 16e2α min{d1, d2} log d ≤n ≤ min{d5, k1k2 max{d2 1, d2 2}} log d, and λ ∈[8λ1, c1λ1] with any constant c1 = O(1) larger than max{8, 128/ p min{k1, k2}}. Then, solving the optimization (15) achieves 1 d1d2 bΘ −Θ∗ 2 F ≤48 √ 2 e2αc1λ1 √r bΘ −Θ∗ F + 48e2αc1λ1 min{d1,d2} X j=r+1 σj(Θ∗) , (19) for any r ∈{1, . . . , min{d1, d2}} with probability at least 1 −2d−3 where d = (d1 + d2)/2. A proof is provided in Appendix D. Optimizing over r gives the following corollaries. Corollary 4.1 (Exact low-rank matrices). Suppose Θ∗has rank at most r. Under the hypotheses of Theorem 3, solving the optimization (15) with the choice of the regularization parameter λ ∈ [8λ1, c1λ1] achieves with probability at least 1 −2d−3, 1 √d1d2 bΘ −Θ∗ F ≤48 √ 2e3αc1 r r(d1 + d2) log d n . (20) This corollary shows that the number of samples n needs to scale as O(r(d1 + d2) log d) in order to achieve an arbitrarily small error. This is only a logarithmic factor larger than the degrees of freedom. We provide a fundamental lower bound on the error, that matches the upper bound up to a logarithmic factor. For approximately low-rank matrices in an ℓ1-ball as defined in (10), we show an upper bound on the error, whose error exponent reduces from one to (2 −q)/2. Corollary 4.2 (Approximately low-rank matrices). Suppose Θ∗∈Bq(ρq) for some q ∈(0, 1] and ρq > 0. Under the hypotheses of Theorem 3, solving the optimization (15) with the choice of the regularization parameter λ ∈[8λ1, c1λ1] achieves with probability at least 1 −2d−3, 1 √d1d2 bΘ −Θ∗ F ≤ 2√ρq √d1d2 48 √ 2c1e3α r d1d2(d1 + d2) log d n ! 2−q 2 . (21) Since the proof is almost identical to the proof of Corollary 3.2 in Appendix B, we omit it. Theorem 4. Suppose Θ∗has rank r. Under the described sampling model, there is a universal constant c > 0 such that that the minimax rate where the infimum is taken over all measurable functions over the observed purchase history {(ui, vi, Si, Ti)}i∈[n] is lower bounded by inf bΘ sup Θ∗∈Ωα E h 1 √d1d2 bΘ −Θ∗ F i ≥ c min (r e−5α r (d1 + d2) n , α(d1 + d2) √d1d2 log d ) . (22) See Appendix E.1 for the proof. The first term is dominant, and when the sample size is comparable to the latent dimension of the problem, Theorem 3 is minimax optimal up to a logarithmic factor. 5 Discussion We presented a convex program to learn MNL parameters from ordinal data, motivated by two scenarios: recommendation systems and bundled purchases. We take the first principle approach of identifying the fundamental limits and also developing efficient algorithms matching those fundamental trade offs. There are several remaining challenges. (a) Nuclear norm minimization, while polynomial-time, is still slow. We want first-order methods that are efficient with provable guarantees. The main challenge is providing a good initialization to start such non-convex approaches. (b) For simpler models, such as the PL model, more general sampling over a graph has been studied. We want analytical results for more general sampling. (c) The practical use of the model and the algorithm needs to be tested on real datasets on purchase history and recommendations. Acknowledgments This research is supported in part by NSF CMMI award MES-1450848 and NSF SaTC award CNS1527754. 8 References [1] Daniel McFadden. Conditional logit analysis of qualitative choice behavior. 1973. [2] Louis L Thurstone. A law of comparative judgment. Psychological review, 34(4):273, 1927. [3] Jacob Marschak. Binary-choice constraints and random utility indicators. In Proceedings of a symposium on mathematical methods in the social sciences, volume 7, pages 19–38, 1960. [4] D. R. Luce. Individual Choice Behavior. Wiley, New York, 1959. [5] Yu Lu and Sahand N Negahban. Individualized rank aggregation using nuclear norm regularization. arXiv preprint arXiv:1410.0860, 2014. [6] Dohyung Park, Joe Neeman, Jin Zhang, Sujay Sanghavi, and Inderjit S Dhillon. Preference completion: Large-scale collaborative ranking from pairwise comparisons. 2015. [7] Isobel Claire Gormley and Thomas Brendan Murphy. A grade of membership model for rank data. Bayesian Analysis, 4(2):265–295, 2009. [8] Tie-Yan Liu. Learning to rank for information retrieval. Foundations and Trends in Information Retrieval, 3(3):225–331, 2009. [9] D. R. Hunter. Mm algorithms for generalized bradley-terry models. Annals of Statistics, pages 384–406, 2004. [10] John Guiver and Edward Snelson. Bayesian inference for plackett-luce ranking models. In proceedings of the 26th annual international conference on machine learning, pages 377–384. ACM, 2009. [11] Francois Caron and Arnaud Doucet. Efficient bayesian inference for generalized bradley–terry models. Journal of Computational and Graphical Statistics, 21(1):174–196, 2012. [12] B. Hajek, S. Oh, and J. Xu. Minimax-optimal inference from partial rankings. In Advances in Neural Information Processing Systems, pages 1475–1483, 2014. [13] S. Negahban, S. Oh, and D. Shah. Iterative ranking from pair-wise comparisons. In NIPS, pages 2483– 2491, 2012. [14] S. Oh and D. Shah. Learning mixed multinomial logit model from ordinal data. In Advances in Neural Information Processing Systems, pages 595–603, 2014. [15] W. Ding, P. Ishwar, and V. Saligrama. A topic modeling approach to rank aggregation. Boston University Center for Info. and Systems Engg. Technical Report http://www.bu.edu/systems/publications, 2014. [16] A. Ammar, S. Oh, D. Shah, and L. Voloch. What’s your choice? learning the mixed multi-nomial logit model. In Proceedings of the ACM SIGMETRICS/international conference on Measurement and modeling of computer systems, 2014. [17] Rui Wu, Jiaming Xu, R Srikant, Laurent Massouli´e, Marc Lelarge, and Bruce Hajek. Clustering and inference from pairwise comparisons. arXiv preprint arXiv:1502.04631, 2015. [18] H. Azari Soufiani, H. Diao, Z. Lai, and D. C. Parkes. Generalized random utility models with multiple types. In Advances in Neural Information Processing Systems, pages 73–81, 2013. [19] H. A. Soufiani, D. C. Parkes, and L. Xia. Random utility theory for social choice. In NIPS, pages 126–134, 2012. [20] B. Recht, M. Fazel, and P. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [21] E. J. Cand`es and B. Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009. [22] S. Negahban and M. J. Wainwright. Restricted strong convexity and (weighted) matrix completion: Optimal bounds with noise. Journal of Machine Learning Research, 2012. [23] St´ephane Boucheron, G´abor Lugosi, and Pascal Massart. Concentration inequalities: A nonasymptotic theory of independence. Oxford University Press, 2013. [24] A. Agarwal, S. Negahban, and M. Wainwright. Fast global convergence rates of gradient methods for high-dimensional statistical recovery. In In NIPS, pages 37–45, 2010. [25] J. Tropp. User-friendly tail bounds for sums of random matrices. Foundations of Comput. Math., 2011. [26] S. Van De Geer. Empirical Processes in M-estimation, volume 6. Cambridge university press, 2000. [27] M. Ledoux. The concentration of measure phenomenon. Number 89. American Mathematical Soc., 2005. 9 | 2015 | 338 |
5,856 | Shepard Convolutional Neural Networks Jimmy SJ. Ren∗ SenseTime Group Limited rensijie@sensetime.com Li Xu SenseTime Group Limited xuli@sensetime.com Qiong Yan SenseTime Group Limited yanqiong@sensetime.com Wenxiu Sun SenseTime Group Limited sunwenxiu@sensetime.com Abstract Deep learning has recently been introduced to the field of low-level computer vision and image processing. Promising results have been obtained in a number of tasks including super-resolution, inpainting, deconvolution, filtering, etc. However, previously adopted neural network approaches such as convolutional neural networks and sparse auto-encoders are inherently with translation invariant operators. We found this property prevents the deep learning approaches from outperforming the state-of-the-art if the task itself requires translation variant interpolation (TVI). In this paper, we draw on Shepard interpolation and design Shepard Convolutional Neural Networks (ShCNN) which efficiently realizes endto-end trainable TVI operators in the network. We show that by adding only a few feature maps in the new Shepard layers, the network is able to achieve stronger results than a much deeper architecture. Superior performance on both image inpainting and super-resolution is obtained where our system outperforms previous ones while keeping the running time competitive. 1 Introduction In the past a few years, deep learning has been very successful in addressing many aspects of visual perception problems such as image classification, object detection, face recognition [1, 2, 3], to name a few. Inspired by the breakthrough in high-level computer vision, several attempts have been made very recently to apply deep learning methods in low-level vision as well as image processing tasks. Encouraging results has been obtained in a number of tasks including image super-resolution [4], inpainting [5], denosing [6], image deconvolution [7], dirt removal [8], edge-aware filtering [9] etc. Powerful models with multiple layers of nonlinearity such as convolutional neural networks (CNN), sparse auto-encoders, etc. were used in the previous studies. Notwithstanding the rapid progress and promising performance, we notice that the building blocks of these models are inherently translation invariant when applying to images. The property makes the network architecture less efficient in handling translation variant operators, exemplified by the image interpolation operation. Figure 1 illustrates the problem of image inpainting, a typical translation variant interpolation (TVI) task. The black region in figure 1(a) indicates the missing region where the four selected patches with missing parts are visualized in figure 1(b). The interpolation process for the central pixel in each patch is done by four different weighting functions shown in the bottom of figure 1(b). This process cannot be simply modeled by a single kernel due to the inherent spatially varying property. In fact, the TVI operations are common in many vision applications. Image super-resolution, which aims to interpolate a high resolution image with a low resolution observation also suffers from the ∗Project page: http://www.deeplearning.cc/shepardcnn 1 (a) 0 0 0 0 0 0 0 0 0 0 0 2 0 0 2 2 3 0 1 1 2 3 2 2 0 1 4 2 2 1 3 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 2 2 1 1 1 1 2 2 0 2 1 0 0 2 1 0 0 2 1 0 0 0 3 2 1 0 0 0 0 0 (b) Figure 1: Illustration of translation variant interpolation. (a) The application of inpainting. The black regions indicate the missing part. (b) Four selected patches. The bottom row shows the kernels for interpolating the central pixel of each patch. same problem: different local patches have different pattern of anchor points. We will show that it is thus less optimal to use the traditional convolutional neural network to do the translation variant operations for super-resolution task. In this paper, we draw on Shepard method [10] and devise a novel CNN architecture named Shepard Convolutional Neural Networks (ShCNN) which efficiently equips conventional CNN with the ability to learn translation variant operations for irregularly spaced data. By adding only a few feature maps in the new Shepard layer and optimizing a more powerful TVI procedure in the endto-end fashion, the network is able to achieve stronger results than a much deeper architecture. We demonstrate that the resulting system is general enough to benefit a number of applications with TVI operations. 2 Related Work Deep learning methods have recently been introduced to the area of low-level computer vision and image processing. Burger et al. [6] used a simple multi-layer neural network to directly learn a mapping between noisy and clear image patches. Xie et al. [5] adopted a sparse auto-encoder and demonstrated its ability to do blind image inpainting. A three-layer CNN was used in [8] to tackle of problem of rain drop and dirt. It demonstrated the ability of CNN to blindly handle translation variant problem in real world challenges. Xu et al. [7] advocated the use of generative approaches to guide the design of the CNN for deconvolution tasks. In [9], edge-aware filters can be well approximated using CNN. While it is feasible to use the translation invariant operators, such as convolution, to obtain the translation variant results in a deep neural network architecture, it is less effective in achieving high quality results for interpolation operations. The first attempt using CNN to perform image super-resolution [4] connected the CNN approach to the sparse coding ones. But it failed to beat the state-of-the-art super resolution system [11]. In this paper, we focus on the design of deep neural network layer that better fits the translation variant interpolation tasks. We note that TVI is the essential step for a wide range of 2 low-level vision applications including inpainting, dirt removal, noise suppression, super-resolution, to name a few. 3 Analysis Deep learning approaches without explicit TVI mechanism generated reasonable results in a few tasks requiring translation variant property. To some extent, deep architecture with multiple layers of nonlinearity is expressive to approximate certain TVI operations given sufficient amount of training data. It is, however, non-trivial to beat non-CNN based approaches while ensuring the high efficiency and simplicity. To see this, we experimented with the CNN architecture in [4] and [8] and trained a CNN with three convolutional layers by using 1 million synthetic corrupted/clear image pairs. Network and training details as well as the concrete statistics of the data will be covered in the experiment section. Typical test images are shown in the left column of figure 2 whereas the results of this model are displayed in the mid-left column of the same figure. We found that visually very similar results as in [5] are obtained, namely obvious residues of the text are still left in the images. We also experimented with a much deeper network by adding more convolutional layers, virtually replicating the network in [8] by 2,3, and 4 times. Although slight visual differences are found in the results, no fundamental improvement in the missing regions is observed, namely residue still remains. A sensible next step is to explicitly inform the network about where the missing pixels are so that the network has the opportunity to figure out more plausible solutions for TVI operations. For many applications, the underlying mask indicating the processed regions can be detected or be known in advance. Sample applications include image completion/inpainting, image matting, dirt/impulse noise removal, etc. Other applications such as sparse point propagation and super resolution by nature have the masks for unknown regions. One way to incorporate the mask into the network is to treat it as an additional channel of the input. We tested this idea with the same set of network and experimental settings as the previous trial. The results showed that such additional piece of information did bring about improvement but still considerably far from satisfactory in removing the residues. Results are visualized in the mid-right column of figure 2. To learn a tractable TVI model, we devise in the next session a novel architecture with an effective mechanism to exploit the information contained in the mask. 4 Shepard Convolutional Neural Networks We initiate the attempt to leverage the traditional interpolation framework to guide the design of neural network architecture for TVI. We turn to the Shepard framework [10] which weighs known pixels differently according to their spatial distances to the processed pixel. Specifically, Shepard method can be re-written in a convolution form Jp = (K ∗I)p / (K ∗M)p if Mp = 0 Ip if Mp = 1 (1) where I and J are the input and output images, respectively. p indexes the image coordinates. M is the binary indicator. Mp = 0 indicates the pixel values are unknown. ∗is the convolution operation. K is the kernel function with its weights inversely proportional to the distance between a pixel with Mp = 1 and the pixel to process. The element-wise division between the convolved image and the convolved mask naturally controls the way how pixel information is propagated across the regions. It thus enables the capability to handle interpolation for irregularly-spaced data and make it possible translation variant. The key element in Shepard method affecting the interpolation result is the definition of the convolution kernel. We thus propose a new convolutional layer in the light of Shepard method but allow for a more flexible, data-driven kernel design. The layer is referred to as the Shepard interpolation layer. 3 Figure 2: Comparison between ShCNN and CNN in image inpainting. Input images (Left). Results from a regular CNN (Mid-left). Results from a regular CNN trained with masks (Mid-right). Our results (Right). 4.1 The Shepard Interpolation Layer The feed-forward pass of the trainable interpolation layer can be mathematically described as the following equation, Fn i (Fn−1, Mn) = σ( X j Kn ij ∗Fn−1 j Kn ij ∗Mn j + bn), n = 1, 2, 3, ... (2) where n is the index of layers. The subscript i in Fn i is the index of feature maps in layer n. j in Fn−1 j index the feature maps in layer n −1. Fn−1 and Mn are the input and the mask of the current layer respectively. Fn−1 represents all the feature maps in layer n −1. Kij are the trainable kernels which are shared in both numerator and denominator in computing the fraction. Concretely, same Kij is to be convolved with both the activations of the last layer in the numerator and the mask of the current layer Mn in the denominator. Fn−1 could be the output feature maps of regular layers in a CNN such as a convolutional layer or a pooling layer. It could also be a previous Shepard interpolation layer which is a function of both Fn−2 and Mn−1. Thus Shepard interpolation layers can actually be stacked together to form a highly nonlinear interpolation operator. b is the bias term and σ is the nonlinearity imposed to the network. F is a smooth and differentiable function, therefore standard back-propagation can be used to train the parameters. Figure 3 illustrates our neural network architecture with Shepard interpolation layers. The inputs of the Shepard interpolation layer are images/feature maps as well as masks indicating where interpolation should occur. Note that the interpolation layer can be applied repeatedly to construct more complex interpolation functions with multiple layers of nonlinearity. The mask is a binary map of value one for the known area, zero for the missing area. Same kernel is applied to the image and the mask. We note that the mask for layer n + 1 can be automatically generated by the result of previous convolved mask Kn ∗Mn, by zeroing out insignificant values and thresholding it. It is important for tasks with relative large missing areas such as inpainting where sophisticated ways of propagation may be learned from data by multi-stage Shepard interpolation layer with nonlinearity. This is also a flexible way to balance the kernel size and the depth of the network. We refer to 4 Figure 3: Illustration of ShCNN architecture for multiple layers of interpolation. a convolutional neural network with Shepard interpolation layers as Shepard convolutional neural network (ShCNN). 4.2 Discussion Although standard back-propagation can be used, because F is a function of both Ks in the fraction, matrix form of the quotient rule for derivatives need to be used in deriving the back-propagation equations of the interpolation layer. To make the implementation efficient, we unroll the two convolution operations K ∗F and K ∗M into two matrix multiplications denoted W · I and W · M where I and M are the unrolled versions of F and M. W is the rearrangement of the kernels where each kernel is listed in a single row. E is the error function to compute the distance between the network output and the ground truth. L2 norm is used to compute this distance. We also denote Zn = Kn∗F n−1 Kn∗Mn . The derivative of the error function E with respect to Zn, δn = ∂E ∂Zn , can be computed the same way as in previous CNN papers [12, 1]. Once this value is computed, we show that the derivative of E with respect to the kernels W connecting jth node in (n −1)th layer to ith node in nth layer can be computed by, ∂E ∂Wn ij = X m (Wn ij · Mjm) · Ijm −(Wn ij · Ijm) · Mjm (Wn ij · Mjm)2 · δim, (3) where m is the column index in I, M and δ. The denominator of each element in the outer summation in Eq. 3 is different. Therefore, the numerator of each summation element has to be computed separately. While this operation can still be efficiently parallelized by vectorization, it requires significantly more memory and computations than the regular CNNs. Though it brings extra workload in training, the new interpolation layer only adds a fraction of more computation during the test time. We can discern this from Eq. 2, the only added operations are the convolution of the mask with the K and the point-wise division. Because the two convolutions shares the same kernel, it can be efficiently implemented by convolving with samples with the batch size of 2. It thus keeps the computation of Shepard interpolation layer competitive compare to the traditional convolution layer. We note that it is also natural to integrate the interpolation layer to any previous CNN architecture. This is because the new layer only adds a mask input to the convolutional layer, keeping all other interfaces the same. This layer can also degenerate to a fully connected layer because the unrolled version of Eq. 2 merely contains matrix multiplication in the fraction. Therefore, as long as the TVI operators are necessary in the task, no matter where it is needed in the architecture and the type of layer before or after it, the interpolation layer can be seamlessly plugged in. 5 Last but not least, the interpolation kernels in the layer is learned from data rather than hand-crafted, therefore it is more flexible and could be more powerful than pre-designed kernels. On the other hand, it is end-to-end trainable so that the learned interpolation operators are embedded in the overall optimization objective of the model. 5 Experiments We conducted experiments on two applications involving TVI: the inpainting and the superresolution. The training data was generated by randomly sampling 1 million patches from 1000 natural images scraped from Flickr. Grayscale patches of size 48x48 were used for both tasks to facilitate the comparison with previous studies. All PSNR comparison in the experiment is based on grayscale results. Our model can be directly extended to process color images. 5.1 Inpainting The natural images are contaminated by masks containing text of different sizes and fonts as shown in figure 2. We assume the binary masks indicating missing regions are known in advance. The ShCNN for inpainting is consists of five layers, two of which are Shepard interpolation layers. We use ReLU function [1] to impose nonlinearity in all our experiments. 4x4 filters were used in the first Shepard layer to generate 8 feature maps, followed by another Shepard interpolation layer with 4x4 filters. The rest of the ShCNN is conventional CNN architecture. The filters for the third layer is with size 9x9x8, which are use to generate 128 feature maps. 1x1x128 filters are used in the fourth layer. 8x8 filters are used to carry out the reconstruction of image details. Visual results are shown in the last column in figure 2. The results of the comparisons are generated using the architecture in [8]. More examples are provided in the project webpage. (a) Ground Truth / PSNR (b) Bicubic / 22.10dB (c) KSVD / 23.57dB (d) NE+LLE / 23.38dB (e) ANR / 23.52dB (f) A+ / 24.42dB (g) SRCNN / 25.07dB (h) ShCNN / 25.63dB Figure 4: Visual comparison. Factor 4 upscaling of the butterfly image in Set5 [14]. 5.2 Super Resolution The quantitative evaluation of super resolution is conducted using synthetic data where the high resolution images are first downscaled by a factor to generate low resolution patches. To perform super resolution, we upscale the low resolution patches and zero out the pixels in the upscaled images, leaving one copy of pixels from low resolution images. In this regard, super resolution can be seemed as a special form of inpainting with repeated patterns of missing area. 6 Set14 (x2) Bicubic K-SVD NE+NNLS NE+LLE ANR A+ SRCNN ShCNN baboon 24.86dB 25.47dB 25.40dB 25.52dB 25.54dB 25.65dB 25.62dB 25.79dB barbara 28.00dB 28.70dB 28.56dB 28.63dB 28.59dB 28.70dB 28.59dB 28.59dB bridge 26.58dB 27.55dB 27.38dB 27.51dB 27.54dB 27.78dB 27.70dB 27.92dB coastguard 29.12dB 30.41dB 30.23dB 30.38dB 30.44dB 30.57dB 30.49dB 30.82dB comic 26.46dB 27.89 dB 27.61dB 27.72dB 27.80dB 28.65dB 28.27dB 28.70dB face 34.83dB 35.57 dB 35.46dB 35.61dB 35.63dB 35.74dB 35.61dB 35.75dB flowers 30.37dB 32.28 dB 31.93dB 32.19dB 32.29dB 33.02dB 33.03dB 33.53dB foreman 34.14dB 36.18 dB 35.93dB 36.41dB 36.40dB 36.94dB 36.20dB 36.14dB lenna 34.70dB 36.21 dB 36.00dB 36.30dB 36.32dB 36.60dB 36.50dB 36.71dB man 29.25dB 30.44 dB 30.29dB 30.43dB 30.47dB 30.87dB 30.82dB 31.06dB monarch 32.94dB 35.75 dB 35.26dB 35.58dB 35.71dB 37.01dB 37.18dB 38.09dB pepper 34.97dB 36.59 dB 36.18dB 36.36dB 36.39dB 37.02dB 36.75dB 37.03dB ppt3 26.87dB 29.30 dB 28.98dB 28.97dB 28.97dB 30.09dB 30.40dB 31.07dB zebra 30.63dB 33.21dB 32.59dB 33.00dB 33.07dB 33.59dB 33.29dB 33.51dB Avg PSNR 30.23dB 31.81dB 31.55dB 31.76dB 31.80dB 32.28dB 32.18dB 32.48dB Set14 (x3) Bicubic K-SVD NE+NNLS NE+LLE ANR A+ SRCNN ShCNN baboon 23.21dB 23.52dB 23.49dB 23.55dB 23.56dB 23.62dB 23.60dB 23.69dB barbara 26.25dB 26.76dB 26.67dB 26.74dB 26.69dB 26.47dB 26.66dB 26.54dB bridge 24.40dB 25.02dB 24.86dB 24.98dB 25.01dB 25.17dB 25.07dB 25.28dB coastguard 26.55dB 27.15dB 27.00dB 27.07dB 27.08dB 27.27dB 27.20dB 27.43dB comic 23.12dB 23.96dB 23.83dB 23.98dB 24.04dB 24.38dB 24.39dB 24.70dB face 32.82dB 33.53dB 33.45dB 33.56dB 33.62dB 33.76dB 33.58dB 33.71dB flowers 27.23dB 28.43dB 28.21dB 28.38dB 28.49dB 29.05dB 28.97dB 29.42dB foreman 31.18dB 33.19dB 32.87dB 33.21dB 33.23dB 34.30dB 33.35dB 34.45dB lenna 31.68dB 33.00dB 32.82dB 33.01dB 33.08dB 33.52dB 33.39dB 33.68dB man 27.01dB 27.90dB 27.72dB 27.87dB 27.92dB 28.28dB 28.18dB 28.41dB monarch 29.43dB 31.10dB 30.76dB 30.95dB 31.09dB 32.14dB 32.39dB 33.37dB pepper 32.39dB 34.07dB 33.56dB 33.80dB 33.82dB 34.74dB 34.35dB 34.77dB ppt3 23.71dB 25.23dB 24.81dB 24.94dB 25.03dB 26.09dB 26.02dB 26.89dB zebra 26.63dB 28.49dB 28.12dB 28.31dB 28.43dB 28.98dB 28.87dB 29.10dB Avg PSNR 27.54dB 28.67dB 28.44dB 28.60dB 28.65dB 29.13dB 29.00dB 29.39dB Set14 (x4) Bicubic K-SVD NE+NNLS NE+LLE ANR A+ SRCNN ShCNN baboon 22.44dB 22.66dB 22.63dB 22.67dB 22.69dB 22.74dB 22.70dB 22.75dB barbara 25.15dB 25.58dB 25.53dB 25.58dB 25.60dB 25.74dB 25.70dB 25.80dB bridge 23.15dB 23.65dB 23.54dB 23.60dB 23.63dB 23.77dB 23.66dB 23.83dB coastguard 25.48dB 25.81dB 25.82dB 25.81dB 25.80dB 25.98dB 25.93dB 26.13dB comic 21.69dB 22.31dB 22.19dB 22.26dB 22.33dB 22.59dB 22.53dB 22.74dB face 31.55dB 32.18dB 32.09dB 32.19dB 32.23dB 32.44dB 32.12dB 32.35dB flowers 25.52dB 26.44dB 26.28dB 26.38dB 26.47dB 26.90dB 26.84dB 27.18dB foreman 29.41dB 31.01dB 30.90dB 30.90dB 30.83dB 32.24dB 31.47dB 32.30dB lenna 29.84dB 30.92dB 30.82dB 30.93dB 30.99dB 31.41dB 31.20dB 31.45dB man 25.70dB 26.46dB 26.30dB 26.38dB 26.43dB 26.78dB 26.65dB 26.82dB monarch 27.46dB 28.72dB 28.48dB 28.58dB 28.70dB 29.39dB 29.89dB 30.30dB pepper 30.60dB 32.13dB 31.78dB 31.87dB 31.93dB 32.87dB 32.34dB 32.82dB ppt3 21.98dB 23.05dB 22.61dB 22.77dB 22.85dB 23.64dB 23.84dB 24.49dB zebra 24.08dB 25.47dB 25.17dB 25.36dB 25.47dB 25.94dB 25.97dB 26.21dB Avg PSNR 26.00dB 26.88dB 26.72dB 26.81dB 26.85dB 27.32dB 27.20dB 27.51dB Table 1: PSNR comparison on the Set14 [13] image set for upscaling of factor 2, 3 and 4. Methods compared: Bicubic, K-SVD [13], NE+NNLS [14], NE+LLE [15], ANR [16], A+ [11], SRCNN [4], Our ShCNN We use one Shepard interpolation layer at the top with kernel size of 8x8 and feature map number 16. Other configuration of the network is the same as that in our new network for inpainting. During training, weights were randomly initialized by drawing from a Gaussian distribution with zero mean and standard deviation of 0.03. AdaGrad [17] was used in all experiments with learning rate of 0.001 and fudge factor of 1e-6. Table 1 show the quantitative results of our ShCNN in a widely used super-resolution data set [13] for upscaling images 2 times, 3 times and 4 times respectively. We compared our method with 7 methods including the two current state-of-the-art systems [11, 4]. Clear improvement over the state-of-the-art systems can be observed. Visual comparison between our method and the previous methods is illustrated in figure 4 and figure 5. 6 Conclusions In this paper, we disclosed the limitation of previous CNN architectures in image processing tasks in need of translation variant interpolation. New architecture based on Shepard interpolation was proposed and successfully applied to image inpainting and super-resolution. The effectiveness of 7 (a) Ground Truth / PSNR (b) Bicubic / 36.81dB (c) KSVD / 39.93dB (d) NE+LLE / 40.00dB (e) ANR / 40.04dB (f) A+ / 41.12dB (g) SRCNN / 40.64dB (h) ShCNN / 41.30dB Figure 5: Visual comparison. Factor 2 upscaling of the bird image in Set5 [14]. the ShCNN with Shepard interpolation layers have been demonstrated by the state-of-the-art performance. References [1] Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: NIPS. (2012) 1106–1114 [2] Szegedy, C., Liu, W., Jia, Y., Sermanet, P., Reed, S., Anguelov, D., Erhan, D., Vanhoucke, V., Rabinovich, A.: Going deeper with convolutions. In: CVPR. (2015) [3] Sun, Y., Liang, D., Wang, X., Tang, X.: Deepid3: Face recognition with very deep neural networks. In: arXiv:1502.00873. (2015) [4] Dong, C., Loy, C.C., He, K., , Tang, X.: Learning a deep convolutional network for image super-resolution. In: ECCV. (2014) [5] Xie, J., Xu, L., Chen, E.: Image denoising and inpainting with deep neural networks. In: NIPS. (2012) [6] Burger, H.C., Schuler, C.J., Harmeling, S.: Image denoising: Can plain neural networks compete with bm3d? In: CVPR. (2012) [7] Xu, L., Ren, J.S., Liu, C., Jia, J.: Deep convolutional neural network for image deconvolution. In: NIPS. (2014) [8] Eigen, D., Krishnan, D., Fergus, R.: Restoring an image taken through a window covered with dirt or rain. In: ICCV. (2013) [9] Xu, L., Ren, J.S., Yan, Q., Liao, R., Jia, J.: Deep edge-aware filters. In: ICML. (2015) [10] Shepard, D.: A two-dimensional interpolation function for irregularly-spaced data. In: 23rd ACM national conference. (1968) [11] Timofte, R., Smet, V.D., Gool, L.V.: A+: Adjusted anchored neighborhood regression for fast super-resolution. In: ACCV. (2014) [12] LeCun, Y., Bottou, L., Bengio, Y., Haffner, P.: Gradient-based learning applied to document recognition. In: Proceedings of IEEE. (1998) [13] Zeyde, R., Elad, M., Protter, M.: On single image scale-up using sparse-representations. Curves and Surfaces 6920 (2012) 711–730 8 [14] Bevilacqua, M., Roumy, A., Guillemot, C., Morel, M.L.A.: Low-complexity single-image super-resolution based on nonnegative neighbor embedding. In: BMVC. (2012) [15] Chang, H., Yeung, D.Y., Xiong, Y.: Super-resolution through neighbor embedding. In: CVPR. (2004) [16] Timofte, R., Smet, V.D., Gool, L.V.: Anchored neighborhood regression for fast examplebased super-resolution. In: ICCV. (2013) [17] Duchi, J., Hazan, E., Singer, Y.: Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research 12 (2011) 2121–2159 9 | 2015 | 339 |
5,857 | Local Expectation Gradients for Black Box Variational Inference Michalis K. Titsias Athens University of Economics and Business mtitsias@aueb.gr Miguel L´azaro-Gredilla Vicarious miguel@vicarious.com Abstract We introduce local expectation gradients which is a general purpose stochastic variational inference algorithm for constructing stochastic gradients by sampling from the variational distribution. This algorithm divides the problem of estimating the stochastic gradients over multiple variational parameters into smaller sub-tasks so that each sub-task explores intelligently the most relevant part of the variational distribution. This is achieved by performing an exact expectation over the single random variable that most correlates with the variational parameter of interest resulting in a Rao-Blackwellized estimate that has low variance. Our method works efficiently for both continuous and discrete random variables. Furthermore, the proposed algorithm has interesting similarities with Gibbs sampling but at the same time, unlike Gibbs sampling, can be trivially parallelized. 1 Introduction Stochastic variational inference has emerged as a promising and flexible framework for performing large scale approximate inference in complex probabilistic models. It significantly extends the traditional variational inference framework [7, 1] by incorporating stochastic approximation [16] into the optimization of the variational lower bound. Currently, there exist two major research directions in stochastic variational inference. The first one (data stochasticity) attempts to deal with massive datasets by constructing stochastic gradients by using mini-batches of training examples [5, 6]. The second direction (expectation stochasticity) aims at dealing with the intractable expectations under the variational distribution that are encountered in non-conjugate probabilistic models [12, 14, 10, 18, 8, 15, 20]. Unifying these two ideas, it is possible to use stochastic gradients to address both massive datasets and intractable expectations. This results in a doubly stochastic estimation approach, where the mini-batch source of stochasticity can be combined with the stochasticity associated with sampling from the variational distribution. In this paper, we are interested to further investigate the expectation stochasticity that in practice is dealt with by drawing samples from the variational distribution. A challenging issue here is concerned with the variance reduction of the stochastic gradients. Specifically, while the method based on the log derivative trick is currently the most general one, it has been observed to severely suffer from high variance problems [12, 14, 10] and thus it is only applicable together with sophisticated variance reduction techniques based on control variates. However, the construction of efficient control variates can be strongly dependent on the form of the probabilistic model. Therefore, it would be highly desirable to introduce more black box procedures, where simple stochastic gradients can work well for any model, thus allowing the end-user not to worry about having to design model-dependent variance reduction techniques. Notice, that for continuous random variables and differentiable functions the reparametrization approach [8, 15, 20] offers a simple black box procedure [20, 9] which does not require further model-dependent variance reduction. However, reparametrization is neither applicable for discrete spaces nor for non-differentiable models and this greatly limits its scope of applicability. 1 In this paper, we introduce a simple black box algorithm for stochastic optimization in variational inference which provides stochastic gradients having low variance and without needing any extra variance reduction. This method is based on a new trick referred to as local expectation or integration. The key idea here is that stochastic gradient estimation over multiple variational parameters can be divided into smaller sub-tasks where each sub-task requires different amounts of information about different parts of the variational distribution. More precisely, each sub-task aims at exploiting the conditional independence structure of the variational distribution. Based on this intuitive idea we introduce the local expectation gradients algorithm that provides a stochastic gradient over a variational parameter vi by performing an exact expectation over the associated latent variable xi while using a single sample from the remaining latent variables. Essentially, this consists of a RaoBlackwellized estimate that allows to dramatically reduce the variance of the stochastic gradient so that, for instance, for continuous spaces the new stochastic gradient is guaranteed to have lower variance than the stochastic gradient corresponding to the reparametrization method where the latter utilizes a single sample. Furthermore, the local expectation algorithm has interesting similarities with Gibbs sampling with the important difference, that unlike Gibbs sampling, it can be trivially parallelized. 2 Stochastic variational inference Here, we discuss the main ideas behind current algorithms on stochastic variational inference and particularly methods that sample from the variational distribution in order to approximate intractable expectations using Monte Carlo. Given a joint probability distribution p(y, x) where y are observations and x are latent variables (possibly including model parameters that consist of random variables) and a variational distribution qv(x), the objective is to maximize the lower bound F(v) = Eqv(x) [log p(y, x) −log qv(x)] , (1) = Eqv(x) [log p(y, x)] −Eqv(x) [log qv(x)] , (2) with respect to the variational parameters v. Ideally, in order to tune v we would like to have a closed-form expression for the lower bound so that we could subsequently maximize it by using standard optimization routines such as gradient-based algorithms. However, for many probabilistic models and forms of the variational distribution at least one of the two expectations in (2) is intractable. Therefore, in general we are faced with the following intractable expectation eF(v) = Eqv(x) [f(x)] , (3) where f(x) can be either log p(y, x), −log qv(x) or log p(y, x) −log qv(x), from which we would like to efficiently estimate the gradient over v in order to apply gradient-based optimization. The most general method for estimating the gradient ∇v eF(v) is based on the log derivative trick, also called likelihood ratio or REINFORCE, that has been invented in control theory and reinforcement learning [3, 21, 13] and used recently for variational inference [12, 14, 10]. Specifically, this makes use of the property ∇vqv(x) = qv(x)∇v log qv(x), which allows to write the gradient as ∇v eF(v) = Eqv(x) [f(x)∇v log qv(x)] (4) and then obtain an unbiased estimate according to 1 S S X s=1 f(x(s))∇v log qv(x(s)), (5) where each x(s) is an independent draw from qv(x). While this estimate is unbiased, it has been observed to severely suffer from high variance so that in practice it is necessary to consider variance reduction techniques such as those based on control variates [12, 14, 10]. The second approach is suitable for continuous spaces where f(x) is a differentiable function of x [8, 15, 20]. It is based on a simple transformation of (3) which allows to move the variational parameters v inside f(x) so that eventually the expectation is taken over a base distribution that does not depend on the variational parameters any more. For example, if the variational distribution is the Gaussian N(x|µ, LL⊤) where v = (µ, L), the expectation in (3) can be re-written as eF(µ, L) = 2 R N(z|0, I)f(µ + Lz)dz and subsequently the gradient over (µ, L) can be approximated by the following unbiased Monte Carlo estimate 1 S S X s=1 ∇(µ,L)f(µ + Lz(s)), (6) where each z(s) is an independent sample from N(z|0, I). This estimate makes efficient use of the slope of f(x) which allows to perform informative moves in the space of (µ, L). Furthermore, it has been shown experimentally in several studies [8, 15, 20, 9] that the estimate in (6) has relatively low variance and can lead to efficient optimization even when a single sample is used at each iteration. Nevertheless, a limitation of the approach is that it is only applicable to models where x is continuous and f(x) is differentiable. Even within this subset of models we are also additionally restricted to using certain classes of variational distributions for which reparametrization is possible. Next we introduce an approach that is applicable to a broad class of models (both discrete and continuous), has favourable scaling properties and provides low-variance stochastic gradients. 3 Local expectation gradients Suppose that the n-dimensional latent vector x in the probabilistic model takes values in some space S1 × . . . Sn where each set Si can be continuous or discrete. We consider a variational distribution over x that is represented as a directed graphical model having the following joint density qv(x) = n Y i=1 qvi(xi|pai), (7) where qvi(xi|pai) is the conditional factor over xi given the set of the parents denoted by pai. We assume that each conditional factor has its own separate set of variational parameters vi and v = (vi, . . . , vn). The objective is then to obtain a stochastic approximation for the gradient of the lower bound over each variational parameter vi. Our method is motivated by the observation that each vi is influenced mostly by its corresponding latent variable xi since vi determines the factor qvi(xi|pai). Therefore, to get information about the gradient of vi we should be exploring multiple possible values of xi and a rather smaller set of values from the remaining latent variables x\i. Next we take this idea into the extreme where we will be using infinite draws from xi (i.e. essentially an exact expectation) together with just a single sample of x\i. More precisely, we factorize the variational distribution as qv(x) = q(xi|mbi)q(x\i), where mbi denotes the Markov blanket of xi. The gradient over vi can be written as ∇vi eF(v) = Eq(x) [f(x)∇vi log qvi(xi|pai)] = Eq(x\i) Eq(xi|mbi) [f(x)∇vi log qvi(xi|pai)] , (8) where in the second expression we used the law of iterated expectations. Then, an unbiased stochastic gradient, say at the t-th iteration of an optimization algorithm, can be obtained by drawing a single sample x(t) \i from q(x\i) so that Eq(xi|mb(t) i ) h f(x(t) \i , xi)∇vi log qvi(xi|pa(t) i ) i = X xi eq(xi|mb(t) i )f(x(t) \i , xi)∇viqvi(xi|pa(t) i ), (9) where P xi denotes summation or integration and eq(xi|mb(t) i ) is the same as q(xi|mb(t) i ) but with qvi(xi|pa(t) i ) removed from the numerator.1 The above is the expression for the proposed stochastic gradient for the parameter vi. Notice that this estimate does not rely on the log derivative trick since we never draw samples from q(xi|mb(t) i ). Instead the trick here is to perform local expectation (integration or summation). To get an independent sample x(t) \i from q(x\i) we can simply simulate a full latent vector x(t) from qv(x) by applying the standard ancestral sampling procedure for directed graphical models [1]. Then, the sub-vector x(t) \i is by construction an independent draw from the 1Notice that q(xi|mb(t) i ) ∝h(xi, mb(t) i )qvi(xi|pa(t) i ) for some non-negative function h(·). 3 Algorithm 1 Stochastic variational inference using local expectation gradients Input: f(x), qv(x). Initialize v(0), t = 0. repeat Set t = t + 1. Draw pivot sample x(t) ∼qv(x). for i = 1 to n do dvi = Eq(xi|mb(t) i ) h f(x(t) \i , xi)∇vi log qvi(xi|pa(t) i ) i . vi = vi + ηtdvi. end for until convergence criterion is met. marginal q(x\i). Furthermore, the sample x(t) can be thought of as a global or pivot sample that is needed to be drawn once and then it can be re-used multiple times in order to compute all stochastic gradients for all variational parameters (v1, . . . , vn) according to eq. (9). When the variable xi takes discrete values, the expectation in eq. (9) reduces to a sum of terms associated with all possible values of xi. On the other hand, when xi is a continuous variable the expectation in (9) corresponds to an univariate integral that in general may not be analytically tractable. In this case we shall use fast numerical integration methods. We shall refer to the above algorithm for providing stochastic gradients over variational parameters as local expectation gradients and pseudo-code of a stochastic variational inference scheme that internally uses this algorithm is given in Algorithm 1. Notice that Algorithm 1 corresponds to the case where f(x) = log p(y, x) −log qv(x) while other cases can be expressed similarly. In the next two sections we discuss some theoretical properties of local expectation gradients (Section 3.1) and draw interesting connections with Gibbs sampling (Section 3.2). 3.1 Properties of local expectation gradients We first derive the variance of the stochastic estimates obtained by local expectation gradients. In our analysis, we will focus on the case of fitting a fully factorized variational distribution (and leave the more general case for future work) having the form qv(x) = n Y i=1 qvi(xi). (10) For such case the local expectation gradient for each parameter vi from eq. (9) simplifies to Eqvi(xi) f(x\i, xi)∇vi log qvi(xi) = X xi ∇viqvi(xi)f(x\i, xi), (11) where also for notational simplicity we write x(t) \i as x\i. It would be useful to define the following mean and covariance functions m(xi) = Eq(x\i)[f(x\i, xi)], (12) Cov(xi, x′ i) = Eq(x\i)[(f(x\i, xi) −m(xi))(f(x\i, x′ i) −m(x′ i))], (13) that characterize the variability of f(x\i, xi) as x\i varies according to q(x\i). Notice that based on eq. (12) the exact gradient of the variational lower bound over vi can also be written as P xi ∇viqvi(xi)m(xi), which has an analogous form to the local expectation gradient from (11) with the difference that f(x\i, xi) is now replaced by its mean value m(xi). We can now characterize the variance of the stochastic gradient and describe some additional properties. All proofs for the following statements are given in the Supplementary Material. Proposition 1. The variance of the stochastic gradient in (11) can be written as X xi,x′ i ∇viqvi(xi)∇viqvi(x′ i)Cov(xi, x′ i). (14) 4 This gives us some intuition about when we expect the variance of the estimate to be small. For instance, two simple cases are: i) when the covariance function Cov(xi, x′ i) takes small values, which can occur when q(x\i) has low entropy, or ii) when Cov(xi, x′ i) is approximately constant. In fact, when Cov(xi, x′ i) is exactly constant, then the variance is zero (so that the stochastic gradient is exact) as the following proposition states. Proposition 2. If Cov(xi, x′ i) = c for all xi and x′ i then the variance in (14) is equal to zero. A case for which the condition Cov(xi, x′ i) = c holds exactly is when the function f(x) factorizes as f(x\i, xi) = fi(xi)+f\i(x\i) (see Supplementary Material for a proof). Such a factorization essentially implies that xi is independent from the remaining random variables, which results the local expectation gradient to be exact. In contrast, in order to get exactness by using the standard Monte Carlo stochastic gradient from eq. (5) (and any of its improvements that apply variance reduction) we will typically need to draw infinite number of samples. To further analyze local expectation gradients we can contrast them with stochastic gradients obtained by the reparametrization trick [8, 15, 20]. Suppose that we can reparametrize the random variable xi ∼qvi(xi) according to xi = g(vi, zi), where zi ∼qi(zi) and qi(zi) is a suitable base distribution. We further assume that the function f(x\i, xi) is differentiable with respect to xi and g(vi, zi) is differentiable with respect to vi. Then, the exact gradient with respect to the variational parameter vi can be reparametrized as ∇vi Z q(x\i)qvi(xi)f(x\i, xi)dx = Z q(x\i)qi(zi)∇vif(x\i, g(vi, zi))dx\idzi, (15) while a single-sample stochastic estimate that follows from this expression is ∇vif(x\i, g(vi, zi)), x\i ∼q(x\i), zi ∼qi(zi). (16) The following statement gives us a clear understanding about how this estimate compares with the corresponding local expectation gradient. Proposition 3. Given that we can reparametrize xi as described above (and all differentiability conditions mentioned above hold), the gradient from (11) can be equivalently written as Z qi(zi)∇vif(x\i, g(vi, zi))dzi, x\i ∼q(x\i). (17) Clearly, the above expression is an expectation of the reparametrization gradient from eq. (16), and therefore based on the standard Rao-Blackwellization argument the variance of the local expectation gradient will always be lower or equal than the variance of a single-sample estimate based on the reparametrization method. Notice that the reparametrization method is only applicable to continuous random variables and differentiable functions f(x). However, for such cases, reparametrization could be computationally more efficient than local expectation gradients since the latter approach will require to apply 1-D numerical integration to estimate the integral in (11) or the integral in (17)2 which could be computationally more expensive. 3.2 Connection with Gibbs sampling There are interesting similarities between local expectation gradients and Gibbs sampling. Firstly, notice that carrying out Gibbs sampling in the variational distribution in eq. (7) requires iteratively sampling from each conditional q(xi|mbi), for i = 1, . . . , n, and clearly the same conditional appears also in local expectation gradients with the obvious difference that instead of sampling from q(xi|mbi) we now average under this distribution. Of course, in practice, we never perform Gibbs sampling on a variational distribution but instead on the true posterior distribution which is proportional to ef(x) (where we assumed that −log qv(x) is not part of f(x)). Specifically, at each Gibbs step we simulate a new value for some xi from the posterior conditional distribution that is proportional to ef(x(t) \i ,xi) and where x(t) \i are the fixed values for the remaining random variables. We can observe that an update in local expectation gradients is quite similar, because now we also condition on some fixed remaining values x(t) \i in order to update the parameter vi towards the direction 2The exact value of the two integrals is the same. However, approximation of these two integrals based on numerical integration will typically not give the same value. 5 where q(xi|mb(t) i ) gets closer to the corresponding true posterior conditional distribution. Despite these similarities, there is a crucial computational difference between the two procedures. While in local expectation gradients it is perfectly valid to perform all updates of the variational parameters in parallel, given the pivot sample x(t), in Gibbs sampling all updates need to be executed in a serial manner. This difference is essentially a consequence of the fundamental difference between variational inference and Gibbs sampling where the former relies on optimization while the latter on convergence of a Markov chain. 4 Experiments In this section, we apply local expectation gradients (LeGrad) to two different types of stochastic variational inference problems and we compare it against the standard stochastic gradient based on the log derivative trick (LdGrad), that incorporates also variance reduction3, as well as the reparametrization-based gradient (ReGrad) given by eq. (6). In Section 4.1, we consider a two-class classification problem using two digits from the MNIST database and we approximate a Bayesian logistic regression model using stochastic variational inference. Then, in Section 4.2 we consider sigmoid belief networks [11] and we fit them to the binarized version of the MNIST digits. 4.1 Bayesian logistic regression In this section we compare the three approaches in a challenging binary classification problem using Bayesian logistic regression. Specifically, given a dataset D ≡{zj, yj}m j=1, where zj ∈Rn is the input and yj ∈{−1, +1} the class label, we model the joint distribution over the observed labels and the parameters w by p(y, w) = QM m=1 σ(ymz⊤ mw) p(w), where σ(a) is the sigmoid function and p(w) denotes a zero-mean Gaussian prior on the weights w. We wish to apply the three algorithms in order to approximate the posterior over the regression parameters by a factorized variational Gaussian distribution of the form qv(w) = Qn i=1 N(wi|µi, ℓ2 i ). In the following we consider a subset of the MNIST dataset that includes all 12660 training examples from the digit classes 2 and 7, each with 784 pixels so that by including the bias the number of weights is n = 785. To obtain the local expectation gradient for each (µi, ℓi) we need to apply 1-D numerical integration. We used the quadrature rule having K = 5 nodes4 so that LeGrad was using S = 785 × 5 function evaluations per gradient estimation. For LdGrad we also set the number of samples to S = 785 × 5 so that LeGrad and LdGrad match exactly in the number of function evaluations and roughly in computational cost. When using the ReGrad approach based on (6) we construct the stochastic gradient using K = 5 target function gradient samples. This matches the computational cost, but ReGrad still has the unmatched advantage of having access to the gradient of the target function. The variance of the stochastic gradient for parameter µ1 is shown in Figure 1(a)-(b). It is much smaller for LeGrad than for LdGrad, despite having almost similar computational cost and use the same amount of information about the target function. The evolution of the bound in Figure 1(c) clearly shows the advantage of using less noisy gradients. LdGrad will need a huge number of iterations to find the global optimum, despite having optimized the step size of its stochastic updates. 4.2 Sigmoid belief networks In the second example we consider sigmoid belief networks (SBNs) [11] and i) compare our approach with LdGrad in terms of variance and optimization efficiency and then ii) we perform density estimation experiments by training sigmoid belief nets with fully connected hidden units using LeGrad. Note that ReGrad cannot be used on discrete models. 3As discussed in [19], there are multiple unbiased sample-based estimators of (4), and using (5) directly tends to have a large variance. We use instead the estimator given by eq. (8) in [19]. Though other estimators with even lower variance exist, we restrict ourselves to those with the same scalability as the proposed LeGrad, requiring at most O(S|v|) computation per gradient estimation. 4Gaussian quadrature with K grid points integrates exactly polynomials up to 2K −1 degree. 6 0 5000 10000 0 0.5 1 1.5 2 Iterations Variance 0 5000 10000 0 20 40 60 80 100 Iterations Variance 0 5000 10000 15000 −1000 −800 −600 −400 −200 Iterations Lower bound (a) (b) Figure 1: (a) Variance of the gradient for the variational parameter µ1 for LeGrad (red line) and ReGrad (blue line). (b) Variance of the gradient for the variational parameter µ1 for LdGrad (green line). (c) Evolution of the stochastic value of the lower bound. For the variance reduction comparison we consider a network with an unstructured hidden layer where binary observed vectors yi ∈{0, 1}D are generated independently according to p(y|W) = X x D Y d=1 σ(w⊤ d x) yd 1 −σ(w⊤ d x) 1−yd p(x), (18) where x ∈{0, 1}K is a vector of hidden variables that follows a uniform distribution. The matrix W (which includes bias terms) contains the parameters to be estimated by fitting the model to the data. In theory we could use the EM algorithm to learn the parameters W, however, such an approach is not feasible because at the E step we need to compute the posterior distribution p(xi|yi, W) over each hidden variable which clearly is intractable since each xi takes 2K values. Therefore, we need to apply approximate inference and next we consider stochastic variational inference using the local expectation gradients algorithm and compare this with the method in [19] eq. (8), which has the same scalability properties and have been denoting as LdGrad. More precisely, we shall consider a variational distribution that consists of a recognition model [4, 2, 10, 8, 15] which is parametrized by a “reverse” sigmoid network that predicts the latent vector xi from the associated observation yi: qV (xi) = QK k=1 σ(v⊤ k yi) xik 1 −σ(v⊤ k yi) 1−xik. The variational parameters are contained in matrix V (also the bias terms). The application of stochastic variational inference boils down to constructing a separate lower bound for each pair (yi, xi) so that the full bound is the sum of these individual terms (see Supplementary Material for explicit expressions). Then, the maximization of the bound proceeds by performing stochastic gradient updates for the model weights W and the variational parameters V . The update for W reduces to a logistic regression type of update, based upon drawing a single sample from the full variational distribution. On the other hand, obtaining effective and low variance stochastic gradients for the variational parameters V is considered to be a very highly challenging task and current advanced methods are based on covariates that employ neural networks as auxiliary models [10]. In contrast, the local expectation gradient for each variational parameter vk only requires evaluating ∇vkF = n X i=1 ∇vkFi = n X i=1 σik(1 −σik) D X d=1 log 1 + e−eyidw⊤ d (x(t) i\k,xik=0) 1 + e−eyidw⊤ d (x(t) i\k,xik=1) + log 1 −σik σik yi, (19) where σik = σ(v⊤ k yi) and eyid is the {−1, 1} encoding of yid. This expression is a weighted sum across data terms where each term is a difference induced by the directions xik = 1 and xik = 0 for all hidden units {xik}n i=1 associated with the variational factors that depend on vk. Based on the above model, we compare the performance of LeGrad and LdGrad when simultaneously optimizing V and W for a small set of 100 random binarized MNIST digits [17]. The evolution of the instantaneous bound for H = 40 hidden units can be seen in Figure 2(a), where once again LeGrad shows superior performance and increased stability. In the second series of experiments we consider a more complex sigmoid belief network where the prior p(x) over the hidden units becomes a fully connected distribution parametrized by an 7 Table 1: NLL scores in the test data for the binarized MNIST dataset. The left part of the table shows results based on sigmoid belief nets (SBN) constructed and trained based on the approach from [10], denoted as NVIL, or by using the LeGrad algorithm. The right part of the table gives the performance of alternative state of the art models (reported in Table 1 in [10]). SBN Dim Test NLL Model Dim Test NLL NVIL 200-200 99.8 FDARN 400 96.3 NVIL 200-200-200 96.7 NADE 500 88.9 NVIL 200-200-500 97.0 DARN 400 93.0 LeGrad 200 96.0 RBM(CD3) 500 105.5 LeGrad 300 95.1 RBM(CD25) 500 86.3 LeGrad 500 94.9 MOB 500 137.6 additional set of K(K + 1)/2 model weights (see Supplementary Material). Such a model can better capture the dependence structure of the hidden units and provide a good density estimator for high dimensional data. We trained this model using the 5 × 104 training examples of the binarized MNIST by using mini-batches of size 100 and assuming different numbers of hidden units: H = 200, 300, 500. Table 1 provides negative log likelihood (NLL) scores for LegGrad and several other methods reported in [10]. Notice that for LeGrad the NLLs are essentially variational upper bounds of the exact NLLs obtained by Monte Carlo approximation of the variational bound (an estimate also considered in [10]). From Table 1 we can observe that LeGrad outperforms the advanced NVIL technique proposed in [10]. Finally, Figure 2(b) and 2(c) displays model weights and few examples of digits generated after having trained the model with H = 200 units, respectively. 0 1000 2000 3000 4000 5000 −110 −100 −90 −80 −70 −60 −50 −40 −30 Iterations Lower bound (a) (b) (c) Figure 2: (a) LeGrad (red) and LdGrad (green) convergence for the SBN model on a single minibatch of 100 MNIST digits. (b) Weights W (filters) learned by LeGrad when training an SBN with H = 200 units in the full MNIST training set. (c) New digits generated from the trained model. 5 Discussion Local expectation gradients is a generic black box stochastic optimization algorithm that can be used to maximize objective functions of the form Eqv(x)[f(x)], a problem that arises in variational inference. The idea behind this algorithm is to exploit the conditional independence structure of the variational distribution qv(x). Also this algorithm is mostly related to stochastic optimization schemes that make use of the log derivative trick that has been invented in reinforcement learning [3, 21, 13] and has been recently used for variational inference [12, 14, 10]. The approaches in [12, 14, 10] can be thought of as following a global sampling strategy, where multiple samples are drawn from qv(x) and then variance reduction is built a posteriori in a subsequent stage through the use of control variates. In contrast, local expectation gradients reduce variance by directly changing the sampling strategy, so that instead of working with a global set of samples drawn from qv(x), the strategy now is to exactly marginalize out the random variable that has the largest influence on a specific gradient of interest while using a single sample for the remaining random variables. We believe that local expectation gradients can be applied to a great range of stochastic optimization problems that arise in variational inference and in other domains. Here, we have demonstrated its use for variational inference in logistic regression and sigmoid belief networks. 8 References [1] Christopher M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [2] Jrg Bornschein and Yoshua Bengio. Reweighted wake-sleep. CoRR, pages –1–1, 2014. [3] Peter W. Glynn. Likelihood ratio gradient estimation for stochastic systems. Commun. ACM, 33(10):75– 84, October 1990. [4] Geoffrey Hinton, Peter Dayan, Brendan J Frey, and Radford M Neal. The wake-sleep algorithm for unsupervised neural networks. Science, 268(5214):1158–1161, 1995. [5] Matthew D. Hoffman, David M. Blei, and Francis R. Bach. Online learning for latent dirichlet allocation. In NIPS, pages 856–864, 2010. [6] Matthew D. Hoffman, David M. Blei, Chong Wang, and John William Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14(1):1303–1347, 2013. [7] Michael I. Jordan, Zoubin Ghahramani, Tommi S. Jaakkola, and Lawrence K. Saul. An introduction to variational methods for graphical models. Mach. Learn., 37(2):183–233, November 1999. [8] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [9] A. Kucukelbir, R. Ranganath, A. Gelman, and D.M. Blei. Automatic variational inference in stan. In Advances in Neural Information Processing Systems, 28, 2015. [10] Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In The 31st International Conference on Machine Learning (ICML 2014), 2014. [11] Radford M. Neal. Connectionist learning of belief networks. Artif. Intell., 56(1):71–113, July 1992. [12] John William Paisley, David M. Blei, and Michael I. Jordan. Variational bayesian inference with stochastic search. In ICML, 2012. [13] J. Peters and S. Schaal. Policy gradient methods for robotics. In Proceedings of the IEEE International Conference on Intelligent Robotics Systems (IROS 2006), 2006. [14] Rajesh Ranganath, Sean Gerrish, and David Blei. Black box variational inference. In Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics (AISTATS), page 814822, 2014. [15] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In The 31st International Conference on Machine Learning (ICML 2014), 2014. [16] Herbert Robbins and Sutton Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 22(3):400–407, 1951. [17] Ruslan Salakhutdinov and Iain Murray. On the quantitative analysis of Deep Belief Networks. In Andrew McCallum and Sam Roweis, editors, Proceedings of the 25th Annual International Conference on Machine Learning (ICML 2008), pages 872–879. Omnipress, 2008. [18] Tim Salimans and David A. Knowles. Fixed-form variational posterior approximation through stochastic linear regression. Bayesian Anal., 8(4):837–882, 12 2013. [19] Tim Salimans and David A. Knowles. On Using Control Variates with Stochastic Approximation for Variational Bayes and its Connection to Stochastic Linear Regression, January 2014. [20] Michalis K. Titsias and Miguel L´azaro-Gredilla. Doubly stochastic variational bayes for non-conjugate inference. In The 31st International Conference on Machine Learning (ICML 2014), 2014. [21] Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Mach. Learn., 8(3-4):229–256, May 1992. 9 | 2015 | 34 |
5,858 | Learning Wake-Sleep Recurrent Attention Models Jimmy Ba University of Toronto jimmy@psi.toronto.edu Roger Grosse University of Toronto rgrosse@cs.toronto.edu Ruslan Salakhutdinov University of Toronto rsalskhu@cs.toronto.edu Brendan Frey University of Toronto frey@psi.toronto.edu Abstract Despite their success, convolutional neural networks are computationally expensive because they must examine all image locations. Stochastic attention-based models have been shown to improve computational efficiency at test time, but they remain difficult to train because of intractable posterior inference and high variance in the stochastic gradient estimates. Borrowing techniques from the literature on training deep generative models, we present the Wake-Sleep Recurrent Attention Model, a method for training stochastic attention networks which improves posterior inference and which reduces the variability in the stochastic gradients. We show that our method can greatly speed up the training time for stochastic attention networks in the domains of image classification and caption generation. 1 Introduction Convolutional neural networks, trained end-to-end, have been shown to substantially outperform previous approaches to various supervised learning tasks in computer vision (e.g. [1])). Despite their wide success, convolutional nets are computationally expensive when processing high-resolution input images, because they must examine all image locations at a fine scale. This has motivated recent work on visual attention-based models [2, 3, 4], which reduce the number of parameters and computational operations by selecting informative regions of an image to focus on. In addition to computational speedups, attention-based models can also add a degree of interpretability, as one can understand what signals the algorithm is using by seeing where it is looking. One such approach was recently used by [5] to automatically generate image captions and highlight which image region was relevant to each word in the caption. There are two general approaches to attention-based image understanding: hard and soft attention. Soft attention based models (e.g. [5]) obtain features from a weighted average of all image locations, where locations are weighted based on a model’s saliency map. By contrast, a hard attention model (e.g. [2, 3]) chooses, typically stochastically, a series of discrete glimpse locations. Soft attention models are computationally expensive, as they have to examine every image location; we believe that the computational gains of attention require a hard attention model. Unfortunately, this comes at a cost: while soft attention models can be trained with standard backpropagation [6, 5], this does not work for hard attention models, whose glimpse selections are typically discrete. Training stochastic hard attention models is difficult because the loss gradient involves intractable posterior expectations, and because the stochastic gradient estimates can have high variance. (The latter problem was also observed by [7] in the context of memory networks.) In this work, we propose the Wake-Sleep Recurrent Attention Model (WS-RAM), a method for training stochastic recurrent attention models which deals with the problems of intractable inference and high-variance gradients by taking advantage of several advances from the literature on training deep generative models: 1 inference networks [8], the reweighted wake-sleep algorithm [9], and control variates [10, 11]. During training, the WS-RAM approximates posterior expectations using importance sampling, with a proposal distribution computed by an inference network. Unlike the prediction network, the inference network has access to the object category label, which helps it choose better glimpse locations. As the name suggests, we train both networks using the reweighted wake-sleep algorithm. In addition, we reduce the variance of the stochastic gradient estimates using carefully chosen control variates. In combination, these techniques constitute an improved training procedure for stochastic attention models. The main contributions of our work are the following. First, we present a new learning algorithm for stochastic attention models and compare it with a training method based on variational inference [2]. Second, we develop a novel control variate technique for gradient estimation which further speeds up training. Finally, we demonstrate that our stochastic attention model can learn to (1) classify translated and scaled MNIST digits, and (2) generate image captions by attending to the relevant objects in images and their corresponding scale. Our model achieves similar performance to the variational method [2], but with much faster training times. 2 Related work In recent years, there has been a flurry of work on attention-based neural networks. Such models have been applied successfully in image classification [12, 4, 3, 2], object tracking [13, 3], machine translation [6], caption generation [5], and image generation [14, 15]. Attention has been shown both to improve computational efficiency [2] and to yield insight into the network’s behavior [5]. Our work is most closely related to stochastic hard attention models (e.g. [2]). A major difficulty of training such models is that computing the gradient requires taking expectations with respect to the posterior distribution over saccades, which is typically intractable. This difficulty is closely related to the problem of posterior inference in training deep generative models such as sigmoid belief networks [16]. Since our proposed method draws heavily from the literature on training deep generative models, we overview various approaches here. One of the challenges of training a deep (or recurrent) generative model is that posterior inference is typically intractable due to the explaining away effect. One way to deal with intractable inference is to train a separate inference network whose job it is to predict the posterior distribution. A classic example was the Helmholtz machine [8], where the inference network predicts a mean field approximation to the posterior.1 The generative and inference networks are trained with the wake-sleep algorithm: in the wake phase, the generative model is updated to increase a variational lower bound on the data likelihood. In the sleep phase, data are generated from the model, and the inference network is trained to predict the latent variables used to generate the observations. The wake-sleep approach was limited by the fact that the wake and sleep phases were minimizing two unrelated objective functions. More recently, various methods have been proposed which unify the training of the generative and inference networks into a single objective function. Neural variational inference and learning (NVIL) [11] trains both networks to maximize a variational lower bound on the log-likelihood. Since the stochastic gradient estimates in NVIL are very noisy, the method of control variates is used to reduce the variance. In particular, one uses an algortihm from reinforcement learning called REINFORCE [17], which attempts to infer a reward baseline for each instance. The choice of baseline is crucial to good performance; NVIL uses a separate neural network to compute the baseline, an approach also used by [3] in the context of attention networks. Control variates are discussed in more detail in Section 4.4. The reweighted wake-sleep approach [9] is similar to traditional wake-sleep, but uses importance sampling in place of mean field inference to approximate the posterior. Reweighted wake-sleep is described more formally in Section 4.3. Another method based on inference networks is variational autoencoders [18, 19], which exploit a clever reparameterization of the probabilistic model in order to improve the signal in the stochastic gradients. NVIL, reweighted wake-sleep, and variational autoencoders have all been shown to achieve considerably higher test log-likelihoods compared to 1In the literature, the inference network is often called a recognition network; we avoid this terminology to prevent confusion with the task of image classification. 2 y y y y inference network Ilow-resolution p(y|a, I, ✓) p(a1|I, ✓) p(a2|a1, I, ✓) p(a3|a1:2, I, ✓) p(a4|a1:3, I, ✓) q(a4|y, a1:3, I, ⌘) q(a3|y, a1:2, I, ⌘) q(a2|y, a1, I, ⌘) q(a1|y, I, ⌘) (x1, a1) (x2, a2) (x3, a3) (xN, aN) prediction network Figure 1: The Wake-Sleep Recurrent Attention Model. traditional wake-sleep. The term “Helmholtz machine” is often used loosely to refer to the entire collection of techniques which simultaneously learn a generative network and an inference network. 3 Wake-Sleep Recurrent Attention Model We now describe our wake-sleep recurrent attention model (WS-RAM). Given an image I, the network first chooses a sequence of glimpses a = (a1, . . . , aN), and after each glimpse, receives an observation xn computed by a mapping g(an, I). This mapping might, for instance, extract an image patch at a given scale. The first glimpse is based on a low-resolution version of the input, while subsequent glimpses are chosen based on information acquired from previous glimpses. The glimpses are chosen stochastically according to a distribution p(an | a1:n−1, I, θ), where θ denotes the parameters of the network. This is in contrast with soft attention models, which deterministically allocate attention across all image locations. After the last glimpse, the network predicts a distribution p(y | a, I, θ) over the target y (for instance, the caption or image category). As shown in Figure 1, the core of the attention network is a two-layer recurrent network, which we term the “prediction network”, where the output at each time step is an action (saccade) which is used to compute the input at the next time step. A low-resolution version of the input image is fed to the network at the first time step, and the network predicts the class label at the final time step. Importantly, the low-resolution input is fed to the second layer, while the class label prediction is made by the first layer, preventing information from propagating directly from the low-resolution image to the output. This prevents local optima where the network learns to predict y directly from the low-resolution input, disregarding attention completely. On top of the prediction network is an inference network, which receives both the class label and the attention network’s top layer representation as inputs. It tries to predict the posterior distribution q(an+1 | y, a1:n, I, η), parameterized by η, over the next saccade, conditioned on the image category being correctly predicted. Its job is to guide the posterior sampler during training time, thereby acting as a “teacher” for the attention network. The inference network is described further in Section 4.3. One of the benefits of stochastic attention models is that the mapping g can be localized to a small image region or coarse granularity, which means it can potentially be made very efficient. Furthermore, g need not be differentiable, which allows for operations (such as choosing a scale) which would be difficult to implement in a soft attention network. The cost of this flexibility is that standard backpropagation cannot be applied, so instead we use novel algorithms described in the next section. 3 4 Learning In this work, we assume that we have a dataset with labels y for the supervised prediction task (e.g. object category). In contrast to the supervised saliency prediction task (e.g. [20, 21]), there are no labels for where to attend. Instead, we learn an attention policy based on the idea that the best locations to attend to are the ones which most robustly lead the model to predict the correct category. In particular, we aim to maximize the probability of the class label (or equivalently, minimize the cross-entropy) by marginalizing over the actions at each glimpse: ℓ= log p(y | I, θ) = log X a p(a | I, θ)p(y | a, I, θ). (1) We train the attention model by maximizing a lower bound on ℓ. In Section 4.1, we first describe a previous approach which minimized a variational lower bound. We then introduce our proposed method which directly estimates the gradients of ℓ. As shown in Section 4.2, our method can be seen as maximizing a tighter lower bound on ℓ. 4.1 Variational lower bound We first outline the approach of [2], who trained the model to maximize a variational lower bound on ℓ. Let q(a | y, I) be an approximating distribution. The lower bound on ℓis then given by: ℓ= log X a p(a | I, θ)p(y | a, I, θ) ≥ X a q(a | y, I) log p(y, a | I, θ) + H[q] = F. (2) In the case where q(a | y, I) = p(a | I, θ) is the prior, as considered by [2], this reduces to F = X a p(a | I, θ) log p(y | a, I, θ). (3) The learning rules can be derived by taking derivatives of Eqn. 3 with respect to the model parameters: ∂F ∂θ = X a p(a | I, θ) ∂log p(y | a, I, θ) ∂θ + log p(y | a, I, θ)∂log p(a | I, θ) ∂θ . (4) The summation can be approximated using M Monte Carlo samples ˜am from p(a | I, θ): ∂F ∂θ ≈1 M M X m=1 ∂log p(y | ˜am, I, θ) ∂θ + log p(y | ˜am, I, θ)∂log p(˜am | I, θ) ∂θ . (5) The partial derivative terms can each be computed using standard backpropagation. This suggests a simple gradient-based training algorithm: For each image, one first computes the samples ˜am from the prior p(a | I, θ), and then updates the parameters according to Eqn. 5. As observed by [2], one must carefully use control variates in order to make this technique practical; we defer discussion of control variates to Section 4.4. 4.2 An improved lower bound on the log-likelihood The variational method described above has some counterintuitive properties early in training. First, because it averages the log-likelihood over actions, it greatly amplifies the differences in probabilities assigned to the true category by different bad glances. For instance, a glimpse sequence which leads to 0.01 probability assigned to the correct class is considered much worse than one which leads to 0.02 probability under the variational objective, even though in practice they may be equally bad since they have both missed the relevant information. A second odd behavior is that all glimpse sequences are weighted equally in the log-likelihood gradient. It would be better if the training procedure focused its effort on using those glances which contain the relevant information. Both of these effects contribute noise in the training procedure, especially in the early stages of training. 4 Instead, we adopt an approach based on the wake-p step of reweighted wake-sleep [9], where we attempt to maximize the marginal log-probability ℓdirectly. We differentiate the marginal loglikelihood objective in Eqn. 1 with respect to the model parameters: ∂ℓ ∂θ = 1 p(y | I, θ) X a p(a | I, θ)p(y | a, I, θ) ∂log p(y | a, I, θ) ∂θ + ∂log p(a | I, θ) ∂θ . (6) The summation and normalizing constant are both intractable to evaluate, so we estimate them using importance sampling. We must define a proposal distribution q(a | y, I), which ideally should be close to the posterior p(a | y, I, θ). One reasonable choice is the prior p(a | I, θ), but another choice is described in Section 4.3. Normalized importance sampling gives a biased but consistent estimator of the gradient of ℓ. Given samples ˜a1, . . . , ˜aM from q(a | y, I), the (unnormalized) importance weights are computed as: ˜wm = p(˜am | I, θ)p(y | ˜am, I, θ) q(˜am | y, I) . (7) The Monte Carlo estimate of the gradient is given by: ∂ℓ ∂θ ≈ M X m=1 wm ∂log p(y | ˜am, I, θ) ∂θ + ∂log p(˜am | I, θ) ∂θ , (8) where wm = ˜wm/ PM i=1 ˜wi are the normalized importance weights. When q is chosen to be the prior, this approach is equivalent to the method of [22] for learning generative feed-forward networks. Our importance sampling based estimator can also be viewed as the gradient ascent update on the objective function E h log 1 M PM m=1 ˜wmi . Combining Jensen’s inequality with the unbiasedness of the ˜wm shows that this is a lower bound on the log-likelihood: E " log 1 M M X m=1 ˜wm # ≤log E " 1 M M X m=1 ˜wm # = log E [ ˜wm] = ℓ. (9) We relate this to the previous section by noting that F = E[log ˜wm]. Another application of Jensen’s inequality shows that our proposed bound is at least as accurate as F: F = E [log ˜wm] = E " 1 M M X m=1 log ˜wm # ≤E " log 1 M M X m=1 ˜wm # . (10) Burda et al. [23] further analyzed a closely related importance sampling based estimator in the context of generative models, bounding the mean absolute deviation and showing that the bias decreases monotonically with the number of samples. 4.3 Training an inference network Late in training, once the attention model has learned an effective policy, the prior distribution p(a | I, θ) is a reasonable choice for the proposal distribution q(a | y, I), as it puts significant probability mass on good actions. But early in training, the model may have only a small probability of choosing a good set of glimpses, and the prior may have little overlap with the posterior. To deal with this, we train an inference network to predict, given the observations as well as the class label, where the network should look to correctly predict that class (see Figure 1). With this additional information, the inference network can act as a “teacher” for the attention policy. The inference network predicts a sequence of glimpses stochastically: q(a | y, I, η) = N Y n=1 q(an | y, I, η, a1:n−1). (11) This distribution is analogous to the prior, except that each decision also takes into account the class label y. We denote the parameters for the inference network as η. During training, the prediction network is learnt by following the gradient of the estimator in Eqn. 8 with samples ˜am ∼q(a | y, I, η) drawn from the inference network output. 5 Our training procedure for the inference network parallels the wake-q step of reweighted wakesleep [9]. Intuitively, the inference network is most useful if it puts large probability density over locations in an image that are most informative for predicting class labels. We therefore train the inference weights η to minimize the Kullback-Leibler divergence between the recognition model prediction q(a | y, I, η) and posterior distribution from the attention model p(a | y, I, θ): min η DKL(p ∥q) = min η − X a p(a | y, I, θ) log q(a | y, I, η). (12) The gradient update for the recognition weights can be obtained by taking the derivatives of Eq. (12) with respect to the recognition weights η: ∂DKL(p ∥q) ∂η = Ep(a | y,I,θ) ∂log q(a | y, I, η) ∂η . (13) Since the posterior expectation is intractable, we estimate it with importance sampling. In fact, we reuse the importance weights computed for the prediction network update (see Eqn. 7) to obtain the following gradient estimate for the recognition network: ∂DKL(p ∥q) ∂η ≈ M X m=1 wm ∂log q(˜am | y, I, η) ∂η . (14) 4.4 Control variates The speed of convergence of gradient ascent with the gradients defined in Eqns. 8 and 14 suffers from high variance of the stochastic gradient estimates. Past work using similar gradient updates has found significant benefit from the use of control variates, or reward baselines, to reduce the variance [17, 10, 3, 11, 2]. Choosing effective control variates for the stochastic gradient estimators amounts to finding a function that is highly correlated with the gradient vectors, and whose expectation is known or tractable to compute [10, 24]. Unfortunately, a good choice of control variate is highly model-dependent. We first note that: Eq(a | y,I,η) p(a | I, θ) q(a | y, I, η) ∂log p(a | I, θ) ∂θ = 0, Eq(a | y,I,η) ∂log q(a | y, I, η) ∂η = 0. (15) The terms inside the expectation are very similar to the gradients in Eqns. 8 and 14, suggesting that stochastic estimates of these expectations would make good control variates. To increase the correlation between the gradients and the control variates, we reuse the same set of samples and importance weights for the gradients and control variates. Using these control variates results in the gradient estimates for the prediction and recognition networks, we obtain: ∂log p(a | I, θ) ∂θ ≈ M X m=1 wm − p(˜am | I,θ) q(˜am | y,I,η) PM i=1 p(˜ai | I,θ) q(˜ai | y,I,η) ∂log p(˜am | I, θ) ∂θ , (16) ∂DKL(p ∥q) ∂η ≈ M X m=1 wm −1 M ∂log q(˜am | y, I, η) ∂η . (17) Our use of control variates does not bias the gradient estimates (beyond the bias which is present due to importance sampling). However, as we show in the experiments, the resulting estimates have much lower variance than those of Eqns. 8 and 14. Following the analogy with reinforcement learning highlighted by [11], these control variates can also be viewed as reward baselines: bp = p(a | I,θ) q(a | y,I,η)Eq(a | y,I,η) [p(y | a, I, θ)] M · Eq(a | y,I,η) h p(a | I,θ) q(a | y,I,η)Eq(a | y,I,θ) [p(y | a, I, θ)] i ≈ p(˜am | I,θ) q(˜am | y,I,η) PM i=1 p(˜ai | I,θ) q(˜ai | y,I,η) , (18) bq = Ep(a | I,θ) [p(y | a, I, θ)] M · Ep(a | I,θ) [p(y | a, I, θ)] = 1 M , (19) where M is the number of samples drawn for proposal q. 6 0 20 40 60 80 100 10 -1 10 0 Training Error VAR VAR+c WS-RAM WS-RAM+c WS-RAM+q WS-RAM+q+c 0 20 40 60 80 100 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Variance of Estimated Gradient VAR VAR+c WS-RAM WS-RAM+c WS-RAM+q WS-RAM+q+c 0 20 40 60 80 100 0 1 2 3 4 5 6 Effective Sample Size WS-RAM WS-RAM+c WS-RAM+q WS-RAM+q+c Figure 2: Left: Training error as a function of the number of updates. Middle: variance of the gradient estimates. Right: effective sample size (max = 5). Horizontal axis: thousands of updates. VAR: variational baseline; WS-RAM: our proposed method; +q: uses the inference networks for the proposal distribution; +c: uses control variates. 4.5 Encouraging exploration Similarly to other methods based on reinforcement learning, stochastic attention networks face the problem of encouraging the method to explore different actions. Since the gradient in Eqn. 8 only rewards or punishes glimpse sequences which are actually performed, any part of the space which is never visited will receive no reward signal. [2] introduced several heuristics to encourage exploration, including: (1) raising the temperature of the proposal distribution, (2) regularizing the attention policy to encourage viewing all image locations, and (3) adding a regularization term to encourage high entropy in the action distribution. We have implemented all three heuristics for the WS-RAM and for the baselines. While these heuristics are important for good performance of the baselines, we found that they made little difference to the WS-RAM because the basic method already explores adequately. 5 Experimental results To measure the effectiveness of the proposed WS-RAM method, we first investigated a toy classification task involving a variant of the MNIST handwritten digits dataset [25] where transformations were applied to the images. We then evaluated the proposed method on a substantially more difficult image caption generation task using the Flickr8k [26] dataset. 5.1 Translated scaled MNIST We generated a dataset of randomly translated and scaled handwritten digits from the MNIST dataset [25]. Each digit was placed in a 100x100 black background image at a random location and scale. The task was to identify the digit class. The attention models were allowed four glimpses before making a classification prediction. The goal of this experiment was to evaluate the effectiveness of our proposed WS-RAM model compared with the variational approach of [2]. For both the WS-RAM and the baseline, the architecture was a stochastic attention model which used ReLU units in all recurrent layers. The actions included both continuous and discrete latent variables, corresponding to glimpse scale and location, respectively. The distribution over actions was represented as a Gaussian random variable for the location and an independent multinomial random variable for the scale. All networks were trained using Adam [27], with the learning rate set to the highest value that allowed the model to successfully converge to a sensible attention policy. The classification performance results are shown in Table 1. In Figure 2, the WS-RAM is compared with the variational baseline, each using the same number of samples (in order to make computation time roughly equivalent). We also show comparisons against ablated versions of the WS-RAM where the control variates and inference network were removed. When the inference network was removed, the prior p(a | I, θ) was used for the proposal distribution. In addition to the classification results, we measured the effective sample size (ESS) of our method with and without control variates and the inference network. ESS is a standard metric for evaluating importance samplers, and is defined as 1/ P m(wm)2, where wm denotes the normalized importance weights. Results are shown in Figure 2. Using the inference network reduced the variances in 7 Test err. VAR WS-RAM WS-RAM + q no c.v. 3.11% 4.23% 2.59% +c.v. 1.81% 1.85% 1.62% Table 1: Classification error rate comparison for the attention models trained using different algorithms on translated scaled MNIST. The numbers are reported after 10 million updates using 5 samples. 0 50 100 150 200 10 -2 10 -1 Training Error VAR+c, no exploration VAR+c + exploration WS-RAM+q+c, no exploration WS-RAM+q+c + exploration Figure 3: The effect of the exploration heuristics on the variational baseline and the WS-RAM. BLEU1 BLEU2 BLEU3 BLEU4 VAR 62.3 41.6 26.9 17.2 WS-RAM+Qnet 61.1 40.4 26.9 17.8 Table 2: BLEU score performance on the Flickr8K dataset for our WS-RAM and the variational method. 0 20 40 60 80 100 36 38 40 42 44 46 48 50 Training Negative Loglikelihood WS-RAM+q+c VAR+c Figure 4: Training negative log-likelihood on Flickr8K for the first 10,000 updates. See Figure 2 for the labels. gradient estimation, although this improvement did not reflect itself in the ESS. Control variates improved both metrics. In Section 4.5, we described heuristics which encourage the models to explore the action space. Figure 3 compares the training with and without these heuristics. Without the heuristics, the variational method quickly fell into a local minimum where the model predicted only one glimpse scale over all images; the exploration heuristics fixed this problem. By contrast, the WS-RAM did not appear to have this problem, so the heuristics were not necessary. 5.2 Generating captions using multi-scale attention We also applied the WS-RAM method to learn a stochastic attention model similar to [5] for generating image captions. We report results on the widely-used Flickr8k dataset. The training/valid/test split followed the same protocol as used in previous work [28]. The goal of this experiment was to examine the improvement of the WS-RAM over the variational method for learning with realistic imgaes. Similarly to [5], we first ran a convolutional network, and the attention network then determined which part of the convolutional net representation to attend to. The attention network predicted both which layer to attend to and a location within the layer, in contrast with [5], where the scale was held fixed. Because a convolutional net shrinks the representation with max-pooling, choosing a layer is analogous to choosing a scale. At each glimpse, the inference network was given the immediate preceding word in the target sentences. We compare the BLEU scores of our WS-RAM and the variational method in in Table 2. Figure 4 shows training curves for both models. We observe that WS-RAM obtained similar performance to the variatinoal method, but trained more efficiently. 6 Conclusions In this paper, we introduced the Wake-Sleep Recurrent Attention Model (WS-RAM), an efficient method for training stochastic attention models. This method improves upon prior work by using the reweighted wake-sleep algorithm [9] to approximate expectations from the posterior over glimpses. We also introduced control variates to reduce the variability of the stochastic gradients. Our method reduces the variance in the gradient estimates and accelerates training of attention networks for both invariant handwritten digit recognition and image caption generation. Acknowledgments This work was supported by the Fields Institute, Samsung, ONR Grant N00014-14-1-0232 and the hardware donation of NVIDIA Corporation. 8 References [1] A. Krizhevsky, I. Sutskever, , and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In Neural Information Processing Systems, 2012. [2] J. Ba, V. Mnih, and K. Kavukcuoglu. Multiple object recognition with visual attention. In International Conference on Learning Representations, 2015. [3] V. Mnih, N. Heess, A. Graves, and K. Kavukcuoglu. Recurrent models of visual attention. In Neural Information Processing Systems, 2014. [4] Y. Tang, N. Srivastava, and R. Salakhutdinov. Learning generative models with visual attention. In Neural Information Processing Systems, 2014. [5] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio. Show, attend, and tell: neural image caption generation with visual attention. In International Conference on Machine Learning, 2015. [6] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015. [7] W. Zaremba and I. Sutskever. Reinforcement learning neural Turing machines. arXiv:1505.00521, 2015. [8] P. Dayan, G. E. Hinton, R. M. Neal, and R. S. Zemel. The Helmholtz machine. Neural Computation, 7:889–904, 1995. [9] J. Bornschein and Y. Bengio. Reweighted wake-sleep. arXiv:1406.2751, 2014. [10] J. Paisley, D. M. Blei, and M. I. Jordan. Variational Bayesian inference with stochastic search. In International Conference on Machine Learning, 2012. [11] A. Mnih and K. Gregor. Neural variational inference and learning in belief networks. In International Conference on Machine Learning, 2014. [12] H. Larochelle and G. E. Hinton. Learning to combine foveal glimpses with a third-order Boltzmann machine. In Neural Information Processing Systems, 2010. [13] M. Denil, L. Bazzani, H. Larochelle, and N. de Freitas. Learning where to attend with deep architectures for image tracking. Neural Computation, 24(8):2151–84, April 2012. [14] A. Graves. Generating sequences with recurrent neural networks. arXiv:1308.0850, 2014. [15] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. DRAW: a recurrent neural network for image generation. arXiv:1502.04623, 2015. [16] Radford M. Neal. Connectionist learning of belief networks. Artificial Intelligence, 1992. [17] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992. [18] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In International Conference on Learning Representations, 2014. [19] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning, 2014. [20] L. Itti, C. Koch, and E. Niebur. A model of saliency-based visual attention for rapid scene analysis. IEEE Transactions of Pattern Analysis and Machine Intelligence, 20(11):1254–59, November 1998. [21] T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In International Conference on Computer Vision, 2009. [22] Y. Tang and R. Salakhutdinov. Learning stochastic feedforward neural networks. In Neural Information Processing Systems, 2013. [23] Y. Burda, R. Grosse, and R. Salakhutdinov. Importance weighted autoencoders. arXiv:1509.00519, 2015. [24] Lex Weaver and Nigel Tao. The optimal reward baseline for gradient-based reinforcement learning. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pages 538–545. Morgan Kaufmann Publishers Inc., 2001. [25] 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. [26] Micah Hodosh, Peter Young, and Julia Hockenmaier. Framing image description as a ranking task: Data, models and evaluation metrics. Journal of Artificial Intelligence Research, pages 853–899, 2013. [27] D. Kingma and J. L. Ba. Adam: a method for stochastic optimization. arXiv:1412.6980, 2014. [28] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. arXiv preprint arXiv:1412.2306, 2014. 9 | 2015 | 340 |
5,859 | Matrix Manifold Optimization for Gaussian Mixtures Reshad Hosseini School of ECE College of Engineering University of Tehran, Tehran, Iran reshad.hosseini@ut.ac.ir Suvrit Sra Laboratory for Information and Decision Systems Massachusetts Institute of Technology Cambridge, MA. suvrit@mit.edu Abstract We take a new look at parameter estimation for Gaussian Mixture Model (GMMs). Specifically, we advance Riemannian manifold optimization (on the manifold of positive definite matrices) as a potential replacement for Expectation Maximization (EM), which has been the de facto standard for decades. An out-of-the-box invocation of Riemannian optimization, however, fails spectacularly: it obtains the same solution as EM, but vastly slower. Building on intuition from geometric convexity, we propose a simple reformulation that has remarkable consequences: it makes Riemannian optimization not only match EM (a nontrivial result on its own, given the poor record nonlinear programming has had against EM), but also outperform it in many settings. To bring our ideas to fruition, we develop a welltuned Riemannian LBFGS method that proves superior to known competing methods (e.g., Riemannian conjugate gradient). We hope that our results encourage a wider consideration of manifold optimization in machine learning and statistics. 1 Introduction Gaussian Mixture Models (GMMs) are a mainstay in a variety of areas, including machine learning and signal processing [4, 10, 16, 19, 21]. A quick literature search reveals that for estimating parameters of a GMM the Expectation Maximization (EM) algorithm [9] is still the de facto choice. Over the decades, other numerical approaches have also been considered [24], but methods such as conjugate gradients, quasi-Newton, Newton, have been noted to be usually inferior to EM [34]. The key difficulty of applying standard nonlinear programming methods to GMMs is the positive definiteness (PD) constraint on covariances. Although an open subset of Euclidean space, this constraint can be difficult to impose, especially in higher-dimensions. When approaching the boundary of the constraint set, convergence speed of iterative methods can also get adversely affected. A partial remedy is to remove the PD constraint by using Cholesky decompositions, e.g., as exploited in semidefinite programming [7]. It is believed [30] that in general, the nonconvexity of this decomposition adds more stationary points and possibly spurious local minima.1 Another possibility is to formulate the PD constraint via a set of smooth convex inequalities [30] and apply interior-point methods. But such sophisticated methods can be extremely slower (on several statistical problems) than simpler EM-like iterations, especially for higher dimensions [27]. Since the key difficulty arises from the PD constraint, an appealing idea is to note that PD matrices form a Riemannian manifold [3, Ch.6] and to invoke Riemannian manifold optimization [1, 6]. Indeed, if we operate on the manifold2, we implicitly satisfy the PD constraint, and may have a better chance at focusing on likelihood maximization. While attractive, this line of thinking also fails: an out-of-the-box invocation of manifold optimization is also vastly inferior to EM. Thus, we need to think harder before challenging the hegemony of EM. We outline a new approach below. 1Remarkably, using Cholesky with the reformulation in §2.2 does not add spurious local minima to GMMs. 2Equivalently, on the interior of the constraint set, as is done by interior point methods (their nonconvex versions); though these turn out to be slow too as they are second order methods. 1 Key idea. Intuitively, the mismatch is in the geometry. For GMMs, the M-step of EM is a Euclidean convex optimization problem, whereas the GMM log-likelihood is not manifold convex3 even for a single Gaussian. If we could reformulate the likelihood so that the single component maximization task (which is the analog of the M-step of EM for GMMs) becomes manifold convex, it might have a substantial empirical impact. This intuition supplies the missing link, and finally makes Riemannian manifold optimization not only match EM but often also greatly outperform it. To summarize, the key contributions of our paper are the following: – Introduction of Riemannian manifold optimization for GMM parameter estimation, for which we show how a reformulation based on geodesic convexity is crucial to empirical success. – Development of a Riemannian LBFGS solver; here, our main contribution is the implementation of a powerful line-search procedure, which ensures convergence and makes LBFGS outperform both EM and manifold conjugate gradients. This solver may be of independent interest. We provide substantive experimental evidence on both synthetic and real-data. We compare manifold optimization, EM, and unconstrained Euclidean optimization that reformulates the problem using Cholesky factorization of inverse covariance matrices. Our results shows that manifold optimization performs well across a wide range of parameter values and problem sizes. It is much less sensitive to overlapping data than EM, and displays much less variability in running times. Our results are quite encouraging, and we believe that manifold optimization could open new algorithmic avenues for mixture models, and perhaps other statistical estimation problems. Note. To aid reproducibility of our results, MATLAB implementations of our methods are available as a part of the MIXEST toolbox developed by our group [12]. The manifold CG method that we use is directly based on the excellent toolkit MANOPT [6]. Related work. Summarizing published work on EM is clearly impossible. So, let us briefly mention a few lines of related work. Xu and Jordan [34] examine several aspects of EM for GMMs and counter the claims of Redner and Walker [24], who claimed EM to be inferior to generic secondorder nonlinear programming techniques. However, it is now well-known (e.g., [34]) that EM can attain good likelihood values rapidly, and scales to much larger problems than amenable to secondorder methods. Local convergence analysis of EM is available in [34], with more refined results in [18], who show that when data have low overlap, EM can converge locally superlinearly. Our paper develops Riemannian LBFGS, which can also achieve local superlinear convergence. For GMMs some innovative gradient-based methods have also been suggested [22, 26], where the PD constraint is handled via a Cholesky decomposition of covariance matrices. However, these works report results only for low-dimensional problems and (near) spherical covariances. The idea of using manifold optimization for GMMs is new, though manifold optimization by itself is a well-developed subject. A classic reference is [29]; a more recent work is [1]; and even a MATLAB toolbox exists [6]. In machine learning, manifold optimization has witnessed increasing interest4, e.g., for low-rank optimization [15, 31], or optimization based on geodesic convexity [27, 33]. 2 Background and problem setup The key object in this paper is the Gaussian Mixture Model (GMM), whose probability density is p(x) := XK j=1 αjpN (x; µj, Σj), x ∈Rd, and where pN is a (multivariate) Gaussian with mean µ ∈Rd and covariance Σ ≻0. That is, pN (x; µ, Σ) := det(Σ)−1/2(2π)−d/2 exp −1 2(x −µ)T Σ−1(x −µ) . Given i.i.d. samples {x1, . . . , xn}, we wish to estimate {ˆµj ∈Rd, ˆΣj ≻0}K j=1 and weights ˆα ∈ ∆K, the K-dimensional probability simplex. This leads to the GMM optimization problem max α∈∆K,{µj,Σj≻0}K j=1 n X i=1 log XK j=1 αjpN (xi; µj, Σj) . (2.1) 3That is, convex along geodesic curves on the PD manifold. 4Manifold optimization should not be confused with “manifold learning” a separate problem altogether. 2 Solving Problem (2.1) can in general require exponential time [20].5 However, our focus is more pragmatic: similar to EM, we also seek to efficiently compute local solutions. Our methods are set in the framework of manifold optimization [1, 29]; so let us now recall some material on manifolds. 2.1 Manifolds and geodesic convexity A smooth manifold is a non-Euclidean space that locally resembles Euclidean space [17]. For optimization, it is more convenient to consider Riemannian manifolds (smooth manifolds equipped with an inner product on the tangent space at each point). These manifolds possess structure that allows one to extend the usual nonlinear optimization algorithms [1, 29] to them. Algorithms on manifolds often rely on geodesics, i.e., curves that join points along shortest paths. Geodesics help generalize Euclidean convexity to geodesic convexity. In particular, say M is a Riemmanian manifold, and x, y ∈M; also let γ be a geodesic joining x to y, such that γxy : [0, 1] →M, γxy(0) = x, γxy(1) = y. Then, a set A ⊆M is geodesically convex if for all x, y ∈A there is a geodesic γxy contained within A. Further, a function f : A →R is geodesically convex if for all x, y ∈A, the composition f ◦γxy : [0, 1] →R is convex in the usual sense. The manifold of interest to us is Pd, the manifold of d × d symmetric positive definite matrices. At any point Σ ∈Pd, the tangent space is isomorphic to set of symmetric matrices; and the Riemannian metric at Σ is given by tr(Σ−1dΣΣ−1dΣ). This metric induces the geodesic [3, Ch. 6] γΣ1,Σ2(t) := Σ1/2 1 (Σ−1/2 1 Σ2Σ−1/2 1 )tΣ1/2 1 , 0 ≤t ≤1. Thus, a function f : Pd →R if geodesically convex on a set A if it satisfies f(γΣ1,Σ2(t)) ≤(1 −t)f(Σ1) + tf(Σ2), t ∈[0, 1], Σ1, Σ2 ∈A. Such functions can be nonconvex in the Euclidean sense, but are globally optimizable due to geodesic convexity. This property has been important in some matrix theoretic applications [3, 28], and has gained more extensive coverage in several recent works [25, 27, 33]. We emphasize that even though the mixture cost (2.1) is not geodesically convex, for GMM optimization geodesic convexity seems to play a crucial role, and it has a huge impact on convergence speed. This behavior is partially expected and analogous to EM, where a convex M-Step makes the overall method much more practical. Let us now use this intuition to elicit geodesic convexity. 2.2 Problem reformulation We begin with parameter estimation for a single Gaussian: although this has a closed-form solution (which ultimately benefits EM), it requires more subtle handling when using manifold optimization. Consider the following maximum likelihood parameter estimation for a single Gaussian: max µ,Σ≻0 L(µ, Σ) := Xn i=1 log pN (xi; µ, Σ). (2.2) Although (2.2) is a Euclidean convex problem, it is not geodesically convex on its domain Rd × Pd, which makes it geometrically handicapped when applying manifold optimization. To overcome this problem, we invoke a simple reparametrization6 that has far-reaching impact. More precisely, we augment the sample vectors xi to instead consider yT i = [xT i 1]. Therewith, (2.2) turns into max S≻0 bL(S) := Xn i=1 log qN (yi; S), (2.3) where qN (yi; S) := √ 2π exp( 1 2)pN (yi; 0, S). Proposition 1 states the key property of (2.3). Proposition 1. The map φ(S) ≡−bL(S), where bL(S) is as in (2.3), is geodesically convex. We omit the proof due to space limits; see [13] for details. Alternatively, see [28] for more general results on geodesic convexity. Theorem 2.1 shows that the solution to (2.3) yields the solution to the original problem (2.2) too. 5Though under very strong assumptions, it has polynomial smoothed complexity [11]. 6This reparametrization in itself is probably folklore; its role in GMM optimization is what is crucial here. 3 10−1 100 101 102 21.4 21.6 21.8 22 22.2 22.4 22.6 22.8 23 23.2 Time (seconds) Average log-likelihood LBFGS, Reformulated MVN CG, Reformulated MVN LBFGS, Usual MVN CG, Usual MVN (a) Single Gaussian 100 101 102 103 104 105 26 27 28 29 30 31 32 33 Time (seconds) Average log-likelihood LBFGS, Reformulated MVN CG, Reformulated MVN LBFGS, Original MVN CG, Original MVN (b) Mixtures of seven Gaussians Figure 1: The effect of reformulation in convergence speed of manifold CG and manifold LBFGS methods (d = 35); note that the x-axis (time) is on a logarithmic scale. Theorem 2.1. If µ∗, Σ∗maximize (2.2), and if S∗maximizes (2.3), then bL(S∗) = L(µ∗, Σ∗) for S∗= Σ∗+ µ∗µ∗T µ∗ µ∗T 1 . Proof. We express S by new variables U, t and s by writing S = U + sttT st stT s . The objective function bL(S) in terms of the new parameters becomes bL(U, t, s) = n 2 −d 2 log(2π) −n 2 log s −n 2 log det(U) − Xn i=1 1 2(xi −t)T U −1(xi −t) −n 2s. Optimizing bL over s > 0 we see that s∗= 1 must hold. Hence, the objective reduces to a ddimensional Gaussian log-likelihood, for which clearly U ∗= Σ∗and t∗= µ∗. Theorem 2.1 shows that reformulation (2.3) is “faithful,” as it leaves the optimum unchanged. Theorem 2.2 proves a local version of this result for GMMs. Theorem 2.2. A local maximum of the reparameterized GMM log-likelihood bL({Sj}K j=1) := Xn i=1 log XK j=1 αjqN (yi; Sj) is a local maximum of the original log-likelihood L({µj, Σj}K j=1) := Xn i=1 log XK j=1 αjpN (xi|µj, Σj) . The proof can be found in [13]. Theorem 2.2 shows that we can replace problem (2.1) by one whose local maxima agree with those of (2.1), and whose individual components are geodesically convex. Figure 1 shows the true import of our reformulation: the dramatic impact on the empirical performance of Riemmanian ConjugateGradient (CG) and Riemannian LBFGS for GMMs is unmistakable. The final technical piece is to replace the simplex constraint α ∈∆K to make the problem unconstrained. We do this via a commonly used change of variables [14]: ηk = log αk αK for k = 1, . . . , K −1. Assuming ηK = 0 is a constant, the final GMM optimization problem is: max {Sj≻0}K j=1,{ηj}K−1 j=1 bL({Sj}K j=1, {ηj}K−1 j=1 ) := n X i=1 log K X j=1 exp(ηj) PK k=1 exp(ηk) qN (yi; Sj) (2.4) We view (2.4) as a manifold optimization problem; specifically, it is an optimization problem on the product manifold QK j=1 Pd × RK−1. Let us see how to solve it. 4 3 Manifold Optimization In unconstrained Euclidean optimization, typically one iteratively (i) finds a descent direction; and (ii) performs a line-search to obtain sufficient decrease and ensure convergence. On a Riemannian manifold, the descent direction is computed on the tangent space (this space varies (smoothly) as one moves along the manifold). At a point X, the tangent space TX is the approximating vector space (see Fig. 2). Given a descent direction ξX ∈TX, line-search is performed along a smooth curve on the manifold (red curve in Fig. 2). The derivative of this curve at X equals the descent direction ξX. We refer the reader to [1, 29] for an in depth introduction to manifold optimization. Sd + X TX ⇠X Figure 2: Visualization of line-search on a manifold: X is a point on the manifold, TX is the tangent space at the point X, ξX is a descent direction at X; the red curve is the curve along which line-search is performed. Successful large-scale Euclidean methods such as conjugate-gradient and LBFGS combine gradients at the current point with gradients and descent directions from previous points to obtain a new descent direction. To adapt such algorithms to manifolds, in addition to defining gradients on manifolds, we also need to define how to transport vectors in a tangent space at one point to vectors in a different tangent space at another point. On Riemannian manifolds, the gradient is simply a direction on the tangent space, where the inner-product of the gradient with another direction in the tangent space gives the directional derivative of the function. Formally, if gX defines the inner product in the tangent space TX, then Df(X)ξ = gX(gradf(X), ξ), for ξ ∈TX. Given a descent direction in the tangent space, the curve along which we perform line-search can be a geodesic. A map that takes the direction and a step length to obtain a corresponding point on the geodesic is called an exponential map. Riemannian manifolds are also equipped with a natural way of transporting vectors on geodesics, which is called parallel transport. Intuitively, a parallel transport is a differential map with zero derivative along the geodesics. Using the above ideas, Algorithm 1 sketches a generic manifold optimization algorithm. Algorithm 1: Sketch of an optimization algorithm (CG, LBFGS) to minimize f(X) on a manifold Given: Riemannian manifold M with Riemannian metric g; parallel transport T on M; exponential map R; initial value X0; a smooth function f for k = 0, 1, . . . do Obtain a descent direction based on stored information and gradf(Xk) using metric g and transport T Use line-search to find α such that it satisfies appropriate (descent) conditions Calculate the retraction / update Xk+1 = RXk(αξk) Based on the memory and need of algorithm store Xk, gradf(Xk) and αξk end for return estimated minimum Xk Note that Cartesian products of Riemannian manifolds are again Riemannian, with the exponential map, gradient and parallel transport defined as the Cartesian product of individual expressions; the inner product is defined as the sum of inner product of the components in their respective manifolds. Different variants of Riemannian LBFGS can be obtained depending where to perform the vector Definition Expression for PSD matrices Tangent space Space of symmetric matrices Metric between two tangent vectors ξ, η at Σ gΣ(ξ, η) = tr(Σ−1ξΣ−1η) Gradient at Σ if Euclidean gradient is ∇f(Σ) gradf(Σ) = 1 2Σ(∇f(X) + ∇f(X)T )Σ Exponential map at point Σ in direction ξ RΣ(ξ) = Σ exp(Σ−1ξ) Parallel transport of tangent vector ξ from Σ1 to Σ2 TΣ1,Σ2(ξ) = EξET , E = (Σ2Σ−1 1 )1/2 Table 1: Summary of key Riemannian objects for the PD matrix manifold. transport. We found that the version developed in [28] gives the best performance, once we combine it with a line-search algorithm satisfying Wolfe conditions. We present the crucial details below. 5 3.1 Line-search algorithm satisfying Wolfe conditions To ensure Riemannian LBFGS always produces a descent direction, it is necessary to ensure that the line-search algorithm satisfies Wolfe conditions [25]. These conditions are given by: f(RXk(αξk)) ≤f(Xk) + c1αDf(Xk)ξk, (3.1) Df(Xk+1)ξk+1 ≥c2Df(Xk)ξk, (3.2) where 0 < c1 < c2 < 1. Note that αDf(Xk)ξk = gXk(gradf(Xk), αξk), i.e., the derivative of f(Xk) in the direction αξk is the inner product of descent direction and gradient of the function. Practical line-search algorithms implement a stronger (Wolfe) version of (3.2) that enforces |Df(Xk+1)ξk+1| ≤c2Df(Xk)ξk. Similar to the Euclidean case, our line-search algorithm is also divided into two phases: bracketing and zooming [23]. During bracketing, we compute an interval such that a point satisfying Wolfe conditions can be found in this interval. In the zooming phase, we obtain such a point in the determined interval. The one-dimensional function and its gradient used by the line-search are φ(α) = f(RXk(αξk)), φ′(α) = αDf(Xk)ξk. The algorithm is essentially the same as the line-search in the Euclidean space; the reader can also see its manifold incarnation in [13]. Theory behind how this algorithm is guaranteed to find a steplength satisfying (strong) Wolfe conditions can be found in [23]. A good choice of initial step-length α1 can greatly speed up the line-search. We propose the following choice that turns out to be quite effective in our experiments: α1 = 2f(Xk) −f(Xk−1) Df(Xk)ξk . (3.3) Equation (3.3) is obtained by finding α∗that minimizes a quadratic approximation of the function along the geodesic through the previous point (based on f(Xk−1), f(Xk) and Df(Xk−1)ξk−1): α∗= 2f(Xk) −f(Xk−1) Df(Xk−1)ξk−1 . (3.4) Then assuming that first-order change will be the same as in the previous step, we write α∗Df(Xk−1)ξk−1 ≈α1Df(Xk)ξk. (3.5) Combining (3.4) and (3.5), we obtain our estimate α1 expressed in (3.3). Nocedal and Wright [23] suggest using either α∗of (3.4) for the initial step-length α1, or using (3.5) where α∗is set to be the step-length obtained in the line-search in the previous point. We observed that if one instead uses (3.3) instead, one obtains substantially better performance than the other two approaches. 4 Experimental Results We have performed numerous experiments to examine effectiveness of our method. Below we report performance comparisons on both real and simulated data. In all experiments, we initialize the mixture parameters for all methods using k-means++ [2]. All methods also use the same termination criteria: they stop either when the difference of average log-likelihood (i.e., 1 nlog-likelihood) between consecutive iterations falls below 10−6, or when the number of iterations exceeds 1500. More extensive empirical results can be found in the longer version of this paper [13]. Simulated Data EM’s performance is well-known to depend on the degree of separation of the mixture components [18, 34]. To assess the impact of this separation on our methods, we generate data as proposed in [8, 32]. The distributions are chosen so their means satisfy the following inequality: ∀i̸=j : ∥mi −mj∥≥c max i,j {tr(Σi), tr(Σj)}, where c models the degree of separation. Since mixtures with high eccentricity (i.e., the ratio of the largest eigenvalue of the covariance matrix to its smallest eigenvalue) have smaller overlap, in 6 EM Original LBFGS Reformulated CG Reformulated CG Original Time (s) ALL Time (s) ALL Time (s) ALL Time (s) ALL c = 0.2 K = 2 1.1 ± 0.4 -10.7 5.6 ± 2.7 -10.7 3.7 ± 1.5 -10.8 23.8 ± 23.7 -10.7 K = 5 30.0 ± 45.5 -12.7 49.2 ± 35.0 -12.7 47.8 ± 40.4 -12.7 206.0 ± 94.2 -12.8 c = 1 K = 2 0.5 ± 0.2 -10.4 3.1 ± 0.8 -10.4 2.6 ± 0.6 -10.4 25.6 ± 13.6 -10.4 K = 5 104.1 ± 113.8 -13.4 79.9 ± 62.8 -13.3 45.8 ± 30.4 -13.3 144.3 ± 48.1 -13.3 c = 5 K = 2 0.2 ± 0.2 -11.0 3.4 ± 1.4 -11.0 2.8 ± 1.2 -11.0 43.2 ± 38.8 -11.0 K = 5 38.8 ± 65.8 -12.8 41.0 ± 45.7 -12.8 29.2 ± 36.3 -12.8 197.6 ± 118.2 -12.8 Table 2: Speed and average log-likelihood (ALL) comparisons for d = 20, e = 10 (each row reports values averaged over 20 runs over different datasets, so the ALL values are not comparable to each other). EM Original LBFGS Reformulated CG Reformulated CG Original Time (s) ALL Time (s) ALL Time (s) ALL Time (s) ALL c = 0.2 K = 2 65.7 ± 33.1 17.6 39.4 ± 19.3 17.6 46.4 ± 29.9 17.6 64.0 ± 50.4 17.6 K = 5 365.6 ± 138.8 17.5 160.9 ± 65.9 17.5 207.6 ± 46.9 17.5 279.8 ± 169.3 17.5 c = 1 K = 2 6.0 ± 7.1 17.0 12.9 ± 13.0 17.0 15.7 ± 17.5 17.0 42.5 ± 21.9 17.0 K = 5 40.5 ± 61.1 16.2 51.6 ± 39.5 16.2 63.7 ± 45.8 16.2 203.1 ± 96.3 16.2 c = 5 K = 2 0.2 ± 0.1 17.1 3.0 ± 0.5 17.1 2.8 ± 0.7 17.1 19.6 ± 8.2 17.1 K = 5 17.5 ± 45.6 16.1 20.6 ± 22.5 16.1 20.3 ± 24.1 16.1 93.9 ± 42.4 16.1 Table 3: Speed and ALL comparisons for d = 20, e = 1. CG Cholesky Original CG Cholesky Reformulated e = 1 e = 10 e = 1 e = 10 Time (s) ALL Time (s) ALL Time (s) ALL Time (s) ALL c = 0.2 K = 2 101.5 ± 34.1 17.6 113.9 ± 48.1 -10.7 36.7 ± 9.8 17.6 23.5 ± 11.9 -10.7 K = 5 627.1 ± 247.3 17.5 521.9 ± 186.9 -12.7 156.7 ± 81.1 17.5 106.7 ± 39.7 -12.6 c = 1 K = 2 135.2 ± 65.4 16.9 110.9 ± 51.8 -10.4 38.0 ± 14.5 16.9 49.0 ± 17.8 -10.4 K = 5 1016.9 ± 299.8 16.2 358.0 ± 155.5 -13.3 266.7 ± 140.5 16.2 279.8 ± 111.0 -13.4 c = 5 K = 2 55.2 ± 27.9 17.1 86.7 ± 47.2 -11.0 60.2 ± 20.8 17.1 177.6 ± 147.6 -11.0 K = 5 371.7 ± 281.4 16.1 337.7 ± 178.4 -12.8 270.2 ± 106.5 16.1 562.1 ± 242.7 -12.9 Table 4: Speed and ALL for applying CG on Cholesky-factorized problems with d = 20. addition to high eccentricity e = 10, we also test the (spherical) case where e = 1. We test three levels of separation c = 0.2 (low), c = 1 (medium), and c = 5 (high). We test two different numbers of mixture components K = 2 and K = 5; we consider experiments with larger values of K in our experiments on real data. For e = 10, the results for data with dimensionality d = 20 are given in Table 2. The results are obtained after running with 20 different random choices of parameters for each configuration. It is apparent that the performance of EM and Riemannian optimization with our reformulation is very similar. The variance of computation time shown by Riemmanian optimization is, however, notably smaller. Manifold optimization on the non-reformulated problem (last column) performs the worst. In another set of simulated data experiments, we apply different algorithms to spherical data (e = 1); the results are shown in Table 3. The interesting instance here is the case of low separation c = 0.2, where the condition number of the Hessian becomes large. As predicted by theory, the EM converges very slowly in such a case; Table 3 confirms this claim. It is known that in this case, the performance of powerful optimization approaches like CG and LBFGS also degrades [23]. But both CG and LBFGS suffer less than EM, while LBFGS performs noticeably better than CG. Cholesky decomposition is a commonly suggested idea for dealing with PD constraint. So, we also compare against unconstrained optimization (using Euclidean CG), where the inverse covariance matrices are Cholesky factorized. The results for the same data as in Tables 2 and 3 are reported in Table 4. Although the Cholesky-factorized problem proves to be much inferior to both EM and the manifold methods, our reformulation seems to also help it in several problem instances. Real Data We now present performance evaluation on a natural image dataset, where mixtures of Gaussians were reported to be a good fit to the data [35]. We extracted 200,000 image patches of size 6×6 from images and subtracted the DC component, leaving us with 35-dimensional vectors. Performance of different algorithms are reported in Table 5. Similar to the simulated results, performance of EM and 7 EM Algorithm LBFGS Reformulated CG Reformulated CG Original CG Cholesky Reformulated Time (s) ALL Time (s) ALL Time (s) ALL Time (s) ALL Time (s) ALL K = 2 16.61 29.28 14.23 29.28 17.52 29.28 947.35 29.28 476.77 29.28 K = 3 90.54 30.95 38.29 30.95 54.37 30.95 3051.89 30.95 1046.61 30.95 K = 4 165.77 31.65 106.53 31.65 153.94 31.65 6380.01 31.64 2673.21 31.65 K = 5 202.36 32.07 117.14 32.07 140.21 32.07 5262.27 32.07 3865.30 32.07 K = 6 228.80 32.36 245.74 32.35 281.32 32.35 10566.76 32.33 4771.36 32.35 K = 7 365.28 32.63 192.44 32.63 318.95 32.63 10844.52 32.63 6819.42 32.63 K = 8 596.01 32.81 332.85 32.81 536.94 32.81 14282.80 32.58 9306.33 32.81 K = 9 900.88 32.94 657.24 32.94 1449.52 32.95 15774.88 32.77 9383.98 32.94 K = 10 2159.47 33.05 658.34 33.06 1048.00 33.06 17711.87 33.03 7463.72 33.05 Table 5: Speed and ALL comparisons for natural image data d = 35. 0 50 100 150 200 250 300 10−5 10−4 10−3 10−2 10−1 100 101 102 # function and gradient evaluations ALL∗- ALL EM, Usual MVN LBFGS, Reparameterized MVN CG, Reparameterized MVN 0 50 100 150 200 10−5 10−4 10−3 10−2 10−1 100 101 102 # function and gradient evaluations ALL∗- ALL EM, Original MVN LBFGS, Reformulated MVN CG, Reformulated MVN 0 50 100 150 200 250 10−5 10−4 10−3 10−2 10−1 100 101 102 # function and gradient evaluations ALL∗- ALL EM, Original MVN LBFGS, Reformulated MVN CG, Reformulated MVN Figure 3: Best ALL minus current ALL values with number of function and gradient evaluations. Left: ‘magic telescope’ (K = 5, d = 10). Middle: ‘year predict’ (K = 6, d = 90). Right: natural images (K = 8, d = 35). manifold CG on the reformulated parameter space is similar. Manifold LBFGS converges notably faster (except for K = 6) than both EM and CG. Without our reformulation, performance of the manifold methods degrades substantially. Note that for K = 8 and K = 9, CG without reformulation stops prematurely because it hits the bound of a maximum 1500 iterations, and therefore its ALL is smaller than the other two methods. The table also shows results of the Cholesky-factorized (and reformulated) problem. It is more than 10 times slower than manifold optimization. Optimizing the Cholesky-factorized (non-reformulated) problem is the slowest (not shown) and it always reaches the maximum number of iterations before finding the local minimum. Fig. 3 depicts the typical behavior of our manifold optimization methods versus EM. The X-axis is the number of log-likelihood and gradient evaluations (or the number of E- and M-steps in EM). Fig. 3(a) and Fig. 3(b) are the results of fitting GMMs to the ‘magic telescope’ and ‘year prediction’ datasets7. Fig. 3(c) is the result for the natural image data of Table 5. Apparently in the initial few iterations EM is faster, but manifold optimization methods match EM in a few iterations. This is remarkable, given that manifold optimization methods need to perform line-search. 5 Conclusions and future work We introduced Riemannian manifold optimization as an alternative to EM for fitting Gaussian mixture models. We demonstrated that for making manifold optimization succeed, to either match or outperform EM, it is necessary to represent the parameters in a different space and reformulate the cost function accordingly. Extensive experimentation with both experimental and real datasets yielded quite encouraging results, suggesting that manifold optimization could have the potential to open new algorithmic avenues for mixture modeling. Several strands of practical importance are immediate (and are a part of our ongoing work): (i) extension to large-scale GMMs through stochastic optimization [5]; (ii) use of richer classes of priors with GMMs than the usual inverse Wishart priors (which are typically also used as they make the M-step convenient), which is actually just one instance of a geodesically convex prior that our methods can handle; (iii) incorporation of penalties for avoiding tiny clusters, an idea that fits easily in our framework but not so easily in the EM framework. Finally, beyond GMMs, extension to other mixture models will be fruitful. 7Available at UCI machine learning dataset repository via https://archive.ics.uci.edu/ml/datasets 8 References [1] P.-A. Absil, R. Mahony, and R. Sepulchre. Optimization algorithms on matrix manifolds. Princeton University Press, 2009. [2] D. Arthur and S. Vassilvitskii. k-means++: The advantages of careful seeding. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms (SODA), pages 1027–1035, 2007. [3] R. Bhatia. Positive Definite Matrices. Princeton University Press, 2007. [4] C. M. Bishop. Pattern recognition and machine learning. Springer, 2007. [5] S. Bonnabel. Stochastic gradient descent on riemannian manifolds. Automatic Control, IEEE Transactions on, 58(9):2217–2229, 2013. [6] N. Boumal, B. Mishra, P.-A. Absil, and R. Sepulchre. Manopt, a matlab toolbox for optimization on manifolds. The Journal of Machine Learning Research, 15(1):1455–1459, 2014. [7] S. Burer, R. D. Monteiro, and Y. Zhang. Solving semidefinite programs via nonlinear programming. part i: Transformations and derivatives. Technical Report TR99-17, Rice University, Houston TX, 1999. [8] S. Dasgupta. Learning mixtures of gaussians. In Foundations of Computer Science, 1999. 40th Annual Symposium on, pages 634–644. IEEE, 1999. [9] 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. [10] R. O. Duda, P. E. Hart, and D. G. Stork. Pattern Classification. John Wiley & Sons, 2nd edition, 2000. [11] R. Ge, Q. Huang, and S. M. Kakade. Learning Mixtures of Gaussians in High Dimensions. arXiv:1503.00424, 2015. [12] R. Hosseini and M. Mash’al. Mixest: An estimation toolbox for mixture models. arXiv preprint arXiv:1507.06065, 2015. [13] R. Hosseini and S. Sra. Differential geometric optimization for Gaussian mixture models. arXiv:1506.07677, 2015. [14] M. I. Jordan and R. A. Jacobs. Hierarchical mixtures of experts and the em algorithm. Neural computation, 6(2):181–214, 1994. [15] M. Journ´ee, F. Bach, P.-A. Absil, and R. Sepulchre. Low-rank optimization on the cone of positive semidefinite matrices. SIAM Journal on Optimization, 20(5):2327–2351, 2010. [16] R. W. Keener. Theoretical Statistics. Springer Texts in Statistics. Springer, 2010. [17] J. M. Lee. Introduction to Smooth Manifolds. Number 218 in GTM. Springer, 2012. [18] J. Ma, L. Xu, and M. I. Jordan. Asymptotic convergence rate of the em algorithm for gaussian mixtures. Neural Computation, 12(12):2881–2907, 2000. [19] G. J. McLachlan and D. Peel. Finite mixture models. John Wiley and Sons, New Jersey, 2000. [20] A. Moitra and G. Valiant. Settling the polynomial learnability of mixtures of gaussians. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, pages 93–102. IEEE, 2010. [21] K. P. Murphy. Machine Learning: A Probabilistic Perspective. MIT Press, 2012. [22] I. Naim and D. Gildea. Convergence of the EM algorithm for gaussian mixtures with unbalanced mixing coefficients. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 1655–1662, 2012. [23] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 2006. [24] R. A. Redner and H. F. Walker. Mixture densities, maximum likelihood, and the EM algorithm. Siam Review, 26:195–239, 1984. [25] W. Ring and B. Wirth. Optimization methods on riemannian manifolds and their application to shape space. SIAM Journal on Optimization, 22(2):596–627, 2012. [26] R. Salakhutdinov, S. T. Roweis, and Z. Ghahramani. Optimization with EM and Expectation-ConjugateGradient. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 672–679, 2003. [27] S. Sra and R. Hosseini. Geometric optimisation on positive definite matrices for elliptically contoured distributions. In Advances in Neural Information Processing Systems, pages 2562–2570, 2013. [28] S. Sra and R. Hosseini. Conic Geometric Optimization on the Manifold of Positive Definite Matrices. SIAM Journal on Optimization, 25(1):713–739, 2015. [29] C. Udris¸te. Convex functions and optimization methods on Riemannian manifolds. Kluwer, 1994. [30] R. J. Vanderbei and H. Y. Benson. On formulating semidefinite programming problems as smooth convex nonlinear optimization problems. Technical report, 2000. [31] B. Vandereycken. Low-rank matrix completion by riemannian optimization. SIAM Journal on Optimization, 23(2):1214–1236, 2013. [32] J. J. Verbeek, N. Vlassis, and B. Kr¨ose. Efficient greedy learning of gaussian mixture models. Neural computation, 15(2):469–485, 2003. [33] A. Wiesel. Geodesic convexity and covariance estimation. IEEE Transactions on Signal Processing, 60 (12):6182–89, 2012. [34] L. Xu and M. I. Jordan. On convergence properties of the EM algorithm for Gaussian mixtures. Neural Computation, 8:129–151, 1996. [35] D. Zoran and Y. Weiss. Natural images, gaussian mixtures and dead leaves. In Advances in Neural Information Processing Systems, pages 1736–1744, 2012. 9 | 2015 | 341 |
5,860 | Minimum Weight Perfect Matching via Blossom Belief Propagation Sungsoo Ahn∗ Sejun Park∗ Michael Chertkov† Jinwoo Shin∗ ∗School of Electrical Engineering, Korea Advanced Institute of Science and Technology, Daejeon, Korea †Theoretical Division and Center for Nonlinear Studies, Los Alamos National Laboratory, Los Alamos, USA ∗{sungsoo.ahn, sejun.park, jinwoos}@kaist.ac.kr †chertkov@lanl.gov Abstract Max-product Belief Propagation (BP) is a popular message-passing algorithm for computing a Maximum-A-Posteriori (MAP) assignment over a distribution represented by a Graphical Model (GM). It has been shown that BP can solve a number of combinatorial optimization problems including minimum weight matching, shortest path, network flow and vertex cover under the following common assumption: the respective Linear Programming (LP) relaxation is tight, i.e., no integrality gap is present. However, when LP shows an integrality gap, no model has been known which can be solved systematically via sequential applications of BP. In this paper, we develop the first such algorithm, coined Blossom-BP, for solving the minimum weight matching problem over arbitrary graphs. Each step of the sequential algorithm requires applying BP over a modified graph constructed by contractions and expansions of blossoms, i.e., odd sets of vertices. Our scheme guarantees termination in O(n2) of BP runs, where n is the number of vertices in the original graph. In essence, the Blossom-BP offers a distributed version of the celebrated Edmonds’ Blossom algorithm by jumping at once over many sub-steps with a single BP. Moreover, our result provides an interpretation of the Edmonds’ algorithm as a sequence of LPs. 1 Introduction Graphical Models (GMs) provide a useful representation for reasoning in a number of scientific disciplines [1, 2, 3, 4]. Such models use a graph structure to encode the joint probability distribution, where vertices correspond to random variables and edges specify conditional dependencies. An important inference task in many applications involving GMs is to find the most-likely assignment to the variables in a GM, i.e., Maximum-A-Posteriori (MAP). Belief Propagation (BP) is a popular algorithm for approximately solving the MAP inference problem and it is an iterative, message passing one that is exact on tree structured GMs. BP often shows remarkably strong heuristic performance beyond trees, i.e., over loopy GMs. Furthermore, BP is of a particular relevance to large-scale problems due to its potential for parallelization [5] and its ease of programming within the modern programming models for parallel computing, e.g., GraphLab [6], GraphChi [7] and OpenMP [8]. The convergence and correctness of BP was recently established for a certain class of loopy GM formulations of several classical combinatorial optimization problems, including matching [9, 10, 11], perfect matching [12], shortest path [13], independent set [14], network flow [15] and vertex cover [16]. The important common feature of these models is that BP converges to a correct assignment when the Linear Programming (LP) relaxation of the combinatorial optimization is tight, i.e., when it shows no integrality gap. The LP tightness is an inevitable condition to guarantee the performance of BP and no combinatorial optimization instance has been known where BP would be used to solve 1 problems without the LP tightness. On the other hand, in the LP literature, it has been extensively studied how to enforce the LP tightness via solving multiple intermediate LPs that are systematically designed, e.g., via the cutting-plane method [21]. Motivated by these studies, we pose a similar question for BP, “how to enforce correctness of BP, possibly by solving multiple intermediate BPs”. In this paper, we show how to resolve this question for the minimum weight (or cost) perfect matching problem over arbitrary graphs. Contribution. We develop an algorithm, coined Blossom-BP, for solving the minimum weight matching problem over an arbitrary graph. Our algorithm solves multiple intermediate BPs until the final BP outputs the solution. The algorithm is sequential, where each step includes running BP over a ‘contracted’ graph derived from the original graph by contractions and infrequent expansions of blossoms, i.e., odd sets of vertices. To build such a scheme, we first design an algorithm, coined Blossom-LP, solving multiple intermediate LPs. Second, we show that each LP is solvable by BP using the recent framework [16] that establishes a generic connection between BP and LP. For the first part, cutting-plane methods solving multiple intermediate LPs for the minimum weight matching problem have been discussed by several authors over the past decades [17, 18, 19, 20] and a provably polynomial-time scheme was recently suggested [21]. However, LPs in [21] were quite complex to solve by BP. To address the issue, we design much simpler intermediate LPs that allow utilizing the framework of [16]. We prove that Blossom-BP and Blossom-LP guarantee to terminate in O(n2) of BP and LP runs, respectively, where n is the number of vertices in the graph. To establish the polynomial complexity, we show that intermediate outputs of Blossom-BP and Blossom-LP are equivalent to those of a variation of the Blossom-V algorithm [22] which is the latest implementation of the Blossom algorithm due to Kolmogorov. The main difference is that Blossom-V updates parameters by maintaining disjoint tree graphs, while Blossom-BP and Blossom-LP implicitly achieve this by maintaining disjoint cycles, claws and tree graphs. Notice, however, that these combinatorial structures are auxiliary, as required for proofs, and they do not appear explicitly in the algorithm descriptions. Therefore, they are much easier to implement than Blossom-V that maintains complex data structures, e.g., priority queues. To the best of our knowledge, Blossom-BP and Blossom-LP are the simplest possible algorithms available for solving the problem in polynomial time. Our proof implies that in essence, Blossom-BP offers a distributed version of the Edmonds’ Blossom algorithm [23] jumping at once over many sub-steps of Blossom-V with a single BP. The subject of solving convex optimizations (other than LP) via BP was discussed in the literature [24, 25, 26]. However, we are not aware of any similar attempts to solve Integer Programming, via sequential application of BP. We believe that the approach developed in this paper is of a broader interest, as it promises to advance the challenge of designing BP-based MAP solvers for a broader class of GMs. Furthermore, Blossom-LP stands alone as providing an interpretation for the Edmonds’ algorithm in terms of a sequence of tractable LPs. The Edmonds’ original LP formulation contains exponentially many constraints, thus naturally suggesting to seek for a sequence of LPs, each with a subset of constraints, gradually reducing the integrality gap to zero in a polynomial number of steps. However, it remained illusive for decades: even when the bipartite LP relaxation of the problem has an integral optimal solution, the standard Edmonds’ algorithm keeps contracting and expanding a sequence of blossoms. As we mentioned earlier, we resolve the challenge by showing that Blossom-LP is (implicitly) equivalent to a variant of the Edmonds’ algorithm with three major modifications: (a) parameter-update via maintaining cycles, claws and trees, (b) addition of small random corrections to weights, and (c) initialization using the bipartite LP relaxation. Organization. In Section 2, we provide backgrounds on the minimum weight perfect matching problem and the BP algorithm. Section 3 describes our main result – Blossom-LP and Blossom-BP algorithms, where the proof is given in Section 4. 2 Preliminaries 2.1 Minimum weight perfect matching Given an (undirected) graph G = (V, E), a matching of G is a set of vertex-disjoint edges, where a perfect matching additionally requires to cover every vertices of G. Given integer edge weights (or costs) w = [we] ∈Z|E|, the minimum weight (or cost) perfect matching problem consists in computing a perfect matching which minimizes the summation of its associated edge weights. The 2 problem is formulated as the following IP (Integer Programming): minimize w · x subject to X e∈δ(v) xe = 1, ∀v ∈V, x = [xe] ∈{0, 1}|E| (1) Without loss of generality, one can assume that weights are strictly positive.1 Furthermore, we assume that IP (1) is feasible, i.e., there exists at least one perfect matching in G. One can naturally relax the above integer constraints to x = [xe] ∈[0, 1]|E| to obtain an LP (Linear Programming), which is called the bipartite relaxation. The integrality of the bipartite LP relaxation is not guaranteed, however it can be enforced by adding the so-called blossom inequalities [22]: minimize w · x subject to X e∈δ(v) xe = 1, ∀v ∈V, X e∈δ(S) xe ≥1, ∀S ∈L, x = [xe] ∈[0, 1]|E|, (2) where L ⊂2V is a collection of odd cycles in G, called blossoms, and δ(S) is a set of edges between S and V \ S. It is known that if L is the collection of all the odd cycles in G, then LP (2) always has an integral solution. However, notice that the number of odd cycles is exponential in |V |, thus solving LP (2) is computationally intractable. To overcome this complication we are looking for a tractable subset of L of a polynomial size which guarantees the integrality. Our algorithm, searching for such a tractable subset of L is iterative: at each iteration it adds or subtracts a blossom. 2.2 Belief propagation for linear programming A joint distribution of n (binary) random variables Z = [Zi] ∈{0, 1}n is called a Graphical Model (GM) if it factorizes as follows: for z = [zi] ∈Ωn, Pr[Z = z] ∝ Y i∈{1,...,n} ψi(zi) Y α∈F ψα(zα), where {ψi, ψα} are (given) non-negative functions, the so-called factors; F is a collection of subsets F = {α1, α2, ..., αk} ⊂2{1,2,...,n} (each αj is a subset of {1, 2, . . . , n} with |αj| ≥2); zα is the projection of z onto dimensions included in α.2 In particular, ψi is called a variable factor. Assignment z∗is called a maximum-aposteriori (MAP) solution if z∗= arg maxz∈{0,1}n Pr[z]. Computing a MAP solution is typically computationally intractable (i.e., NP-hard) unless the induced bipartite graph of factors F and variables z, so-called factor graph, has a bounded treewidth. The max-product Belief Propagation (BP) algorithm is a popular simple heuristic for approximating the MAP solution in a GM, where it iterates messages over a factor graph. BP computes a MAP solution exactly after a sufficient number of iterations, if the factor graph is a tree and the MAP solution is unique. However, if the graph contains loops, BP is not guaranteed to converge to a MAP solution in general. Due to the space limitation, we provide detailed backgrounds on BP in the supplemental material. Consider the following GM: for x = [xi] ∈{0, 1}n and w = [wi] ∈Rn, Pr[X = x] ∝ Y i e−wixi Y α∈F ψα(xα), (3) where F is the set of non-variable factors and the factor function ψα for α ∈F is defined as ψα(xα) = 1 if Aαxα ≥bα, Cαxα = dα 0 otherwise , for some matrices Aα, Cα and vectors bα, dα. Now we consider Linear Programming (LP) corresponding to this GM: minimize w · x subject to ψα(xα) = 1, ∀α ∈F, x = [xi] ∈[0, 1]n. (4) 1If some edges have negative weights, one can add the same positive constant to all edge weights, and this does not alter the solution of IP (1). 2For example, if z = [0, 1, 0] and α = {1, 3}, then zα = [0, 0]. 3 One observes that the MAP solution for GM (3) corresponds to the (optimal) solution of LP (4) if the LP has an integral solution x∗∈{0, 1}n. Furthermore, the following sufficient conditions relating max-product BP to LP are known [16]: Theorem 1 The max-product BP applied to GM (3) converges to the solution of LP (4) if the following conditions hold: C1. LP (4) has a unique integral solution x∗∈{0, 1}n, i.e., it is tight. C2. For every i ∈{1, 2, . . . , n}, the number of factors associated with xi is at most two, i.e., |Fi| ≤2. C3. For every factor ψα, every xα ∈{0, 1}|α| with ψα(xα) = 1, and every i ∈α with xi ̸= x∗ i , there exists γ ⊂α such that |{j ∈{i} ∪γ : |Fj| = 2}| ≤2 ψα(x′ α) = 1, where x′ k = xk if k /∈{i} ∪γ x∗ k otherwise . ψα(x′′ α) = 1, where x′′ k = xk if k ∈{i} ∪γ x∗ k otherwise . 3 Main result: Blossom belief propagation In this section, we introduce our main result – an iterative algorithm, coined Blossom-BP, for solving the minimum weight perfect matching problem over an arbitrary graph, where the algorithm uses the max-product BP as a subroutine. We first describe the algorithm using LP instead of BP in Section 3.1, where we call it Blossom-LP. Its BP implementation is explained in Section 3.2. 3.1 Blossom-LP algorithm Let us modify the edge weights: we ←we + ne, where ne is an i.i.d. random number chosen in the interval h 0, 1 |V | i . Note that the solution of the minimum weight perfect matching problem (1) remains the same after this modification because the overall noise does not exceed 1. The BlossomLP algorithm updates the following parameters iteratively. ◦L ⊂2V : a laminar collection of odd cycles in G. ◦yv, yS: v ∈V and S ∈L. In the above, L is called laminar if for every S, T ∈L, S ∩T = ∅, S ⊂T or T ⊂S.We call S ∈L an outer blossom if there exists no T ∈L such that S ⊂T. Initially, L = ∅and yv = 0 for all v ∈V . The algorithm iterates between Step A and Step B and terminates at Step C. Blossom-LP algorithm A. Solving LP on a contracted graph. First construct an auxiliary (contracted) graph G† = (V †, E†) by contracting every outer blossom in L to a single vertex, where the weights w† = [w† e : e ∈E†] are defined as w† e = we − X v∈V :v̸∈V †,e∈δ(v) yv − X S∈L:v(S)̸∈V †,e∈δ(S) yS, ∀e ∈E†. We let v(S) be the blossom vertex in G† coined as the contracted graph and solve the following LP: minimize w† · x subject to X e∈δ(v) xe = 1, ∀v ∈V †, v is a non-blossom vertex X e∈δ(v) xe ≥1, ∀v ∈V †, v is a blossom vertex x = [xe] ∈[0, 1]|E†|. (5) 4 B. Updating parameters. After we obtain a solution x = [xe : e ∈E†] of LP (5), the parameters are updated as follows: (a) If x is integral, i.e., x ∈{0, 1}|E†| and P e∈δ(v) xe = 1 for all v ∈V †, then proceed to the termination step C. (b) Else if there exists a blossom S such that P e∈δ(v(S)) xe > 1, then we choose one of such blossoms and update L ←L\{S} and yv ←0, ∀v ∈S. Call this step ‘blossom S expansion’. (c) Else if there exists an odd cycle C in G† such that xe = 1/2 for every edge e in it, we choose one of them and update L ←L ∪{V (C)} and yv ←1 2 X e∈E(C) (−1)d(e,v)w† e, ∀v ∈V (C), where V (C), E(C) are the set of vertices and edges of C, respectively, and d(v, e) is the graph distance from vertex v to edge e in the odd cycle C. The algorithm also remembers the odd cycle C = C(S) corresponding to every blossom S ∈L. If (b) or (c) occur, go to Step A. C. Termination. The algorithm iteratively expands blossoms in L to obtain the minimum weighted perfect matching M ∗as follows: (i) Let M ∗be the set of edges in the original G such that its corresponding edge e in the contracted graph G† has xe = 1, where x = [xe] is the (last) solution of LP (5). (ii) If L = ∅, output M ∗. (iii) Otherwise, choose an outer blossom S ∈L, then update G† by expanding S, i.e. L ← L\{S}. (iv) Let v be the vertex in S covered by M ∗and MS be a matching covering S\{v} using the edges of odd cycle C(S). (v) Update M ∗←M ∗∪MS and go to Step (ii). An example of the evolution of L is described in the supplementary material. We provide the following running time guarantee for this algorithm, which is proven in Section 4. Theorem 2 Blossom-LP outputs the minimum weight perfect matching in O(|V |2) iterations. 3.2 Blossom-BP algorithm In this section, we show that the algorithm can be implemented using BP. The result is derived in two steps, where the first one consists in the following theorem proven in the supplementary material due to the space limitation. Theorem 3 LP (5) always has a half-integral solution x∗∈ 0, 1 2, 1 |E†| such that the collection of its half-integral edges forms disjoint odd cycles. Next let us design BP for obtaining the half-integral solution of LP (5). First, we duplicate each edge e ∈E† into e1, e2 and define a new graph G‡ = (V †, E‡) where E‡ = {e1, e2 : e ∈E‡}. Then, we build the following equivalent LP: minimize w‡ · x subject to X e∈δ(v) xe = 2, ∀v ∈V †, v is a non-blossom vertex X e∈δ(v) xe ≥2, ∀v ∈V †, v is a blossom vertex x = [xe] ∈[0, 1]|E†|, (6) 5 where w‡ e1 = w‡ e2 = w† e. One can easily observe that solving LP (6) is equivalent to solving LP (5) due to our construction of G‡, w‡, and LP (6) always have an integral solution due to Theorem 3. Now, construct the following GM for LP (6): Pr[X = x] ∝ Y e∈E‡ ew‡ exe Y v∈V † ψv(xδ(v)), (7) where the factor function ψv is defined as ψv(xδ(v)) = 1 if v is a non-blossom vertex and P e∈δ(v) xe = 2 1 else if v is a blossom vertex and P e∈δ(v) xe ≥2 0 otherwise . For this GM, we derive the following corollary of Theorem 1 proven in the supplementary material due to the space limitation. Corollary 4 If LP (6) has a unique solution, then the max-product BP applied to GM (7) converges to it. The uniqueness condition stated in the corollary above is easy to guarantee by adding small random noises to edge weights. Corollary 4 shows that BP can compute the half-integral solution of LP (5). 4 Proof of Theorem 2 First, it is relatively easy to prove the correctness of Blossom-BP, as stated in the following lemma. Lemma 5 If Blossom-LP terminates, it outputs the minimum weight perfect matching. Proof. We let x† = [x† e], y‡ = [y‡ v, y‡ S : v /∈V †, v(S) /∈V †] denote the parameter values at the termination of Blossom-BP. Then, the strong duality theorem and the complementary slackness condition imply that x† e(w† −y† u −y† v) = 0, ∀e = (u, v) ∈E†. (8) where y† be a dual solution of x†. Here, observe that y† and y‡ cover y-variables inside and outside of V †, respectively. Hence, one can naturally define y∗= [y† v y‡ u] to cover all y-variables, i.e., yv, yS for all v ∈V, S ∈L. If we define x∗for the output matching M ∗of Blossom-LP as x∗ e = 1 if e ∈M ∗and x∗ e = 0 otherwise, then x∗and y∗satisfy the following complementary slackness condition: x∗ e we −y∗ u −y∗ v − X S∈L y∗ S ! = 0, ∀e = (u, v) ∈E, y∗ S X e∈δ(S) x∗ e −1 = 0, ∀S ∈L, where L is the last set of blossoms at the termination of Blossom-BP. In the above, the first equality is from (8) and the definition of w†, and the second equality is because the construction of M ∗in Blossom-BP is designed to enforce P e∈δ(S) x∗ e = 1. This proves that x∗is the optimal solution of LP (2) and M ∗is the minimum weight perfect matching, thus completing the proof of Lemma 5. □ To guarantee the termination of Blossom-LP in polynomial time, we use the following notions. Definition 1 Claw is a subset of edges such that every edge in it shares a common vertex, called center, with all other edges, i.e., the claw forms a star graph. Definition 2 Given a graph G = (V, E), a set of odd cycles O ⊂2E, a set of claws W ⊂2E and a matching M ⊂E, (O, W, M) is called cycle-claw-matching decomposition of G if all sets in O ∪W ∪{M} are disjoint and each vertex v ∈V is covered by exactly one set among them. To analyze the running time of Blossom-BP, we construct an iterative auxiliary algorithm that outputs the minimum weight perfect matching in a bounded number of iterations. The auxiliary algorithm outputs a cycle-claw-matching decomposition at each iteration, and it terminates when the cycle-claw-matching decomposition corresponds to a perfect matching. We will prove later that the auxiliary algorithm and Blossom-LP are equivalent and, therefore, conclude that the iteration of Blossom-LP is also bounded. 6 To design the auxiliary algorithm, we consider the following dual of LP (5): minimize X v∈V † yv subject to w† e −yv −yu ≥0, ∀e = (u, v) ∈E†, yv(S) ≥0, ∀S ∈L. (9) Next we introduce an auxiliary iterative algorithm which updates iteratively the blossom set L and also the set of variables yv, yS for v ∈V, S ∈L. We call edge e = (u, v) ‘tight’ if we −yu −yv − P S∈L:e∈δ(S) yS = 0. Now, we are ready to describe the auxiliary algorithm having the following parameters. ◦G† = (V †, E†), L ⊂2V , and yv, yS for v ∈V, S ∈L. ◦(O, W, M): A cycle-claw-matching decomposition of G† ◦T ⊂G†: A tree graph consisting of + and −vertices. Initially, set G† = G and L, T = ∅. In addition, set yv, yS by an optimal solution of LP (9) with w† = w and (O, W, M) by the cycle-claw-matching decomposition of G† consisting of tight edges with respect to [yv, yS]. The parameters are updated iteratively as follows. The auxiliary algorithm Iterate the following steps until M becomes a perfect matching: 1. Choose a vertex r ∈V † from the following rule. Expansion. If W ̸= ∅, choose a claw W ∈W of center blossom vertex c and choose a non-center vertex r in W. Remove the blossom S(c) corresponding to c from L and update G† by expanding it. Find a matching M ′ covering all vertices in W and S(c) except for r and update M ←M ∪M ′. Contraction. Otherwise, choose a cycle C ∈O, add and remove it from L and O, respectively. In addition, G† is also updated by contracting C and choose the contracted vertex r in G† and set yr = 0. Set tree graph T having r as + vertex and no edge. 2. Continuously increase yv of every + vertex v in T and decrease yv of −vertex v in T by the same amount until one of the following events occur: Grow. If a tight edge (u, v) exists where u is a + vertex of T and v is covered by M, find a tight edge (v, w) ∈M. Add edges (u, v), (v, w) to T and remove (v, w) from M where v, w becomes −, + vertices of T, respectively. Matching. If a tight edge (u, v) exists where u is a + vertex of T and v is covered by C ∈O, find a matching M ′ that covers T ∪C. Update M ←M ∪M ′ and remove C from O. Cycle. If a tight edge (u, v) exists where u, v are + vertices of T, find a cycle C and a matching M ′ that covers T. Update M ←M ∪M ′ and add C to O. Claw. If a blossom vertex v(S) with yv(S) = 0 exists, find a claw W (of center v(S)) and a matching M ′ covering T. Update M ←M ∪M ′ and add W to W. If Grow occurs, resume the step 2. Otherwise, go to the step 1. Note that the auxiliary algorithm updates parameters in such a way that the number of vertices in every claw in the cycle-claw-matching decomposition is 3 since every −vertex has degree 2. Hence, there exists a unique matching M ′ in the expansion step. Furthermore, the existence of a cycle-clawmatching decomposition at the initialization can be guaranteed using the complementary slackness condition and the half-integrality of LP (5). We establish the following lemma for the running time of the auxiliary algorithm, where its proof is given in the supplemental material due to the space limitation. Lemma 6 The auxiliary algorithm terminates in O(|V |2) iterations. 7 Now we are ready to prove the equivalence between the auxiliary algorithm and the Blossom-LP, i.e., prove that the numbers of iterations of Blossom-LP and the auxiliary algorithm are equal. To this end, given a cycle-claw-matching decomposition (O, W, M), observe that one can choose the corresponding x = [xe] ∈{0, 1/2, 1}|E†| that satisfies constraints of LP (5): xe = 1 if e is an edge in W or M 1 2 if e is an edge in O 0 otherwise . Similarly, given a half-integral x = [xe] ∈{0, 1/2, 1}|E†| that satisfies constraints of LP (5), one can find the corresponding cycle-claw-matching decomposition. Furthermore, one can also define weight w† in G† for the auxiliary algorithm as Blossom-LP does: w† e = we − X v∈V :v̸∈V †,e∈δ(v) yv − X S∈L:v(S)̸∈V †,e∈δ(S) yS, ∀e ∈E†. (10) In the auxiliary algorithm, e = (u, v) ∈E† is tight if and only if w† e −y† u −y† v = 0. Under these equivalences in parameters between Blossom-LP and the auxiliary algorithm, we will use the induction to show that cycle-claw-matching decompositions maintained by both algorithms are equal at every iteration, as stated in the following lemma whose proof is given in the supplemental material due to the space limitation.. Lemma 7 Define the following notation: y† = [yv : v ∈V †] and y‡ = [yv, yS : v ∈V, v ̸∈V †, S ∈L, v(S) /∈V †], i.e., y† and y‡ are parts of y which involves and does not involve in V †, respectively. Then, the Blossom-LP and the auxiliary algorithm update parameters L, y‡ equivalently and output the same cycle-claw-decomposition of G† at each iteration. The above lemma implies that Blossom-LP also terminates in O(|V |2) iterations due to Lemma 6. This completes the proof of Theorem 2. The equivalence between the half-integral solution of LP (5) in Blossom-LP and the cycle-claw-matching decomposition in the auxiliary algorithm implies that LP (5) is always has a half-integral solution, and hence, one of Steps B.(a), B.(b) or B.(c) always occurs. 5 Conclusion The BP algorithm has been popular for approximating inference solutions arising in graphical models, where its distributed implementation, associated ease of programming and strong parallelization potential are the main reasons for its growing popularity. This paper aims for designing a polynomial-time BP-based scheme solving the maximum weigh perfect matching problem. We believe that our approach is of a broader interest to advance the challenge of designing BP-based MAP solvers in more general GMs as well as distributed (and parallel) solvers for large-scale IPs. Acknowledgement. This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIP) (No.R0132-15-1005), Content visual browsing technology in the online and offline environments. The work at LANL was carried out under the auspices of the National Nuclear Security Administration of the U.S. Department of Energy under Contract No. DE-AC52-06NA25396. References [1] J. Yedidia, W. Freeman, and Y. Weiss, “Constructing free-energy approximations and generalized belief propagation algorithms,” IEEE Transactions on Information Theory, vol. 51, no. 7, pp. 2282 – 2312, 2005. [2] T. J. Richardson and R. L. Urbanke, Modern Coding Theory. Cambridge University Press, 2008. [3] M. Mezard and A. Montanari, Information, physics, and computation, ser. Oxford Graduate Texts. Oxford: Oxford Univ. Press, 2009. 8 [4] M. J. Wainwright and M. I. Jordan, “Graphical models, exponential families, and variational inference,” Foundations and Trends in Machine Learning, vol. 1, no. 1, pp. 1–305, 2008. [5] J. Gonzalez, Y. Low, and C. Guestrin. “Residual splash for optimally parallelizing belief propagation,” in International Conference on Artificial Intelligence and Statistics, 2009. [6] Y. Low, J. Gonzalez, A. Kyrola, D. Bickson, C. Guestrin, and J. M. Hellerstein, “GraphLab: A New Parallel Framework for Machine Learning,” in Conference on Uncertainty in Artificial Intelligence (UAI), 2010. [7] A. Kyrola, G. E. Blelloch, and C. Guestrin. “GraphChi: Large-Scale Graph Computation on Just a PC,” in Operating Systems Design and Implementation (OSDI), 2012. [8] R. Chandra, R. Menon, L. Dagum, D. Kohr, D. Maydan, and J. McDonald, “Parallel Programming in OpenMP,” Morgan Kaufmann, ISBN 1-55860-671-8, 2000. [9] M. Bayati, D. Shah, and M. Sharma, “Max-product for maximum weight matching: Convergence, correctness, and lp duality,” IEEE Transactions on Information Theory, vol. 54, no. 3, pp. 1241 –1251, 2008. [10] S. Sanghavi, D. Malioutov, and A. Willsky, “Linear Programming Analysis of Loopy Belief Propagation for Weighted Matching,” in Neural Information Processing Systems (NIPS), 2007 [11] B. Huang, and T. Jebara, “Loopy belief propagation for bipartite maximum weight bmatching,” in Artificial Intelligence and Statistics (AISTATS), 2007. [12] M. Bayati, C. Borgs, J. Chayes, R. Zecchina, “Belief-Propagation for Weighted b-Matchings on Arbitrary Graphs and its Relation to Linear Programs with Integer Solutions,” SIAM Journal in Discrete Math, vol. 25, pp. 989–1011, 2011. [13] N. Ruozzi, Nicholas, and S. Tatikonda, “st Paths using the min-sum algorithm,” in 46th Annual Allerton Conference on Communication, Control, and Computing, 2008. [14] S. Sanghavi, D. Shah, and A. Willsky, “Message-passing for max-weight independent set,” in Neural Information Processing Systems (NIPS), 2007. [15] D. Gamarnik, D. Shah, and Y. Wei, “Belief propagation for min-cost network flow: convergence & correctness,” in SODA, pp. 279–292, 2010. [16] S. Park, and J. Shin, “Max-Product Belief Propagation for Linear Programming: Applications to Combinatorial Optimization,” in Conference on Uncertainty in Artificial Intelligence (UAI), 2015. [17] M. Trick. “Networks with additional structured constraints”, PhD thesis, Georgia Institute of Technology, 1978. [18] M. Padberg, and M. Rao. “Odd minimum cut-sets and b-matchings,” in Mathematics of Operations Research, vol. 7, no. 1, pp. 67–80, 1982. [19] M. Gr¨otschel, and O. Holland. “Solving matching problems with linear programming,” in Mathematical Programming, vol. 33, no. 3, pp. 243–259, 1985. [20] M Fischetti, and A. Lodi. “Optimizing over the first Chv´atal closure”, in Mathematical Programming, vol. 110, no. 1, pp. 3–20, 2007. [21] K. Chandrasekaran, L. A. Vegh, and S. Vempala. “The cutting plane method is polynomial for perfect matchings,” in Foundations of Computer Science (FOCS), 2012 [22] V. Kolmogorov, “Blossom V: a new implementation of a minimum cost perfect matching algorithm,” Mathematical Programming Computation, vol. 1, no. 1, pp. 43–67, 2009. [23] J. Edmonds, “Paths, trees, and flowers”, Canadian Journal of Mathematics, vol. 3, pp. 449– 467, 1965. [24] D. Malioutov, J. Johnson, and A. Willsky, “Walk-sums and belief propagation in gaussian graphical models,” J. Mach. Learn. Res., vol. 7, pp. 2031-2064, 2006. [25] Y. Weiss, C. Yanover, and T Meltzer, “MAP Estimation, Linear Programming and Belief Propagation with Convex Free Energies,” in Conference on Uncertainty in Artificial Intelligence (UAI), 2007. [26] C. Moallemi and B. Roy, “Convergence of min-sum message passing for convex optimization,” in 45th Allerton Conference on Communication, Control and Computing, 2008. 9 | 2015 | 342 |
5,861 | Human Memory Search as Initial-Visit Emitting Random Walk Kwang-Sung Jun∗, Xiaojin Zhu†, Timothy Rogers‡ ∗Wisconsin Institute for Discovery, †Department of Computer Sciences, ‡Department of Psychology University of Wisconsin-Madison kjun@discovery.wisc.edu, jerryzhu@cs.wisc.edu, ttrogers@wisc.edu Zhuoran Yang Department of Mathematical Sciences Tsinghua University yzr11@mails.tsinghua.edu.cn Ming Yuan Department of Statistics University of Wisconsin-Madison myuan@stat.wisc.edu Abstract Imagine a random walk that outputs a state only when visiting it for the first time. The observed output is therefore a repeat-censored version of the underlying walk, and consists of a permutation of the states or a prefix of it. We call this model initial-visit emitting random walk (INVITE). Prior work has shown that the random walks with such a repeat-censoring mechanism explain well human behavior in memory search tasks, which is of great interest in both the study of human cognition and various clinical applications. However, parameter estimation in INVITE is challenging, because naive likelihood computation by marginalizing over infinitely many hidden random walk trajectories is intractable. In this paper, we propose the first efficient maximum likelihood estimate (MLE) for INVITE by decomposing the censored output into a series of absorbing random walks. We also prove theoretical properties of the MLE including identifiability and consistency. We show that INVITE outperforms several existing methods on real-world human response data from memory search tasks. 1 Human Memory Search as a Random Walk A key goal for cognitive science has been to understand the mental structures and processes that underlie human semantic memory search. Semantic fluency has provided the central paradigm for this work: given a category label as a cue (e.g. animals, vehicles, etc.) participants must generate as many example words as possible in 60 seconds without repetition. The task is useful because, while exceedingly easy to administer, it yields rich information about human semantic memory. Participants do not generate responses in random order but produce “bursts” of related items, beginning with the highly frequent and prototypical, then moving to subclusters of related items. This ordinal structure sheds light on associative structures in memory: retrieval of a given item promotes retrieval of a related item, and so on, so that the temporal proximity of items in generated lists reflects the degree to which the two items are related in memory [14, 5]. The task also places demands on other important cognitive contributors to memory search: for instance, participants must retain a mental trace of previously-generated items and use it to refrain from repetition, so that the task draws upon working memory and cognitive control in addition to semantic processes. For these reasons the task is a central tool in all commonly-used metrics for diagnosing cognitive dysfunction (see e.g. [6]). Performance is generally sensitive to a variety of neurological disorders [19], but different syndromes also give rise to different patterns of impairment, making it useful for diagnosis [17]. For these reasons the task has been widely employed both in basic science and applied health research. Nevertheless, the representations and processes that support category fluency remain poorly understood. Beyond the general observation that responses tend to be clustered by semantic relatedness, 1 it is not clear what ordinal structure in produced responses reveals about the structure of human semantic memory, in either healthy or disordered populations. In the past few years researchers in cognitive science have begun to fill this gap by considering how search models from other domains of science might explain patterns of responses observed in fluency tasks [12, 13, 15]. We review related works in Section 4. In the current work we build on these advances by considering, not how search might operate on a pre-specified semantic representation, but rather how the representation itself can be learned from data (i.e., human-produced semantic fluency lists) given a specified model of the list-generation process. Specifically, we model search as a random walk on a set of states (e.g. words) where the transition probability indicates the strength of association in memory, and with the further constraint that node labels are only generated when the node is first visited. Thus, repeated visits are censored in the output. We refer to this generative process as the initial-visit emitting (INVITE) random walk. The repeat-censoring mechanism of INVITE was first employed in Abbott et al. [1]. However, their work did not provide a tractable method to compute the likelihood nor to estimate the transition matrix from the fluency responses. The problem of estimating the underlying Markov chain from the lists so produced is nontrivial because once the first two items in a list have been produced there may exist infinitely many pathways that lead to production of the next item. For instance, consider the produced sequence “dog” →“cat” →“goat” where the underlying graph is fully connected. Suppose a random walk visits “dog” then “cat”. The walk can then visit “dog” and “cat” arbitrarily many times before visiting “goat”; there exist infinitely many walks that outputs the given sequence. How can the transition probabilities of the underlying random walk be learned? A solution to this problem would represent a significant advance from prior works that estimate parameters from a separate source such as a standard text corpus [13]. First, one reason for verbal fluency’s enduring appeal has been that the task appears to reveal important semantic structure that may not be discoverable by other means. It is not clear that methods for estimating semantic structure based on another corpus do a very good job at modelling the structure of human semantic representations generally [10], or that they would reveal the same structures that govern behavior specifically in this widely-used fluency task. Second, the representational structures employed can vary depending upon the fluency category. For instance, the probability of producing “chicken” after “goat” will differ depending on whether the task involves listing “animals”, “mammals”, or “farm animals”. Simply estimating a single structure from the same corpus will not capture these task-based effects. Third, special populations, including neurological patients and developing children, may generate lists from quite different underlying mental representations, which cannot be independently estimated from a standard corpus. In this work, we make two important contributions on the INVITE random walk. First, we propose a tractable way to compute the INVITE likelihood. Our key insight in computing the likelihood is to turn INVITE into a series of absorbing random walks. This formulation allows us to leverage the fundamental matrix [7] and compute the likelihood in polynomial time. Second, we show that the MLE of INVITE is consistent, which is non-trivial given that the convergence of the log likelihood function is not uniform. We formally define INVITE and present the two main contributions as well as an efficient optimization method to estimate the parameters in Section 2. In Section 3, we apply INVITE to both toy data and real-world fluency data. On toy data our experiments empirically confirm the consistency result. On actual human responses from verbal fluency INVITE outperforms off-the-shelf baselines. The results suggest that INVITE may provide a useful tool for investigating human cognitive functions. 2 The INVITE Random Walk INVITE is a probabilistic model with the following generative story. Consider a random walk on a set of n states S with an initial distribution π > 0 (entry-wise) and an arbitrary transition matrix P where Pij is the probability of jumping from state i to j. A surfer starts from a random initial state drawn from π. She outputs a state if it is the first time she visits that state. Upon arriving at an already visited state, however, she does not output the state. The random walk continues indefinitely. Therefore, the output consists of states in the order of their first-visit; the underlying entire walk trajectory is hidden. We further assume that the time step of each output is unobserved. For example, consider the random walk over four states in Figure 1(a). If the underlying random walk takes the trajectory (1, 2, 1, 3, 1, 2, 1, 4, 1, . . .), the observation is (1, 2, 3, 4). 2 1 2 3 4 1 1 3 1 3 1 3 1 1 2 1 3 4 1 1 1 1 T W1 T W1 2 1 3 4 1 1 1 1 0 0.5 1 −1.52 −1.5 −1.48 −1.46 −1.44 λ Log likelihood (a) (b) (c) (d) Figure 1: (a-c) Example Markov chains (d) Example nonconvexity of the INVITE log likelihood We say that the observation produced by INVITE is a censored list since non-initial visits are censored. It is easy to see that a censored list is a permutation of the n states or a prefix thereof (more on this later). We denote a censored list by a = (a1, a2, . . . , aM) where M ≤n. A censored list is not Markovian since the probability of a transition in censored list depends on the whole history rather than just the current state. It is worth noting that INVITE is distinct from Broder’s algorithm for generating random spanning trees [4], or the self-avoiding random walk [9], or cascade models of infection. We discuss the technical difference to related works in Section 4. We characterize the type of output INVITE is capable of producing, given that the underlying uncensored random walk continues indefinitely. A state s is said to be transient if a random walk starting from s has nonzero probability of not returning to itself in finite time and recurrent if such probability is zero. A set of states A is closed if a walk cannot exit A; i.e., if i ∈A and j ̸∈A, then a random walk from i cannot reach j. A set of states B is irreducible if there exists a path between every pair of states in B; i.e., if i, j ∈B, then a random walk from i can reach j. Define [M] = {1, 2, . . . , M}. We use a1:M as a shorthand for a1, . . . , aM. Theorem 1 states that a finite state Markov chain can be uniquely decomposed into disjoint sets, and Theorem 2 states what a censored list should look like. All proofs are in the supplementary material. Theorem 1. [8] If the state space S is finite, then S can be written as a disjoint union T ∪W1 ∪ . . . ∪WK, where T is a set of transient states that is possibly empty and each Wk, k ∈[K], is a nonempty closed irreducible set of recurrent states. Theorem 2. Consider a Markov chain P with the decomposition S = T ∪W1 ∪. . . ∪WK as in Theorem 1. A censored list a = (a1:M) generated by INVITE on P has zero or more transient states, followed by all states in one and only one closed irreducible set. That is, ∃ℓ∈[M] s.t. {a1:ℓ−1} ⊆T and {aℓ:M} = Wk for some k ∈[K]. As an example, when the graph is fully connected INVITE is capable of producing all n! permutations of the n states as the censored lists. As another example, in Figure 1 (b) and (c), both chains have two transient states T = {1, 2} and two recurrent states W1 = {3, 4}. (b) has no path that visits both 1 and 2, and thus every censored list must be a prefix of a permutation. However, (c) has a path that visits both 1 and 2, thus can generate (1,2,3,4), a full permutation. In general, each INVITE run generates a permutation of n states, or a prefix of a permutation. Let Sym(n) be the symmetric group on [n]. Then, the data space D of censored lists is D ≡{(a1:k) | a ∈Sym(n), k ∈[n]}. 2.1 Computing the INVITE likelihood Learning and inference under the INVITE model is challenging due to its likelihood function. A naive method to compute the probability of a censored list a given π and P is to sum over all uncensored random walk trajectories x which produces a: P(a; π, P) = P x produces a P(x; π, P). This naive computation is intractable since the summation can be over an infinite number of trajectories x’s that might have produced the censored list a. For example, consider the censored list a = (1, 2, 3, 4) generated from Figure 1(a). There are infinite uncensored trajectories to produce a by visiting states 1 and 2 arbitrarily many times before visiting state 3, and later state 4. The likelihood of π and P on a censored list a is P(a; π, P) = ( πa1 QM−1 k=1 P(ak+1 | a1:k; P) if a cannot be extended 0 otherwise. (1) 3 Note we assign zero probability to a censored list that is not completed yet, since the underlying random walk must run forever. We say a censored list a is valid (invalid) under π and P if P(a; π, P) > 0 (= 0). We first review the fundamental matrix in the absorbing random walk. A state that transits to itself with probability 1 is called an absorbing state. Given a Markov chain P with absorbing states, we can rearrange the states into P′ = Q R 0 I , where Q is the transition between the nonabsorbing states, R is the transition from the nonabsorbing states to absorbing states, and the rest trivially represent the absorbing states. Theorem 3 presents the fundamental matrix, the essential tool for the tractable computation of the INVITE likelihood. Theorem 3. [7] The fundamental matrix of the Markov chain P′ is N = (I −Q)−1. Nij is the expected number of times that a chain visits state j before absorption when starting from i. Furthermore, define B = (I −Q)−1R. Then, Bik is the probability of a chain starting from i being absorbed by k. In other words, Bi· is the absorption distribution of a chain starting from i. As a tractable way to compute the likelihood, we propose a novel formulation that turns an INVITE random walk into a series of absorbing random walks. Although INVITE itself is not an absorbing random walk, each segment that produces the next item in the censored list can be modeled as one. That is, for each k = 1 . . . M −1 consider the segment of the uncensored random walk starting from the previous output ak until the next output ak+1. For this segment, we construct an absorbing random walk by keeping a1:k nonabsorbing and turning the rest into the absorbing states. A random walk starting from ak is eventually absorbed by a state in S \ {a1:k}. The probability of being absorbed by ak+1 is exactly the probability of outputting ak+1 after outputting a1:k in INVITE. Formally, we construct an absorbing random walk P(k): P(k) = Q(k) R(k) 0 I , (2) where the states are ordered as a1:M. Corollary 1 summarizes our computation of the INVITE likelihood. Corollary 1. The k-th step INVITE likelihood for k ∈[M −1] is P(ak+1 | a1:k, P) = [(I −Q(k))−1R(k)]k1 if (I −Q(k))−1 exists 0 otherwise (3) Suppose we observe m independent realizations of INVITE: Dm = n a(1) 1 , ..., a(1) M1 , ..., a(m) 1 , ..., a(m) Mm o , where Mi is the length of the i-th censored list. Then, the INVITE log likelihood is ℓ(π, P; Dm) = Pm i=1 log P(a(i); π, P). 2.2 Consistency of the MLE Identifiability is an essential property for a model to be consistent. Theorem 4 shows that allowing self-transitions in P cause INVITE to be unidentifiable. Then, Theorem 5 presents a remedy. The proof for both theorems are presented in our supplementary material. Let diag(q) be a diagonal matrix whose i-th diagonal entry is qi. Theorem 4. Let P be an n × n transition matrix without any self-transition (Pii = 0, ∀i), and q ∈[0, 1)n. Define P′ = diag(q) + (I −diag(q))P, a scaled transition matrix with self-transition probabilities q. Then, P(a; π, P) = P(a; π, P′), for every censored list a. For example, consider a censored list a = (1, j) where j ̸= 1. Using the fundamental matrix, P(a2 | a1; P) = (1 −P11)−1P1j = (P j′̸=1 P1j′)−1P1j = (P j′̸=1 cP1j′)−1cP1j, ∀c. This implies that multiplying a constant c to P1j for all j ̸= 1 and renormalizing the first row P1· to sum to 1 does not change the likelihood. Theorem 5. Assume the initial distribution π > 0 elementwise. In the space of transition matrices P without self-transitions, INVITE is identifiable. Let ∆n−1 = {p ∈Rn | pi ≥0, ∀i, P i pi = 1} be the probability simplex. For brevity, we pack the parameters of INVITE into one vector θ as follows: θ ∈Θ = {(π⊤, P1·, . . . , Pn·)⊤| π, Pi· ∈ ∆n−1, Pii = 0, ∀i}. Let θ∗= (π∗⊤, P∗ 1·, . . . , P∗ n·)⊤∈Θ be the true model. Given a set of m censored lists Dm generated from θ∗, the average log likelihood function and its pointwise limit are 4 bQm(θ) = 1 m m X i=1 log P(a(i)); θ) and Q∗(θ) = X a∈D P(a; θ∗) log P(a; θ). (4) For brevity, we assume that the true model θ∗is strongly connected; the analysis can be easily extended to remove it. Under the Assumption A1, Theorem 6 states the consistency result. Assumption A1. Let θ∗= (π∗⊤, P∗ 1·, . . . , P∗ n·)⊤∈Θ be the true model. π∗has no zero entries. Furthermore, P∗is strongly connected. Theorem 6. Assume A1. The MLE of INVITE bθm ≡maxθ∈Θ bQm(θ) is consistent. We provide a sketch here. The proof relies on Lemma 6 and Lemma 2 that are presented in our supplementary material. Since Θ is compact, the sequence {bθm} has a convergent subsequence {bθmj}. Let θ′ = limj→∞bθmj. Since bQmj(θ∗) ≤bQmj(bθmj), Q∗(θ∗) = lim j→∞ bQmj(θ∗) ≤lim j→∞ bQmj(bθmj) = Q∗(θ′), where the last equality is due to Lemma 6. By Lemma 2, θ∗is the unique maximizer of Q∗, which implies θ′ = θ∗. Note that the subsequence was chosen arbitrarily. Since every convergent subsequence converges to θ∗, bθm converges to θ∗. 2.3 Parameter Estimation via Regularized Maximum Likelihood We present a regularized MLE (RegMLE) of INVITE. We first extend the censored lists that we consider. Now we allow the underlying walk to terminate after finite steps because in real-world applications the observed censored lists are often truncated. That is, the underlying random walk can be stopped before exhausting every state the walk could visit. For example, in verbal fluency, participants have limited time to produce a list. Consequently, we use the prefix likelihood L(a; π, P) = πa1 M−1 Y k=1 P(ak+1 | a1:k; P). (5) We find the RegMLE by maximizing the prefix log likelihood plus a regularization term on π, P. Note that, π and P can be separately optimized. For π, we place a Dirichlet prior and find the maximum a posteriori (MAP) estimator bπ by bπj ∝Pm i=1 1a(i) 1 =j + Cπ, ∀j. Directly computing the RegMLE of P requires solving a constrained optimization problem, because the transition matrix P must be row stochastic. We re-parametrize P which leads to a more convenient unconstrained optimization problem. Let β ∈Rn×n. We exponentiate β and row-normalize it to derive P: Pij = eβij/ Pn j′=1 eβij′ , ∀i, j. We fix the diagonal entries of β to −∞to disallow selftransitions. We place squared ℓ2 norm regularizer on β to prevent overfitting. The unconstrained optimization problem is: min β −Pm i=1 PMi−1 k=1 log P(a(i) k+1 | a(i) 1:k; β) + 1 2Cβ P i̸=j β2 ij , (6) where Cβ > 0 is a regularization parameter. We provide the derivative of the prefix log likelihood w.r.t. β in our supplementary material. We point out that the objective function of (6) is not convex in β in general. Let n = 5 and suppose we observe two censored lists (5, 4, 3, 1, 2) and (3, 4, 5, 1, 2). We found with random starts two different local optima β(1) and β(2) of (6). We plot the prefix log likelihood of (1 −λ)β(1) + λβ(2), where λ ∈[0, 1] in Figure 1(d). Nonconvexity of this 1D slice implies nonconvexity of the prefix log likelihood surface in general. Efficient Optimization using Averaged Stochastic Gradient Descent Given a censored list a of length M, computing the derivative of P(ak+1 | a1:k) w.r.t. β takes O(k3) time for matrix inversion. There are n2 entries in β, so the time complexity per item is O(k3 +n2). This computation needs to be done for k = 1, ..., (M −1) in a list and for m censored lists, which makes the overall time complexity O(mM(M 3+n2)). In the worst case, M is as large as n, which makes it O(mn4). Even the state-of-the-art batch optimization method such as LBFGS takes a very long time to find the solution for a moderate problem size such as n ≈500. For a faster computation of the RegMLE (6), we turn to averaged stochastic gradient descent (ASGD) [20, 18]. ASGD processes the lists sequentially by updating the parameters after every list. The per-round objective function for β on the i-th list is f(a(i); β) ≡− Mi−1 X k=1 log P(a(i) k+1 | a(i) 1:k; β) + Cβ 2m X i̸=j β2 ij. 5 The number of lists (m) 102 error(bP) 0 1 2 3 Ring, n=25 INVITE RW FE The number of lists (m) 102 error(bP) 1 2 3 4 5 Star, n=25 INVITE RW FE The number of lists (m) 102 error(bP) 0 1 2 3 Grid, n=25 INVITE RW FE (a) (b) (c) Figure 2: Toy experiment results where the error is measured with the Frobenius norm. We randomly initialize β0. At round t, we update the solution βt with βt ←βt−1 −ηt∇f(a(i); β) and the average estimate βt with βt ← t−1 t βt−1 + 1 t βt. Let ηt = γ0(1 + γ0at)−c. We use a = Cβ/m and c = 3/4 following [3] and pick γ0 by running the algorithm on a small subsample of the train set. We run ASGD for a fixed number of epochs and take the final βt as the solution. 3 Experiments We compare INVITE against two popular estimators of P: naive random walk (RW) and First-Edge (FE). RW is the regularized MLE of the naive random walk, pretending the censored lists are the underlying uncensored walk trajectory: bP (RW ) rc ∝ Pm i=1 PMi−1 j=1 1(a(i) j =r)∧(a(i) j+1=c) + CRW . Though simple and popular, RW is a biased estimator due to the model mismatch. FE was proposed in [2] for graph structure recovery in cascade model. FE uses only the first two items in each censored list: bP (F E) rc ∝ Pm i=1 1(a(i) 1 =r)∧(a(i) 2 =c) +CF E. Because the first transition in a censored list is always the same as the first transition in its underlying trajectory, FE is a consistent estimator of P (assuming π has no zero entries). In fact, FE is equivalent to the RegMLE of the length two prefix likelihood of the INVITE model. However, we expect FE to waste information since it discards the rest of the censored lists. Furthermore, FE cannot estimate the transition probabilities from an item that does not appear as the first item in the lists, which is common in real-world data. 3.1 Toy Experiments Here we compare the three estimators INVITE, RW, and FE on toy datasets, where the observations are indeed generated by an initial-visit emitting random walk. We construct three undirected, unweighted graphs of n = 25 nodes each: (i) Ring, a ring graph, (ii) Star, n−1 nodes each connected to a “hub” node, and (iii) Grid, a 2-dimensional √n × √n lattice. The initial distribution π∗is uniform, and the transition matrix P∗at each node has an equal transition probability to its neighbors. For each graph, we generate datasets with m ∈ {10, 20, 40, 80, 160, 320, 640} censored lists. Each censored list has length n. We note that, in the star graph a censored list contains many apparent transitions between leaf nodes, although such transitions are not allowed in its underlying uncensored random walk. This will mislead RW. This effect is less severe in the grid graph and the ring graph. For each estimator, we perform 5-fold cross validation (CV) for finding the best smoothing parameters Cβ, CRW , CF E on the grid 10−2, 10−1.5, . . . , 101, respectively, with which we compute each estimator. Then, we evaluate the three estimators using the Frobenius norm between bP and the true transition matrix P∗: error(bP) = qP i,j( bPij −P ∗ ij)2. Note the error must approach 0 as m increases for consistent estimators. We repeat the same experiment 20 times where each time we draw a new set of censored lists. Figure 2 shows how error(bP) changes as the number of censored lists m increases. The error bars are 95% confidence bounds. We make three observations: (1) INVITE tends towards 0 error. This is expected given the consistency of INVITE in Theorem 6. (2) RW is biased. In all three plots, RW tends towards some positive number, unlike INVITE and FE. This is because RW has the wrong model on the censored lists. (3) INVITE outperforms FE. On the ring and grid graphs INVITE dominates FE for every training set size. On the star graph FE is better than INVITE with a small m, but INVITE eventually achieves lower error. This reflects the fact that, although FE is unbiased, it discards most of the censored lists and therefore has higher variance compared to INVITE. 6 Animal Food n 274 452 m 4710 4622 Length Min. 2 1 Max. 36 47 Mean 18.72 20.73 Median 19 21 Table 1: Statistics of the verbal fluency data. Model Test set mean neg. loglik. Animal INVITE 60.18 (±1.75) RW 69.16 (±2.00) FE 72.12 (±2.17) Food INVITE 83.62 (±2.32) RW 94.54 (±2.75) FE 100.27 (±2.96) Table 2: Verbal fluency test set log likelihood. 3.2 Verbal Fluency We now turn to the real-world fluency data where we compare INVITE with the baseline models. Since we do not have the ground truth parameter π and P, we compare test set log likelihood of various models. Confirming the empirical performance of INVITE sheds light on using it for practical applications such as the dignosis and classification of the brain-damaged patient. Data The data used to assess human memory search consists of two verbal fluency datasets from the Wisconsin Longitudinal Survey (WLS). The WLS is a longitudinal assessment of many sociodemographic and health factors that has been administered to a large cohort of Wisconsin residents every five years since the 1950s. Verbal fluency for two semantic categories, animals and foods, was administered in the last two testing rounds (2005 and 2010), yielding a total of 4714 lists for animals and 4624 lists for foods collected from a total of 5674 participants ranging in age from their early-60’s to mid-70’s. The raw lists included in the WLS were preprocessed by expanding abbreviations (“lab” →“labrador”), removing inflections (“cats” →“cat”), correcting spelling errors, and removing response errors like unintelligible items. Though instructed to not repeat, some human participants did occasionally produce repeated words. We removed the repetitions from the data, which consist of 4% of the word token responses. Finally, the data exhibits a Zipfian behavior with many idiosyncratic, low count words. We removed words appearing in less than 10 lists. In total, the process resulted in removing 5% of the total number of word token responses. The statistics of the data after preprocessing is summarized in Table 1. Procedure We randomly subsample 10% of the lists as the test set, and use the rest as the training set. We perform 5-fold CV on the training set for each estimator to find the best smoothing parameter Cβ, CRW , CF E ∈{101, 10.5, 100, 10−.5, 10−1, 10−1.5, 10−2} respectively, where the validation measure is the prefix log likelihood for INVITE and the standard random walk likelihood for RW. For the validation measure of FE we use the INVITE prefix log likelihood since FE is equivalent to the length two prefix likelihood of INVITE. Then, we train the final estimator on the whole training set using the fitted regularization parameter. Result The experiment result is summarized in Table 2. For each estimator, we measure the average per-list negative prefix log likelihood on the test set for INVITE and FE, and the standard random walk per-list negative log likelihood for RW. The number in the parenthesis is the 95% confidence interval. Boldfaced numbers mean that the corresponding estimator is the best and the difference from the others is statistically significant under a two-tailed paired t-test at 95% significance level. In both animal and food verbal fluency tasks, the result indicates that human-generated fluency lists are better explained by INVITE than by either RW or FE. Furthermore, RW outperforms FE. We believe that FE performs poorly despite being consistent because the number of lists is too small (compared to the number of states) for FE to reach a good estimate. 4 Related Work Though behavior in semantic fluency tasks has been studied for many years, few computationally explicit models of the task have been advanced. Influential models in the psychological literature, such as the widely-known ”clustering and switching” model of Troyer et al. [21], have been articulated only verbally. Efforts to estimate the structure of semantic memory from fluency lists have mainly focused on decomposing the structure apparent in distance matrices that reflect the mean inter-item ordinal distances across many fluency lists [5]—but without an account of the processes that generate list structure it is not clear how the results of such studies are best interpreted. More recently, researchers in cognitive science have begun to focus on explicit model of the processes by which fluency lists are generated. In these works, the structure of semantic memory is first modelled either as a graph or as a continuous multidimensional space estimated from word co-occurrence statistics in large corpora of natural language. Researchers then assess whether structure in fluency data can be understood as resulting from a particular search process operating over the specified semantic 7 structure. Models explored in this vein include simple random walk over a semantic network, with repeated nodes omitted from the sequence produced [12], the PageRank algorithm employed for network search by Google [13], and foraging algorithms designed to explain the behavior of animals searching for food [15]. Each example reports aspects of human behavior that are well-explained by the respective search process, given accompanying assumptions about the nature of the underlying semantic structure. However, these works do not learn their model directly from the fluency lists, which is the key difference from our study. Broder’s algorithm Generate [4] for generating random spanning tree is similar to INVITE’s generative process. Given an undirected graph, the algorithm runs a random walk and outputs each transition to an unvisited node. Upon transiting to an already visited node, however, it does not output the transition. The random walk stops after visiting every node in the graph. In the end, we observe an ordered list of transitions. For example, in Figure 1(a) if the random walk trajectory is (2,1,2,1,3,1,4), then the output is (2→1, 1→3, 1→4). Note that if we take the starting node of the first transition and the arriving nodes of each transition, then the output list reduces to a censored list generated from INVITE with the same underlying random walk. Despite the similarity, to the best of our knowledge, the censored list derived from the output of the algorithm Generate has not been studied, and there has been no parameter estimation task discussed in prior works. Self-avoiding random walk, or non-self-intersecting random walk, performs random walk while avoiding already visited node [9]. For example, in Figure 1(a), if a self-avoiding random walk starts from state 2 then visits 1, then it can only visit states 3 or 4 since 2 is already visited. In not visiting the same node twice, self-avoiding walk is similar to INVITE. However, a key difference is that self-avoiding walk cannot produce a transition i →j if Pij = 0. In contrast, INVITE can appear to have such “transitions” in the censored list. Such behavior is a core property that allows INVITE to switch clusters in modeling human memory search. INVITE resembles cascade models in many aspects [16, 11]. In a cascade model, the information or disease spreads out from a seed node to the whole graph by infections that occur from an infected node to its neighbors. [11] formulates a graph learning problem where an observation is a list, or so-called trace, that contains infected nodes along with their infection time. Although not discussed in the present paper, it is trivial for INVITE to produce time stamps for each item in its censored list, too. However, there is a fundamental difference in how the infection occurs. A cascade model typically allows multiple infected nodes to infect their neighbors in parallel, so that infection can happen simultaneously in many parts of the graph. On the other hand, INVITE contains a single surfer that is responsible for all the infection via a random walk. Therefore, infection in INVITE is necessarily sequential. This results in INVITE exhibiting clustering behaviors in the censored lists, which is well-known in human memory search tasks [21]. 5 Discussion There are numerous directions to extend INVITE. First, more theoretical investigation is needed. For example, although we know the MLE of INVITE is consistent, the convergence rate is unknown. Second, one can improve the INVITE estimate when data is sparse by assuming certain cluster structures in the transition matrix P, thereby reducing the degrees of freedom. For instance, it is known that verbal fluency tends to exhibit “runs” of semantically related words. One can assume a stochastic block model P with parameter sharing at the block level, where the blocks represent semantic clusters of words. One then estimates the block structure and the shared parameters at the same time. Third, INVITE can be extended to allow repetitions in a list. The basic idea is as follows. In the k-th segment we previously used an absorbing random walk to compute P(ak+1 | a1:k), where a1:k were the nonabsorbing states. For each nonabsorbing state ai, add a “dongle twin” absorbing state a′ i attached only to ai. Allow a small transition probability from ai to a′ i. If the walk is absorbed by a′ i, we output ai in the censored list, which becomes a repeated item in the censored list. Note that the likelihood computation in this augmented model is still polynomial. Such a model with “reluctant repetitions” will be an interesting interpolation between “no repetitions” and “repetitions as in a standard random walk.” Acknowledgments The authors are thankful to the anonymous reviewers for their comments. This work is supported in part by NSF grants IIS-0953219 and DGE-1545481, NIH Big Data to Knowledge 1U54AI11792401, NSF Grant DMS-1265202, and NIH Grant 1U54AI117924-01. 8 References [1] J. T. Abbott, J. L. Austerweil, and T. L. Griffiths, “Human memory search as a random walk in a semantic network,” in NIPS, 2012, pp. 3050–3058. [2] B. D. Abrahao, F. Chierichetti, R. Kleinberg, and A. Panconesi, “Trace complexity of network inference.” CoRR, vol. abs/1308.2954, 2013. [3] L. Bottou, “Stochastic gradient tricks,” in Neural Networks, Tricks of the Trade, Reloaded, ser. Lecture Notes in Computer Science (LNCS 7700), G. Montavon, G. B. Orr, and K.-R. M¨uller, Eds. Springer, 2012, pp. 430–445. [4] A. Z. Broder, “Generating random spanning trees,” in FOCS. IEEE Computer Society, 1989, pp. 442–447. [5] A. S. Chan, N. Butters, J. S. Paulsen, D. P. Salmon, M. R. Swenson, and L. T. Maloney, “An assessment of the semantic network in patients with alzheimer’s disease.” Journal of Cognitive Neuroscience, vol. 5, no. 2, pp. 254–261, 1993. [6] J. R. Cockrell and M. F. Folstein, “Mini-mental state examination.” Principles and practice of geriatric psychiatry, pp. 140–141, 2002. [7] P. G. Doyle and J. L. Snell, Random Walks and Electric Networks. Washington, DC: Mathematical Association of America, 1984. [8] R. Durrett, Essentials of stochastic processes, 2nd ed., ser. Springer texts in statistics. New York: Springer, 2012. [9] P. Flory, Principles of polymer chemistry. Cornell University Press, 1953. [10] A. M. Glenberg and S. Mehta, “Optimal foraging in semantic memory,” Italian Journal of Linguistics, 2009. [11] M. Gomez Rodriguez, J. Leskovec, and A. Krause, “Inferring networks of diffusion and influence,” Max-Planck-Gesellschaft. New York, NY, USA: ACM Press, July 2010, pp. 1019– 1028. [12] J. Goi, G. Arrondo, J. Sepulcre, I. Martincorena, N. V. de Mendizbal, B. Corominas-Murtra, B. Bejarano, S. Ardanza-Trevijano, H. Peraita, D. P. Wall, and P. Villoslada, “The semantic organization of the animal category: evidence from semantic verbal fluency and network theory.” Cognitive Processing, vol. 12, no. 2, pp. 183–196, 2011. [13] T. L. Griffiths, M. Steyvers, and A. Firl, “Google and the mind: Predicting fluency with pagerank,” Psychological Science, vol. 18, no. 12, pp. 1069–1076, 2007. [14] N. M. Henley, “A psychological study of the semantics of animal terms.” Journal of Verbal Learning and Verbal Behavior, vol. 8, no. 2, pp. 176–184, Apr. 1969. [15] T. T. Hills, P. M. Todd, and M. N. Jones, “Optimal foraging in semantic memory,” Psychological Review, pp. 431–440, 2012. [16] D. Kempe, J. Kleinberg, and E. Tardos, “Maximizing the spread of influence through a social network,” in Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ser. KDD ’03. New York, NY, USA: ACM, 2003, pp. 137–146. [17] F. Pasquier, F. Lebert, L. Grymonprez, and H. Petit, “Verbal fluency in dementia of frontal lobe type and dementia of Alzheimer type.” Journal of Neurology, vol. 58, no. 1, pp. 81–84, 1995. [18] B. T. Polyak and A. B. Juditsky, “Acceleration of stochastic approximation by averaging,” SIAM J. Control Optim., vol. 30, no. 4, pp. 838–855, July 1992. [19] T. T. Rogers, A. Ivanoiu, K. Patterson, and J. R. Hodges, “Semantic memory in Alzheimer’s disease and the frontotemporal dementias: a longitudinal study of 236 patients.” Neuropsychology, vol. 20, no. 3, pp. 319–335, 2006. [20] D. Ruppert, “Efficient estimations from a slowly convergent robbins-monro process,” Cornell University Operations Research and Industrial Engineering, Tech. Rep., 1988. [21] A. Troyer, M. Moscovitch, G. Winocur, M. Alexander, and D. Stuss, “Clustering and switching on verbal fluency: The effects of focal fronal- and temporal-lobe lesions,” Neuropsychologia, vol. 36, no. 6, 1998. 9 | 2015 | 343 |
5,862 | Bounding the Cost of Search-Based Lifted Inference David Smith University of Texas At Dallas 800 W Campbell Rd, Richardson, TX 75080 dbs014200@utdallas.edu Vibhav Gogate University of Texas At Dallas 800 W Campbell Rd, Richardson, TX 75080 vibhav.gogate@utdallas.edu Abstract Recently, there has been growing interest in systematic search-based and importance sampling-based lifted inference algorithms for statistical relational models (SRMs). These lifted algorithms achieve significant complexity reductions over their propositional counterparts by using lifting rules that leverage symmetries in the relational representation. One drawback of these algorithms is that they use an inference-blind representation of the search space, which makes it difficult to efficiently pre-compute tight upper bounds on the exact cost of inference without running the algorithm to completion. In this paper, we present a principled approach to address this problem. We introduce a lifted analogue of the propositional And/Or search space framework, which we call a lifted And/Or schematic. Given a schematic-based representation of an SRM, we show how to efficiently compute a tight upper bound on the time and space cost of exact inference from a current assignment and the remaining schematic. We show how our bounding method can be used within a lifted importance sampling algorithm, in order to perform effective Rao-Blackwellisation, and demonstrate experimentally that the Rao-Blackwellised version of the algorithm yields more accurate estimates on several real-world datasets. 1 Introduction A myriad of probabilistic logic languages have been proposed in recent years [5, 12, 17]. These languages can express elaborate models with a compact specification. Unfortunately, performing efficient inference in these models remains a challenge. Researchers have attacked this problem by “lifting” propositional inference techniques; lifted algorithms identify indistinguishable random variables and treat them as a single block at inference time, which can yield significant reductions in complexity. Since the original proposal by Poole [15], a variety of lifted inference algorithms have emerged. One promising approach is the class of search-based algorithms [8, 9, 16, 19, 20, 21], which lift propositional weighted model counting [4, 18] to the first-order level by transforming the propositional search space into a smaller lifted search space. In general, exact lifted inference remains intractable. As a result, there has been a growing interest in developing approximate algorithms that take advantage of symmetries. In this paper, we focus on a class of such algorithms, called lifted sampling methods [9, 10, 13, 14, 22] and in particular on the lifted importance sampling (LIS) algorithm [10]. LIS can be understood as a sampling analogue of an exact lifted search algorithm called probabilistic theorem proving (PTP). PTP accepts a SRM as input (as a Markov Logic Network (MLN) [17]), decides upon a lifted inference rule to apply (conditioning, decomposition, partial grounding, etc.), constructs a set of reduced MLNs, recursively calls itself on each reduced MLN in this set, and combines the returned values in an appropriate manner. A drawback of PTP is that the MLN representation of the search space is inference unaware; at any step in PTP, the cost of inference over the remaining model is unknown. This is problematic because unlike (propositional) importance sampling algorithms for graphical models, which can be Rao-Blackwellised [3] in a principled manner by sampling variables until the treewidth of the remaining model is bounded by a small constant (called w-cutset sampling [1]), it is currently not possible to Rao-Blackwellise LIS in a principled manner. To address these limitations, we make the following contributions: 1 1. We propose an alternate, inference-aware representation of the lifted search space that allows efficient computation of the cost of inference at any step of the PTP algorithm. Our approach is based on the And/Or search space perspective [6]. Propositional And/Or search associates a compact representation of a search space with a graphical model (called a pseudotree), and then uses this representation to guide a weighted model counting algorithm over the full search space. We extend this notion to Lifted And/Or search spaces. We associate with each SRM a schematic, which describes the associated lifted search space in terms of lifted Or nodes, which represent branching on counting assignments [8] to groups of indistinguishable variables, and lifted And nodes, which represent decompositions over independent and (possibly) identical subproblems. Our formal specification of lifted And/Or search spaces offers an intermediate representation of SRMs that bridges the gap between high-level probabilistic logics such as Markov Logic [17] and the search space representation that must be explored at inference time. 2. We use the intermediate specification to characterize the size of the search space associated with an SRM without actually exploring it, providing tight upper bounds on the complexity of PTP. This allows us, in principle, to develop advanced approximate lifted inference algorithms that take advantage of exact lifted inference whenever they encounter tractable subproblems. 3. We demonstrate the utility of our lifted And/Or schematic and tight upper bounds by developing a Rao-Blackwellised lifted importance sampling algorithm, enabling the user to systematically explore the accuracy versus complexity trade-off. We demonstrate experimentally that it vastly improves the accuracy of estimation on several real-world datasets. 2 Background and Terminology And/Or Search Spaces. The And/Or search space model is a general perspective for searching over graphical models, including both probabilistic networks and constraint networks [6]. And/Or search spaces allow for many familiar graph notions to be used to characterize algorithmic complexity. Given a graphical model, M “ xG, Φy, where G “ xV, Ey is a graph and Φ is a set of features or potentials, and a rooted tree T that spans G in such a manner that the edges of G that are not in T are all back-edges (i.e., T is a pseudo tree [6]), the corresponding And/Or Search Space, denoted ST pRq, contains alternating levels of And nodes and Or nodes. Or nodes are labeled with Xi, where Xi P varspΦq. And nodes are labeled with xi and correspond to assignments to Xi. The root of the And/Or search tree is an Or node corresponding to the root of T. Intuitively, the pseudo tree can be viewed as a schematic for the structure of an And/Or search space associated with a graphical model, which denotes (1) the conditioning order on the set varspΦq, and (2) the locations along this ordering at which the model decomposes into independent subproblems. Given a pseudotree, we can generate the corresponding And/Or search tree via a straightforward algorithm [6] that adds conditioning branches to the pseudo tree representation during a DFS walk over the structure. Adding a cache that stores the value of each subproblem (keyed by an assignment to its context) allows each subproblem to be computed just once, and converts the search tree into a search graph. Thus the cost of inference is encoded in the pseudo tree. In Section 3, we define a lifted analogue to the backbone pseudo tree, called a lifted And/Or schematic, and in Section 3, we use the definition to prove cost of inference bounds for probabilistic logic models. First Order Logic. An entity (or a constant) is an object in the model about which we would like to reason. Each entity has an associated type, τ. The set of all unique types forms the set of base types for the model. A domain is a set of entities of the same type τ; we assume that each domain is finite and is disjoint from every other domain in the model. A variable, denoted by a lower-case letter, is a symbolic placeholder that specifies where a substitution may take place. Each variable is associated with a type τ; a valid substitution requires that a variable be replaced by an object (either an entity or another variable) with the same type. We denote the domain associated with a variable v by ∆v. We define a predicate, denoted by Rpt1 :: τ1, . . . , tk :: τkq, to be a k-ary functor that maps typed entities to binary-valued random variables (also called parameterized random variable [15]). A substitution is an expression of the form tt1 “ x1, . . . , tk “ xku where ti are variables of type τi and xi are either entities or variables of type τi. Given a predicate R and a substitution θ “ tt1 “ x1, . . . , tk “ xku, the application of θ to R yields another k-ary functor functor with each ti replaced by xi, called an atom. If all the xi are entities, the application yields a random variable. In this case, we refer to θ as a grounding of R, and Rθ as a ground atom. We adopt the notation θi to refer to the i-th assignment of θ, i.e. θi “ xi. 2 Statistical Relational Models combine first-order logic and probabilistic graphical models. A popular SRM is Markov logic networks (MLNs) [17]. An MLN is a set of weighted first-order logic clauses. Given entities, the MLN defines a Markov network over all the ground atoms in its Herbrand base (cf. [7]), with a feature corresponding to each ground clause in the Herbrand base. (We assume Herbrand interpretations throughout this paper.) The weight of each feature is the weight of the corresponding first-order clause. The probability distribution associated with the Markov network is given by: Ppxq “ 1 Z exppř i winipxqq where wi is the weight of the ith clause and nipxq is its number of true groundings in x, and Z “ ř x exppř i winipxqq is the partition function. In this paper, we focus on computing Z. It is known that many inference problems over MLNs can be reduced to computing Z. Probabilistic Theorem Proving (PTP) [9] is an algorithm for computing Z in MLNs. It lifts the two main steps in propositional inference: conditioning (Or nodes) and decomposition (And nodes). In lifted conditioning, the set of truth assignments to ground atoms of a predicate R are partitioned into multiple parts such that in each part (1) all truth assignment have the same number of true atoms and (2) the MLNs obtained by applying the truth assignments are identical. Thus, if R has n ground atoms, the lifted search procedure will search over Opn ` 1q new MLNs while the propositional search procedure will search over Op2nq MLNs, an exponential reduction in complexity. In lifted decomposition, the MLN is partitioned into a set of MLNs that are not only identical (up to a renaming) but also disjoint in the sense that they do not share any ground atoms. Thus, unlike the propositional procedure which creates n disjoint MLNs and searches over each, the lifted procedure searches over just one of the n MLNs (since they are identical). Unfortunately, lifted decomposition and lifted conditioning cannot always be applied and in such cases PTP resorts to propositional conditioning and decomposition. A drawback of PTP is that unlike propositional And/Or search which has tight complexity guarantees (e.g., exponential in the treewidth and pseudotree height), there are no (tight) formal guarantees on the complexity of PTP.1 We address this limitation in the next two sections. 3 Lifted And/Or Schematics S1([x],1,2,UN) R1([x],1,2,UN) R1([x],1,2,UN) S1([x,y],2,2,UN) (y,1,2) R1([x],1,2,UN) S1([x,y],2,2,UN) (x,1,2) (x,1,2) Figure 1: Possible schematics for (a) Rpxq _ Spxq, (b) Rpxq _Spx, yq and (c) Rpxq _ Rpyq _ Spx, yq, ∆x “ ∆y “ 2. UN stands for unknown. Circles and diamonds represent lifted Or and And nodes respectively. Our goal in this section is to define a lifted analogue the pseudotree notion employed by the propositional And/Or framework. The structure must encode (1) all information contained in a propositional pseudotree (a conditioning order, conditional independence assumptions), as well as (2) additional information needed by the PTP algorithm in order to exploit the symmetries of the lifted model. Since the symmetries that can be exploited highly depend on the amount of evidence, we encode the SRM after evidence is instantiated, via a process called shattering [2]. Thus, while a pseudotree encodes a graphical model, a schematic encodes an (SRM, evidence set) pair. Definition A lifted Or node is a vertex labeled by a 6 ´ tuple xR, Θ, α, i, c, ty, where (1) R is a k-ary predicate, (2) Θ is a set of valid substitutions for R, (3) α P t1, . . . , ku, represents the counting argument for the predicate Rpt1 :: τ1, . . . , tk :: τkq and specifies a domain τα to be counted over, (4) i is an identifier of the block of the partition being counted over, (5) c P Z` is the number of entities in block i, and (6) t P tTrue, False, Unknownu is the truth value of the set of entities in block i. Definition A lifted And node is a vertex labeled by F, a (possibly empty) set of formulas, where a formula f is a pair ptpO, θ, bqu, wq, in which O is a lifted Or node xR, Θ, α, i, c, ty, θ P Θ , b P tTrue, Falseu, and w P R. Formulas are assumed to be in clausal form. Definition A lifted And/Or schematic, S “ xVS, ES, vry, is a rooted tree comprised of lifted Or nodes and lifted And nodes. S must obey the following properties: • Every lifted Or node O P VS has a single child node N P VS. • Every lifted And node A P VS has a (possibly empty) set of children tN1, . . . , Nnu Ă VS . 1Although, complexity bounds exist for related inference algorithms such as first-order decomposition trees [20], they are not as tight as the ones presented in this paper. 3 • For each pair of lifted Or nodes O, O1 P VS, with respective labels xR, Θ, α, i, c, ty, xR1, Θ1, α1, i1, c1, t1y, pR, iq ‰ pR1, i1q. Pairs pR, iq uniquely identify lifted Or nodes. • For every lifted Or node O P VS with label xR, Θ, α, i, c, ty, @θ P Θ, @α1 ‰ α, either (1) ∆θα1 = 1, or (2) θα1 P X, where X has appeared as the decomposer label [9] of some edge in pathSpO, vrq. • For each formula fi “ ptpO, θ, bqu, wq appearing at a lifted And node A, @O P tpO, θ, bqu, O P pathSpvr, Aq. We call the set of edges tpO, Aq | O P FormulaspAqu the back edges of S. • Each edge between a lifted Or node O and its child node N is unlabeled. Each edge between a lifted And node A and its child node N may be (1) unlabeled or (2) labeled with a pair pX, cq, where X is a set of variables, called a decomposer set, and c P Z` is the the number of equivalent entities in the block of x represented by the subtree below. If it is labeled with a decomposer set X then (a) for every substitution set Θ labeling a lifted Or node O1 appearing in the subtree rooted at N, Di s.t .@θ P Θ, θi P X and (b) @ decomposer sets Y labeling edges in the subtree rooted at N, Y X X “ H. The lifted And/Or Schematic is a general structure for specifying the inference procedure in SRMs. It can encode models specified in many formats, such as Markov Logic [17] and PRV models [15]. Given a model and evidence set, constructing a schematic conversion into a canonical form is achieved via shattering [2, 11], whereby exchangeable variables are grouped together. Inference only requires information on the size of these groups, so the representation omits information on the specific variables in a given group. Figure 1 shows And/Or schematics for three MLNs. Algorithm 1 Function evalNode(And) 1: Input: a schematic, T with And root node, a counting store cs 2: Output: a real number, w 3: N “ root(T ) 4: for formula f P N do 5: w “ wˆ calculateWeightpf, csq 6: for child N 1 of T do 7: cs1 “ sumOutDoneAtomspcs, Nq 8: if pN, N 1q has label xV, b, cby then 9: if ExpV, bq, ccy P cs s.t. v P V then 10: cs2 “ cs1 Y xpV, bq, xtu, tptu, cbqyy 11: xP, My “getCC(V, b, cs2) //get cc for V 12: for assignment pai, kiq P M do 13: //give v its own entry in cs 14: cs3 “ updateCCAtDecomposerpcs2, V, v, pai, 1qq 15: w “ wˆevalNodepN 1, cs3qki 16: else 17: w “ wˆevalNodepN 1, csq 18: return w Algorithm 2 Function evalNode(Or) 1: Input: a schematic, T with Or Node root, a counting store cs 2: Output: a real number, w 3: if pxroot(T),cs)y, wq P cache then return w 4: xR, Θ, α, b, c, t, P y = root(T ) 5: T 1 “ child(xR, Θ, α, b, c, t, y, T q 6: V “ tv | θ P Θ, θα “ vu 7: xP, txai, kiyuy “getCC(V, b) 8: w “ 0 9: if t P tT rue, F alseu then 10: cs1 = updateCC(xP, My, R, tv) 11: w “evalNode(T 1,cs1) 12: else 13: assigns = ttv1, . . . , vnu | vi P t0, . . . , kiuu 14: for tv1, . . . , vnu P assigns do 15: cs1 = updateCC(xP, My, R, tv1, . . . , vnu) 16: w “ w ` ´´śn i“1 `ki vi ˘¯ evalNodepT 1, cs1q ¯ 17: insertCache(xR, Θ, α, b, c, t, P y, w) 18: return w 3.1 Lifted Node Evaluation Functions-We describe the inference procedure in Algorithms 1 and 2. We require the notion of a counting store in order to track counting assignments over the variables in the model. A counting store is a set of pairs xpV, iq, ccy, where V is a set of variables that are counted over together, i is a block identifier, and cc is a counting context. A counting context (introduced in [16]), is a pair xPr, My, where Pr is a list of m predicates and M : tTrue, Falseum Ñ k, is a map from truth assignments to Pr to a non-negative integer denoting the count of the number of entities in the i-th block of the partition of each v P V that take that assignment. We initialize the algorithm by a call to Algorithm 1 with an appropriate schematic S and empty counting store. The lifted And node function (Algorithm 1) first computes the weight of any completely conditioned formulas. It then makes a set of evalNode calls for each of its children O; if pA, Oq has decomposer label V , it makes a call for each assignment in each block of the partition of V ; otherwise it makes a single call to O. The algorithm takes the product of the resulting terms along with the product of the weights and returns the result. The lifted Or node function (Algorithm 2) retrieves the set of all assignments previously made to its counting argument variable set; it then makes an evalNode call to its child for each completion to its assignment set that is consistent with its labeled truth value, and takes their weighted sum, where the weight is the number of symmetric assignments represented by each assignment completion. The overall complexity of depends on the number of entries in the counting store at each step of inference. Note that Algorithm 1 reduces the size of the store by summing out over atoms that leave context. Algorithm 2 increases the size of the store at atoms with unknown truth value by splitting the current assignment into True and False blocks w.r.t. its atom predicate. Atoms with known truth value leave the size of the store unchanged. 4 4 Complexity Analysis Algorithms 1 and 2 describe a DFS-style traversal of the lifted search space associated with S. As our notion of complexity, we are interested in specifying the maximum number of times any node VS P S is replicated during instantiation of the search space. We describe this quantity as SSNpSq. Our goal in this section is to define the function SSNpSq, which we refer to as the induced lifted width of S. 4.1 Computing the Induced Lifted Width of a Schematic-In the propositional And/Or framework, the inference cost of a pseudotree T is determined by DR, the tree decomposition of the graph G “ xNodespTq, BackEdgespTqy induced by the variable ordering attained by traversing T along any DFS ordering from root to leaves. [6]. Inference is Opexppwqq, where w is the size of the largest cluster in DR. The analogous procedure in lifted And/Or requires additional information be stored at each cluster. Lifted tree decompositions are identical to their propositional counterparts with two exceptions. First, each cluster Ci requires the ordering of its nodes induced by the original order of S. Second, each cluster Ci that contains a node which occurs after a decomposer label requires the inclusion of the decomposer label. Formally: Definition The tree sequence TS associated with schematic S is a partially ordered set such that: (1) O P NodespSq ñ O P TS, (2) pA, Nq with label l P EdgespSq ñ pA, lq P TS, and (3) AncpN1, N2, Sq ñ N1 ă N2 P TS. Definition The path sequence P associated with tree sequence TS of schematic S is any totally ordered subsequence of TS. Definition Given a schematic S and its tree sequence TS, the Lifted Tree Decomposition of TS, denoted DS, is a pair pC, Tq in which C is a set of path sequences and T is a tree whose nodes are the members of C satisfying the following properties: (1) @pO, Aq P BackEdgespPq, Di s.t. O, A P Ci, (2) @i, j, k s.t Ck P PathT pCi, Cjq, Ci X Cj Ď Ck, (3) @A P TS, O P Ci, A ă O ñ A P Ci. Given the partial ordering of nodes defined by S, each schematic S induces a unique Lifted Tree Decomposition, DS. Computing SSNpSq requires computing maxCiPC SSCpCiq. There exists a total ordering over the nodes in each Ci; hence the lifted structure in each Ci constitutes a path. We take the lifted search space generated by each cluster C to be a tree; hence computing the maximum node replication is equivalent to computing the number of leaves in SSC. In order to calculate the induced lifted width of a given path, we must first determine which Or nodes are counted over dependently. Let VC “ tv | xR, Θ, α, i, c, ty P C, θ P Θ, θα “ vu be the set of variables that are counted over by an Or node in cluster C. Let VC be a partition of VC into its dependent variable counting sets; i.e. define the binary relation CS “ tpv1, v2q | DxR, Θ, α, i, c, ty P VS s.t Dθ, θ1 P Θ, θα “ v1, θ1 α “ v2u. Then V “ tv1 | pv, v1q P C` S u, where C` S is the transitive closure of CS. Let VC “ tVj | v1, v2 P Vj ðñ pv1, v2q P C` S u. Variables that appear in a set Vj P VC refer to the same set of objects; thus all have the same type τj and they all share the same partition of the entities of Tj. Let Pj denote the partition of the entities of Tj w.r.t variable set Vj. Then each block pij P Pj is counted over independently (we refer to each pij as a dependent counting path ). Thus we can calculate the total leaves corresponding to cluster C by taking the product of the leaves of each pij block: SSCpCq “ ś VjPVC ś pijPPj SSpppijq (1) Analysis of lifted Or nodes that count over the same block pij depends on the structure of the decomposers sets over the structure. First, we consider the case in which C contains no decomposers. 4.2 Lifted Or Nodes with No Decomposer-Consider ORC,Vj,i, the sequence of nodes in C that perform conditioning over the i-th block of the partition of the variables in Vj. The nodes in ORC,Vj,i count over the same set of entities. A conditioning assignment at O assigns ct P t0 . . . cu entities to True and cf “ c´ct entities to False w.r.t. its predicate, breaking the symmetry over the c elements in the block. Each O1 P ORp,Vj,i that occurs after O must perform counting over two sets of size ct and cf separately. The number of assignments for block tVj, iu grows exponentially with the number of ancestors counting over tVj, iu whose truth value is unknown. Formally, let cij be the size of the i-th block of the partition of Vj, and let nij “ |tO | O P ORC,Vj,i, N “ xR, Θ, α, i, c, unknownyu|. For an initial domain size cij and predicate count nij, we must compute the number of possible ways to represent cij as a sum of 2nij non-negative integers. Define kij “ 2nij. We can count the number of leaf nodes generated by counting the number of weak compositions of cij into kij parts. Thus the number of search space leaves corresponding to pij generated by C is: SSpppijq “ Wpcij, kijq “ `cij`kij´1 kij´1 ˘ (2) 5 Example Consider the example in Figure 1(a). There is a single path from the root to a leaf. The set of variables appearing on the path, V “ txu, and hence the partition of V into variables that are counted over together yields ttxuu. Thus n1,1 “ |tpR1p2, Unq, S1p2, Unqu| “ 2, c1,1 “ 2, and k1,1 “ 4. So we can count the leaves of the model by the expression `2`4´1 4´1 ˘ “ 5! 3!2! “ 10. Algorithm 3 Function countPathLeaves 1: Input: a subsequence path P 2: Output: fpxq : Z` Ñ Z`, where x is a domain size and fpxq is the number of search space leaves generated by P 3: //we represent the recursive polynomial apwc1 - wc2q as a triple pa, wc1, wc2q, where a P Z, and wc1, wc2 are either weak compositions (base case) or triples of this type (recursive case) 4: type WCP = WC INT | WCD (INT,WCP,WCP) 5: //evalPoly constructs the polynomial 6: function MAKEPOLY((WC nq, pt, a, sq) 7: return WCD ( n 2t´a , WC n, WC pn ´ 2t´aqq 8: function MAKEPOLY((WCD (c, wc1, wc2qq, pt, a, sqq 9: return WCDpa, makePoly wc1 pt, a, sq, makePoly wc2 pt´ s, a ´ s, sqq 10: //applyDec divides out the Or nodes with counting variables that are decomposers 11: function APPLYDEC(d,(WC a)) 12: return WC pa{p2dqq 13: function APPLYDEC(d,(WCD (a,b,c))) 14: return WCD (a,applyDec d b,applyDec d c) 15: //evalPoly creates a function that takes a domain and computes the differences of the constituent weak compositions 16: function EVALPOLY((WCD (a,b,c)),x) 17: return a ˆ (evalPoly b x - evalPoly c x) 18: function EVALPOLY((WC a),x) 19: return `x`a´1 a´1 ˘ 20: t = totalOrNodes(P ) 21: dv = orNodesWithDecomposerCountingArgument(P ) 22: poly = WC 2t; orNodesAbove=0;orNodesBetween=0 23: for N of P do 24: if N “ pA, xv, p, cyq then 25: poly = makePoly poly (t,orNodesAbove,orNodesBetween) 26: orNodesBetween=0 27: else 28: orNodesAbove++;orNodesBetween++ return 2dvˆ evalPoly (applyDec dv poly) 4.3 Lifted Or Nodes with Decomposers- To determine the size of the search tree induced by a subsequence P that contains decomposers, we must consider whether the counting argument of each Or node is decomposed on. 4.3.1 Lifted Or Nodes with Decomposers as Non Counting Arguments We first consider the case when ORC,Vj,i contains decomposer variables as non-counting arguments. For each parent-to-child edge (A,N,label l), Algorithm 1 generates a child for each non-zero assignment in the counting store containing the decomposer variable. If a path subsequence over variable v of initial domain c has n Or nodes, k of which occur below the decomposer label, then we can compute the number of assignments in the counting store at each decomposer as 2n´k. Further, we can compute the number of non-zero leaves generated by each assignment can be computed as the difference in leaves from the model over n Or nodes and the model over k Or nodes. Hence the resulting model has ` 2n´k˘ ´`c`2n´1 2n´1 ˘ ´ `c`2k´1 2k´1 ˘¯ leaves. This procedure can be repeated by recursively applying the rule to split each weak composition into a difference of weak compositions for each decomposer label present in the subsequence under consideration (Algorithm 3). The final result is a polynomial in c, which, when given a domain size, returns the number of leaves generated by the path subsequence. Example Consider the example in Figure 1(c). Again there is a single path from the root to a leaf. The set of variables appearing on the path is V “ tx, yu. The partition of V into variables that are counted over together yields V “ ttx, yuu.Algorithm 3 returns the polynomial fpxq “ 2pWpx, 4q´Wpx, 2qq. So the search space contains 2p `2`4´1 4´1 ˘ ´ `2`2´1 2´1 ˘ q “ 14 leaves. 4.3.2 Lifted Or Nodes with Decomposers as Counting Arguments The procedure is similar for the case when P contains Or nodes that count over variables that have been decomposed one addition. Or nodes that count over a variable that has previously appeared as the decomposer label of an ancestor in the path have a domain size of 1 and hence always spawn Wp1, 2q “ 2 children instead of Wpx, 2q children. If there are d Or nodes in P that count over decomposed variables, we must divide the k term of each weak composition in our polynomial by 2d. Lines 11 ´ 14 of Algorithm 3 perform this operation. Example Consider the example shown in Figure 1(b). Again there is one path from the root to leaf, with V “ tx, yu; partitioning V into sets of variables that are counted over together yields V “ ttxu, tyuu. Thus n1,1 “ |tpR1p2, Unqu| “ 1, c1,1 “ 2, and k1,1 “ 2. Similarly, n2,1 “ |tS1p2, Unq|s| “ 1, c2,1 “ 2, and k2,1 “ 2. Algorithm 3 returns the constant functions f1pxq “ f2pxq “ 2 ˆ Wpx, 1q “ 2. Equation 1 indicates that we take the product of these functions. So the search space contains 4 leaves regardless of the domain sizes of x and y. 4.4 Overall Complexity-Detailed analysis, as well as a proof of correctness of Algorithm 3 is given in the supplemental material section. Here we give general complexity results. 6 Theorem 4.1 Given a lifted And/Or Schematic S with associated Tree Decomposition DS “ pC, Tq, the overall time and space complexity of inference in S is OpmaxCiPCSSCpCiqq. 5 An Application: Rao-Blackwellised Importance Sampling Algorithm 4 Function makeRaoFunction 1: Input: a schematic S 2: Output: fpxq : CS Ñ Z` 3: find the clusters of S 4: pC, T q = findTreeDecomposition(S) 5: sizef “ tu 6: for Ci of C do 7: P = dependentCountingPaths(Ci) 8: cf “ tu 9: for pVj, Pjq of P do 10: fj = countPathLeaves(Pj) 11: cf.append(xVJ, fjy) 12: sizef.append(cf) return sizef Algorithm 5 Function evalRaoFunction 1: Input: a counting store, cs, a list of list of size functions, sf 2: Output: s P Z`, the cost of exact inference 3: clusterCosts “ tu 4: for cf i of sf do 5: clusterCost “ 1 6: for xVj, fjy of cf i do 7: assigns “ getCCpVjq 8: for sk of assigns do 9: clusterCost “ clusterCost ˆ fjpskq 10: clusterCosts.append(clusterCost) return maxpclusterCostsq Rao-Blackwellisation [1, 3] is a variance-reduction technique which combines exact inference with sampling. The idea is to partition the ground atoms into two sets: a set of atoms, say X that will be sampled and a set of atoms that will be summed out analytically using exact inference techniques, say Y. Typically, the accuracy (variance decreases) improves as the cardinality of Y is increased. However, so does the cost of exact inference, which in turn decreases the accuracy because fewer samples are generated. Thus, there is a trade-off. Rao-Blackwellisation is particularly useful in lifted sampling schemes because subproblems over large sets of random variables are often tractable (e.g. subproblems containing 2n assignments can often be summed out in Opnq time via lifted conditioning, or in Op1q time via lifted decomposition). The approach presented in Section 3 is ideal for this task because Algorithm 3 returns a function that is specified at the schematic level rather than the search space level. Computing the size of the remaining search space requires just the evaluation of a set of polynomials. In this section, we introduce our sampling scheme, which adds Rao-Blackwellisation to lifted importance sampling (LIS) (as detailed in [9, 10]). Technically, LIS is a minor modification of PTP, in which instead of searching over all possible truth assignments to ground atoms via lifted conditioning, the algorithm generates a random truth assignment (lifted sampling), and weighs it appropriately to yield an unbiased estimate of the partition function. 5.1 Computing the size bounding function-Given a schematic S “ xVS, ES, vry to sample, we introduce a preprocessing step that constructs a size evaluation function for each v P VS. Algorithm 4 details the process of creating the function for one node. It takes as input the schematic S rooted at v. It first finds the tree decomposition of S. The algorithm then finds the dependent paths in each cluster; finally, it applies Algorithm 3 to each dependent path and wraps the resulting function with the variable dependency. It returns a list of list of (variable,function) pairs. 5.2 Importance Sampling at lifted Or Nodes-Importance sampling at lifted Or nodes is similar to its propositional analogue. Each lifted Or node is now specified by an 8-tuple xR, Θ, α, i, c, t, Q, sfy, in which Q is the proposal distribution for pR, iq, and sf is the output of Algorithm 4. The sampling algorithm takes an additional input, cb, specifying the complexity bound for Rao-Blackwellisation. Given an or Node where t “unknown, we first compute the cost of exact inference. Algorithm 5 describes the procedure. It takes as input (1) the list of lists sf output by Algorithm 4, and (2) the counting store, detailing the counting assignments already made by the current sample. For each sublist in the input list, the algorithm evaluates each (variable,function) pair by (1) retrieving the list of current assignments from the counting store, (2) evaluating the function for the domain size of each assignment, and (3) computing the product of the results. Each of these values represents a bound on the cost of inference for a single cluster; Algorithm 5 returns c, the maximum of this list. If c ă“ cb we call evalNodepSq; otherwise we sample assignment i from Q with probability qi, update the counting store with assignment i, and call sampleNodepS1q, where S1 is the child schematic, yielding estimate ˆw of the partition function of S1. We then return ˆδS “ ˆ w qi as the estimate of the partition function at S. 5.3 Importance Sampling at lifted And Nodes-Importance sampling at lifted And nodes differs from its propositional counterpart in that a decomposer labeled edge pA, Tq represents d distributions 7 that are not only independent but also identical. Let A be a lifted And node that we wish to sample, with children S1, . . . , Sk, with corresponding decomposer labels d1 . . . dk (for each edge with no decomposer label take di “ 1). Then the estimator for the partition function at A is: ˆδA “ ś iPt1..ku ś jPt1..diu δTi. 6 Experiments 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 0 200 400 600 800 1000 Log Sample Variance Time(s) Time(s) vs Log Sample Variance:Smooth-test.pdf 0 10 100 1000 (a) Friends and Smokers, Asthma 2600 objects, 10% evidence 586 587 588 589 590 591 592 593 594 595 0 200 400 600 800 1000 Log Sample Variance Time(s) Time(s) vs Log Sample Variance:Smooth-test.pdf 0 10 100 1000 (b) webKB 410 objects, 10% evidence 1090 1095 1100 1105 1110 1115 0 200 400 600 800 1000 Log Sample Variance Time(s) Time(s) vs Log Sample Variance:Smooth-test.pdf 0 10 100 1000 (c) protein 550 objects, 10% evidence Figure 2: Log variance as a function of time. We ran our Rao-Blackwellised Importance Sampler on three benchmark SRMs and datasets: (1) The friends, smokers and Asthma MLN and dataset described in [19], (2) The webKB MLN for collective classification and (3) The Protein MLN, in which the task is to infer protein interactions from biological data. All models are available from www.alchemy.cs.washington.edu. Setup. For each model, we set 10% randomly selected ground atoms as evidence, and designated them to have True value. We then estimated the partition function via our Rao-Blackwellised sampler with complexity bounds t0, 10, 100, 1000u (bound of 0 yields the LIS algorithm). We used the uniform distribution as our proposal. We ran each sampler 50 times and computed the sample variance of the estimates. Results. Figure 2 shows the sample variance of the estimators as a function of time. We see that the Rao-Blackwellised samplers typically have smaller variance than LIS . However, increasing the complexity bound typically does not improve the variance as a function of time (but the variance does improve as a function of number of samples). Our results indicate that the structure of the model plays a role in determining the most efficient complexity bound for sampling. In general, models with large decomposers, especially near the bottom of the schematic, will benefit from a larger complexity bound, because it is often more efficient to perform exact inference over a decomposer node. 7 Conclusions and Future Work In this work, we have presented an inference-aware representation of SRMs based on the And/Or framework. Using this framework, we have proposed an accurate and efficient method for bounding the cost of inference for the family of lifted conditioning based algorithms, such as Probabilistic Theorem Proving. Given a shattered SRM, we have shown how the method can be used to quickly identify tractable subproblems of the model. We have presented one immediate application of the scheme by developing a Rao-Blackwellised Lifted Importance Sampling Algorithm, which uses our bounding scheme as a variance reducer. Acknowledgments We gratefully acknowledge the support of the Defense Advanced Research Projects Agency (DARPA) Probabilistic Programming for Advanced Machine Learning Program under Air Force Research Laboratory (AFRL) prime contract no. FA8750-14-C-0005. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the view of DARPA, AFRL, or the US government. 8 References [1] B. Bidyuk and R. Dechter. Cutset Sampling for Bayesian Networks. Journal of Artificial Intelligence Research, 28:1–48, 2007. [2] R Braz, Eyal Amir, and Dan Roth. Lifted first-order probabilistic inference. In Proceedings of the 19th international joint conference on Artificial intelligence, pages 1319–1325. Citeseer, 2005. [3] George Casella and Christian P Robert. Rao-blackwellisation of sampling schemes. Biometrika, 83(1):81–94, 1996. [4] M. Chavira and A. Darwiche. On probabilistic inference by weighted model counting. Artificial Intelligence, 172(6-7):772–799, 2008. [5] Luc De Raedt and Kristian Kersting. Probabilistic inductive logic programming. Springer, 2008. [6] Rina Dechter and Robert Mateescu. And/or search spaces for graphical models. Artificial intelligence, 171(2):73–106, 2007. [7] Michael R. Genesereth and Eric Kao. Introduction to Logic, Second Edition. Morgan & Claypool Publishers, 2013. [8] Vibhav Gogate and Pedro Domingos. Exploiting logical structure in lifted probabilistic inference. In Statistical Relational Artificial Intelligence, 2010. [9] Vibhav Gogate and Pedro Domingos. Probabilistic theorem proving. In Proceedings of the Twenty-Seventh Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI11), pages 256–265, Corvallis, Oregon, 2011. AUAI Press. [10] Vibhav Gogate, Abhay Kumar Jha, and Deepak Venugopal. Advances in lifted importance sampling. In AAAI, 2012. [11] Abhay Jha, Vibhav Gogate, Alexandra Meliou, and Dan Suciu. Lifted inference seen from the other side: The tractable features. In Advances in Neural Information Processing Systems, pages 973–981, 2010. [12] Brian Milch, Bhaskara Marthi, Stuart Russell, David Sontag, Daniel L Ong, and Andrey Kolobov. Blog: Probabilistic models with unknown objects. Statistical relational learning, page 373, 2007. [13] M. Niepert. Lifted probabilistic inference: An MCMC perspective. In UAI 2012 Workshop on Statistical Relational Artificial Intelligence, 2012. [14] M. Niepert. Symmetry-aware marginal density estimation. In Twenty-Seventh AAAI Conference on Artificial Intelligence, pages 725–731, 2013. [15] David Poole. First-order probabilistic inference. In IJCAI, volume 3, pages 985–991. Citeseer, 2003. [16] David Poole, Fahiem Bacchus, and Jacek Kisynski. Towards completely lifted search-based probabilistic inference. arXiv preprint arXiv:1107.4035, 2011. [17] Matthew Richardson and Pedro Domingos. Markov logic networks. Machine learning, 62(12):107–136, 2006. [18] T. Sang, P. Beame, and H. Kautz. Solving Bayesian networks by weighted model counting. In Proceedings of the Twentieth National Conference on Artificial Intelligence, pages 475–482, 2005. [19] Dan Suciu, Abhay Jha, Vibhav Gogate, and Alexandra Meliou. Lifted inference seen from the other side: The tractable features. In NIPS, 2010. [20] Nima Taghipour, Jesse Davis, and Hendrik Blockeel. First-order decomposition trees. In Advances in Neural Information Processing Systems, pages 1052–1060, 2013. [21] Guy Van den Broeck, Nima Taghipour, Wannes Meert, Jesse Davis, and Luc De Raedt. Lifted probabilistic inference by first-order knowledge compilation. In Proceedings of the TwentySecond international joint conference on Artificial Intelligence-Volume Volume Three, pages 2178–2185. AAAI Press, 2011. [22] Deepak Venugopal and Vibhav Gogate. On lifting the gibbs sampling algorithm. In Advances in Neural Information Processing Systems, pages 1655–1663, 2012. 9 | 2015 | 344 |
5,863 | Mixed Robust/Average Submodular Partitioning: Fast Algorithms, Guarantees, and Applications Kai Wei1 Rishabh Iyer1 Shengjie Wang2 Wenruo Bai1 Jeff Bilmes1 1 Department of Electrical Engineering, University of Washington 2 Department of Computer Science, University of Washington {kaiwei, rkiyer, wangsj, wrbai, bilmes}@u.washington.edu Abstract We investigate two novel mixed robust/average-case submodular data partitioning problems that we collectively call Submodular Partitioning. These problems generalize purely robust instances of the problem, namely max-min submodular fair allocation (SFA) [12] and min-max submodular load balancing (SLB) [25], and also average-case instances, that is the submodular welfare problem (SWP) [26] and submodular multiway partition (SMP) [5]. While the robust versions have been studied in the theory community [11, 12, 16, 25, 26], existing work has focused on tight approximation guarantees, and the resultant algorithms are not generally scalable to large real-world applications. This is in contrast to the average case, where most of the algorithms are scalable. In the present paper, we bridge this gap, by proposing several new algorithms (including greedy, majorization-minimization, minorization-maximization, and relaxation algorithms) that not only scale to large datasets but that also achieve theoretical approximation guarantees comparable to the state-of-the-art. We moreover provide new scalable algorithms that apply to additive combinations of the robust and average-case objectives. We show that these problems have many applications in machine learning (ML), including data partitioning and load balancing for distributed ML, data clustering, and image segmentation. We empirically demonstrate the efficacy of our algorithms on real-world problems involving data partitioning for distributed optimization (of convex and deep neural network objectives), and also purely unsupervised image segmentation. 1 Introduction The problem of data partitioning is of great importance to many machine learning (ML) and data science applications as is evidenced by the wealth of clustering procedures that have been and continue to be developed and used. Most data partitioning problems are based on expected, or average-case, utility objectives where the goal is to optimize a sum of cluster costs, and this includes the ubiquitous k-means procedure [1]. Other algorithms are based on robust objective functions [10], where the goal is to optimize the worst-case cluster cost. Such robust algorithms are particularly important in mission critical applications, such as parallel and distributed computing, where one single poor partition block can significantly slow down an entire parallel machine (as all compute nodes might need to spin while waiting for a slow node to complete a round of computation). Taking a weighted combination of both robust and average case objective functions allows one to balance between optimizing worst-case and overall performance. We are unaware, however, of any previous work that allows for a mixing between worst- and average-case objectives in the context of data partitioning. This paper studies two new mixed robust/average-case partitioning problems of the following form: 1 Prob. 1: max π∈Π h ¯λ min i fi(Aπ i ) + λ m m X j=1 fj(Aπ j ) i , Prob. 2: min π∈Π h ¯λ max i fi(Aπ i ) + λ m m X j=1 fj(Aπ j ) i , where 0 ≤λ ≤1, ¯λ ≜1 −λ, the set of sets π = (Aπ 1, Aπ 2, · · · , Aπ m) is a partition of a finite set V (i.e, ∪iAπ i = V and ∀i ̸= j, Aπ i ∩Aπ j = ∅), and Π refers to the set of all partitions of V into m blocks. The parameter λ controls the objective: λ = 1 is the average case, λ = 0 is the robust case, and 0 < λ < 1 is a mixed case. In general, Problems 1 and 2 are hopelessly intractable, even to approximate, but we assume that the f1, f2, · · · , fm are all monotone nondecreasing (i.e., fi(S) ≤fi(T) whenever S ⊆T), normalized (fi(∅) = 0), and submodular [9] (i.e., ∀S, T ⊆V , fi(S) + fi(T) ≥fi(S ∪T) + fi(S ∩T)). These assumptions allow us to develop fast, simple, and scalable algorithms that have approximation guarantees, as is done in this paper. These assumptions, moreover, allow us to retain the naturalness and applicability of Problems 1 and 2 to a wide variety of practical problems. Submodularity is a natural property in many real-world ML applications [20, 15, 18, 27]. When minimizing, submodularity naturally model notions of interacting costs and complexity, while when maximizing it readily models notions of diversity, summarization quality, and information. Hence, Problem 1 asks for a partition whose blocks each (and that collectively) are a good, say, summary of the whole. Problem 2 on the other hand, asks for a partition whose blocks each (and that collectively) are internally homogeneous (as is typical in clustering). Taken together, we call Problems 1 and 2 Submodular Partitioning. We further categorize these problems depending on if the fi’s are identical to each other (homogeneous) or not (heterogeneous).1 The heterogeneous case clearly generalizes the homogeneous setting, but as we will see, the additional homogeneous structure can be exploited to provide more efficient and/or tighter algorithms. Problem 1 (Max-(Min+Avg)) Problem 2 (Min-(Max+Avg)) Approximation factor Approximation factor λ = 0, BINSRCH [16] 1/(2m −1) λ = 0, BALANCED† [25] min{m, n/m} λ = 0, MATCHING [12] 1/(n −m + 1) λ = 0, SAMPLING [25] O(√n log n) λ = 0, ELLIPSOID [11] O(√nm 1 4 log n log 3 2 m) λ = 0, ELLIPSOID [11] O(√n log n) λ = 1, GREEDWELFARE [8] 1/2 λ = 1, GREEDSPLIT† [29, 22] 2 λ = 0, GREEDSAT∗ (1/2 −δ, δ 1/2+δ ) λ = 1, RELAX [5] O(log n) λ = 0, MMAX∗ O(min i 1 |Aˆπ i |√m log3 m ) λ = 0, MMIN∗ 2max i |Aπ∗ i | λ = 0, GREEDMAX†∗ 1/m λ = 0, LOV ´ASZROUND∗ m 0 < λ < 1, COMBSFASWP∗ max{ βα ¯λβ+α , λβ} 0 < λ < 1, COMBSLBSMP∗ min{ mα m¯λ+λ , β(m¯λ + λ)} 0 < λ < 1, GENERALGREEDSAT∗ λ/2 0 < λ < 1, GENERALLOV ´ASZROUND∗ m λ = 0, Hardness 1/2 [12] λ = 0, Hardness∗ m λ = 1, Hardness 1 −1/e [26] λ = 1, Hardness 2 −2/m [7] Table 1: Summary of our contributions and existing work on Problems 1 and 2.2 See text for details. Previous work: Special cases of Problems 1 and 2 have appeared previously. Problem 1 with λ = 0 is called submodular fair allocation (SFA), and Problem 2 with λ = 0 is called submodular load balancing (SLB), robust optimization problems both of which previously have been studied. When fi’s are all modular, SLB is called minimum makespan scheduling. An LP relaxation algorithm provides a 2-approximation for the heterogeneous setting [19]. When the objectives are submodular, the problem becomes much harder. Even in the homogeneous setting, [25] show that the problem is information theoretically hard to approximate within o( p n/ log n). They provide a balanced partitioning algorithm yielding a factor of min{m, n/m} under the homogeneous setting. They also give a sampling-based algorithm achieving O( p n/ log n) for the homogeneous setting. However, the sampling-based algorithm is not practical and scalable since it involves solving, in the worst-case, O(n3 log n) instances of submodular function minimization each of which requires O(n5γ + n6) computation [23], where γ is the cost of a function valuation. Another approach approximates each submodular function by its ellipsoid approximation (again non-scalable) and reduces SLB to its modular version (minimum makespan scheduling) leading to an approximation factor of O(√n log n) [11]. SFA, on the other hand, has been studied mostly in the heterogeneous setting. When fi’s are all modular, the tightest algorithm, so far, is to iteratively round an LP solution achieving O(1/(√m log3 m)) approximation [2], whereas the problem is NP-hard to 1/2 + ϵ approximate for any ϵ > 0 [12]. When fi’s are submodular, [12] gives a matching-based algorithm with a factor 1/(n −m + 1) approximation that performs poorly when m ≪n. [16] proposes a binary search algorithm yielding an improved factor of 1/(2m−1). Similar to SLB, [11] applies the same ellipsoid 1Similar sub-categorizations have been called the “uniform” vs. the “non-uniform” case in the past [25, 11]. 2Results obtained in this paper are marked as ∗. Methods for only the homogeneous setting are marked as †. 2 approximation techniques leading to a factor of O(√nm1/4 log n log3/2 m). These approaches are theoretically interesting, but they do not scale to large problems. Problems 1 and 2, when λ = 1, have also been previously studied. Problem 2 becomes the submodular multiway partition (SMP) for which one can obtain a relaxation based 2-approximation [5] in the homogeneous case. In the heterogeneous case, the guarantee is O(log n) [6]. Similarly, [29, 22] propose a greedy splitting 2-approximation algorithm for the homogeneous setting. Problem 1 becomes the submodular welfare [26] for which a scalable greedy algorithm achieves a 1/2 approximation [8]. Unlike the worst case (λ = 0), many of the algorithms proposed for these problems are scalable. The general case (0 < λ < 1) of Problems 1 and 2 differs from either of these extreme cases since we wish both for a robust (worst-case) and average case partitioning, and controlling λ allows one to trade off between the two. As we shall see, the flexibility of a mixture can be more natural in certain applications. Applications: There are a number of applications of submodular partitioning in ML as outlined below. Some of these we evaluate in Section 4. Submodular functions naturally capture notions of interacting cooperative costs and homogeneity and thus are useful for clustering and image segmentation [22, 17]. While the average case instance has been used before, a more worst-case variant (i.e., Problem 2 with λ ≈0) is useful to produce balanced clusterings (i.e., the submodular valuations of all the blocks should be similar to each other). Problem 2 also addresses a problem in image segmentation, namely how to use only submodular functions (which are instances of pseudo-Boolean functions) for multi-label (i.e., non-Boolean) image segmentation. Problem 2 addresses this problem by allowing each segment j to have its own submodular function fj, and the objective measures the homogeneity fj(Aπ j ) of segment j based on the image pixels Aπ j assigned to it. Moreover, by combining the average case and the worst case objectives, one can achieve a tradeoff between the two. Empirically, we evaluate our algorithms on unsupervised image segmentation (Section 4) and find that it outperforms other clustering methods including k-means, k-medoids, spectral clustering, and graph cuts. Submodularity also accurately represents computational costs in distributed systems, as shown in [20]. In fact, [20] considers two separate problems: 1) text data partitioning for balancing memory demands; and 2) parameter partitioning for balancing communication costs. Both are treated by solving an instance of SLB (Problem 2, λ = 0) where memory costs are modeled using a set-cover submodular function and the communication costs are modeled using a modular (additive) function. Another important ML application, evaluated in Section 4, is distributed training of statistical models. As data set sizes grow, the need for statistical training procedures tolerant of the distributed data partitioning becomes more important. Existing schemes are often developed and performed assuming data samples are distributed in an arbitrary or random fashion. As an alternate strategy, if the data is intelligently partitioned such that each block of samples can itself lead to a good approximate solution, a consensus amongst the distributed results could be reached more quickly than when under a poor partitioning. Submodular functions can in fact express the value of a subset of training data for certain machine learning risk functions, e.g., [27]. Using these functions within Problem 1, one can expect a partitioning (by formulating the problem as an instance of Problem 1, λ ≈0) where each block is a good representative of the entire set, thereby achieving faster convergence in distributed settings. We demonstrate empirically, in Section 4, that this provides better results on several machine learning tasks, including the training of deep neural networks. Our Contributions: In contrast to Problems 1 and 2 in the average case (i.e., λ = 1), existing algorithms for the worst case (λ = 0) are not scalable. This paper closes this gap, by proposing three new classes of algorithmic frameworks to solve SFA and SLB: (1) greedy algorithms; (2) semigradient-based algorithms; and (3) a Lov´asz extension based relaxation algorithm. For SFA, when m = 2, we formulate the problem as non-monotone submodular maximization, which can be approximated up to a factor of 1/2 with O(n) function evaluations [4]. For general m, we give a simple and scalable greedy algorithm (GREEDMAX), and show a factor of 1/m in the homogeneous setting, improving the state-of-the-art factor of 1/(2m −1) under the heterogeneous setting [16]. For the heterogeneous setting, we propose a “saturate” greedy algorithm (GREEDSAT) that iteratively solves instances of submodular welfare problems. We show GREEDSAT has a bi-criterion guarantee of (1/2 −δ, δ/(1/2 + δ)), which ensures at least ⌈m(1/2 −δ)⌉blocks receive utility at least δ/(1/2 + δ)OPT for any 0 < δ < 1/2. For SLB, we first generalize the hardness result in [25] and show that it is hard to approximate better than m for any m = o( p n/ log n) even in the homogeneous setting. We then give a Lov´asz extension based relaxation algorithm (LOV ´ASZROUND) yielding a tight factor of m for the heterogeneous setting. As far as we know, this is the first algorithm achieving a factor of m for SLB in this setting. For both SFA and SLB, we also obtain more efficient 3 algorithms with bounded approximation factors, which we call majorization-minimization (MMIN) and minorization-maximization (MMAX). Next we show algorithms to handle Problems 1 and 2 with general 0 < λ < 1. We first give two simple and generic schemes (COMBSFASWP and COMBSLBSMP), both of which efficiently combines an algorithm for the worst-case problem (special case with λ = 0), and an algorithm for the average case (special case with λ = 1) to provide a guarantee interpolating between the two bounds. For Problem 1 we generalize GREEDSAT leading to GENERALGREEDSAT, whose guarantee smoothly interpolates in terms of λ between the bi-criterion factor by GREEDSAT in the case of λ = 0 and the constant factor of 1/2 by the greedy algorithm in the case of λ = 1. For Problem 2 we generalize LOV ´ASZROUND to obtain a relaxation algorithm (GENERALLOV ´ASZROUND) that achieves an m-approximation for general λ. The theoretical contributions and the existing work for Problems 1 and 2 are summarized in Table 1. Lastly, we demonstrate the efficacy of Problem 2 on unsupervised image segmentation, and the success of Problem 1 to distributed machine learning, including ADMM and neural network training. 2 Robust Submodular Partitioning (Problems 1 and 2 when λ = 0) Notation: we define f(j|S) ≜f(S ∪j) −f(S) as the gain of j ∈V in the context of S ⊆V . We assume w.l.o.g. that the ground set is V = {1, 2, · · · , n}. 2.1 Approximation Algorithms for SFA (Problem 1 with λ = 0) We first study approximation algorithms for SFA. When m = 2, the problem becomes maxA⊆V g(A) where g(A) = min{f1(A), f2(V \ A)} and is submodular thanks to Theorem 2.1. Theorem 2.1. If f1 and f2 are monotone submodular, min{f1(A), f2(V \ A)} is also submodular. Proofs for all theorems in this paper are given in [28]. The simple bi-directional randomized greedy algorithm [4] therefore approximates SFA with m = 2 to a factor of 1/2 matching the problem’s hardness. For general m, we approach SFA from the perspective of the greedy algorithms. In this work we introduce two variants of a greedy algorithm – GREEDMAX (Alg. 1) and GREEDSAT (Alg. 2), suited to the homogeneous and heterogeneous settings, respectively. GREEDMAX: The key idea of GREEDMAX (see Alg. 1) is to greedily add an item with the maximum marginal gain to the block whose current solution is minimum. Initializing {Ai}m i=1 with the empty sets, the greedy flavor also comes from that it incrementally grows the solution by greedily improving the overall objective mini=1,...,m fi(Ai) until {Ai}m i=1 forms a partition. Besides its simplicity, Theorem 2.2 offers the optimality guarantee. Theorem 2.2. GREEDMAX achieves a guarantee of 1/m under the homogeneous setting. By assuming the homogeneity of the fi’s, we obtain a very simple 1/m-approximation algorithm improving upon the state-of-the-art factor 1/(2m −1) [16]. Thanks to the lazy evaluation trick as described in [21], Line 5 in Alg. 1 need not to recompute the marginal gain for every item in each round, leading GREEDMAX to scale to large data sets. GREEDSAT: Though simple and effective in the homogeneous setting, GREEDMAX performs arbitrarily poorly under the heterogeneous setting. To this end we provide another algorithm – “Saturate” Greedy (GREEDSAT, see Alg. 2). The key idea of GREEDSAT is to relax SFA to a much simpler problem – Submodular Welfare (SWP), i.e., Problem 1 with λ = 0. Similar in flavor to the one proposed in [18] GREEDSAT defines an intermediate objective ¯F c(π) = Pm i=1 f c i (Aπ i ), where f c i (A) = 1 m min{fi(A), c} (Line 2). The parameter c controls the saturation in each block. f c i satisfies submodularity for each i. Unlike SFA, the combinatorial optimization problem maxπ∈Π ¯F c(π) (Line 6) is much easier and is an instance of SWP. In this work, we solve Line 6 by the efficient greedy algorithm as described in [8] with a factor 1/2. One can also use a more computationally expensive multi-linear relaxation algorithm as given in [26] to solve Line 6 with a tight factor α = (1−1/e). Setting the input argument α as the approximation factor for Line 6, the essential idea of GREEDSAT is to perform a binary search over the parameter c to find the largest c∗such that the returned solution ˆπc∗for the instance of SWP satisfies ¯F c∗(ˆπc∗) ≥αc∗. GREEDSAT terminates after solving O(log( mini fi(V ) ϵ )) instances of SWP. Theorem 2.3 gives a bi-criterion optimality guarantee. Theorem 2.3. Given ϵ > 0, 0 ≤α ≤1 and any 0 < δ < α, GREEDSAT finds a partition such that at least ⌈m(α −δ)⌉blocks receive utility at least δ 1−α+δ(maxπ∈Π mini fi(Aπ i ) −ϵ). 4 Algorithm 1: GREEDMAX 1: Input: f, m, V . 2: Let A1 =, . . . , = Am = ∅; R = V . 3: while R ̸= ∅do 4: j∗∈argminj f(Aj); 5: a∗∈argmaxa∈R f(a|Aj∗) 6: Aj∗←Aj∗∪{a∗}; R ←R \ a∗ 7: end while 8: Output {Ai}m i=1. Algorithm 2: GREEDSAT 1: Input: {fi}m i=1, m, V , α. 2: Let ¯F c(π) = 1 m Pm i=1 min{fi(Aπ i ), c}. 3: Let cmin = 0, cmax = mini fi(V ) 4: while cmax −cmin ≥ϵ do 5: c = 1 2 (cmax + cmin) 6: ˆπc ∈argmaxπ∈Π ¯F c(π) 7: if ¯F c(ˆπc) < αc then 8: cmax = c 9: else 10: cmin = c; ˆπ ←ˆπc 11: end if 12: end while 13: Output: ˆπ. Algorithm 3: LOV ´ASZROUND 1: Input: {fi}m i=1, { ˜fi}m i=1, m, V . 2: Solve for {x∗ i }m i=1 via convex relaxation. 3: Rounding: Let A1 =, . . . , = Am = ∅. 4: for j = 1, . . . , n do 5: ˆi ∈argmaxi x∗ i (j); Aˆi = Aˆi ∪j 6: end for 7: Output {Ai}m i=1. Algorithm 4: GREEDMIN 1: Input: f, m, V ; 2: Let A1 =, . . . , = Am = ∅; R = V . 3: while R ̸= ∅do 4: j∗∈argminj f(Aj) 5: a∗∈mina∈R f(a|Aj∗) 6: Aj∗←Aj∗∪a∗; R ←R \ a∗ 7: end while 8: Output {Ai}m i=1. Algorithm 5: MMIN 1: Input: {fi}m i=1, m, V , partition π0. 2: Let t = 0 3: repeat 4: for i = 1, . . . , m do 5: Pick a supergradient mi at Aπt i for fi. 6: end for 7: πt+1 ∈argminπ∈Π maxi mi(Aπ i ) 8: t = t + 1; 9: until πt = πt−1 10: Output: πt. Algorithm 6: MMAX 1: Input: {fi}m i=1, m, V , partition π0. 2: Let t = 0. 3: repeat 4: for i = 1, . . . , m do 5: Pick a subgradient hi at Aπt i for fi. 6: end for 7: πt+1 ∈argmaxπ∈Π mini hi(Aπ i ) 8: t = t + 1; 9: until πt = πt−1 10: Output: πt. For any 0 < δ < α Theorem 2.3 ensures that the top ⌈m(α −δ)⌉valued blocks in the partition returned by GREEDSAT are (δ/(1−α+δ)−ϵ)-optimal. δ controls the trade-off between the number of top valued blocks to bound and the performance guarantee attained for these blocks. The smaller δ is, the more top blocks are bounded, but with a weaker guarantee. We set the input argument α = 1/2 (or α = 1 −1/e) as the worst-case performance guarantee for solving SWP so that the above theoretical analysis follows. However, the worst-case is often achieved only by very contrived submodular functions. For the ones used in practice, the greedy algorithm often leads to near-optimal solution ([18] and our own observations). Setting α as the actual performance guarantee for SWP (often very close to 1) can improve the empirical bound, and we, in practice, typically set α = 1 to good effect. MMAX: Lastly, we introduce another algorithm for the heterogeneous setting, called minorizationmaximization (MMAX, see Alg. 6). Similar to the one proposed in [14], the idea is to iteratively maximize tight lower bounds of the submodular functions. Submodular functions have tight modular lower bounds, which are related to the subdifferential ∂f(Y ) of the submodular set function f at a set Y ⊆V [9]. Denote a subgradient at Y by hY ∈∂f(Y ), the extreme points of ∂f(Y ) may be computed via a greedy algorithm: Let σ be a permutation of V that assigns the elements in Y to the first |Y | positions (σ(i) ∈Y if and only if i ≤|Y |). Each such permutation defines a chain with elements Sσ 0 = ∅, Sσ i = {σ(1), σ(2), . . . , σ(i)}, and Sσ |Y | = Y . An extreme point hσ Y of ∂f(Y ) has each entry as hσ Y (σ(i)) = f(Sσ i ) −f(Sσ i−1). Defined as above, hσ Y forms a lower bound of f, tight at Y — i.e., hσ Y (X) = P j∈X hσ Y (j) ≤f(X), ∀X ⊆V and hσ Y (Y ) = f(Y ). The idea of MMAX is to consider a modular lower bound tight at the set corresponding to each block of a partition. In other words, at iteration t + 1, for each block i, we approximate fi with its modular lower bound tight at Aπt i and solve a modular version of Problem 1 (Line 7), which admits efficient approximation algorithms [2]. MMAX is initialized with a partition π0, which is obtained by solving Problem 1, where each fi is replaced with a simple modular function f ′ i(A) = P a∈A fi(a). The following worst-case bound holds: Theorem 2.4. MMAX achieves a worst-case guarantee of O(mini 1+(|Aˆπ i |−1)(1−κfi(Aˆπ i )) |Aˆπ i |√m log3 m ), where ˆπ = (Aˆπ 1, · · · , Aˆπ m) is the partition obtained by the algorithm, and κf(A) = 1−minv∈V f(v|A\v) f(v) ∈ [0, 1] is the curvature of a submodular function f at A ⊆V . 5 2.2 Approximation Algorithms for SLB (Problem 2 with λ = 0) We next investigate SLB, where existing hardness results [25] are o( p n/ log n), which is independent of m and implicitly assumes that m = Θ( p n/ log n). However, applications for SLB are often dependent on m with m ≪n. We hence offer hardness analysis in terms of m in the following. Theorem 2.5. For any ϵ > 0, SLB cannot be approximated to a factor of (1 −ϵ)m for any m = o( p n/ log n) with polynomial number of queries even under the homogeneous setting. For the rest of the paper, we assume m = o( p n/ log n) for SLB, unless stated otherwise. GREEDMIN: Theorem 2.5 implies that SLB is hard to approximate better than m. However, an arbitrary partition π ∈Π already achieves the best approximation factor of m that one can hope for under the homogeneous setting, since maxi f(Aπ i ) ≤f(V ) ≤P i f(Aπ′ i ) ≤m maxi f(Aπ′ i ) for any π′ ∈Π. In practice, one can still implement a greedy style heuristic, which we refer to as GREEDMIN (Alg. 4). Very similar to GREEDMAX, GREEDMIN only differs in Line 5, where the item with the smallest marginal gain is added. Since the functions are all monotone, any additions to a block can (if anything) only increase its value, so we choose to add to the minimum valuation block in Line 4 to attempt to keep the maximum valuation block from growing further. LOV ´ASZ ROUND: Next we consider the heterogeneous setting, for which we propose a tight algorithm – LOV ´ASZROUND (see Alg. 3). The algorithm proceeds as follows: (1) apply the Lov´asz extension of submodular functions to relax SLB to a convex program, which is exactly solved to a fractional solution (Line 2); (2) map the fractional solution to a partition using the θ-rounding technique as proposed in [13] (Line 3 - 6). The Lov´asz extension, which naturally connects a submodular function f with its convex relaxation ˜f, is defined as follows: given any x ∈[0, 1]n, we obtain a permutation σx by ordering its elements in non-increasing order, and thereby a chain of sets Sσx 0 ⊂, . . . , ⊂Sσx n with Sσx j = {σx(1), . . . , σx(j)} for j = 1, . . . , n. The Lov´asz extension ˜f for f is the weighted sum of the ordered entries of x: ˜f(x) = Pn j=1 x(σx(j))(f(Sσx j ) −f(Sσx j−1)). Given the convexity of the ˜fi’s , SLB is relaxed to the following convex program: min x1,...,xm∈[0,1]n max i ˜fi(xi), s.t m X i=1 xi(j) ≥1, for j = 1, . . . , n (1) Denoting the optimal solution for Eqn 1 as {x∗ 1, . . . , x∗ m}, the θ-rounding step simply maps each item j ∈V to a block ˆi such that ˆi ∈argmaxi x∗ i (j) . The bound for LOV ´ASZROUND is as follows: Theorem 2.6. LOV ´ASZROUND achieves a worst-case approximation factor m. We remark that, to the best of our knowledge, LOV ´ASZROUND is the first algorithm that is tight and that gives an approximation in terms of m for the heterogeneous setting. MMIN: Similar to MMAX for SFA, we propose Majorization-Minimization (MMIN, see Alg. 5) for SLB. Here, we iteratively choose modular upper bounds, which are defined via superdifferentials ∂f(Y ) of a submodular function [15] at Y . Moreover, there are specific supergradients [14] that define the following two modular upper bounds (when referring to either one, we use mf X): mf X,1(Y ) ≜f(X) − X j∈X\Y f(j|X\j) + X j∈Y \X f(j|∅), mf X,2(Y ) ≜f(X) − X j∈X\Y f(j|V \j) + X j∈Y \X f(j|X). Then mf X,1(Y ) ≥f(Y ) and mf X,2(Y ) ≥f(Y ), ∀Y ⊆V and mf X,1(X) = mf X,2(X) = f(X). At iteration t + 1, for each block i, MMIN replaces fi with a choice of its modular upper bound mi tight at Aπt i and solves a modular version of Problem 2 (Line 7), for which there exists an efficient LP relaxation based algorithm [19]. Similar to MMAX, the initial partition π0 is obtained by solving Problem 2, where each fi is substituted with f ′ i(A) = P a∈A fi(a). The following worst-case bound holds: Theorem 2.7. MMIN achieves a worst-case guarantee of (2 maxi |Aπ∗ i | 1+(|Aπ∗ i |−1)(1−κfi(Aπ∗ i ))), where π∗= (Aπ∗ 1 , · · · , Aπ∗ m ) denotes the optimal partition. 6 Number of iterations 5 10 15 20 25 30 35 Test accuracy (%) 79 80 81 82 83 84 85 86 5-Partition on 20newsgroup with ADMM Submodular partition Random partition Number of iterations 5 10 15 20 25 30 35 Test accuracy (%) 74 76 78 80 82 84 10-Partition on 20newsgroup with ADMM Submodular partition Adversarial partition Random partition (a)20Newsgroups Number of iterations 5 10 15 20 Test accuracy (%) 98.3 98.4 98.5 98.6 98.7 98.8 98.9 99 99.1 5-Partition on MNIST with Distributed NN Submodular partition Random partition Number of iterations 5 10 15 20 Test accuracy (%) 97.8 98 98.2 98.4 98.6 98.8 99 99.2 10-Partition on MNIST with Distributed NN Submodular partition Random partition (b) MNIST Number of iterations 5 10 15 20 25 30 35 40 45 50 55 Test accuracy (%) 15 20 25 30 35 40 45 50 30-Partition on TIMIT Submodular partition Random partition Number of iterations 5 10 15 20 25 30 35 40 45 50 55 Test accuracy (%) 10 15 20 25 30 35 40 45 50 40-Block Partition on TIMIT with Distributed NN Submodular partition Random partition (c) TIMIT Figure 1: Comparison between submodular and random partitions for distributed ML, including ADMM (Fig 1a) and distributed neural nets (Fig 1b) and (Fig 1c). For the box plots, the central mark is the median, the box edges are 25th and 75th percentiles, and the bars denote the best and worst cases. 3 General Submodular Partitioning (Problems 1 and 2 when 0 < λ < 1) In this section we study Problem 1 and Problem 2, in the most general case, i.e., 0 < λ < 1. We first propose a simple and general “extremal combination” scheme that works both for problem 1 and 2. It naturally combines an algorithm for solving the worst-case problem (λ = 0) with an algorithm for solving the average case (λ = 1). We use Problem 1 as an example, but the same scheme easily works for Problem 2. Denote ALGWC as the algorithm for the worst-case problem (i.e. SFA), and ALGAC as the algorithm for the average case (i.e., SWP). The scheme is to first obtain a partition ˆπ1 by running ALGWC on the instance of Problem 1 with λ = 0 and a second partition ˆπ2 by running ALGAC with λ = 1. Then we output one of ˆπ1 and ˆπ2, with which the higher valuation for Problem 1 is achieved. We call this scheme COMBSFASWP. Suppose ALGWC solves the worst-case problem with a factor α ≤1 and ALGAC for the average case with β ≤1. When applied to Problem 2 we refer to this scheme as COMBSLBSMP (α ≥1 and β ≥1). The following guarantee holds for both schemes: Theorem 3.1. For any λ ∈(0, 1) COMBSFASWP solves Problem 1 with a factor max{ βα ¯λβ+α, λβ} in the heterogeneous case, and max{min{α, 1 m}, βα ¯λβ+α, λβ} in the homogeneous case. Similarly, COMBSLBSMP solves Problem 2 with a factor min{ mα m¯λ+λ, β(m¯λ + λ)} in the heterogeneous case, and min{m, mα m¯λ+λ, β(m¯λ + λ)} in the homogeneous case. The drawback of COMBSFASWP and COMBSLBSMP is that they do not explicitly exploit the tradeoff between the average-case and worst-case objectives in terms of λ. To obtain more practically interesting algorithms, we also give GENERALGREEDSAT that generalizes GREEDSAT to solve Problem 1. Similar to GREEDSAT we define an intermediate objective: ¯F c λ(π) = 1 m Pm i=1 min{¯λfi(Aπ i )+ λ 1 m Pm j=1 fj(Aπ j ), c} in GENERALGREEDSAT. Following the same algorithmic design as in GREEDSAT, GENERALGREEDSAT only differs from GREEDSAT in Line 6, where the submodular welfare problem is defined on the new objective ¯F c λ(π). In [28] we show that GENERALGREEDSAT gives λ/2 approximation, while also yielding a bi-criterion guarantee that generalizes Theorem 2.3. In particular GENERALGREEDSAT recovers the bicriterion guarantee as shown in Theorem 2.3 when λ = 0. In the case of λ = 1, GENERALGREEDSAT recovers the 1/2-approximation guarantee of the greedy algorithm for solving the submodular welfare problem, i.e., the average-case objective. Moreover an improved guarantee is achieved by GENERALGREEDSAT as λ increases. Details are given in [28]. To solve Problem 2 we generalize LOV ´ASZROUND leading to GENERALLOV ´ASZROUND. Similar to LOV ´ASZROUND we relax each submodular objective as its convex relaxation using the Lov´asz extension. Almost the same as LOV ´ASZROUND, GENERALLOV ´ASZROUND only differs in Line 2, where Problem 2 is relaxed as the following convex program: minx1,...,xm∈[0,1]n ¯λ maxi ˜fi(xi) + 7 λ 1 m Pm j=1 ˜fj(xj), s.t Pm i=1 xi(j) ≥1, for j = 1, . . . , n. Following the same rounding procedure as LOV ´ASZ ROUND, GENERALLOV ´ASZ ROUND is guaranteed to give an m-approximation for Problem 2 with general λ. Details are given in [28]. 4 Experiments and Conclusions We conclude in this section by empirically evaluating the algorithms proposed for Problems 1 and 2 on real-world data partitioning applications including distributed ADMM, distributed deep neural network training, and lastly unsupervised image segmentation tasks. ADMM: We first consider data partitioning for distributed convex optimization. The evaluation task is text categorization on the 20 Newsgroup data set, which consists of 18,774 articles divided almost evenly across 20 classes. We formulate the multi-class classification as an ℓ2 regularized logistic regression, which is solved by ADMM implemented as [3]. We run 10 instances of random partitioning on the training data as a baseline. In this case, we use the feature based function (same as the one used in [27]), in the homogeneous setting of Problem 1 (with λ = 0). We use GREEDMAX as the partitioning algorithm. In Figure 1a, we observe that the resulting partitioning performs much better than a random partitioning (and significantly better than an adversarial partitioning, formed by grouping similar items together). More details are given in [28]. Distributed Deep Neural Network (DNN) Training: Next we evaluate our framework on distributed deep neural network (DNN) training. We test on two tasks: 1) handwritten digit recognition on the MNIST database, which consists of 60,000 training and 10,000 test samples; 2) phone classification on the TIMIT data, which has 1,124,823 training and 112,487 test samples. A 4-layer DNN model is applied to the MNIST experiment, and we train a 5-layer DNN for TIMIT. For both experiments the submodular partitioning is obtained by solving the homogeneous case of Problem 1 (λ = 0) using GREEDMAX on a form of clustered facility location (as proposed and used in [27]). We perform distributed training using an averaging stochastic gradient descent scheme, similar to the one in [24]. We also run 10 instances of random partitioning as a baseline. As shown in Figure 1b and 1c, the submodular partitioning outperforms the random baseline. An adversarial partitioning, which is formed by grouping items with the same class, in either case, cannot even be trained. Original F-measure on all of GrabCut 1.0 0.810 0.823 0.854 0.870 Ground Truth k-means k-medoids Spectral Clustering 0.853 Graph Cut Submodular Partitioning Figure 2: Unsupervised image segmentation (right: some examples). Unsupervised Image Segmentation: We test the efficacy of Problem 2 on unsupervised image segmentation over the GrabCut data set (30 color images and their ground truth foreground/background labels). By “unsupervised”, we mean that no labeled data at any time in supervised or semi-supervised training, nor any kind of interactive segmentation, was used in forming or optimizing the objective. The submodular partitioning for each image is obtained by solving the homogeneous case of Problem 2 (λ = 0.8) using a modified variant of GREEDMIN on the facility location function. We compare our method against the other unsupervised methods k-means, k-medoids, spectral clustering, and graph cuts. Given an m-partition of an image and its ground truth labels, we assign each of the m blocks either to the foreground or background label having the larger intersection. In Fig. 2 we show example segmentation results after this mapping on several example images as well as averaged F-measure (relative to ground truth) over the whole data set. More details are given in [28]. Acknowledgments: This material is based upon work supported by the National Science Foundation under Grant No. IIS-1162606, the National Institutes of Health under award R01GM103544, and by a Google, a Microsoft, and an Intel research award. R. Iyer acknowledges support from a Microsoft Research Ph.D Fellowship. This work was supported in part by TerraSwarm, one of six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA. 8 References [1] D. Arthur and S. Vassilvitskii. k-means++: The advantages of careful seeding. In SODA, 2007. [2] A. Asadpour and A. Saberi. An approximation algorithm for max-min fair allocation of indivisible goods. In SICOMP, 2010. [3] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 2011. [4] N. Buchbinder, M. Feldman, J. Naor, and R. Schwartz. A tight linear time (1/2)-approximation for unconstrained submodular maximization. In FOCS, 2012. [5] C. Chekuri and A. Ene. Approximation algorithms for submodular multiway partition. In FOCS, 2011. [6] C. Chekuri and A. Ene. Submodular cost allocation problem and applications. In Automata, Languages and Programming, pages 354–366. Springer, 2011. [7] A. Ene, J. Vondr´ak, and Y. Wu. Local distribution and the symmetry gap: Approximability of multiway partitioning problems. In SODA, 2013. [8] M. Fisher, G. Nemhauser, and L. Wolsey. An analysis of approximations for maximizing submodular set functions—II. In Polyhedral combinatorics, 1978. [9] S. Fujishige. Submodular functions and optimization, volume 58. Elsevier, 2005. [10] L. A. Garc´ıa-Escudero, A. Gordaliza, C. Matr´an, and A. Mayo-Iscar. A review of robust clustering methods. Advances in Data Analysis and Classification, 4(2-3):89–109, 2010. [11] M. Goemans, N. Harvey, S. Iwata, and V. Mirrokni. Approximating submodular functions everywhere. In SODA, 2009. [12] D. Golovin. Max-min fair allocation of indivisible goods. Technical Report CMU-CS-05-144, 2005. [13] R. Iyer, S. Jegelka, and J. Bilmes. Monotone closure of relaxed constraints in submodular optimization: Connections between minimization and maximization: Extended version. [14] R. Iyer, S. Jegelka, and J. Bilmes. Fast semidifferential based submodular function optimization. In ICML, 2013. [15] S. Jegelka and J. Bilmes. Submodularity beyond submodular energies: coupling edges in graph cuts. In CVPR, 2011. [16] S. Khot and A. Ponnuswami. Approximation algorithms for the max-min allocation problem. In APPROX, 2007. [17] V. Kolmogorov and R. Zabin. What energy functions can be minimized via graph cuts? In TPAMI, 2004. [18] A. Krause, B. McMahan, C. Guestrin, and A. Gupta. Robust submodular observation selection. In JMLR, 2008. [19] J. K. Lenstra, D. B. Shmoys, and ´E. Tardos. Approximation algorithms for scheduling unrelated parallel machines. In Mathematical programming, 1990. [20] M. Li, D. Andersen, and A. Smola. Graph partitioning via parallel submodular approximation to accelerate distributed machine learning. In arXiv preprint arXiv:1505.04636, 2015. [21] M. Minoux. Accelerated greedy algorithms for maximizing submodular set functions. In Optimization Techniques, 1978. [22] M. Narasimhan, N. Jojic, and J. A. Bilmes. Q-clustering. In NIPS, 2005. [23] J. Orlin. A faster strongly polynomial time algorithm for submodular function minimization. Mathematical Programming, 2009. [24] D. Povey, X. Zhang, and S. Khudanpur. Parallel training of deep neural networks with natural gradient and parameter averaging. arXiv preprint arXiv:1410.7455, 2014. [25] Z. Svitkina and L. Fleischer. Submodular approximation: Sampling-based algorithms and lower bounds. In FOCS, 2008. [26] J. Vondr´ak. Optimal approximation for the submodular welfare problem in the value oracle model. In STOC, 2008. [27] K. Wei, R. Iyer, and J. Bilmes. Submodularity in data subset selection and active learning. In ICML, 2015. [28] K. Wei, R. Iyer, S. Wang, W. Bai, and J. Bilmes. Mixed robust/average submodular partitioning: Fast algorithms, guarantees, and applications: NIPS 2015 Extended Supplementary. [29] L. Zhao, H. Nagamochi, and T. Ibaraki. On generalized greedy splitting algorithms for multiway partition problems. Discrete applied mathematics, 143(1):130–143, 2004. 9 | 2015 | 345 |
5,864 | Gradient Estimation Using Stochastic Computation Graphs John Schulman1,2 joschu@eecs.berkeley.edu Nicolas Heess1 heess@google.com Theophane Weber1 theophane@google.com Pieter Abbeel2 pabbeel@eecs.berkeley.edu 1 Google DeepMind 2 University of California, Berkeley, EECS Department Abstract In a variety of problems originating in supervised, unsupervised, and reinforcement learning, the loss function is defined by an expectation over a collection of random variables, which might be part of a probabilistic model or the external world. Estimating the gradient of this loss function, using samples, lies at the core of gradient-based learning algorithms for these problems. We introduce the formalism of stochastic computation graphs—directed acyclic graphs that include both deterministic functions and conditional probability distributions—and describe how to easily and automatically derive an unbiased estimator of the loss function’s gradient. The resulting algorithm for computing the gradient estimator is a simple modification of the standard backpropagation algorithm. The generic scheme we propose unifies estimators derived in variety of prior work, along with variance-reduction techniques therein. It could assist researchers in developing intricate models involving a combination of stochastic and deterministic operations, enabling, for example, attention, memory, and control actions. 1 Introduction The great success of neural networks is due in part to the simplicity of the backpropagation algorithm, which allows one to efficiently compute the gradient of any loss function defined as a composition of differentiable functions. This simplicity has allowed researchers to search in the space of architectures for those that are both highly expressive and conducive to optimization; yielding, for example, convolutional neural networks in vision [12] and LSTMs for sequence data [9]. However, the backpropagation algorithm is only sufficient when the loss function is a deterministic, differentiable function of the parameter vector. A rich class of problems arising throughout machine learning requires optimizing loss functions that involve an expectation over random variables. Two broad categories of these problems are (1) likelihood maximization in probabilistic models with latent variables [17, 18], and (2) policy gradients in reinforcement learning [5, 23, 26]. Combining ideas from from those two perennial topics, recent models of attention [15] and memory [29] have used networks that involve a combination of stochastic and deterministic operations. In most of these problems, from probabilistic modeling to reinforcement learning, the loss functions and their gradients are intractable, as they involve either a sum over an exponential number of latent variable configurations, or high-dimensional integrals that have no analytic solution. Prior work (see Section 6) has provided problem-specific derivations of Monte-Carlo gradient estimators, however, to our knowledge, no previous work addresses the general case. Appendix C recalls several classic and recent techniques in variational inference [14, 10, 21] and reinforcement learning [23, 25, 15], where the loss functions can be straightforwardly described using 1 the formalism of stochastic computation graphs that we introduce. For these examples, the variancereduced gradient estimators derived in prior work are special cases of the results in Sections 3 and 4. The contributions of this work are as follows: • We introduce a formalism of stochastic computation graphs, and in this general setting, we derive unbiased estimators for the gradient of the expected loss. • We show how this estimator can be computed as the gradient of a certain differentiable function (which we call the surrogate loss), hence, it can be computed efficiently using the backpropagation algorithm. This observation enables a practitioner to write an efficient implementation using automatic differentiation software. • We describe variance reduction techniques that can be applied to the setting of stochastic computation graphs, generalizing prior work from reinforcement learning and variational inference. • We briefly describe how to generalize some other optimization techniques to this setting: majorization-minimization algorithms, by constructing an expression that bounds the loss function; and quasi-Newton / Hessian-free methods [13], by computing estimates of Hessian-vector products. The main practical result of this article is that to compute the gradient estimator, one just needs to make a simple modification to the backpropagation algorithm, where extra gradient signals are introduced at the stochastic nodes. Equivalently, the resulting algorithm is just the backpropagation algorithm, applied to the surrogate loss function, which has extra terms introduced at the stochastic nodes. The modified backpropagation algorithm is presented in Section 5. 2 Preliminaries 2.1 Gradient Estimators for a Single Random Variable This section will discuss computing the gradient of an expectation taken over a single random variable—the estimators described here will be the building blocks for more complex cases with multiple variables. Suppose that x is a random variable, f is a function (say, the cost), and we are interested in computing @ @✓Ex [f(x)]. There are a few different ways that the process for generating x could be parameterized in terms of ✓, which lead to different gradient estimators. • We might be given a parameterized probability distribution x ⇠p(·; ✓). In this case, we can use the score function (SF) estimator [3]: @ @✓Ex [f(x)] = Ex f(x) @ @✓log p(x; ✓) " . (1) This classic equation is derived as follows: @ @✓Ex [f(x)] = @ @✓ Z dx p(x; ✓)f(x) = Z dx @ @✓p(x; ✓)f(x) = Z dx p(x; ✓) @ @✓log p(x; ✓)f(x) = Ex f(x) @ @✓log p(x; ✓) " (2) This equation is valid if and only if p(x; ✓) is a continuous function of ✓; however, it does not need to be a continuous function of x [4]. • x may be a deterministic, differentiable function of ✓and another random variable z, i.e., we can write x(z, ✓). Then, we can use the pathwise derivative (PD) estimator, defined as follows. @ @✓Ez [f(x(z, ✓))] = Ez @ @✓f(x(z, ✓)) " . (3) This equation, which merely swaps the derivative and expectation, is valid if and only if f(x(z, ✓)) is a continuous function of ✓for all z [4]. 1 That is not true if, for example, f is a step function. 1 Note that for the pathwise derivative estimator, f(x(z, ✓)) merely needs to be a continuous function of ✓—it is sufficient that this function is almost-everywhere differentiable. A similar statement can be made about p(x; ✓) and the score function estimator. See Glasserman [4] for a detailed discussion of the technical requirements for these gradient estimators to be valid. 2 • Finally ✓might appear both in the probability distribution and inside the expectation, e.g., in @ @✓Ez⇠p(·; ✓) [f(x(z, ✓))]. Then the gradient estimator has two terms: @ @✓Ez⇠p(·; ✓) [f(x(z, ✓))] = Ez⇠p(·; ✓) @ @✓f(x(z, ✓)) + ✓@ @✓log p(z; ✓) ◆ f(x(z, ✓)) " . (4) This formula can be derived by writing the expectation as an integral and differentiating, as in Equation (2). In some cases, it is possible to reparameterize a probabilistic model—moving ✓from the distribution to inside the expectation or vice versa. See [3] for a general discussion, and see [10, 21] for a recent application of this idea to variational inference. The SF and PD estimators are applicable in different scenarios and have different properties. 1. SF is valid under more permissive mathematical conditions than PD. SF can be used if f is discontinuous, or if x is a discrete random variable. 2. SF only requires sample values f(x), whereas PD requires the derivatives f 0(x). In the context of control (reinforcement learning), SF can be used to obtain unbiased policy gradient estimators in the “model-free” setting where we have no model of the dynamics, we only have access to sample trajectories. 3. SF tends to have higher variance than PD, when both estimators are applicable (see for instance [3, 21]). The variance of SF increases (often linearly) with the dimensionality of the sampled variables. Hence, PD is usually preferable when x is high-dimensional. On the other hand, PD has high variance if the function f is rough, which occurs in many time-series problems due to an “exploding gradient problem” / “butterfly effect”. 4. PD allows for a deterministic limit, SF does not. This idea is exploited by the deterministic policy gradient algorithm [22]. Nomenclature. The methods of estimating gradients of expectations have been independently proposed in several different fields, which use differing terminology. What we call the score function estimator (via [3]) is alternatively called the likelihood ratio estimator [5] and REINFORCE [26]. We chose this term because the score function is a well-known object in statistics. What we call the pathwise derivative estimator (from the mathematical finance literature [4] and reinforcement learning [16]) is alternatively called infinitesimal perturbation analysis and stochastic backpropagation [21]. We chose this term because pathwise derivative is evocative of propagating a derivative through a sample path. 2.2 Stochastic Computation Graphs The results of this article will apply to stochastic computation graphs, which are defined as follows: Definition 1 (Stochastic Computation Graph). A directed, acyclic graph, with three types of nodes: 1. Input nodes, which are set externally, including the parameters we differentiate with respect to. 2. Deterministic nodes, which are functions of their parents. 3. Stochastic nodes, which are distributed conditionally on their parents. Each parent v of a non-input node w is connected to it by a directed edge (v, w). In the subsequent diagrams of this article, we will use circles to denote stochastic nodes and squares to denote deterministic nodes, as illustrated below. The structure of the graph fully specifies what estimator we will use: SF, PD, or a combination thereof. This graphical notation is shown below, along with the single-variable estimators from Section 2.1. 3 ✓ Input node Deterministic node Stochastic node ✓ x f Gives SF estimator ✓ z x f Gives PD estimator 2.3 Simple Examples Several simple examples that illustrate the stochastic computation graph formalism are shown below. The gradient estimators can be described by writing the expectations as integrals and differentiating, as with the simpler estimators from Section 2.1. However, they are also implied by the general results that we will present in Section 3. Stochastic Computation Graph Objective Gradient Estimator (1) ✓ x y f (2) ✓ x y f (3) ✓ x y f (4) ✓ x y f (5) ✓ x0 x1 x2 f1 f2 @x @✓ @ @x log p(y | x)f(y) @ @✓log p(x | ✓)f(y(x)) @ @✓log p(x | ✓)f(y) @ @✓log p(x | ✓)f(x, y(✓)) + @y @✓ @f @y @ @✓log p(x1 | ✓, x0)(f1(x1) + f2(x2)) + @ @✓log p(x2 | ✓, x1)f2(x2) Ey [f(y)] Ex [f(y(x))] Ex,y [f(y)] Ex [f(x, y(✓))] Ex1,x2 [f1(x1) + f2(x2)] Figure 1: Simple stochastic computation graphs These simple examples illustrate several important motifs, where stochastic and deterministic nodes are arranged in series or in parallel. For example, note that in (2) the derivative of y does not appear in the estimator, since the path from ✓to f is “blocked” by x. Similarly, in (3), p(y | x) does not appear (this type of behavior is particularly useful if we only have access to a simulator of a system, but not access to the actual likelihood function). On the other hand, (4) has a direct path from ✓to f, which contributes a term to the gradient estimator. (5) resembles a parameterized Markov reward process, and it illustrates that we’ll obtain score function terms of the form grad log-probability ⇥ future costs. x h1 h2 W1 W2 b1 b2 softmax y=label crossentropy loss The examples above all have one input ✓, but the formalism accommodates models with multiple inputs, for example a stochastic neural network with multiple layers of weights and biases, which may influence different subsets of the stochastic and cost nodes. See Appendix C for nontrivial examples with stochastic nodes and multiple inputs. The figure on the right shows a deterministic computation graph representing classification loss for a two-layer neural network, which has four parameters (W1, b1, W2, b2) (weights and biases). Of course, this deterministic computation graph is a special type of stochastic computation graph. 4 3 Main Results on Stochastic Computation Graphs 3.1 Gradient Estimators This section will consider a general stochastic computation graph, in which a certain set of nodes are designated as costs, and we would like to compute the gradient of the sum of costs with respect to some input node ✓. In brief, the main results of this section are as follows: 1. We derive a gradient estimator for an expected sum of costs in a stochastic computation graph. This estimator contains two parts (1) a score function part, which is a sum of terms grad logprob of variable ⇥sum of costs influenced by variable; and (2) a pathwise derivative term, that propagates the dependence through differentiable functions. 2. This gradient estimator can be computed efficiently by differentiating an appropriate “surrogate” objective function. Let ⇥denote the set of input nodes, D the set of deterministic nodes, and S the set of stochastic nodes. Further, we will designate a set of cost nodes C, which are scalar-valued and deterministic. (Note that there is no loss of generality in assuming that the costs are deterministic—if a cost is stochastic, we can simply append a deterministic node that applies the identity function to it.) We will use ✓to denote an input node (✓2 ⇥) that we differentiate with respect to. In the context of machine learning, we will usually be most concerned with differentiating with respect to a parameter vector (or tensor), however, the theory we present does not make any assumptions about what ✓ represents. Notation Glossary ⇥: Input nodes D: Deterministic nodes S: Stochastic nodes C: Cost nodes v ≺w: v influences w v ≺D w: v deterministically influences w DEPSv: “dependencies”, {w 2 ⇥[ S | w ≺D v} ˆQv: sum of cost nodes influenced by v. ˆv: denotes the sampled value of the node v. For the results that follow, we need to define the notion of “influence”, for which we will introduce two relations ≺and ≺D. The relation v ≺w (“v influences w”) means that there exists a sequence of nodes a1, a2, . . . , aK, with K ≥0, such that (v, a1), (a1, a2), . . . , (aK−1, aK), (aK, w) are edges in the graph. The relation v ≺D w (“v deterministically influences w”) is defined similarly, except that now we require that each ak is a deterministic node. For example, in Figure 1, diagram (5) above, ✓influences {x1, x2, f1, f2}, but it only deterministically influences {x1, x2}. Next, we will establish a condition that is sufficient for the existence of the gradient. Namely, we will stipulate that every edge (v, w) with w lying in the “influenced” set of ✓corresponds to a differentiable dependency: if w is deterministic, then the Jacobian @w @v must exist; if w is stochastic, then the probability mass function p(w | v, . . . ) must be differentiable with respect to v. More formally: Condition 1 (Differentiability Requirements). Given input node ✓2 ⇥, for all edges (v, w) which satisfy ✓≺D v and ✓≺D w, then the following condition holds: if w is deterministic, Jacobian @w @v exists, and if w is stochastic, then the derivative of the probability mass function @ @vp(w | PARENTSw) exists. Note that Condition 1 does not require that all the functions in the graph are differentiable. If the path from an input ✓to deterministic node v is blocked by stochastic nodes, then v may be a nondifferentiable function of its parents. If a path from input ✓to stochastic node v is blocked by other stochastic nodes, the likelihood of v given its parents need not be differentiable; in fact, it does not need to be known2. 2This fact is particularly important for reinforcement learning, allowing us to compute policy gradient estimates despite having a discontinuous dynamics function or reward function. 5 We need a few more definitions to state the main theorems. Let DEPSv := {w 2 ⇥[ S | w ≺D v}, the “dependencies” of node v, i.e., the set of nodes that deterministically influence it. Note the following: • If v 2 S, the probability mass function of v is a function of DEPSv, i.e., we can write p(v| DEPSv). • If v 2 D, v is a deterministic function of DEPSv, so we can write v(DEPSv). Let ˆQv := P c≻v, c2C ˆc, i.e., the sum of costs downstream of node v. These costs will be treated as constant, fixed to the values obtained during sampling. In general, we will use the hat symbol ˆv to denote a sample value of variable v, which will be treated as constant in the gradient formulae. Now we can write down a general expression for the gradient of the expected sum of costs in a stochastic computation graph: Theorem 1. Suppose that ✓2 ⇥satisfies Condition 1. Then the following two equivalent equations hold: @ @✓E "X c2C c # = E 2 664 X w2S, ✓≺Dw ✓@ @✓log p(w | DEPSw) ◆ ˆQw + X c2C ✓≺Dc @ @✓c(DEPSc) 3 775 (5) = E 2 664 X c2C ˆc X w≺c, ✓≺Dw @ @✓log p(w | DEPSw) + X c2C, ✓≺Dc @ @✓c(DEPSc) 3 775 (6) Proof: See Appendix A. The estimator expressions above have two terms. The first term is due to the influence of ✓on probability distributions. The second term is due to the influence of ✓on the cost variables through a chain of differentiable functions. The distribution term involves a sum of gradients times “downstream” costs. The first term in Equation (5) involves a sum of gradients times “downstream” costs, whereas the first term in Equation (6) has a sum of costs times “upstream” gradients. 3.2 Surrogate Loss Functions Surrogate Loss Computation Graph (1) ✓ x log p(y|x) ˆf (2) ✓ log p(x; ✓) ˆf (3) ✓ log p(x; ✓) ˆf (4) ✓ log p(x; ✓) ˆf y f (5) ✓ x0 log p(x1|x0; ✓) ( ˆf1 + ˆf2) log p(x2|x1; ✓) ˆf2 Figure 2: Deterministic computation graphs obtained as surrogate loss functions of stochastic computation graphs from Figure 1. The next corollary lets us write down a “surrogate” objective L, which is a function of the inputs that we can differentiate to obtain an unbiased gradient estimator. Corollary 1. Let L(⇥, S) := P w log p(w | DEPSw) ˆQw + P c2C c(DEPSc). Then differentiation of L gives us an unbiased gradient estimate: @ @✓E ⇥P c2C c ⇤ = E ⇥@ @✓L(⇥, S) ⇤ . One practical consequence of this result is that we can apply a standard automatic differentiation procedure to L to obtain an unbiased gradient estimator. In other words, we convert the stochastic computation graph into a deterministic computation graph, to which we can apply the backpropagation algorithm. There are several alternative ways to define the surrogate objective function that give the same gradient as L from Corollary 1. We could also write L(⇥, S) := P w p( ˆ w | DEPSw) ˆ Pv ˆQw+P c2C c(DEPSc), where ˆPw is the probability p(w|DEPSw) obtained during sampling, which is viewed as a constant. The surrogate objective from Corollary 1 is actually an upper bound on the true objective in the case that (1) all costs c 2 C are negative, (2) the the costs are not deterministically influenced by the parameters ⇥. This construction allows from majorization-minimization algorithms (similar to EM) to be applied to general stochastic computation graphs. See Appendix B for details. 6 3.3 Higher-Order Derivatives. The gradient estimator for a stochastic computation graph is itself a stochastic computation graph. Hence, it is possible to compute the gradient yet again (for each component of the gradient vector), and get an estimator of the Hessian. For most problems of interest, it is not efficient to compute this dense Hessian. On the other hand, one can also differentiate the gradient-vector product to get a Hessian-vector product—this computation is usually not much more expensive than the gradient computation itself. The Hessian-vector product can be used to implement a quasi-Newton algorithm via the conjugate gradient algorithm [28]. A variant of this technique, called Hessian-free optimization [13], has been used to train large neural networks. 4 Variance Reduction Consider estimating @ @✓Ex⇠p(·; ✓) [f(x)]. Clearly this expectation is unaffected by subtracting a constant b from the integrand, which gives @ @✓Ex⇠p(·; ✓) [f(x) −b]. Taking the score function estimator, we get @ @✓Ex⇠p(·; ✓) [f(x)] = Ex⇠p(·; ✓) ⇥@ @✓log p(x; ✓)(f(x) −b) ⇤ . Taking b = Ex [f(x)] generally leads to substantial variance reduction—b is often called a baseline3 (see [6] for a more thorough discussion of baselines and their variance reduction properties). We can make a general statement for the case of stochastic computation graphs—that we can add a baseline to every stochastic node, which depends all of the nodes it doesn’t influence. Let NONINFLUENCED(v) := {w | v ⌃w}. Theorem 2. @ @✓E "X c2C c # = E 2 64 X v2S v≻✓ ✓@ @✓log p(v | PARENTSv) ◆ ( ˆQv −b(NONINFLUENCED(v)) + X c2C⌫✓ @ @✓c 3 75 Proof: See Appendix A. 5 Algorithms As shown in Section 3, the gradient estimator can be obtained by differentiating a surrogate objective function L. Hence, this derivative can be computed by performing the backpropagation algorithm on L. That is likely to be the most practical and efficient method, and can be facilitated by automatic differentiation software. Algorithm 1 shows explicitly how to compute the gradient estimator in a backwards pass through the stochastic computation graph. The algorithm will recursively compute gv := @ @vE P c2C v≺c c " at every deterministic and input node v. 6 Related Work As discussed in Section 2, the score function and pathwise derivative estimators have been used in a variety of different fields, under different names. See [3] for a review of gradient estimation, mostly from the simulation optimization literature. Glasserman’s textbook provides an extensive treatment of various gradient estimators and Monte Carlo estimators in general. Griewank and Walther’s textbook [8] is a comprehensive reference on computation graphs and automatic differentiation (of deterministic programs.) The notation and nomenclature we use is inspired by Bayes nets and influence diagrams [19]. (In fact, a stochastic computation graph is a type of Bayes network; where the deterministic nodes correspond to degenerate probability distributions.) The topic of gradient estimation has drawn significant recent interest in machine learning. Gradients for networks with stochastic units was investigated in Bengio et al. [2], though they are concerned 3The optimal baseline for scalar ✓is in fact the weighted expectation Ex[f(x)s(x)2] Ex[s(x)2] where s(x) = @ @✓log p(x; ✓). 7 Algorithm 1 Compute Gradient Estimator for Stochastic Computation Graph for v 2 Graph do . Initialization at output nodes gv = ⇢1dim v if v 2 C 0dim v otherwise end for Compute ˆQw for all nodes w 2 Graph for v in REVERSETOPOLOGICALSORT(NONINPUTS) do . Reverse traversal for w 2 PARENTSv do if not ISSTOCHASTIC(w) then if ISSTOCHASTIC(v) then gw += ( @ @w log p(v | PARENTSv)) ˆQw else gw += ( @v @w)T gv end if end if end for end for return [g✓]✓2⇥ with differentiating through individual units and layers; not how to deal with arbitrarily structured models and loss functions. Kingma and Welling [11] consider a similar framework, although only with continuous latent variables, and point out that reparameterization can be used to to convert hierarchical Bayesian models into neural networks, which can then be trained by backpropagation. The score function method is used to perform variational inference in general models (in the context of probabilistic programming) in Wingate and Weber [27], and similarly in Ranganath et al. [20]; both papers mostly focus on mean-field approximations without amortized inference. It is used to train generative models using neural networks with discrete stochastic units in Mnih and Gregor [14] and Gregor et al. in [7]; both amortize inference by using an inference network. Generative models with continuous valued latent variables networks are trained (again using an inference network) with the reparametrization method by Rezende, Mohamed, and Wierstra [21] and by Kingma and Welling [10]. Rezende et al. also provide a detailed discussion of reparameterization, including a discussion comparing the variance of the SF and PD estimators. Bengio, Leonard, and Courville [2] have recently written a paper about gradient estimation in neural networks with stochastic units or non-differentiable activation functions—including Monte Carlo estimators and heuristic approximations. The notion that policy gradients can be computed in multiple ways was pointed out in early work on policy gradients by Williams [26]. However, all of this prior work deals with specific structures of the stochastic computation graph and does not address the general case. 7 Conclusion We have developed a framework for describing a computation with stochastic and deterministic operations, called a stochastic computation graph. Given a stochastic computation graph, we can automatically obtain a gradient estimator, given that the graph satisfies the appropriate conditions on differentiability of the functions at its nodes. The gradient can be computed efficiently in a backwards traversal through the graph: one approach is to apply the standard backpropagation algorithm to one of the surrogate loss functions from Section 3; another approach (which is roughly equivalent) is to apply a modified backpropagation procedure shown in Algorithm 1. The results we have presented are sufficiently general to automatically reproduce a variety of gradient estimators that have been derived in prior work in reinforcement learning and probabilistic modeling, as we show in Appendix C. We hope that this work will facilitate further development of interesting and expressive models. 8 Acknowledgements We would like to thank Shakir Mohamed, Dave Silver, Yuval Tassa, Andriy Mnih, and others at DeepMind for insightful comments. 8 References [1] J. Baxter and P. L. Bartlett. Infinite-horizon policy-gradient estimation. Journal of Artificial Intelligence Research, pages 319–350, 2001. [2] Y. Bengio, N. L´eonard, and A. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. [3] M. C. Fu. Gradient estimation. Handbooks in operations research and management science, 13:575–616, 2006. [4] P. Glasserman. Monte Carlo methods in financial engineering, volume 53. Springer Science & Business Media, 2003. [5] P. W. Glynn. Likelihood ratio gradient estimation for stochastic systems. Communications of the ACM, 33(10):75–84, 1990. [6] E. Greensmith, P. L. Bartlett, and J. Baxter. Variance reduction techniques for gradient estimates in reinforcement learning. The Journal of Machine Learning Research, 5:1471–1530, 2004. [7] K. Gregor, I. Danihelka, A. Mnih, C. Blundell, and D. Wierstra. Deep autoregressive networks. arXiv preprint arXiv:1310.8499, 2013. [8] A. Griewank and A. Walther. Evaluating derivatives: principles and techniques of algorithmic differentiation. Siam, 2008. [9] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [10] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. arXiv:1312.6114, 2013. [11] D. P. Kingma and M. Welling. Efficient gradient-based inference through transformations between bayes nets and neural nets. arXiv preprint arXiv:1402.0480, 2014. [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, 1998. [13] J. Martens. Deep learning via Hessian-free optimization. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 735–742, 2010. [14] A. Mnih and K. Gregor. Neural variational inference and learning in belief networks. arXiv:1402.0030, 2014. [15] V. Mnih, N. Heess, A. Graves, and K. Kavukcuoglu. Recurrent models of visual attention. In Advances in Neural Information Processing Systems, pages 2204–2212, 2014. [16] R. Munos. Policy gradient in continuous time. The Journal of Machine Learning Research, 7:771–791, 2006. [17] R. M. Neal. Learning stochastic feedforward networks. Department of Computer Science, University of Toronto, 1990. [18] R. M. Neal and G. E. Hinton. A view of the em algorithm that justifies incremental, sparse, and other variants. In Learning in graphical models, pages 355–368. Springer, 1998. [19] J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 2014. [20] R. Ranganath, S. Gerrish, and D. M. Blei. Black box variational inference. arXiv preprint arXiv:1401.0118, 2013. [21] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv:1401.4082, 2014. [22] D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller. Deterministic policy gradient algorithms. In ICML, 2014. [23] R. S. Sutton, D. A. McAllester, S. P. Singh, Y. Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pages 1057–1063. Citeseer, 1999. [24] N. Vlassis, M. Toussaint, G. Kontes, and S. Piperidis. Learning model-free robot control by a Monte Carlo EM algorithm. Autonomous Robots, 27(2):123–130, 2009. [25] D. Wierstra, A. F¨orster, J. Peters, and J. Schmidhuber. Recurrent policy gradients. Logic Journal of IGPL, 18(5):620–634, 2010. [26] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. [27] D. Wingate and T. Weber. Automated variational inference in probabilistic programming. arXiv preprint arXiv:1301.1299, 2013. [28] S. J. Wright and J. Nocedal. Numerical optimization, volume 2. Springer New York, 1999. [29] W. Zaremba and I. Sutskever. Reinforcement learning neural Turing machines. arXiv preprint arXiv:1505.00521, 2015. 9 | 2015 | 346 |
5,865 | Rectified Factor Networks Djork-Arn´e Clevert, Andreas Mayr, Thomas Unterthiner and Sepp Hochreiter Institute of Bioinformatics, Johannes Kepler University, Linz, Austria {okko,mayr,unterthiner,hochreit}@bioinf.jku.at Abstract We propose rectified factor networks (RFNs) to efficiently construct very sparse, non-linear, high-dimensional representations of the input. RFN models identify rare and small events in the input, have a low interference between code units, have a small reconstruction error, and explain the data covariance structure. RFN learning is a generalized alternating minimization algorithm derived from the posterior regularization method which enforces non-negative and normalized posterior means. We proof convergence and correctness of the RFN learning algorithm. On benchmarks, RFNs are compared to other unsupervised methods like autoencoders, RBMs, factor analysis, ICA, and PCA. In contrast to previous sparse coding methods, RFNs yield sparser codes, capture the data’s covariance structure more precisely, and have a significantly smaller reconstruction error. We test RFNs as pretraining technique for deep networks on different vision datasets, where RFNs were superior to RBMs and autoencoders. On gene expression data from two pharmaceutical drug discovery studies, RFNs detected small and rare gene modules that revealed highly relevant new biological insights which were so far missed by other unsupervised methods. RFN package for GPU/CPU is available at http://www.bioinf.jku.at/software/rfn. 1 Introduction The success of deep learning is to a large part based on advanced and efficient input representations [1, 2, 3, 4]. These representations are sparse and hierarchical. Sparse representations of the input are in general obtained by rectified linear units (ReLU) [5, 6] and dropout [7]. The key advantage of sparse representations is that dependencies between coding units are easy to model and to interpret. Most importantly, distinct concepts are much less likely to interfere in sparse representations. Using sparse representations, similarities of samples often break down to co-occurrences of features in these samples. In bioinformatics sparse codes excelled in biclustering of gene expression data [8] and in finding DNA sharing patterns between humans and Neanderthals [9]. Representations learned by ReLUs are not only sparse but also non-negative. Non-negative representations do not code the degree of absence of events or objects in the input. As the vast majority of events is supposed to be absent, to code for their degree of absence would introduce a high level of random fluctuations. We also aim for non-linear input representations to stack models for constructing hierarchical representations. Finally, the representations are supposed to have a large number of coding units to allow coding of rare and small events in the input. Rare events are only observed in few samples like seldom side effects in drug design, rare genotypes in genetics, or small customer groups in e-commerce. Small events affect only few input components like pathways with few genes in biology, few relevant mutations in oncology, or a pattern of few products in e-commerce. In summary, our goal is to construct input representations that (1) are sparse, (2) are non-negative, (3) are non-linear, (4) use many code units, and (5) model structures in the input data (see next paragraph). Current unsupervised deep learning approaches like autoencoders or restricted Boltzmann machines (RBMs) do encode all peculiarities in the data (including noise). Generative models can be design 1 to model specific structures in the data, but their codes cannot be enforced to be sparse and nonnegative. The input representation of a generative model is its posterior’s mean, median, or mode, which depends on the data. Therefore, sparseness and non-negativity cannot be guaranteed independent of the data. For example, generative models with rectified priors, like rectified factor analysis, have zero posterior probability for negative values, therefore their means are positive and not sparse [10, 11]. Sparse priors like Laplacian and Jeffrey’s do not guarantee sparse posteriors (see experiments in Tab. 1). To address the data dependence of the code, we employ the posterior regularization method [12]. This method separates model characteristics from data dependent characteristics that are enforced by constraints on the model’s posterior. We aim at representations that are feasible for many code units and massive datasets, therefore the computational complexity of generating a code is essential in our approach. For non-Gaussian priors, the computation of the posterior mean of a new input requires either to numerically solve an integral or to iteratively update variational parameters [13]. In contrast, for Gaussian priors the posterior mean is the product between the input and a matrix that is independent of the input. Still the posterior regularization method leads to a quadratic (in the number of coding units) constrained optimization problem in each E-step (see Eq. (3) below). To speed up computation, we do not solve the quadratic problem but perform a gradient step. To allow for stochastic gradients and fast GPU implementations, also the M-step is a gradient step. These E-step and M-step modifications of the posterior regularization method result in a generalized alternating minimization (GAM) algorithm [12]. We will show that the GAM algorithm used for RFN learning (i) converges and (ii) is correct. Correctness means that the RFN codes are non-negative, sparse, have a low reconstruction error, and explain the covariance structure of the data. 2 Rectified Factor Network Our goal is to construct representations of the input that (1) are sparse, (2) are non-negative, (3) are non-linear, (4) use many code units, and (5) model structures in the input. Structures in the input are identified by a generative model, where the model assumptions determine which input structures to explain by the model. We want to model the covariance structure of the input, therefore we choose maximum likelihood factor analysis as model. The constraints on the input representation are enforced by the posterior regularization method [12]. Non-negative constraints lead to sparse and non-linear codes, while normalization constraints scale the signal part of each hidden (code) unit. Normalizing constraints avoid that generative models explain away rare and small signals by noise. Explaining away becomes a serious problem for models with many coding units since their capacities are not utilized. Normalizing ensures that all hidden units are used but at the cost of coding also random and spurious signals. Spurious and true signals must be separated in a subsequent step either by supervised techniques, by evaluating coding units via additional data, or by domain experts. A generative model with hidden units h and data v is defined by its prior p(h) and its likelihood p(v | h). The full model distribution p(h, v) = p(v | h)p(h) can be expressed by the model’s posterior p(h | v) and its evidence (marginal likelihood) p(v): p(h, v) = p(h | v)p(v). The representation of input v is the posterior’s mean, median, or mode. The posterior regularization method introduces a variational distribution Q(h | v) ∈Q from a family Q, which approximates the posterior p(h | v). We choose Q to constrain the posterior means to be non-negative and normalized. The full model distribution p(h, v) contains all model assumptions and, thereby, defines which structures of the data are modeled. Q(h | v) contains data dependent constraints on the posterior, therefore on the code. For data {v} = {v1, . . . , vn}, the posterior regularization method maximizes the objective F [12]: F = 1 n n X i=1 log p(vi) −1 n n X i=1 DKL(Q(hi | vi) ∥p(hi | vi)) (1) = 1 n n X i=1 Z Q(hi | vi) log p(vi | hi) dhi −1 n n X i=1 DKL(Q(hi | vi) ∥p(hi)) , where DKL is the Kullback-Leibler distance. Maximizing F achieves two goals simultaneously: (1) extracting desired structures and information from the data as imposed by the generative model and (2) ensuring desired code properties via Q ∈Q. 2 ϵ2 ϵ1 W22 W11 v1 v2 h1 h3 h2 h4 Figure 1: Factor analysis model: hidden units (factors) h, visible units v, weight matrix W , noise ϵ. The factor analysis model v = W h + ϵ extracts the covariance structure of the data. The prior h ∼N (0, I) of the hidden units (factors) h ∈Rl and the noise ϵ ∼N (0, Ψ) of visible units (observations) v ∈Rm are independent. The model parameters are the weight (loading) matrix W ∈Rm×l and the noise covariance matrix Ψ ∈Rm×m. We assume diagonal Ψ to explain correlations between input components by the hidden units and not by correlated noise. The factor analysis model is depicted in Fig. 1. Given the mean-centered data {v} = {v1, . . . , vn}, the posterior p(hi | vi) is Gaussian with mean vector (µp)i and covariance matrix Σp: (µp)i = I + W T Ψ−1W −1 W T Ψ−1 vi , Σp = I + W T Ψ−1W −1 . (2) A rectified factor network (RFN) consists of a single or stacked factor analysis model(s) with constraints on the posterior. To incorporate the posterior constraints into the factor analysis model, we use the posterior regularization method that maximizes the objective F given in Eq. (1) [12]. Like the expectation-maximization (EM) algorithm, the posterior regularization method alternates between an E-step and an M-step. Minimizing the first DKL of Eq. (1) with respect to Q leads to a constrained optimization problem. For Gaussian distributions, the solution with (µp)i and Σp from Eq. (2) is Q(hi | vi) ∼N (µi, Σ) with Σ = Σp and the quadratic problem: min µi 1 n n X i=1 (µi −(µp)i)T Σ−1 p (µi −(µp)i) , s.t. ∀i : µi ≥0 , ∀j : 1 n n X i=1 µ2 ij = 1 , (3) where “≥” is component-wise. This is a constraint non-convex quadratic optimization problem in the number of hidden units which is too complex to be solved in each EM iteration. Therefore, we perform a step of the gradient projection algorithm [14, 15], which performs first a gradient step and then projects the result to the feasible set. We start by a step of the projected Newton method, then we try the gradient projection algorithm, thereafter the scaled gradient projection algorithm with reduced matrix [16] (see also [15]). If these methods fail to decrease the objective in Eq. (3), we use the generalized reduced method [17]. It solves each equality constraint for one variable and inserts it into the objective while ensuring convex constraints. Alternatively, we use Rosen’s gradient projection method [18] or its improvement [19]. These methods guarantee a decrease of the E-step objective. Since the projection P by Eq. (6) is very fast, the projected Newton and projected gradient update is very fast, too. A projected Newton step requires O(nl) steps (see Eq. (7) and P defined in Theorem 1), a projected gradient step requires O(min{nlm, nl2}) steps, and a scaled gradient projection step requires O(nl3) steps. The RFN complexity per iteration is O(n(m2 + l2)) (see Alg. 1). In contrast, a quadratic program solver typically requires for the (nl) variables (the means of the hidden units for all samples) O(n4l4) steps to find the minimum [20]. We exemplify these values on our benchmark datasets MNIST (n = 50k, l = 1024, m = 784) and CIFAR (n = 50k, l = 2048, m = 1024). The speedup with projected Newton or projected gradient in contrast to a quadratic solver is O(n3l2) = O(n4l4)/O(nl2), which gives speedup ratios of 1.3 · 1020 for MNIST and 5.2 · 1020 for CIFAR. These speedup ratios show that efficient E-step updates are essential for RFN learning. Furthermore, on our computers, RAM restrictions limited quadratic program solvers to problems with nl ≤20k. Running times of RFNs with the Newton step and a quadratic program solver are given in the supplementary Section 15. The M-step decreases the expected reconstruction error E = −1 n n X i=1 Z Rl Q(hi | vi) log (p(vi | hi)) dhi (4) = 1 2 m log (2π) + log |Ψ| + Tr Ψ−1C −2 Tr Ψ−1W U T + Tr W T Ψ−1W S . from Eq. (1) with respect to the model parameters W and Ψ. Definitions of C, U and S are given in Alg. 1. The M-step performs a gradient step in the Newton direction, since we want to 3 Algorithm 1 Rectified Factor Network. 1: C = 1 n Pn i=1 vivT i 2: while STOP=false do 3: ——E-step1—— 4: for all 1 ≤i ≤n do 5: (µp)i = I + W T Ψ−1W −1 W T Ψ−1vi 6: end for 7: Σ = Σp = I + W T Ψ−1W −1 8: ——Constraint Posterior—— 9: (1) projected Newton, (2) projected gradient, (3) scaled gradient projection, (4) generalized reduced method, (5) Rosen’s gradient project. 10: ——E-step2—— 11: U = 1 n Pn i=1 vi µT i 12: S = 1 n Pn i=1 µi µT i + Σ 13: ——M-step—— 14: E = C −U W T −W U + W S W T 15: W = W + η U S−1 −W 16: for all 1 ≤k ≤m do 17: Ψkk = Ψkk + η (Ekk −Ψkk) 18: end for 19: if stopping criterion is met: STOP=true 20: end while Complexity: objective F: O(min{nlm, nl2} + l3); E-step1: O(min{m2(m + l), l2(m + l)} + nlm); projected Newton: O(nl); projected gradient: O(min{nlm, nl2}); scaled gradient projection: O(nl3); Estep2: O(nl(m+l)); M-step: O(ml(m+l)); overall complexity with projected Newton / gradient for (l+m) < n: O(n(m2 + l2)). allow stochastic gradients, fast GPU implementation, and dropout regularization. The Newton step is derived in the supplementary which gives further details, too. Also in the E-step, RFN learning performs a gradient step using projected Newton or gradient projection methods. These projection methods require the Euclidean projection P of the posterior means {(µp)i} onto the non-convex feasible set: min µi 1 n n X i=1 (µi −(µp)i)T (µi −(µp)i) , s.t. µi ≥0 , 1 n n X i=1 µ2 ij = 1 . (5) The following Theorem 1 gives the Euclidean projection P as solution to Eq. (5). Theorem 1 (Euclidean Projection). If at least one (µp)ij is positive for 1 ≤j ≤l, then the solution to optimization problem Eq. (5) is µij = [P((µp)i)]j = ˆµij q 1 n Pn i=1 ˆµ2 ij , ˆµij = 0 for (µp)ij ≤0 (µp)ij for (µp)ij > 0 . (6) If all (µp)ij are non-positive for 1 ≤j ≤l, then the optimization problem Eq. (5) has the solution µij = √n for j = arg maxˆj{(µp)iˆj} and µij = 0 otherwise. Proof. See supplementary material. Using the projection P defined in Eq. (6), the E-step updates for the posterior means µi are: µnew i = P µold i + γ d −µold i , d = P µold i + λ H−1 Σ−1 p ((µp)i −µold i ) (7) where we set for the projected Newton method H−1 = Σp (thus H−1Σ−1 p = I), and for the projected gradient method H−1 = I. For the scaled gradient projection algorithm with reduced matrix, the ϵ-active set for i consists of all j with µij ≤ϵ. The reduced matrix H is the Hessian Σ−1 p with ϵ-active columns and rows j fixed to unit vectors ej. The resulting algorithm is a posterior regularization method with a gradient based E- and M-step, leading to a generalized alternating minimization (GAM) algorithm [21]. The RFN learning algorithm is given in Alg. 1. Dropout regularization can be included before E-step2 by randomly setting code units µij to zero with a predefined dropout rate (note that convergence results will no longer hold). 3 Convergence and Correctness of RFN Learning Convergence of RFN Learning. Theorem 2 states that Alg. 1 converges to a maximum of F. Theorem 2 (RFN Convergence). The rectified factor network (RFN) learning algorithm given in Alg. 1 is a “generalized alternating minimization” (GAM) algorithm and converges to a solution that maximizes the objective F. 4 Proof. We present a sketch of the proof which is given in detail in the supplement. For convergence, we show that Alg. 1 is a GAM algorithm which convergences according to Proposition 5 in [21]. Alg. 1 ensures to decrease the M-step objective which is convex in W and Ψ−1. The update with η = 1 leads to the minimum of the objective. Convexity of the objective guarantees a decrease in the M-step for 0 < η ≤1 if not in a minimum. Alg. 1 ensures to decrease the E-step objective by using gradient projection methods. All other requirements for GAM convergence are also fulfilled. Proposition 5 in [21] is based on Zangwill’s generalized convergence theorem, thus updates of the RFN algorithm are viewed as point-to-set mappings [22]. Therefore, the numerical precision, the choice of the methods in the E-step, and GPU implementations are covered by the proof. Correctness of RFN Learning. The goal of the RFN algorithm is to explain the data and its covariance structure. The expected approximation error E is defined in line 14 of Alg. 1. Theorem 3 states that the RFN algorithm is correct, that is, it explains the data (low reconstruction error) and captures the covariance structure as good as possible. Theorem 3 (RFN Correctness). The fixed point W of Alg. 1 minimizes Tr (Ψ) given µi and Σ by ridge regression with Tr (Ψ) = 1 n n X i=1 ∥ϵi∥2 2 +
W Σ1/2
2 F , (8) where ϵi = vi −W µi. The model explains the data covariance matrix by C = Ψ + W S W T (9) up to an error, which is quadratic in Ψ for Ψ ≪W W T . The reconstruction error 1 n Pn i=1 ∥ϵi∥2 2 is quadratic in Ψ for Ψ ≪W W T . Proof. The fixed point equation for the W update is ∆W = US−1 −W = 0 ⇒W = US−1. Using the definition of U and S, we have W = 1 n Pn i=1 vi µT i 1 n Pn i=1 µi µT i + Σ −1 . W is the ridge regression solution of 1 n n X i=1 ∥vi −W µi∥2 2 +
W Σ1/2
2 F = Tr 1 n n X i=1 ϵi ϵT i + W Σ W T ! , (10) where Tr is the trace. After multiplying out all ϵiϵT i in 1/n Pn i=1 ϵiϵT i , we obtain: E = 1 n n X i=1 ϵi ϵT i + W Σ W T . (11) For the fixed point of Ψ, the update rule gives: diag (Ψ) = diag 1 n Pn i=1 ϵiϵT i + W ΣW T . Thus, W minimizes Tr (Ψ) given µi and Σ. Multiplying the Woodbury identity for W W T + Ψ −1 from left and right by Ψ gives W ΣW T = Ψ −Ψ W W T + Ψ −1 Ψ. (12) Inserting this into the expression for diag (Ψ) and taking the trace gives Tr 1 n n X i=1 ϵi ϵT i ! = Tr Ψ W W T + Ψ −1 Ψ ≤Tr W W T + Ψ −1 Tr (Ψ)2 . (13) Therefore, for Ψ ≪W W T the error is quadratic in Ψ. W U T = W SW T = UW T follows from fixed point equation U = W S. Using this and Eq. (12), Eq. (11) is 1 n n X i=1 ϵi ϵT i −Ψ W W T + Ψ −1 Ψ = C −Ψ −W S W T . (14) Using the trace norm (nuclear norm or Ky-Fan n-norm) on matrices, Eq. (13) states that the left hand side of Eq. (14) is quadratic in Ψ for Ψ ≪W W T . The trace norm of a positive semi-definite matrix is its trace and bounds the Frobenius norm [23]. Thus, for Ψ ≪W W T , the covariance is approximated up to a quadratic error in Ψ according to Eq. (9). The diagonal is exactly modeled. 5 Since the minimization of the expected reconstruction error Tr (Ψ) is based on µi, the quality of reconstruction depends on the correlation between µi and vi. We ensure maximal information in µi on vi by the I-projection (the minimal Kullback-Leibler distance) of the posterior onto the family of rectified and normalized Gaussian distributions. 4 Experiments RFNs vs. Other Unsupervised Methods. We assess the performance of rectified factor networks (RFNs) as unsupervised methods for data representation. We compare (1) RFN: rectified factor networks, (2) RFNn: RFNs without normalization, (3) DAE: denoising autoencoders with ReLUs, (4) RBM: restricted Boltzmann machines with Gaussian visible units, (5) FAsp: factor analysis with Jeffrey’s prior (p(z) ∝1/z) on the hidden units which is sparser than a Laplace prior, (6) FAlap: factor analysis with Laplace prior on the hidden units, (7) ICA: independent component analysis by FastICA [24], (8) SFA: sparse factor analysis with a Laplace prior on the parameters, (9) FA: standard factor analysis, (10) PCA: principal component analysis. The number of components are fixed to 50, 100 and 150 for each method. We generated nine different benchmark datasets (D1 to D9), where each dataset consists of 100 instances. Each instance has 100 samples and 100 features resulting in a 100×100 matrix. Into these matrices, biclusters are implanted [8]. A bicluster is a pattern of particular features which is found in particular samples like a pathway activated in some samples. An optimal representation will only code the biclusters that are present in a sample. The datasets have different noise levels and different bicluster sizes. Large biclusters have 20–30 samples and 20–30 features, while small biclusters 3–8 samples and 3–8 features. The pattern’s signal strength in a particular sample was randomly chosen according to the Gaussian N (1, 1). Finally, to each matrix, zero-mean Gaussian background noise was added with standard deviation 1, 5, or 10. The datasets are characterized by Dx=(σ, n1, n2) with background noise σ, number of large biclusters n1, and the number of small biclusters n2: D1=(1,10,10), D2=(5,10,10), D3=(10,10,10), D4=(1,15,5), D5=(5,15,5), D6=(10,15,5), D7=(1,5,15), D8=(5,5,15), D9=(10,5,15). We evaluated the methods according to the (1) sparseness of the components, the (2) input reconstruction error from the code, and the (3) covariance reconstruction error for generative models. For RFNs sparseness is the percentage of the components that are exactly 0, while for others methods it is the percentage of components with an absolute value smaller than 0.01. The reconstruction error is the sum of the squared errors across samples. The covariance reconstruction error is the Frobenius norm of the difference between model and data covariance. See supplement for more details on the data and for information on hyperparameter selection for the different methods. Tab. 1 gives averaged results for models with 50 (undercomplete), 100 (complete) and 150 (overcomplete) coding units. Results are the mean of 900 instances consisting of 100 instances for each dataset D1 to D9. In the supplement, we separately tabulate the results for D1 to D9 and confirm them with different noise levels. FAlap did not yield sparse codes since the variational parameter did not Table 1: Comparison of RFN with other unsupervised methods, where the upper part contains methods that yielded sparse codes. Criteria: sparseness of the code (SP), reconstruction error (ER), difference between data and model covariance (CO). The panels give the results for models with 50, 100 and 150 coding units. Results are the mean of 900 instances, 100 instances for each dataset D1 to D9 (maximal value: 999). RFNs had the sparsest code, the lowest reconstruction error, and the lowest covariance approximation error of all methods that yielded sparse representations (SP>10%). undercomplete 50 code units complete 100 code units overcomplete 150 code units SP ER CO SP ER CO SP ER CO RFN 75±0 249±3 108±3 81±1 68±9 26±6 85±1 17±6 7±6 RFNn 74±0 295±4 140±4 79±0 185±5 59±3 80±0 142±4 35±2 DAE 66±0 251±3 — 69±0 147±2 — 71±0 130±2 — RBM 15±1 310±4 — 7±1 287±4 — 5±0 286±4 — FAsp 40±1 999±63 999±99 63±0 999±65 999±99 80±0 999±65 999±99 FAlap 4±0 239±6 341±19 6±0 46±4 985±45 4±0 46±4 976±53 ICA 2±0 174±2 — 3±1 0±0 — 3±1 0±0 — SFA 1±0 218±5 94±3 1±0 16±1 114±5 1±0 16±1 285±7 FA 1±0 218±4 90±3 1±0 16±1 83±4 1±0 16±1 263±6 PCA 0±0 174±2 — 2±0 0±0 — 2±0 0±0 — 6 (a) MNIST digits (b) MNIST digits with random image background (c) MNIST digits with random noise background (d) convex and concave shapes (e) tall and wide rectangular (f) rectangular images on background images (g) CIFAR-10 images (best viewed in color) (h) NORB images Figure 2: Randomly selected filters trained on image datasets using an RFN with 1024 hidden units. RFNs learned stroke, local and global blob detectors. RFNs are robust to background noise (b,c,f). push the absolute representations below the threshold of 0.01. The variational approximation to the Laplacian is a Gaussian [13]. RFNs had the sparsest code, the lowest reconstruction error, and the lowest covariance approximation error of all methods yielding sparse representations (SP>10%). RFN Pretraining for Deep Nets. We assess the performance of rectified factor networks (RFNs) if used for pretraining of deep networks. Stacked RFNs are obtained by first training a single layer RFN and then passing on the resulting representation as input for training the next RFN. The deep network architectures use a RFN pretrained first layer (RFN-1) or stacks of 3 RFNs giving a 3hidden layer network. The classification performance of deep networks with RFN pretrained layers was compared to (i) support vector machines, (ii) deep networks pretrained by stacking denoising autoencoders (SDAE), (iii) stacking regular autoencoders (SAE), (iv) restricted Boltzmann machines (RBM), and (v) stacking restricted Boltzmann machines (DBN). The benchmark datasets and results are taken from previous publications [25, 26, 27, 28] and contain: (i) MNIST (original MNIST), (ii) basic (a smaller subset of MNIST for training), (iii) bg-rand (MNIST with random noise background), (iv) bg-img (MNIST with random image background), (v) rect (tall or wide rectangles), (vi) rect-img (tall or wide rectangular images with random background images), (vii) convex (convex or concave shapes), (viii) CIFAR-10 (60k color images in 10 classes), and (ix) NORB (29,160 stereo image pairs of 5 categories). For each dataset its size of training, validation and test set is given in the second column of Tab. 2. As preprocessing we only performed median centering. Model selection is based on the validation set [26]. The RFNs hyperparameters are (i) the number of units per layer from {1024, 2048, 4096} and (ii) the dropout rate from {0.0, 0.25, 0.5, 0.75}. The learning rate was fixed to η = 0.01 (default value). For supervised fine-tuning with stochastic gradient descent, we selected the learning rate from {0.1, 0.01, 0.001}, the masking noise from {0.0, 0.25}, and the number of layers from {1, 3}. Fine-tuning was stopped based on the validation set, see [26]. Fig. 2 shows learned filters. Test error rates and the 95% Table 2: Results of deep networks pretrained by RFNs and other models (taken from [25, 26, 27, 28]). The test error rate is reported together with the 95% confidence interval. The best performing method is given in bold, as well as those for which confidence intervals overlap. The first column gives the dataset, the second the size of training, validation and test set, the last column indicates the number of hidden layers of the selected deep network. In only one case RFN pretraining was significantly worse than the best method but still the second best. In six out of the nine experiments RFN pretraining performed best, where in four cases it was significantly the best. Dataset SVM RBM DBN SAE SDAE RFN MNIST 50k-10k-10k 1.40±0.23 1.21±0.21 1.24±0.22 1.40±0.23 1.28±0.22 1.27±0.22 (1) basic 10k-2k-50k 3.03±0.15 3.94±0.17 3.11±0.15 3.46±0.16 2.84±0.15 2.66±0.14 (1) bg-rand 10k-2k-50k 14.58±0.31 9.80±0.26 6.73±0.22 11.28±0.28 10.30±0.27 7.94±0.24 (3) bg-img 10k-2k-50k 22.61±0.37 16.15±0.32 16.31±0.32 23.00±0.37 16.68±0.33 15.66±0.32 (1) rect 1k-0.2k-50k 2.15±0.13 4.71±0.19 2.60±0.14 2.41±0.13 1.99±0.12 0.63±0.06 (1) rect-img 10k-2k-50k 24.04±0.37 23.69±0.37 22.50±0.37 24.05±0.37 21.59±0.36 20.77±0.36 (1) convex 10k-2k-50k 19.13±0.34 19.92±0.35 18.63±0.34 18.41±0.34 19.06±0.34 16.41±0.32 (1) NORB 19k-5k-24k 11.6±0.40 8.31±0.35 10.10±0.38 9.50±0.37 7.00±0.32 (1) CIFAR 40k-10k-10k 62.7±0.95 40.39±0.96 43.38±0.97 43.25±0.97 41.29±0.95 (1) 7 A B E Micronuclei C D Figure 3: Examples of small and rare events identified by RFN in two drug design studies, which were missed by previous methods. Panel A and B: first row gives the coding unit, while the other rows display expression values of genes for controls (red), active drugs (green), and inactive drugs (black). Drugs (green) in panel A strongly downregulate the expression of tubulin genes which hints at a genotoxic effect by the formation of micronuclei (C). The micronuclei were confirmed by microscopic analysis (D). Drugs (green) in panel B show a transcriptional effect on genes with a negative feedback to the MAPK signaling pathway (E) and therefore are potential cancer drugs. confidence interval (computed according to [26]) for deep network pretraining by RFNs and other methods are given in Tab. 2. Best results and those with overlapping confidence intervals are given in bold. RFNs were only once significantly worse than the best method but still the second best. In six out of the nine experiments RFNs performed best, where in four cases it was significantly the best. Supplementary Section 14 shows results of RFN pretraining for convolutional networks, where RFN pretraining decreased the test error rates to 7.63% for CIFAR-10 and to 29.75% for CIFAR-100. RFNs in Drug Discovery. Using RFNs we analyzed gene expression datasets of two projects in the lead optimization phase of a big pharmaceutical company [29]. The first project aimed at finding novel antipsychotics that target PDE10A. The second project was an oncology study that focused on compounds inhibiting the FGF receptor. In both projects, the expression data was summarized by FARMS [30] and standardized. RFNs were trained with 500 hidden units, no masking noise, and a learning rate of η = 0.01. The identified transcriptional modules are shown in Fig. 3. Panels A and B illustrate that RFNs found rare and small events in the input. In panel A only a few drugs are genotoxic (rare event) by downregulating the expression of a small number of tubulin genes (small event). The genotoxic effect stems from the formation of micronuclei (panel C and D) since the mitotic spindle apparatus is impaired. Also in panel B, RFN identified a rare and small event which is a transcriptional module that has a negative feedback to the MAPK signaling pathway. Rare events are unexpectedly inactive drugs (black dots), which do not inhibit the FGF receptor. Both findings were not detected by other unsupervised methods, while they were highly relevant and supported decision-making in both projects [29]. 5 Conclusion We have introduced rectified factor networks (RFNs) for constructing very sparse and non-linear input representations with many coding units in a generative framework. Like factor analysis, RFN learning explains the data variance by its model parameters. The RFN learning algorithm is a posterior regularization method which enforces non-negative and normalized posterior means. We have shown that RFN learning is a generalized alternating minimization method which can be proved to converge and to be correct. RFNs had the sparsest code, the lowest reconstruction error, and the lowest covariance approximation error of all methods that yielded sparse representations (SP>10%). RFNs have shown that they improve performance if used for pretraining of deep networks. In two pharmaceutical drug discovery studies, RFNs detected small and rare gene modules that were so far missed by other unsupervised methods. These gene modules were highly relevant and supported the decision-making in both studies. RFNs are geared to large datasets, sparse coding, and many representational units, therefore they have high potential as unsupervised deep learning techniques. Acknowledgment. The Tesla K40 used for this research was donated by the NVIDIA Corporation. 8 References [1] G. E. Hinton and R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [2] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. In B. Sch¨olkopf, J. C. Platt, and T. Hoffman, editors, NIPS, pages 153–160. MIT Press, 2007. [3] J. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61:85–117, 2015. [4] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [5] V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In ICML, pages 807–814. Omnipress 2010, ISBN 978-1-60558-907-7, 2010. [6] X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In AISTATS, volume 15, pages 315–323, 2011. [7] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15:1929–1958, 2014. [8] S. Hochreiter, U. Bodenhofer, et al. FABIA: factor analysis for bicluster acquisition. Bioinformatics, 26(12):1520–1527, 2010. [9] S. Hochreiter. HapFABIA: Identification of very short segments of identity by descent characterized by rare variants in large sequencing data. Nucleic Acids Res., 41(22):e202, 2013. [10] B. J. Frey and G. E. Hinton. Variational learning in nonlinear Gaussian belief networks. Neural Computation, 11(1):193–214, 1999. [11] M. Harva and A. Kaban. Variational learning for rectified factor analysis. Signal Processing, 87(3):509– 527, 2007. [12] K. Ganchev, J. Graca, J. Gillenwater, and B. Taskar. Posterior regularization for structured latent variable models. Journal of Machine Learning Research, 11:2001–2049, 2010. [13] J. Palmer, D. Wipf, K. Kreutz-Delgado, and B. Rao. Variational EM algorithms for non-Gaussian latent variable models. In NIPS, volume 18, pages 1059–1066, 2006. [14] D. P. Bertsekas. On the Goldstein-Levitin-Polyak gradient projection method. IEEE Trans. Automat. Control, 21:174–184, 1976. [15] C. T. Kelley. Iterative Methods for Optimization. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, 1999. [16] D. P. Bertsekas. Projected Newton methods for optimization problems with simple constraints. SIAM J. Control Optim., 20:221–246, 1982. [17] J. Abadie and J. Carpentier. Optimization, chapter Generalization of the Wolfe Reduced Gradient Method to the Case of Nonlinear Constraints. Academic Press, 1969. [18] J. B. Rosen. The gradient projection method for nonlinear programming. part ii. nonlinear constraints. Journal of the Society for Industrial and Applied Mathematics, 9(4):514–532, 1961. [19] E. J. Haug and J. S. Arora. Applied optimal design. J. Wiley & Sons, New York, 1979. [20] A. Ben-Tal and A. Nemirovski. Interior Point Polynomial Time Methods for Linear Programming, Conic Quadratic Programming, and Semidefinite Programming, chapter 6, pages 377–442. Society for Industrial and Applied Mathematics, 2001. [21] A. Gunawardana and W. Byrne. Convergence theorems for generalized alternating minimization procedures. Journal of Machine Learning Research, 6:2049–2073, 2005. [22] W. I. Zangwill. Nonlinear Programming: A Unified Approach. Prentice Hall, Englewood Cliffs, N.J., 1969. [23] N. Srebro. Learning with Matrix Factorizations. PhD thesis, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 2004. [24] A. Hyv¨arinen and E. Oja. A fast fixed-point algorithm for independent component analysis. Neural Comput., 9(7):1483–1492, 1999. [25] Y. LeCun, F.-J. Huang, and L. Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE Press, 2004. [26] P. Vincent, H. Larochelle, et al. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. JMLR, 11:3371–3408, 2010. [27] H. Larochelle, D. Erhan, et al. An empirical evaluation of deep architectures on problems with many factors of variation. In ICML, pages 473–480, 2007. [28] A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, Deptartment of Computer Science, University of Toronto, 2009. [29] B. Verbist, G. Klambauer, et al. Using transcriptomics to guide lead optimization in drug discovery projects: Lessons learned from the {QSTAR} project. Drug Discovery Today, 20(5):505 – 513, 2015. [30] S. Hochreiter, D.-A. Clevert, and K. Obermayer. A new summarization method for Affymetrix probe level data. Bioinformatics, 22(8):943–949, 2006. 9 | 2015 | 347 |
5,866 | Adaptive Stochastic Optimization: From Sets to Paths Zhan Wei Lim David Hsu Wee Sun Lee Department of Computer Science, National University of Singapore {limzhanw,dyhsu,leews}@comp.nus.edu.sg Abstract Adaptive stochastic optimization (ASO) optimizes an objective function adaptively under uncertainty. It plays a crucial role in planning and learning under uncertainty, but is, unfortunately, computationally intractable in general. This paper introduces two conditions on the objective function, the marginal likelihood rate bound and the marginal likelihood bound, which, together with pointwise submodularity, enable efficient approximate solution of ASO. Several interesting classes of functions satisfy these conditions naturally, e.g., the version space reduction function for hypothesis learning. We describe Recursive Adaptive Coverage, a new ASO algorithm that exploits these conditions, and apply the algorithm to two robot planning tasks under uncertainty. In contrast to the earlier submodular optimization approach, our algorithm applies to ASO over both sets and paths. 1 Introduction A hallmark of an intelligent agent is to learn new information as the world unfolds and to improvise by fusing the new information with prior knowledge. Consider an autonomous unmanned aerial vehicle (UAV) searching for a victim lost in a jungle. The UAV acquires new information on the victim’s location by scanning the environment with noisy onboard sensors. How can the UAV plan and adapt its search strategy in order to find the victim as fast as possible? This is an example of stochastic optimization, in which an agent chooses a sequence of actions under uncertainty in order to optimize an objective function. In adaptive stochastic optimization (ASO), the agent’s action choices are conditioned on the outcomes of earlier choices. ASO plays a crucial role in planning and learning under uncertainty, but it is, unfortunately, computationally intractable in general [5]. Adaptive submodular optimization provides a powerful tool for approximate solution of ASO and has several important applications, such as sensor placement, active learning, etc. [5]. However, it has been so far restricted to optimization over a set domain: the agent chooses a subset out of a finite set of items. This is inadequate for the UAV search, as the agent’s consecutive choices are constrained to form a path. Our work applies to ASO over both sets and paths. Our work aims to identify subclasses of ASO and provide conditions that enable efficient nearoptimal solution. We introduce two conditions on the objective function, the marginal likelihood rate bound (MLRB) and the marginal likelihood bound (MLB). They enable efficient approximation of ASO with pointwise submodular objective functions, functions that satisfy a “diminishing return” property. MLRB is different from adaptive submodularity; we prove that adaptive submodularity does not imply MLRB and vice versa. While there exist functions that do not satisfy either the adaptive submodular or the MLRB condition, all pointwise submodular functions satisfy the MLB condition, albeit with different constants. We propose Recursive Adaptive Coverage (RAC), a polynomial-time approximation algorithm that guarantees near-optimal solution of ASO over either a set or a path domain, if the objective function satisfies the MLRB or the MLB condition and is pointwise monotone submodular. Since MLRB differs from adaptive submodularity, the new algorithm expands the set of problems that admit efficient approximate solutions, even for ASO over a set domain. We have evaluated RAC in simulation on two robot planning tasks under uncertainty and show that RAC performs well against several commonly used heuristic algorithms, including greedy algorithms that optimize information gain. 1 2 Related Work Submodular set function optimization encompasses many hard combinatorial optimization problems in operation research and decision making. Submodularity implies a diminishing return effect where adding an item to a smaller set is more beneficial than adding the same item to a bigger set. For example, adding a new temperature sensor when there are few sensors helps more in mapping temperature in a building than when there are already many sensors. Submodular functions can be efficiently approximated using a greedy heuristic [11]. Recent works have incorporated stochasticity to submodular optimization [1, 5] and generalized the problem from sets optimization to path optimization [2]. Our work builds on progress in submodular optimization on paths to solve the adaptive stochastic optimization problem on paths. Our RAC algorithm share a similar structure and analysis as the RAId algorithm in [10] that is used to solve adaptive informative path planning (IPP) problems without noise. In fact, noiseless adaptive IPP is a special case of adaptive stochastic optimization problems on paths that satisfies the marginal likelihood rate bound condition. We can derive the same approximation bound using the results in Section 6. Both works are inspired by the algorithm in [8] used to solve the Adaptive Traveling Salesperson (ATSP) problem. In the ATSP problem, a salesperson has to service a subset of locations with demand that is not known in advance. However, the salesperson knows the prior probabilities of the demand at each location (possibly correlated) and the goal is to find an adaptive policy to service all locations with demand. Adaptive submodularity [5] generalizes submodularity to stochastic settings and gives logarithmic approximation bounds using a greedy heuristic. It was also shown that no polynomial time algorithm can compute approximate solution of adaptive stochastic optimization problems within a factor of O(|X|1−✏) unless PH = Pp 2, that is the polynomial-time hierarchy collapses to its second level [5]. Many Bayesian active learning problems can be modeled by suitable adaptive submodular objective functions [6, 4, 3]. However, [3] recently proposed a new stochastic set function for active learning with a general loss function that is not adaptive monotone submodular. This new objective function satisfies the marginal likelihood bound with nontrivial constant G. Adaptive stochastic optimization is a special case of the Partially Observable Markov Decision Process (POMDP), a mathematical principled framework for reasoning under uncertainty [9]. Despite recent tremendous progress in offline [12] and online solvers [14, 13], most partially observable planning problems remain hard to solve. 3 Preliminaries We now describe the adaptive stochastic optimization problem and use the UAV search and rescue task to illustrate our definitions. Let X be the set of actions and let O be the set of observations. The agent operates in a world whose events are determined by a static state called the scenario, denoted as φ : X ! O. When the agent takes an action x 2 X, it receives an observation o = φ(x) 2 O that is determined by an initially unknown scenario φ. We denote a random scenario as Φ and use a prior distribution p(φ) := P[Φ = φ] over the scenarios to represent our prior knowledge of the world. For e.g., in the UAV task, the actions are flying to various locations, observations are the possible sensors’ readings, and a scenario is a victim’s position. When the UAV flies to a particular location x, it observes its sensors’ readings o that depends on actual victim’s position φ. Prior knowledge about the victim’s position can be encoded as a probability distribution over the possible victim’s positions. After taking actions x1, x2, . . . and receiving observations o1, o2, . . . after each action, the agent has a history = {(x1, o1), (x2, o2), . . . }. We say that a scenario φ is consistent with a history when the actions and corresponding observations of the history never contradict with the φ, i.e. φ(x) = o for all (x, o) 2 . We denote this by φ ⇠ . We can also say that a history 0 is consistent with another history if dom( 0) ⊃dom( ) and 0(x) = (x) for all x 2 dom( ), where dom( ) is the set of actions taken in . For example, a victim’s position φ has not been ruled out given the sensors readings at various locations when φ ⇠ . An agent’s goal can be characterized by a stochastic set function f : 2X ⇥OX ! R, which measures progress toward the goal given the actions taken and the true scenario. In this paper, we assume that f is pointwise monotone on finite domain. i.e., f(A, φ) f(B, φ) for any φ and for 2 all A ✓B ✓X. An agent achieves its goal and covers f when f has maximum value after taking actions S ✓X and given it is in scenario φ, i.e., f(S, φ) = f(X, φ). For example, the objective function can be the sum of prior probabilities of impossible victim’s positions given a history. The UAV finds the victim when all except the true victim’s position are impossible. An agent’s strategy for adaptively taking actions is a policy ⇡that maps a history to its next action. A policy terminates when there is no next action to take for a given history. We say that a policy ⇡ covers the function f when the agent executing ⇡always achieves its goal upon termination. That is, f(dom( ), φ) = f(X, φ) for all scenarios φ ⇠ , where is the history when the agent executes ⇡. For example, a policy ⇡tells the UAV where to fly to next given the locations visited and whether it has a positive sensor at those locations or not and it covers the objective function when the UAV executing it always find the victim. Formally, an adaptive stochastic optimization problem on paths consists of the tuple (X, d, p, O, r, f), the set of actions X is the set of locations the agent can visit, r is the starting location of the agent, and d is a metric that gives the distance between any pair of locations x, x0 2 X. The cost of the policy ⇡, C(⇡, φ), is the length of the path starting from location r traversed by the agent until the policy terminates, when presented with scenario φ, e.g., the distance traveled by UAV executing policy ⇡for a particular true victim position. We want to find a policy ⇡that minimizes the cost of traveling to cover the function. We formally state the problem: Problem 1. Given an adaptive stochastic optimization problem on paths I = (X, d, p, O, r, f), compute an adaptive policy that minimizes the expected cost C(⇡) = E[C(⇡, φ)] = X φ C(⇡, φ)p(φ). (1) subject to f(dom( ), φ0) = f(X, φ0), where is the history encountered when executing ⇡on φ0, for all φ’. Adaptive stochastic optimization problems on sets can be formally defined by a tuple, (X, c, p, O, f). The set of actions X is a set of items that an agent may select. Instead of a distance metric, the cost of selecting an item is defined by a cost function c : X ! R and the cost of a policy C(⇡, φ) = P x2S c(x), where S is the subset of items selected by ⇡when presented with scenario φ. 4 Classes of Functions This section introduces the classes of objective functions for adaptive stochastic optimization problems and gives the relationship between them. Given a finite set X and a function on subsets of X, f : 2X ! R, the function f is submodular if f(A) + f(B) ≥f(A [ B) + f(A \ B) for all A, B ✓X. Let f(S, φ) be a stochastic set function. If f(S, φ) is submodular for each fixed scenario φ 2 OX, then f is pointwise submodular. Adaptive submodularity and monotonicity generalize submodularity and monotonicity to stochastic settings where we receive random observations after selecting each item [6]. We define the expected marginal value of an item x given a history , 4(x| ) as: 4(x| ) = E [f(dom( ) [ {x}, Φ) −f(dom( ), Φ) | Φ ⇠ ] . A function f : 2X ⇥OX ! R is adaptive monotone with respect to a prior distribution p(φ) if , for all such that P[Φ ⇠ ] > 0 and all x 2 X, it holds that 4(x| ) ≥0. i.e. the expected marginal value of any fixed item is nonnegative. Function f is adaptive submodular with respect to a prior distribution p(φ) if, for all and 0 such that 0 ⇠ and for all x 2 X\dom( 0), it holds that 4(x| ) ≥4(x| 0). i.e. the expected marginal value of any fixed item does not increase as more items are selected. A function can be adaptive submodular with respect to a certain distribution p but not be pointwise submodular. However, it must be pointwise submodular if it is adaptive submodular with respect to all distributions. We denote ˆf(S, ) = minφ⇠ f(S, φ) as the worst case value of f given a history and p( ) := P[Φ ⇠ ] as the marginal likelihood of a history. The marginal likelihood rate bound (MLRB) condition requires a function f such that: For all 0 ⇠ , if p( 0) 0.5p( ) then , Q −ˆf(dom( 0), ) 1 K ⇣ Q −ˆf(dom( ), ) ⌘ , (2) except for scenarios already covered, where K > 1 and Q ≥maxφ f(X, φ) is a constant upper bound for the maximum value of f for all scenarios. 3 Intuitively, this condition means that the worst case remaining objective value decreases by a constant fraction whenever the marginal likelihood of history decreases by at least half. Example: The version space reduction function V with arbitrary prior is adaptive submodular and monotone [5]. Furthermore, it satisfies the MLRB. The version space reduction function V is defined as: V(S, φ) = 1 − X φ0⇠φ(S) p(φ0) (3) for all scenario φ, S ✓X and φ(S) gives the history of visiting locations x in S when the scenario is φ. The version space reduction function is often used for active learning, where the true hypothesis is identified once all the scenarios are covered. We present the proof that the version space reduction function satisfies the MLRB condition (and all other proofs) in the supplementary material. Proposition 1. The version space function V satisfies the MLRB with constants Q = 1 and K = 2. The following proposition teases apart the relationship between the MLRB condition and adaptive submodularity. Proposition 2. Adaptive submodularity does not imply the MLRB condition, and vice versa. The marginal likelihood bound (MLB) condition requires that there exists some constant G, such that for all , f(X, φ) −ˆf(dom( ), ) G · p( ). (4) In other words, the worst remaining objective value must be less than the marginal likelihood of its history multiplied by some constant G. Our quality of solution depends on the constant G. The smaller the constant G, the better the approximation bound. We can make any adaptive stochastic optimization problem satisfy the MLB with a large enough constant G. To trivially ensure the bound of MLB, we set G = Q · 1/δ, where δ = minφ p(φ). Hence, Q G · p( ) unless we have visited all locations and covered the function by definition. Example: The version space reduction function V can be interpreted as the expected 0 −1 loss of a random scenario φ0 ⇠ differing from true scenario φ. The loss is counted as one whenever φ0 6= φ. For example, a pair of scenarios that differ in observation at one location has the same loss of 1 as another pair that differs in all observations. Thus, it can be useful to assign different loss to different pair of scenarios with a general loss function. The generalized version space reduction function is defined as: fL(S, φ) = Eφ0 [L(φ, φ0)1(φ(S) 6= φ0(S))] , where 1(·) is an indicator function and L : OX ⇥OX ! R≥0 is a general loss function that satisfies L(φ0, φ) = L(φ, φ0) and L(φ, φ0) = 0 if φ = φ0. The generalized version space reduction function is not adaptive submodular [3] and does not satisfy the MLRB condition. However, it satisfies condition MLB with a non-trivial constant G. Proposition 3. The generalized version space reduction function fL satisfies MLB with G = maxφ,φ0 L(φ, φ0). 5 Algorithm Adaptive planning is computationally hard due to the need to consider every possible observation after each action. RAC assumes that it always receive the most likely observation to simplify adaptive planning. RAC is a recursive algorithm that partially covers the function in each step and repeats on the residual function until the entire function is covered. In each recursive step, RAC uses the mostly like observation assumption to transform adaptive stochastic optimization problem into a submodular orienteering problem to generate a tour and traverse it. If the assumption is true throughout the tour, then RAC achieves the required partial coverage. Otherwise, RAC receives some observation that has probability less than half (since only the most likely observation has probability at least half), the marginal likelihood of history decreases by at least half, and the MLRB and MLB conditions ensures that substantial progress is made towards covering the function. Submodular orienteering takes a submodular function g : X ! R and a metric on X and gives the minimum cost path ⌧that covers function g such that g(⌧) = g(X). We now describe the submodular orienteering problem used in each recursive step. Given the current history , we construct a restricted set of location-observation pairs, Z = {(x, o) : (x, o) /2 4 , o is the most likely observation at x given }. Using ideas from [7], we construct a submodular function g⇤ ⌫: 2Z ! R to be used in the submodular orienteering problem. Upon completion of the recursive step, we would like the function to be either covered or have value at least ⌫for all scenarios consistent with [Z0 where Z0 is the selected subset of Z. We first restrict φ to a subset of scenarios that are consistent with . To simplify, we transform the function so that its maximum value for all φ is at least ⌫by defining f⌫(S, φ) = f(S, φ) + (⌫−f(X, φ)) whenever f(X, φ) < ⌫ and f⌫(S, φ) = f(S, φ) otherwise. For Z0 ✓Z, we now define g⌫(Z0, φ) = f⌫(dom( [ Z0), φ) if Z0 is consistent with φ and g⌫(Z0, φ) = f⌫(X, φ) otherwise. Finally, we construct the submodular function g⇤ ⌫(Z0) = 1/| | P φ2 min(⌫, g⌫(Z0, φ)). The constructions have the following properties that guarantees the effectiveness of the recursive steps of RAC. Proposition 4. Let f be a pointwise monotone submodular function. Then g⌫is pointwise monotone submodular and g⇤ ⌫is monotone submodular. In addition g⇤ ⌫(Z0) ≥⌫if and only if f is either covered or have value at least ⌫for all scenarios consistent with [ Z0. We can replace g⇤ ⌫by a simpler function if f satisfies a minimal dependency property where the value of function f depends only on the history, i.e. f(dom( ), φ0) = f(dom( ), φ) for all φ, φ0 ⇠ . We define a new submodular set function gm ⌫(Z0) = g⌫(Z0, Z [ ). Proposition 5. When f satisfies minimal dependency, gm ⌫(Z0) ≥⌫implies g⇤ ⌫(Z0) ≥⌫. RAC needs to guard against committing to costly plan made under the most likely observation assumption which is bound to be wrong eventually. RAC uses two different mechanisms for hedging. For MLRB, instead of requiring complete coverage, we solve partial coverage using a submodular path optimization problem g⇤ (1−1/K)Q so that f(S) ≥(1−1/K)Q for all consistent scenarios under the most likely observation assumption in each recursive step. For MLB, we solve submodular orienteering for complete coverage of g⇤ Q but also solve for the version space reduction function with 0.5 as the target, V⇤ 0.5, as a hedge against over-commitment by the first tour when the function is not well aligned with the probability of observations. The cheaper tour is then traversed by RAC in each recursive step. We define the informative observation set ⌦x for every location x 2 X: ⌦x = { o | p(o|x) 0.5}. RAC traverses the tour and adaptively terminates when it encounters an informative observation. Subsequent recursive calls work on the residual function f 0 and normalized prior p0. Let be the history encountered so far just before the recursive call, for any set S ⊃dom( ) f 0(S, φ) = f(S, φ)−f(dom( ), φ). We assume that function f is integer-valued. The recursive step is repeated until the residual value Q0 = 0. We give the pseudocode of RAC in Algorithm 1. We give details of SUBMODULARPATH procedure and prove its approximation bound in supplementary material. Algorithm 1 RAC procedure RECURSERAC(p, f, Q) if maxφ2{φ0|p(φ0)>0} f(X, φ) = 0 then return ⌧ GENTOUR(p, f, Q) EXECUTEPLAN(⌧) p0 p( |φ)p(φ) p( ) f 0 f(Y, φ) −f(⌧, φ) Q0 Q −minφ f(⌧, φ) for all ⇠φ RECURSERAC(p0, f 0, Q0) procedure EXECUTEPLAN(⌧) repeat Visit next location x in ⌧and observe o. until o 2 ⌦x or end of tour. Move to location xt = r. return history encountered . procedure GENTOUR(p, f, Q) if f satisfies MLB then ⌧f SUBMODULARPATH(g⇤ Q) if maxφ p(φ) 0.5 then ⌧vs SUBMODULARPATH(V⇤ 0.5) ⌧ arg min⌧f ,⌧vs(W(⌧0)) else ⌧ ⌧f else ⌧ SUBMODULARPATH(g⇤ (1−1/K)Q) return ⌧where ⌧= (x0, x1, . . . , xt) and x0 = xt = r 6 Analysis We give the performance guarantees for applying RAC to adaptive stochastic optimization problem on paths that satisfy MLRB and MLB. 5 Theorem 1. Assume that f is an integer-valued pointwise submodular monotone function. If f satisfies MLRB condition, then for any constant ✏> 0 and an instance of adaptive stochastic optimization problem on path optimizing f, RAC computes a policy ⇡in polynomial time such that C(⇡) = O((log|X|)2+✏log Q logK Q)C(⇡⇤)), where Q and K > 1 are constants that satisfies Equation (2). Theorem 2. Assume that prior probability distribution p is represented as non-negative integers with P φ p(φ) = P and f is an integer-valued pointwise submodular monotone function. If f satisfies MLB, then for any constant ✏> 0 and an instance of adaptive stochastic optimization problem on path optimizing f, RAC computes a policy ⇡for in polynomial time such that C(⇡) = O((log|X|)2+✏(log P + log Q) log G)C(⇡⇤), where Q = maxφ f(X, φ). For adaptive stochastic optimization problems on subsets, we achieve tighter approximation bounds by replacing the bound of submodular orienteering with greedy submodular set cover. Theorem 3. Assume f is an integer-valued pointwise submodular and monotone function. If f satisfies MLRB condition, then for an instance of adaptive stochastic optimization problem on subsets optimizing f, RAC computes a policy ⇡in polynomial time such that C(⇡) = 4(ln Q + 1)(logK Q + 1)C(⇡⇤), where Q and K > 1 are constants that satisfies Equation (2). Theorem 4. Assume f is an integer-valued pointwise submodular and monotone function and δ = minφ p(φ). If f satisfies MLB condition, then for an instance of adaptive stochastic optimization problem on subsets optimizing f, RAC computes a policy ⇡in polynomial time such that C(⇡) = 4(ln 1/δ + ln Q + 2)(log G + 1)C(⇡⇤)), where Q = maxφ f(X, φ). 7 Application: Noisy Informative Path Planning In this section, we apply RAC to solve adaptive informative path planning (IPP) problems with noisy observations. We reduce an adaptive noisy IPP problem to an Equivalence Class Determination (ECD) problem [6] and apply RAC to solve it near-optimally using an objective function that satisfies MLRB condition. We evaluate this approach on two IPP tasks with noisy observations. In an informative path planning (IPP) problem, an agent seeks a path to sense and gather information from its environment. An IPP problem is specified as a tuple I = (X, d, H, ph, O, Zh, r), the definitions for X, d, O, r are the same as adaptive stochastic optimization problem on path. In addition, there is a finite set of hypotheses, H, and a prior probability over them, p(h). We also have a set of probabilistic observation functions Zh = {Zx | x 2 X}, with one observation function Zx(h, o) = p(o|x, h) for each location x. The goal of IPP problem is to identify the true hypothesis. 7.1 Equivalence Class Determination Problem An Equivalence Class Determination (ECD) problem consists of a set of hypotheses H and a set of equivalence classes {H1, H2, . . . , Hm} that partitions H. Its goal is to identify which equivalence class the true hypothesis lies in by moving to locations and making observations with the minimum expected movement cost. ECD problem has been applied to noisy Bayesian active learning to achieve near-optimal performance. Noisy adaptive IPP problem can also be reduced to an ECD instance when it is always possible to identify the true hypothesis in IPP problem. To differentiate between the equivalence classes, we use the Gibbs error objective function (called the edge-cutting function in [6]). The idea is consider the ambiguities between pairs of hypotheses in different equivalence class, and to visit locations and make observations to disambiguate between them. The set of pairs of hypotheses in different classes is E = [1i<jm{{h0, h00} : h0 2 Hi, h00 2 Hj}. We disambiguate a pair {h0, h00} when we make an observation o at a location x and either h0 or h00 is inconsistent with the observation, Z0 x(h0, o) = 0 or Z0 x(h00, o) = 0. The set of pairs disambiguated by visiting a location x when hypothesis h 2 H0 is true is given by 6 s s Long range sensor detects the survivor in the 3 ⇥3 area. Short range sensor detects the survivor in current grid cell. Safe zone Starting location true target location h = 10 c = 1 c = 4 Figure 1: UAV Search and Rescue x1 x2 x3 x4 x5 x6 x7 Figure 2: Grasp the cup with a handle top, the side view (left) and the top view (right). Ex(h) = {{h0, h00} : Z0 x(h, o) = 1, Z0 x(h0, o) = 0 or Z0 x(h00, o) = 0}. We define a weight function w : E ! R≥0 as w({h0, h00}) = p0(h0) · p0(h00). We can now define the Gibbs error objective function: fGE(Y, h) = W([x2Y Ex(h)), where W(E0) = P e2E0 w(e), Y is the set of location visited and h 2 H0. Proposition 6. The Gibbs error function fGE is pointwise submodular and monotone. In addition, it satisfies condition MLRB with constants Q = W(E) = 1 −Pm i=1(p(Hi))2, the total weight of ambiguous pairs of hypotheses, and K = 2. The first step to reduce adaptive noisy IPP instance I to ECD instance E is to create a noiseless IPP problem I0 = (X, d, H0, p0, O, Z0, r) from a noisy IPP instance I = (X, d, H, p, O, Z, r) is by creating a hypothesis for every possible observation vector. Each hypothesis h0 2 H0 is an observation vector h0 = (o1, o2, . . . , o|X|) and the new hypothesis space H0 is H0 = O|X|. Next, for each hypothesis hi 2 H, we create an equivalence class Hi = n (o1, o2, . . . , o|X|) &&&Q|X| j=1 Zxj(hi, oj) > 0 o that consists of all observation vectors h0 = (o1, o2, . . . , o|X|) 2 H0 that are possible with hypothesis Hi. When we can always identify the true underlying hypothesis h 2 H, the equivalence classes is a partition on the set H0. 7.2 Experiments We evaluate RAC in simulation on two noisy IPP tasks modified from [10]. We highlight the modifications and give the full description in the supplementary material. In a variant of the UAV search and rescue task (see Figure 1), there is a safe zone (marked grey in Figure 1) where the victim is deemed to be safe if we know that he is in it. otherwise we need to know the exact location of the victim. The equivalence classes task are the safe zone and every location outside of it. Furthermore, the long range sensor may report the wrong reading with probability of 0.03. In a noisy variant of the grasping task, the laser range finder has a 0.85 chance of detecting the correct discretized value x, 0.05 chance of ±1 errors each, and 0.025 chance of ±2 errors each. The robot gripper is fairly robust to estimation error of the cup handle’s orientation. For each cup, we partition the cup handle orientation into regions of 20 degrees each. We only need to know the region that contains cup handle. The equivalence classes here are the regions. However, it is not always possible to identify the true region due to observation noise. We can still reduce to ECD problem by associating each observation vector to its most likely equivalence class. We now describe our baselines algorithms. Define information gain to be reduction in Shannon entropy of the equivalence classes, the information gain (IG) algorithm, greedily picks the location that maximizes the expected information gain, where the expectation is taken over all possible observations at the location. To account for movement cost, the information gain (IG-Cost) algorithm greedily picks the location that maximizes expected information gain per unit movement cost. Both IG and IG-Cost do not reason over the long term but achieve limited adaptivity by replanning in each step. The Sampled-RAId algorithm is as described in [10]. We evaluate IG, IG-Cost, Sampled-RAId,and RAC with version space reduction (RAC-V) and Gibbs error (RAC-GE) objectives. RAC-GE has theoretical performance guarantees for the noisy adaptive 7 IPP problem. Under the MLRB condition, RAC-V can also be shown to have a similar performance bound. However RAC-GE optimizes the target function directly and we expect that optimizing the target function directly would usually have better performance in practice. Even though the version space reduction function and Gibbs error function are adaptive submodular, the greedy policy in [5] is not applicable as the movement cost per step depends on the paths and is not fixed. If we ignore movement cost, a greedy policy on the version space reduction function is equivalent to generalized binary search, which is equivalent to IG [15] for the UAV task where the prior is uniform and there are two observations. We set all algorithms to terminate when the Gibbs error of the equivalence classes is less than ⌘= 10−5. The Gibbs error corresponds to the exponentiated Rényi entropy (order 2) and also the prediction error of a Gibbs classifier that predicts by sampling a hypothesis from the prior. We run 1000 trials with the true hypothesis sampled randomly from the prior for the UAV search task and 3000 trials for the grasping task as its variance is higher. For Sampled-RAId, we set the number of samples to be three times the number of hypothesis. For performance comparison, we pick 15 different thresholds γ (starting from 1⇥10−5 and doubling γ each step) for Gibbs error of the equivalence classes and compute the average cost incurred by each algorithm to reduce Gibbs error to below each threshold level γ. We plot the average cost with 95% confidence interval for the two IPP tasks in Figures 3 and 4. For the grasping task, we omit trials where the minimum Gibbs error possible is greater than γ when we compute the average cost for that specific γ value. For readability, we omit results due to IG from the plots when it is worse than other algorithms by a large margin, which is all of IG in the grasping task. From our experiments, RAC-GE has the lowest average cost for both tasks at almost every γ. The RAC-V has very close results while the other algorithms, Sampled-RAId, IG-Cost and IG do not perform as well for both the UAV search and grasping task. 10−5 10−4 10−3 10−2 10−1 100 Gibbs Error 60 70 80 90 100 110 120 130 140 Cost IG-Cost RAC-GE RAC-V Sampled-RAId IG Figure 3: UAV search and rescue 10−5 10−4 10−3 10−2 10−1 100 Gibbs Error 540 560 580 600 620 640 660 680 700 720 Cost IG-Cost RAC-V Sampled-RAId RAC-GE Figure 4: Grasping 8 Conclusion We study approximation algorithms for adaptive stochastic optimization over both sets and paths. We give two conditions on pointwise monotone submodular functions that are useful for understanding the performance of approximation algorithms on these problems: the MLB and the MLRB. Our algorithm, RAC, runs in polynomial time with an approximation ratio that depends on the constants characterizing these two conditions. The results extend known results for adaptive stochastic optimization problems on sets to paths, and enlarges the class of functions known to be efficiently approximable for both problems. We apply the algorithm to two adaptive informative path planning applications with promising results. Acknowledgement This work is supported in part by NUS AcRF grant R-252-000-587-112, National Research Foundation Singapore through the SMART Phase 2 Pilot Program (Subaward Agreement No. 09), and US Air Force Research Laboratory under agreement number FA238615-1-4010. 8 References [1] Arash Asadpour, Hamid Nazerzadeh, and Amin Saberi. Stochastic submodular maximization. In Internet and Network Economics, pages 477–489. 2008. [2] Gruia Calinescu and Alexander Zelikovsky. The polymatroid steiner problems. Journal of Combinatorial Optimization, 9(3):281–294, 2005. [3] Nguyen Viet Cuong, Wee Sun Lee, and Nan Ye. Near-optimal Adaptive Pool-based Active Learning with General Loss. In Proc. Uncertainty in Artificial Intelligence, 2014. [4] Nguyen Viet Cuong, Wee Sun Lee, Nan Ye, Kian Ming A. Chai, and Hai Leong Chieu. Active Learning for Probabilistic Hypotheses Using the Maximum Gibbs Error Criterion. In Advances in Neural Information Processing Systems (NIPS), 2013. [5] Daniel Golovin and Andreas Krause. Adaptive submodularity: Theory and applications in active learning and stochastic optimization. J. Artificial Intelligence Research, 42(1):427–486, 2011. [6] Daniel Golovin, Andreas Krause, and Debajyoti Ray. Near-optimal bayesian active learning with noisy observations. In Advances in Neural Information Processing Systems (NIPS), pages 766–774, 2010. [7] Andrew Guillory and Jeff Bilmes. Interactive submodular set cover. In International Conference on Machine Learning (ICML), Haifa, Israel, 2010. [8] Anupam Gupta, Viswanath Nagarajan, and R. Ravi. Approximation Algorithms for Optimal Decision Trees and Adaptive TSP Problems. In Samson Abramsky, Cyril Gavoille, Claude Kirchner, Friedhelm Meyer auf der Heide, and Paul G. Spirakis, editors, Automata, Languages and Programming, number 6198 in Lecture Notes in Computer Science, pages 690– 701. Springer Berlin Heidelberg, January 2010. [9] Leslie Pack Kaelbling, Michael. L Littman, and Anthony R. Cassandra. Planning and acting in partially observable stochastic domains. Artificial Intelligence, 101:99–134, January 1998. [10] Zhan Wei Lim, David Hsu, and Wee Sun Lee. Adaptive informative path planning in metric spaces. In Workshop on the Algorithmic Foundations of Robotics, 2014. [11] George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions—I. Mathematical Programming, 14(1):265– 294, 1978. [12] Sylvie C. W. Ong, Shao Wei Png, David Hsu, and Wee Sun Lee. Planning under uncertainty for robotic tasks with mixed observability. Int. J. Robotics Research, 29(8):1053–1068, 2010. [13] David Silver and Joel Veness. Monte-Carlo Planning in Large POMDPs. Advances in Neural Information Processing Systems (NIPS), 2010. [14] Adhiraj Somani, Nan Ye, David Hsu, and Wee Sun Lee. Despot: Online pomdp planning with regularization. In Advances in Neural Information Processing Systems (NIPS), pages 1772–1780, 2013. [15] Alice X. Zheng, Irina Rish, and Alina Beygelzimer. Efficient Test Selection in Active Diagnosis via Entropy Approximation. Proc. Uncertainty in Artificial Intelligence, 2005. 9 | 2015 | 348 |
5,867 | A Universal Primal-Dual Convex Optimization Framework Alp Yurtsever: Quoc Tran-Dinh; Volkan Cevher: : Laboratory for Information and Inference Systems, EPFL, Switzerland {alp.yurtsever, volkan.cevher}@epfl.ch ; Department of Statistics and Operations Research, UNC, USA quoctd@email.unc.edu Abstract We propose a new primal-dual algorithmic framework for a prototypical constrained convex optimization template. The algorithmic instances of our framework are universal since they can automatically adapt to the unknown H¨older continuity degree and constant within the dual formulation. They are also guaranteed to have optimal convergence rates in the objective residual and the feasibility gap for each H¨older smoothness degree. In contrast to existing primal-dual algorithms, our framework avoids the proximity operator of the objective function. We instead leverage computationally cheaper, Fenchel-type operators, which are the main workhorses of the generalized conditional gradient (GCG)-type methods. In contrast to the GCG-type methods, our framework does not require the objective function to be differentiable, and can also process additional general linear inclusion constraints, while guarantees the convergence rate on the primal problem. 1 Introduction This paper constructs an algorithmic framework for the following convex optimization template: f ‹ :“ min xPX tfpxq : Ax ´ b P Ku , (1) where f : Rp Ñ R Y t`8u is a convex function, A P Rnˆp, b P Rn, and X and K are nonempty, closed and convex sets in Rp and Rn respectively. The constrained optimization formulation (1) is quite flexible, capturing many important learning problems in a unified fashion, including matrix completion, sparse regularization, support vector machines, and submodular optimization [1–3]. Processing the inclusion Ax ´ b P K in (1) requires a significant computational effort in the largescale setting [4]. Hence, the majority of the scalable numerical solution methods for (1) are of the primal-dual-type, including decomposition, augmented Lagrangian, and alternating direction methods: cf., [4–9]. The efficiency guarantees of these methods mainly depend on three properties of f: Lipschitz gradient, strong convexity, and the tractability of its proximal operator. For instance, the proximal operator of f, i.e., proxfpxq :“ arg minz ␣ fpzq ` p1{2q}z ´ x}2( , is key in handling non-smooth f while obtaining the convergence rates as if it had Lipschitz gradient. When the set Ax´bPK is absent in (1), other methods can be preferable to primal-dual algorithms. For instance, if f has Lipschitz gradient, then we can use the accelerated proximal gradient methods by applying the proximal operator for the indicator function of the set X [10,11]. However, as the problem dimensions become increasingly larger, the proximal tractability assumption can be restrictive. This fact increased the popularity of the generalized conditional gradient (GCG) methods (or Frank-Wolfe-type algorithms), which instead leverage the following Fenchel-type oracles [1,12,13] rxs7 X,g :“ arg max sPX txx, sy ´ gpsqu , (2) where g is a convex function. When g “ 0, we obtain the so-called linear minimization oracle [12]. When X ” Rp, then the (sub)gradient of the Fenchel conjugate of g, ∇g˚, is in the set rxs7 g. 1 The sharp-operator in (2) is often much cheaper to process as compared to the prox operator [1, 12]. While the GCG-type algorithms require O p1{ϵq-iterations to guarantee an ϵ -primal objective residual/duality gap, they cannot converge when their objective is nonsmooth [14]. To this end, we propose a new primal-dual algorithmic framework that can exploit the sharp-operator of f in lieu of its proximal operator. Our aim is to combine the flexibility of proximal primal-dual methods in addressing the general template (1) while leveraging the computational advantages of the GCG-type methods. As a result, we trade off the computational difficulty per iteration with the overall rate of convergence. While we obtain optimal rates based on the sharp-operator oracles, we note that the rates reduce to O ` 1{ϵ2˘ with the sharp operator vs. O p1{ϵq with the proximal operator when f is completely non-smooth (cf. Definition 1.1). Intriguingly, the convergence rates are the same when f is strongly convex. Unlike GCG-type methods, our approach can now handle nonsmooth objectives in addition to complex constraint structures as in (1). Our primal-dual framework is universal in the sense the convergence of our algorithms can optimally adapt to the H¨older continuity of the dual objective g (cf., (6) in Section 3) without having to know its parameters. By H¨older continuity, we mean the (sub)gradient ∇g of a convex function g satisfies }∇gpλq ´ ∇gp˜λq} ď Mν}λ ´ ˜λ}ν with parameters Mν ă 8 and ν P r0, 1s for all λ, ˜λ P Rn. The case ν “ 0 models the bounded subgradient, whereas ν “ 1 captures the Lipschitz gradient. The H¨older continuity has recently resurfaced in unconstrained optimization by [15] with universal gradient methods that obtain optimal rates without having to know Mν and ν. Unfortunately, these methods cannot directly handle the general constrained template (1). After our initial draft appeared, [14] presented new GCG-type methods for composite minimization, i.e., minxPRp fpxq ` ψpxq, relying on H¨older smoothness of f (i.e., ν P p0, 1s) and the sharp-operator of ψ. The methods in [14] do not apply when f is non-smooth. In addition, they cannot process the additional inclusion Ax ´ b P K in (1), which is a major drawback for machine learning applications. Our algorithmic framework features a gradient method and its accelerated variant that operates on the dual formulation of (1). For the accelerated variant, we study an alternative to the universal accelerated method of [15] based on FISTA [10] since it requires less proximal operators in the dual. While the FISTA scheme is classical, our analysis of it with the H¨older continuous assumption is new. Given the dual iterates, we then use a new averaging scheme to construct the primal-iterates for the constrained template (1). In contrast to the non-adaptive weighting schemes of GCG-type algorithms, our weights explicitly depend on the local estimates of the H¨older constants Mν at each iteration. Finally, we derive the worst-case complexity results. Our results are optimal since they match the computational lowerbounds in the sense of first-order black-box methods [16]. Paper organization: Section 2 briefly recalls primal-dual formulation of problem (1) with some standard assumptions. Section 3 defines the universal gradient mapping and its properties. Section 4 presents the primal-dual universal gradient methods (both the standard and accelerated variants), and analyzes their convergence. Section 5 provides numerical illustrations, followed by our conclusions. The supplementary material includes the technical proofs and additional implementation details. Notation and terminology: For notational simplicity, we work on the Rp{Rn spaces with the Euclidean norms. We denote the Euclidean distance of the vector u to a closed convex set X by dist pu, Xq. Throughout the paper, } ¨ } represents the Euclidean norm for vectors and the spectral norm for the matrices. For a convex function f, we use ∇f both for its subgradient and gradient, and f ˚ for its Fenchel’s conjugate. Our goal is to approximately solve (1) to obtain xϵ in the following sense: Definition 1.1. Given an accuracy level ϵ ą 0, a point xϵ P X is said to be an ϵ-solution of (1) if |fpxϵq ´ f ‹| ď ϵ, and dist pAxϵ ´ b, Kq ď ϵ. Here, we call |fpxϵq ´ f ‹| the primal objective residual and dist pAxϵ ´ b, Kq the feasibility gap. 2 Primal-dual preliminaries In this section, we briefly summarize the primal-dual formulation with some standard assumptions. For the ease of presentation, we reformulate (1) by introducing a slack variable r as follows: f ‹ “ min xPX,rPK tfpxq : Ax ´ r “ bu , px‹ : fpx‹q “ f ‹q. (3) Let z:“rx, rs and Z :“X ˆK. Then, we have D:“tz P Z : Ax´r“bu as the feasible set of (3). 2 The dual problem: The Lagrange function associated with the linear constraint Ax ´ r “ b is defined as Lpx, r, λq :“ fpxq ` xλ, Ax ´ r ´ by, and the dual function d of (3) can be defined and decomposed as follows: dpλq :“ min xPX rPK tfpxq ` xλ, Ax ´ r ´ byu “ min xPX tfpxq ` xλ, Ax ´ byu loooooooooooooooomoooooooooooooooon dxpλq ` min rPK xλ, ´ry loooooomoooooon drpλq , where λ P Rn is the dual variable. Then, we define the dual problem of (3) as follows: d‹ :“ max λPRn dpλq “ max λPRn ! dxpλq ` drpλq ) . (4) Fundamental assumptions: To characterize the primal-dual relation between (1) and (4), we require the following assumptions [17]: Assumption A. 1. The function f is proper, closed, and convex, but not necessarily smooth. The constraint sets X and K are nonempty, closed, and convex. The solution set X ‹ of (1) is nonempty. Either Z is polyhedral or the Slater’s condition holds. By the Slater’s condition, we mean ripZq X tpx, rq : Ax ´ r “ bu ‰ H, where ripZq stands for the relative interior of Z. Strong duality: Under Assumption A.1, the solution set Λ‹ of the dual problem (4) is also nonempty and bounded. Moreover, the strong duality holds, i.e., f ‹ “ d‹. 3 Universal gradient mappings This section defines the universal gradient mapping and its properties. 3.1 Dual reformulation We first adopt the composite convex minimization formulation of (4) for better interpretability as G‹ :“ min λPRn tGpλq :“ gpλq ` hpλqu , (5) where G‹ “ ´d‹, and the correspondence between pg, hq and pdx, drq is as follows: # gpλq :“ max xPX txλ, b ´ Axy ´ fpxqu “ ´dxpλq, hpλq :“ max rPK xλ, ry “ ´drpλq. (6) Since g and h are generally non-smooth, FISTA and its proximal-based analysis [10] are not directly applicable. Recall the sharp operator defined in (2), then g can be expressed as gpλq “ max xPX ␣ x´AT λ, xy ´ fpxq ( ` xλ, by, and we define the optimal solution to the g subproblem above as follows: x˚pλq P arg max xPX ␣ x´AT λ, xy ´ fpxq ( ” r´AT λs7 X,f. (7) The second term, h, depends on the structure of K. We consider three special cases: paq Sparsity/low-rankness: If K :“ tr P Rn : }r} ď κu for a given κ ě 0 and a given norm } ¨ }, then hpλq “ κ}λ}˚, the scaled dual norm of } ¨ }. For instance, if K :“ tr P Rn : }r}1 ď κu, then hpλq “ κ}λ}8. While the ℓ1-norm induces the sparsity of x, computing h requires the max absolute elements of λ. If K :“ tr P Rq1ˆq2 : }r}˚ ď κu (the nuclear norm), then hpλq “ κ}λ}, the spectral norm. The nuclear norm induces the low-rankness of x. Computing h in this case leads to finding the top-eigenvalue of λ, which is efficient. pbq Cone constraints: If K is a cone, then h becomes the indicator function δK˚ of its dual cone K˚. Hence, we can handle the inequality constraints and positive semidefinite constraints in (1). For instance, if K ” Rn `, then hpλq “ δRn ´pλq, the indicator function of Rn ´ :“ tλ P Rn : λ ď 0u. If K ” Sp `, then hpλq :“ δSp ´pλq, the indicator function of the negative semidefinite matrix cone. pcq Separable structures: If X and f are separable, i.e., X :“ śp i“1 Xi and fpxq :“ řp i“1 fipxiq, then the evaluation of g and its derivatives can be decomposed into p subproblems. 3 3.2 H¨older continuity of the dual universal gradient Let ∇gp¨q be a subgradient of g, which can be computed as ∇gpλq “ b´Ax˚pλq. Next, we define Mν “Mνpgq :“ sup λ,˜λPRn,λ‰˜λ # }∇gpλq´∇gp˜λq} }λ ´ ˜λ}ν + , (8) where ν ě 0 is the H¨older smoothness order. Note that the parameter Mν explicitly depends on ν [15]. We are interested in the case ν P r0, 1s, and especially the two extremal cases, where we either have the Lipschitz gradient that corresponds to ν “ 1, or the bounded subgradient that corresponds to ν “ 0. We require the following condition in the sequel: Assumption A. 2. ˆ Mpgq :“ inf 0ďνď1 Mνpgq ă `8. Assumption A.2 is reasonable. We explain this claim with the following two examples. First, if g is subdifferentiable and X is bounded, then ∇gp¨q is also bounded. Indeed, we have }∇gpλq} “ }b ´ Ax˚pλq} ď DA X :“ supt}b ´ Ax} : x P Xu. Hence, we can choose ν “ 0 and ˆ Mνpgq “ 2DA X ă 8. Second, if f is uniformly convex with the convexity parameter µf ą 0 and the degree q ě 2, i.e., x∇fpxq ´ ∇fp˜xq, x ´ ˜xy ě µf}x ´ ˜x}q for all x, ˜x P Rp, then g defined by (6) satisfies (8) with ν “ 1 q´1 and ˆ Mνpgq “ ` µ´1 f }A}2˘ 1 q´1 ă `8, as shown in [15]. In particular, if q “ 2, i.e., f is µf-strongly convex, then ν “ 1 and Mνpgq “ µ´1 f }A}2, which is the Lipschitz constant of the gradient ∇g. 3.3 The proximal-gradient step for the dual problem Given ˆλk P Rn and Mk ą 0, we define QMkpλ; ˆλkq :“ gpˆλkq ` x∇gpˆλkq, λ ´ ˆλky ` Mk 2 }λ ´ ˆλk}2 as an approximate quadratic surrogate of g. Then, we consider the following update rule: λk`1 :“ arg min λPRn ␣ QMkpλ; ˆλkq ` hpλq ( ” proxM ´1 k h ´ ˆλk ´ M ´1 k ∇gpˆλkq ¯ . (9) For a given accuracy ϵ ą 0, we define Ď Mϵ :“ „1 ´ ν 1 ` ν 1 ϵ 1´ν 1`ν M 2 1`ν ν . (10) We need to choose the parameter Mk ą 0 such that QMk is an approximate upper surrogate of g, i.e., gpλq ď QMkpλ; λkq ` δk for some λ P Rn and δk ě 0. If ν and Mν are known, then we can set Mk “ Ď Mϵ defined by (10). In this case, Q Ď Mϵ is an upper surrogate of g. In general, we do not know ν and Mν. Hence, Mk can be determined via a backtracking line-search procedure. 4 Universal primal-dual gradient methods We apply the universal gradient mappings to the dual problem (5), and propose an averaging scheme to construct t¯xku for approximating x‹. Then, we develop an accelerated variant based on the FISTA scheme [10], and construct another primal sequence t¯¯xku for approximating x‹. 4.1 Universal primal-dual gradient algorithm Our algorithm is shown in Algorithm 1. The dual steps are simply the universal gradient method in [15], while the new primal step allows to approximate the solution of (1). Complexity-per-iteration: First, computing x˚pλkq at Step 1 requires the solution x˚pλkq P r´AT λks7 X,f. For many X and f, we can compute x˚pλkq efficiently and often in a closed form. 4 Algorithm 1 (Universal Primal-Dual Gradient Method pUniPDGradq) Initialization: Choose an initial point λ0 P Rn and a desired accuracy level ϵ ą 0. Estimate a value M´1 such that 0 ă M´1 ď Ď Mϵ. Set S´1 “ 0 and ¯x´1 “ 0p. for k “ 0 to kmax 1. Compute a primal solution x˚pλkq P r´AT λks7 X,f. 2. Form ∇gpλkq “ b ´ Ax˚pλkq. 3. Line-search: Set Mk,0 “ 0.5Mk´1. For i “ 0 to imax, perform the following steps: 3.a. Compute the trial point λk,i “ proxM ´1 k,ih ´ λk ´ M ´1 k,i ∇gpλkq ¯ . 3.b. If the following line-search condition holds: gpλk,iq ď QMk,ipλk,i; λkq ` ϵ{2, then set ik “ i and terminate the line-search loop. Otherwise, set Mk,i`1 “ 2Mk,i. End of line-search 4. Set λk`1 “ λk,ik and Mk “ Mk,ik. Compute wk “ 1 Mk , Sk “Sk´1`wk, and γk “ wk Sk . 5. Compute ¯xk “ p1 ´ γkq¯xk´1 ` γkx˚pλkq. end for Output: Return the primal approximation ¯xk for x‹. Second, in the line-search procedure, we require the solution λk,i at Step 3.a, and the evaluation of gpλk,iq. The total computational cost depends on the proximal operator of h and the evaluations of g. We prove below that our algorithm requires two oracle queries of g on average. Theorem 4.1. The primal sequence t¯xku generated by the Algorithm 1 satisfies ´}λ‹}dist pA¯xk ´ b, Kq ď fp¯xkq ´ f ‹ ď Ď Mϵ}λ0}2 k ` 1 ` ϵ 2, (11) dist pA¯xk ´ b, Kq ď 4Ď Mϵ k ` 1}λ0 ´ λ‹} ` d 2Ď Mϵϵ k ` 1, (12) where Ď Mϵ is defined by (10), λ‹ P Λ‹ is an arbitrary dual solution, and ϵ is the desired accuracy. The worst-case analytical complexity: We establish the total number of iterations kmax to achieve an ϵ-solution ¯xk of (1). The supplementary material proves that kmax “ ————– » – 4 ? 2}λ‹} ´1 ` b 1 ` 8 }λ‹} }λ‹}r1s fi fl 2 inf 0ďνď1 ˆMν ϵ ˙ 2 1`ν ffiffiffiffifl, (13) where }λ‹}r1s “ max t}λ‹}, 1u. This complexity is optimal for ν “ 0, but not for ν ą 0 [16]. At each iteration k, the linesearch procedure at Step 3 requires the evaluations of g. The supplementary material bounds the total number N1pkq of oracle queries, including the function G and its gradient evaluations, up to the kth iteration as follows: N1pkq ď 2pk ` 1q ` 1 ´ log2pM´1q` inf 0ďνď1 "1´ν 1`ν log2 ˆ p1´νq p1`νqϵ ˙ ` 2 1`ν log2 Mν * . (14) Hence, we have N1pkq « 2pk`1q, i.e., we require approximately two oracle queries at each iteration on the average. 4.2 Accelerated universal primal-dual gradient method We now develop an accelerated scheme for solving (5). Our scheme is different from [15] in two key aspects. First, we adopt the FISTA [10] scheme to obtain the dual sequence since it requires less prox operators compared to the fast scheme in [15]. Second, we perform the line-search after computing ∇gpˆλkq, which can reduce the number of the sharp-operator computations of f and X. Note that the application of FISTA to the dual function is not novel per se. However, we claim that our theoretical characterization of this classical scheme based on the H¨older continuity assumption in the composite minimization setting is new. 5 Algorithm 2 (Accelerated Universal Primal-Dual Gradient Method pAccUniPDGradq) Initialization: Choose an initial point λ0 “ ˆλ0 P Rn and an accuracy level ϵ ą 0. Estimate a value M´1 such that 0 ă M´1 ď Ď Mϵ. Set ˆS´1 “ 0, t0 “ 1 and ¯¯x´1 “ 0p. for k “ 0 to kmax 1. Compute a primal solution x˚pˆλkq P r´AT ˆλs7 X,f. 2. Form ∇gpˆλkq “ b ´ Ax˚pˆλkq. 3. Line-search: Set Mk,0 “ Mk´1. For i “ 0 to imax, perform the following steps: 3.a. Compute the trial point λk,i “ proxM ´1 k,ih `ˆλk ´ M ´1 k,i ∇gpˆλkq ˘ . 3.b. If the following line-search condition holds: gpλk,iq ď QMk,ipλk,i; ˆλkq ` ϵ{p2tkq, then ik “ i, and terminate the line-search loop. Otherwise, set Mk,i`1 “ 2Mk,i. End of line-search 4. Set λk`1 “ λk,ik and Mk “ Mk,ik. Compute wk “ tk Mk , ˆSk “ ˆSk´1`wk, and γk “wk{ ˆSk. 5. Compute tk`1 “ 0.5 “ 1 ` a 1 ` 4t2 k ‰ and update ˆλk`1 “ λk`1 ` tk´1 tk`1 ` λk`1 ´ λk ˘ . 6. Compute ¯¯xk “ p1 ´ γkq¯¯xk´1 ` γkx˚pˆλkq. end for Output: Return the primal approximation ¯¯xk for x‹. Complexity per-iteration: The per-iteration complexity of Algorithm 2 remains essentially the same as that of Algorithm 1. Theorem 4.2. The primal sequence t¯¯xku generated by the Algorithm 2 satisfies ´}λ‹}dist pA¯¯xk´b, Kqďfp¯¯xkq´f ‹ ď ϵ 2 ` 4Ď Mϵ}λ0}2, pk`2q 1`3ν 1`ν (15) dist pA¯¯xk´b, Kq ď 16Ď Mϵ pk`2q 1`3ν 1`ν }λ0´λ‹} ` d 8Ď Mϵϵ pk`2q 1`3ν 1`ν , (16) where Ď Mϵ is defined by (10), λ‹ P Λ‹ is an arbitrary dual solution, and ϵ is the desired accuracy. The worst-case analytical complexity: The supplementary material proves the following worst-case complexity of Algorithm 2 to achieve an ϵ-solution ¯¯xk: kmax “ ————– » – 8 ? 2}λ‹} ´1 ` b 1 ` 8 }λ} }λ}r1s fi fl 2`2ν 1`3ν inf 0ďνď1 ˆMν ϵ ˙ 2 1`3ν ffiffiffiffifl. (17) This worst-case complexity is optimal in the sense of first-order black box models [16]. The line-search procedure at Step 3 of Algorithm 2 also terminates after a finite number of iterations. Similar to Algorithm 1, Algorithm 2 requires 1 gradient query and ik function evaluations of g at each iteration. The supplementary material proves that the number of oracle queries in Algorithm 2 is upperbounded as follows: N2pkq ď 2pk ` 1q ` 1 ` 1 ´ ν 1 ` ν rlog2pk ` 1q ´ log2pϵqs ` 2 1 ` ν log2pMνq ´ log2pM´1q. (18) Roughly speaking, Algorithm 2 requires approximately two oracle query per iteration on average. 5 Numerical experiments This section illustrates the scalability and the flexibility of our primal-dual framework using some applications in the quantum tomography (QT) and the matrix completion (MC). 6 5.1 Quantum tomography with Pauli operators We consider the QT problem which aims to extract information from a physical quantum system. A q-qubit quantum system is mathematically characterized by its density matrix, which is a complex pˆp positive semidefinite Hermitian matrix X6 P Sp `, where p “ 2q. Surprisingly, we can provably deduce the state from performing compressive linear measurements b “ ApXq P Cn based on Pauli operators A [18]. While the size of the density matrix grows exponentially in q, a significantly fewer compressive measurements (i.e., n “ Opp log pq) suffices to recover a pure state q-qubit density matrix as a result of the following convex optimization problem: ϕ‹ “ min XPSp ` " ϕpXq:“ 1 2}ApXq´b}2 2 : trpXq “ 1 * , pX‹ : ϕpX‹q “ ϕ‹q, (19) where the constraint ensures that X‹ is a density matrix. The recovery is also robust to noise [18]. Since the objective function has Lipschitz gradient and the constraint (i.e., the Spectrahedron) is tuning-free, the QT problem provides an ideal scalability test for both our framework and GCG-type algorithms. To verify the performance of the algorithms with respect to the optimal solution in largescale, we remain within the noiseless setting. However, the timing and the convergence behavior of the algorithms remain qualitatively the same under polarization and additive Gaussian noise. # iteration 100 101 102 Relative solution error: ∥Xk−X⋆∥F ∥X⋆∥F 10-2 10-1 100 # iteration 100 101 102 Objective residual: |ϕ(Xk) −ϕ⋆| 10-4 10-3 10-2 10-1 100 101 102 UniPDGrad AccUniPDGrad FrankWolfe computational time (s) 102 103 104 Relative solution error: ∥Xk−X⋆∥F ∥X⋆∥F 10-2 10-1 100 computational time (s) 102 103 104 Objective residual: |ϕ(Xk) −ϕ⋆| 10-4 10-3 10-2 10-1 100 101 Figure 1: The convergence behavior of algorithms for the q “ 14 qubits QT problem. The solid lines correspond to the theoretical weighting scheme, and the dashed lines correspond to the line-search (in the weighting step) variants. To this end, we generate a random pure quantum state (e.g., rank-1 X6), and we take n “ 2p log p random Pauli measurements. For q “ 14 qubits system, this corresponds to a 26814351456 dimensional problem with n “ 3171983 measurements. We recast (19) into (1) by introducing the slack variable r “ ApXq ´ b. We compare our algorithms vs. the Frank-Wolfe method, which has optimal convergence rate guarantees for this problem, and its line-search variant. Computing the sharp-operator rxs7 requires a top-eigenvector e1 of A˚pλq, while evaluating g corresponds to just computing the top-eigenvalue σ1 of A˚pλq via a power method. All methods use the same subroutine to compute the sharpoperator, which is based on MATLAB’s eigs function. We set ϵ “ 2 ˆ 10´4 for our methods and have a wall-time 2ˆ104s in order to stop the algorithms. However, our algorithms seems insensitive to the choice of ϵ for the QT problem. Figure 1 illustrates the iteration and the timing complexities of the algorithms. UniPDGrad algorithm, with an average of 1.978 line-search steps per iteration, has similar iteration and timing performance as compared to the standard Frank-Wolfe scheme with step-size γk “ 2{pk ` 2q. The line-search variant of Frank-Wolfe improves over the standard one; however, our accelerated variant, with an average of 1.057 line-search steps, is the clear winner in terms of both iterations and time. We can empirically improve the performance of our algorithms even further by adapting a similar line-search strategy in the weighting step as Frank-Wolfe, i.e., by choosing the weights wk in a greedy fashion to minimize the objective function. The practical improvements due to line-search appear quite significant. 5.2 Matrix completion with MovieLens dataset To demonstrate the flexibility of our framework, we consider the popular matrix completion (MC) application. In MC, we seek to estimate a low-rank matrix X P Rpˆl from its subsampled entries b P Rn, where Ap¨q is the sampling operator, i.e., ApXq “ b. 7 # iteration 100 101 102 103 (ϕ(X) −ϕ⋆)/ϕ⋆ 10-2 10-1 100 101 102 UniPDGrad AccUniPDGrad FrankWolfe # iteration 100 101 102 103 (RMSE - RMSE⋆) / RMSE⋆ 10-2 10-1 100 101 # iteration 0 1000 2000 3000 4000 5000 RMSE 1.05 1.07 1.09 1.11 1.13 computational time (min) 0 1 2 3 4 5 RMSE 1.05 1.07 1.09 1.11 1.13 Figure 2: The performance of the algorithms for the MC problems. The dashed lines correspond to the line-search (in the weighting step) variants, and the empty and the filled markers correspond to the formulation (20) and (21), respectively. Convex formulations involving the nuclear norm have been shown to be quite effective in estimating low-rank matrices from limited number of measurements [19]. For instance, we can solve min XPRpˆl " ϕpXq“ 1 n}ApXq ´ b}2 : }X}˚ ď κ * , (20) with Frank-Wolfe-type methods, where κ is a tuning parameter, which may not be available a priori. We can also solve the following parameter-free version min XPRpˆl " ψpXq “ 1 n}X}2 ˚ : ApXq “ b * . (21) While the nonsmooth objective of (21) prevents the tuning parameter, it clearly burdens the computational efficiency of the convex optimization algorithms. We apply our algorithms to (20) and (21) using the MovieLens 100K dataset. Frank-Wolfe algorithms cannot handle (21) and only solve (20). For this experiment, we did not pre-process the data and took the default ub test and training data partition. We start out algorithms form λ0 “ 0n, we set the target accuracy ϵ “ 10´3, and we choose the tuning parameter κ “ 9975{2 as in [20]. We use lansvd function (MATLAB version) from PROPACK [21] to compute the top singular vectors, and a simple implementation of the power method to find the top singular value in the line-search, both with 10´5 relative error tolerance. The first two plots in Figure 2 show the performance of the algorithms for (20). Our metrics are the normalized objective residual and the root mean squared error (RMSE) calculated for the test data. Since we do not have access to the optimal solutions, we approximated the optimal values, ϕ‹ and RMSE‹, by 5000 iterations of AccUniPDGrad. Other two plots in Figure 2 compare the performance of the formulations (20) and (21) which are represented by the empty and the filled markers, respectively. Note that, the dashed line for AccUniPDGrad corresponds to the line-search variant, where the weights wk are chosen to minimize the feasibility gap. Additional details about the numerical experiments can be found in the supplementary material. 6 Conclusions This paper proposes a new primal-dual algorithmic framework that combines the flexibility of proximal primal-dual methods in addressing the general template (1) while leveraging the computational advantages of the GCG-type methods. The algorithmic instances of our framework are universal since they can automatically adapt to the unknown H¨older continuity properties implied by the template. Our analysis technique unifies Nesterov’s universal gradient methods and GCG-type methods to address the more broadly applicable primal-dual setting. The hallmarks of our approach includes the optimal worst-case complexity and its flexibility to handle nonsmooth objectives and complex constraints, compared to existing primal-dual algorithm as well as GCG-type algorithms, while essentially preserving their low cost iteration complexity. Acknowledgments This work was supported in part by ERC Future Proof, SNF 200021-146750 and SNF CRSII2147633. We would like to thank Dr. Stephen Becker of University of Colorado at Boulder for his support in preparing the numerical experiments. 8 References [1] M. Jaggi, Revisiting Frank-Wolfe: Projection-free sparse convex optimization. J. Mach. Learn. Res. Workshop & Conf. Proc., vol. 28, pp. 427–435, 2013. [2] V. Cevher, S. Becker, and M. Schmidt. Convex optimization for big data: Scalable, randomized, and parallel algorithms for big data analytics. IEEE Signal Process. Mag., vol. 31, pp. 32–43, Sept. 2014. [3] M. J. Wainwright, Structured regularizers for high-dimensional problems: Statistical and computational issues. Annu. Review Stat. and Applicat., vol. 1, pp. 233–253, Jan. 2014. [4] G. Lan and R. D. C. Monteiro, Iteration-complexity of first-order augmented Lagrangian methods for convex programming. Math. Program., pp. 1–37, Jan. 2015, doi:10.1007/s10107015-0861-x. [5] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein, Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. and Trends in Machine Learning, vol. 3, pp. 1–122, Jan. 2011. [6] P. L. Combettes and J.-C. Pesquet, A proximal decomposition method for solving convex variational inverse problems. Inverse Problems, vol. 24, Nov. 2008, doi:10.1088/02665611/24/6/065014. [7] T. Goldstein, E. Esser, and R. Baraniuk, Adaptive primal-dual hybrid gradient methods for saddle point problems. 2013, http://arxiv.org/pdf/1305.0546. [8] R. Shefiand M. Teboulle, Rate of convergence analysis of decomposition methods based on the proximal method of multipliers for convex minimization. SIAM J. Optim., vol. 24, pp. 269– 297, Feb. 2014. [9] Q. Tran-Dinh and V. Cevher, Constrained convex minimization via model-based excessive gap. In Advances Neural Inform. Process. Syst. 27 (NIPS2014), Montreal, Canada, 2014. [10] A. Beck and M. Teboulle, A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sci., vol. 2, pp. 183–202, Mar. 2009. [11] Y. Nesterov, Smooth minimization of non-smooth functions. Math. Program., vol. 103, pp. 127– 152, May 2005. [12] A. Juditsky and A. Nemirovski, Solving variational inequalities with monotone operators on domains given by Linear Minimization Oracles. Math. Program., pp. 1–36, Mar. 2015, doi:10.1007/s10107-015-0876-3. [13] Y. Yu, Fast gradient algorithms for structured sparsity. PhD dissertation, Univ. Alberta, Edmonton, Canada, 2014. [14] Y. Nesterov, Complexity bounds for primal-dual methods minimizing the model of objective function. CORE, Univ. Catholique Louvain, Belgium, Tech. Rep., 2015. [15] Y. Nesterov, Universal gradient methods for convex optimization problems. Math. Program., vol. 152, pp. 381–404, Aug. 2015. [16] A. Nemirovskii and D. Yudin, Problem complexity and method efficiency in optimization. Hoboken, NJ: Wiley Interscience, 1983. [17] R. T. Rockafellar, Convex analysis (Princeton Math. Series), Princeton, NJ: Princeton Univ. Press, 1970. [18] D. Gross, Y.-K. Liu, S. T. Flammia, S. Becker, and J. Eisert, Quantum state tomography via compressed sensing. Phys. Rev. Lett., vol. 105, pp. Oct. 2010, doi:10.1103/PhysRevLett.105.150401. [19] E. Cand`es and B. Recht, Exact matrix completion via convex optimization. Commun. ACM, vol. 55, pp. 111–119, June 2012. [20] M. Jaggi and M. Sulovsk´y, A simple algorithm for nuclear norm regularized problems. In Proc. 27th Int. Conf. Machine Learning (ICML2010), Haifa, Israel, 2010, pp. 471–478. [21] R. M. Larsen, PROPACK - Software for large and sparse SVD calculations. Available: http: //sun.stanford.edu/„rmunk/PROPACK/. 9 | 2015 | 349 |
5,868 | Training Restricted Boltzmann Machines via the Thouless-Anderson-Palmer Free Energy Marylou Gabri´e Eric W. Tramel Florent Krzakala Laboratoire de Physique Statistique, UMR 8550 CNRS ´Ecole Normale Sup´erieure & Universit´e Pierre et Marie Curie 75005 Paris, France {marylou.gabrie, eric.tramel}@lps.ens.fr, florent.krzakala@ens.fr Abstract Restricted Boltzmann machines are undirected neural networks which have been shown to be effective in many applications, including serving as initializations for training deep multi-layer neural networks. One of the main reasons for their success is the existence of efficient and practical stochastic algorithms, such as contrastive divergence, for unsupervised training. We propose an alternative deterministic iterative procedure based on an improved mean field method from statistical physics known as the Thouless-Anderson-Palmer approach. We demonstrate that our algorithm provides performance equal to, and sometimes superior to, persistent contrastive divergence, while also providing a clear and easy to evaluate objective function. We believe that this strategy can be easily generalized to other models as well as to more accurate higher-order approximations, paving the way for systematic improvements in training Boltzmann machines with hidden units. 1 Introduction A restricted Boltzmann machine (RBM) [1, 2] is a type of undirected neural network with surprisingly many applications. This model has been used in problems as diverse as dimensionality reduction [3], classification [4], collaborative filtering [5], feature learning [6], and topic modeling [7]. Also, quite remarkably, it has been shown that generative RBMs can be stacked into multi-layer neural networks, forming an initialization for deep network architectures [8, 9]. Such deep architectures are believed to be crucial for learning high-order representations and concepts. Although the amount of training data available in practice has made pretraining of deep nets dispensable for supervised tasks, RBMs remain at the core of unsupervised learning, a key area for future developments in machine intelligence [10]. While the training procedure for RBMs can be written as a log-likelihood maximization, an exact implementation of this approach is computationally intractable for all but the smallest models. However, fast stochastic Monte Carlo methods, specifically contrastive divergence (CD) [2] and persistent CD (PCD) [11, 12], have made large-scale RBM training both practical and efficient. These methods have popularized RBMs even though it is not entirely clear why such approximate methods should work as well as they do. In this paper, we propose an alternative deterministic strategy for training RBMs, and neural networks with hidden units in general, based on the so-called mean-field, and extended mean-field, methods of statistical mechanics. This strategy has been used to train neural networks in a number of earlier works [13, 14, 15, 16, 17]. In fact, for entirely visible networks, the use of adaptive cluster expansion mean-field methods has lead to spectacular results in learning Boltzmann machine representations [18, 19]. 1 However, unlike these fully visible models, the hidden units of the RBM must be taken into account during the training procedure. In 2002, Welling and Hinton [17] presented a similar deterministic mean-field learning algorithm for general Boltzmann machines with hidden units, considering it a priori as a potentially efficient extension of CD. In 2008, Tieleman [12] tested the method in detail for RBMs and found it provided poor performance when compared to both CD and PCD. In the wake of these two papers, little inquiry has been made in this direction, with the apparent consensus being that the deterministic mean-field approach is ineffective for RBM training. Our goal is to challenge this consensus by going beyond na¨ıve mean field, a mere first-order approximation, by introducing second-, and possibly third-, order terms. In principle, it is even possible to extend the approach to arbitrary order. Using this extended mean-field approximation, commonly known as the Thouless-Anderson-Palmer [20] approach in statistical physics, we find that RBM training performance is significantly improved over the na¨ıve mean-field approximation and is even comparable to PCD. The clear and easy to evaluate objective function, along with the extensible nature of the approximation, paves the way for systematic improvements in learning efficiency. 2 Training restricted Boltzmann machines A restricted Boltzmann machine, which can be viewed as a two layer undirected bipartite neural network, is a specific case of an energy based model wherein a layer of visible units is fully connected to a layer of hidden units. Let us denote the binary visible and hidden units, indexed by i and j respectively, as vi and hj. The energy of a given state, v = {vi}, h = {hj}, of the RBM is given by E(v, h) = − X i aivi − X j bjhj − X i,j viWijhj, (1) where Wij are the entries of the matrix specifying the weights, or couplings, between the visible and hidden units, and ai and bj are the biases, or the external fields in the language of statistical physics, of the visible and hidden units, respectively. Thus, the set of parameters {Wij, ai, bj} defines the RBM model. The joint probability distribution over the visible and hidden units is given by the Gibbs-Boltzmann measure P(v, h) = Z−1e−E(v,h), where Z = P v,h e−E(v,h) is the normalization constant known as the partition function in physics. For a given data point, represented by v, the marginal of the RBM is calculated as P(v) = P h P(v, h). Writing this marginal of v in terms of its log-likelihood results in the difference L = ln P(v) = −F c(v) + F, (2) where F = −ln Z is the free energy of the RBM, and F c(v) = −ln(P h e−E(v,h)) can be interpreted as a free energy as well, but with visible units fixed to the training data point v. Hence, F c is referred to as the clamped free energy. One of the most important features of the RBM model is that F c can be easily computed as h may be summed out analytically since the hidden units are conditionally independent of the visible units, owing to the RBM’s bipartite structure. However, calculating F is computationally intractable since the number of possible states to sum over scales combinatorially with the number of units in the model. This complexity frustrates the exact computation of the gradients of the log-likelihood needed in order to train the RBM parameters via gradient ascent. Monte Carlo methods for RBM training rely on the observation that ∂F ∂Wij = P(vi = 1, hj = 1), which can be simulated at a lower computational cost. Nevertheless, drawing independent samples from the model in order to approximate this derivative is itself computationally expensive and often approximate sampling algorithms, such as CD or PCD, are used instead. 3 Extended mean field theory of RBMs Here, we present a physics-inspired tractable estimation of the free energy F of the RBM. This approximation is based on a high temperature expansion of the free energy derived by Georges and Yedidia in the context of spin glasses [21] following the pioneering works of [20, 22]. We refer the reader to [23] for a review of this topic. 2 To apply the Georges-Yedidia expansion to the RBM free energy, we start with a general energy based model which possesses arbitrary couplings Wij between undifferentiated binary spins si ∈ {0, 1}, such that the energy of the Gibbs-Boltzmann measure on the configuration s = {si} is defined by E(s) = −P i aisi −P (i,j) Wijsisj1. We also restore the role of the temperature, usually considered constant and for simplicity set to 1 in most energy based models, by multiplying the energy functional in the Boltzmann weight by the inverse temperature β. Next, we apply a Legendre transform to the free energy, a standard procedure in statistical physics, by first writing the free energy as a function of a newly introduced auxiliary external field q = {qi}, −βF[q] = ln P s e−βE(s)+β P i qisi. This external field will be eventually set to the value q = 0 in order to recover the true free energy. The Legendre transform Γ is then given as a function of the conjugate variable m = {mi} by maximizing over q, −βΓ[m] = −β max q [F[q] + X i qimi] = −β(F[q∗[m]] + X i q∗ i [m]mi), (3) where the maximizing auxiliary field q∗[m], a function of the conjugate variables, is the inverse function of m[q] ≡−dF dq . Since the derivative dF dq is exactly equal to −⟨s⟩, where the operator ⟨·⟩ refers to the average configuration under the Boltzmann measure, the conjugate variable m is in fact the equilibrium magnetization vector ⟨s⟩. Finally, we observe that the free energy is also the inverse Lengendre transform of its Legendre transform at q = 0, −βF = −βF[q = 0] = β min m [Γ[m]] = −βΓ[m∗], (4) where m∗minimizes Γ, which yields an expression of the free energy in terms of the magnetization vector. Following [22, 21], this formulation allows us to perform a high temperature expansion of A(β, m) ≡−βΓ[m] around β = 0 at fixed m, A(β, m) = A(0, m) + β ∂A(β, m) ∂β β=0 + β2 2 ∂2A(β, m) ∂β2 β=0 + · · · , (5) where the dependence on β of the product βq must carefully be taken into account. At infinite temperature, β = 0, the spins decorrelate, causing the average value of an arbitrary product of spins to equal the product of their local magnetizations; a useful property. Accounting for binary spins taking values in {0, 1}, one obtains the following expansion −βΓ(m) = − X i [mi ln mi + (1 −mi) ln(1 −mi)] + β X i aimi + β X (i,j) Wijmimj + β2 2 X (i,j) W 2 ij(mi −m2 i )(mj −m2 j) + 2β3 3 X (i,j) W 3 ij(mi −m2 i ) 1 2 −mi (mj −m2 j) 1 2 −mj + β3 X (i,j,k) WijWjkWki(mi −m2 i )(mj −m2 j)(mk −m2 k) + · · · 1 (6) The zeroth-order term corresponds to the entropy of non-interacting spins with constrained magnetizations values. Taking this expansion up to the first-order term, we recover the standard na¨ıve mean-field theory. The second-order term is known as the Onsager reaction term in the TAP equations [20]. The higher orders terms are systematic corrections which were first derived in [21]. Returning to the RBM notation and truncating the expansion at second-order for the remainder of the theoretical discussion, we have Γ(mv, mh) ≈S(mv, mh) − X i aimv i − X j bjmh j − X i,j Wijmv i mh j + W 2 ij 2 (mv i −(mv i )2)(mh j −(mh j )2), (7) 1The notation P (i,j) and P (i,j,k) refers to the sum over the distinct pairs and triplets of spins, respectively. 3 where S is the entropy contribution, mv and mh are introduced to denote the magnetization of the visible and hidden units, and β is set equal to 1. Eq. (7) can be viewed as a weak coupling expansion in Wij. To recover an estimate of the RBM free energy, Eq. (7) must be minimized with respect to its arguments, as in Eq. (4). Lastly, by writing the stationary condition dΓ dm = 0, we obtain the selfconsistency constraints on the magnetizations. At second-order we obtain the following constraint on the visible magnetizations, mv i ≈sigm ai + X j Wijmh j −W 2 ij mv i −1 2 mh j −(mh j )2 , (8) where sigm[x] = (1 + e−x)−1 is a logistic sigmoid function. A similar constraint must be satisfied for the hidden units, as well. Clearly, the stationarity condition for Γ obtained at order n utilizes terms up to the nth order within the sigmoid argument of these consistency relations. Whatever the order of the approximation, the magnetizations are the solutions of a set of non-linear coupled equations of the same cardinality as the number of units in the model. Finally, provided we can define a procedure to efficiently derive the value of the magnetizations satisfying these constraints, we obtain an extended mean-field approximation of the free energy which we denote as F EMF. 4 RBM evaluation and unsupervised training with EMF 4.1 An iteration for calculating F EMF Recalling the log-likelihood of the RBM, L = −F c(v) + F, we have shown that a tractable approximation of F, F EMF, is obtained via a weak coupling expansion so long as one can solve the coupled system of equations over the magnetizations shown in Eq. (8). In the spirit of iterative belief propagation [23], we propose that these self-consistency relations can serve as update rules for the magnetizations within an iterative algorithm. In fact, the convergence of this procedure has been rigorously demonstrated in the context of random spin glasses [24]. We expect that these convergence properties will remain present even for real data. The iteration over the self-consistency relations for both the hidden and visible magnetizations can be written using the time index t as mh j [t + 1] ←sigm " bj + X i Wijmv i [t] −W 2 ij mh j [t] −1 2 mv i [t] −(mv i [t])2 # , (9, 10) mv i [t + 1] ←sigm ai + X j Wijmh j [t + 1] −W 2 ij mv i [t] −1 2 mh j [t + 1] −(mh j [t + 1])2 , where the time indexing follows from application of [24]. The values of mv and mh minimizing Γ(mv, mh), and thus providing the value of F EMF, are obtained by running Eqs. (9, 10) until they converge to a fixed point. We note that while we present an iteration to find F EMF up to second-order above, third-order terms can easily be introduced into the procedure. 4.2 Deterministic EMF training By using the EMF estimation of F, and the iterative algorithm detailed in the previous section to calculate it, it is now possible to estimate the gradients of the log-likelihood used for unsupervised training of the RBM model by substituting F with F EMF. We note that the deterministic iteration we propose for estimating F is in stark contrast with the stochastic sampling procedures utilized in CD and PCD to the same end. The gradient ascent update of weight Wij is approximated as ∆Wij ∝ ∂L ∂Wij ≈−∂F c ∂Wij + ∂F EMF ∂Wij , (11) where ∂F EMF ∂Wij can be computed by differentiating Eq. (7) at fixed mv and mh and computing the value of this derivative at the fixed points of Eqs. (9, 10) obtained from the iterative procedure. The gradients with respect to the visible and hidden biases can be derived similarly. Interestingly, ∂F EMF ∂ai 4 and ∂F EMF ∂bj are merely the fixed-point magnetizations of the visible and hidden units, mv i and mh j , respectively. A priori, the training procedure sketched above can be used at any order of the weak coupling expansion. The training algorithm introduced in [17], which was shown to perform poorly for RBM training in [12], can be recovered by retaining only the first-order of the expansion when calculating F EMF. Taking F EMF to second-order, we expect that training efficiency and performance will be greatly improved over [17]. In fact, including the third-order term in the training algorithm is just as easy as including the second-order one, due to the fact that the particular structure of the RBM model does not admit triangles in its corresponding factor graphs. Although the third-order term in Eq. (6) does include a sum over distinct pairs of units, as well as a sum over coupled triplets of units, such triplets are excluded by the bipartite structure of the RBM. However, coupled quadruplets do contribute to the fourth-order term and therefore fourth- and higher-order approximations require much more expensive computations [21], though it is possible to utilize adaptive procedures [19]. 5 Numerical experiments 5.1 Experimental framework To evaluate the performance of the proposed deterministic EMF RBM training algorithm1, we perform a number of numerical experiments over two separate datasets and compare these results with both CD-1 and PCD. We first use the MNIST dataset of labeled handwritten digit images [25]. The dataset is split between 60 000 training images and 10 000 test images. Both subsets contain approximately the same fraction of the ten digit classes (0 to 9). Each image is comprised of 28× 28 pixels taking values in the range [0, 255]. The MNIST dataset was binarized by setting all non-zero pixels to 1 in all experiments. Second, we use the 28 × 28 pixel version of the Caltech 101 Silhouette dataset [26]. Constructed from the Caltech 101 image dataset, the silhouette dataset consists of black regions of the primary foreground scene objects on a white background. The images are labeled according to the object in the original picture, of which there are 101 unevenly represented object labels. The dataset is split between a training (4 100 images), a validation (2 264 images), and a test (2 304 images) sets. For both datasets, the RBM models require 784 visible units. Following previous studies evaluating RBMs on these datasets, we fix the number of RBM hidden units to 500 in all our experiments. During training, we adopt the mini-batch learning procedure for gradient averaging, with 100 training points per batch for MNIST and 256 training points per batch for Caltech 101 Silhouette. We test the EMF learning algorithm presented in Section 4.2 in various settings. First, we compare implementations utilizing the first-order (MF), second-order (TAP2), and third-order (TAP3) approximations of F. Higher orders were not considered due to their greater complexity. Next, we investigate training quality when the self-consistency relations on the magnetizations were not converged when calculating the derivatives of F EMF, instead iterated for a small, fixed (3) number of times, an approach similar to CD. Furthermore, we also evaluate a “persistent” version of our algorithm, similar to [12]. As in PCD, the iterative EMF procedure possesses multiple initializationdependent fixed-point magnetizations. Converging multiple chains allows us to collect proper statistics on these basins of attraction. In this implementation, the magnetizations of a set of points, dubbed fantasy particles, are updated and maintained throughout the training in order to estimate F. This persistent procedure takes advantage of the fact that the RBM-defined Boltzmann measure changes only slightly between parameter updates. Convergence to the new fixed point magnetizations at each minibatch should therefore be sped up by initializing with the converged state from the previous update. Our final experiments consist of persistent training algorithms using 3 iterations of the magnetization self-consistency relations (P-MF, P-TAP2 and P-TAP3) and one persistent training algorithm using 30 iterations (P-TAP2-30) for comparison. For comparison, we also train RBM models using CD-1, following the prescriptions of [27], and PCD, as implemented in [12]. Given that our goal is to compare RBM training approaches rather than achieving the best possible training across all free parameters, neither momentum nor adaptive learning rates were included in any of the implementations tested. However, we do employ a weight 1Available as a Julia package at https://github.com/sphinxteam/Boltzmann.jl 5 0 10 20 30 40 50 Epoch −0.12 −0.10 −0.08 −0.06 −0.04 pseudo L Units×Samples CD-1 PCD P-TAP3 TAP2 P-TAP2-30 P-MF P-TAP2 0 10 20 30 40 50 Epoch −0.12 −0.10 −0.08 −0.06 −0.04 LEMF Units×Samples Figure 1: Estimates of the per-sample log-likelihood over the MNIST test set, normalized by the total number of units, as a function of the number of training epochs. The results for the different training algorithms are plotted in different colors with the same color code used for both panels. Left panel : Pseudo log-likelihood estimate. The difference between EMF algorithms and contrastive divergence algorithms is minimal. Right panel : EMF log-likelihood estimate at 2nd order. The improvement from MF to TAP is clear. Perhaps reasonably, TAP demonstrates an advantage over CD and PCD. Notice how the second-order EMF approximation of L provides less noisy estimates, at a lower computational cost. decay regularization in all our trainings to keep weights small; a necessity for the weak coupling expansion on which the EMF relies. When comparing learning procedures on the same plot, all free parameters of the training (e.g. learning rate, weight decay, etc.) were set identically. All results are presented as averages over 10 independent trainings with standard deviations reported as error bars. 5.2 Relevance of the EMF log-likelihood Our first observation is that the implementations of the EMF training algorithms are not overly belabored. The free parameters relevant for the PCD and CD-1 procedures were found to be equally well suited for the EMF training algorithms. In fact, as shown in the left panel of Fig. 1, and the right inset of Fig. 3, the ascent of the pseudo log-likelihood over training epochs is very similar between the EMF training methods and both the CD-1 and PCD trainings. Interestingly, for the Caltech 101 Silhouettes dataset, it seems that the persistent algorithms tested have difficulties in ascending the pseudo-likelihood in the first epochs of training. This contradicts the common belief that persistence yields more accurate approximations of the likelihood gradients. The complexity of the training set, 101 classes unevenly represented over only 4 100 training points, might explain this unexpected behavior. The persistent fantasy particles all converge to similar noninformative blurs in the earliest training epochs with many epochs being required to resolve the particles to a distribution of values which are informative about the pseudo log-likelihood. Examining the fantasy particles also gives an idea of the performance of the RBM as a generative model. In Fig. 2, 24 randomly chosen fantasy particles from the 50th epoch of training with PCD, P-MF, and P-TAP2 are displayed. The RBM trained with PCD generates recognizable digits, yet the model seems to have trouble generating several digit classes, such as 3, 8, and 9. The fantasy particles extracted from a P-MF training are of poorer quality, with half of the drawn particles featuring non-identifiable digits. The P-TAP2 algorithm, however, appears to provide qualitative improvements. All digits can be visually discerned, with visible defects found only in two of the particles. These particles seem to indicate that it is indeed possible to efficiently persistently train an RBM without converging on the fixed point of the magnetizations. The relevance of the EMF log-likelihood for RBM training is further confirmed in the right panel of Fig. 1, where we observe that both CD-1 and PCD ascend the second-order EMF log-likelihood, even though they are not explicitly constructed to optimize over this objective. As expected, the persistent TAP2 algorithm with 30 iterations of the magnetizations (P-TAP2-30) achieves the best maximization of LEMF . However, P-TAP2, with only 3 iterations of the magnetizations, achieves very similar performance, perhaps making it preferable when a faster training algorithm is desired. 6 PCD-1 P-MF P-TAP Figure 2: Fantasy particles generated by a 500 hidden unit RBM after 50 epochs of training on the MNIST dataset with PCD (top two rows), P-MF (middle two rows) and P-TAP2 (bottom two rows). These fantasy particles represent typical samples generated by the trained RBM when used as a generative prior for handwritten numbers. The samples generated by P-TAP2 are of similar subjective quality, and perhaps slightly preferable, to those generated by PCD, while certainly preferable to those generated by P-MF. Moreover, we note that although P-TAP2 demonstrates improvements with respect to the P-MF, the P-TAP3 does not yield significantly better results than P-TAP2. This is perhaps not surprising since the third order term of the EMF expansion consists of a sum over as many terms as the second order, but at a smaller order in {Wij}. Lastly, we note the computation times for each of these approaches. For a Julia implementation of the tested RBM training techniques running on a 3.2 GHz Intel i5 processor, we report the 10 trial average wall times for fitting a single 100-sample batch normalized against the model complexity. PCD, which uses only a single sampling step, required 14.10±0.97 µs/batch/unit. The three EMF techniques, P-MF, P-TAP2, and P-TAP3, each of which use 3 magnetization iterations, required 21.25 ± 0.22 µs/batch/unit, 37.22 ± 0.34 µs/batch/unit, and 64.88 ± 0.45 µs/batch/unit, respectively. If fewer magnetization iterations are required, as we have empirically observed in limited tests, then the run times of the P-MF and P-TAP2 approaches are commesurate with PCD. 5.3 Classification task performance We also evaluate these RBM training algorithms from the perspective of supervised classification. An RBM can be interpreted as a deterministic function mapping the binary visible unit values to the real-valued hidden unit magnetizations. In this case, the hidden unit magnetizations represent the contributions of some learned features. Although no supervised fine-tuning of the weights is implemented, we tested the quality of the features learned by the different training algorithms by their usefulness in classification tasks. For both datasets, a logistic regression classifier was calibrated with the hidden units magnetizations mapped from the labeled training images using the scikit-learn toolbox [28]. We purposely avoid using more sophisticated classification algorithms in order to place emphasis on the quality of the RBM training, not the classification method. In Fig. 3, we see that the MNIST classification accuracy of the RBMs trained with the P-TAP2 algorithms is roughly equivalent with that obtained when using PCD training, while CD-1 training yields markedly poorer classification accuracy. The slight decrease in performance of CD-1 and TAP2 along as the training epochs increase might be emblematic of over-fitting by the non-persistent algorithms, although no decrease in the EMF test set log-likelihood was observed. Finally, for the Caltech 101 Silhouettes dataset, the classification task, shown in the right panel of Fig. 3, is much more difficult a priori. Interestingly, the persistent algorithms do not yield better results on this task. However, we observe that the performance of deterministic EMF RBM training is at least comparable with both CD-1 and PCD. 7 0 10 20 30 40 50 Epoch 0.92 0.94 0.96 Classification accuracy MNIST TAP2 P-TAP2 P-TAP2-30 P-TAP3 PCD CD-1 direct 0 20 40 60 80 100 Epoch 0.62 0.64 0.66 0.68 Classification accuracy CalTech Silhouette 101 0 40 80 Epoch −0.22 −0.16 −0.10 pseudo L Figure 3: Test set classification accuracy for the MNIST (left) and Caltech 101 Silhouette (right) datasets using logistic regression on the hidden-layer marginal probabilities as a function of the number of epochs. As a baseline comparison, the classification accuracy of logistic regression performed directly on the data is given as a black dashed line. The results for the different training algorithms are displayed in different colors, with the same color code being used in both panels. (Right inset:) Pseudo log-likelihood over training epochs for the Caltech 101 Silhouette dataset. 6 Conclusion We have presented a method for training RBMs based on an extended mean field approximation. Although a na¨ıve mean field learning algorithm had already been designed for RBMs, and judged unsatisfactory [17, 12], we have shown that extending beyond the na¨ıve mean field to include terms of second-order and above brings significant improvements over the first-order approach and allows for practical and efficient deterministic RBM training with performance comparable to the stochastic CD and PCD training algorithms. The extended mean field theory also provides an estimate of the RBM log-likelihood which is easy to evaluate and thus enables practical monitoring of the progress of unsupervised learning throughout the training epochs. Furthermore, training on real-valued magnetizations is theoretically wellfounded within the presented approach, paving the way for many possible extensions. For instance, it would be quite straightforward to apply the same kind of expansion to Gauss-Bernoulli RBMs, as well as to multi-label RBMs. The extended mean field approach might also be used to learn stacked RBMs jointly, rather than separately, as is done in both deep Boltzmann machine and deep belief network pre-training, a strategy that has shown some promise [29]. In fact, the approach can be generalized even to nonrestricted Boltzmann machines with hidden variables with very little difficulty. Another interesting possibility would be to make use of higher-order terms in the series expansion using adaptive cluster methods such as those used in [19]. We believe our results show that the extended mean field approach, and in particular the Thouless-Anderson-Palmer one, may be a good starting point to theoretically analyze the performance of RBMs and deep belief networks. Acknowledgments We would like to thank F. Caltagirone and A. Decelle for many insightful discussions. This research was funded by European Research Council under the European Union’s 7th Framework Programme (FP/2007-2013/ERC Grant Agreement 307087-SPARCS). 8 References [1] P. Smolensky. Chapter 6: Information Processing in Dynamical Systems: Foundations of Harmony Theory. Processing of the Parallel Distributed: Explorations in the Microstructure of Cognition, Volume 1: Foundations, 1986. [2] G. Hinton. Training products of experts by minimizing contrastive divergence. Neural Comp., 14:1771– 1800, 2002. [3] G. Hinton and R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [4] H. Larochelle and Y. Bengio. Classification using discriminative restricted Boltzmann machines. In ICML, pages 536–543, 2008. [5] R. Salakhutdinov, A. Mnih, and G. Hinton. Restricted Boltzmann machines for collaborative filtering. In ICML, pages 791–798, 2007. [6] A. Coates, A. Y. Ng, and H. Lee. An analysis of single-layer networks in unsupervised feature learning. In Intl. Conf. on Artificial Intelligence and Statistics, pages 215–223, 2011. [7] G. Hinton and R. Salakhutdinov. Replicated softmax: an undirected topic model. In NIPS, pages 1607– 1614, 2009. [8] R. Salakhutdinov and G. Hinton. Deep Boltzmann machines. In Intl. Conf. on Artificial Intelligence and Statistics, pages 448–455, 2009. [9] G. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural Comp., 18(7):1527—1554, 2006. [10] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, (521):436–444, May 2015. [11] R. M. Neal. Connectionist learning of deep belief networks. Artificial Int., 56(1):71–113, 1992. [12] T. Tieleman. Training restricted Boltzmann machines using approximations to the likelihood gradient. In ICML, pages 1064—1071, 2008. [13] C. Peterson and J. R. Anderson. A mean field theory learning algorithm for neural networks. Complex Systems, 1:995–1019, 1987. [14] G. Hinton. Deterministic Boltzmann learning performs steepest descent in weight-space. Neural Comp., 1(1):143–150, 1989. [15] C. C. Galland. The limitations of deterministic Boltzmann machine learning. Network, 4:355–379, 1993. [16] H. J. Kappen and F. B. Rodr´ıguez. Boltzmann machine learning using mean field theory and linear response correction. In NIPS, pages 280–286, 1998. [17] M. Welling and G. Hinton. A new learning algorithm for mean field Boltzmann machines. In Intl. Conf. on Artificial Neural Networks, pages 351–357, 2002. [18] S. Cocco, S. Leibler, and R. Monasson. Neuronal couplings between retinal ganglion cells inferred by efficient inverse statistical physics methods. PNAS, 106(33):14058–14062, 2009. [19] S. Cocco and R. Monasson. Adaptive cluster expansion for inferring Boltzmann machines with noisy data. Physical Review Letters, 106(9):90601, 2011. [20] D. J. Thouless, P. W. Anderson, and R. G. Palmer. Solution of ‘Solvable model of a spin glass’. Philosophical Magazine, 35(3):593–601, 1977. [21] A. Georges and J. S. Yedidia. How to expand around mean-field theory using high-temperature expansions. Journal of Physics A: Mathematical and General, 24(9):2173–2192, 1999. [22] T. Plefka. Convergence condition of the TAP equation for the infinite-ranged Ising spin glass model. Journal of Physics A: Mathematical and General, 15(6):1971–1978, 1982. [23] M. Opper and D. Saad. Advanced mean field methods: Theory and practice. MIT press, 2001. [24] E. Bolthausen. An iterative construction of solutions of the TAP equations for the Sherrington–Kirkpatrick model. Communications in Mathematical Physics, 325(1):333–366, 2014. [25] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of the IEEE, 86(11):2278–2323, 1998. [26] B. M. Marlin, K. Swersky, B. Chen, and N. de Freitas. Inductive principles for restricted Boltzmann machine learning. In Intl. Conf. on Artificial Intelligence and Statistics, pages 509–516, 2010. [27] G. Hinton. A practical guide to training restricted Boltzmann machines. Computer, 9:1, 2010. [28] F. Pedregosa et al. Scikit-learn: Machine learning in Python. JMLR, 12:2825–2830, 2011. [29] I. J. Goodfellow, A. Courville, and Y. Bengio. Joint training deep Boltzmann machines for classification. arXiv preprint: 1301.3568, 2013. 9 | 2015 | 35 |
5,869 | Adversarial Prediction Games for Multivariate Losses Hong Wang Wei Xing Kaiser Asif Brian D. Ziebart Department of Computer Science University of Illinois at Chicago Chicago, IL 60607 {hwang27, wxing3, kasif2, bziebart}@uic.edu Abstract Multivariate loss functions are used to assess performance in many modern prediction tasks, including information retrieval and ranking applications. Convex approximations are typically optimized in their place to avoid NP-hard empirical risk minimization problems. We propose to approximate the training data instead of the loss function by posing multivariate prediction as an adversarial game between a loss-minimizing prediction player and a loss-maximizing evaluation player constrained to match specified properties of training data. This avoids the non-convexity of empirical risk minimization, but game sizes are exponential in the number of predicted variables. We overcome this intractability using the double oracle constraint generation method. We demonstrate the efficiency and predictive performance of our approach on tasks evaluated using the precision at k, the F-score and the discounted cumulative gain. 1 Introduction For many problems in information retrieval and learning to rank, the performance of a predictor is evaluated based on the combination of predictions it makes for multiple variables. Examples include the precision when limited to k positive predictions (P@k), the harmonic mean of precision and recall (F-score), and the discounted cumulative gain (DCG) for assessing ranking quality. These stand in contrast to measures like the accuracy and (log) likelihood, which are additive over independently predicted variables. Many multivariate performance measures are not concave functions of predictor parameters, so maximizing them over empirical training data (or, equivalently, empirical risk minimization over a corresponding non-convex multivariate loss function) is computationally intractable [11] and can only be accomplished approximately using local optimization methods [10]. Instead, convex surrogates for the empirical risk are optimized using either an additive [21, 12, 22] or a multivariate approximation [14, 24] of the loss function. For both types of approximations, the gap between the application performance measure and the surrogate loss measure can lead to substantial sub-optimality of the resulting predictions [4]. Rather than optimizing an approximation of the multivariate loss for available training data, we take an alternate approach [26, 9, 1] that robustly minimizes the exact multivariate loss function using approximations of the training data. We formalize this using a zero-sum game between a predictor player and an adversarial evaluator player. Learned weights parameterize this game’s payoffs and enable generalization from training data to new predictive settings. The key computational challenge this approach poses is that the size of multivariate prediction games grows exponentially in the number of variables. We leverage constraint generation methods developed for solving large zerosum games [20] and efficient methods for computing best responses [6] to tame this complexity. In many cases, the structure of the multivariate loss function enables the zero-sum game’s Nash equilibrium to be efficiently computed. We formulate parameter estimation as a convex optimization problem and solve it using standard convex optimization methods. We demonstrate the benefits of this approach on prediction tasks with P@k, F-score and DCG multivariate evaluation measures. 1 2 Background and Related Work 2.1 Notation and multivariate performance functions We consider the general task of making a multivariate prediction for variables y = {y1, y2, . . . , yn} ∈Yn (with random variables denoted as Y = {Y1, Y2, . . . , Yn}) given some contextual information x = {x1, x2, . . . , xn} ∈X = {X1, X2, . . . , Xn} (with random variable, X). Each xi is the information relevant to predicted variable yi. We denote the estimator’s predicted values as ˆy = {ˆy1, ˆy2, . . . , ˆyn}. The multivariate performance measure when predicting ˆy when the true multivariate value is actually y is represented as a scoring function: score(ˆy, y). Equivalently, a complementary loss function for any score function based on the maximal score can be defined as: loss(ˆy, y) = maxy′,y′′ score(y′, y′′) −score(ˆy, y). For information retrieval, a vector of retrieved items from the pool of n items can be represented as ˆy ∈{0, 1}n and a vector of relevant items as y ∈{0, 1}n with x = {x1, x2, . . . , xn} denoting side contextual information (e.g., search terms and document contents). Precision and recall are important measures for information retrieval systems. However, maximizing either leads to degenerate solutions (predict all to maximize recall or predict none to maximize precision). The precision when limited to exactly k positive predictions, P@k(ˆy, y) = ˆy·y k where ||ˆy||1 = k, is one popular multivariate performance measure that avoids these extremes. Another is the Fscore, which is the harmonic mean of the precision and recall often used in information retrieval tasks. Using this notation, the F-score for a set of items can be simply represented as: F1(ˆy, y) = 2ˆy·y ||ˆy ||1+||y||1 and F1(0, 0) = 1. In other information retrieval tasks, a ranked list of retrieved items is desired. This can be represented as a permutation, σ, where σ(i) denotes the ith-ranked item (and σ−1(j) denotes the rank of the jth item). Evaluation measures that emphasize the top-ranked items are used, e.g., to produce search engine results attuned to actual usage. The discounted cumulative gain (DCG) measures the performance of item rankings with k relevancy scores, yi ∈{0, . . . , k −1} as: DCG(ˆσ, y) = Pn i=1 2 yˆσ(i)−1 log2(i+1) or DCG′(ˆσ, y) = yˆσ(1) + Pn i=2 yˆσ(i) log2 i. 2.2 Multivariate empirical risk minimization Empirical risk minimization [28] is a common supervised learning approach that seeks a predictor ˆP(ˆy|x) (from, e.g., a set of predictors Γ) that minimizes the loss under the empirical distribution of training data, denoted ˜P(y, x): min ˆ P (ˆy|x)∈Γ E ˜ P (y,x) ˆ P (ˆy|x)[loss( ˆY, Y)]. Multivariate losses are often not convex and finding the optimal solution is computationally intractable for expressive classes of predictors Γ typically specified by some set of parameters θ (e.g., linear discriminant functions: ˆP(ˆy|x) = 1 if θ · Φ(x, ˆy) > θ · Φ(x, y′) ∀y′ ̸= ˆy). Given these difficulties, convex surrogates to the multivariate loss are instead employed that are additive over ˆyi and yi (i.e., loss(ˆy, y) = P i loss(ˆyi, yi)). Employing the logarithmic loss, loss(ˆyi, yi) = −log ˆP( ˆYi = yi) yields the logistic regression model [9]. Using the hinge loss yields support vector machines [5]. Structured support vector machines [27] employ a convex approximation of the multivariate loss over a training dataset D using the hinge loss function: min θ,ξi≥0 ||θ||2 + α X i ξi such that ∀i, y′ ∈Y, θ · [Φ(x(i), y(i)) −Φ(x(i), y′)] ≥∆(y′, y(i)) −ξi. In other words, linear parameters θ for feature functions Φ(·, ·) are desired that make the example label y(i) have a potential value θ · Φ(x(i), y(i)) that is better than all alternative labels y′ by at least the multivariate loss between y′ and y(i), denoted ∆(y′, y(i)). When this is not possible for a particular example, a hinge loss penalty ξi is incurred that grows linearly with the difference in potentials. Parameter α controls a trade-off between obtaining a predictor with lower hinge loss or better discrimination between training examples (the margin). The size of set Y is often too large for explicit construction of the constraint set to be computationally tractable. Instead, constraint generation methods are employed to find a smaller set of active constraints. This can be viewed as either finding the most-violated constraint [27] or as a loss-augmented inference problem [25]. Our 2 approach employs similar constraint generation techniques—in the inference procedure rather than the parameter learning procedure—to improve its efficiency. 3 Multivariate Prediction Games We formulate a minimax game for multivariate loss optimization, describe our approach for limiting the computational complexity of solving this game, and describe algorithms for estimating parameters of the game and making predictions using this framework. 3.1 Game formulation Following a recent adversarial formulation for classification [1], we view multivariate prediction as a two-player game between player ˆY making predictions and player ˇY determining the evaluation distribution. Player ˆY first stochastically chooses a predictive distribution of variable assignments, ˆP(ˆy|x), to maximize a multivariate performance measure, then player ˇY stochastically chooses an evaluation distribution, ˇP(ˇy|x), that minimizes the performance measure. Further, player ˇY must choose the relevant items in a way that (approximately) matches in expectation with a set of statistics, Φ(x, y), measured from labeled data. We denote this set as Ξ. Definition 1. The multivariate prediction game (MPG) for n predicted variables is: max ˆ P (ˆy|x) min ˇ P (ˇy|x)∈Ξ E ˜ P (x) ˆ P (ˆy|x) ˇ P (ˇy|x) h score( ˆY, ˇY) i , (1) where ˆP(ˆy|x) and ˇP(ˇy|x) are distributions over combinations of labels for the n predicted variables and the set Ξ corresponds to the constraint: E ˜ P (x)P (ˇy|x) Φ(X, ˇY) = E ˜ P (y,x) [Φ(X, Y)] . Since the set Ξ constrains the adversary’s multivariate label distribution over the entire distribution of inputs ˜P(x), solving this game directly is impractical when the number of training examples is large. Instead, we employ the method of Lagrange multipliers in Theorem 1, which allows the set of games to be independently solved given Lagrange multipliers θ. Theorem 1. The multivariate prediction game’s value (Definition 1) can be equivalently obtained by solving a set of unconstrained maximin games parameterized by Lagrange multipliers θ: max ˆ P (ˆy|x) min ˇ P (ˇy|x)∈Ξ E ˜ P (x) ˆ P (ˆy|x) ˇ P (ˇy|x) h score( ˆY, ˇY) i (a) = min ˇ P (ˇy|x)∈Ξ max ˆ P (ˆy|x) E ˜ P (x) ˆ P (ˆy|x) ˇ P (ˇy|x) h score( ˆY, ˇY) i (b) = max θ E ˜ P (y,x) [θ · Φ(X, Y)] + X x∈X ˜P(x) min ˇ P (ˇy|x) max ˆ P (ˆy|x) score(ˆy, ˇy) −θ · Φ(x, ˇy) | {z } C C C′ ˆy,ˇy , (2) where: Φ(x, y) is a vector of features characterizing the set of prediction variables {yi} and provided contextual variables {xi} each related to predicted variable yi. Proof (sketch). Equality (a) is a consequence of duality in zero-sum games [29]. Equality (b) is obtained by writing the Lagrangian and taking the dual. Strong Lagrangian duality is guaranteed when a feasible solution exists on the relative interior of the convex constraint set Ξ [2]. (A small amount of slack corresponds to regularization of the θ parameter in the dual and guarantees the strong duality feasibility requirement is satisfied in practice.) The resulting game’s payoff matrix can be expressed as the original game scores of Eq. (1) augmented with Lagrangian potentials. The combination defines a new payoff matrix with entries CCC′ ˆy,ˇy = score(ˆy, ˇy) −θ · Φ(x, ˇy), as shown in Eq. (2). 3.2 Example multivariate prediction games and small-scale solutions Examples of the Lagrangian payoff matrices for the P@2, F-score, and DCG games are shown in Table 1 for three variables. We employ additive feature functions, Φ(x, ˇy) = Pn i=1 φ(xi) I(ˇyi = 1), 3 Table 1: The payoff matrices for the zero-sum games between player ˇY choosing columns and player ˆY choosing rows with three variables for: precision at k (top); F-score (middle) and DCG with binary relevance values, ˇyi ∈{0, 1}, and we let lg 3 ≜log2 3 (bottom). P@2 000 001 010 011 100 101 110 111 011 0 1 2−ψ3 1 2−ψ2 1−ψ2−ψ3 0−ψ1 1 2−ψ1−ψ3 1 2−ψ1−ψ2 1−ψ1−ψ2−ψ3 101 0 1 2−ψ3 0−ψ2 1 2−ψ2−ψ3 1 2−ψ1 1−ψ1−ψ3 1 2−ψ1−ψ2 1−ψ1−ψ2−ψ3 110 0 0−ψ3 1 2−ψ2 1 2−ψ2−ψ3 1 2−ψ1 1 2−ψ1−ψ3 1−ψ1−ψ2 1−ψ1−ψ2−ψ3 F1 000 001 010 011 100 101 110 111 000 1 0−ψ3 0−ψ2 0−ψ2 −ψ3 0−ψ1 0−ψ1−ψ3 0−ψ1−ψ2 0−ψ1−ψ2 −ψ3 001 0 1−ψ3 0−ψ2 2 3−ψ2 −ψ3 0−ψ1 2 3−ψ1−ψ3 0−ψ1−ψ2 1 2−ψ1−ψ2 −ψ3 010 0 0−ψ3 1−ψ2 2 3−ψ2 −ψ3 0−ψ1 0−ψ1−ψ3 2 3−ψ1−ψ2 1 2−ψ1−ψ2 −ψ3 011 0 2 3−ψ3 2 3−ψ2 1−ψ2 −ψ3 0−ψ1 1 2−ψ1−ψ3 1 2−ψ1−ψ2 4 5−ψ1−ψ2 −ψ3 100 0 0−ψ3 0−ψ2 0−ψ2 −ψ3 1−ψ1 2 3−ψ1−ψ3 2 3−ψ1−ψ2 1 2−ψ1−ψ2 −ψ3 101 0 2 3−ψ3 0−ψ2 1 2−ψ2 −ψ3 2 3−ψ1 1−ψ1−ψ3 1 2−ψ1−ψ2 4 5−ψ1−ψ2 −ψ3 110 0 0−ψ3 2 3−ψ2 1 2−ψ2 −ψ3 2 3−ψ1 1 2−ψ1−ψ3 1−ψ1−ψ2 4 5−ψ1−ψ2 −ψ3 111 0 1 2−ψ3 1 2−ψ2 4 5−ψ2 −ψ3 1 2−ψ1 4 5−ψ1−ψ3 4 5−ψ1−ψ2 1−ψ1−ψ2 −ψ3 DCG 000 001 010 011 100 101 110 111 123 0 1 2−ψ3 1 lg 3−ψ2 1 2+ 1 lg 3−ψ2−ψ3 1−ψ1 3 2−ψ1−ψ3 1+ 1 lg 3−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 132 0 1 lg 3−ψ3 1 2 −ψ2 1 2+ 1 lg 3−ψ2−ψ3 1−ψ1 1+ 1 lg 3−ψ1−ψ3 3 2−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 213 0 1 2−ψ3 1−ψ2 3 2−ψ2−ψ3 1 lg 3−ψ1 1 2+ 1 lg 3−ψ1−ψ3 1+ 1 lg 3−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 231 0 1 lg 3−ψ3 1−ψ2 1+ 1 lg 3−ψ2−ψ3 1 2−ψ1 1 2+ 1 lg 3−ψ1−ψ3 3 2−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 312 0 1−ψ3 1 2 −ψ2 3 2−ψ2−ψ3 1 lg 3−ψ1 1+ 1 lg 3−ψ1−ψ3 1 2+ 1 lg 3−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 321 0 1−ψ3 1 lg 3−ψ2 1+ 1 lg 3−ψ2−ψ3 1 2−ψ1 3 2−ψ1−ψ3 1 2+ 1 lg 3−ψ1−ψ2 3 2+ 1 lg 3−ψ1−ψ2−ψ3 in these examples (with indicator function I(·)). We compactly represent the Lagrangian potential terms for each game with potential variables, ψi ≜θ · φ(Xi = xi) when ˇYi = 1 (and 0 otherwise). Zero-sum games such as these can be solved using a pair of linear programs that have a constraint for each pure action (set of variable assignments) in the game [29]: max v, ˆ P (ˆy|x)≥0 v such that v ≤ X ˆy∈Y ˆP(ˆy|x)CCC′ ˆy,ˇy ∀ˆy ∈Y and X ˆy∈Y ˆP(ˆy|x) = 1; (3) min v, ˇ P (ˇy|x)≥0v such that v ≥ X ˇy∈Y ˇP(ˇy|x)CCC′ ˆy,ˇy ∀ˇy ∈Y and X ˇy∈Y ˇP(ˇy|x) = 1, (4) where CCC′ is the Lagrangian-augmented payoff and v is the value of the game. The second player to act in a zero-sum game can maximize/minimize using a pure strategy (i.e., a single value assignment to all variables). Thus, these LPs consider only the set of pure strategies of the opponent to find the first player’s mixed equilibrium strategy. The equilibrium strategy for the predictor is a distribution over rows and the equilibrium strategy for the adversary is a distribution over columns. The size of each game’s payoff matrix grows exponentially with the number of variables, n: (2n) n k for the precision at k game; (2n)2 for the F-score game; and (n! kn) for the DCG game with k possible relevance levels. These sizes make explicit construction of the game matrix impractical for all but the smallest of problems. 3.3 Large-scale strategy inference More efficient methods for obtaining Nash equilibria are needed to scale our MPG approach to large prediction tasks with exponentially-sized payoff matrices. Though much attention has focused on efficiently computing ϵ-Nash equilibria (e.g., in O(1/ϵ) time or O(ln(1/ϵ)) time [8]), which guarantee each player a payoff within ϵ of optimal, we employ an approach for finding an exact equilibrium that works well in practice despite not having as strong theoretical guarantees [20]. 4 Table 2: The reduced precision at k game with ψ1 = ψ2 = ψ3 = 0.4 (top) and Fscore game with ψ1 = ψ2 = ψ3 = 0 (bottom). 011 101 110 011 0.2 -0.3 -0.3 101 -0.3 0.2 -0.3 111 -0.3 -0.3 0.2 000 001 010 100 000 0 1 1 1 111 1 1 2 1 2 1 2 Consider the reduced game matrices of Table 2. The Nash equilibrium for the precision at k game with Lagrangian potentials ψ1 = ψ2 = ψ3 = 0.4 is: ˆP(ˆy|x) = 1 3 1 3 1 3 and ˇP(ˇy|x) = 1 3 1 3 1 3 ; with a game value of −2 15. The Nash equilibrium for the reduced F-score game with no learning (i.e., ψ1 = ψ2 = ψ3 = 0) is: ˆP(ˆy|x) = 1 3 2 3 and ˇP(ˇy|x) = 1 3 2 9 2 9 2 9 ; with a game value of 2 3. The reduced game equilibrium is also an equilibrium of the original game. Though the exact size of the subgame and its specific actions depends on the values of ψ, often a compact sub-game with identical equilibrium or close approximation exists [18]. Motivated by the compactness of the reduced game, we employ a constraint generation approach known as the double oracle algorithm [20] to iteratively construct an appropriate reduced game that provides the correct equilibrium but avoids the computational complexity of the original exponentially sized game. Algorithm 1 Constraint generation game solver Input: Lagrange potentials for each variable, ψ = {ψ1, ψ2, . . . , ψn}; initial action sets ˆS0 and ˇS0 Output: Nash equilibrium, ˆP(ˆy|x), ˇP(ˇy|x) 1: Initialize Player ˆY ’s action set ˆS ←ˆS0 and Player ˇY ’s action set ˇS ←ˇS0 2: CCC′ ←buildPayoffMatrix( ˆS, ˇS, ψ) ▷Using Eq. (2) for the sub-game matrix of ˆS × ˇS 3: repeat 4: [ ˆP(ˆy|x), vNash1] ←solveZeroSumGame ˆY (CCC′) ▷Using the LP of Eq. (3) 5: [ˇa, ˇvBR] ←findBestResponseAction(P(ˆy|x), ψ) ▷ˇa denotes the best response action 6: if (vNash1 ̸= ˇvBR) then ▷Check if best response provides improvement 7: ˇS ←ˇS ∪ˇa 8: CCC′ ←buildPayoffMatrix( ˆS, ˇS, ψ) ▷Add new row to game matrix 9: end if 10: [ ˇP(ˇy|x), vNash2] ←solveZeroSumGame ˇY (CCC′) ▷Using the LP of Eq. (4) 11: [ˆa, ˆvBR] ←findBestResponseAction(P(ˇy|x), ψ) 12: if (vNash2 ̸= ˆvBR) then 13: ˆS ←ˆS ∪ˆa 14: CCC′ ←buildPayoffMatrix( ˆS, ˇS, ψ) ▷Add new column to game matrix 15: end if 16: until (vNash1 = vNash2 = ˆvBR = ˇvBR) ▷Stop if neither best response provides improvement 17: return [ ˆP(ˆy|x), ˇP(ˇy|x)] Neither player can improve upon their strategy with additional pure strategies when Algorithm 1 terminates, thus the mixed strategies it returns are a Nash equilibrium pair [20]. Additionally, the algorithm is efficient in practice so long as each player’s strategy is compact (i.e., the number of actions with non-zero probability is a polynomial subset of the label combinations) and best responses to opponents’ strategies can be obtained efficiently (i.e., in polynomial time) for each player. Additionally, this algorithm can be modified to find approximate equilibria by limiting the number of actions for each player’s set ˆS and ˇS. 3.4 Efficiently computing best responses The tractability of our approach largely rests on our ability to efficiently find best responses to opponent strategies: argmaxˆy∈ˆ Y E ˇ P (ˇy|x)[CCC′ ˆy, ˇY ] and argminˇy∈ˇ Y E ˆ P (ˆy|x)[CCC′ ˆY ,ˇy]. For some combinations of loss functions and features, finding the best response is trivial using, e.g., a greedy selection algorithm. Other loss function/feature combinations require specialized algorithms or are NP-hard. We illustrate each situation. Precision at k best response Many best responses can be obtained using greedy algorithms that are based on marginal probabilities of the opponent’s strategy. For example, the expected payoff in 5 the precision at k game for the estimator player setting ˆyi = 1 is ˇP(ˇyi = 1|x). Thus, the set of top k variables with the largest marginal label probability provides the best response. For the adversary’s best response, the Lagrangian terms must also be included. Since k is a known variable, as long as the value of each included term, ˆP(ˆyi = 1, ||ˆy||1 = k|x) −kψi, is negative, the sum is the smallest, and the corresponding response is the best for the adversary. F-score game best response We leverage a recently developed method for efficiently maximizing the F-score when a distribution over relevant documents is given [6]. The key insight is that the problem can be separated into an inner greedy maximization over item sets of a certain size k and an outer maximization to select the best set size k from {0, . . . , n}. This method can be directly applied to find the best response of the estimator player, ˆY , since the Lagrangian terms of the cost matrix are invariant to the choice of ˆy. Algorithm 2 obtains the best response for the adversary player, ˇY , using slight modifications to incorporate the Lagrangian potentials into the objective function. Algorithm 2 Lagrangian-augmented F-measure Maximizer for adversary player ˇY Input: vector ˆP of estimator probabilities and Lagrange potentials ψ (ψ1, ψ2, ..., ψn) 1: define matrix W W W with element W W W s,k = 1 s+k, s, k ∈{1, ..., n} 2: construct matrix FFF = ˆP × W W W −1 2ψT × 1n ▷1n is the all ones 1 × n vector 3: for k = 1 to n do 4: solve the inner optimization problem: 5: a(k)∗= argmina∈Ak 2 Pn i=1 aifik ▷Ak = {a ∈{0, 1}n| Pn i=1 ai = k} 6: by setting a(k) i = 1 for the k-th column of FFF’s smallest k elements, and ai = 0 for the rest; 7: store a value of Ey∼p( ˆY|x)[FFF(y, a(k)∗)] = 2 Pn i=1 a(k)∗ i fik 8: end for 9: for k = 0 take a(k)∗= 0n, and Ey∼P ( ˆY|x)[FFF(y, 0n)] = p( ˆY = 0n|x) 10: solve the outer optimization problem: 11: a∗= argmina∈{a(0)∗,...,a(n)∗} Ey∼p( ˆY|x)[FFF(y, a)] 12: return a∗and Ey∼p( ˆY|x)[FFF(y, a∗)] Order inversion best response Another common loss measure when comparing two rankings is the number of pairs of items with inverted order across rankings (i.e., one variable may occur before another in one ranking, but not in the other ranking). Only the marginal probabilities of pairwise orderings, ˆP(ˆσ−1(i) > ˆσ−1(j)) ≜P ˆσ ˆP(ˆσ) I(σ−1(i) > σ−1(j)), are needed to construct the portion of the payoff received for ˇσ ranking item i over item j, ˆP(ˆσ−1(i) > ˆσ−1(j))(1 + ψi>j), where ψi>j is a Lagrangian potential based on pair-wise features for ranking item i over item j. One could construct a fully connected directed graph with edges weighted by these portions of the payoff for ranking pairs of items. The best response for ˇσ corresponds to a set of acyclic edges with the smallest sum of edge weights. Unfortunately, this problem is NP-hard in general because the NP-complete minimum feedback arc set problem [15], which seeks to form an acyclic graph by removing the set of edges with the minimal sum of edge weights, can be reduced to it. DCG best response Although we cannot find an efficient algorithm to get the best response using order inversion, solving best response of DCG has a known efficient algorithm. In this problem the maximizer is a permutation of the documents while the minimizer is the relevance score of each document pair. The estimator’s best response ˆσ maximizes: X ˇy P(ˇy|x) n X i=1 2ˇyˆσ(i) −1 log2(i + 1) −θ · φ(x, ˇy) ! = n X i=1 1 log2(i + 1) X ˇy P(ˇy|x)2ˇyˆσ(i) −1 ! −c, where c is a constant that has no relationship with ˆσ. Since 1/log2(i + 1) is monotonically decreasing, computing and sorting P ˇy P(ˇy|x)2ˇyi −1 with descending order and greedily assign the order to ˆσ is optimal. The adversary’s best response using additive features minimizes: X ˆσ P(ˆσ|x) n X i=1 2ˇyˆσ(i) −1 log2(i + 1) − n X i=1 θi · φi(xi, ˇyi) = n X i=1 X ˆσ P(ˆσ|x) 2ˇyi −1 log2(σ−1(i) + 1) −θi · φi(xi, ˇyi) ! . 6 Thus, by using the expectation of a function of each variable’s rank, 1/(log2(σ−1(i) + 1), which is easily computed from ˆP(σ), each variable’s relevancy score ˇyi can be independently chosen. 3.5 Parameter estimation Predictive model parameters, θ, must be chosen to ensure that the adversarial distribution is similar to training data. Though adversarial prediction can be posed as a convex optimization problem [1], the objective function is not smooth. General subgradient methods require O(1/ϵ2) iterations to provide an ϵ approximation to the optima. We instead employ L-BFGS [19], which has been empirically shown to converge at a faster rate in many cases despite lacking theoretical guarantees for non-smooth objectives [16]. We also employ L2 regularization to avoid overfitting to the training data sample. The addition of the smooth regularizer often helps to improve the rate of convergence. The gradient in these optimizations with L2 regularization, −λ 2 ||θ||2, for training dataset D = {(x(i), y(i))} is the difference between feature moments with additional regularization term: 1 |D| P|D| j=1 Φ(x(i), y(i)) −P ˇy∈Y ˇP(ˇy|x(i))Φ(x(i), ˇy) −λθ. The adversarial strategies ˇP(·|x(i)) needed for calculating this gradient are computed via Alg. 1. 4 Experiments We evaluate our approach, Multivariate Prediction Games (MPG), on the three performance measures of interest in this work: precision at k, F-score, and DCG. Our primary point of comparison is with structured support vector machines (SSVM)[27] to better understand the trade-offs between convexly approximating the loss function with the hinge loss versus adversarially approximating the training data using our approach. We employ an optical recognition of handwritten digits (OPTDIGITS) dataset [17] (10 classes, 64 features, 3,823 training examples, 1,797 test examples), an income prediction dataset (‘a4a’ ADULT1 [17] (two classes, 123 features, 3,185 training examples, 29,376 test examples), and query-document pairs from the million query TREC 2007 (MQ2007) dataset of LETOR4.0 [23] (1700 queries, 41.15 documents on average per query, 46 features per document). Following the same evaluation method used in [27] for OPTDIGITS, the multi-class dataset is converted into multiple binary datasets and we report the macro-average of the performance of all classes on test data. For OPTDIGITS/ADULT, we use a random 1 3 of the training data as a holdout validation data to select the L2 regularization parameter trade-off C ∈{2−6, 2−5, ..., 26}. Table 3: Precision at k (top) and F-score performance (bottom). Precision@k OPTDIGITS ADULT MPG 0.990 0.805 SSVM 0.956 0.638 SSVM’ 0.989 0.805 F-score OPTDIGITS ADULT MPG 0.920 0.697 SSVM 0.915 0.673 LR 0.914 0.639 We evaluate the performance of our approach and comparison methods (SSVM variants2 and logistic regression (LR)) using precision at k, where k is half the number of positive examples (i.e. k = 1 2POS), and F-score. For precision at k, we restrict the pure strategies of the adversary to select k positive labels. This prevents adversary strategies with no positive labels. From the results in Table 3, we see that our approach, MPG, works better than SSVM on the OPTDGITS datasets: slightly better on precision at k and more significantly better on F-measure. For the ADULT dataset, MPG provides equivalent performance for precision at k and better performance on Fmeasure. The nature of the running time required for validation and testing is very different for SSVM, which must find the maximizing set of variable assignments, and MPG, which must interactively construct a game and its equilibrium. Model validation and testing require ≈30 seconds for SSVM on the OPTDIGITS dataset and ≈3 seconds on the ADULT dataset, while requiring ≈9 seconds and ≈25 seconds for MPG precision at k and ≈1397 seconds and ≈252 seconds for MPG F-measure optimization, respectively. For precision at k, MPG is within an order of magni1 http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/binary.html) 2For precision at k, the original SSVM’s implementation uses the restriction k during training, but not during testing. We modified the code by ordering SSVM’s prediction value for each test example, and select the top k predictions as positives, the rest are considered as negatives. We denote the original implementation as SSVM, and the modified version as SSVM’. 7 tude (better for OPTDIGITS, worse for ADULT). For the more difficult problem of maximizing the F-score of ADULT over 29, 376 test examples, the MPG game becomes quite large and requires significantly more computational time. Though our MPG method is not as finely optimized as existing SSVM implementations, this difference in run times will remain as the game formulation is inherently more computationally demanding for difficult prediction tasks. Figure 1: NDCG@K as K increases. We compare the performance of our approach and comparison methods using five-fold cross validation on the MQ2007 dataset. We measure performance using Normalized DCG (NDCG), which divides the realized DCG by the maximum possible DCG for the dataset, based on a slightly different variant of DCG employed by LETOR4.0: DCG′′(ˆσ, y) = 2yˆσ(1) −1+Pn i=2 2 yˆσ(i)−1 log2 i . The comparison methods are: RankSVM-Struct [13], part of SVMstruct which uses structured SVM to predict the rank; ListNet [3], a list-wise ranking algorithm employing cross entropy loss; AdaRank-NDCG [30], a boosting method using ‘weak rankers’ and data reweighing to achieve good NDCG performance; AdaRank-MAP uses Mean Average Precision (MAP) rather than NDCG; and RankBoost [7], which reduces ranking to binary classification problems on instance pairs. Table 4: MQ2007 NDCG Results. Method Mean NDCG MPG 0.5220 RankSVM 0.4966 ListNet 0.4988 AdaRank-NDCG 0.4914 AdaRank-MAP 0.4891 RankBoost 0.5003 Table 4 reports the NDCG@K averaged over all values of K (between 1 and, on average 41) while Figure 1 reports the results for each value of K between 1 and 10. From this, we can see that our MPG approach provides better rankings on average than the baseline methods except when K is very small (K = 1, 2). In other words, the adversary focuses most of its effort in reducing the score received from the first item in the ranking, but at the expense of providing a better overall NDCG score for the ranking as a whole. 5 Discussion We have extended adversarial prediction games [1] to settings with multivariate performance measures in this paper. We believe that this is an important step in demonstrating the benefits of this approach in settings where structured support vector machines [14] are widely employed. Our future work will investigate improving the computational efficiency of adversarial methods and also incorporating structured statistical relationships amongst variables in the constraint set in addition to multivariate performance measures. Acknowledgments This material is based upon work supported by the National Science Foundation under Grant No. #1526379, Robust Optimization of Loss Functions with Application to Active Learning. References [1] Kaiser Asif, Wei Xing, Sima Behpour, and Brian D. Ziebart. Adversarial cost-sensitive classification. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2015. [2] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [3] Zhe Cao, Tao Qin, Tie-Yan Liu, Ming-Feng Tsai, and Hang Li. Learning to rank: from pairwise approach to listwise approach. In Proceedings of the International Conference on Machine Learning, pages 129– 136. ACM, 2007. [4] Corinna Cortes and Mehryar Mohri. AUC optimization vs. error rate minimization. In Advances in Neural Information Processing Systems, pages 313–320, 2004. [5] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3):273–297, 1995. 8 [6] 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. [7] Yoav Freund, Raj Iyer, Robert E Schapire, and Yoram Singer. An efficient boosting algorithm for combining preferences. The Journal of machine learning research, 4:933–969, 2003. [8] Andrew Gilpin, Javier Pe˜na, and Tuomas Sandholm. First-order algorithm with o (ln (1/e)) convergence for e-equilibrium in two-person zero-sum games. In AAAI Conference on Artificial Intelligence, pages 75–82, 2008. [9] Peter D. Gr¨unwald and A. Phillip Dawid. Game theory, maximum entropy, minimum discrepancy, and robust Bayesian decision theory. Annals of Statistics, 32:1367–1433, 2004. [10] Tamir Hazan, Joseph Keshet, and David A McAllester. Direct loss minimization for structured prediction. In Advances in Neural Information Processing Systems, pages 1594–1602, 2010. [11] Klaus-Uwe Hoffgen, Hans-Ulrich Simon, and Kevin S Vanhorn. Robust trainability of single neurons. Journal of Computer and System Sciences, 50(1):114–125, 1995. [12] Martin Jansche. Maximum expected F-measure training of logistic regression models. In Proceedings of the Conference on Human Language Technology and Empirical Methods in Natural Language Processing, pages 692–699. Association for Computational Linguistics, 2005. [13] Thorsten Joachims. Optimizing search engines using clickthrough data. In Proceedings of the International Conference on Knowledge Discovery and Data Mining, pages 133–142. ACM, 2002. [14] Thorsten Joachims. A support vector method for multivariate performance measures. In Proceedings of the International Conference on Machine Learning, pages 377–384. ACM, 2005. [15] Richard M. Karp. Reducibility among combinatorial problems. Springer, 1972. [16] Adrian S Lewis and Michael L Overton. Nonsmooth optimization via BFGS. 2008. [17] M. Lichman. UCI machine learning repository, 2013. [18] Richard J Lipton and Neal E Young. Simple strategies for large zero-sum games with applications to complexity theory. In Proc. of the ACM Symposium on Theory of Computing, pages 734–740. ACM, 1994. [19] Dong C Liu and Jorge Nocedal. On the limited memory BFGS method for large scale optimization. Mathematical programming, 45(1-3):503–528, 1989. [20] H Brendan McMahan, Geoffrey J Gordon, and Avrim Blum. Planning in the presence of cost functions controlled by an adversary. In Proceedings of the International Conference on Machine Learning, pages 536–543, 2003. [21] David R Musicant, Vipin Kumar, and Aysel Ozgur. Optimizing F-measure with support vector machines. In FLAIRS Conference, pages 356–360, 2003. [22] Shameem Puthiya Parambath, Nicolas Usunier, and Yves Grandvalet. Optimizing F-measures by costsensitive classification. In Advances in Neural Information Processing Systems, pages 2123–2131, 2014. [23] Tao Qin and Tie-Yan Liu. Introducing LETOR 4.0 datasets. arXiv preprint arXiv:1306.2597, 2013. [24] Mani Ranjbar, Greg Mori, and Yang Wang. Optimizing complex loss functions in structured prediction. In Proceedings of the European Conference on Computer Vision, pages 580–593. Springer, 2010. [25] Ben Taskar, Vassil Chatalbashev, Daphne Koller, and Carlos Guestrin. Learning structured prediction models: A large margin approach. In Proceedings of the International Conference on Machine Learning, pages 896–903. ACM, 2005. [26] Flemming Topsøe. Information theoretical optimization techniques. Kybernetika, 15(1):8–27, 1979. [27] Ioannis Tsochantaridis, Thomas Hofmann, Thorsten Joachims, and Yasemin Altun. Support vector machine learning for interdependent and structured output spaces. In Proceedings of the International Conference on Machine Learning, page 104. ACM, 2004. [28] Vladimir Vapnik. Principles of risk minimization for learning theory. In Advances in Neural Information Processing Systems, pages 831–838, 1992. [29] John von Neumann and Oskar Morgenstern. Theory of Games and Economic Behavior. Princeton University Press, 1947. [30] Jun Xu and Hang Li. Adarank: a boosting algorithm for information retrieval. In Proc. of the International Conference on Research and Development in Information Retrieval, pages 391–398. ACM, 2007. 9 | 2015 | 350 |
5,870 | Variational Information Maximisation for Intrinsically Motivated Reinforcement Learning Shakir Mohamed and Danilo J. Rezende Google DeepMind, London {shakir, danilor}@google.com Abstract The mutual information is a core statistical quantity that has applications in all areas of machine learning, whether this is in training of density models over multiple data modalities, in maximising the efficiency of noisy transmission channels, or when learning behaviour policies for exploration by artificial agents. Most learning algorithms that involve optimisation of the mutual information rely on the Blahut-Arimoto algorithm — an enumerative algorithm with exponential complexity that is not suitable for modern machine learning applications. This paper provides a new approach for scalable optimisation of the mutual information by merging techniques from variational inference and deep learning. We develop our approach by focusing on the problem of intrinsically-motivated learning, where the mutual information forms the definition of a well-known internal drive known as empowerment. Using a variational lower bound on the mutual information, combined with convolutional networks for handling visual input streams, we develop a stochastic optimisation algorithm that allows for scalable information maximisation and empowerment-based reasoning directly from pixels to actions. 1 Introduction The problem of measuring and harnessing dependence between random variables is an inescapable statistical problem that forms the basis of a large number of applications in machine learning, including rate distortion theory [4], information bottleneck methods [28], population coding [1], curiositydriven exploration [26, 21], model selection [3], and intrinsically-motivated reinforcement learning [22]. In all these problems the core quantity that must be reasoned about is the mutual information. In general, the mutual information (MI) is intractable to compute and few existing algorithms are useful for realistic applications. The received algorithm for estimating mutual information is the Blahut-Arimoto algorithm [31] that effectively solves for the MI by enumeration — an approach with exponential complexity that is not suitable for modern machine learning applications. By combining the best current practice from variational inference with that of deep learning, we bring the generality and scalability seen in other problem domains to information maximisation problems. We provide a new approach for maximisation of the mutual information that has significantly lower complexity, allows for computation with high-dimensional sensory inputs, and that allows us to exploit modern computational resources. The technique we derive is generally applicable, but we shall describe and develop our approach by focussing on one popular and increasingly topical application of the mutual information: as a measure of ‘empowerment’ in intrinsically-motivated reinforcement learning. Reinforcement learning (RL) has seen a number of successes in recent years that has now established it as a practical, scalable solution for realistic agent-based planning and decision making [16, 13]. A limitation of the standard RL approach is that an agent is only able to learn using external rewards obtained from its environment; truly autonomous agents will often exist in environments that lack such external rewards or in environments where rewards are sparsely distributed. Intrinsically-motivated reinforcement learning [25] attempts to address this shortcoming by equipping an agent with a number of internal drives or intrinsic reward signals, such as hunger, boredom or curiosity that allows the agent to continue to explore, learn and act meaningfully in a reward-sparse world. There are many 1 External Environment Internal Environment Planner Option KB Critic State Repr. State Embedding Option Observation Action Agent Environment Figure 1: Perception-action loop separating environment into internal and external facets. z a1 z a2 z aK … Decoder Source ω(A|s) ψ(s) State Representation s’ s q(a1, . . . , aK|s, s0) h(a1, . . . , aK|s) z a1 z a2 z aK … x x’ Figure 2: Computational graph for variational information maximisation. ways in which to formally define internal drives, but what all such definitions have in common is that they, in some unsupervised fashion, allow an agent to reason about the value of information in the action-observation sequences it experiences. The mutual information allows for exactly this type of reasoning and forms the basis of one popular intrinsic reward measure, known as empowerment. Our paper begins by describing the framework we use for online and self-motivated learning (section 2) and then describes the general problem associated with mutual information estimation and empowerment (section 3). We then make the following contributions: • We develop stochastic variational information maximisation, a new algorithm for scalable estimation of the mutual information and channel capacity that is applicable to both discrete and continuous settings. • We combine variational information optimisation and tools from deep learning to develop a scalable algorithm for intrinsically-motivated reinforcement learning, demonstrating a new application of the variational theory for problems in reinforcement learning and decision making. • We demonstrate that empowerment-based behaviours obtained using variational information maximisation match those using the exact computation. We then apply our algorithms to a broad range of high-dimensional problems for which it is not possible to compute the exact solution, but for which we are able to act according to empowerment – learning directly from pixel information. 2 Intrinsically-motivated Reinforcement Learning Intrinsically- or self-motivated learning attempts to address the question of where rewards come from and how they are used by an autonomous agent. Consider an online learning system that must model and reason about its incoming data streams and interact with its environment. This perception-action loop is common to many areas such as active learning, process control, black-box optimisation, and reinforcement learning. An extended view of this framework was presented by Singh et al. [25], who describe the environment as factored into external and internal components (figure 1). An agent receives observations and takes actions in the external environment. Importantly, the source and nature of any reward signals are not assumed to be provided by an oracle in the external environment, but is moved to an internal environment that is part of the agent’s decisionmaking system; the internal environment handles the efficient processing of all input data and the choice and computation of an appropriate internal reward signal. There are two important components of this framework: the state representation and the critic. We are principally interested in vision-based self-motivated systems, for which there are no solutions currently developed. To achieve this, our state representation system is a convolutional neural network [14]. The critic in figure 1 is responsible for providing intrinsic rewards that allow the agent to act under different types of internal motivations, and is where information maximisation enters the intrinsically-motivated learning problem. The nature of the critic and in particular, the reward signal it provides is the main focus of this paper. A wide variety of reward functions have been proposed, and include: missing information or Bayesian surprise, which uses the KL divergence to measure the change in an agents internal belief after the observation of new data [8, 24]; measures based on prediction errors of future states such predicted L1 change, predicted mode change or probability gain [17], or salient event prediction [25]; and measures based on information-theoretic quantities such as predicted information gain (PIG) [15], causal entropic forces [30] or empowerment [23]. The paper by Oudeyer & Kaplan [19] 2 currently provides the widest singular discussion of the breadth of intrinsic motivation measures. Although we have a wide choice of intrinsic reward measures, none of the available informationtheoretic approaches are efficient to compute or scalable to high-dimensional problems: they require either knowledge of the true transition probability or summation over all configurations of the state space, which is not tractable for complex environments or when the states are large images. 3 Mutual Information and Empowerment The mutual information is a core information-theoretic quantity that acts as a general measure of dependence between two random variables x and y, defined as: I(x, y) = Ep(y|x)p(x) log ✓p(x, y) p(x)p(y) ◆$ , (1) where the p(x, y) is a joint distribution over the random variables, and p(x) and p(y) are the corresponding marginal distributions. x and y can be many quantities of interest: in computational neuroscience they are the sensory inputs and the spiking population code; in telecommunications they are the input signal to a channel and the received transmission; when learning exploration policies in RL, they are the current state and the action at some time in the future, respectively. For intrinsic motivation, we use an internal reward measure referred to as empowerment [12, 23] that is obtained by searching for the maximal mutual information I(·, ·), conditioned on a starting state s, between a sequence of K actions a and the final state reached s0: E(s) = max ! I!(a, s0|s) = max ! Ep(s0|a,s)!(a|s) log ✓ p(a, s0|s) !(a|s)p(s0|s) ◆$ , (2) where a = {a1, . . . , aK} is a sequence of K primitive actions ak leading to a final state s0, and p(s0|a, s) is the K-step transition probability of the environment. p(a, s0|s) is the joint distribution of action sequences and the final state, !(a|s) is a distribution over K-step action sequences, and p(s0|s) is the joint probability marginalised over the action sequence. Equation (2) is the definition of the channel capacity in information theory and is a measure of the amount of information contained in the action sequences a about the future state s0. This measure is compelling since it provides a well-grounded, task-independent measure for intrinsic motivation that fits naturally within the framework for intrinsically motivated learning described by figure 1. Furthermore, empowerment, like the state- or action-value function in reinforcement learning, assigns a value E(s) to each state s in an environment. An agent that seeks to maximise this value will move towards states from which it can reach the largest number of future states within its planning horizon K. It is this intuition that has led authors to describe empowerment as a measure of agent ‘preparedness’, or as a means by which an agent may quantify the extent to which it can reliably influence its environment — motivating an agent to move to states of maximum influence [23]. An empowerment-based agent generates an open-loop sequence of actions K steps into the future — this is only used by the agent for its internal planning using !(a|s). When optimised using (2), the distribution !(a|s) becomes an efficient exploration policy that allows for uniform exploration of the state space reachable at horizon K, and is another compelling aspect of empowerment (we provide more intuition for this in appendix A). But this policy is not what is used by the agent for acting: when an agent must act in the world, it follows a closed-loop policy obtained by a planning algorithm using the empowerment value (e.g., Q-learning); we expand on this in sect. 4.3. A further consequence is that while acting, the agent is only ‘curious’ about parts of its environment that can be reached within its internal planning horizon K. We shall not explore the effect of the horizon in this work, but this has been widely-explored and we defer to the insights of Salge et al. [23]. 4 Scalable Information Maximisation The mutual information (MI) as we have described it thus far, whether it be for problems in empowerment, channel capacity or rate distortion, hides two difficult statistical problems. Firstly, computing the MI involves expectations over the unknown state transition probability. This can be seen by rewriting the MI in terms of the difference between conditional entropies H(·) as: I(a, s0|s) = H(a|s) −H(a|s0, s), (3) where H(a|s)=−E!(a|s)[log !(a|s)] and H(a|s0, s)=−Ep(s0|a,s)!(a|s) [log p(a|s0, s)]. This computation requires marginalisation over the K-step transition dynamics of the environment p(s0|a, s), 3 which is unknown in general. We could estimate this distribution by building a generative model of the environment, and then use this model to compute the MI. Since learning accurate generative models remains a challenging task, a solution that avoids this is preferred (and we also describe one approach for model-based empowerment in appendix B). Secondly, we currently lack an efficient algorithm for MI computation. There exists no scalable algorithm for computing the mutual information that allows us to apply empowerment to highdimensional problems and that allow us to easily exploit modern computing systems. The current solution is to use the Blahut-Arimoto algorithm [31], which essentially enumerates over all states, thus being limited to small-scale problems and not being applicable to the continuous domain. More scalable non-parametric estimators have been developed [7, 6]: these have a high memory footprint or require a very large number of observations, any approximation may not be a bound on the MI making reasoning about correctness harder, and they cannot easily be composed with existing (gradient-based) systems that allow us to design a unified (end-to-end) system. In the continuous domain, Monte Carlo integration has been proposed [10], but applications of Monte Carlo estimators can require a large number of draws to obtain accurate solutions and manageable variance. We have also explored Monte Carlo estimators for empowerment and describe an alternative importance sampling-based estimator for the MI and channel capacity in appendix B.1. 4.1 Variational Information Lower Bound The MI can be made more tractable by deriving a lower bound to it and maximising this instead — here we present the bound derived by Barber & Agakov [1]. Using the entropy formulation of the MI (3) reveals that bounding the conditional entropy component is sufficient to bound the entire mutual information. By using the non-negativity property of the KL divergence, we obtain the bound: KL[p(x|y)kq(x|y)] ≥0 ) H(x|y) −Ep(x|y) [log q⇠(x|y)] I!(s) = H(a|s) −H(a|s0, s) ≥H(a) +Ep(s0|a,s)!✓(a|s)[log q⇠(a|s0, s)] = I!,q(s) (4) where we have introduced a variational distribution q⇠(·) with parameters ⇠; the distribution !✓(·) has parameters ✓. This bound becomes exact when q⇠(a|s0, s) is equal to the true action posterior distribution p(a|s0, s). Other lower bounds for the mutual information are also possible: Jaakkola & Jordan [9] present a lower bound by using the convexity bound for the logarithm; Brunel & Nadal [2] use a Gaussian assumption and appeal to the Cramer-Rao lower bound. The bound (4) is highly convenient (especially when compared to other bounds) since the transition probability p(s0|a, s) appears linearly in the expectation and we never need to evaluate its probability — we can thus evaluate the expectation directly by Monte Carlo using data obtained by interaction with the environment. The bound is also intuitive since we operate using the marginal distribution on action sequences !✓(a|s), which acts as a source (exploration distribution), the transition distribution p(s0|a, s) acts as an encoder (transition distribution) from a to s0, and the variational distribution q⇠(a|s0, s) conveniently acts as a decoder (planning distribution) taking us from s0 to a. 4.2 Variational Information Maximisation A straightforward optimisation procedure based on (4) is an alternating optimisation for the parameters of the distributions q⇠(·) and !✓(·). Barber & Agakov [1] made the connection between this approach and the generalised EM algorithm and refer to it as the IM (information maximisation) algorithm and we follow the same optimisation principle. From an optimisation perspective, the maximisation of the bound I!,q(s) in (4) w.r.t. !(a|s) can be ill-posed (e.g., in Gaussian models, the variances can diverge). We avoid such divergent solutions by adding a constraint on the value of the entropy H(a), which results in the constrained optimisation problem: ˆE(s) = max !,q I!,q(s) s.t. H(a|s)<✏, ˆE(s) =max !,q Ep(s0|a,s)!(a|s)[−1 β ln !(a|s)+ln q⇠(a|s0, s)] (5) where a is the action sequence performed by the agent when moving from s to s0 and β is an inverse temperature (which is a function of the constraint ✏). At all times we use very general source and decoder distributions formed by complex non-linear functions using deep networks, and use stochastic gradient ascent for optimisation. We refer to our approach as stochastic variational information maximisation to highlight that we do all our computation on a mini-batch of recent experience from the agent. The optimisation for the decoder q⇠(·) becomes a maximum likelihood problem, and the optimisation for the source !✓(·) requires computation of an unnormalised energy-based model, which we describe next. We summmarise the overall procedure in algorithm 1. 4 4.2.1 Maximum Likelihood Decoder The first step of the alternating optimisation is the optimisation of equation (5) w.r.t. the decoder q, and is a supervised maximum likelihood problem. Given a set of data from past interactions with the environment, we learn a distribution from the start and termination states s, s0, respectively, to the action sequences a that have been taken. We parameterise the decoder as an auto-regressive distribution over the K-step action sequence: q⇠(a|s0, s) = q(a1|s, s0) K Y k=2 q(ak|f⇠(ak−1, s, s0)), (6) We are free to choose the distributions q(ak) for each action in the sequence, which we choose as categorical distributions whose mean parameters are the result of the function f⇠(·) with parameters ⇠. f is a non-linear function that we specify using a two-layer neural network with rectified-linear activation functions. By maximising this log-likelihood, we are able to make stochastic updates to the variational parameters ⇠of this distribution. The neural network models used are expanded upon in appendix D. 4.2.2 Estimating the Source Distribution Given a current estimate of the decoder q, the variational solution for the distribution !(a|s) computed by solving the functional derivative δI!(s)/δ!(a|s) = 0 under the constraint that P a !(a|s) = 1, is given by !?(a|s) = 1 Z(s) exp (ˆu(s, a)) , where u(s, a) = Ep(s0|s,a)[ln q⇠(a|s, s0)], ˆu(s, a) = βu(s, a) and Z(s) = P a eˆu(s,a) is a normalisation term. By substituting this optimal distribution into the original objective (5) we find that it can be expressed in terms of the normalisation function Z(s) only, E(s) = 1 β log Z(s). The distribution !?(a|s) is implicitly defined as an unnormalised distribution — there are no direct mechanisms for sampling actions or computing the normalising function Z(s) for such distributions. We could use Gibbs or importance sampling, but these solutions are not satisfactory as they would require several evaluations of the unknown function u(s, a) per decision per state. We obtain a more convenient problem by approximating the unnormalised distribution !?(a|s) by a normalised (directed) distribution h✓(a|s). This is equivalent to approximating the energy term ˆu(s, a) by a function of the log-likelihood of the directed model, r✓: !?(a|s) ⇡h✓(a|s) ) ˆu(s, a) ⇡r✓(s, a); r✓(s, a) = ln h✓(a|s) + ✓(s). (7) We introduced a scalar function ✓(s) into the approximation, but since this is not dependent on the action sequence a it does not change the approximation (7), and can be verified by substituting (7) into !?(a|s). Since h✓(a|s) is a normalised distribution, this leaves ✓(s) to account for the normalisation term log Z(s), verified by substituting !?(a|s) and (7) into (5). We therefore obtain a cheap estimator of empowerment E(s) ⇡1 β ✓(s). To optimise the parameters ✓of the directed model h✓and the scalar function ✓we can minimise any measure of discrepancy between the two sides of the approximation (7). We minimise the squared error, giving the loss function L(h✓, ✓) for optimisation as: L(h✓, ✓)=Ep(s0|s,A) ⇥ (β ln q⇠(a|s,s0)−r✓(s, a))2⇤ . (8) At convergence of the optimisation, we obtain a compact function with which to compute the empowerment that only requires forward evaluation of the function . h✓(a|s) is parameterised using an auto-regressive distribution similar to (18), with conditional distributions specified by deep networks. The scalar function ✓is also parameterised using a deep network. Further details of these networks are provided in appendix D. 4.3 Empowerment-based Behaviour policies Using empowerment as an intrinsic reward measure, an agent will seek out states of maximal empowerment. We can treat the empowerment value E(s) as a state-dependent reward and can then utilise any standard planning algorithm, e.g., Q-learning, policy gradients or Monte Carlo search. We use the simplest planning strategy by using a one-step greedy empowerment maximisation. This amounts to choosing actions a = arg maxa C(s, a), where C(s, a) = Ep(s0|s,a) [E(s)]. This policy does not account for the effect of actions beyond the planning horizon K. A natural enhancement is to use value iteration [27] to allow the agent to take actions by maximising its long term (potentially 5 Algorithm 1: Stochastic Variational Information Maximisation for Empowerment Parameters: ⇠variational, λ convolutional, ✓ source while not converged do x {Read current state} s = ConvNetλ(x) {Compute state repr.} A ⇠!(a|s) {Draw action sequence.} Obtain data (x, a, x0) {Acting in env. } s0 = ConvNetλ(x0) {Compute state repr.} ∆⇠/ r⇠log q⇠(a|s, s0) (18) ∆✓/ r✓L(h✓, ✓) (8) ∆λ / rλ log q⇠(a|s, s0) + rλL(h✓, ✓) end while E(s) = 1 β ✓(s) {Empowerment} True MI True MI Bound MI y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 y = −0.083 + 1 ⋅x, r2 = 0.903 ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ●●● ● 1.5 2.0 2.5 3.0 1.5 2.0 2.5 3.0 True Empowerment (nats) Approximate Empowerment (nats) Bound MI Approximate Empowerment (nats) True Empowerment (nats) Figure 3: Comparing exact vs approximate empowerment. Heat maps: empowerment in 3 environments: two rooms, cross room, two-rooms; Scatter plot: agreement for two-rooms. discounted) empowerment. A third approach would be to use empowerment as a potential function and the difference between the current and previous state’s empowerment as a shaping function with in the planning [18]. A fourth approach is one where the agent uses the source distribution !(a|s) as its behaviour policy. The source distribution has similar properties to the greedy behaviour policy and can also be used, but since it effectively acts as an empowered agents internal exploration mechanism, it has a large variance (it is designed to allow uniform exploration of the state space). Understanding this choice of behaviour policy is an important line of ongoing research. 4.4 Algorithm Summary and Complexity The system we have described is a scalable and general purpose algorithm for mutual information maximisation and we summarise the core components using the computational graph in figure 2 and in algorithm 1. The state representation mechanism used throughout is obtained by transforming raw observations x, x0 to produce the start and final states s, s0, respectively. When the raw observations are pixels from vision, the state representation is a convolutional neural network [14, 16], while for other observations (such as continuous measurements) we use a fully-connected neural network – we indicate the parameters of these models using λ. Since we use a unified loss function, we can apply gradient descent and backpropagate stochastic gradients through the entire model allowing for joint optimisation of both the information and representation parameters. For optimisation we use a preconditioned optimisation algorithm such as Adagrad [5]. The computational complexity of empowerment estimators involves the planning horizon K, the number of actions N, and the number of states S. For the exact computation we must enumerate over the number of states, which for grid-worlds is S / D2 (for D⇥D grids), or for binary images is S = 2D2. The complexity of using the Blahut-Arimoto (BA) algorithm is O(N KS2) = O(N KD4) for grid worlds or O(N K22D2) for binary images. The BA algorithm, even in environments with a small number of interacting objects becomes quickly intractable, since the state space grows exponentially with the number of possible interactions, and is also exponential in the planning horizon. In contrast, our approach deals directly on the image dimensions. Using visual inputs, the convolutional network produces a vector of size P, upon which all subsequent computation is based, consisting of an Llayer neural network. This gives a complexity for state representation of O(D2P + LP 2). The autoregressive distributions have complexity of O(H2KN), where H is the size of the hidden layer. Thus, our approach has at most quadratic complexity in the size of the hidden layers used and linear in other quantities, and matches the complexity of any currently employed large-scale vision-based models. In addition, since we use gradient descent throughout, we are able to leverage the power of GPUs and distributed gradient computations. 5 Results We demonstrate the use of empowerment and the effectiveness of variational information maximisation in two types of environments. Static environments consists of rooms and mazes in different configurations in which there are no objects with which the agent can interact, or other moving ob6 Figure 4: Empowerment for a room environment, showing a) an empty room, b) room with an obstacle c) room with a moveable box, d) room with row of moveable boxes. Figure 5: Left: empowerment landscape for agent and key scenario. Yellow is the key and green is the door. Right: Agent in a corridor with flowing lava. The agent places a bricks to stem the flow of lava. jects. The number of states in these settings is equal to the number of locations in the environment, so is still manageable for approaches that rely on state enumeration. In dynamic environments, aspects of the environment change, such as flowing lava that causes the agent to reset, or a predator that chases the agent. For the most part, we consider discrete action settings in which the agent has five actions (up, down, left, right, do nothing). The agent may have other actions, such as picking up a key or laying down a brick. There are no external rewards available and the agent must reason purely using visual (pixel) information. For all these experiments we used a horizon of K = 5. 5.1 Effectiveness of the MI Bound We first establish that the use of the variational information lower bound results in the same behaviour as that obtained using the exact mutual information in a set of static environments. We consider environments that have at most 400 discrete states and compute the true mutual information using the Blahut-Arimoto algorithm. We compute the variational information bound on the same environment using pixel information (on 20 ⇥20 images). To compare the two approaches we look at the empowerment landscape obtained by computing the empowerment at every location in the environment and show these as heatmaps. For action selection, what matters is the location of the maximum empowerment, and by comparing the heatmaps in figure 3, we see that the empowerment landscape matches between the exact and the variational solution, and hence, will lead to the same agent-behaviour. In each image in figure 3, we show a heat-map of the empowerment for each location in the environment. We then analyze the point of highest empowerment: for the large room it is in the centre of the room; for the cross-shaped room it is at the centre of the cross, and in a two-rooms environment, it is located near both doors. In addition, we show that the empowerment values obtained by our method constitute a close approximation to the true empowerment for the two-rooms environment (correlation coeff = 1.00, R2=0.90). These results match those by authors such as Klyubin et al. [12] (using empowerment) and Wissner-Gross & Freer [30] (using a different information-theoretic measure — the causal entropic force). The advantage of the variational approach is clear from this discussion: we are able to obtain solutions of the same quality as the exact computation, we have far more favourable computational scaling (one that is not exponential in the size of the state space and planning horizon), and we are able to plan directly from pixel information. 5.2 Dynamic Environments Having established the usefulness of the bound and some further understanding of empowerment, we now examine the empowerment behaviour in environments with dynamic characteristics. Even in small environments, the number of states becomes extremely large if there are objects that can be moved, or added and removed from the environment, making enumerative algorithms (such as BA) quickly infeasible, since we have an exponential explosion in the number of states. We first reproduce an experiment from Salge et al. [23, §4.5.3] that considers the empowered behaviour of an agent in a room-environment, a room that: is empty, has a fixed box, has a moveable box, has a row of moveable boxes. Salge et al. [23] explore this setup to discuss the choice of the state representation, and that not including the existence of the box severely limits the planning ability of the agent. In our approach, we do not face this problem of choosing the state representation, since the agent will reason about all objects that appear within its visual observations, obviating the need for hand-designed state representations. Figure 4 shows that in an empty room, the empowerment is uniform almost everywhere except close to the walls; in a room with a fixed box, the fixed box limits the set of future reachable states, and as expected, empowerment is low around the box; in a room where the box can be moved, the box can now be seen as a tool and we have high empowerment near the box; similarly, when we have four boxes in a row, the empowerment is highest around the 7 Stay Right Left Down Up Box+Right Box+Left Box+Down Box+Up t = 1 t = 2 t = 4 t = 3 t = 5 C(s, a) Figure 6: Empowerment planning in a lava-filled maze environment. Black panels show the path taken by the agent. 1 1 2 3 4 5 6 6 Figure 7: Predator (red) and agent (blue) scenario. Panels 1, 6 show the 3D simulation. Other panels show a trace of the path that the predator and prey take at points on its trajectory. The blue/red shows path history; cyan shows the direction to the maximum empowerment. boxes. These results match those of Salge et al. [23] and show the effectiveness of reasoning from pixel information directly. Figure 6 shows how planning with empowerment works in a dynamic maze environment, where lava flows from a source at the bottom that eventually engulfs the maze. The only way the agent is able to safeguard itself, is to stem the flow of lava by building a wall at the entrance to one of the corridors. At every point in time t, the agent decides its next action by computing the expected empowerment after taking one action. In this environment, we show the planning for all 9 available actions and a bar graph with the empowerment values for each resulting state. The action that leads to the highest empowerment is taken and is indicated by the black panels1. Figure 5(left) shows two-rooms separated by a door. The agent is able to collect a key that allows it to open the door. Before collecting the key, the maximum empowerment is in the region around the key, once the agent has collected the key, the region of maximum empowerment is close to the door2. Figure 5(right) shows an agent in a corridor and must protect itself by building a wall of bricks, which it is able to do successfully using the same empowerment planning approach described for the maze setting. 5.3 Predator-Prey Scenario We demonstrate the applicability of our approach to continuous settings, by studying a simple 3D physics simulation [29], shown in figure 7. Here, the agent (blue) is followed by a predator (red) and is randomly reset to a new location in the environment if caught by the predator. Both the agent and the predator are represented as spheres in the environment that roll on a surface with friction. The state is the position, velocity and angular momentum of the agent and the predator, and the action is a 2D force vector. As expected, the maximum empowerment lies in regions away from the predator, which results in the agent learning to escape the predator3. 6 Conclusion We have developed a new approach for scalable estimation of the mutual information by exploiting recent advances in deep learning and variational inference. We focussed specifically on intrinsic motivation with a reward measure known as empowerment, which requires at its core the efficient computation of the mutual information. By using a variational lower bound on the mutual information, we developed a scalable model and efficient algorithm that expands the applicability of empowerment to high-dimensional problems, with the complexity of our approach being extremely favourable when compared to the complexity of the Blahut-Arimoto algorithm that is currently the standard. The overall system does not require a generative model of the environment to be built, learns using only interactions with the environment, and allows the agent to learn directly from visual information or in continuous state-action spaces. While we chose to develop the algorithm in terms of intrinsic motivation, the mutual information has wide applications in other domains, all which stand to benefit from a scalable algorithm that allows them to exploit the abundance of data and be applied to large-scale problems. Acknowledgements: We thank Daniel Polani for invaluable guidance and feedback. 1 Video: http://youtu.be/eA9jVDa7O38 2 Video: http://youtu.be/eSAIJ0isc3Y 3 Videos: http://youtu.be/tMiiKXPirAQ; http://youtu.be/LV5jYY-JFpE 8 References [1] Barber, D. and Agakov, F. The IM algorithm: a variational approach to information maximization. In NIPS, volume 16, pp. 201, 2004. [2] Brunel, N. and Nadal, J. Mutual information, Fisher information, and population coding. Neural Computation, 10(7):1731–1757, 1998. [3] Buhmann, J. M., Chehreghani, M. H., Frank, M., and Streich, A. P. Information theoretic model selection for pattern analysis. Workshop on Unsupervised and Transfer Learning, 2012. [4] Cover, T. M. and Thomas, J. A. Elements of information theory. John Wiley & Sons, 1991. [5] Duchi, J., Hazan, E., and Singer, Y. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [6] Gao, S., Steeg, G. V., and Galstyan, A. Efficient estimation of mutual information for strongly dependent variables. arXiv:1411.2003, 2014. [7] Gretton, A., Herbrich, R., and Smola, A. J. The kernel mutual information. In ICASP, volume 4, pp. IV–880, 2003. [8] Itti, L. and Baldi, P. F. Bayesian surprise attracts human attention. In NIPS, pp. 547–554, 2005. [9] Jaakkola, T. S. and Jordan, M. I. Improving the mean field approximation via the use of mixture distributions. In Learning in graphical models, pp. 163–173. 1998. [10] Jung, T., Polani, D., and Stone, P. Empowerment for continuous agent-environment systems. Adaptive Behavior, 19(1):16–39, 2011. [12] Klyubin, A. S., Polani, D., and Nehaniv, C. L. Empowerment: A universal agent-centric measure of control. In IEEE Congress on Evolutionary Computation, pp. 128–135, 2005. [13] Koutn´ık, J., Schmidhuber, J., and Gomez, F. Evolving deep unsupervised convolutional networks for vision-based reinforcement learning. In GECCO, pp. 541–548, 2014. [14] LeCun, Y. and Bengio, Y. Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361:310, 1995. [15] Little, D. Y. and Sommer, F. T. Learning and exploration in action-perception loops. Frontiers in neural circuits, 7, 2013. [16] Mnih, V., Kavukcuoglu, K., and Silver, D., et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [17] Nelson, J. D. Finding useful questions: on Bayesian diagnosticity, probability, impact, and information gain. Psychological review, 112(4):979, 2005. [18] Ng, Andrew Y, Harada, Daishi, and Russell, Stuart. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, 1999. [19] Oudeyer, P. and Kaplan, F. How can we define intrinsic motivation? In International conference on epigenetic robotics, 2008. [21] Rubin, J., Shamir, O., and Tishby, N. Trading value and information in MDPs. In Decision Making with Imperfect Decision Makers, pp. 57–74. 2012. [22] Salge, C., Glackin, C., and Polani, D. Changing the environment based on empowerment as intrinsic motivation. Entropy, 16(5):2789–2819, 2014. [23] Salge, C., Glackin, C., and Polani, D. Empowerment–an introduction. In Guided SelfOrganization: Inception, pp. 67–114. 2014. [24] Schmidhuber, J. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). IEEE Trans. Autonomous Mental Development, 2(3):230–247, 2010. [25] Singh, S. P., Barto, A. G., and Chentanez, N. Intrinsically motivated reinforcement learning. In NIPS, 2005. [26] Still, S. and Precup, D. An information-theoretic approach to curiosity-driven reinforcement learning. Theory in Biosciences, 131(3):139–148, 2012. [27] Sutton, R. S. and Barto, A. G. Introduction to reinforcement learning. MIT Press, 1998. [28] Tishby, N., Pereira, F. C., and Bialek, W. The information bottleneck method. In Allerton Conference on Communication, Control, and Computing, 1999. [29] Todorov, E., Erez, T., and Tassa, Y. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), pp. 5026–5033, 2012. [30] Wissner-Gross, A. D. and Freer, C. E. Causal entropic forces. Phys. Rev. Let., 110(16), 2013. [31] Yeung, R. W. The Blahut-Arimoto algorithms. In Information Theory and Network Coding, pp. 211–228. 2008. 9 | 2015 | 351 |
5,871 | Deep Visual Analogy-Making Scott Reed Yi Zhang Yuting Zhang Honglak Lee University of Michigan, Ann Arbor, MI 48109, USA {reedscot,yeezhang,yutingzh,honglak}@umich.edu Abstract In addition to identifying the content within a single image, relating images and generating related images are critical tasks for image understanding. Recently, deep convolutional networks have yielded breakthroughs in predicting image labels, annotations and captions, but have only just begun to be used for generating high-quality images. In this paper we develop a novel deep network trained end-to-end to perform visual analogy making, which is the task of transforming a query image according to an example pair of related images. Solving this problem requires both accurately recognizing a visual relationship and generating a transformed query image accordingly. Inspired by recent advances in language modeling, we propose to solve visual analogies by learning to map images to a neural embedding in which analogical reasoning is simple, such as by vector subtraction and addition. In experiments, our model effectively models visual analogies on several datasets: 2D shapes, animated video game sprites, and 3D car models. 1 Introduction Humans are good at considering “what-if?” questions about objects in their environment. What if this chair were rotated 30 degrees clockwise? What if I dyed my hair blue? We can easily imagine roughly how objects would look according to various hypothetical questions. However, current generative models of images struggle to perform this kind of task without encoding significant prior knowledge about the environment and restricting the allowed transformations. Infer Relationship Transform query Figure 1: Visual analogy making concept. We learn an encoder function f mapping images into a space in which analogies can be performed, and a decoder g mapping back to the image space. Often, these visual hypothetical questions can be effectively answered by analogical reasoning.1 Having observed many similar objects rotating, one could learn to mentally rotate new objects. Having observed objects with different colors (or textures), one could learn to mentally recolor (or re-texture) new objects. Solving the analogy problem requires the ability to identify relationships among images and transform query images accordingly. In this paper, we propose to solve the problem by directly training on visual analogy completion; that is, to generate the transformed image output. Note that we do not make any claim about how humans solve the problem, but we show that in many cases thinking by analogy is enough to solve it, without exhaustively encoding first principles into a complex model. We denote a valid analogy as a 4-tuple A : B :: C : D, often spoken as “A is to B as C is to D”. Given such an analogy, there are several questions one might ask: • A ? B :: C ? D - What is the common relationship? • A : B ? C : D - Are A and B related in the same way that C and D are related? • A : B :: C : ? - What is the result of applying the transformation A : B to C? 1See [2] for a deeper philosophical discussion of analogical reasoning. 1 The first two questions can be viewed as discriminative tasks, and could be formulated as classification problems. The third question requires generating an appropriate image to make a valid analogy. Since a model with this capability would be of practical interest, we focus on this question. Our proposed approach is to learn a deep encoder function f : RD →RK that maps images to an embedding space suitable for reasoning about analogies, and a deep decoder function g : RK →RD that maps from the embedding back to the image space. (See Figure 1.) Our encoder function is inspired by word2vec [21], GloVe [22] and other embedding methods that map inputs to a space supporting analogies by vector addition. In those models, analogies could be performed via d = arg maxw∈V cos(f(w), f(b) −f(a) + f(c)) where V is the vocabulary and (a, b, c, d) form an analogy tuple such that a : b :: c : d. Other variations, such as a multiplicative version [18], on this inference have been proposed. The vector f(b) −f(a) represents the transformation, which is applied to a query c by vector addition in the embedding space. In the case of images, we can modify this naturally by replacing the cosine similarity and argmax over the vocabulary with application of a decoder function mapping from the embedding back to the image space. Clearly, this simple vector addition will not accurately model transformations for low-level representations such as raw pixels, and so in this work we seek to learn a high-level representation. In our experiments, we parametrize the encoder f and decoder g as deep convolutional neural networks (CNN), but in principle other methods could be used to model f and g. In addition to vector addition, we also propose more powerful methods of applying the inferred transformations to new images, such as higher-order multiplicative interactions and multi-layer additive interactions. We first demonstrate visual analogy making on a 2D shapes benchmark, with variation in shape, color, rotation, scaling and position, and evaluate the performance on analogy completion. Second, we generate a dataset of animated 2D video game character sprites using graphics assets from the Liberated Pixel Cup [1]. We demonstrate the capability of our model to transfer animations onto novel characters from a single frame, and to perform analogies that traverse the manifold induced by an animation. Third, we apply our model to the task of analogy making on 3D car models, and show that our model can perform 3D pose transfer and rotation by analogy. 2 Related Work Hertzmann et al. [12] developed a method for applying new textures to images by analogy. This problem is of practical interest, e.g., for stylizing animations [3]. Our model can also synthesize new images by analogy to examples, but we study global transformations rather than only changing the texture of the image. Doll´ar et al. [9] developed Locally-Smooth Manifold Learning to traverse image manifolds. We share a similar motivation when analogical reasoning requires walking along a manifold (e.g. pose analogies), but our model leverages a deep encoder and decoder trainable by backprop. Memisevic and Hinton [19] proposed the Factored Gated Boltzmann Machine for learning to represent transformations between pairs of images. This and related models [25, 8, 20] use 3-way tensors or their factorization to infer translations, rotations and other transformations from a pair of images, and apply the same transformation to a new image. In this work, we share a similar goal, but we directly train a deep predictive model for the analogy task without requiring 3-way multiplicative connections, with the intent to scale to bigger images and learn more subtle relationships involving articulated pose, multiple attributes and out-of-plane rotation. Our work is related to several previous works on disentangling factors of variation, for which a common application is analogy-making. As an early example, bilinear models [27] were proposed to separate style and content factors of variation in face images and speech signals. Tang et al. [26] developed the tensor analyzer which uses a factor loading tensor to model the interaction among latent factor groups, and was applied to face modeling. Several variants of higher-order Boltzmann machine were developed to tackle the disentangling problem, featuring multiple groups of hidden units, with each group corresponding to a single factor [23, 7]. Disentangling was also considered in the discriminative case in the Contractive Discriminative Analysis model [24]. Our work differs from these in that we train a deep end-to-end network for generating images by analogy. Recently several methods were proposed to generate high-quality images using deep networks. Dosovitskiy et al. [10] used a CNN to generate chair images with controllable variation in appear2 ance, shape and 3D pose. Contemporary to our work, Kulkarni et al. [17] proposed the Deep Convolutional Inverse Graphics Network, which is a form of variational autoencoder (VAE) [15] in which the encoder disentangles factors of variation. Other works have considered a semi-supervised extension of the VAE [16] incorporating class labels associated to a subset of the training images, which can control the label units to perform some visual analogies. Cohen and Welling [6] developed a generative model of commutative Lie groups (e.g. image rotation, translation) that produced invariant and disentangled representations. In [5], this work is extended to model the non-commutative 3D rotation group SO(3). Zhu et al. [30] developed the multi-view perceptron for modeling face identity and viewpoint, and generated high quality faces subject to view changes. Cheung et al. [4] also use a convolutional encoder-decoder model, and develop a regularizer to disentangle latent factors of variation from a discriminative target. Analogies have been well-studied in the NLP community; Turney [28] used analogies from SAT tests to evaluate the performance of text analogy detection methods. In the visual domain, Hwang et al. [13] developed an analogy-preserving visual-semantic embedding model that could both detect analogies and as a regularizer improve visual recognition performance. Our work is related to these, but we focus mainly on generating images to complete analogies rather than detecting analogies. 3 Method Suppose that A is the set of valid analogy tuples in the training set. For example, (a, b, c, d) ∈A implies the statement “a is to b as c is to d”. Let the input image space for images a, b, c, d be RD, and the embedding space be RK (typically K < D). Denote the encoder as f : RD →RK and the decoder as g : RK →RD. Figure 2 illustrates our architectures for visual analogy making. 3.1 Making analogies by vector addition Neural word representations (e.g., [21, 22]) have been shown to be capable of analogy-making by addition and subtraction of word embeddings. Analogy making capability appears to be an emergent property of these embeddings, but for images we propose to directly train on the objective of analogy completion. Concretely, we propose the following objective for vector-addition-based analogies: Ladd = X a,b,c,d∈A ||d −g(f(b) −f(a) + f(c))||2 2 (1) This objective has the advantage of being very simple to implement and train. In addition, with a modest number of labeled relations, a large number of training analogies can be mined. 3.2 Making analogy transformations dependent on the query context In some cases, a purely additive model of applying transformations may not be ideal. For example, in the case of rotation, the manifold of a rotated object is circular, and after enough rotation has been applied, one returns to the original point. In the vector-addition model, we can add the same rotation vector f(b) −f(a) multiple times to a query f(c), but we will never return to the original point (except when f(b) = f(a)). The decoder g could (in principle) solve this problem by learning to perform a “modulus” operation, but this would make the training significantly more difficult. Instead, we propose to parametrize the transformation increment to f(c) as a function of both f(b)− f(a) and f(c) itself. In this way, analogies can be applied in a context-dependent way. We present two variants of our training objective to solve this problem. The first, which we will call Lmul, uses multiplicative interactions between f(b) −f(a) and f(c) to generate the increment. The second, which we call Ldeep, uses multiple fully connected layers to form a multi-layer perceptron (MLP) without using multiplicative interactions: Lmul = X a,b,c,d∈A ||d −g(f(c) + W×1[f(b) −f(a)]×2f(c))||2 2 (2) Ldeep = X a,b,c,d∈A ||d −g(f(c) + h([f(b) −f(a); f(c)]))||2 2. (3) For Lmul, W ∈RK×K×K is a 3-way tensor.2 In practice, to reduce the number of weights we used a factorized tensor parametrized as Wijl = P f W (1) if W (2) jf W (3) lf . Multiplicative interactions 2For a tensor W ∈RK×K×K and vectors v, w ∈RK, we define the tensor multiplication W ×1 v ×2 w ∈ RK as (W ×1 v ×2 w)l = PK i=1 PK j=1 Wijlviwj, ∀l ∈{1, ..., K}. 3 Increment function T Decoder network g Encoder network f f(b) f(a) f(c) f(b) f(a) f(c) f(b) f(a) f(c) add mul deep add mul deep a b c d Figure 2: Illustration of the network structure for analogy making. The top portion shows the encoder, transformation module, and decoder. The bottom portion illustrates the transformations used for Ladd, Lmul and Ldeep. The N icon in Lmul indicates a tensor product. We share weights with all three encoder networks shown on the top left. were similarly used in bilinear models [27], disentangling Boltzmann Machines [23] and Tensor Analyzers [26]. Note that our multiplicative interaction in Lmul is different from [19] in that we use the difference between two encoding vectors (i.e., f(b) −f(a)) to infer about the transformation (or relation), rather than using a higher-order interaction (e.g., tensor product) for this inference. Algorithm 1: Manifold traversal by analogy, with transformation function T (Eq. 5). Given images a, b, c, and N (# steps) z ←f(c) for i = 1 to N do z ←z + T(f(a), f(b), z) xi ←g(z) return generated images xi (i = 1, ..., N) For Ldeep, h : R2K →RK is an MLP (deep network without 3-way multiplicative interactions) and [f(b) −f(a); f(c)] denotes concatenation of the transformation vector with the query embedding. Optimizing the above objectives teaches the model to predict analogy completions in image space, but in order to traverse image manifolds (e.g. for repeated analogies) as in Algorithm 1, we also want accurate analogy completions in the embedding space. To encourage this property, we introduce a regularizer to make the predicted transformation increment T(f(a), f(b), f(c)) match the difference of encoder embeddings f(d) −f(c): R = X a,b,c,d∈A ||f(d) −f(c) −T(f(a), f(b), f(c))||2 2 , where (4) T(x, y, z) = y −x when using Ladd W ×1 [y −x] ×2 z when using Lmul MLP([y −x; z]) when using Ldeep (5) The overall training objective is a weighted combination of analogy prediction and the above regularizer, e.g. Ldeep+αR. We set α = 0.01 by cross validation on the shapes data and found it worked well for all models on sprites and 3D cars as well. All parameters were trained with backpropagation using stochastic gradient descent (SGD). 3.3 Analogy-making with a disentangled feature representation Visual analogies change some aspects of a query image, and leave others unchanged; for example, changing the viewpoint but preserving the shape and texture of an object. To exploit this fact, we incorporate disentangling into our analogy prediction model. A disentangled representation is simply a concatenation of coordinates along each underlying factor of variation. If one can reliably infer these disentangled coordinates, a subset of analogies can be solved simply by swapping sets of coordinates among a reference and query embedding, and projecting back into the image space. However, in general, disentangling alone cannot solve analogies that require traversing the manifold structure of a given factor, and by itself does not capture image relationships. In this section we show how to incorporate disentangled features into our analogy model. The disentangling component makes each group of embedding features encode its respective factor of variation and be invariant to the others. The analogy component enables the model to traverse the manifold of a given factor or subset of factors. 4 Identity Pitch switches s Identity Elevation Pitch Elevation a b c Algorithm 2: Disentangling training update. The switches s determine which units from f(a) and f(b) are used to reconstruct image c. Given input images a, b and target c Given switches s ∈{0, 1}K z ←s · f(a) + (1 −s) · f(b) ∆θ ∝∂/∂θ ||g(z) −c||2 2 Figure 3: The encoder f learns a disentangled representation, in this case for pitch, elevation and identity of 3D car models. In the example above, switches s would be a block [0; 1; 1] vector. For learning a disentangled representation, we require three-image tuples: a pair from which to extract hidden units, and a third to act as a target for prediction. As shown in Figure 3, We use a vector of switch units s that decides which elements from f(a) and which from f(b) will be used to form the hidden representation z ∈RK. Typically s will have a block structure according to the groups of units associated to each factor of variation. Once z has been extracted, it is projected back into the image space via the decoder g(z). The key to learning disentangled features is that images a, b, c should be distinct, so that there is no path from any image to itself. This way, the reconstruction target forces the network to separate the visual concepts shared by (a, c) and (b, c), respectively, rather than learning the identity mapping. Concretely, the disentangling objective can be written as: Ldis = X a,b,c,s∈D ||c −g(s · f(a) + (1 −s) · f(b))||2 2 (6) Note that unlike analogy training, disentangling only requires a dataset D of 3-tuple of images a, b, c along with a switch unit vector s. Intuitively, s describes the sense in which a, b and c are related. Algorithm 2 describes the learning update we used to learn a disentangled representation. 4 Experiments We evaluated our methods using three datasets. The first is a set of 2D colored shapes, which is a simple yet nontrivial benchmark for visual analogies. The second is a set of 2D sprites from the open-source video game project called Liberated Pixel Cup [1], which we chose in order to get controlled variation in a large number of character attributes and animations. The third is a set of 3D car model renderings [11], which allowed us to train a model to perform out-of-plane rotation. We used Caffe [14] to train our encoder and decoder networks, with a custom Matlab wrapper implementing our analogy sampling and training objectives. Many additional qualitative results of images generated by our model are presented in the supplementary material. 4.1 Transforming shapes: comparison of analogy models The shapes dataset was used to benchmark performance on rotation, scaling and translation analogies. Specifically, we generated 48 × 48 images scaled to [0, 1] with four shapes, eight colors, four scales, five row and column positions, and 24 rotation angles. We compare the performance of our models trained with Ladd, Lmul and Ldeep objectives, respectively. We did not perform disentangling training in this experiment. The encoder f consisted of 4096-1024-512-dimensional fully connected layers, with rectified linear nonlinearities (relu) for intermediate layers. The final embedding layer did not use any nonlinearity. The decoder g architecture mirrors the encoder, but did not share weights. We trained for 200k steps with mini-batch size 25 (i.e. 25 analogy 4-tuples per mini-batch). We used SGD with momentum 0.9, base learning rate 0.001 and decayed the learning rate by factor 0.1 every 100k steps. Model Rotation steps Scaling steps Translation steps 1 2 3 4 1 2 3 4 1 2 3 4 Ladd 8.39 11.0 15.1 21.5 5.57 6.09 7.22 14.6 5.44 5.66 6.25 7.45 Lmul 8.04 11.2 13.5 14.2 4.36 4.70 5.78 14.8 4.24 4.45 5.24 6.90 Ldeep 1.98 2.19 2.45 2.87 3.97 3.94 4.37 11.9 3.84 3.81 3.96 4.61 Table 1: Comparison of squared pixel prediction error of Ladd, Lmul and Ldeep on shape analogies. 5 ref +rot (gt) query +rot +rot +rot +rot ref +scl (gt) query +scl +scl +scl +scl ref +trans (gt) query +trans +trans +trans +trans Figure 4: Analogy predictions made by Ldeep for rotation, scaling and translation, respectively by row. Ladd and Lmul perform as well for scaling and transformation, but fail for rotation. Figure 5: Mean-squared prediction error on repeated application of rotation analogies. Figure 4 shows repeated predictions from Ldeep on rotation, scaling and translation test set analogies, showing that our model has learned to traverse these manifolds. Table 1 shows that Ladd and Lmul perform similarly for scaling and translation, but only Ldeep can perform accurate rotation analogies. Further extrapolation results with repeated rotations are shown in Figure 5. Though both Lmul and Ldeep are in principle capable of learning the circular pose manifold, we suspect that Ldeep has much better performance due to the difficulty of training multiplicative models such as Lmul. 4.2 Generating 2D video game sprites Game developers often use what are known as “sprites” to portray characters and objects in 2D video games (more commonly on older systems, but still seen on phones and indie games). This entails significant human effort to draw each frame of each common animation for each character.3 In this section we show how animations can be transferred to new characters by analogy. Our dataset consists of 60 × 60 color images of sprites scaled to [0, 1], with 7 attributes: body type, sex, hair type, armor type, arm type, greaves type, and weapon type, with 672 total unique characters. For each character, there are 5 animations each from 4 viewpoints: spellcast, thrust, walk, slash and shoot. Each animation has between 6 and 13 frames. We split the data by characters: 500 training, 72 validation and 100 for testing. We conducted experiments using the Ladd and Ldeep variants of our objective, with and without disentangled features. We also experimented with a disentangled feature version in which the identity units are taken to be the 22-dimensional character attribute vector, from which the pose is disentangled. In this case, the encoder for identity units acts as multiple softmax classifiers, one for each attribute, hence we refer to this objective in experiments as Ldis+cls. The encoder network consisted of two layers of 5×5 convolution with stride 2 and relu, followed by two fully-connected and relu layers, followed by a projection onto the 1024-dimensional embedding. The decoder mirrors the encoder. To increase the spatial dimension we use simple upsampling in which we copy each input cell value to the upper-left corner of its corresponding 2 × 2 output. For Ldis, we used 512 units for identity and 512 for pose. For Ldis+cls, we used 22 categorical units for identity, which is the attribute vector, and the remaining 490 for pose. During training for Ldis+cls, we did not backpropagate reconstruction error through the identity units; we only used the attribute classification objective for those units. When Ldeep is used, the internal layers of the transformation function T (see Figure 2) had dimension 300, and were each followed by relu. We trained the models using SGD with momentum 0.9 and learning rate 0.00001 decayed by factor 0.1 every 100k steps. Training was conducted for 200k steps with mini-batch size 25. Figure 6 demonstrates the task of animation transfer, with predictions from a model trained on Ladd. Table 2 provides a quantitative comparison of Ladd, Ldis and Ldis+cls. We found that the disentangling and additive analogy models perform similarly, and that using attributes for disentangled identity features provides a further gain. We conjecture that Ldis+cls wins because changes in certain aspects of appearance, such as arm color, have a very small effect in pixel space yielding a weak signal for pixel prediction, but still provides a strong signal to an attribute classifier. 3In some cases the work may be decreased by projecting 3D models to 2D or by other heuristics, but in general the work scales with the number of animations and characters. 6 Figure 6: Transferring animations. The top row shows the reference, and the bottom row shows the transferred animation, where the first frame (in red) is the starting frame of a test set character. Model spellcast thrust walk slash shoot average Ladd 41.0 53.8 55.7 52.1 77.6 56.0 Ldis 40.8 55.8 52.6 53.5 79.8 56.5 Ldis+cls 13.3 24.6 17.2 18.9 40.8 23.0 Table 2: Mean-squared pixel error on test analogies, by animation. From a practical perspective, the ability to transfer poses accurately to unseen characters could help decrease manual labor of drawing (at least of drawing the assets comprising each character in each animation frame). However, training this model required that each transferred animation already has hundreds of examples. Ideally, the model could be shown a small number of examples for a new animation, and transfer it to the existing character database. We call this setting “few-shot” analogy-making because only a small number of the target animations are provided. Num. of few-shot examples Model 6 12 24 48 Ladd 42.8 42.7 42.3 41.0 Ldis 19.3 18.9 17.4 16.3 Ldis+cls 15.0 12.0 11.3 10.4 Table 3: Mean-squared pixel-prediction error for few-shot analogy transfer of the “spellcast” animation from each of 4 viewpoints. Ldis outperforms Ladd, and Ldis+cls performs the best even with only 6 examples. Reference Output Query Prediction Figure 7: Few shot prediction with 48 examples. Table 3 provides a quantitative comparison and figure 7 provides a qualitative comparison of our proposed models in this task. We find that Ldis+cls provides the best performance by a wide margin. Unlike in Table 2, Ldis outperforms Ladd, suggesting that disentangling may allow new animations to be learned in a more data-efficient manner. However, Ldis has an advantage in that it can average the identity features of multiple views of a query character, which Ladd cannot do. The previous analogies only required us to combine disentangled features from two characters, e.g. the identity from one and the pose from another, and so disentangling was sufficient. However, our analogy method enables us to perform more challenging analogies by learning the manifold of character animations, defined by the sequence of frames in each animation. Adjacent frames are thus neighbors on the manifold and each animation sequence can be viewed as a fiber in this manifold. We trained a model by forming analogy tuples across animations as depicted in Fig. 8, using disentangled identity and pose features. Pose transformations were modeled by deep additive interactions, and we used Ldis+cls to disentangle pose from identity units. Figure 9 shows the result of several analogies and their extrapolations, including character rotation for which we created animations. Figure 8: A cartoon visualization of the “shoot” animation manifold for two different characters in different viewpoints. The model can learn the structure of the animation manifold by forming analogy tuples during training; example tuples are circled in red and blue above. 7 ref. output query predictions walk thrust rotate Figure 9: Extrapolating by analogy. The model sees the reference / output pair and repeatedly applies the inferred transformation to the query. This inference requires learning the manifold of animation poses, and cannot be done by simply combining and decoding disentangled features. 4.3 3D car analogies In this section we apply our model to analogy-making on 3D car renderings subject to changes in appearance and rotation angle. Unlike in the case of shapes, this requires the ability of the model to perform out-of-plane rotation, and the depicted objects are more complex. Features Pose AUC ID AUC Pose units 95.6 85.2 ID units 50.1 98.5 Combined 94.6 98.4 Table 4: Measuring the disentangling performance on 3D cars. Pose AUC refers to area under the ROC curve for same-or-different pose verification, and ID AUC for sameor-different car verification on pairs of test set images. Pose ID GT Prediction Figure 10: 3D car analogies. The column “GT” denotes ground truth. We use the car CAD models from [11]. For each of the 199 car models, we generated 64 × 64 color renderings from 24 rotation angles each offset by 15 degrees. We split the models into 100 training, 49 validation and 50 testing. The same convolutional network architecture was used as in the sprites experiments, and we used 512 units for identity and 128 for pose. ref output query +1 +2 +3 +4 -4 -3 -2 -1 Figure 11: Repeated rotation analogies in forward and reverse directions, starting from frontal pose. Figure 10 shows test set predictions of our model trained on Ldis, where images in the fourth column combine pose units from the first column and identity units from the second. Table 4 shows that the learned features are in fact disentangled, and discriminative for identity and pose matching despite not being discriminatively trained. Figure 11 shows repeated rotation analogies on test set cars using a model trained on Ldeep, demonstrating that our model can perform out-of-plane rotation. This type of extrapolation is difficult because the query image shows a different car from a different starting pose. We expect that a recurrent architecture can further improve the results, as shown in [29]. 5 Conclusions We studied the problem of visual analogy making using deep neural networks, and proposed several new models. Our experiments showed that our proposed models are very general and can learn to make analogies based on appearance, rotation, 3D pose, and various object attributes. We provide connection between analogy making and disentangling factors of variation, and showed that our proposed analogy representations can overcome certain limitations of disentangled representations. Acknowledgements This work was supported in part by NSF GRFP grant DGE-1256260, ONR grant N00014-13-1-0762, NSF CAREER grant IIS-1453651, and NSF grant CMMI-1266184. We thank NVIDIA for donating a Tesla K40 GPU. 8 References [1] Liberated pixel cup. http://lpc.opengameart.org/. Accessed: 2015-05-21. [2] P. Bartha. Analogy and analogical reasoning. In The Stanford Encyclopedia of Philosophy. Fall 2013 edition, 2013. [3] P. B´enard, F. Cole, M. Kass, I. Mordatch, J. Hegarty, M. S. Senn, K. Fleischer, D. Pesare, and K. Breeden. Stylizing animation by example. ACM Transactions on Graphics, 32(4):119, 2013. [4] B. Cheung, J. A. Livezey, A. K. Bansal, and B. A. Olshausen. Discovering hidden factors of variation in deep networks. In ICLR Workshop, 2015. [5] T. Cohen and M. Welling. Learning the irreducible representations of commutative Lie groups. In ICML, 2014. [6] T. Cohen and M. Welling. Transformation properties of learned visual representations. In ICLR, 2015. [7] G. Desjardins, A. Courville, and Y. Bengio. Disentangling factors of variation via generative entangling. arXiv preprint arXiv:1210.5474, 2012. [8] W. Ding and G. W. Taylor. Mental rotation by optimizing transforming distance. arXiv preprint arXiv:1406.3010, 2014. [9] P. Doll´ar, V. Rabaud, and S. Belongie. Learning to traverse image manifolds. In NIPS, 2007. [10] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In CVPR, 2015. [11] S. Fidler, S. Dickinson, and R. Urtasun. 3d object detection and viewpoint estimation with a deformable 3d cuboid model. In NIPS, 2012. [12] A. Hertzmann, C. Jacobs, N. Oliver, B. Curless, and D. Salesin. Image analogies. In SIGGRAPH, 2001. [13] S. J. Hwang, K. Grauman, and F. Sha. Analogy-preserving semantic embedding for visual object categorization. In NIPS, 2013. [14] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [15] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [16] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling. Semi-supervised learning with deep generative models. In NIPS, 2014. [17] T. D. Kulkarni, W. Whitney, P. Kohli, and J. B. Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015. [18] O. Levy, Y. Goldberg, and I. Ramat-Gan. Linguistic regularities in sparse and explicit word representations. In CoNLL-2014, 2014. [19] R. Memisevic and G. E. Hinton. Learning to represent spatial transformations with factored higher-order boltzmann machines. Neural Computation, 22(6):1473–1492, 2010. [20] V. Michalski, R. Memisevic, and K. Konda. Modeling deep temporal dependencies with recurrent grammar cells. In NIPS, 2014. [21] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013. [22] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014. [23] S. Reed, K. Sohn, Y. Zhang, and H. Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014. [24] S. Rifai, Y. Bengio, A. Courville, P. Vincent, and M. Mirza. Disentangling factors of variation for facial expression recognition. In ECCV. 2012. [25] J. Susskind, R. Memisevic, G. Hinton, and M. Pollefeys. Modeling the joint density of two images under a variety of transformations. In CVPR, 2011. [26] Y. Tang, R. Salakhutdinov, and G. Hinton. Tensor analyzers. In ICML, 2013. [27] J. B. Tenenbaum and W. T. Freeman. Separating style and content with bilinear models. Neural computation, 12(6):1247–1283, 2000. [28] P. D. Turney. Similarity of semantic relations. Computational Linguistics, 32(3):379–416, 2006. [29] J. Yang, S. Reed, M.-H. Yang, and H. Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NIPS, 2015. [30] Z. Zhu, P. Luo, X. Wang, and X. Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In NIPS, 2014. 9 | 2015 | 352 |
5,872 | Rate-Agnostic (Causal) Structure Learning Sergey Plis The Mind Research Network, Albuquerque, NM s.m.plis@gmail.com David Danks Carnegie-Mellon University Pittsburgh, PA ddanks@cmu.edu Cynthia Freeman The Mind Research Network, CS Dept., University of New Mexico Albuquerque, NM cynthiaw2004@gmail.com Vince Calhoun The Mind Research Network ECE Dept., University of New Mexico Albuquerque, NM vcalhoun@mrn.org Abstract Causal structure learning from time series data is a major scientific challenge. Extant algorithms assume that measurements occur sufficiently quickly; more precisely, they assume approximately equal system and measurement timescales. In many domains, however, measurements occur at a significantly slower rate than the underlying system changes, but the size of the timescale mismatch is often unknown. This paper develops three causal structure learning algorithms, each of which discovers all dynamic causal graphs that explain the observed measurement data, perhaps given undersampling. That is, these algorithms all learn causal structure in a “rate-agnostic” manner: they do not assume any particular relation between the measurement and system timescales. We apply these algorithms to data from simulations to gain insight into the challenge of undersampling. 1 Introduction Dynamic causal systems are a major focus of scientific investigation in diverse domains, including neuroscience, economics, meteorology, and education. One significant limitation in all of these sciences is the difficulty of measuring the relevant variables at an appropriate timescale for the particular scientific domain. This challenge is particularly salient in neuroimaging: standard fMRI experiments sample the brain’s bloodflow approximately every one or two seconds, though the underlying neural activity (i.e., the major driver of bloodflow) occurs much more rapidly. Moreover, the precise timescale of the underlying causal system is unknown; it is almost certainly faster than the fMRI measurements, but it is unknown how much faster. In this paper, we aim to learn the causal structure of a system that evolves at timescale τS, given measurements at timescale τM. We focus on the case in which τS is faster than τM to an unknown degree. We assume that the underlying causal structure can be modeled as a directed graphical model G without simultaneous influence. There has been substantial work on modeling the statistics of time series, but relatively less on learning causal structure, and almost all of that assumes that the measurement and causal timescales match [1–5]. The problem of causal learning from “undersampled” time series data was explicitly addressed by [6, 7], but they assumed that the degree of undersampling—i.e., the ratio of τS to τM—was both known and small. In contrast, we focus on the significantly harder challenge of causal learning when that ratio is unknown. We provide a formal specification of the problem and representational framework in Section 2. We then present three different Rate-Agnostic Structure Learning (RASL) algorithms in Section 3. We finish in Section 4 by exploring their performance on synthetic data. 1 2 Representation and Formalism A dynamic causal graphical model consists of a graph G over random variables V at the current time t, as well as nodes for V at all previous (relative) timesteps that contain a direct cause of a variable at the current timestep.1 The Markov order of the system is the largest k such that V t−k i →V t j , where superscripts denote timestep. We assume throughout that the “true” underlying causal system is Markov order 1, and that all causally relevant variables are measured.2 Finally, we assume that there are no isochronal causal edges V t i →V t j ; causal influences inevitably take time to propagate, and so any apparent isochronal edge will disappear when measured sufficiently finely. Since we do not assume that the causal timescale τS is known, this is a relatively innocuous assumption. G is thus over 2V nodes, where the only edges are V t−1 i →V t j , where possibly i = j. There is additionally a conditional probability distribution or density, P(Vt|Vt−1), which we assume to be time-independent. We do not, however, assume stationarity of P(Vt). Finally, we assume appropriate versions of the Markov (“Variable V is independent of non-descendants given parents”) and Faithfulness/Stability (“The only independencies are those implied by Markov”) assumptions, such that the graph and probability distribution/density mutually constrain each other. Let {t0, t1, . . . , tk, . . .} be the measurement timesteps. We undersample at rate u when we measure only timesteps {t0, tu, . . . , tuk, . . .}; the causal timescale is thus “undersampled at rate 1.” We denote the causal graph resulting from undersampling at rate u by Gu. To obtain Gu, we “unroll” G1 by introducing nodes for Vt−2 that bear the same graphical and parametric relations to Vt−1 as those variables bear to Vt, and iterate until we have included Vt−u. We then marginalize out all variables except those in Vt and Vt−u. Marginalization yields an Acyclic Directed Mixed Graph (ADMG) Gu containing both directed and bidirected edges [8]. V t−u i →V t j in Gu iff there is a directed path from V t−u i to V t j in the unrolled graph. Define a trek to be a pair of directed paths (π1, π2) such that both have the same start variable. V t i ↔V t j in Gu iff there is a trek between V t i and V t j with length(π1) = length(π2) = k < u. Clearly, if a bidirected edge occurs in Gm, then it occurs in Gu for all u ≥m. Unrolling-and-marginalizing can be computationally complex due to duplication of nodes, and so we instead use compressed graphs that encode temporal relations in edges. For an arbitrary dynamic causal graph H, H is its compressed graph representation: (i) H is over non-time-indexed nodes for V; (ii) Vi →Vj in H iff V t−1 i →V t j in H; and (iii) Vi ↔Vj in H iff V t i ↔V t j in H. Compressed graphs can be cyclic (Vi ⇄Vj for V t−1 i →V t j and V t−1 j →V t i ), including self-cycles. There is clearly a 1-1 mapping between dynamic ADMGs and compressed graphs. Computationally, the effects of undersampling at rate u can be computed in a compressed graph simply by finding directed paths of length u in G1. More precisely, V t−u i →V t j in Gu iff there is a directed path of length u in G1. Similarly, V t i ↔V t j in Gu iff there is a trek with length(π1) = length(π2) = k < u in G1. We thus use compressed graphs going forward. 3 Algorithms The core question of this paper is: given H = Gu for unknown u, what can be inferred about G1? Let JHK = {G1 : ∃u Gu = H} be the equivalence class of G1 that could, for some undersample rate, yield H. We are thus trying to learn JHK from H. An obvious brute-force algorithm is: for each possible G1, compute the corresponding graphs for all u, and then output all Gu = H. Equally obviously, this algorithm will be computationally intractable for any reasonable n, as there are 2n2 possible G1 and u can (in theory) be arbitrarily large. Instead, we pursue three different constructive strategies that more efficiently “build” the members of JHK (Sections 3.2, 3.3, and 3.4). Because these algorithms make no assumptions about u, we refer to them each as RASL—Rate Agnostic Structure Learner—and use subscripts to distinguish between different types. First, though, we provide some key theoretical results about forward inference that will be used by all three algorithms. 1We use difference equations in our analyses. The results and algorithms will be applicable to systems of differential equations to the extent that they can be approximated by a system of difference equations. 2More precisely, we assume a dynamic variant of the Causal Sufficiency assumption, though it is more complicated than just “no unmeasured common causes.” 2 3.1 Nonparametric Forward Inference For given G1 and u, there is an efficient algorithm [9] for calculating Gu, but it is only useful in learning if we have stopping rules that constrain which G1 and u should ever be considered. These rules will depend on how G1 changes as u →∞. A key notion is a strongly connected component (SCC) in G1: a maximal set of variables S ⊆V such that, for every X, Y ∈S (possibly X = Y ), there is a directed path from X to Y . Non-singleton SCCs are clearly cyclic and can provably be decomposed into a set of (possibly overlapping) simple loops (i.e., those in which no node is repeated): σ1, . . . , σs [10]. Let LS be the set of those simple loop lengths. One stopping rule must specify, for given G1, which u to consider. For a single SCC, the greatest common divisor of simple loop lengths (where gcd(LS) = 1 for singleton S) is key: gcd(LS) = 1 iff ∃f s.t. ∀u > f[Gu = Gf]; that is, gcd() determines whether an SCC “converges” to a fixedpoint graph as u →∞. We can constrain u if there is such a fixed-point graph, and Theorem 3.1 generalizes [9, Theorem 5] to provide an upper bound on (interesting) u. (All proofs found in supplement.) Theorem 3.1. If gcd(LS) = 1, then stabilization occurs at f ≤nF + γ + d + 1. where nF is the Frobenius number,3 d is the graph diameter, and γ is the transit number (see supplement). This is a theoretically useful bound, but is not practically helpful since neither γ nor nF have a known analytic expression. Moreover, gcd(LS) = 1 is a weak restriction, but a restriction nonetheless. We instead use a functional stopping rule for u (Theorem 3.2) that holds for all G: Theorem 3.2. If Gu = Gv for u > v, then ∀w > u∃kw < u[Gw = Gkw]. That is, as u increases, if we find a graph that we previously encountered, then there cannot be any new graphs as u →∞. For a given G1, we can thus determine all possible corresponding undersampled graphs by computing G2, G3, . . . until we encounter a previously-observed graph. This stopping rule enables us to (correctly) constrain the u that are considered for each G1. We also require a stopping rule for G1, as we cannot evaluate all 2n2 possible graphs for any reasonable n. The key theoretical result is: Theorem 3.3. If G1 ⊆J 1, then ∀u[Gu ⊆J u]. Let G1 E be the graph resulting from adding the edges in E to G1. Since this is simply another graph, it can be undersampled at rate u; denote the result (G1 E)u. Since G1 E can always serve as J 1 in Theorem 3.3, we immediately have the following two corollaries: Corollary 3.4. If Gu ⊈H, then ∀E[(G1 E)u ⊈H] Corollary 3.5. If ∀u[Gu ⊈H], then ∀E, u[(G1 E)u ⊈H] We thus have a stopping rule for some candidate G1: if Gu is not an edge-subset of H for all u, then do not consider any edge-superset of G1. This stopping rule fits very cleanly with “constructive” algorithms that iteratively add edge(s) to candidate G1. We now develop three such algorithms. 3.2 A recursive edgewise inverse algorithm The two stopping rules naturally suggest a recursive structure learning algorithm with H as input and JHK as output. Start with an empty graph. For each edge e (of n2 possible edges), construct G1 containing only e. If Gu ⊈H for all u, then reject; else if Gu = H for some u,4 then add G1 to JHK; else, recurse into non-conflicting graphs in order. Effectively, this is a depth first search (DFS) algorithm on the solution tree; denote it as RASLre for “recursive edgewise.” Figure 1a provides pseudo-code, and Figure 1b shows how one DFS path in the search tree unfolds. We can prove: Theorem 3.6. The RASLre algorithm is correct and complete. One significant drawback of RASLre is that the same graph can be constructed in many different ways, corresponding to different orders of edge addition; the search tree is actually a search lat3For set B of positive integers with gcd(B) = 1, nF is the max integer with nF ̸= Pb i=1 αiBi for αi ≥0. 4This check requires at most min(eu, eH) + 1 (fast) operations, where eu, eH are the number of edges in Gu, H, respectively. This equality check occurs relatively rarely, since Gu and H must be non-conflicting. 3 Algorithm RecursiveEqClass Input: H Output: JHK 1 initialize empty graph G and set S 2 begin EdgeAdder G∗, H, L 3 if L has elements then 4 forall the edges in L do 5 if edge creates a conflict then 6 remove it from L 7 if L has elements then 8 forall the edges in L do 9 add the edge to G∗ 10 if ∃G ∈{(G∗)u} s.t. G = H then 11 add G∗to S 12 EdgeAdder G∗, H, L \ the edge 13 remove the edge from G∗ 14 put all n2 edges into list L 15 EdgeAdder(G, H, L) 16 return S a: RASLre algorithm 1 1 2 2 3 3 3 1 1 2 1 3 2 1 3 2 2 3 1 2 3 1 1 2 2 3 3 3 1 1 2 1 3 2 1 3 2 2 3 1 2 3 3 1 1 2 1 3 2 1 3 2 2 3 1 2 1 3 2 1 3 2 2 3 1 2 3 1 2 3 3 2 2 3 1 2 3 candidate edges constructed graph no more non-conflicting candidates: backtrack next edge to add pruned conflict-inducing candidate edges no graph constructed along this branch generates H 1 2 3 1 2 3 ground truth H b: Branch of the search tree Figure 1: RASLre algorithm 1a specification, and 1b search tree example tice. The algorithm is thus unnecessarily inefficient, even when we use dynamic programming via memoization of input graphs. 3.3 An iterative edgecentric inverse algorithm To minimize multiple constructions of the same graph, we can use RASLie (“iterative edgewise”) which generates, at stage i, all not-yet-eliminated G1 with exactly i edges. More precisely, at stage 0, RASLie starts with the empty graph; if H is also empty, then it adds the empty graph to JHK. Otherwise, it moves to stage 1. In general, at stage i + 1, RASLie (a) considers each graph G1 resulting from a single edge addition to an acceptable graph at stage i; (b) rejects G1 if it conflicts (for all u) with H; (c) otherwise keeps G1 as acceptable at i + 1; and (d) if ∃u[Gu = H], then adds G1 to JHK. RASLie continues until there are no more edges to add (or it reaches stage n2 + 1). Figure 2 provides the main loop (Figure 2a) and core function of RASLie (Figure 2c), as well as an example of the number of graphs potentially considered at each stage (Figure 2b). RASLie provides significant speed-up and memory gains over RASLre (see Figure 3). We optimize RASLie by tracking the single edges that could possibly still be added; for example, if a single-edge graph is rejected in stage 1, then do not consider adding that edge at other stages. Additional conflicts can be derived analytically, further reducing the graphs to consider. In general, absence of an edge in H implies, for the corresponding (unknown) u, absence of length u paths in all G1 ∈JHK. Since we do not know u, we cannot directly apply this constraint. However, lemmas 3.7 and 3.8 provide useful, special case constraints for u > 1 (implied by a single bidirected edge). Lemma 3.7. If u > 1, then ∀V ̸→W ∈H, G1 cannot contain any of the following paths: 1. ⟲ V →W; 2. ⟲ V →X →W; 3. V → ⟲ X →W; 4. V →X → ⟲ W; 5. V → ⟲ W. Lemma 3.8. If u > 1, then ∀V ̸↔W ∈H ∄T[V ←T →W] ∈G1 3.4 An iterative loopcentric inverse algorithm RASLie yields results in reasonable time for H with up to 8 nodes, though it is computationally demanding. We can gain further computational advantages if we assume that H is an SCC. This assumption is relatively innocuous, as it requires only that our time series be generated by a system with (appropriate) feedback loops. As noted earlier, any SCC is composed of a set of simple loops, and so we modify RASLie to iteratively add loops instead of edges; call the resulting algorithm 4 Algorithm IterativeEqClass Input: H Output: JHK 1 initialize empty sets S 2 init d as an empty graph and n2 edges 3 while d do 4 d, Si = NextIterationGraphs(d, H) 5 S = S ∪Si 6 return S a: RASLie main algorithm 1 2 3 1 2 3 1 2 3 1 7 12 2 1 7 17 15 4 1 9 34 68 74 46 15 2 1 2 3 4 5 6 7 8 1 2 3 4 5 1 2 3 4 number of non-conflicting graphs at the iteration iteration index non-conflicting graphs histogram run 1 run 2 run 3 RASL input: b: Three runs of the algorithm Procedure NextIterationGraphs Input: d graph:edges structure, and H Output: dr and set S ⊆JHK 1 initialize empty structure dr and sets S, Si 2 forall the graphs G in d do 3 forall the edges e in d(G) do 4 if e ̸∈G then 5 if e conflicts with G then 6 continue 7 add e to G 8 if G ̸∈Si then 9 add G to Si 10 if G conflicts with H then 11 continue 12 if ∃˜G ∈{Gu} s.t. ˜G = H then 13 add G to S 14 remove e from G 15 add non-conflicting graphs w/ edges to dr 16 return dr, S c: Core function of RASLie Figure 2: RASLie algorithm (a) main loop; (b) example of graphs considered; and (c) core function. RASLil for “iterative loopwise.” More precisely, RASLil uses the same algorithm as in Figure 2, but successively attempts to add non-conflicting simple loops, rather than non-conflicting edges. RASLil also incorporates the additional constraints due to lemmas 3.7 and 3.8. Figure 3: Run-time comparison. RASLil is surprisingly much faster than RASLie even though, for n nodes, there are Pn i=0 n i (i−1)! simple loops (compared to n2 edges). The key is that introducing a single simple loop induces multiple constraints simultaneously, and so conflicting graphs are discovered at a much earlier stage. As a result, RASLil checks many fewer graphs in practice. For example, consider the G1 in Figure 1, with corresponding H for u = 3. RASLre constructs (not counting pruned single edges) 28,661 graphs; RASLie constructs only 249 graphs; and RASLil considers only 47. For u = 2, these numbers are 413, 44, and 7 respectively. Unsurprisingly, these differences in numbers of examined graphs translate directly into wall clock time differences (Figure 3). 4 Results All three RASL algorithms take a measurement timescale graph H as input. They are therefore compatible with any structure learning algorithm that outputs a measurement timescale graph, whether Structural Vector Autoregression (SVAR) [11], direct Dynamic Bayes Net search [12], or modifications of standard causal structure learning algorithms such as PC [1, 13] and GES [14]. The problem of learning a measurement timescale graph is a very hard one, but is also not our primary focus here. Instead, we focus on the performance of the novel RASL algorithms. First, we abstract away from learning measurement timescale structure and assume that the correct H is provided as input. For these simulated graphs, we focus on SCCs, which are the most scientifically interesting cases. For simplicity (and because within-SCC structure can be learned in parallel for a complex H [9]), we employ single-SCC graphs. To generate random SCCs, we (i) build a single simple loop over n nodes, and (ii) uniformly sample from the other n(n −1) possible edges until 5 we reach the specified density (i.e., proportion of the n2 total possible edges). We employ density in order to measure graph complexity in an (approximately) n-independent way. Figure 4: Run-time behavior. We can improve the runtime speed of RASLre using memoization, though it is then memory-constrained for n ≥6. Figure 3 provides the wall-clock running times for all three RASL algorithms applied to 100 random 5-node graphs at each of three densities. This graph substantiates our earlier claims that RASLil is faster than RASLie, which is faster than RASLre. In fact, each is at least an order of magnitude faster than the previous one. RASLre would take over a year on the most difficult problems, so we focus exclusively on RASLil. Unsurprisingly, run-time complexity of all RASL algorithms depends on the density of H. For each of three density values (20%, 25%, 30%), we generated 100 random 6-node SCCs, which were then undersampled at rates 2, 3, and 4 before being provided as input to RASLil. Figure 4 summarizes wall clock computation time as a function of H’s density, with different plots based on density of G1 and undersampling rate. We also show three examples of H with a range of computation runtime. Unsurprisingly, the most difficult H is quite dense; H with densities below 50% typically require less than one minute. 4.1 Equivalence classes We first use RASLil to determine JHK size and composition for varying H; that is, we explore the degree of underdetermination produced by undersampling. The worst-case underdetermination occurs if H is a super-clique with every possible edge: ∀X, Y [X →Y & X ↔Y ]. Any SCC with gcd(LS) = 1 becomes a super-clique as u →∞[9], so JHK contains all such graphs for super-clique H. We thus note when H is a super-clique, rather than computing the size of JHK. 20% 25% 30% 25% 30% 35% 40% 45% 50% 1 2 4 >1000 superclique density density 5-node graphs 6-node graphs u=2 u=3 u=4 Figure 5: Size of equivalence classes for 100 random SCCs at each density and u ∈{2, 3, 4}. 6 Figure 6: Size of equivalence classes for larger graphs n ∈7, 8, 10 for u ∈2, 3 Figures 5 and 6 plot equivalence class size as a function of both G1 density and the true undersampling rate. For each n and density, we (i) generated 100 random G1; (ii) undersampled each at indicated u; (iii) passed Gu = H to RASLil; and (iv) computed the size of JHK. Interestingly, JHK is typically quite small, sometimes even a singleton. For example, 5-node graphs at u = 2 typically have singleton JHK up to 40% G1 density. Even 10-node graphs often have a singleton JHK (though with relatively sparse G1). Increased undersampling and density both clearly worsen underdetermination, but often not intractably so, particularly since even nonsingleton JHK can be valuable if they permit post hoc inspection or analysis. 2 3 4 5 6 7 8 9 10 11 5-node 25% edge density graphs ... equivalence class size S.C. undersampling rate Figure 7: Effect of the undersampling rate on equivalence class size. To focus on the impact of undersampling, we generated 100 random 5-node SCCs with 25% density, each of which was undersampled for u ∈{2, . . . , 11}. Figure 7 plots the size of JHK as a function of u for these graphs. For u ≤4, singleton JHK still dominate. Interestingly, even u = 11 still yields some non-superclique H. 25% 30% 35% 40% 45% 50% 20% 25% 30% ... rate u=2 u=3 u=4 5-node graphs 6-node graphs Figure 8: Distribution of u for Gu = H for G1 ∈JHK for 5- and 6-node graphs Finally, G1 ∈JHK iff ∃u[Gu = H], but the appropriate u need not be the same for all members of JHK. Figure 8 plots the percentages of u-values appropriate for each G1 ∈JHK, for the H from Figure 5. If actually utrue = 2, then almost all G1 ∈JHK are because of G2; there are rarely G1 ∈JHK due to u > 2. If actually utrue > 2, though, then many G1 ∈JHK are due to Gu where u ̸= utrue. As density and utrue increase, there is increased underdetermination in both G1 and u. 4.2 Synthetic data 7 Figure 9: The estimation and search errors on synthetic data: 6-node graphs, u = 2, 20 per density. In practice, we typically must learn H structure from finite sample data. As noted earlier, there are many algorithms for learning H, as it is a measurement timescale structure (though small modifications are required to learn bidirected edges). In pilot testing, we found that structural vector autoregressive (SVAR) model [11] optimization provided the most accurate and stable solutions for H for our simulation regime. We thus employ the SVAR procedure here, though we note that other measurement timescale learning algorithms might work better in different domains. To test the two-step procedure—SVAR learning passed to RASLil—we generated 20 random 6-node SCCs for each density in {25%, 30%, 35%}. For each random graph, we generated a random transition matrix A by sampling weights for the non-zero elements of the adjacency matrix, and controlling system stability (by keeping the maximal eigenvalue at or below 1). We then generated time series data using a vector auto-regressive (VAR) model [11] with A and random noise (σ = 1). To simulate undersampling, datapoints were removed to yield u = 2. SVAR optimization on the resulting time series yielded a candidate H that was passed to RASLil to obtain JHK. The space of possible H is a factor of n 2 larger than the space of possible G1, and so SVAR optimization can return an H such that JHK = ∅. If RASLil returns ∅, then we rerun it on all H∗that result from a single edge addition or deletion on H. If RASLil returns ∅for all of those graphs, then we consider the H∗that result from two changes to H, then three changes. This search through the 3-step Hamming neighborhood of H essentially always finds an H∗with JH∗K ̸= ∅. Figure 9 shows the results of the two-step process, where algorithm output is evaluated by two error-types: omission error: the number of omitted edges normalized to the total number of edges in the ground truth; comission error: number of edges not present in the ground truth normalized to the total possible edges minus the number of those present in the ground truth. We also plot the estimation errors of SVAR (on the undersampled data) to capture the dependence of RASLil estimation errors on estimation errors for H. Interestingly, RASLil does not significantly increase the error rates over those produced by the SVAR estimation. In fact, we find the contrary (similarly to [6]): the requirement to use an H that could be generated by some undersampled G1 functions as a regularization constraint that corrects for some SVAR estimation errors. 5 Conclusion Time series data are widespread in many scientific domains, but if the measurement and system timescales differ, then we can make significant causal inference errors [9, 15]. Despite this potential for numerous errors, there have been only limited attempts to address this problem [6, 7], and even those methods required strong assumptions about the undersample rate. We here provided the first causal inference algorithms that can reliably learn causal structure from time series data when the system and measurement timescales diverge to an unknown degree. The RASL algorithms are complex, but not restricted to toy problems. We also showed that underdetermination of G1 is sometimes minimal, given the right methods. JHK was often small; substantial system timescale causal structure could be learned from undersampled measurement timescale data. Significant open problems remain, such as more efficient methods when H has JHK = ∅. This paper has, however, expanded our causal inference “toolbox” to include cases of unknown undersampling. Acknowledgments SP & DD contributed equally. This work was supported by awards NIH R01EB005846 (SP); NSF IIS-1318759 (SP); NSF IIS-1318815 (DD); & NIH U54HG008540 (DD) (from the National Human Genome Research Institute through funds provided by the trans-NIH Big Data to Knowledge (BD2K) initiative). The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. 8 References [1] A. Moneta, N. Chlaß, D. Entner, and P. Hoyer. Causal search in structural vector autoregressive models. In Journal of Machine Learning Research: Workshop and Conference Proceedings, Causality in Time Series (Proc. NIPS2009 Mini-Symposium on Causality in Time Series), volume 12, pages 95–114, 2011. [2] C.W.J. Granger. Investigating causal relations by econometric models and cross-spectral methods. Econometrica: Journal of the Econometric Society, pages 424–438, 1969. [3] B. Thiesson, D. Chickering, D. Heckerman, and C. Meek. Arma time-series modeling with graphical models. In Proceedings of the Twentieth Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-04), pages 552–560, Arlington, Virginia, 2004. AUAI Press. [4] Mark Voortman, Denver Dash, and Marek Druzdzel. Learning why things change: The difference-based causality learner. In Proceedings of the Twenty-Sixth Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 641–650, Corvallis, Oregon, 2010. AUAI Press. [5] Nir Friedman, Kevin Murphy, and Stuart Russell. Learning the structure of dynamic probabilistic networks. In 15th Annual Conference on Uncertainty in Artificial Intelligence, pages 139–147, San Francisco, 1999. Morgan Kaufmann. [6] Sergey Plis, David Danks, and Jianyu Yang. Mesochronal structure learning. In Proceedings of the Thirty-First Conference Annual Conference on Uncertainty in Artificial Intelligence (UAI-15), Corvallis, Oregon, 2015. AUAI Press. [7] Mingming Gong, Kun Zhang, Bernhard Schoelkopf, Dacheng Tao, and Philipp Geiger. Discovering temporal causal relations from subsampled data. In Proc. ICML, pages 1898–1906, 2015. [8] T. Richardson and P. Spirtes. Ancestral graph markov models. The Annals of Statistics, 30(4):962–1030, 2002. [9] David Danks and Sergey Plis. Learning causal structure from undersampled time series. In JMLR: Workshop and Conference Proceedings, volume 1, pages 1–10, 2013. [10] Donald B Johnson. Finding all the elementary circuits of a directed graph. SIAM Journal on Computing, 4(1):77–84, 1975. [11] Helmut L¨utkepohl. New introduction to multiple time series analysis. Springer Science & Business Media, 2007. [12] K. Murphy. Dynamic Bayesian Networks: Representation, Inference and Learning. PhD thesis, UC Berkeley, 2002. [13] Clark Glymour, Peter Spirtes, and Richard Scheines. Causal inference. In Erkenntnis Orientated: A Centennial Volume for Rudolf Carnap and Hans Reichenbach, pages 151–189. Springer, 1991. [14] David Maxwell Chickering. Optimal structure identification with greedy search. The Journal of Machine Learning Research, 3:507–554, 2003. [15] Anil K Seth, Paul Chorley, and Lionel C Barnett. Granger causality analysis of fmri bold signals is invariant to hemodynamic convolution but not downsampling. Neuroimage, 65:540–555, 2013. 9 | 2015 | 353 |
5,873 | Structured Estimation with Atomic Norms: General Bounds and Applications Sheng Chen Arindam Banerjee Dept. of Computer Science & Engg., University of Minnesota, Twin Cities {shengc,banerjee}@cs.umn.edu Abstract For structured estimation problems with atomic norms, recent advances in the literature express sample complexity and estimation error bounds in terms of certain geometric measures, in particular Gaussian width of the unit norm ball, Gaussian width of a spherical cap induced by a tangent cone, and a restricted norm compatibility constant. However, given an atomic norm, bounding these geometric measures can be difficult. In this paper, we present general upper bounds for such geometric measures, which only require simple information of the atomic norm under consideration, and we establish tightness of these bounds by providing the corresponding lower bounds. We show applications of our analysis to certain atomic norms, especially k-support norm, for which existing result is incomplete. 1 Introduction Accurate recovery of structured sparse signal/parameter vectors from noisy linear measurements has been extensively studied in the field of compressed sensing, statistics, etc. The goal is to recover a high-dimensional signal (parameter) θ∗∈Rp which is sparse (only has a few nonzero entries), possibly with additional structure such as group sparsity. Typically one assume linear models, y = Xθ∗+ω, in which X ∈Rn×p is the design matrix consisting of n samples, y ∈Rn is the observed response vector, and ω ∈Rn is an unknown noise vector. By leveraging the sparsity of θ∗, previous work has shown that certain L1-norm based estimators [22, 7, 8] can find a good approximation of θ∗using sample size n ≪p. Recent work has extended the notion of unstructured sparsity to other structures in θ∗which can be captured or approximated by some norm R(·) [10, 18, 3, 11, 6, 19] other than L1, e.g., (non)overlapping group sparsity with L1/L2 norm [24, 15], etc. In general, two broad classes of estimators are considered in recovery analysis: (i) Lasso-type estimators [22, 18, 3], which solve the regularized optimization problem ˆθλn = argmin θ∈Rp 1 2n∥Xθ −y∥2 2 + λnR(θ) , (1) and (ii) Dantzig-type estimators [7, 11, 6], which solve the constrained problem ˆθλn = argmin θ∈Rp R(θ) s.t. R∗(XT (Xθ −y)) ≤λn , (2) where R∗(·) is the dual norm of R(·). Variants of these estimators exist [10, 19, 23], but the recovery analysis proceeds along similar lines as these two classes of estimators. To establish recovery guarantees, [18] focused on Lasso-type estimators and R(·) from the class of decomposable norm, e.g., L1, non-overlapping L1/L2 norm. The upper bound for the estimation error ∥ˆθλn−θ∗∥2 for any decomposable norm is characterized in terms of three geometric measures: (i) a dual norm bound, as an upper bound for R∗(XT ω), (ii) sample complexity, the minimal sample size needed for a certain restricted eigenvalue (RE) condition to be true [4, 18], and (iii) a restricted 1 norm compatibility constant between R(·) and L2 norms [18, 3]. The non-asymptotic estimation error bound typically has the form ∥ˆθλn −θ∗||2 ≤c/√n, where c depends on a product of dual norm bound and restricted norm compatibility, whereas the sample complexity characterizes the minimum number of samples after which the error bound starts to be valid. In recent work, [3] extended the analysis of Lasso-type estimator for decomposable norm to any norm, and gave a more succinct characterization of the dual norm bound for R∗(XT ω) and the sample complexity for the RE condition in terms of Gaussian widths [14, 10, 20, 1] of suitable sets where, for any set A ∈Rp, the Gaussian width is defined as w(A) = E sup u∈A ⟨u, g⟩, (3) where g is a standard Gaussian random vector. For Dantzig-type estimators, [11, 6] obtained similar extensions. To be specific, assume entries in X and ω are i.i.d. normal, and define the tangent cone, TR(θ∗) = cone {u ∈Rp | R(θ∗+ u) ≤R(θ∗)} . (4) Then one can get (high-probability) upper bound for R∗(XT ω) as O(√nw(ΩR)) where ΩR = {u ∈ Rp|R(u) ≤1} is the unit norm ball, and the RE condition is satisfied with O(w2(TR(θ∗) ∩Sp−1)) samples, in which Sp−1 is the unit sphere. For convenience, we denote by CR(θ∗) the spherical cap TR(θ∗) ∩Sp−1 throughout the paper. Further, the restricted norm compatibility is given by ΨR(θ∗) = supu∈TR(θ∗) R(u) ∥u∥2 (see Section 2 for details). Thus, for any given norm, it suffices to get a characterization of (i) w(ΩR), the width of the unit norm ball, (ii) w(CR(θ∗)), the width of the spherical cap induced by the tangent cone TR(θ∗), and (iii) ΨR(θ∗), the restricted norm compatibility in the tangent cone. For the special case of L1 norm, accurate characterization of all three measures exist [10, 18]. However, for more general norms, the literature is rather limited. For w(ΩR), the characterization is often reduced to comparison with either w(CR(θ∗)) [3] or known results on other norm balls [13]. While w(CR(θ∗)) has been investigated for certain decomposable norms [10, 9, 1], little is known about general nondecomposable norms. One general approach for upper bounding w(CR(θ∗)) is via the statistical dimension [10, 19, 1], which computes the expected squared distance between a Gaussian random vector and the polar cone of TR(θ∗). To specify the polar, one need full information of the subdifferential ∂R(θ∗), which could be difficult to obtain for non-decomposable norms. A notable bound for (overlapping) L1/L2 norms is presented in [21], which yields tight bounds for mildly non-overlapping cases, but is loose for highly overlapping ones. For ΨR(θ∗), the restricted norm compatibility, results are only available for decomposable norms [18, 3]. In this paper, we present a general set of bounds for the width w(ΩR) of the norm ball, the width w(CR(θ∗)) of the spherical cap, and the restricted norm compatibility ΨR(θ∗). For the analysis, we consider the class of atomic norms that are invariant under sign-changes, i.e., the norm of a vector stays unchanged if any entry changes only by flipping its sign. The class is quite general, and covers most of the popular norms used in practical applications, e.g., L1 norm, ordered weighted L1 (OWL) norm [5] and k-support norm [2]. Specifically we show that sharp bounds on w(ΩR) can be obtained using simple calculation based on a decomposition inequality from [16]. To upper bound w(CR(θ∗)) and ΨR(θ∗), instead of a full specification of TR(θ∗), we only require some information regarding the subgradient of R(θ∗), which is often readily accessible. The key insight is that bounding statistical dimension often ends up computing the expected distance from Gaussian vector to a single point rather than to the whole polar cone, thus the full information on ∂R(θ∗) is unnecessary. In addition, we derive the corresponding lower bounds to show the tightness of our results. As examples, we illustrate the bounds for L1 and OWL norms [5]. Finally, we give sharp bounds for the recently proposed k-support norm [2], for which existing analysis is incomplete. The rest of the paper is organized as follows: we first review the relevant background for Dantzigtype estimator and atomic norm in Section 2. In Section 3, we introduce the general bounds for the geometric measures. In Section 4, we discuss the tightness of our bounds. Section 5 is dedicated to the example of k-support norm, and we conclude in Section 6. 2 Background In this section, we briefly review the recovery guarantee for the generalized Dantzig selector in (2) and the basics on atomic norms. The following lemma, originally [11, Theorem 1], provides an error bound for ∥ˆθλn −θ∗∥2. Related results have appeared for other estimators [18, 10, 19, 3, 23]. 2 Lemma 1 Assume that y = Xθ∗+ ω, where entries of X and ω are i.i.d. copies of standard Gaussian random variable. If λn ≥c1 √nw(ΩR) and n > c2w2(TR(θ∗) ∩Sp−1) = w2(CR(θ∗)) for some constant c1, c2 > 1, with high probability, the estimate ˆθλn given by (2) satisfies ∥ˆθλn −θ∗∥2 ≤O ΨR(θ∗)w(ΩR) √n . (5) In this Lemma, there are three geometric measures—w(ΩR), w(CR(θ∗)) and ΨR(θ∗)—which need to be determined for specific R(·) and θ∗. In this work, we focus on general atomic norms R(·). Given a set of atomic vectors A ⊂Rp, the corresponding atomic norm of any θ ∈Rp is given by ∥θ∥A = inf (X a∈A ca : θ = X a∈A caa, ca ≥0 ∀a ∈A ) (6) In order for ∥· ∥A to be a valid norm, atomic vectors in A has to span Rp, and a ∈A iff −a ∈A. The unit ball of atomic norm ∥· ∥A is given by ΩA = conv(A). In addition, we assume that the atomic set A contains v⊙a for any v ∈{±1}p if a belongs to A, where ⊙denotes the elementwise (Hadamard) product for vectors. This assumption guarantees that both ∥· ∥A and its dual norm are invariant under sign-changes, which is satisfied by many widely used norms, such as L1 norm, OWL norm [5] and k-support norm [2]. For the rest of the paper, we will use ΩA, TA(θ∗), CA(θ∗) and ΨA(θ∗) with A replaced by appropriate subscript for specific norms. For any vector u and coordinate set S, we define uS by zeroing out all the coordinates outside S. 3 General Analysis for Atomic Norms In this section, we present detailed analysis of the general bounds for the geometric measures, w(ΩA), w(CA(θ∗)) and ΨA(θ∗). In general, knowing the atomic set A is sufficient for bounding w(ΩA). For w(CA(θ∗)) and ΨA(θ∗), we only need a single subgradient of ∥θ∗∥A and some simple additional calculations. 3.1 Gaussian width of unit norm ball Although the atomic set A may contain uncountably many vectors, we assume that A can be decomposed as a union of M “simple” sets, A = A1 ∪A2 ∪. . . ∪AM. By “simple,” we mean the Gaussian width of each Ai is easy to compute/bound. Such a decomposition assumption is often satisfied by commonly used atomic norms, e.g., L1, L1/L2, OWL, k-support norm. The Gaussian width of the unit norm ball of ∥· ∥A can be easily obtained using the following lemma, which is essentially the Lemma 2 in [16]. Related results appear in [16]. Lemma 2 Let M > 4, A1, · · · , AM ⊂Rp, and A = ∪mAm. The Gaussian width of unit norm ball of ∥· ∥A satisfies w(ΩA) = w(conv(A)) = w(A) ≤ max 1≤m≤M w(Am) + 2 sup z∈A ∥z∥2 p log M (7) Next we illustrate application of this result to bounding the width of the unit norm ball of L1 and OWL norm. Example 1.1 (L1 norm): Recall that the L1 norm can be viewed as the atomic norm induced by the set AL1 = {±ei : 1 ≤i ≤p}, where {ei}p i=1 is the canonical basis of Rp. Since the Gaussian width of a singleton is 0, if we treat A as the union of individual {+ei} and {−ei}, we have w(ΩL1) ≤0 + 2 p log 2p = O( p log p) . (8) Example 1.2 (OWL norm): A recent variant of L1 norm is the so-called ordered weighted L1 (OWL) norm [13, 25, 5] defined as ∥θ∥owl = Pp i=1 wi|θ|↓ i , where w1 ≥w2 ≥. . . ≥wp ≥0 are pre-specified ordered weights, and |θ|↓is the permutation of |θ| with entries sorted in decreasing order. In [25], the OWL norm is proved to be an atomic norm with atomic set Aowl = [ 1≤i≤p Ai = [ 1≤i≤p [ | supp(S)|=i ( u ∈Rp : uSc = 0, uS = vS Pi j=1 wj , v ∈{±1}p ) . (9) 3 We first apply Lemma 2 to each set Ai, and note that each Ai contains 2i p i atomic vectors. w(Ai) ≤0 + 2 s i (Pi j=1 wj)2 s log 2i p i ≤ 2i Pi j=1 wj r 2 + log p i ≤2 ¯w r 2 + log p i , where ¯w is the average of w1, . . . , wp. Then we apply the lemma again to Aowl and obtain w(Ωowl) = w(Aowl) ≤2 ¯w p 2 + log p + 2 ¯w p log p = O √log p ¯w , (10) which matches the result in [13]. 3.2 Gaussian width of the intersection of tangent cone and unit sphere In this subsection, we consider the computation of general w(CA(θ∗)). Using the definition of dual norm, we can write ∥θ∗∥A as ∥θ∗∥A = sup∥u∥∗ A≤1⟨u, θ∗⟩, where ∥· ∥∗ A denotes the dual norm of ∥· ∥A. The u∗for which ⟨u∗, θ∗⟩= ∥θ∗∥A, is a subgradient of ∥θ∗∥A. One can obtain u∗by simply solving the so-called polar operator [26] for the dual norm ∥· ∥∗ A, u∗∈argmax ∥u∥∗ A≤1 ⟨u, θ∗⟩. (11) Based on polar operator, we start with the Lemma 3, which plays a key role in our analysis. Lemma 3 Let u∗be a solution to the polar operator (11), and define the weighted L1 semi-norm ∥· ∥u∗as ∥v∥u∗= Pp i=1 |u∗ i | · |vi|. Then the following relation holds TA(θ∗) ⊆Tu∗(θ∗) , where Tu∗(θ∗) = cone{v ∈Rp | ∥θ∗+ v∥u∗≤∥θ∗∥u∗}. The proof of this lemma is in supplementary material. Note that the solution to (11) may not be unique. A good criterion for choosing u∗is to avoid zeros in u∗, as any u∗ i = 0 will lead to the unboundedness of unit ball of ∥· ∥u∗, which could potentially increase the size of Tu∗(θ∗). Next we present the upper bound for w(CA(θ∗)). Theorem 4 Suppose that u∗is one of the solutions to (11), and define the following sets, Q = {i | u∗ i = 0}, S = {i | u∗ i ̸= 0, θ∗ i ̸= 0}, R = {i | u∗ i ̸= 0, θ∗ i = 0} . The Gaussian width w(CA(θ∗)) is upper bounded by w(CA(θ∗)) ≤ √p , if R is empty q m + 3 2s + 2κ2max κ2 min s log p−m s , if R is nonempty , (12) where m = |Q|, s = |S|, κmin = mini∈R |u∗ i | and κmax = maxi∈S |u∗ i |. Proof: By Lemma 3, we have w(CA(θ∗)) ≤w(Tu∗(θ∗) ∩Sp−1) ≜w(Cu∗(θ∗)). Hence we can focus on bounding w(Cu∗(θ∗)). We first analyze the structure of v that satisfies ∥θ∗+ v∥u∗≤ ∥θ∗∥u∗. For the coordinates Q = {i | u∗ i = 0}, the corresponding entries vi’s can be arbitrary since it does not affect the value of ∥θ∗+ v∥u∗. Thus all possible vQ form a m-dimensional subspace, where m = |Q|. For S ∪R = {i | u∗ i ̸= 0}, we define ˜θ = θ∗ S∪R and ˜v = vS∪R, and ˜v needs to satisfy ∥˜v + ˜θ∥u∗≤∥˜θ∥u∗, which is similar to the L1-norm tangent cone except that coordinates are weighted by |u∗|. Therefore we use the techniques for proving the Proposition 3.10 in [10]. Based on the structure of v, The normal cone at θ∗for Tu∗(θ∗) is given by N(θ∗) = {z : ⟨z, v⟩≤0 ∀v s.t. ∥v + θ∗∥u∗≤∥θ∗∥u∗} = {z : zi = 0 for i ∈Q, zi = |u∗ i |sign(˜θi)t for i ∈S, |zi| ≤|u∗ i |t for i ∈R, for any t ≥0} . 4 Given a standard Gaussian random vector g, using the relation between Gaussian width and statistical dimension (Proposition 2.4 and 10.2 in [1]), we have w2(Cu∗(θ∗)) ≤E[ inf z∈N (θ∗) ∥z −g∥2 2] = E[ inf z∈N (θ∗) X i∈Q g2 i + X j∈S (zj −gj)2 + X k∈R (zk −gk)2] = |Q| + E[ inf zS∪R∈N (θ∗) X j∈S (|u∗ j|sign(˜θj)t −gj)2 + X k∈R (zk −gk)2] ≤|Q| + t2 X j∈S |u∗ j|2 + |S| + E[ X k∈R inf |zk|≤|u∗ k|t(zk −gk)2] ≤|Q| + t2 X j∈S |u∗ j|2 + |S| + X k∈R 2 √ 2π Z +∞ |u∗ k|t (gk −|u∗ k|t)2 exp(−g2 k 2 )dgk ! ≤|Q| + t2 X j∈S |u∗ j|2 + |S| + X k∈R 2 √ 2π 1 |u∗ k|t exp −|u∗ k|2t2 2 (∗) . The details for the derivation above can be found in Appendix C of [10]. If R is empty, by taking t = 0, we have (∗) ≤|Q| + t2 X j∈S |u∗ j|2 + |S| = |Q| + |S| = p . If R is nonempty, we denote κmin = mini∈R |u∗ i | and κmax = maxi∈S |u∗ i |. Taking t = 1 κmin r 2 log |S∪R| |S| , we obtain (∗) ≤|Q| + |S|(κ2 maxt2 + 1) + 2|R| exp −κ2 mint2 2 √ 2πκmint = |Q| + |S| 2κ2 max κ2 min log |S ∪R| |S| + 1 + |R||S| |S ∪R| r π log |S∪R| |S| ≤|Q| + 2κ2 max κ2 min |S| log |S ∪R| |S| + 3 2|S| . Substituting |Q| = m, |S| = s and |S ∪R| = p−m into the last inequality completes the proof. Suppose that θ∗is a s-sparse vector. We illustrate the above bound on the Gaussian width of the spherical cap using L1 norm and OWL norm as examples. Example 2.1 (L1 norm): The dual norm of L1 is L∞norm, and its easy to verify that u∗= [1, 1, . . . , 1]T ∈Rp is a solution to (11). Applying Theorem 4 to u∗, we have w(CL1(θ∗)) ≤ r 3 2s + 2s log p s = O r s + s log p s . Example 2.2 (OWL norm): For OWL, its dual norm is given by ∥u∥∗ owl = maxb∈Aowl⟨b, u⟩. W.l.o.g. we assume θ∗= |θ∗|↓, and a solution to (11) is given by u∗= [w1, . . . , ws, ˜w, ˜w, . . . , ˜w]T , in which ˜w is the average of ws+1, . . . , wp. If all wi’s are nonzero, the Gaussian width satisfies w(Cowl(θ∗)) ≤ r 3 2s + 2w2 1 ˜w2 s log p s . 3.3 Restricted norm compatibility The next theorem gives general upper bounds for the restricted norm compatibility ΨA(θ∗). Theorem 5 Assume that ∥u∥A ≤max{β1∥u∥1, β2∥u∥2} for all u ∈Rp. Under the setting of Theorem 4, the restricted norm compatibility ΨA(θ∗) is upper bounded by ΨA(θ∗) ≤ ( Φ , if R is empty ΦQ + max n β2, β1 1 + κmax κmin √s o , if R is nonempty , (13) where Φ = supu∈Rp ∥u∥A ∥u∥2 and ΦQ = supsupp(u)⊆Q ∥u∥A ∥u∥2 . 5 Proof: As analyzed in the proof of Theorem 4, vQ for v ∈Tu∗(θ∗) can be arbitrary, and the vS∪R = vQc satisfies ∥vQc + θ∗ Qc∥u∗≤∥θ∗ Qc∥u∗ =⇒ X i∈S |θ∗ i + vi||u∗ i | + X j∈R |vj||u∗ j| ≤ X i∈S |θ∗ i ||u∗ i | =⇒ X i∈S (|θ∗ i | −|vi|) |u∗ i | + X j∈R |vj||u∗ j| ≤ X i∈S |θ∗ i ||u∗ i | =⇒ κmin∥vR∥1 ≤κmax∥vS∥1 If R is empty, by Lemma 3, we obtain ΨA(θ∗) ≤Ψu∗(θ∗) ≜ sup v∈Tu∗(θ∗) ∥v∥A ∥v∥2 ≤sup v∈Rp ∥v∥A ∥v∥2 = Φ . If R is nonempty, we have ΨA(θ∗) ≤Ψu∗(θ∗) ≤ sup v∈Tu∗(θ∗) ∥vQ∥A + ∥vQc∥A ∥v∥2 ≤ sup supp(v)⊆Q, supp(v′)⊆Qc κmin∥v′ R∥1≤κmax∥v′ S∥1 ∥v∥A + ∥v′∥A ∥v + v′∥2 ≤ sup supp(v)⊆Q ∥v∥A ∥v∥2 + sup supp(v′)⊆Qc κmin∥v′ R∥1≤κmax∥v′ S∥1 max{β1∥v′∥1, β2∥v′∥2} ∥v′∥2 ≤ΦQ + max{β2, sup supp(v′)⊆S β(1 + κmax κmin )∥v′∥1 ∥v′∥2 } ≤ΦQ + max{β2, β1 1 + κmax κmin √s} , in which the last inequality in the first line uses the property of Tu∗(θ∗). Remark: We call Φ the unrestricted norm compatibility, and ΦQ the subspace norm compatibility, both of which are often easier to compute than ΨA(θ∗). The β1 and β2 in the assumption of ∥· ∥A can have multiple choices, and one has the flexibility to choose the one that yields the tightest bound. Example 3.1 (L1 norm): To apply the Theorem 5 to L1 norm, we can choose β1 = 1 and β2 = 0. We recall the u∗for L1 norm, whose Q is empty while R is nonempty. So we have for s-sparse θ∗ ΨL1(θ∗) ≤0 + max 0, 1 + 1 1 √s = 2√s . Example 3.2 (OWL norm): For OWL, note that ∥· ∥owl ≤w1∥· ∥1. Hence we choose β1 = w1 and β2 = 0. As a result, we similarly have for s-sparse θ∗ Ψowl(θ∗) ≤0 + max n 0, w1 1 + w1 ˜w √s o ≤2w2 1 ˜w √s . 4 Tightness of the General Bounds So far we have shown that the geometric measures can be upper bounded for general atomic norms. One might wonder how tight the bounds in Section 3 are for these measures. For w(ΩA), as the result from [16] depends on the decomposition of A for the ease of computation, it might be tricky to discuss its tightness in general. Hence we will focus on the other two, w(CA(θ∗)) and ΨA(θ∗). To characterize the tightness, we need to compare the lower bounds of w(CA(θ∗)) and ΨA(θ∗), with their upper bounds determined by u∗. While there can be multiple u∗, it is easy to see that any convex combination of them is also a solution to (11). Therefore we can always find a u∗that has the largest support, i.e., supp(u′) ⊆supp(u∗) for any other solution u′. We will use such u∗to generate the lower bounds. First we need the following lemma for the cone TA(θ∗). Lemma 6 Consider a solution u∗to (11), which satisfies supp(u′) ⊆supp(u∗) for any other solution u′. Under the setting of notations in Theorem 4, we define an additional set of coordinates P = {i | u∗ i = 0, θ∗ i = 0}. Then the tangent cone TA(θ∗) satisfies T1 ⊕T2 ⊆cl(TA(θ∗)) , (14) where ⊕denotes the direct (Minkowski) sum operation, cl(·) denotes the closure, T1 = {v ∈ Rp | vi = 0 for i /∈P} is a |P|-dimensional subspace, and T2 = {v ∈Rp | sign(vi) = −sign(θ∗ i ) for i ∈supp(θ∗), vi = 0 for i /∈supp(θ∗)} is a | supp(θ∗)|-dimensional orthant. 6 The proof of Lemma 6 is given in supplementary material. The following theorem gives us the lower bound for w(CA(θ∗)) and ΨA(θ∗). Theorem 7 Under the setting of Theorem 4 and Lemma 6, the following lower bounds hold, w(CA(θ∗)) ≥ O( √ m + s) , (15) ΨA(θ∗) ≥ ΦQ∪S . (16) Proof: To lower bound w(CA(θ∗)), we use Lemma 6 and the relation between Gaussian width and statistical dimension (Proposition 10.2 in [1]), w(TA(θ∗)) ≥w(T1 ⊕T2 ∩Sp−1) ≥ r E[ inf z∈NT1⊕T2(θ∗) ∥z −g∥2 2] −1 (∗) , where the normal cone NT1⊕T2(θ∗) of T1 ⊕T2 is given by NT1⊕T2(θ∗) = {z : zi = 0 for i ∈ P, sign(zi) = sign(θ∗ i ) for i ∈supp(θ∗)}. Hence we have (∗) = s E[ X i∈P g2 i + X j∈supp(θ∗) g2 j I{gjθ∗ j <0}] −1 = r |P| + | supp(θ∗)| 2 −1 = O( √ m + s) , where the last equality follows the fact that P ∪supp(θ∗) = Q ∪S. This completes proof of (15). To prove (16), we again use Lemma 6 and the fact P ∪supp(θ∗) = Q ∪S. Noting that ∥· ∥A is invariant under sign-changes, we get ΨA(θ∗) = sup v∈TA(θ∗) ∥v∥A ∥v∥2 ≥ sup v∈T1⊕T2 ∥v∥A ∥v∥2 = sup supp(v)⊆P∪supp(θ∗) ∥v∥A ∥v∥2 = ΦQ∪S . Remark: We compare the lower bounds (15) (16) with the upper bounds (12) (13). If R is empty, m + s = p, and the lower bounds actually match the upper bounds up to a constant factor for both w(CA(θ∗)) and ΨA(θ∗). If R is nonempty, the lower and upper bounds of w(CA(θ∗)) differ by a multiplicative factor 2κ2 max κ2 min log( p−m s ), which can be small in practice. For ΨA(θ∗), as ΦQ∪S ≥ΦQ, we usually have at most an additive O(√s) term in upper bound, since the assumption on ∥· ∥A often holds with a constant β1 and β2 = 0 for most norms. 5 Application to the k-Support Norm In this section, we apply our general results on geometric measures to a non-trivial example, ksupport norm [2], which has been proved effective for sparse recovery [11, 17, 12]. The k-support norm can be viewed as an atomic norm, for which A = {a ∈Rp | ∥a∥0 ≤k, ∥a∥2 ≤1}. The k-support norm can be explicitly expressed as an infimum convolution given by ∥θ∥sp k = inf P i ui=θ n X i ∥ui∥2 ∥ui∥0 ≤k o , (17) and its dual norm is the so-called 2-k symmetric gauge norm defined as ∥θ∥sp∗ k = ∥θ∥(k) = ∥|θ|↓ 1:k∥2 , (18) It is straightforward to see that the dual norm is simply the L2 norm of the largest k entries in |θ|. Suppose that all the sets of coordinates with cardinality k can be listed as S1, S2, . . . , S( p k). Then A can be written as A = A1 ∪. . . ∪A( p k), where each Ai = {a ∈Rp | supp(a) ⊆Si, ∥a∥2 ≤1}. It is not difficult to see that w(Ai) = E supa∈Ai⟨a, g⟩ = E∥gSi∥2 ≤ p E∥gSi∥2 2 ≤ √ k. Using Lemma 2, we know the Gaussian width of the unit ball of k-support norm w(Ωsp k ) ≤ √ k + 2 s log p k ≤ √ k + 2 r k log p k + k = O r k log p k + k , (19) which matches that in [11]. Now we turn to the calculation of w(Csp k (θ∗)) and Ψsp k (θ∗). As we have seen in the general analysis, the solution u∗to the polar operator (11) is important in characterizing the two quantities. We first present a simple procedure in Algorithm 1 for solving the polar operator for ∥· ∥sp∗ k . The time complexity is only O(p log p + k). This procedure can be utilized to compute the k-support norm, or be applied to estimation with ∥· ∥sp∗ k using generalized conditional gradient method [26], which requires solving the polar operator in each iteration. 7 Algorithm 1 Solving polar operator for ∥· ∥sp∗ k Input: θ∗∈Rp, positive integer k Output: solution u∗to the polar operator (11) 1: z = |θ∗|↓, t = 0 2: for i = 1 to k do 3: γ1 = ∥z1:i−1∥2, γ2 = ∥zi:p∥1, d = k −i + 1, β = γ2 √ γ2 2d+γ2 1d2 , α = γ1 2√ 1−β2d, w = z1:i−1 2α 4: if γ2 1 2α + βγ2 > t and β < wi−1 then 5: t = γ2 1 2α + βγ2, u∗= [w, β1]T (1 is (p −i + 1)-dimensional vector with all ones) 6: end if 7: end for 8: change the sign and order of u∗to conform with θ∗ 9: return u∗ Theorem 8 For a given θ∗, Algorithm 1 returns a solution to polar operator (11) for ∥· ∥sp∗ k . The proof of this theorem is provided in supplementary material. Now we consider w(Csp k (θ∗)) and Ψsp k (θ∗) for s-sparse θ∗(here s-sparse θ∗means | supp(θ∗)| = s) in three scenarios: (i) overspecified k, where s < k, (ii) exactly specified k, where s = k, and (iii) under-specified k, where s > k. The bounds are given in Theorem 9, and the proof is also in supplementary material. Theorem 9 For given s-sparse θ∗∈Rp, the Gaussian width w(Csp k (θ∗)) and the restricted norm compatibility Ψsp k (θ∗) for a specified k are given by w(Csp k (θ∗)) ≤ √p , if s < k r 3 2s + 2θ∗2 max θ∗2 min s log p s , if s = k q 3 2s + 2κ2max κ2 min s log p s , if s > k , Ψsp k (θ∗) ≤ q 2p k , if s < k √ 2(1 + θ∗ max θ∗ min ) , if s = k (1 + κmax κmin ) q 2s k , if s > k , (20) where θ∗ max = maxi∈supp(θ∗) |θ∗ i | and θ∗ min = mini∈supp(θ∗) |θ∗ i |. Remark: Previously Ψsp k (θ∗) is unknown and the bound on w(Csp k (θ∗)) given in [11] is loose, as it used the result in [21]. Based on Theorem 9, we note that the choice of k can affect the recovery guarantees. Over-specified k leads to a direct dependence on the dimensionality p for w(Csp k (θ∗)) and Ψsp k (θ∗), resulting in a weak error bound. The bounds are sharp for exactly specified or underspecified k. Thus, it is better to under-specify k in practice. where the estimation error satifies ∥ˆθλn −θ∗∥2 ≤O r s + s log (p/k) n ! (21) 6 Conclusions In this work, we study the problem of structured estimation with general atomic norms that are invariant under sign-changes. Based on Dantzig-type estimators, we provide the general bounds for the geometric measures. In terms of w(ΩA), instead of comparison with other results or direct calculation, we demonstrate a third way to compute it based on decomposition of atomic set A. For w(CA(θ∗)) and ΨA(θ∗), we derive general upper bounds, which only require the knowledge of a single subgradient of ∥θ∗∥A. We also show that these upper bounds are close to the lower bounds, which makes them practical in general. To illustrate our results, we discuss the application to k-support norm in details and shed light on the choice of k in practice. Acknowledgements The research was supported by NSF grants IIS-1447566, IIS-1422557, CCF-1451986, CNS1314560, IIS-0953274, IIS-1029711, and by NASA grant NNX12AQ39A. 8 References [1] D. Amelunxen, M. Lotz, M. B. McCoy, and J. A. Tropp. Living on the edge: Phase transitions in convex programs with random data. Inform. Inference, 3(3):224–294, 2014. [2] A. Argyriou, R. Foygel, and N. Srebro. Sparse prediction with the k-support norm. In Advances in Neural Information Processing Systems (NIPS), 2012. [3] A. Banerjee, S. Chen, F. Fazayeli, and V. Sivakumar. Estimation with norm regularization. In Advances in Neural Information Processing Systems (NIPS), 2014. [4] P. J. Bickel, Y. Ritov, and A. B. Tsybakov. Simultaneous analysis of Lasso and Dantzig selector. The Annals of Statistics, 37(4):1705–1732, 2009. [5] M. Bogdan, E. van den Berg, W. Su, and E. Candes. Statistical estimation and testing via the sorted L1 norm. arXiv:1310.1969, 2013. [6] T. T. Cai, T. Liang, and A. Rakhlin. Geometrizing Local Rates of Convergence for High-Dimensional Linear Inverse Problems. arXiv:1404.4408, 2014. [7] E. Candes and T Tao. The Dantzig selector: statistical estimation when p is much larger than n. The Annals of Statistics, 35(6):2313–2351, 2007. [8] E. J. Cand`es, J. K. Romberg, and T. Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on Pure and Applied Mathematics, 59(8):1207–1223, 2006. [9] E. J. Cands and B. Recht. Simple bounds for recovering low-complexity models. Math. Program., 141(12):577–589, 2013. [10] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Foundations of Computational Mathematics, 12(6):805–849, 2012. [11] S. Chatterjee, S. Chen, and A. Banerjee. Generalized dantzig selector: Application to the k-support norm. In Advances in Neural Information Processing Systems (NIPS), 2014. [12] S. Chen and A. Banerjee. One-bit compressed sensing with the k-support norm. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [13] M. A. T. Figueiredo and R. D. Nowak. Sparse estimation with strongly correlated variables using ordered weighted l1 regularization. arXiv:1409.4005, 2014. [14] Y. Gordon. Some inequalities for gaussian processes and applications. Israel Journal of Mathematics, 50(4):265–289, 1985. [15] L. Jacob, G. Obozinski, and J.-P. Vert. Group lasso with overlap and graph lasso. In International Conference on Machine Learning (ICML), 2009. [16] A. Maurer, M. Pontil, and B. Romera-Paredes. An Inequality with Applications to Structured Sparsity and Multitask Dictionary Learning. In Conference on Learning Theory (COLT), 2014. [17] A. M. McDonald, M. Pontil, and D. Stamos. Spectral k-support norm regularization. In Advances in Neural Information Processing Systems (NIPS), 2014. [18] S. Negahban, P. Ravikumar, M. J. Wainwright, and B. Yu. A unified framework for the analysis of regularized M-estimators. Statistical Science, 27(4):538–557, 2012. [19] S. Oymak, C. Thrampoulidis, and B. Hassibi. The Squared-Error of Generalized Lasso: A Precise Analysis. arXiv:1311.0830, 2013. [20] Y. Plan and R. Vershynin. Robust 1-bit compressed sensing and sparse logistic regression: A convex programming approach. IEEE Transactions on Information Theory, 59(1):482–494, 2013. [21] N. Rao, B. Recht, and R. Nowak. Universal Measurement Bounds for Structured Sparse Signal Recovery. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2012. [22] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society, Series B, 58(1):267–288, 1996. [23] J. A. Tropp. Convex recovery of a structured signal from independent random linear measurements. In Sampling Theory, a Renaissance. 2015. [24] M. Yuan and Y. Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society, Series B, 68:49–67, 2006. [25] X. Zeng and M. A. T. Figueiredo. The Ordered Weighted ℓ1 Norm: Atomic Formulation, Projections, and Algorithms. arXiv:1409.4271, 2014. [26] X. Zhang, Y. Yu, and D. Schuurmans. Polar operators for structured sparse estimation. In Advances in Neural Information Processing Systems (NIPS), 2013. 9 | 2015 | 354 |
5,874 | Logarithmic Time Online Multiclass prediction Anna Choromanska Courant Institute of Mathematical Sciences New York, NY, USA achoroma@cims.nyu.edu John Langford Microsoft Research New York, NY, USA jcl@microsoft.com Abstract We study the problem of multiclass classification with an extremely large number of classes (k), with the goal of obtaining train and test time complexity logarithmic in the number of classes. We develop top-down tree construction approaches for constructing logarithmic depth trees. On the theoretical front, we formulate a new objective function, which is optimized at each node of the tree and creates dynamic partitions of the data which are both pure (in terms of class labels) and balanced. We demonstrate that under favorable conditions, we can construct logarithmic depth trees that have leaves with low label entropy. However, the objective function at the nodes is challenging to optimize computationally. We address the empirical problem with a new online decision tree construction procedure. Experiments demonstrate that this online algorithm quickly achieves improvement in test error compared to more common logarithmic training time approaches, which makes it a plausible method in computationally constrained large-k applications. 1 Introduction The central problem of this paper is computational complexity in a setting where the number of classes k for multiclass prediction is very large. Such problems occur in natural language (Which translation is best?), search (What result is best?), and detection (Who is that?) tasks. Almost all machine learning algorithms (with the exception of decision trees) have running times for multiclass classification which are O(k) with a canonical example being one-against-all classifiers [1]. In this setting, the most efficient possible accurate approach is given by information theory [2]. In essence, any multiclass classification algorithm must uniquely specify the bits of all labels that it predicts correctly on. Consequently, Kraft’s inequality ([2] equation 5.6) implies that the expected computational complexity of predicting correctly is Ω(H(Y )) per example where H(Y ) is the Shannon entropy of the label. For the worst case distribution on k classes, this implies Ω(log(k)) computation is required. Hence, our goal is achieving O(log(k)) computational time per example1 for both training and testing, while effectively using online learning algorithms to minimize passes over the data. The goal of logarithmic (in k) complexity naturally motivates approaches that construct a logarithmic depth hierarchy over the labels, with one label per leaf. While this hierarchy is sometimes available through prior knowledge, in many scenarios it needs to be learned as well. This naturally leads to a partition problem which arises at each node in the hierarchy. The partition problem is finding a classifier: c : X →{−1, 1} which divides examples into two subsets with a purer set of labels than the original set. Definitions of purity vary, but canonical examples are the number of labels remaining in each subset, or softer notions such as the average Shannon entropy of the class labels. Despite resulting in a classifier, this problem is fundamentally different from standard binary classification. To see this, note that replacing c(x) with −c(x) is very bad for binary classification, but has no impact on the quality of a partition2. The partition problem is fundamentally non-convex 1Throughout the paper by logarithmic time we mean logarithmic time per example. 2The problem bears parallels to clustering in this regard. 1 for symmetric classes since the average c(x)−c(x) 2 of c(x) and −c(x) is a poor partition (the always-0 function places all points on the same side). The choice of partition matters in problem dependent ways. For example, consider examples on a line with label i at position i and threshold classifiers. In this case, trying to partition class labels {1, 3} from class label 2 results in poor performance. The partition problem is typically solved for decision tree learning via an enumerate-and-test approach amongst a small set of possible classifiers (see e.g. [3]). In the multiclass setting, it is desirable to achieve substantial error reduction for each node in the tree which motivates using a richer set of classifiers in the nodes to minimize the number of nodes, and thereby decrease the computational complexity. The main theoretical contribution of this work is to establish a boosting algorithm for learning trees with O(k) nodes and O(log k) depth, thereby addressing the goal of logarithmic time train and test complexity. Our main theoretical result, presented in Section 2.3, generalizes a binary boosting-by-decision-tree theorem [4] to multiclass boosting. As in all boosting results, performance is critically dependent on the quality of the weak learner, supporting intuition that we need sufficiently rich partitioners at nodes. The approach uses a new objective for decision tree learning, which we optimize at each node of the tree. The objective and its theoretical properties are presented in Section 2. 26 105 1000 21841 105033 0 0.2 0.4 0.6 0.8 1 number of classes accuracy LOMtree vs one−against−all OAA LOMtree Figure 1: A comparison of One-AgainstAll (OAA) and the Logarithmic Online Multiclass Tree (LOMtree) with One-Against-All constrained to use the same training time as the LOMtree by dataset truncation and LOMtree constrained to use the same representation complexity as One-Against-All. As the number of class labels grows, the problem becomes harder and the LOMtree becomes more dominant. A complete system with multiple partitions could be constructed top down (as the boosting theorem) or bottom up (as Filter tree [5]). A bottom up partition process appears impossible with representational constraints as shown in Section 6 in the Supplementary material so we focus on top-down tree creation. Whenever there are representational constraints on partitions (such as linear classifiers), finding a strong partition function requires an efficient search over this set of classifiers. Efficient searches over large function classes are routinely performed via gradient descent techniques for supervised learning, so they seem like a natural candidate. In existing literature, examples for doing this exist when the problem is indeed binary, or when there is a prespecified hierarchy over the labels and we just need to find partitioners aligned with that hierarchy. Neither of these cases applies—we have multiple labels and want to dynamically create the choice of partition, rather than assuming that one was handed to us. Does there exist a purity criterion amenable to a gradient descent approach? The precise objective studied in theory fails this test due to its discrete nature, and even natural approximations are challenging to tractably optimize under computational constraints. As a result, we use the theoretical objective as a motivation and construct a new Logarithmic Online Multiclass Tree (LOMtree) algorithm for empirical evaluation. Creating a tree in an online fashion creates a new class of problems. What if some node is initially created but eventually proves useless because no examples go to it? At best this results in a wasteful solution, while in practice it starves other parts of the tree which need representational complexity. To deal with this, we design an efficient process for recycling orphan nodes into locations where they are needed, and prove that the number of times a node is recycled is at most logarithmic in the number of examples. The algorithm is described in Section 3 and analyzed in Section 3.1. And is it effective? Given the inherent non-convexity of the partition problem this is unavoidably an empirical question which we answer on a range of datasets varying from 26 to 105K classes in Section 4. We find that under constrained training times, this approach is quite effective compared to all baselines while dominating other O(log k) train time approaches. What’s new? To the best of our knowledge, the splitting criterion, the boosting statement, the LOMtree algorithm, the swapping guarantee, and the experimental results are all new here. 2 1.1 Prior Work Only a few authors address logarithmic time training. The Filter tree [5] addresses consistent (and robust) multiclass classification, showing that it is possible in the statistical limit. The Filter tree does not address the partition problem as we do here which as shown in our experimental section is often helpful. The partition finding problem is addressed in the conditional probability tree [6], but that paper addresses conditional probability estimation. Conditional probability estimation can be converted into multiclass prediction [7], but doing so is not a logarithmic time operation. Quite a few authors have addressed logarithmic testing time while allowing training time to be O(k) or worse. While these approaches are intractable on our larger scale problems, we describe them here for context. The partition problem can be addressed by recursively applying spectral clustering on a confusion graph [8] (other clustering approaches include [9]). Empirically, this approach has been found to sometimes lead to badly imbalanced splits [10]. In the context of ranking, another approach uses k-means hierarchical clustering to recover the label sets for a given partition [11]. The more recent work [12] on the multiclass classification problem addresses it via sparse output coding by tuning high-cardinality multiclass categorization into a bit-by-bit decoding problem. The authors decouple the learning processes of coding matrix and bit predictors and use probabilistic decoding to decode the optimal class label. The authors however specify a class similarity which is O(k2) to compute (see Section 2.1.1 in [12]), and hence this approach is in a different complexity class than ours (this is also born out experimentally). The variant of the popular error correcting output code scheme for solving multi-label prediction problems with large output spaces under the assumption of output sparsity was also considered in [13]. Their approach in general requires O(k) running time to decode since, in essence, the fit of each label to the predictions must be checked and there are O(k) labels. Another approach [14] proposes iterative least-squares-style algorithms for multi-class (and multi-label) prediction with relatively large number of examples and data dimensions, and the work of [15] focusing in particular on the cost-sensitive multiclass classification. Both approaches however have O(k) training time. Decision trees are naturally structured to allow logarithmic time prediction. Traditional decision trees often have difficulties with a large number of classes because their splitting criteria are not well-suited to the large class setting. However, newer approaches [16, 17] have addressed this effectively at significant scales in the context of multilabel classification (multilabel learning, with missing labels, is also addressed in [18]). More specifically, the first work [16] performs brute force optimization of a multilabel variant of the Gini index defined over the set of positive labels in the node and assumes label independence during random forest construction. Their method makes fast predictions, however has high training costs [17]. The second work [17] optimizes a rank sensitive loss function (Discounted Cumulative Gain). Additionally, a well-known problem with hierarchical classification is that the performance significantly deteriorates lower in the hierarchy [19] which some authors solve by biasing the training distribution to reduce error propagation while simultaneously combining bottom-up and top-down approaches during training [20]. The reduction approach we use for optimizing partitions implicitly optimizes a differential objective. A non-reductive approach to this has been tried previously [21] on other objectives yielding good results in a different context. 2 Framework and theoretical analysis In this section we describe the essential elements of the approach, and outline the theoretical properties of the resulting framework. We begin with high-level ideas. 2.1 Setting We employ a hierarchical approach for learning a multiclass decision tree structure, training this structure in a top-down fashion. We assume that we receive examples x ∈X ⊆Rd, with labels y ∈{1, 2, . . . , k}. We also assume access to a hypothesis class H where each h ∈H is a binary classifier, h : X 7→{−1, 1}. The overall objective is to learn a tree of depth O(log k), where each node in the tree consists of a classifier from H. The classifiers are trained in such a way that hn(x) = 1 (hn denotes the classifier in node n of the tree3) means that the example x is sent to the right subtree of node n, while hn(x) = −1 sends x to the left subtree. When we reach a leaf, we predict according to the label with the highest frequency amongst the examples reaching that leaf. 3Further in the paper we skip index n whenever it is clear from the context that we consider a fixed tree node. 3 In the interest of computational complexity, we want to encourage the number of examples going to the left and right to be fairly balanced. For good statistical accuracy, we want to send examples of class i almost exclusively to either the left or the right subtree, thereby refining the purity of the class distributions at subsequent levels in the tree. The purity of a tree node is therefore a measure of whether the examples of each class reaching the node are then mostly sent to its one child node (pure split) or otherwise to both children (impure split). The formal definitions of balancedness and purity are introduced in Section 2.2. An objective expressing both criteria4 and resulting theoretical properties are illustrated in the following sections. A key consideration in picking this objective is that we want to effectively optimize it over hypotheses h ∈H, while streaming over examples in an online fashion5. This seems unsuitable with some of the more standard decision tree objectives such as Shannon or Gini entropy, which leads us to design a new objective. At the same time, we show in Section 2.3 that under suitable assumptions, optimizing the objective also leads to effective reduction of the average Shannon entropy over the entire tree. 2.2 An objective and analysis of resulting partitions We now define a criterion to measure the quality of a hypothesis h ∈H in creating partitions at a fixed node n in the tree. Let πi denotes the proportion of label i amongst the examples reaching this node. Let P(h(x) > 0) and P(h(x) > 0|i) denote the fraction of examples reaching n for which h(x) > 0, marginally and conditional on class i respectively. Then we define the objective6: J(h) = 2 k X i=1 πi |P(h(x) > 0) −P(h(x) > 0|i)| . (1) We aim to maximize the objective J(h) to obtain high quality partitions. Intuitively, the objective encourages the fraction of examples going to the right from class i to be substantially different from the background fraction for each class i. As a concrete simple scenario, if P(h(x) > 0) = 0.5 for some hypothesis h, then the objective prefers P(h(x) > 0|i) to be as close to 0 or 1 as possible for each class i, leading to pure partitions. We now make these intuitions more formal. Definition 1 (Purity). The hypothesis h ∈H induces a pure split if α := k X i=1 πi min(P(h(x) > 0|i), P(h(x) < 0|i)) ≤δ, where δ ∈[0, 0.5), and α is called the purity factor. In particular, a partition is called maximally pure if α = 0, meaning that each class is sent exclusively to the left or the right. We now define a similar definition for the balancedness of a split. Definition 2 (Balancedness). The hypothesis h ∈H induces a balanced split if c ≤P(h(x) > 0) | {z } =β ≤1 −c, where c ∈(0, 0.5], and β is called the balancing factor. A partition is called maximally balanced if β = 0.5, meaning that an equal number of examples are sent to the left and right children of the partition. The balancing factor and the purity factor are related as shown in Lemma 1 (the proofs of Lemma 1 and the following lemma (Lemma 2) are deferred to the Supplementary material). Lemma 1. For any hypothesis h, and any distribution over examples (x, y), the purity factor α and the balancing factor β satisfy α ≤min{(2 −J(h))/(4β) −β, 0.5}. A partition is called maximally pure and balanced if it satisfies both α = 0 and β = 0.5. We see that J(h) = 1 for a hypothesis h inducing a maximally pure and balanced partition as captured in the next lemma. Of course we do not expect to have hypotheses producing maximally pure and balanced splits in practice. Lemma 2. For any hypothesis h : X 7→{−1, 1}, the objective J(h) satisfies J(h) ∈[0, 1]. Furthermore, if h induces a maximally pure and balanced partition then J(h) = 1. 4We want an objective to achieve its optimum for simultaneously pure and balanced split. The standard entropy-based criteria, such as Shannon or Gini entropy, as well as the criterion we will propose, posed in Equation 1, satisfy this requirement (for the entropy-based criteria see [4], for our criterion see Lemma 2). 5Our algorithm could also be implemented as batch or streaming, where in case of the latter one can for example make one pass through the data per every tree level, however for massive datasets making multiple passes through the data is computationally costly, further justifying the need for an online approach. 6The proposed objective function exhibits some similarities with the so-called Carnap’s measure [22, 23] used in probability and inductive logic. 4 2.3 Quality of the entire tree The above section helps us understand the quality of an individual split produced by effectively maximizing J(h). We next reason about the quality of the entire tree as we add more and more nodes. We measure the quality of trees using the average entropy over all the leaves in the tree, and track the decrease of this entropy as a function of the number of nodes. Our analysis extends the theoretical analysis in [4], originally developed to show the boosting properties of the decision trees for binary classification problems, to the multiclass classification setting. Given a tree T , we consider the entropy function Gt as the measure of the quality of tree: Gt = X l∈L wl k X i=1 πl,i ln 1 πl,i where πl,i’s are the probabilities that a randomly chosen data point x drawn from P, where P is a fixed target distribution over X, has label i given that x reaches node l, L denotes the set of all tree leaves, t denotes the number of internal tree nodes, and wl is the weight of leaf l defined as the probability a randomly chosen x drawn from P reaches leaf l (note that P l∈L wl = 1). We next state the main theoretical result of this paper (it is captured in Theorem 1). We adopt the weak learning framework. The weak hypothesis assumption, captured in Definition 3, posits that each node of the tree T has a hypothesis h in its hypothesis class H which guarantees simultaneously a ”weak” purity and a ”weak” balancedness of the split on any distribution P over X. Under this assumption, one can use the new decision tree approach to drive the error below any threshold. Definition 3 (Weak Hypothesis Assumption). Let m denote any node of the tree T , and let βm = P(hm(x) > 0) and Pm,i = P(hm(x) > 0|i). Furthermore, let γ ∈R+ be such that for all m, γ ∈(0, min(βm, 1 −βm)]. We say that the weak hypothesis assumption is satisfied when for any distribution P over X at each node m of the tree T there exists a hypothesis hm ∈H such that J(hm)/2 = Pk i=1 πm,i|Pm,i −βm| ≥γ. Theorem 1. Under the Weak Hypothesis Assumption, for any α ∈[0, 1], to obtain Gt ≤α it suffices to make t ≥(1/α) 4(1−γ)2 ln k γ2 splits. We defer the proof of Theorem 1 to the Supplementary material and provide its sketch now. The analysis studies a tree construction algorithm where we recursively find the leaf node with the highest weight, and choose to split it into two children. Let n be the heaviest leaf at time t. Consider splitting it to two children. The contribution of node n to the tree entropy changes after it splits. This change (entropy reduction) corresponds to a gap in the Jensen’s inequality applied to the concave function, and thus can further be lower-bounded (we use the fact that Shannon entropy is strongly concave with respect to ℓ1-norm (see e.g., Example 2.5 in Shalev-Shwartz [24])). The obtained lower-bound turns out to depend proportionally on J(hn)2. This implies that the larger the objective J(hn) is at time t, the larger the entropy reduction ends up being, which further reinforces intuitions to maximize J. In general, it might not be possible to find any hypothesis with a large enough objective J(hn) to guarantee sufficient progress at this point so we appeal to a weak learning assumption. This assumption can be used to further lower-bound the entropy reduction and prove Theorem 1. 3 The LOMtree Algorithm The objective function of Section 2 has another convenient form which yields a simple online algorithm for tree construction and training. Note that Equation 1 can be written (details are shown in Section 12 in the Supplementary material) as J(h) = 2Ei[|Ex[1(h(x) > 0)] −Ex[1(h(x) > 0|i)]|]. Maximizing this objective is a discrete optimization problem that can be relaxed as follows J(h) = 2Ei[|Ex[h(x)] −Ex[h(x)|i]|], where Ex[h(x)|i] is the expected score of class i. We next explain our empirical approach for maximizing the relaxed objective. The empirical estimates of the expectations can be easily stored and updated online in every tree node. The decision whether to send an example reaching a node to its left or right child node is based on the sign of the difference between the two expectations: Ex[h(x)] and Ex[h(x)|y], where y is a label of the data point, i.e. when Ex[h(x)]−Ex[h(x)|y] > 0 the data point is sent to the left, else it is sent to the right. This procedure is conveniently demonstrated on a toy example in Section 13 in the Supplement. During training, the algorithm assigns a unique label to each node of the tree which is currently a leaf. This is the label with the highest frequency amongst the examples reaching that leaf. While 5 Algorithm 1 LOMtree algorithm (online tree training) Input: regression algorithm R, max number of tree non-leaf nodes T, swap resistance RS Subroutine SetNode (v) mv = ∅(mv(y) - sum of the scores for class y) lv = ∅ (lv(y) - number of points of class y reaching v) nv = ∅ (nv(y) - number of points of class y which are used to train regressor in v) ev = ∅ (ev(y) - expected score for class y) Ev = 0 (expected total score) Cv = 0 (the size of the smallest leaf7 in the subtree with root v) Subroutine UpdateC (v) While (v ̸= r AND CPARENT(v) ̸= Cv) v = PARENT(v); Cv = min(CLEFT(v), CRIGHT(v))8 Subroutine Swap (v) Find a leaf s for which (Cs = Cr) sPA=PARENT(s); sGPA=GRANDPA(s); sSIB=SIBLING(s)9 If (sPA = LEFT(sGPA)) LEFT(sGPA) = sSIB Else RIGHT(sGPA) = sSIB UpdateC (sSIB); SetNode (s); LEFT(v) = s; SetNode (sPA); RIGHT(v) = sPA Create root r = 0: SetNode (r); t = 1 For each example (x, y) do Set j = r While j is not a leaf do If (lj(y) = ∅) mj(y) = 0; lj(y) = 0; nj(y) = 0; ej(y) = 0 If (Ej > ej(y)) c=−1 Else c=1 Train hj with example (x, c): R(x, c) lj(y)++; nj(y) ++; mj(y) += hj(x); ej(y) = mj(y)/nj(y); Ej = Pk i=1 mj(i) Pk i=1 nj(i) 10 Set j to the child of j corresponding to hj If(j is a leaf) lj(y)++ If(lj has at least 2 non-zero entries) If(t<T OR Cj−maxi lj(i)>RS(Cr+1)) If (t<T) SetNode (LEFT(j)); SetNode (RIGHT(j)); t++ Else Swap(j) CLEFT(j)=⌊Cj/2⌋; CRIGHT(j)=Cj−CLEFT(j); UpdateC (LEFT(j)) Cj++ testing, a test example is pushed down the tree along the path from the root to the leaf, where in each non-leaf node of the path its regressor directs the example either to the left or right child node. The test example is then labeled with the label assigned to the leaf that this example descended to. The training algorithm is detailed in Algorithm 1 where each tree node contains a classifier (we use linear classifiers), i.e. hj is the regressor stored in node j and hj(x) is the value of the prediction of hj on example x11. The stopping criterion for expanding the tree is when the number of non-leaf nodes reaches a threshold T. 3.1 Swapping Consider a scenario where the current training example descends to leaf j. The leaf can split (create two children) if the examples that reached it in the past were coming from at least two different classes. However, if the number of non-leaf nodes of the tree reaches threshold T, no more nodes can be expanded and thus j cannot create children. Since the tree construction is done online, some nodes created at early stages of training may end up useless because no examples reach them later 7The smallest leaf is the one with the smallest total number of data points reaching it in the past. 8PARENT(v), LEFT(v) and RIGHT(v) denote resp. the parent, and the left and right child of node v. 9GRANDPA(v) and SIBLING(v) denote respectively the grandparent of node v and the sibling of node v, i.e. the node which has the same parent as v. 10In the implementation both sums are stored as variables thus updating Ev takes O(1) computations. 11We also refer to this prediction value as the ’score’ in this section. 6 r . . . j . . . . . . ... sGPA . . . sPA s sSIB . . . . . . r . . . j s sPA . . . . . . ... sGPA . . . sSIB . . . . . . Figure 2: Illustration of the swapping procedure. Left: before the swap, right: after the swap. on. This prevents potentially useful splits such as at leaf j. This problem can be solved by recycling orphan nodes (subroutine Swap in Algorithm 1). The general idea behind node recycling is to allow nodes to split if a certain condition is met. In particular, node j splits if the following holds: Cj − max i∈{1,2,...,k} lj(i) > RS(Cr + 1), (2) where r denotes the root of the entire tree, Cj is the size of the smallest leaf in the subtree with root j, where the smallest leaf is the one with the smallest total number of data points reaching it in the past, lj is a k-dimensional vector of non-negative integers where the ith element is the count of the number of data points with label i reaching leaf j in the past, and finally RS is a “swap resistance”. The subtraction of maxi∈{1,2,...,k} lj(i) in Equation 2 ensures that a pure node will not be recycled. If the condition in Inequality 2 is satisfied, the swap of the nodes is performed where an orphan leaf s, which was reached by the smallest number of examples in the past, and its parent sPA are detached from the tree and become children of node j whereas the old sibling sSIB of an orphan node s becomes a direct child of the old grandparent sGPA. The swapping procedure is shown in Figure 2. The condition captured in the Inequality 2 allows us to prove that the number of times any given node is recycled is upper-bounded by the logarithm of the number of examples whenever the swap resistance is 4 or more (Lemma 3). Lemma 3. Let the swap resistance RS be greater or equal to 4. Then for all sequences of examples, the number of times Algorithm 1 recycles any given node is upper-bounded by the logarithm (with base 2) of the sequence length. 4 Experiments We address several hypotheses experimentally. 1. The LOMtree algorithm achieves true logarithmic time computation in practice. 2. The LOMtree algorithm is competitive with or better than all other logarithmic train/test time algorithms for multiclass classification. 3. The LOMtree algorithm has statistical performance close to more common O(k) approaches. Table 1: Dataset sizes. Isolet Sector Aloi ImNet ODP size 52.3MB19MB17.7MB104GB12 3GB # features 617 54K 128 6144 0.5M # examples 7797 9619 108K 14.2M 1577418 # classes 26 105 1000 ∼22K ∼105K To address these hypotheses, we conducted experiments on a variety of benchmark multiclass datasets: Isolet, Sector, Aloi, ImageNet (ImNet) and ODP13. The details of the datasets are provided in Table 1. The datasets were divided into training (90%) and testing (10%). Furthermore, 10% of the training dataset was used as a validation set. The baselines we compared LOMtree with are a balanced random tree of logarithmic depth (Rtree) and the Filter tree [5]. Where computationally feasible, we also compared with a one-against-all classifier (OAA) as a representative O(k) approach. All methods were implemented in the Vowpal Wabbit [25] learning system and have similar levels of optimization. The regressors in the tree nodes for LOMtree, Rtree, and Filter tree as well as the OAA regressors were trained by online gradient descent for which we explored step sizes chosen from the set {0.25, 0.5, 0.75, 1, 2, 4, 8}. We used linear regressors. For each method we investigated training with up to 20 passes through the data and we selected the best setting of the parameters (step size and number of passes) as the one minimizing the validation error. Additionally, for the LOMtree we investigated different settings of the stopping 12compressed 13The details of the source of each dataset are provided in the Supplementary material. 7 criterion for the tree expansion: T = {k −1, 2k −1, 4k −1, 8k −1, 16k −1, 32k −1, 64k −1}, and swap resistance RS = {4, 8, 16, 32, 64, 128, 256}. In Table 2 and 3 we report respectively train time and per-example test time (the best performer is indicated in bold). Training time (and later reported test error) is not provided for OAA on ImageNet and ODP due to intractability14-both are petabyte scale computations15. Table 2: Training time on selected problems. Isolet Sector Aloi LOMtree 16.27s 12.77s 51.86s OAA 19.58s 18.37s 11m2.43s Table 3: Per-example test time on all problems. Isolet Sector Aloi ImNet ODP LOMtree 0.14ms 0.13ms 0.06ms 0.52ms 0.26ms OAA 0.16 ms 0.24ms 0.33ms 0.21s 1.05s The first hypothesis is consistent with the experimental results. Time-wise LOMtree significantly outperforms OAA due to building only close-to logarithmic depth trees. The improvement in the training time increases with the number of classes in the classification problem. For instance on Aloi training with LOMtree is 12.8 times faster than with OAA. The same can be said about the test time, where the per-example test time for Aloi, ImageNet and ODP are respectively 5.5, 403.8 and 4038.5 times faster than OAA. The significant advantage of LOMtree over OAA is also captured in Figure 3. 6 8 10 12 14 16 2 4 6 8 10 12 log2(number of classes) log2(time ratio) LOMtree vs one−against−all Figure 3: Logarithm of the ratio of per-example test times of OAA and LOMtree on all problems. Next, in Table 4 (the best logarithmic time performer is indicated in bold) we report test error of logarithmic train/test time algorithms. We also show the binomial symmetrical 95% confidence intervals for our results. Clearly the second hypothesis is also consistent with the experimental results. Since the Rtree imposes a random label partition, the resulting error it obtains is generally worse than the error obtained by the competitor methods including LOMtree which learns the label partitioning directly from the data. At the same time LOMtree beats Filter tree on every dataset, though for ImageNet and ODP (both have a high level of noise) the advantage of LOMtree is not as significant. Table 4: Test error (%) and confidence interval on all problems. LOMtree Rtree Filter tree OAA Isolet 6.36±1.71 16.92±2.63 15.10±2.51 3.56±1.30% Sector 16.19±2.33 15.77±2.30 17.70±2.41 9.17±1.82% Aloi 16.50±0.70 83.74±0.70 80.50±0.75 13.78±0.65% ImNet 90.17±0.05 96.99±0.03 92.12±0.04 NA ODP 93.46±0.12 93.85±0.12 93.76±0.12 NA The third hypothesis is weakly consistent with the empirical results. The time advantage of LOMtree comes with some loss of statistical accuracy with respect to OAA where OAA is tractable. We conclude that LOMtree significantly closes the gap between other logarithmic time methods and OAA, making it a plausible approach in computationally constrained large-k applications. 5 Conclusion The LOMtree algorithm reduces the multiclass problem to a set of binary problems organized in a tree structure where the partition in every tree node is done by optimizing a new partition criterion online. The criterion guarantees pure and balanced splits leading to logarithmic training and testing time for the tree classifier. We provide theoretical justification for our approach via a boosting statement and empirically evaluate it on multiple multiclass datasets. Empirically, we find that this is the best available logarithmic time approach for multiclass classification problems. Acknowledgments We would like to thank Alekh Agarwal, Dean Foster, Robert Schapire and Matus Telgarsky for valuable discussions. 14Note however that the mechanics of testing datastes are much easier - one can simply test with effectively untrained parameters on a few examples to measure the test speed thus the per-example test time for OAA on ImageNet and ODP is provided. 15Also to the best of our knowledge there exist no state-of-the-art results of the OAA performance on these datasets published in the literature. 8 References [1] R. Rifkin and A. Klautau. In defense of one-vs-all classification. J. Mach. Learn. Res., 5:101–141, 2004. [2] T. M. Cover and J. A. Thomas. Elements of Information Theory. John Wiley & Sons, Inc., 1991. [3] L. Breiman, J. H. Friedman, R. A. Olshen, and C. J. Stone. Classification and Regression Trees. CRC Press LLC, Boca Raton, Florida, 1984. [4] M. Kearns and Y. Mansour. On the boosting ability of top-down decision tree learning algorithms. Journal of Computer and Systems Sciences, 58(1):109–128, 1999 (also In STOC, 1996). [5] A. Beygelzimer, J. Langford, and P. D. Ravikumar. Error-correcting tournaments. In ALT, 2009. [6] A. Beygelzimer, J. Langford, Y. Lifshits, G. B. Sorkin, and A. L. Strehl. Conditional probability tree estimation analysis and algorithms. In UAI, 2009. [7] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [8] S. Bengio, J. Weston, and D. Grangier. Label embedding trees for large multi-class tasks. In NIPS, 2010. [9] G. Madzarov, D. Gjorgjevikj, and I. Chorbev. A multi-class svm classifier utilizing binary decision tree. Informatica, 33(2):225–233, 2009. [10] J. Deng, S. Satheesh, A. C. Berg, and L. Fei-Fei. Fast and balanced: Efficient label tree learning for large scale object recognition. In NIPS, 2011. [11] J. Weston, A. Makadia, and H. Yee. Label partitioning for sublinear ranking. In ICML, 2013. [12] B. Zhao and E. P. Xing. Sparse output coding for large-scale visual recognition. In CVPR, 2013. [13] D. Hsu, S. Kakade, J. Langford, and T. Zhang. Multi-label prediction via compressed sensing. In NIPS, 2009. [14] A. Agarwal, S. M. Kakade, N. Karampatziakis, L. Song, and G. Valiant. Least squares revisited: Scalable approaches for multi-class prediction. In ICML, 2014. [15] O. Beijbom, M. Saberian, D. Kriegman, and N. Vasconcelos. Guess-averse loss functions for costsensitive multiclass boosting. In ICML, 2014. [16] R. Agarwal, A. Gupta, Y. Prabhu, and M. Varma. Multi-label learning with millions of labels: Recommending advertiser bid phrases for web pages. In WWW, 2013. [17] Y. Prabhu and M. Varma. Fastxml: A fast, accurate and stable tree-classifier for extreme multi-label learning. In ACM SIGKDD, 2014. [18] H.-F. Yu, P. Jain, P. Kar, and I. S. Dhillon. Large-scale multi-label learning with missing labels. In ICML, 2014. [19] T.-Y. Liu, Y. Yang, H. Wan, H.-J. Zeng, Z. Chen, and W.-Y. Ma. Support vector machines classification with a very large-scale taxonomy. In SIGKDD Explorations, 2005. [20] P. N. Bennett and N. Nguyen. Refined experts: improving classification in large taxonomies. In SIGIR, 2009. [21] A. Montillo, J. Tu, J. Shotton, J. Winn, J.E. Iglesias, D.N. Metaxas, and A. Criminisi. Entanglement and differentiable information gain maximization. Decision Forests for Computer Vision and Medical Image Analysis, 2013. [22] K. Tentori, V. Crupi, N. Bonini, and D. Osherson. Comparison of confirmation measures. Cognition, 103(1):107 – 119, 2007. [23] R. Carnap. Logical Foundations of Probability. 2nd ed. Chicago: University of Chicago Press. Par. 87 (pp. 468-478), 1962. [24] S. Shalev-Shwartz. Online learning and online convex optimization. Found. Trends Mach. Learn., 4(2):107–194, 2012. [25] J. Langford, L. Li, and A. Strehl. http://hunch.net/˜vw, 2007. [26] Y. Nesterov. Introductory lectures on convex optimization : a basic course. Applied optimization, Kluwer Academic Publ., 2004. [27] 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. 9 | 2015 | 355 |
5,875 | Copula variational inference Dustin Tran Harvard University David M. Blei Columbia University Edoardo M. Airoldi Harvard University Abstract We develop a general variational inference method that preserves dependency among the latent variables. Our method uses copulas to augment the families of distributions used in mean-field and structured approximations. Copulas model the dependency that is not captured by the original variational distribution, and thus the augmented variational family guarantees better approximations to the posterior. With stochastic optimization, inference on the augmented distribution is scalable. Furthermore, our strategy is generic: it can be applied to any inference procedure that currently uses the mean-field or structured approach. Copula variational inference has many advantages: it reduces bias; it is less sensitive to local optima; it is less sensitive to hyperparameters; and it helps characterize and interpret the dependency among the latent variables. 1 Introduction Variational inference is a computationally efficient approach for approximating posterior distributions. The idea is to specify a tractable family of distributions of the latent variables and then to minimize the Kullback-Leibler divergence from it to the posterior. Combined with stochastic optimization, variational inference can scale complex statistical models to massive data sets [9, 23, 24]. Both the computational complexity and accuracy of variational inference are controlled by the factorization of the variational family. To keep optimization tractable, most algorithms use the fullyfactorized family, also known as the mean-field family, where each latent variable is assumed independent. Less common, structured mean-field methods slightly relax this assumption by preserving some of the original structure among the latent variables [19]. Factorized distributions enable efficient variational inference but they sacrifice accuracy. In the exact posterior, many latent variables are dependent and mean-field methods, by construction, fail to capture this dependency. To this end, we develop copula variational inference (copula vi). Copula vi augments the traditional variational distribution with a copula, which is a flexible construction for learning dependencies in factorized distributions [3]. This strategy has many advantages over traditional vi: it reduces bias; it is less sensitive to local optima; it is less sensitive to hyperparameters; and it helps characterize and interpret the dependency among the latent variables. Variational inference has previously been restricted to either generic inference on simple models—where dependency does not make a significant difference—or writing model-specific variational updates. Copula vi widens its applicability, providing generic inference that finds meaningful dependencies between latent variables. In more detail, our contributions are the following. A generalization of the original procedure in variational inference. Copula vi generalizes variational inference for mean-field and structured factorizations: traditional vi corresponds to running only one step of our method. It uses coordinate descent, which monotonically decreases the KL divergence to the posterior by alternating between fitting the mean-field parameters and the copula parameters. Figure 1 illustrates copula vi on a toy example of fitting a bivariate Gaussian. Improving generic inference. Copula vi can be applied to any inference procedure that currently uses the mean-field or structured approach. Further, because it does not require specific knowledge 1 Figure 1: Approximations to an elliptical Gaussian. The mean-field (red) is restricted to fitting independent one-dimensional Gaussians, which is the first step in our algorithm. The second step (blue) fits a copula which models the dependency. More iterations alternate: the third refits the meanfield (green) and the fourth refits the copula (cyan), demonstrating convergence to the true posterior. of the model, it falls into the framework of black box variational inference [15]. An investigator need only write down a function to evaluate the model log-likelihood. The rest of the algorithm’s calculations, such as sampling and evaluating gradients, can be placed in a library. Richer variational approximations. In experiments, we demonstrate copula vi on the standard example of Gaussian mixture models. We found it consistently estimates the parameters, reduces sensitivity to local optima, and reduces sensitivity to hyperparameters. We also examine how well copula vi captures dependencies on the latent space model [7]. Copula vi outperforms competing methods and significantly improves upon the mean-field approximation. 2 Background 2.1 Variational inference Let x be a set of observations, z be latent variables, and λ be the free parameters of a variational distribution q(z; λ). We aim to find the best approximation of the posterior p(z | x) using the variational distribution q(z; λ), where the quality of the approximation is measured by KL divergence. This is equivalent to maximizing the quantity L (λ) = Eq(z;λ)[log p(x, z)] −Eq(z;λ)[log q(z; λ)]. L(λ) is the evidence lower bound (elbo), or the variational free energy [25]. For simpler computation, a standard choice of the variational family is a mean-field approximation q(z; λ) = d Y i=1 qi(zi; λi), where z = (z1, . . . , zd). Note this is a strong independence assumption. More sophisticated approaches, known as structured variational inference [19], attempt to restore some of the dependencies among the latent variables. In this work, we restore dependencies using copulas. Structured vi is typically tailored to individual models and is difficult to work with mathematically. Copulas learn general posterior dependencies during inference, and they do not require the investigator to know such structure in advance. Further, copulas can augment a structured factorization in order to introduce dependencies that were not considered before; thus it generalizes the procedure. We next review copulas. 2.2 Copulas We will augment the mean-field distribution with a copula. We consider the variational family q(z) = " d Y i=1 q(zi) # c(Q(z1), . . . , Q(zd)). 2 1 3 2 4 1, 3 2, 3 3, 4 (T1) 2, 3 1, 3 3, 4 1, 2|3 1, 4|3 (T2) 1, 2|3 1, 4|3 2, 4|13 (T3) Figure 2: Example of a vine V which factorizes a copula density of four random variables c(u1, u2, u3, u4) into a product of 6 pair copulas. Edges in the tree Tj are the nodes of the lower level tree Tj+1, and each edge determines a bivariate copula which is conditioned on all random variables that its two connected nodes share. Here Q(zi) is the marginal cumulative distribution function (CDF) of the random variable zi, and c is a joint distribution of [0, 1] random variables.1 The distribution c is called a copula of z: it is a joint multivariate density of Q(z1), . . . , Q(zd) with uniform marginal distributions [21]. For any distribution, a factorization into a product of marginal densities and a copula always exists and integrates to one [14]. Intuitively, the copula captures the information about the multivariate random variable after eliminating the marginal information, i.e., by applying the probability integral transform on each variable. The copula captures only and all of the dependencies among the zi’s. Recall that, for all random variables, Q(zi) is uniform distributed. Thus the marginals of the copula give no information. For example, the bivariate Gaussian copula is defined as c(u1, u2; ρ) = Φρ(Φ−1(u1), Φ−1(u2)). If u1, u2 are independent uniform distributed, the inverse CDF Φ−1 of the standard normal transforms (u1, u2) to independent normals. The CDF Φρ of the bivariate Gaussian distribution, with mean zero and Pearson correlation ρ, squashes the transformed values back to the unit square. Thus the Gaussian copula directly correlates u1 and u2 with the Pearson correlation parameter ρ. 2.2.1 Vine copulas It is difficult to specify a copula. We must find a family of distributions that is easy to compute with and able to express a broad range of dependencies. Much work focuses on two-dimensional copulas, such as the Student-t, Clayton, Gumbel, Frank, and Joe copulas [14]. However, their multivariate extensions do not flexibly model dependencies in higher dimensions [4]. Rather, a successful approach in recent literature has been by combining sets of conditional bivariate copulas; the resulting joint is called a vine [10, 13]. A vine V factorizes a copula density c(u1, . . . , ud) into a product of conditional bivariate copulas, also called pair copulas. This makes it easy to specify a high-dimensional copula. One need only express the dependence for each pair of random variables conditioned on a subset of the others. Figure 2 is an example of a vine which factorizes a 4-dimensional copula into the product of 6 pair copulas. The first tree T1 has nodes 1, 2, 3, 4 representing the random variables u1, u2, u3, u4 respectively. An edge corresponds to a pair copula, e.g., 1, 4 symbolizes c(u1, u4). Edges in T1 collapse into nodes in the next tree T2, and edges in T2 correspond to conditional bivariate copulas, e.g., 1, 2|3 symbolizes c(u1, u2|u3). This proceeds to the last nested tree T3, where 2, 4|13 symbolizes 1We overload the notation for the marginal CDF Q to depend on the names of the argument, though we occasionally use Qi(zi) when more clarity is needed. This is analogous to the standard convention of overloading the probability density function q(·). 3 c(u2, u4|u1, u3). The vine structure specifies a complete factorization of the multivariate copula, and each pair copula can be of a different family with its own set of parameters: c(u1, u2, u3, u4) = h c(u1, u3)c(u2, u3)c(u3, u4) ih c(u1, u2|u3)c(u1, u4|u3) ih c(u2, u4|u1, u3) i . Formally, a vine is a nested set of trees V = {T1, . . . , Td−1} with the following properties: 1. Tree Tj = {Nj, Ej} has d + 1 −j nodes and d −j edges. 2. Edges in the jth tree Ej are the nodes in the (j + 1)th tree Nj+1. 3. Two nodes in tree Tj+1 are joined by an edge only if the corresponding edges in tree Tj share a node. Each edge e in the nested set of trees {T1, . . . , Td−1} specifies a different pair copula, and the product of all edges comprise of a factorization of the copula density. Since there are a total of d(d −1)/2 edges, V factorizes c(u1, . . . , ud) as the product of d(d −1)/2 pair copulas. Each edge e(i, k) ∈Tj has a conditioning set D(e), which is a set of variable indices 1, . . . , d. We define cik|D(e) to be the bivariate copula density for ui and uk given its conditioning set: cik|D(e) = c Q(ui|uj : j ∈D(e)), Q(ui|uj : j ∈D(e)) uj : j ∈D(e) . (1) Both the copula and the CDF’s in its arguments are conditional on D(e). A vine specifies a factorization of the copula, which is a product over all edges in the d −1 levels: c(u1, . . . , ud; η) = d−1 Y j=1 Y e(i,k)∈Ej cik|D(e). (2) We highlight that c depends on η, the set of all parameters to the pair copulas. The vine construction provides us with the flexibility to model dependencies in high dimensions using a decomposition of pair copulas which are easier to estimate. As we shall see, the construction also leads to efficient stochastic gradients by taking individual (and thus easy) gradients on each pair copula. 3 Copula variational inference We now introduce copula variational inference (copula vi), our method for performing accurate and scalable variational inference. For simplicity, consider the mean-field factorization augmented with a copula (we later extend to structured factorizations). The copula-augmented variational family is q(z; λ, η) = " d Y i=1 q(zi; λ) # | {z } mean-field c(Q(z1; λ), . . . , Q(zd; λ); η) | {z } copula , (3) where λ denotes the mean-field parameters and η the copula parameters. With this family, we maximize the augmented elbo, L (λ, η) = Eq(z;λ,η)[log p(x, z)] −Eq(z;λ,η)[log q(z; λ, η)]. Copula vi alternates between two steps: 1) fix the copula parameters η and solve for the mean-field parameters λ; and 2) fix the mean-field parameters λ and solve for the copula parameters η. This generalizes the mean-field approximation, which is the special case of initializing the copula to be uniform and stopping after the first step. We apply stochastic approximations [18] for each step with gradients derived in the next section. We set the learning rate ρt ∈R to satisfy a Robbins-Monro schedule, i.e., P∞ t=1 ρt = ∞, P∞ t=1 ρ2 t < ∞. A summary is outlined in Algorithm 1. This alternating set of optimizations falls in the class of minorize-maximization methods, which includes many procedures such as the EM algorithm [1], the alternating least squares algorithm, and the iterative procedure for the generalized method of moments. Each step of copula vi monotonically increases the objective function and therefore better approximates the posterior distribution. 4 Algorithm 1: Copula variational inference (copula vi) Input: Data x, Model p(x, z), Variational family q. Initialize λ randomly, η so that c is uniform. while change in elbo is above some threshold do // Fix η, maximize over λ. Set iteration counter t = 1. while not converged do Draw sample u ∼Unif([0, 1]d). Update λ = λ + ρt∇λL. (Eq.5, Eq.6) Increment t. end // Fix λ, maximize over η. Set iteration counter t = 1. while not converged do Draw sample u ∼Unif([0, 1]d). Update η = η + ρt∇ηL. (Eq.7) Increment t. end end Output: Variational parameters (λ, η). Copula vi has the same generic input requirements as black-box variational inference [15]—the user need only specify the joint model p(x, z) in order to perform inference. Further, copula variational inference easily extends to the case when the original variational family uses a structured factorization. By the vine construction, one simply fixes pair copulas corresponding to pre-existent dependence in the factorization to be the independence copula. This enables the copula to only model dependence where it does not already exist. Throughout the optimization, we will assume that the tree structure and copula families are given and fixed. We note, however, that these can be learned. In our study, we learn the tree structure using sequential tree selection [2] and learn the families, among a choice of 16 bivariate families, through Bayesian model selection [6] (see supplement). In preliminary studies, we’ve found that re-selection of the tree structure and copula families do not significantly change in future iterations. 3.1 Stochastic gradients of the elbo To perform stochastic optimization, we require stochastic gradients of the elbo with respect to both the mean-field and copula parameters. The copula vi objective leads to efficient stochastic gradients and with low variance. We first derive the gradient with respect to the mean-field parameters. In general, we can apply the score function estimator [15], which leads to the gradient ∇λL = Eq(z;λ,η)[∇λ log q(z; λ, η) · (log p(x, z) −log q(z; λ, η))]. (4) We follow noisy unbiased estimates of this gradient by sampling from q(·) and evaluating the inner expression. We apply this gradient for discrete latent variables. When the latent variables z are differentiable, we use the reparameterization trick [17] to take advantage of first-order information from the model, i.e.,∇z log p(x, z). Specifically, we rewrite the expectation in terms of a random variable u such that its distribution s(u) does not depend on the variational parameters and such that the latent variables are a deterministic function of u and the mean-field parameters, z = z(u; λ). Following this reparameterization, the gradients propagate 5 inside the expectation, ∇λL = Es(u)[(∇z log p(x, z) −∇z log q(z; λ, η))∇λz(u; λ)]. (5) This estimator reduces the variance of the stochastic gradients [17]. Furthermore, with a copula variational family, this type of reparameterization using a uniform random variable u and a deterministic function z = z(u; λ, η) is always possible. (See the supplement.) The reparameterized gradient (Eq.5) requires calculation of the terms ∇zi log q(z; λ, η) and ∇λiz(u; λ, η) for each i. The latter is tractable and derived in the supplement; the former decomposes as ∇zi log q(z; λ, η) = ∇zi log q(zi; λi) + ∇Q(zi;λi) log c(Q(z1; λ1), . . . , Q(zd; λd); η)∇ziQ(zi; λi) = ∇zi log q(zi; λi) + q(zi; λi) d−1 X j=1 X e(k,ℓ)∈Ej: i∈{k,ℓ} ∇Q(zi;λi) log ckℓ|D(e). (6) The summation in Eq.6 is over all pair copulas which contain Q(zi; λi) as an argument. In other words, the gradient of a latent variable zi is evaluated over both the marginal q(zi) and all pair copulas which model correlation between zi and any other latent variable zj. A similar derivation holds for calculating terms in the score function estimator. We now turn to the gradient with respect to the copula parameters. We consider copulas which are differentiable with respect to their parameters. This enables an efficient reparameterized gradient ∇ηL = Es(u)[(∇z log p(x, z) −∇z log q(z; λ, η))∇ηz(u; λ, η)]. (7) The requirements are the same as for the mean-field parameters. Finally, we note that the only requirement on the model is the gradient ∇z log p(x, z). This can be calculated using automatic differentiation tools [22]. Thus Copula vi can be implemented in a library and applied without requiring any manual derivations from the user. 3.2 Computational complexity In the vine factorization of the copula, there are d(d −1)/2 pair copulas, where d is the number of latent variables. Thus stochastic gradients of the mean-field parameters λ and copula parameters η require O(d2) complexity. More generally, one can apply a low rank approximation to the copula by truncating the number of levels in the vine (see Figure 2). This reduces the number of pair copulas to be Kd for some K > 0, and leads to a computational complexity of O(Kd). Using sequential tree selection for learning the vine structure [2], the most correlated variables are at the highest level of the vines. Thus a truncated low rank copula only forgets the weakest correlations. This generalizes low rank Gaussian approximations, which also have O(Kd) complexity [20]: it is the special case when the mean-field distribution is the product of independent Gaussians, and each pair copula is a Gaussian copula. 3.3 Related work Preserving structure in variational inference was first studied by Saul and Jordan [19] in the case of probabilistic neural networks. It has been revisited recently for the case of conditionally conjugate exponential familes [8]. Our work differs from this line in that we learn the dependency structure during inference, and thus we do not require explicit knowledge of the model. Further, our augmentation strategy works more broadly to any posterior distribution and any factorized variational family, and thus it generalizes these approaches. A similar augmentation strategy is higher-order mean-field methods, which are a Taylor series correction based on the difference between the posterior and its mean-field approximation [11]. Recently, Giordano et al. [5] consider a covariance correction from the mean-field estimates. All these methods assume the mean-field approximation is reliable for the Taylor series expansion to make sense, which is not true in general and thus is not robust in a black box framework. Our approach alternates the estimation of the mean-field and copula, which we find empirically leads to more robust estimates than estimating them simultaneously, and which is less sensitive to the quality of the mean-field approximation. 6 0.0 0.1 0.2 0.3 0.0 0.1 0.2 0.3 Gibbs standard deviation Estimated sd method CVI LRVB MF Lambda −0.01 0.00 0.01 −0.01 0.00 0.01 Gibbs standard deviation Estimated sd method CVI LRVB All off−diagonal covariances Figure 3: Covariance estimates from copula variational inference (copula vi), mean-field (mf), and linear response variational Bayes (lrvb) to the ground truth (Gibbs samples). copula vi and lrvb effectively capture dependence while mf underestimates variance and forgets covariances. 4 Experiments We study copula vi with two models: Gaussian mixtures and the latent space model [7]. The Gaussian mixture is a classical example of a model for which it is difficult to capture posterior dependencies. The latent space model is a modern Bayesian model for which the mean-field approximation gives poor estimates of the posterior, and where modeling posterior dependencies is crucial for uncovering patterns in the data. There are several implementation details of copula vi. At each iteration, we form a stochastic gradient by generating m samples from the variational distribution and taking the average gradient. We set m = 1024 and follow asynchronous updates [16]. We set the step-size using ADAM [12]. 4.1 Mixture of Gaussians We follow the goal of Giordano et al. [5], which is to estimate the posterior covariance for a Gaussian mixture. The hidden variables are a K-vector of mixture proportions π and a set of K P-dimensional multivariate normals N(µk, Λ−1 k ), each with unknown mean µk (a P-vector) and P × P precision matrix Λk. In a mixture of Gaussians, the joint probability is p(x, z, µ, Λ−1, π) = p(π) K Y k=1 p(µk, Λ−1 k ) N Y n=1 p(xn | zn, µzn, Λ−1 zn )p(zn | π), with a Dirichlet prior p(π) and a normal-Wishart prior p(µk, Λ−1 k ). We first apply the mean-field approximation (mf), which assigns independent factors to µ, π, Λ, and z. We then perform copula vi over the copula-augmented mean-field distribution, i.e., one which includes pair copulas over the latent variables. We also compare our results to linear response variational Bayes (lrvb) [5], which is a posthoc correction technique for covariance estimation in variational inference. Higher-order mean-field methods demonstrate similar behavior as lrvb. Comparisons to structured approximations are omitted as they require explicit factorizations and are not black box. Standard black box variational inference [15] corresponds to the mf approximation. We simulate 10, 000 samples with K = 2 components and P = 2 dimensional Gaussians. Figure 3 displays estimates for the standard deviations of Λ for 100 simulations, and plots them against the ground truth using 500 effective Gibb samples. The second plot displays all off-diagonal covariance estimates. Estimates for µ and π indicate the same pattern and are given in the supplement. When initializing at the true mean-field parameters, both copula vi and lrvb achieve consistent estimates of the posterior variance. mf underestimates the variance, which is a well-known limitation [25]. Note that because the mf estimates are initialized at the truth, copula vi converges to the true posterior upon one step of fitting the copula. It does not require alternating more steps. 7 Variational inference methods Predictive Likelihood Runtime Mean-field -383.2 15 min. lrvb -330.5 38 min. copula vi (2 steps) -303.2 32 min. copula vi (5 steps) -80.2 1 hr. 17 min. copula vi (converged) -50.5 2 hr. Table 1: Predictive likelihood on the latent space model. Each copula vi step either refits the meanfield or the copula. copula vi converges in roughly 10 steps and already significantly outperforms both mean-field and lrvb upon fitting the copula once (2 steps). Copula vi is more robust than lrvb. As a toy demonstration, we analyze the MNIST data set of handwritten digits, using 12,665 training examples and 2,115 test examples of 0’s and 1’s. We perform "unsupervised" classification, i.e., classify without using training labels: we apply a mixture of Gaussians to cluster, and then classify a digit based on its membership assignment. copula vi reports a test set error rate of 0.06, whereas lrvb ranges between 0.06 and 0.32 depending on the mean-field estimates. lrvb and similar higher order mean-field methods correct an existing mf solution—it is thus sensitive to local optima and the general quality of that solution. On the other hand, copula vi re-adjusts both the mf and copula parameters as it fits, making it more robust to initialization. 4.2 Latent space model We next study inference on the latent space model [7], a Bernoulli latent factor model for network analysis. Each node in an N-node network is associated with a P-dimensional latent variable z ∼ N(µ, Λ−1). Edges between pairs of nodes are observed with high probability if the nodes are close to each other in the latent space. Formally, an edge for each pair (i, j) is observed with probability logit(p) = θ −|zi −zj|, where θ is a model parameter. We generate an N = 100, 000 node network with latent node attributes from a P = 10 dimensional Gaussian. We learn the posterior of the latent attributes in order to predict the likelihood of held-out edges. mf applies independent factors on µ, Λ, θ and z, lrvb applies a correction, and copula vi uses the fully dependent variational distribution. Table 1 displays the likelihood of held-out edges and runtime. We also attempted Hamiltonian Monte Carlo but it did not converge after five hours. Copula vi dominates other methods in accuracy upon convergence, and the copula estimation without refitting (2 steps) already dominates lrvb in both runtime and accuracy. We note however that lrvb requires one to invert a O(NK3) × O(NK3) matrix. We can better scale the method and achieve faster estimates than copula vi if we applied stochastic approximations for the inversion. However, copula vi always outperforms lrvb and is still fast on this 100,000 node network. 5 Conclusion We developed copula variational inference (copula vi). copula vi is a new variational inference algorithm that augments the mean-field variational distribution with a copula; it captures posterior dependencies among the latent variables. We derived a scalable and generic algorithm for performing inference with this expressive variational distribution. We found that copula vi significantly reduces the bias of the mean-field approximation, better estimates the posterior variance, and is more accurate than other forms of capturing posterior dependency in variational approximations. Acknowledgments We thank Luke Bornn, Robin Gong, and Alp Kucukelbir for their insightful comments. This work is supported by NSF IIS-0745520, IIS-1247664, IIS-1009542, ONR N00014-11-1-0651, DARPA FA8750-14-2-0009, N66001-15-C-4032, Facebook, Adobe, Amazon, and the John Templeton Foundation. 8 References [1] Dempster, A. P., Laird, N. M., and Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B, 39(1). [2] Dissmann, J., Brechmann, E. C., Czado, C., and Kurowicka, D. (2012). Selecting and estimating regular vine copulae and application to financial returns. arXiv preprint arXiv:1202.2002. [3] Fréchet, M. (1960). Les tableaux dont les marges sont données. Trabajos de estadística, 11(1):3–18. [4] Genest, C., Gerber, H. U., Goovaerts, M. J., and Laeven, R. (2009). Editorial to the special issue on modeling and measurement of multivariate risk in insurance and finance. Insurance: Mathematics and Economics, 44(2):143–145. [5] Giordano, R., Broderick, T., and Jordan, M. I. (2015). Linear response methods for accurate covariance estimates from mean field variational Bayes. In Neural Information Processing Systems. [6] Gruber, L. and Czado, C. (2015). Sequential Bayesian model selection of regular vine copulas. International Society for Bayesian Analysis. [7] Hoff, P. D., Raftery, A. E., and Handcock, M. S. (2001). Latent space approaches to social network analysis. Journal of the American Statistical Association, 97:1090–1098. [8] Hoffman, M. D. and Blei, D. M. (2015). Structured stochastic variational inference. In Artificial Intelligence and Statistics. [9] Hoffman, M. D., Blei, D. M., Wang, C., and Paisley, J. (2013). Stochastic variational inference. Journal of Machine Learning Research, 14:1303–1347. [10] Joe, H. (1996). Families of m-variate distributions with given margins and m(m −1)/2 bivariate dependence parameters, pages 120–141. Institute of Mathematical Statistics. [11] Kappen, H. J. and Wiegerinck, W. (2001). Second order approximations for probability models. In Neural Information Processing Systems. [12] Kingma, D. P. and Ba, J. L. (2015). Adam: A method for stochastic optimization. In International Conference on Learning Representations. [13] Kurowicka, D. and Cooke, R. M. (2006). Uncertainty Analysis with High Dimensional Dependence Modelling. Wiley, New York. [14] Nelsen, R. B. (2006). An Introduction to Copulas (Springer Series in Statistics). Springer-Verlag New York, Inc. [15] Ranganath, R., Gerrish, S., and Blei, D. M. (2014). Black box variational inference. In Artificial Intelligence and Statistics, pages 814–822. [16] Recht, B., Re, C., Wright, S., and Niu, F. (2011). Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems, pages 693–701. [17] Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning. [18] Robbins, H. and Monro, S. (1951). A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407. [19] Saul, L. and Jordan, M. I. (1995). Exploiting tractable substructures in intractable networks. In Neural Information Processing Systems, pages 486–492. [20] Seeger, M. (2010). Gaussian covariance and scalable variational inference. In International Conference on Machine Learning. [21] Sklar, A. (1959). Fonstions de répartition à n dimensions et leurs marges. Publications de l’Institut de Statistique de l’Université de Paris, 8:229–231. [22] Stan Development Team (2015). Stan: A C++ library for probability and sampling, version 2.8.0. [23] Toulis, P. and Airoldi, E. M. (2014). Implicit stochastic gradient descent. arXiv preprint arXiv:1408.2923. [24] Tran, D., Toulis, P., and Airoldi, E. M. (2015). Stochastic gradient descent methods for estimation with large data sets. arXiv preprint arXiv:1509.06459. [25] Wainwright, M. J. and Jordan, M. I. (2008). Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1-2):1–305. 9 | 2015 | 356 |
5,876 | Attractor Network Dynamics Enable Preplay and Rapid Path Planning in Maze–like Environments Dane Corneil Laboratory of Computational Neuroscience ´Ecole Polytechnique F´ed´erale de Lausanne CH-1015 Lausanne, Switzerland dane.corneil@epfl.ch Wulfram Gerstner Laboratory of Computational Neuroscience ´Ecole Polytechnique F´ed´erale de Lausanne CH-1015 Lausanne, Switzerland wulfram.gerstner@epfl.ch Abstract Rodents navigating in a well–known environment can rapidly learn and revisit observed reward locations, often after a single trial. While the mechanism for rapid path planning is unknown, the CA3 region in the hippocampus plays an important role, and emerging evidence suggests that place cell activity during hippocampal “preplay” periods may trace out future goal–directed trajectories. Here, we show how a particular mapping of space allows for the immediate generation of trajectories between arbitrary start and goal locations in an environment, based only on the mapped representation of the goal. We show that this representation can be implemented in a neural attractor network model, resulting in bump–like activity profiles resembling those of the CA3 region of hippocampus. Neurons tend to locally excite neurons with similar place field centers, while inhibiting other neurons with distant place field centers, such that stable bumps of activity can form at arbitrary locations in the environment. The network is initialized to represent a point in the environment, then weakly stimulated with an input corresponding to an arbitrary goal location. We show that the resulting activity can be interpreted as a gradient ascent on the value function induced by a reward at the goal location. Indeed, in networks with large place fields, we show that the network properties cause the bump to move smoothly from its initial location to the goal, around obstacles or walls. Our results illustrate that an attractor network with hippocampal–like attributes may be important for rapid path planning. 1 Introduction While early human case studies revealed the importance of the hippocampus in episodic memory [1, 2], the discovery of “place cells” in rats [3] established its role for spatial representation. Recent results have further suggested that, along with these functions, the hippocampus is involved in active spatial planning: experiments in “one–shot learning” have revealed the critical role of the CA3 region [4, 5] and the intermediate hippocampus [6] in returning to goal locations that the animal has seen only once. This poses the question of whether and how hippocampal dynamics could support a representation of the current location, a representation of a goal, and the relation between the two. In this article, we propose that a model of CA3 as a “bump attractor” [7] can be be used for path planning. The attractor map represents not only locations within the environment, but also the spatial relationship between locations. In particular, broad activity profiles (like those found in intermediate and ventral hippocampus [8]) can be viewed as a condensed map of a particular environment. The planned path presents as rapid sequential activity from the current position to the goal location, similar to the “preplay” observed experimentally in hippocampal activity during navigation tasks [9, 10], including paths that require navigating around obstacles. In the model, the activity is produced by supplying input to the network consistent with the sensory input that would be provided at the 1 goal site. Unlike other recent models of rapid goal learning and path planning [11, 12], there is no backwards diffusion of a value signal from the goal to the current state during the learning or planning process. Instead, the sequential activity results from the representation of space in the attractor network, even in the presence of obstacles. The recurrent structure in our model is derived from the “successor representation” [13], which represents space according to the number and length of paths connecting different locations. The resulting network can be interpreted as an attractor manifold in a low–dimensional space, where the dimensions correspond to weighted version of the most relevant eigenvectors of the environment’s transition matrix. Such low–frequency functions have recently found support as a viable basis for place cell activity [14–16]. We show that, when the attractor network operates in this basis and is stimulated with a goal location, the network activity traces out a path to that goal. Thus, the bump attractor network can act as a spatial path planning system as well as a spatial memory system. 2 The successor representation and path–finding A key problem in reinforcement learning is assessing the value of a particular state, given the expected returns from that state in both the immediate and distant future. Several model–free algorithms exist for solving this task [17], but they are slow to adjust when the reward landscape is rapidly changing. The successor representation, proposed by Dayan [13], addresses this issue. Given a Markov chain described by the transition matrix P, where each element P(s, s′) gives the probability of transitioning from state s to state s′ in a single time step; a reward vector r, where each element r(s′) gives the expected immediate returns from state s′; and a discount factor γ, the expected returns v from each state can be described by v = r + γPr + γ2P2r + γ3P3r + . . . (1) = (I −γP)−1r = Lr. The successor representation L provides an efficient means of representing the state space according to the expected (discounted) future occupancy of each state s′, given that the chain is initialized from state s. An agent employing a policy described by the matrix P can immediately update the value function when the reward landscape r changes, without any further exploration. The successor representation is particularly useful for representing many reward landscapes in the same state space. Here we consider the set of reward functions where returns are confined to a single state s′; i.e. r(s′) = δs′g where δ denotes the Kronecker delta function and the index g denotes a particular goal state. From Eq. 1, we see that the value function is then given by the column s′ of the matrix L. Indeed, when we consider only a single goal, we can see the elements of L as L(s, s′) = v(s|s′ = g). We will use this property to generate a spatial mapping that allows for a rapid approximation of the shortest path between any two points in an environment. 2.1 Representing space using the successor representation In the spatial navigation problems considered here, we assume that the animal has explored the environment sufficiently to learn its natural topology. We represent the relationship between locations with a Gaussian affinity metric a: given states s(x, y) and s′(x, y) in the 2D plane, their affinity is a(s(x, y), s′(x, y)) = a(s′(x, y), s(x, y)) = exp −d2 2σ2s (2) where d is the length of the shortest traversable path between s and s′, respecting walls and obstacles. We define σ to be small enough that the metric is localized (Fig. 1) such that a(s(x, y), ·) resembles a small bump in space, truncated by walls. Normalizing the affinity metric gives p(s, s′) = a(s, s′) P s′ a(s, s′). (3) 2 The normalized metric can be interpreted as a transition probability for an agent exploring the environment randomly. In this case, a spectral analysis of the successor representation [14, 18] gives v(s|s′ = g) = π(s′) n X l=0 (1 −γλl)−1ψl(s)ψl(s′) (4) where ψl are the right eigenvectors of the transition matrix P, 1 = |λ0| ≥|λ1| ≥|λ2| · · · ≥ |λn| are the eigenvalues [18], and π(s′) denotes the steady–state occupancy of state s′ resulting from P. Although the affinity metric is defined locally, large–scale features of the environment are represented in the eigenvectors associated with the largest eigenvalues (Fig. 1). We now express the position in the 2D space using a set of “successor coordinates”, such that s(x, y) 7→˘s = q (1 −γλ0)−1ψ0(s), q (1 −γλ1)−1ψ1(s), . . . , q (1 −γλq)−1ψq(s) (5) = (ξ0(s), ξ1(s), . . . , ξq(s)) where ξl = q (1 −γλl)−1ψl. This is similar to the “diffusion map” framework by Coifman and Lafon [18]; with the useful property that, if q = n, the value of a given state when considering a given goal is proportional to the scalar product of their respective mappings: v(s|s′ = g) = π(s′)⟨˘s,˘s′⟩. We will use this property to show how a network operating in the successor coordinate space can rapidly generate prospective trajectories between arbitrary locations. Note that the mapping can also be defined using the eigenvectors φl of a related measure of the space, the normalized graph Laplacian [19]. The eigenvectors φl serve as the objective functions for slow feature analysis [20], and approximations have been extracted through hierarchical slow feature analysis on visual data [15, 16], where they have been used to generate place cell–like behaviour. 2.2 Path–finding using the successor coordinate mapping Successor coordinates provide a means of mapping a set of locations in a 2D environment to a new space based on the topology of the environment. In the new representation, the value landscape is particularly simple. To move from a location ˘s towards a goal position ˘s′, we can consider a constrained gradient ascent procedure on the value landscape: ˘st+1 = arg min ˘s∈˘S h (˘s −(˘st + α∇v(˘st)))2i (6) = arg min ˘s∈˘S h (˘s −(˘st + ˜α˘s′))2i where π(s′) has been absorbed into the parameter ˜α. At each time step, the state closest to an incremental ascent of the value gradient is selected amongst all states in the environment ˘S. In the following, we will consider how the step ˘st + ˜α˘s′ can be approximated by a neural attractor network acting in successor coordinate space. Due to the properties of the transition matrix, ψ0 is constant across the state space and does not contribute to the value gradient in Eq. 6. As such, we substituted a free parameter for the coefficient p (1 −γλ0)−1, which controlled the overall level of activity in the network simulations. 3 Encoding successor coordinates in an attractor network The bump attractor network is a common model of place cell activity in the hippocampus [7, 21]. Neurons in the attractor network strongly excite other neurons with similar place field centers, and weakly inhibit the neurons within the network with distant place field centers. As a result, the network allows a stable bump of activity to form at an arbitrary location within the environment. 3 30 20 10 0 -10 -20 -30 -40 -40 -30 -20 -10 0 10 20 30 -50 Figure 1: [Left] A rat explores a maze–like environment and passively learns its topology. We assume a process such as hierarchical slow feature analysis, that preliminarily extracts slowly changing functions in the environment (here, the vectors ξ1 . . . ξq). The vector ξ1 for the maze is shown in the top left. In practice, we extracted the vectors directly from a localized Gaussian transition function (bottom center, for an arbitrary location). [Right] This basis can be used to generate a value map approximation over the environment for a given reward (goal) position and discount factor γ (inset). Due to the walls, the function is highly discontinuous in the xy spatial dimensions. The goal position is circled in white. In the scatter plot, the same array of states and value function are shown in the first two non–trivial successor coordinate dimensions. In this space, the value function is proportional to the scalar product between the states and the goal location. The grey and black dots show corresponding states between the inset and the scatter plot. Such networks typically represent a periodic (toroidal) environment [7, 21], using a local excitatory weight profile that falls off exponentially. Here, we show how the spatial mapping of Eq. 5 can be used to represent bounded environments with arbitrary obstacles. The resulting recurrent weights induce stable firing fields that decrease with distance from the place field center, around walls and obstacles, in a manner consistent with experimental observations [22]. In addition, the network dynamics can be used to perform rapid path planning in the environment. We will use the techniques introduced in the attractor network models by Eliasmith and Anderson [23] to generalize the bump attractor. We first consider a purely feed–forward network, composed of a population of neurons with place field centers scattered randomly throughout the environment. We assume that the input is highly preprocessed, potentially by several layers of neuronal processing (Fig. 1), and given directly by units k whose activities ˘sin k (t) = ξk(sin(t)) represent the input in the successor coordinate dimensions introduced above. The activity ai of neuron i in response to the m inputs ˘sin k (t) can be described by τ dai(t) dt = −ai(t) + g " m X k=1 wff ik ˘sin k (t) # + (7) where g is a gain factor, [·]+ represents a rectified linear function, and wff ik are the feed–forward weights. Each neuron is particularly responsive to a “bump” in the environment given by its encoding vector ei = ˘si ||˘si||, the normalized successor coordinates of a particular point in space, which corresponds to its place field center. The input to neuron i in the network is then given by wff ik = [ei]k, m X k=1 wff ik ˘sin k (t) = ei · ˘sin(t). (8) A neuron is therefore maximally active when the input coordinates are nearly parallel to its encoding vector. Although we assume the input is given directly in the basis vectors ξl for convenience, a neural encoding using an (over)complete basis based on a linear combination of the eigenvectors ψl or φl is also possible given a corresponding transformation in the feed–forward weights. 4 Figure 2: [Left] The attractor network structure for the maze–like environment in Fig. 1. The inputs give a low–dimensional approximation of the successor coordinates of a point in space. The network is composed of 500 neurons with encoding vectors representing states scattered randomly throughout the environment. Each neuron’s activation is proportional to the scalar product of its encoding vector and the input, resulting in a large “bump” of activity. Recurrent weights are generated using a least–squares error decoding of the successor coordinates from the neural activities, projected back on to the neural encoding vectors. [Right] The generated recurrent weights for the network. The plot shows the incoming weights from each neuron to the unit at the circled position, where neurons are plotted according to their place field centers. If the input ˘sin(t) represents a location in the environment, a bump of activity forms in the network (Fig. 2). These activities give a (non–linear) encoding of the input. Given the response properties of the neurons, we can find a set of linear decoding weights dj that recovers an approximation of the input given to the network from the neural activities [23]: ˘srec(t) = n X j=1 dj · aj(t). (9) These decoding weights dj were derived by minimizing the least–squares estimation error of a set of example inputs from their resulting steady–state activities, where the example inputs correspond to the successor coordinates of points evenly spaced throughout the environment. The minimization can be performed by taking the Moore–Penrose pseudoinverse of the matrix of neural activities in response to the example inputs (with singular values below a certain tolerance removed to avoid overfitting). The vector dj therefore gives the contribution of aj(t) to a linear population code for the input location. We now introduce the recurrent weights wrec ij to allow the network to maintain a memory of past input in persistent activity. The recurrent weights are determined by projecting the decoded location back on to the neuron encoding vectors such that wrec ij = (1 −ϵ) · ei · dj, (10) n X j=1 wrec ij aj(t) = (1 −ϵ) · ei · ˘srec(t). Here, the factor ϵ ≪1 determines the timescale on which the network activity fades. Since the encoding and decoding vectors for the same neuron tend to be similar, recurrent weights are highest between neurons representing similar successor coordinates, and the weight profile decreases with the distance between place field centers (Fig. 2). The full neuron–level description is given by τ dai(t) dt = −ai(t) + g n X j=1 wrec ij aj(t) + α m X k=1 wff ik ˘sin k (t) + (11) = −ai(t) + g ei · (1 −ϵ) · ˘srec(t) + α · ˘sin(t) + 5 where the α parameter corresponds to the input strength. If we consider the estimate of ˘srec(t) recovered from decoding the activities of the network, we arrive at the update equation τ d˘srec(t) dt ≈α · ˘sin(t) −ϵ · ˘srec(t). (12) Given a location ˘sin(t) as an initial input, the recovered representation ˘srec(t) approximates the input and reinforces it, allowing a persistent bump of activity to form. When ˘sin(t) then changes to a new (goal) location, the input and recovered coordinates conflict. By Eq. 12, the recovered location moves in the direction of the new input, giving us an approximation of the initial gradient ascent step in Eq. 6 with the addition of a decay controlled by ϵ. As we will show, the attractor dynamics typically cause the network activity to manifest as a movement of the bump towards the goal location, through locations intermediate to the starting position and the goal (as observed in experiments [9, 10]). After a short stimulation period, the network activity can be decoded to give a state nearby the starting position that is closer to the goal. Note that, with no decay ϵ, the network activity will tend to grow over time. To induce stable activity when the network representation matches the goal position (˘srec(t) ≈˘sin(t)), we balanced the decay and input strength (ϵ = α). In the following, we consider networks where the successor coordinate representation was truncated to the first q dimensions, where q ≪n. This was done because the network is composed of a limited number of neurons, representing only the portion of the successor coordinate space corresponding to actual locations in the environment. In a very high–dimensional space, the network can rapidly move into a regime far from any actual locations, and the integration accuracy suffers. In effect, the weight profiles and feed–forward activation profile become very narrow, and as a result the bump of activity simply disappears from the original position and reappears at the goal. Conversely, low– dimensional representations tend to result in broad excitatory weight profiles and activity profiles (Fig. 2). The high degree of excitatory overlap across the network causes the activity profile to move smoothly between distant points, as we will show. 4 Results We generated attractor networks according to the layout of multiple environments containing walls and obstacles, and stimulated them successively with arbitrary startpoints and goals. We used n = 500 neurons to represent each environment, with place field centers selected randomly throughout the environment. The successor coordinates were generated using γ = 1. We adjusted q to control the dimensionality of the representation. The network activity resembles a bump across a portion of the environment (Fig. 3). Low–dimensional representations (low q) produced large activity bumps across significant portions of the environment; when a weak stimulus was provided at the goal, the overall activity decreased while the center of the bump moved towards the goal through the intervening areas of the environment. With a high–dimensional representation, activity bumps became more localized, and shifted discontinuously to the goal (Fig. 3, bottom row). For several networks representing different environments, we initialized the activity at points evenly spaced throughout the environment and provided weak feed–forward stimulation corresponding to a fixed goal location (Fig. 4). After a short delay (5τ), we decoded the successor coordinates from the network activity to determine the closest state (Eq. 6). The shifts in the network representation are shown by the arrows in Fig. 4. For two networks, we show the effect of different feed–forward stimuli representing different goal locations. The movement of the activity profile was similar to the shortest path towards the goal (Fig. 4, bottom left), including reversals at equidistant points (center bottom of the maze). Irregularities were still present, however, particularly near the edges of the environment and in the immediate vicinity of the goal (where high–frequency components play a larger role in determining the value gradient). 5 Discussion We have presented a spatial bump attractor model generalized to represent environments with arbitrary obstacles, and shown how, with large activity profiles relative to the size of the environment, the network dynamics can be used for path–finding. This provides a possible correlate for goal–directed 6 0.0 4.0 9.0 13.0 18.0 0.0 4.0 9.0 13.0 18.0 0.0 2.0 4.0 6.0 8.0 0.0 2.75 5.5 8.25 11.0 Figure 3: Attractor network activities illustrated over time for different inputs and networks, in multiples of the membrane time constant τ. Purple boxes indicate the most active unit at each point in time. [First row] Activities are shown for a network representing a maze–like environment in a low–dimensional space (q = 5). The network was initially stimulated with a bump of activation representing the successor coordinates of the state at the black circle; recurrent connections maintain a similar yet fading profile over time. [Second row] For the same network and initial conditions, a weak constant stimulus was provided representing the successor coordinates at the grey circle; the activities transiently decrease and the center of the profile shifts over time through the environment. [Third row] Two positions (black and grey circles) were sequentially activated in a network representing a second environment in a low–dimensional space (q = 4). [Bottom row] For a higher–dimensional representation (q = 50), the activity profile fades rapidly and reappears at the stimulated position. activity observed in the hippocampus [9, 10] and an hypothesis for the role that the hippocampus and the CA3 region play in rapid goal–directed navigation [4–6], as a complement to an additional (e.g. model–free) system enabling incremental goal learning in unfamiliar environments [4]. Recent theoretical work has linked the bump–like firing behaviour of place cells to an encoding of the environment based on its natural topology, including obstacles [22], and specifically to the successor representation [14]. As well, recent work has proposed that place cell behaviour can be learned by processing visual data using hierarchical slow feature analysis [15, 16], a process which can extract the lowest frequency eigenvectors of the graph Laplacian generated by the environment [20] and therefore provide a potential input for successor representation–based activity. We provide the first link between these theoretical analyses and attractor–based models of CA3. Slow feature analysis has been proposed as a natural outcome of a plasticity rule based on Spike– Timing–Dependent Plasticity (STDP) [24], albeit on the timescale of a standard postsynaptic po7 Figure 4: Large–scale, low–dimensional attractor network activities can be decoded to determine local trajectories to long–distance goals. Arrows show the initial change in the location of the activity profile by determining the state closest to the decoded network activity (at t = 5τ) after weakly stimulating with the successor coordinates at the black dot (α = ϵ = 0.05). Pixels show the place field centers of the 500 neurons representing each environment, coloured according to their activity at the stimulated goal site. [Top left] Change in position of the activity profile in a maze– like environment with low–dimensional activity (q = 5) compared to [Bottom left] the true shortest path towards the goal at each point in the environment. [Additional plots] Various environments and stimulated goal sites using low–dimensional successor coordinate representations. tential rather than the behavioural timescale we consider here. However, STDP can be extended to behavioural timescales when combined with sustained firing and slowly decaying potentials [25] of the type observed on the single–neuron level in the input pathway to CA3 [26], or as a result of network effects. Within the attractor network, learning could potentially be addressed by a rule that trains recurrent synapses to reproduce feed–forward inputs during exploration (e.g. [27]). Our model assigns a key role to neurons with large place fields in generating long–distance goal– directed trajectories. This suggests that such trajectories in dorsal hippocampus (where place fields are much smaller [8]) must be inherited from dynamics in ventral or intermediate hippocampus. The model predicts that ablating the intermediate/ventral hippocampus [6] will result in a significant reduction in goal–directed preplay activity in the remaining dorsal region. In an intact hippocampus, the model predicts that long–distance goal–directed preplay in the dorsal hippocampus is preceded by preplay tracing a similar path in intermediate hippocampus. However, these large–scale networks lack the specificity to consistently generate useful trajectories in the immediate vicinity of the goal. Therefore, higher–dimensional (dorsal) representations may prove useful in generating trajectories close to the goal location, or alternative methods of navigation may become more important. If an assembly of neurons projecting to the attractor network is active while the animal searches the environment, reward–modulated Hebbian plasticity provides a potential mechanism for reactivating a goal location. In particular, the presence of a reward–induced neuromodulator could allow for potentiation between the assembly and the attractor network neurons active when the animal receives a reward at a particular location. Activating the assembly would then provide stimulation to the goal location in the network; the same mechanism could allow an arbitrary number of assemblies to become selective for different goal locations in the same environment. Unlike traditional model– free methods of learning which generate a static value map, this would give a highly configurable means of navigating the environment (e.g. visiting different goal locations based on thirst vs. hunger needs), providing a link between spatial navigation and higher cognitive functioning. Acknowledgements This research was supported by the Swiss National Science Foundation (grant agreement no. 200020 147200). We thank Laureline Logiaco and Johanni Brea for valuable discussions. 8 References [1] William Beecher Scoville and Brenda Milner. Loss of recent memory after bilateral hippocampal lesions. Journal of neurology, neurosurgery, and psychiatry, 20(1):11, 1957. [2] Howard Eichenbaum. Memory, amnesia, and the hippocampal system. MIT press, 1993. [3] John O’Keefe and Jonathan Dostrovsky. The hippocampus as a spatial map. preliminary evidence from unit activity in the freely-moving rat. Brain research, 34(1):171–175, 1971. [4] Kazu Nakazawa, Linus D Sun, Michael C Quirk, Laure Rondi-Reig, Matthew A Wilson, and Susumu Tonegawa. Hippocampal CA3 NMDA receptors are crucial for memory acquisition of one-time experience. Neuron, 38(2):305– 315, 2003. [5] Toshiaki Nakashiba, Jennie Z Young, Thomas J McHugh, Derek L Buhl, and Susumu Tonegawa. Transgenic inhibition of synaptic transmission reveals role of ca3 output in hippocampal learning. Science, 319(5867):1260–1264, 2008. [6] Tobias Bast, Iain A Wilson, Menno P Witter, and Richard GM Morris. From rapid place learning to behavioral performance: a key role for the intermediate hippocampus. PLoS biology, 7(4):e1000089, 2009. [7] Alexei Samsonovich and Bruce L McNaughton. Path integration and cognitive mapping in a continuous attractor neural network model. The Journal of Neuroscience, 17(15):5900–5920, 1997. [8] Kirsten Brun Kjelstrup, Trygve Solstad, Vegard Heimly Brun, Torkel Hafting, Stefan Leutgeb, Menno P Witter, Edvard I Moser, and May-Britt Moser. Finite scale of spatial representation in the hippocampus. Science, 321(5885):140–143, 2008. [9] Brad E Pfeiffer and David J Foster. Hippocampal place-cell sequences depict future paths to remembered goals. Nature, 497(7447):74–79, 2013. [10] Andrew M Wikenheiser and A David Redish. Hippocampal theta sequences reflect current goals. Nature neuroscience, 2015. [11] Louis-Emmanuel Martinet, Denis Sheynikhovich, Karim Benchenane, and Angelo Arleo. Spatial learning and action planning in a prefrontal cortical network model. PLoS computational biology, 7(5):e1002045, 2011. [12] Filip Ponulak and John J Hopfield. Rapid, parallel path planning by propagating wavefronts of spiking neural activity. Frontiers in computational neuroscience, 7, 2013. [13] Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613–624, 1993. [14] Kimberly L Stachenfeld, Matthew Botvinick, and Samuel J Gershman. Design principles of the hippocampal cognitive map. In Z. Ghahramani, M. Welling, C. Cortes, N.D. Lawrence, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2528–2536. Curran Associates, Inc., 2014. [15] Mathias Franzius, Henning Sprekeler, and Laurenz Wiskott. Slowness and sparseness lead to place, head-direction, and spatial-view cells. PLoS Computational Biology, 3(8):e166, 2007. [16] Fabian Schoenfeld and Laurenz Wiskott. Modeling place field activity with hierarchical slow feature analysis. Frontiers in Computational Neuroscience, 9:51, 2015. [17] Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning. MIT Press, 1998. [18] Ronald R Coifman and St´ephane Lafon. Diffusion maps. Applied and computational harmonic analysis, 21(1):5–30, 2006. [19] Sridhar Mahadevan. Learning Representation and Control in Markov Decision Processes, volume 3. Now Publishers Inc, 2009. [20] Henning Sprekeler. On the relation of slow feature analysis and laplacian eigenmaps. Neural computation, 23(12): 3287–3302, 2011. [21] John Conklin and Chris Eliasmith. A controlled attractor network model of path integration in the rat. Journal of computational neuroscience, 18(2):183–203, 2005. [22] Nicholas J Gustafson and Nathaniel D Daw. Grid cells, place cells, and geodesic generalization for spatial reinforcement learning. PLoS computational biology, 7(10):e1002235, 2011. [23] Chris Eliasmith and C Charles H Anderson. Neural engineering: Computation, representation, and dynamics in neurobiological systems. MIT Press, 2004. [24] Henning Sprekeler, Christian Michaelis, and Laurenz Wiskott. Slowness: an objective for spike-timing-dependent plasticity. PLoS Comput Biol, 3(6):e112, 2007. [25] Patrick J Drew and LF Abbott. Extending the effects of spike-timing-dependent plasticity to behavioral timescales. Proceedings of the National Academy of Sciences, 103(23):8876–8881, 2006. [26] Phillip Larimer and Ben W Strowbridge. Representing information in cell assemblies: persistent activity mediated by semilunar granule cells. Nature neuroscience, 13(2):213–222, 2010. [27] Robert Urbanczik and Walter Senn. Learning by the dendritic prediction of somatic spiking. Neuron, 81(3):521–528, 2014. 9 | 2015 | 357 |
5,877 | Exactness of Approximate MAP Inference in Continuous MRFs Nicholas Ruozzi Department of Computer Science University of Texas at Dallas Richardson, TX 75080 Abstract Computing the MAP assignment in graphical models is generally intractable. As a result, for discrete graphical models, the MAP problem is often approximated using linear programming relaxations. Much research has focused on characterizing when these LP relaxations are tight, and while they are relatively well-understood in the discrete case, only a few results are known for their continuous analog. In this work, we use graph covers to provide necessary and sufficient conditions for continuous MAP relaxations to be tight. We use this characterization to give simple proofs that the relaxation is tight for log-concave decomposable and logsupermodular decomposable models. We conclude by exploring the relationship between these two seemingly distinct classes of functions and providing specific conditions under which the MAP relaxation can and cannot be tight. 1 Introduction Graphical models are a popular modeling tool for both discrete and continuous distributions. We are commonly interested in one of two inference tasks in graphical models: finding the most probable assignment (a.k.a., MAP inference) and computing marginal distributions. These problems are NPhard in general, and a variety of approximate inference schemes are used in practice. In this work, we will focus on approximate MAP inference. For discrete state spaces, linear programming relaxations of the MAP problem (specifically, the MAP LP) are quite common [1; 2; 3]. These relaxations replace global marginalization constraints with a collection of local marginalization constraints. Wald and Globerson [4] refer to these as local consistency relaxations (LCRs). The advantage of LCRs is that they are often much easier to specify and to optimize over (e.g., by using a message-passing algorithm such as loopy belief propagation (LBP)). However, the analogous relaxations for continuous state spaces may not be compactly specified and can lead to an unbounded number of constraints (except in certain special cases). To overcome this problem, further relaxations have been proposed [5; 4]. By construction, each of these further relaxations can only be tight if the initial LCR was tight. As a result, there are compelling theoretical and algorithmic reasons to investigate when LCRs are tight. Among the most well-studied continuous models are the Gaussian graphical models. For this class of models, it is known that the continuous MAP relaxation is tight when the corresponding inverse covariance matrix is positive definite and scaled diagonally dominant (a special case of the so-called log-concave decomposable models)[4; 6; 7]. In addition, LBP is known to converge to the correct solution for Gaussian graphical models and log-concave decomposable models that satisfy a scaled diagonal dominance condition [8; 9]. While much of the prior work in this domain has focused on log-concave graphical models, in this work, we provide a general necessary and sufficient condition for the continuous MAP relaxation to be tight. This condition mirrors the known results for the discrete case and is based on the notion of graph covers: the MAP LP is tight if and only if the 1 optimal solution to the MAP problem is an upper bound on the MAP solution over any graph cover, appropriately scaled. This characterization will allow us to understand when the MAP relaxation is tight for more general models. Apart from this characterization theorem, the primary goal of this work is to move towards a uniform treatment of the discrete and continuous cases; they are not as different as they may initially appear. To this end, we explore the relationship between log-concave decomposable models and logsupermodular decomposable models (introduced here in the continuous case). Log-supermodular models provide an example of continuous graphical models for which the MAP relaxation is tight, but the objective function is not necessarily log-concave. These two concepts have analogs in discrete state spaces. In particular, log-concave decomposability is related to log-concave closures of discrete functions and log-supermodular decomposability is a known condition which guarantees that the MAP LP is exact in the discrete setting. We prove a number of results that highlight the similarities and differences between these two concepts as well as a general condition under which the MAP relaxation corresponding to a pairwise twice continuously differentiable model cannot be tight. 2 Prerequisites Let f : X n →R≥0 be a non-negative function where X is the set of possible assignments of each variable. A function f factors with respect to a hypergraph G = (V, A), if there exist potential functions fi : X →R≥0 for each i ∈V and fα : X |α| →R≥0 for each α ∈A such that f(x1, . . . , xn) = Y i∈V fi(xi) Y α∈A fα(xα). The hypergraph G together with the potential functions fi∈V and fα∈A define a graphical model. We are interested computing supx∈X n f G(x). In general, this MAP inference task is NP-hard, but in practice, local message-passing algorithms based on approximations from statistical physics, such as LBP, produce reasonable estimates in many settings. Much effort has been invested into understanding when LBP solves the MAP problem. In this section, we briefly review approximate MAP inference in the discrete setting (i.e., when X is a finite set). For simplicity and consistency, we will focus on log-linear models as in [4]. Given a vector of sufficient statistics φi(xi) ∈Rk for each i ∈V and xi ∈X and a parameter vector θi ∈Rk, we will assume that fi(xi) = exp (⟨θi, φi(xi)⟩) . Similarly, given a vector of sufficient statistics φα(xα) for each α ∈A and xα ∈X |α| and a parameter vector θα, we will assume that fα(xα) = exp (⟨θα, φα(xα)⟩) . We will write φ(x) to represent the concatenation of the individual sufficient statistics and θ to represent the concatenation of the parameters. The objective function can then be expressed as f G(x) = exp (⟨θ, φ(x)⟩) . 2.1 The MAP LP relaxation The MAP problem can be formulated in terms of mean parameters [10]. sup x∈X n log f(x) = sup µ∈M ⟨θ, µ⟩ M = {µ ∈Rm : ∃τ ∈∆s.t. Eτ[φ(x)] = µ} where ∆is the space of all densities over X n and M is the set of all realizable mean parameters. In general, M is a difficult object to compactly describe and to optimize over. As a result, one typically constructs convex outerbounds on M that are more manageable. In the case that X is finite, one such outerbound is given by the MAP LP. For each i ∈V and k ∈X, define φi(xi)k ≜1{xi=k}. Similarly, for each α ∈A and k ∈X |α|, define φα(xα)k ≜1{xα=k}. With this choice of sufficient statistics, M is equivalent to the set of all marginal distributions over the individual variables and elements of A that arise from some joint probability distribution. The MAP LP is obtained by replacing M with a relaxation that only enforces local consistency constraints. ML = ( µ ≥0 : P xα\{i} µα(xα) = µi(xi), for all α ∈A, i ∈α, xi ∈X P xi µi(xi) = 1, for all i ∈V ) The set of constraints, ML, is known as the local marginal polytope. The approximate MAP problem is then to compute maxµ∈ML⟨θ, µ⟩. 2 1 2 3 4 1, 2, 3 1, 4 2, 3, 4 (a) A hypergraph graph, G. 1 2 3 4 1 2 3 4 1, 2, 3 1, 4 2, 3, 4 1, 2, 3 1, 4 2, 3, 4 (b) One possible 2-cover of G. Figure 1: An example of a graph cover of a factor graph. The nodes in the cover are labeled for the node that they copy in the base graph. 2.2 Graph covers In this work, we are interested in understanding when this relaxation is tight (i.e., when does supµ∈ML⟨θ, µ⟩= supx∈X n log f(x)). For discrete MRFs, the MAP LP is known to be tight in a variety of different settings [11; 12; 13; 14]. Two different theoretical tools are often used to investigate the tightness of the MAP LP: duality and graph covers. Duality has been particularly useful in the design of convergent and correct message-passing schemes that solve the MAP LP [1; 15; 2; 16]. Graph covers provide a theoretical framework for understanding when and why message-passing algorithms such as belief propagation fail to solve the MAP problem [17; 18; 3]. Definition 2.1. A graph H covers a graph G = (V, E) if there exists a graph homomorphism h : H →G such that for all vertices i ∈G and all j ∈h−1(i), h maps the neighborhood ∂j of j in H bijectively to the neighborhood ∂i of i in G. If a graph H covers a graph G, then H looks locally the same as G. In particular, local messagepassing algorithms such as LBP have difficulty distinguishing a graph and its covers. If h(j) = i, then we say that j ∈H is a copy of i ∈G. Further, H is said to be an M-cover of G if every vertex of G has exactly M copies in H. This definition can be easily extended to hypergraphs. Each hypergraph G can be represented in factor graph form: create a node in the factor graph for each vertex (called variable nodes) and each hyperedge (called factor nodes) of G. Each factor node is connected via an edge in the factor graph to the variable nodes on which the corresponding hyperedge depends. For an example of a 2-cover, see Figure 1. To any M-cover H = (V H, AH) of G given by the homomorphism h, we can associate a collection of potentials: the potential at node i ∈V H is equal to fh(i), the potential at node h(i) ∈G, and for each β ∈AH, we associate the potential fh(β). In this way, we can construct a function f H : X M|V | →R≥0 such that f H factorizes over H. We will say that the graphical model H is an M-cover of the graphical model G whenever H is an M-cover of G and f H is chosen as described above. It will be convenient in the sequel to write f H(xH) = f H(x1, . . . , xM) where xm i is the mth copy of variable i ∈V . There is a direct correspondence between µ ∈ML and assignments on graph covers. This correspondence is the basis of the following theorem. Theorem 2.2 (Ruozzi and Tatikonda 3). sup µ∈ML ⟨θ, µ⟩= sup M sup H∈CM(G) sup xH 1 M log f H(xH) where CM(G) is the set of all M-covers of G. Theorem 2.2 claims that the optimal value of the MAP LP is equal to the supremum over all MAP assignments over all graph covers, appropriately scaled. In particular, the proof of this result shows that, under mild conditions, there exists an M-cover H of G and an assignment xH such that 1 M log f H(xH) = supµ∈ML⟨θ, µ⟩. 3 Continuous MRFs In this section, we will describe how to extend the previous results from discrete to continuous MRFs (i.e., X = R) using graph covers. The relaxation that we consider here is the appropriate extension 3 of the MAP LP where each of the sums are replaced by integrals [4]. ML = µ : ∃densities τi, τα s.t. R τα(xα)dxα\i = τi(xi), for all α ∈A, i ∈α, xi ∈X µi = Eτi[φi], for all i ∈V µα = Eτα[φα], for all α ∈A Our goal is to understand under what conditions this continuous relaxation is tight. Wald and Globerson [4] have approached this problem by introducing a further relaxation of ML which they call the weak local consistency relaxation (weak LCR). They provide conditions under which the weak LCR (and hence the above relaxation) is tight. In particular, they show that weak LCR is tight for the class of log-concave decomposable models. In this work, we take a different approach. We first prove the analog of Theorem 2.2 in the continuous case and then we show that the known conditions that guarantee tightness of the continuous relaxation are simple consequences of this general theorem. Theorem 3.1. sup µ∈ML ⟨θ, µ⟩= sup M sup H∈CM(G) sup xH 1 M log f H(xH) where CM(G) is the set of all M-covers of G. The proof of Theorem 3.1 is conceptually straightforward, albeit technical, and can be found in Appendix A. The proof approximates the expectations in ML as expectations with respect to simple functions, applies the known results for finite spaces, and takes the appropriate limit. Like its discrete counterpart, Theorem 3.1 provides necessary and sufficient conditions for the continuous relaxation to be tight. In particular, for the relaxation to be tight, the optimal solution on any Mcover, appropriately scaled, cannot exceed the value of the optimal solution of the MAP problem over G. 3.1 Tightness of the MAP relaxation Theorem 3.1 provides necessary and sufficient conditions for the tightness of the continuous relaxation. However, checking that the maximum value attained on any M-cover is bounded by the maximum value over the base graph to the M, in and of itself, appears to be a daunting task. In this section, we describe two families of graphical models for which this condition is easy to verify: the log-concave decomposable functions and the log-supermodular decomposable functions. Log-concave decomposability has been studied before, particularly in the case of Gaussian graphical models. Log-supermodularity with respect to graphical models, however, appears to have been primarily studied in the discrete case. 3.1.1 Log-concave decomposability A function f : Rn →R≥0 is log-concave if f(x)λf(y)1−λ ≤f(λx + (1 −λ)y) for all x, y ∈Rn and all λ ∈[0, 1]. If f can be written as a product of log-concave potentials over a hypergraph G, we say that f is log-concave decomposable over G. Theorem 3.2. If f is log-concave decomposable, then supx log f(x) = supµ∈ML⟨θ, µ⟩. Proof. By log-concave decomposability, for any M-cover H of G, f H(x1, . . . , xM) ≤f G x1 + · · · + xM M M , which we obtain by applying the definition of log-concavity separately to each of the M copies of the potential functions for each node and factor of G. As a result, supx1,...,xM f H(x1, . . . , xM) ≤ supx f G(x)M. The proof of the theorem then follows by applying Theorem 3.1. Wald and Globerson [4] provide a different proof of Theorem 3.2 by exploiting duality and the weak LCR. 4 3.1.2 Log-supermodular decomposability Log-supermodular functions have played an important role in the study of discrete graphical models, and log-supermodularity arises in a number of classical correlations inequalities (e.g., the FKG inequality). For log-supermodular decomposable models, the MAP LP is tight and the MAP problem can be solved exactly in polynomial time [19; 20]. In the continuous case, log-supermodularity is defined analogously to the discrete case. That is, f : Rn →R≥0 is log-supermodular if f(x)f(y) ≤ f(x ∧y)f(x ∨y) for all x, y ∈Rn, where x ∨y is the componentwise maximum of the vectors x and y and x ∧y is the componentwise minimum. Continuous log-supermodular functions are sometimes said to be multivariate totally positive of order two [21]. We will say that a graphical model is log-supermodular decomposable if f can be factorized as a product of log-supermodular potentials. For any collection of vectors x1, . . . , xk ∈Rn, let zi(x1, . . . , xk) be the vector whose jth component is the ith largest element of x1 j, . . . , xk j for each j ∈{1, . . . , n}. Theorem 3.3. If f is log-supermodular decomposable, then supx log f(x) = supµ∈ML⟨θ, µ⟩. Proof. By log-supermodular decomposability, for any M-cover H of G, f H(x1, . . . , xM) ≤ M Y m=1 f G(zm(x1, . . . , xM)). Again, this follows by repeatedly applying the definition of log-supermodularity separately to each of the M copies of the potential functions for each node and factor of G. As a result, supx1,...,xM f H(x1, . . . , xM) ≤supx1,...,xM QM m=1 f G(xm). The proof of the theorem then follows by applying Theorem 3.1. 4 Log-supermodular decomposability vs. log-concave decomposability As discussed above, log-concave decomposable and log-supermodular decomposable models are both examples of continuous graphical models for which the MAP relaxation is tight. These two classes are not equivalent: twice continuously differentiable functions are supermodular if and only if all off diagonal elements of the Hessian matrix are non-negative. Contrast this with twice continuously differentiable concave functions where the Hessian matrix must be negative semidefinite. In particular, this means that log-supermodular functions can be multimodel. In this section, we explore the relationship between log-supermodularity and log-concavity. 4.1 Gaussian MRFs We begin with the case of Gaussian graphical models, i.e., pairwise graphical models given by f(x) ∝= −1/2xT Ax + bT x = Y i∈V exp −1 2Aiix2 i + bixi Y (i,j)∈E exp (−Aijxixj) for some symmetric positive definite matrix A ∈Rn×n and vector b ∈Rn. Here, f factors over the graph G corresponding to the non-zero entries of the matrix A. Gaussian graphical models are a relatively well-studied class of continuous graphical models. In fact, sufficient conditions for the convergence and correctness of Gaussian belief propagation (GaBP) are known for these models. Specifically, GaBP converges to the optimal solution if the positive definite matrix A is walk-summable, scaled diagonally dominant, or log-concave decomposable [22; 7; 8; 9]. These conditions are known to be equivalent [23; 6]. Definition 4.1. Γ ∈Rn×n is scaled diagonally dominant if ∃w ∈Rn, w > 0 such that |Γii|wi > P j̸=i |Γij|wj. In addition, the following theorem provides a characterization of scaled diagonal dominance (and hence log-concave decomposability) in terms of graph covers for these models. Theorem 4.2 (Ruozzi and Tatikonda 6). Let A be a symmetric positive definite matrix. The following are equivalent. 5 1. A is scaled diagonally dominant. 2. All covers of A are positive definite. 3. All 2-covers of A are positive definite. The proof of this theorem constructs a specific 2-cover whose covariance matrix has negative eigenvalues whenever the matrix A is positive definite but not scaled diagonally dominant. The joint distribution corresponding to this 2-cover is not bounded from above, so the optimal value of the MAP relaxation is +∞as per Theorem 3.1. For Gaussian graphical models, log-concave decomposability and log-supermodular decomposability are related: every positive definite, log-supermodular decomposable model is log-concave decomposable, and every positive definite, log-concave decomposable model is a signed version of some positive definite, log-supermodular decomposable Gaussian graphical model. This follows from the following simple lemma. Lemma 4.3. A symmetric positive definite matrix A is scaled diagonally dominant if and only if the matrix B such that Bii = Aii for all i and Bij = −|Aij| for all i ̸= j is positive definite. If A is positive definite and scaled diagonally dominant, then the model is log-concave decomposable. In contrast, the model would be log-supermodular decomposable if all of the off-diagonal elements of A were negative, independent of the diagonal. In particular, the diagonal could have both positive and negative elements, meaning that f(x) could be either log-concave, log-convex, or neither. As log-convex quadratic forms do not correspond to normalizable Gaussian graphical models, the log-convex case appears to be less interesting as the MAP problem is unbounded from above. However, the situation is entirely different for constrained (over some convex set) log-quadratic maximization. As an example, consider a box constrained log-quadratic maximization problem where the matrix A has all negative off-diagonal entries. Such a model is always log-supermodular decomposable. Hence, the MAP relaxation is tight, but the model is not necessarily log-concave. 4.2 Pairwise twice differentiable MRFs All of the results from the previous section can be extended to general twice continuously differentiable functions over pairwise graphical models (i.e., |α| = 2 for all α ∈A). In this section, unless otherwise specified, assume that all models are pairwise. Theorem 4.4. If log f(x) is strictly concave and twice continuously differentiable, the following are equivalent. 1. ∇2(log f)(x) is scaled diagonally dominant for all x. 2. ∇2(log f H)(xH) is negative definite for every graph cover H of G and every xH. 3. ∇2(log f H)(xH) is negative definite for every 2-cover H of G and every xH. The equivalence of 1-3 in Theorem 4.4 follows from Theorem 4.2. Corollary 4.5. If ∇2(log f)(x) is scaled diagonally dominant for all x, then the continuous MAP relaxation is tight. Corollary 4.6. If f is log-concave decomposable over a pairwise graphical model and strictly logconcave, then ∇2(log f)(x) is scaled diagonally dominant for all x. Whether or not log-concave decomposability is equivalent to the other conditions listed in the statement of Theorem 4.4 remains an open question (though we conjecture that this is the case). Similar ideas can be extended to general twice continuously differentiable functions. Theorem 4.7. Suppose log f(x) is twice continuously differentiable with a maximum at x∗. Let Bij = |∇2(log f)(x∗)ij| for all i ̸= j and Bii = ∇2(log f)(x∗)ii. If f admits a pairwise factorization over G and B has both positive and negative eigenvalues, then the continuous MAP relaxation is not tight. Proof. If B has both positive and negative eigenvalues, then there exists a 2-cover H of G such that ∇2(log f H)(x∗, x∗) has both positive and negative eigenvalues. As a result, the lift of x∗to the 6 2-cover f H is a saddle point. Consequently, f H(x∗, x∗) < supxH f H(xH). By Theorem 3.1, the continuous MAP relaxation cannot be tight. This negative result is quite general. If ∇2(log f) is positive definite but not scaled diagonally dominant at any global optimum, then the MAP relaxation is not tight. In particular, this means that all log-supermodular decomposable functions that meet the conditions of the theorem must be s.d.d. at their optima. Algorithmically, Moallemi and Van Roy [9] argued that belief propagation converges for models that are log-concave decomposable and scaled diagonally dominant. It is unknown whether or not a similar convergence argument applies to log-supermodular decomposable functions. 4.3 Concave closures Many of the tightness results in the discrete case can be seen as a specific case of the continuous results described above. Again, suppose that X ⊂R is a finite set. Definition 4.8. The concave closure of a function g : X n →R ∪{−∞} at x ∈Rn is given by g(x) = sup X y∈X n λ(y)g(y) : P y λ(y) = 1, P y λ(y)y = x, λ(y) ≥0 Equivalently, the concave closure of a function is the smallest concave function such that g(x) ≤ g(x) for all x. A function and its concave closure must necessarily have the same maximum. Computing the concave (or convex) closure of a function is NP-hard in general, but it can be efficiently computed for certain special classes of discrete functions. In particular, when X = {0, 1} and log f is supermodular, then its concave closure can be computed in polynomial time as it is equal to the Lov´asz extension of log f. The Lov´asz extension has a number of interesting properties. Most notably, it is linear (the Lov´asz extension of a sum of functions is equal to sum of the Lov´asz extensions). Define the log-concave closure of f to be ˆf(x) = exp(log f(x)). As a result, if f is log-supermodular decomposable, then ˆf is log-concave decomposable. Theorem 4.9. If ˆf = Q i∈V ˆfi Q α∈A ˆfα, then supx∈X n f(x) = P µ∈ML⟨θ, µ⟩. This theorem is a direct consequence of Theorem 3.2. For example, the tightness results of Bayati et al. [11] and Sanghavi et al. [14] (and indeed many others) can be seen as a special case of this theorem. Even when |X| is not finite, the concave closure can be similarly defined, and the theorem holds in this case as well. Given the characterization in the discrete case, this suggests that there could be a, possibly deep, connection between log-concave closures and log-supermodular decomposability. 5 Discussion We have demonstrated that the same necessary and sufficient condition based on graph covers for the tightness of the MAP LP in the discrete case translates seamlessly to the continuous case. This characterization allowed us to provide simple proofs of the tightness of the MAP relaxation for logconcave decomposable and log-supermodular decomposable models. While the proof of Theorem 3.1 is nontrivial, it provides a powerful tool to reason about the tightness of MAP relaxations. We also explored the intricate relationship between log-concave and log-supermodular decomposablity in both the discrete and continuous cases which provided intuition about when the MAP relaxation can or cannot be tight for pairwise graphical models. A Proof of Theorem 3.1 The proof of this theorem proceeds in two parts. First, we will argue that sup µ∈ML ⟨θ, µ⟩≥sup M sup H∈CM(G) sup xH 1 M log f H(xH). To see this, fix an M-cover, H, of G via the homomorphism h and consider any assignment xH. Construct the mean parameters µ′ ∈ML as follows. 7 τi(xi) = 1 M X j∈V (H):h(j)=i δ(xH j −xi) µ′ i = Z τi(xi)φi(xi)dxi τα(xα) = 1 M X β∈A(H):h(β)=α δ(xH β −xα) µ′ α = Z τα(xα)φα(xα)dxα Here, δ(·) is the Dirac delta function1. This implies that 1 M log f H(xH) = ⟨θ, µ′⟩≤sup µ∈ML ⟨θ, µ⟩. For the other direction, fix some µ′ ∈ML such that µ′ is generated by the vector of densities τ. We will prove the result for locally consistent probability distributions with bounded support. The result for arbitrary τ will then follow by constructing sequences of these distributions that converge (in measure) to τ. For simplicity, we will assume that each potential function is strictly positive2. Consider the space [−t, t]|V | for some positive integer t. We will consider local probability distributions that are supported on subsets of this space. That is, supp(τi) ⊆[−t, t] for each i and supp(τα) ⊆[−t, t]|α| for each α. For a fixed positive integer s, divide the interval [−t, t] into 2s+1t intervals of size 1/2s and let Sk denote the kth interval. This partitioning divides [−t, t]|V | into disjoint cubes of volume 1/2s|V |. The distribution τ can be approximated as a sequence of distributions τ 1, τ 2, . . . as follows. Define a vector of approximate densities τ s by setting τ s i (x′ i) ≜ 2s R Sk τi(xi)dxi, if x′ i ∈Sk 0, otherwise τ s α(x′ α) ≜ ( 2|α|s R Q kj :j∈α Skj τα(xα)dxα, if x′ α ∈Q kj:j∈α Skj 0, otherwise We have τ s → τ, R [−t,t] τ s i (xi)φi(xi)dxi → µ′ i for each i ∈ V (G), and R [−t,t]|α| τ s α(xα)φα(xα)dxα →µ′ α for each α ∈A(G). The continuous MAP relaxation for local probability distributions of this form can be expressed in terms of discrete variables over X = {1, . . . , 2s+1t}. To see this, define µs i(zi) = R Szi τ s i (xi)dxi for each zi ∈{1, . . . , 2s+1t} and µs α(zα) = R Szα τ s α(xα)dxα for each zα ∈{1, . . . , 2s+1t}|α|. The corresponding MAP LP objective, evaluated at µs, is then X i∈V X zi µs i(zi) Z Szi 2s log fi(xi)dxi + X α∈A X zα µs α(zα) Z Szα 2|α|s log fα(xα)dxα. (1) This MAP LP objective corresponds to a discrete graphical model that factors over the hypergraph G, with potential functions corresponding to the above integrals over the partitions indexed by the vector z. gs(z) ∝ Y i∈V (G) exp Z Szi 2s log fi(xi)dxi ! Y α∈A(G) exp Z Szα 2|α|s log fα(xα)dxα ! = Y i∈V (G) exp Z Sz 2|V (G)|s log fi(xi)dx Y α∈A(G) exp Z Sz 2|V (G)|s log fα(xα)dx Every assignment selects a single cube indexed by z. The value of the objective is calculated by averaging log f over the cube indexed by z. As a result, maxz gs(z) ≤supx f(x) and for any M-cover H of G, maxz1:M gH,s(z1, . . . , zM) ≤supx1:m f H(x1, . . . , xM). As this upper bound holds for any fixed s, it must also hold for any vector of distributions that can be written as a limit of such distributions. Now, by applying Theorem 2.2 for the discrete case, ⟨θ, µ′⟩= lims→∞⟨θ, µs⟩≤ supM supH∈CM(G) supxH 1 M log f H(xH) as desired. To finish the proof, observe that any Riemann integrable density can be arbitrarily well approximated by densities of this form as t →∞. 1In order to make this precise, we would need to use Lebesgue integration or take a sequence of probability distributions over the space RM|V | that arbitrarily well-approximate the desired assignment xH. 2The same argument will apply in the general case, but each of the local distributions must be contained in the support of the corresponding potential function (i.e., supp(τi) ⊆supp(fi)) for the integrals to exist. 8 References [1] A. Globerson and T. S. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LP-relaxations. In Proc. 21st Neural Information Processing Systems (NIPS), Vancouver, B.C., Canada, 2007. [2] T. Werner. A linear programming approach to max-sum problem: A review. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 29(7):1165–1179, 2007. [3] N. Ruozzi and S. Tatikonda. Message-passing algorithms: Reparameterizations and splittings. IEEE Transactions on Information Theory, 59(9):5860–5881, Sept. 2013. [4] Y. Wald and A. Globerson. Tightness results for local consistency relaxations in continuous MRFs. In Proc. 30th Uncertainty in Artifical Intelligence (UAI), Quebec City, Quebec, Canada, 2014. [5] T. P. Minka. Expectation propagation for approximate Bayesian inference. In Proceedings of the Seventeenth conference on Uncertainty in Artificial Intelligence (UAI), pages 362–369, 2001. [6] N. Ruozzi and S. Tatikonda. Message-passing algorithms for quadratic minimization. Journal of Machine Learning Research, 14:2287–2314, 2013. [7] D. M. Malioutov, J. K. Johnson, and A. S. Willsky. Walk-sums and belief propagation in Gaussian graphical models. Journal of Machine Learning Research, 7:2031–2064, 2006. [8] C. C. Moallemi and B. Van Roy. Convergence of min-sum message passing for quadratic optimization. Information Theory, IEEE Transactions on, 55(5):2413 –2423, May 2009. [9] C. C. Moallemi and B. Van Roy. Convergence of min-sum message-passing for convex optimization. Information Theory, IEEE Transactions on, 56(4):2041 –2050, April 2010. [10] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends R⃝in Machine Learning, 1(1-2):1–305, 2008. [11] M. Bayati, C. Borgs, J. Chayes, and R. Zecchina. Belief propagation for weighted b-matchings on arbitrary graphs and its relation to linear programs with integer solutions. SIAM Journal on Discrete Mathematics, 25(2):989–1011, 2011. [12] V. Kolmogorov and R. Zabih. What energy functions can be minimized via graph cuts? In Computer VisionECCV 2002, pages 65–81. Springer, 2002. [13] S. Sanghavi, D. M. Malioutov, and A. S. Willsky. Belief propagation and LP relaxation for weighted matching in general graphs. Information Theory, IEEE Transactions on, 57(4):2203 –2212, April 2011. [14] S. Sanghavi, D. Shah, and A. S. Willsky. Message passing for maximum weight independent set. Information Theory, IEEE Transactions on, 55(11):4822–4834, Nov. 2009. [15] M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. MAP estimation via agreement on (hyper)trees: Message-passing and linear programming. Information Theory, IEEE Transactions on, 51(11):3697– 3717, Nov. 2005. [16] David Sontag, Talya Meltzer, Amir Globerson, Yair Weiss, and Tommi Jaakkola. Tightening LP relaxations for MAP using message-passing. In 24th Conference in Uncertainty in Artificial Intelligence, pages 503–510. AUAI Press, 2008. [17] P. O. Vontobel. Counting in graph covers: A combinatorial characterization of the Bethe entropy function. Information Theory, IEEE Transactions on, Jan. 2013. [18] P. O. Vontobel and R. Koetter. Graph-cover decoding and finite-length analysis of message-passing iterative decoding of LDPC codes. CoRR, abs/cs/0512078, 2005. [19] S. Iwata, L. Fleischer, and S. Fujishige. A strongly polynomial-time algorithm for minimizing submodular functions. Journal of The ACM, 1999. [20] A. Schrijver. A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory, Series B, 80(2):346 – 355, 2000. [21] S. Karlin and Y. Rinott. Classes of orderings of measures and related correlation inequalities. i. multivariate totally positive distributions. Journal of Multivariate Analysis, 10(4):467 – 498, 1980. [22] Y. Weiss and W. T. Freeman. Correctness of belief propagation in Gaussian graphical models of arbitrary topology. Neural Comput., 13(10):2173–2200, Oct. 2001. [23] D. M. Malioutov. Approximate inference in Gaussian graphical models. Ph.D. thesis, EECS, MIT, 2008. 9 | 2015 | 358 |
5,878 | Explore no more: Improved high-probability regret bounds for non-stochastic bandits Gergely Neu∗ SequeL team INRIA Lille – Nord Europe gergely.neu@gmail.com Abstract This work addresses the problem of regret minimization in non-stochastic multiarmed bandit problems, focusing on performance guarantees that hold with high probability. Such results are rather scarce in the literature since proving them requires a large deal of technical effort and significant modifications to the standard, more intuitive algorithms that come only with guarantees that hold on expectation. One of these modifications is forcing the learner to sample arms from the uniform distribution at least Ω( √ T) times over T rounds, which can adversely affect performance if many of the arms are suboptimal. While it is widely conjectured that this property is essential for proving high-probability regret bounds, we show in this paper that it is possible to achieve such strong results without this undesirable exploration component. Our result relies on a simple and intuitive loss-estimation strategy called Implicit eXploration (IX) that allows a remarkably clean analysis. To demonstrate the flexibility of our technique, we derive several improved high-probability bounds for various extensions of the standard multi-armed bandit framework. Finally, we conduct a simple experiment that illustrates the robustness of our implicit exploration technique. 1 Introduction Consider the problem of regret minimization in non-stochastic multi-armed bandits, as defined in the classic paper of Auer, Cesa-Bianchi, Freund, and Schapire [5]. This sequential decision-making problem can be formalized as a repeated game between a learner and an environment (sometimes called the adversary). In each round t = 1, 2, . . . , T, the two players interact as follows: The learner picks an arm (also called an action) It ∈[K] = {1, 2, . . . , K} and the environment selects a loss function ℓt : [K] →[0, 1], where the loss associated with arm i ∈[K] is denoted as ℓt,i. Subsequently, the learner incurs and observes the loss ℓt,It. Based solely on these observations, the goal of the learner is to choose its actions so as to accumulate as little loss as possible during the course of the game. As traditional in the online learning literature [10], we measure the performance of the learner in terms of the regret defined as RT = T X t=1 ℓt,It −min i∈[K] T X t=1 ℓt,i. We say that the environment is oblivious if it selects the sequence of loss vectors irrespective of the past actions taken by the learner, and adaptive (or non-oblivious) if it is allowed to choose ℓt as a function of the past actions It−1, . . . , I1. An equivalent formulation of the multi-armed bandit game uses the concept of rewards (also called gains or payoffs) instead of losses: in this version, ∗The author is currently with the Department of Information and Communication Technologies, Pompeu Fabra University, Barcelona, Spain. 1 the adversary chooses the sequence of reward functions (rt) with rt,i denoting the reward given to the learner for choosing action i in round t. In this game, the learner aims at maximizing its total rewards. We will refer to the above two formulations as the loss game and the reward game, respectively. Our goal in this paper is to construct algorithms for the learner that guarantee that the regret grows sublinearly. Since it is well known that no deterministic learning algorithm can achieve this goal [10], we are interested in randomized algorithms. Accordingly, the regret RT then becomes a random variable that we need to bound in some probabilistic sense. Most of the existing literature on non-stochastic bandits is concerned with bounding the pseudo-regret (or weak regret) defined as bRT = max i∈[K] E " T X t=1 ℓt,It − T X t=1 ℓt,i # , where the expectation integrates over the randomness injected by the learner. Proving bounds on the actual regret that hold with high probability is considered to be a significantly harder task that can be achieved by serious changes made to the learning algorithms and much more complicated analyses. One particular common belief is that in order to guarantee high-confidence performance guarantees, the learner cannot avoid repeatedly sampling arms from a uniform distribution, typically Ω √ KT times [5, 4, 7, 9]. It is easy to see that such explicit exploration can impact the empirical performance of learning algorithms in a very negative way if there are many arms with high losses: even if the base learning algorithm quickly learns to focus on good arms, explicit exploration still forces the regret to grow at a steady rate. As a result, algorithms with high-probability performance guarantees tend to perform poorly even in very simple problems [25, 7]. In the current paper, we propose an algorithm that guarantees strong regret bounds that hold with high probability without the explicit exploration component. One component that we preserve from the classical recipe for such algorithms is the biased estimation of losses, although our bias is of a much more delicate nature, and arguably more elegant than previous approaches. In particular, we adopt the implicit exploration (IX) strategy first proposed by Koc´ak, Neu, Valko, and Munos [19] for the problem of online learning with side-observations. As we show in the current paper, this simple loss-estimation strategy allows proving high-probability bounds for a range of nonstochastic bandit problems including bandits with expert advice, tracking the best arm and bandits with side-observations. Our proofs are arguably cleaner and less involved than previous ones, and very elementary in the sense that they do not rely on advanced results from probability theory like Freedman’s inequality [12]. The resulting bounds are tighter than all previously known bounds and hold simultaneously for all confidence levels, unlike most previously known bounds [5, 7]. For the first time in the literature, we also provide high-probability bounds for anytime algorithms that do not require prior knowledge of the time horizon T. A minor conceptual improvement in our analysis is a direct treatment of the loss game, as opposed to previous analyses that focused on the reward game, making our treatment more coherent with other state-of-the-art results in the online learning literature1. The rest of the paper is organized as follows. In Section 2, we review the known techniques for proving high-probability regret bounds for non-stochastic bandits and describe our implicit exploration strategy in precise terms. Section 3 states our main result concerning the concentration of the IX loss estimates and shows applications of this result to several problem settings. Finally, we conduct a set of simple experiments to illustrate the benefits of implicit exploration over previous techniques in Section 4. 2 Explicit and implicit exploration Most principled learning algorithms for the non-stochastic bandit problem are constructed by using a standard online learning algorithm such as the exponentially weighted forecaster ([26, 20, 13]) or follow the perturbed leader ([14, 18]) as a black box, with the true (unobserved) losses replaced by some appropriate estimates. One of the key challenges is constructing reliable estimates of the losses ℓt,i for all i ∈[K] based on the single observation ℓt,It. Following Auer et al. [5], this is 1In fact, studying the loss game is colloquially known to allow better constant factors in the bounds in many settings (see, e.g., Bubeck and Cesa-Bianchi [9]). Our result further reinforces these observations. 2 traditionally achieved by using importance-weighted loss/reward estimates of the form bℓt,i = ℓt,i pt,i I{It=i} or brt,i = rt,i pt,i I{It=i} (1) where pt,i = P [It = i| Ft−1] is the probability that the learner picks action i in round t, conditioned on the observation history Ft−1 of the learner up to the beginning of round t. It is easy to show that these estimates are unbiased for all i with pt,i > 0 in the sense that Ebℓt,i = ℓt,i for all such i. For concreteness, consider the EXP3 algorithm of Auer et al. [5] as described in Bubeck and CesaBianchi [9, Section 3]. In every round t, this algorithm uses the loss estimates defined in Equation (1) to compute the weights wt,i = exp −η Pt−1 s=1 bℓs−1,i for all i and some positive parameter η that is often called the learning rate. Having computed these weights, EXP3 draws arm It = i with probability proportional to wt,i. Relying on the unbiasedness of the estimates (1) and an optimized setting of η, one can prove that EXP3 enjoys a pseudo-regret bound of √2TK log K. However, the fluctuations of the loss estimates around the true losses are too large to permit bounding the true regret with high probability. To keep these fluctuations under control, Auer et al. [5] propose to use the biased reward-estimates ert,i = brt,i + β pt,i (2) with an appropriately chosen β > 0. Given these estimates, the EXP3.P algorithm of Auer et al. [5] computes the weights wt,i = exp η Pt−1 s=1 ers,i for all arms i and then samples It according to the distribution pt,i = (1 −γ) wt,i PK j=1 wt,j + γ K , where γ ∈[0, 1] is the exploration parameter. The argument for this explicit exploration is that it helps to keep the range (and thus the variance) of the above reward estimates bounded, thus enabling the use of (more or less) standard concentration results2. In particular, the key element in the analysis of EXP3.P [5, 9, 7, 6] is showing that the inequality T X t=1 (rt,i −ert,i) ≤log(K/δ) β holds simultaneously for all i with probability at least 1 −δ. In other words, this shows that the cumulative estimates PT t=1 ert,i are upper confidence bounds for the true rewards PT t=1 rt,i. In the current paper, we propose to use the loss estimates defined as eℓt,i = ℓt,i pt,i + γt I{It=i}, (3) for all i and an appropriately chosen γt > 0, and then use the resulting estimates in an exponentialweights algorithm scheme without any explicit exploration. Loss estimates of this form were first used by Koc´ak et al. [19]—following them, we refer to this technique as Implicit eXploration, or, in short, IX. In what follows, we argue that that IX as defined above achieves a similar variancereducing effect as the one achieved by the combination of explicit exploration and the biased reward estimates of Equation (2). In particular, we show that the IX estimates (3) constitute a lower confidence bound for the true losses which allows proving high-probability bounds for a number of variants of the multi-armed bandit problem. 3 High-probability regret bounds via implicit exploration In this section, we present a concentration result concerning the IX loss estimates of Equation (3), and apply this result to prove high-probability performance guarantees for a number of nonstochastic bandit problems. The following lemma states our concentration result in its most general form: 2Explicit exploration is believed to be inevitable for proving bounds in the reward game for various other reasons, too—see Bubeck and Cesa-Bianchi [9] for a discussion. 3 Lemma 1. Let (γt) be a fixed non-increasing sequence with γt ≥0 and let αt,i be nonnegative Ft−1-measurable random variables satisfying αt,i ≤2γt for all t and i. Then, with probability at least 1 −δ, T X t=1 K X i=1 αt,i eℓt,i −ℓt,i ≤log (1/δ) . A particularly important special case of the above lemma is the following: Corollary 1. Let γt = γ ≥0 for all t. With probability at least 1 −δ, T X t=1 eℓt,i −ℓt,i ≤log (K/δ) 2γ . simultaneously holds for all i ∈[K]. This corollary follows from applying Lemma 1 to the functions αt,i = 2γI{i=j} for all j and applying the union bound. The full proof of Lemma 1 is presented in the Appendix. For didactic purposes, we now present a direct proof for Corollary 1, which is essentially a simpler version of Lemma 1. Proof of Corollary 1. For convenience, we will use the notation β = 2γ. First, observe that eℓt,i = ℓt,i pt,i + γ I{It=i} ≤ ℓt,i pt,i + γℓt,i I{It=i} = 1 2γ · 2γℓt,i/pt,i 1 + γℓt,i/pt,i I{It=i} ≤1 β · log 1 + βbℓt,i , where the first step follows from ℓt,i ∈[0, 1] and last one from the elementary inequality z 1+z/2 ≤ log(1 + z) that holds for all z ≥0. Using the above inequality, we get that E h exp βeℓt,i Ft−1 i ≤E h 1 + βbℓt,i Ft−1 i ≤1 + βℓt,i ≤exp (βℓt,i) , where the second and third steps are obtained by using E h bℓt,i Ft−1 i ≤ℓt,i that holds by definition of bℓt,i, and the inequality 1 + z ≤ez that holds for all z ∈R. As a result, the process Zt = exp β Pt s=1 eℓs,i −ℓs,i is a supermartingale with respect to (Ft): E [Zt| Ft−1] ≤Zt−1. Observe that, since Z0 = 1, this implies E [ZT ] ≤E [ZT −1] ≤. . . ≤1, and thus by Markov’s inequality, P " T X t=1 eℓt,i −ℓt,i > ε # ≤E " exp β T X t=1 eℓt,i −ℓt,i !# · exp(−βε) ≤exp(−βε) holds for any ε > 0. The statement of the lemma follows from solving exp(−βε) = δ/K for ε and using the union bound over all arms i. In what follows, we put Lemma 1 to use and prove improved high-probability performance guarantees for several well-studied variants of the non-stochastic bandit problem, namely, the multi-armed bandit problem with expert advice, tracking the best arm for multi-armed bandits, and bandits with side-observations. The general form of Lemma 1 will allow us to prove high-probability bounds for anytime algorithms that can operate without prior knowledge of T. For clarity, we will only provide such bounds for the standard multi-armed bandit setting; extending the derivations to other settings is left as an easy exercise. For all algorithms, we prove bounds that scale linearly with log(1/δ) and hold simultaneously for all levels δ. Note that this dependence can be improved to p log(1/δ) for a fixed confidence level δ, if the algorithm can use this δ to tune its parameters. This is the way that Table 1 presents our new bounds side-by-side with the best previously known ones. 4 Setting Best known regret bound Our new regret bound Multi-armed bandits 5.15 p TK log(K/δ) 2 p 2TK log(K/δ) Bandits with expert advice 6 p TK log(N/δ) 2 p 2TK log(N/δ) Tracking the best arm 7 p KTS log(KT/δS) 2 p 2KTS log(KT/δS) Bandits with side-observations e O √ mT e O √ αT Table 1: Our results compared to the best previously known results in the four settings considered in Sections 3.1–3.4. See the respective sections for references and notation. 3.1 Multi-armed bandits Algorithm 1 EXP3-IX Parameters: η > 0, γ > 0. Initialization: w1,i = 1. for t = 1, 2, . . . , T, repeat 1. pt,i = wt,i PK j=1 wt,j . 2. Draw It ∼pt = (pt,1, . . . , pt,K). 3. Observe loss ℓt,It. 4. eℓt,i ← ℓt,i pt,i+γ I{It=i} for all i ∈[K]. 5. wt+1,i ←wt,ie−ηeℓt,i for all i ∈[K]. In this section, we propose a variant of the EXP3 algorithm of Auer et al. [5] that uses the IX loss estimates (3): EXP3-IX. The algorithm in its most general form uses two nonincreasing sequences of nonnegative parameters: (ηt) and (γt). In every round, EXP3-IX chooses action It = i with probability proportional to pt,i ∝wt,i = exp −ηt t−1 X s=1 eℓs,i ! , (4) without mixing any explicit exploration term into the distribution. A fixed-parameter version of EXP3-IX is presented as Algorithm 1. Our theorem below states a high-probability bound on the regret of EXP3-IX. Notably, our bound exhibits the best known constant factor of 2 √ 2 in the leading term, improving on the factor of 5.15 due to Bubeck and Cesa-Bianchi [9]. The best known leading constant for the pseudo-regret bound of EXP3 is √ 2, also proved in Bubeck and Cesa-Bianchi [9]. Theorem 1. Fix an arbitrary δ > 0. With ηt = 2γt = q 2 log K KT for all t, EXP3-IX guarantees RT ≤2 p 2KT log K + s 2KT log K + 1 ! log (2/δ) with probability at least 1−δ. Furthermore, setting ηt = 2γt = q log K Kt for all t, the bound becomes RT ≤4 p KT log K + 2 s KT log K + 1 ! log (2/δ) . Proof. Let us fix an arbitrary δ′ ∈(0, 1). Following the standard analysis of EXP3 in the loss game and nonincreasing learning rates [9], we can obtain the bound T X t=1 K X i=1 pt,ieℓt,i −eℓt,j ! ≤log K ηT + T X t=1 ηt 2 K X i=1 pt,i eℓt,i 2 for any j. Now observe that K X i=1 pt,ieℓt,i = K X i=1 I{It=i} ℓt,i (pt,i + γt) pt,i + γt −γt K X i=1 I{It=i} ℓt,i pt,i + γtℓt,i = ℓt,It −γt K X i=1 eℓt,i. (5) Similarly, PK i=1 pt,ieℓ2 t,i ≤PK i=1 eℓt,i holds by the boundedness of the losses. Thus, we get that T X t=1 (ℓt,It −ℓt,j) ≤ T X t=1 ℓt,j −eℓt,j + log K ηT + T X t=1 ηt 2 + γt K X i=1 eℓt,i ≤log (K/δ′) 2γ + log K η + T X t=1 ηt 2 + γt K X i=1 ℓt,i + log (1/δ′) 5 holds with probability at least 1 −2δ′, where the last line follows from an application of Lemma 1 with αt,i = ηt/2 + γt for all t, i and taking the union bound. By taking j = arg mini LT,i and δ′ = δ/2, and using the boundedness of the losses, we obtain RT ≤log (2K/δ) 2γT + log K ηT + K T X t=1 ηt 2 + γt + log (2/δ) . The statements of the theorem then follow immediately, noting that PT t=1 1/ √ t ≤2 √ T. 3.2 Bandits with expert advice We now turn to the setting of multi-armed bandits with expert advice, as defined in Auer et al. [5], and later revisited by McMahan and Streeter [22] and Beygelzimer et al. [7]. In this setting, we assume that in every round t = 1, 2, . . . , T, the learner observes a set of N probability distributions ξt(1), ξt(2), . . . , ξt(N) ∈[0, 1]K over the K arms, such that PK i=1 ξt,i(n) = 1 for all n ∈[N]. We assume that the sequences (ξt(n)) are measurable with respect to (Ft). The nthof these vectors represent the probabilistic advice of the corresponding nth expert. The goal of the learner in this setting is to pick a sequence of arms so as to minimize the regret against the best expert: Rξ T = T X t=1 ℓt,It −min n∈[N] T X t=1 K X i=1 ξt,i(n)ℓt,i →min . To tackle this problem, we propose a modification of the EXP4 algorithm of Auer et al. [5] that uses the IX loss estimates (3), and also drops the explicit exploration component of the original algorithm. Specifically, EXP4-IX uses the loss estimates defined in Equation (3) to compute the weights wt,n = exp −η t−1 X s=1 K X i=1 ξs,i(n)eℓs,i ! for every expert n ∈[N], and then draw arm i with probability pt,i ∝PN n=1 wt,nξt,i(n). We now state the performance guarantee of EXP4-IX. Our bound improves the best known leading constant of 6 due to Beygelzimer et al. [7] to 2 √ 2 and is a factor of 2 worse than the best known constant in the pseudo-regret bound for EXP4 [9]. The proof of the theorem is presented in the Appendix. Theorem 2. Fix an arbitrary δ > 0 and set η = 2γ = q 2 log N KT for all t. Then, with probability at least 1 −δ, the regret of EXP4-IX satisfies Rξ T ≤2 p 2KT log N + s 2KT log N + 1 ! log (2/δ) . 3.3 Tracking the best sequence of arms In this section, we consider the problem of competing with sequences of actions. Similarly to Herbster and Warmuth [17], we consider the class of sequences that switch at most S times between actions. We measure the performance of the learner in this setting in terms of the regret against the best sequence from this class C(S) ⊆[K]T , defined as RS T = T X t=1 ℓt,It − min (Jt)∈C(S) T X t=1 ℓt,Jt. Similarly to Auer et al. [5], we now propose to adapt the Fixed Share algorithm of Herbster and Warmuth [17] to our setting. Our algorithm, called EXP3-SIX, updates a set of weights wt,· over the arms in a recursive fashion. In the first round, EXP3-SIX sets w1,i = 1/K for all i. In the following rounds, the weights are updated for every arm i as wt+1,i = (1 −α)wt,i · e−ηeℓt,i + α K K X j=1 wt,j · e−ηeℓt,j. 6 In round t, the algorithm draws arm It = i with probability pt,i ∝wt,i. Below, we give the performance guarantees of EXP3-SIX. Note that our leading factor of 2 √ 2 again improves over the best previously known leading factor of 7, shown by Audibert and Bubeck [3]. The proof of the theorem is given in the Appendix. Theorem 3. Fix an arbitrary δ > 0 and set η = 2γ = q 2 ¯S log K KT and α = S T −1, where ¯S = S + 1. Then, with probability at least 1 −δ, the regret of EXP3-SIX satisfies RS T ≤2 s 2KT ¯S log eKT S + s 2KT ¯S log K + 1 ! log (2/δ) . 3.4 Bandits with side-observations Let us now turn to the problem of online learning in bandit problems in the presence of side observations, as defined by Mannor and Shamir [21] and later elaborated by Alon et al. [1]. In this setting, the learner and the environment interact exactly as in the multi-armed bandit problem, the main difference being that in every round, the learner observes the losses of some arms other than its actually chosen arm It. The structure of the side observations is described by the directed graph G: nodes of G correspond to individual arms, and the presence of arc i →j implies that the learner will observe ℓt,j upon selecting It = i. Implicit exploration and EXP3-IX was first proposed by Koc´ak et al. [19] for this precise setting. To describe this variant, let us introduce the notations Ot,i = I{It=i} + I{(It→i)∈G} and ot,i = E [Ot,i| Ft−1]. Then, the IX loss estimates in this setting are defined for all t, i as eℓt,i = Ot,iℓt,i ot,i+γt . With these estimates at hand, EXP3-IX draws arm It from the exponentially weighted distribution defined in Equation (4). The following theorem provides the regret bound concerning this algorithm. Theorem 4. Fix an arbitrary δ > 0. Assume that T ≥K2/(8α) and set η = 2γ = q log K 2αT log(KT ), where α is the independence number of G. With probability at least 1 −δ, EXP3-IX guarantees RT ≤ 4+2 p log (4/δ) · q 2αT log2K+log KT +2 s αT log(KT) log K log (4/δ)+ r T log(4/δ) 2 . The proof of the theorem is given in the Appendix. While the proof of this statement is significantly more involved than the other proofs presented in this paper, it provides a fundamentally new result. In particular, our bound is in terms of the independence number α and thus matches the minimax regret bound proved by Alon et al. [1] for this setting up to logarithmic factors. In contrast, the only high-probability regret bound for this setting due to Alon et al. [2] scales with the size m of the maximal acyclic subgraph of G, which can be much larger than α in general (i.e., m may be o(α) for some graphs [1]). 4 Empirical evaluation We conduct a simple experiment to demonstrate the robustness of EXP3-IX as compared to EXP3 and its superior performance as compared to EXP3.P. Our setting is a 10-arm bandit problem where all losses are independent draws of Bernoulli random variables. The mean losses of arms 1 through 8 are 1/2 and the mean loss of arm 9 is 1/2 −∆for all rounds t = 1, 2, . . . , T. The mean losses of arm 10 are changing over time: for rounds t ≤T/2, the mean is 1/2+∆, and 1/2−4∆afterwards. This choice ensures that up to at least round T/2, arm 9 is clearly better than other arms. In the second half of the game, arm 10 starts to outperform arm 9 and eventually becomes the leader. We have evaluated the performance of EXP3, EXP3.P and EXP3-IX in the above setting with T = 106 and ∆= 0.1. For fairness of comparison, we evaluate all three algorithms for a wide range of parameters. In particular, for all three algorithms, we set a base learning rate η according to the best known theoretical results [9, Theorems 3.1 and 3.3] and varied the multiplier of the respective base parameters between 0.01 and 100. Other parameters are set as γ = η/2 for EXP3-IX and β = γ/K = η for EXP3.P. We studied the regret up to two interesting rounds in the game: up to T/2, where the losses are i.i.d., and up to T where the algorithms have to notice the shift in the 7 10 −2 10 −1 10 0 10 1 10 2 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10 4 η multiplier regret at T/2 EXP3 EXP3.P EXP3−IX 10 −2 10 −1 10 0 10 1 10 2 −1.5 −1 −0.5 0 0.5 1 1.5 x 10 5 η multiplier regret at T EXP3 EXP3.P EXP3−IX Figure 1: Regret of EXP3, EXP3.P, and EXP3-IX, respectively in the problem described in Section 4. loss distributions. Figure 1 shows the empirical means and standard deviations over 50 runs of the regrets of the three algorithms as a function of the multipliers. The results clearly show that EXP3IX largely improves on the empirical performance of EXP3.P and is also much more robust in the non-stochastic regime than vanilla EXP3. 5 Discussion In this paper, we have shown that, contrary to popular belief, explicit exploration is not necessary to achieve high-probability regret bounds for non-stochastic bandit problems. Interestingly, however, we have observed in several of our experiments that our IX-based algorithms still draw every arm roughly √ T times, even though this is not explicitly enforced by the algorithm. This suggests a need for a more complete study of the role of exploration, to find out whether pulling every single arm Ω( √ T) times is necessary for achieving near-optimal guarantees. One can argue that tuning the IX parameter that we introduce may actually be just as difficult in practice as tuning the parameters of EXP3.P. However, every aspect of our analysis suggests that γt = ηt/2 is the most natural choice for these parameters, and thus this is the choice that we recommend. One limitation of our current analysis is that it only permits deterministic learning-rate and IX parameters (see the conditions of Lemma 1). That is, proving adaptive regret bounds in the vein of [15, 24, 23] that hold with high probability is still an open challenge. Another interesting direction for future work is whether the implicit exploration approach can help in advancing the state of the art in the more general setting of linear bandits. All known algorithms for this setting rely on explicit exploration techniques, and the strength of the obtained results depend crucially on the choice of the exploration distribution (see [8, 16] for recent advances). Interestingly, IX has a natural extension to the linear bandit problem. To see this, consider the vector Vt = eIt and the matrix Pt = E [VtV T t ]. Then, the IX loss estimates can be written as eℓt = (Pt + γI)−1VtV T t ℓt. Whether or not this estimate is the right choice for linear bandits remains to be seen. Finally, we note that our estimates (3) are certainly not the only ones that allow avoiding explicit exploration. In fact, the careful reader might deduce from the proof of Lemma 1 that the same concentration can be shown to hold for the alternative loss estimates ℓt,iI{It=i}/ (pt,i + γℓt,i) and log 1 + 2γℓt,iI{It=i}/pt,i /(2γ). Actually, a variant of the latter estimate was used previously for proving high-probability regret bounds in the reward game by Audibert and Bubeck [4]—however, their proof still relied on explicit exploration. It is not hard to verify that all the results we presented in this paper (except Theorem 4) can be shown to hold for the above two estimates, too. Acknowledgments This work was supported by INRIA, the French Ministry of Higher Education and Research, and by FUI project Herm`es. The author wishes to thank Haipeng Luo for catching a bug in an earlier version of the paper, and the anonymous reviewers for their helpful suggestions. 8 References [1] N. Alon, N. Cesa-Bianchi, C. Gentile, and Y. Mansour. From Bandits to Experts: A Tale of Domination and Independence. In NIPS-25, pages 1610–1618, 2012. [2] N. Alon, N. Cesa-Bianchi, C. Gentile, S. Mannor, Y. Mansour, and O. Shamir. Nonstochastic multi-armed bandits with graph-structured feedback. arXiv preprint arXiv:1409.8428, 2014. [3] J.-Y. Audibert and S. Bubeck. Minimax policies for adversarial and stochastic bandits. In Proceedings of the 22nd Annual Conference on Learning Theory (COLT), 2009. [4] J.-Y. Audibert and S. Bubeck. Regret bounds and minimax policies under partial monitoring. Journal of Machine Learning Research, 11:2785–2836, 2010. [5] P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM J. Comput., 32(1):48–77, 2002. ISSN 0097-5397. [6] P. L. Bartlett, V. Dani, T. P. Hayes, S. Kakade, A. Rakhlin, and A. Tewari. High-probability regret bounds for bandit online linear optimization. In COLT, pages 335–342, 2008. [7] A. Beygelzimer, J. Langford, L. Li, L. Reyzin, and R. E. Schapire. Contextual bandit algorithms with supervised learning guarantees. In AISTATS 2011, pages 19–26, 2011. [8] S. Bubeck, N. Cesa-Bianchi, and S. M. Kakade. Towards minimax policies for online linear optimization with bandit feedback. 2012. [9] S. Bubeck and N. Cesa-Bianchi. Regret Analysis of Stochastic and Nonstochastic Multi-armed Bandit Problems. Now Publishers Inc, 2012. [10] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [11] N. Cesa-Bianchi, P. Gaillard, G. Lugosi, and G. Stoltz. Mirror descent meets fixed share (and feels no regret). In NIPS-25, pages 989–997. 2012. [12] D. A. Freedman. On tail probabilities for martingales. The Annals of Probability, 3:100–118, 1975. [13] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55:119–139, 1997. [14] J. Hannan. Approximation to Bayes risk in repeated play. Contributions to the theory of games, 3:97–139, 1957. [15] E. Hazan and S. Kale. Better algorithms for benign bandits. The Journal of Machine Learning Research, 12:1287–1311, 2011. [16] E. Hazan, Z. Karnin, and R. Meka. Volumetric spanners: an efficient exploration basis for learning. In COLT, pages 408–422, 2014. [17] M. Herbster and M. Warmuth. Tracking the best expert. Machine Learning, 32:151–178, 1998. [18] A. Kalai and S. Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71:291–307, 2005. [19] T. Koc´ak, G. Neu, M. Valko, and R. Munos. Efficient learning by implicit exploration in bandit problems with side observations. In NIPS-27, pages 613–621, 2014. [20] N. Littlestone and M. Warmuth. The weighted majority algorithm. Information and Computation, 108: 212–261, 1994. [21] S. Mannor and O. Shamir. From Bandits to Experts: On the Value of Side-Observations. In Neural Information Processing Systems, 2011. [22] H. B. McMahan and M. Streeter. Tighter bounds for multi-armed bandits with expert advice. In COLT, 2009. [23] G. Neu. First-order regret bounds for combinatorial semi-bandits. In COLT, pages 1360–1375, 2015. [24] A. Rakhlin and K. Sridharan. Online learning with predictable sequences. In COLT, pages 993–1019, 2013. [25] Y. Seldin, N. Cesa-Bianchi, P. Auer, F. Laviolette, and J. Shawe-Taylor. PAC-Bayes-Bernstein inequality for martingales and its application to multiarmed bandits. In Proceedings of the Workshop on On-line Trading of Exploration and Exploitation 2, 2012. [26] V. Vovk. Aggregating strategies. In Proceedings of the third annual workshop on Computational learning theory (COLT), pages 371–386, 1990. 9 | 2015 | 359 |
5,879 | High Dimensional EM Algorithm: Statistical Optimization and Asymptotic Normality⇤ Zhaoran Wang Princeton University Quanquan Gu University of Virginia Yang Ning Princeton University Han Liu Princeton University Abstract We provide a general theory of the expectation-maximization (EM) algorithm for inferring high dimensional latent variable models. In particular, we make two contributions: (i) For parameter estimation, we propose a novel high dimensional EM algorithm which naturally incorporates sparsity structure into parameter estimation. With an appropriate initialization, this algorithm converges at a geometric rate and attains an estimator with the (near-)optimal statistical rate of convergence. (ii) Based on the obtained estimator, we propose a new inferential procedure for testing hypotheses for low dimensional components of high dimensional parameters. For a broad family of statistical models, our framework establishes the first computationally feasible approach for optimal estimation and asymptotic inference in high dimensions. 1 Introduction The expectation-maximization (EM) algorithm [12] is the most popular approach for calculating the maximum likelihood estimator of latent variable models. Nevertheless, due to the nonconcavity of the likelihood function of latent variable models, the EM algorithm generally only converges to a local maximum rather than the global one [30]. On the other hand, existing statistical guarantees for latent variable models are only established for global optima [3]. Therefore, there exists a gap between computation and statistics. Significant progress has been made toward closing the gap between the local maximum attained by the EM algorithm and the maximum likelihood estimator [2, 18, 25, 30]. In particular, [30] first establish general sufficient conditions for the convergence of the EM algorithm. [25] further improve this result by viewing the EM algorithm as a proximal point method applied to the Kullback-Leibler divergence. See [18] for a detailed survey. More recently, [2] establish the first result that characterizes explicit statistical and computational rates of convergence for the EM algorithm. They prove that, given a suitable initialization, the EM algorithm converges at a geometric rate to a local maximum close to the maximum likelihood estimator. All these results are established in the low dimensional regime where the dimension d is much smaller than the sample size n. In high dimensional regimes where the dimension d is much larger than the sample size n, there exists no theoretical guarantee for the EM algorithm. In fact, when d ≫n, the maximum likelihood estimator is in general not well defined, unless the models are carefully regularized by sparsity-type assumptions. Furthermore, even if a regularized maximum likelihood estimator can be obtained in a computationally tractable manner, establishing the corresponding statistical properties, especially asymptotic normality, can still be challenging because of the existence of high dimensional nuisance parameters. To address such a challenge, we develop a general inferential theory of the EM algorithm for parameter estimation and uncertainty assessment of high dimensional latent variable models. In particular, we make two contributions in this paper: • For high dimensional parameter estimation, we propose a novel high dimensional EM algorithm by attaching a truncation step to the expectation step (E-step) and maximization step (M-step). Such a ⇤Research supported by NSF IIS1116730, NSF IIS1332109, NSF IIS1408910, NSF IIS1546482-BIGDATA, NSF DMS1454377-CAREER, NIH R01GM083084, NIH R01HG06841, NIH R01MH102339, and FDA HHSF223201000072C. 1 truncation step effectively enforces the sparsity of the attained estimator and allows us to establish significantly improved statistical rate of convergence. • Based upon the estimator attained by the high dimensional EM algorithm, we propose a decorrelated score statistic for testing hypotheses related to low dimensional components of the high dimensional parameter. Under a unified analytic framework, we establish simultaneous statistical and computational guarantees for the proposed high dimensional EM algorithm and the respective uncertainty assessment procedure. Let β⇤2 Rd be the true parameter, s⇤be its sparsity level and ! β(t) T t=0 be the iterative solution sequence of the high dimensional EM algorithm with T being the total number of iterations. In particular, we prove that: • Given an appropriate initialization βinit with relative error upper bounded by a constant 2 (0, 1), i.e., ##βinit −β⇤## 2/kβ⇤k2 , the iterative solution sequence ! β(t) T t=0 satisfies ##β(t) −β⇤## 2 ∆1 · ⇢t/2 | {z } Optimization Error + ∆2 · p s⇤· log d/n | {z } Statistical Error: Optimal Rate (1.1) with high probability. Here ⇢2 (0, 1), and ∆1, ∆2 are quantities that possibly depend on ⇢, and β⇤. As the optimization error term in (1.1) decreases to zero at a geometric rate with respect to t, the overall estimation error achieves the p s⇤· log d/n statistical rate of convergence (up to an extra factor of log n), which is (near-)minimax-optimal. See Theorem 3.4 for details. • The proposed decorrelated score statistic is asymptotically normal. Moreover, its limiting variance is optimal in the sense that it attains the semiparametric information bound for the low dimensional components of interest in the presence of high dimensional nuisance parameters. See Theorem 4.6 for details. Our framework allows two implementations of the M-step: the exact maximization versus approximate maximization. The former one calculates the maximizer exactly, while the latter one conducts an approximate maximization through a gradient ascent step. Our framework is quite general. We illustrate its effectiveness by applying it to two high dimensional latent variable models, that is, Gaussian mixture model and mixture of regression model. Comparison with Related Work: A closely related work is by [2], which considers the low dimensional regime where d is much smaller than n. Under certain initialization conditions, they prove that the EM algorithm converges at a geometric rate to some local optimum that attains the p d/n statistical rate of convergence. They cover both maximization and gradient ascent implementations of the M-step, and establish the consequences for the two latent variable models considered in our paper under low dimensional settings. Our framework adopts their view of treating the EM algorithm as a perturbed version of gradient methods. However, to handle the challenge of high dimensionality, the key ingredient of our framework is the truncation step that enforces the sparsity structure along the solution path. Such a truncation operation poses significant challenges for both computational and statistical analysis. In detail, for computational analysis we need to carefully characterize the evolution of each intermediate solution’s support and its effects on the evolution of the entire iterative solution sequence. For statistical analysis, we need to establish a fine-grained characterization of the entrywise statistical error, which is technically more challenging than just establishing the `2-norm error employed by [2]. In high dimensional regimes, we need to establish the p s⇤· log d/n statistical rate of convergence, which is much sharper than their p d/n rate when d ≫n. In addition to point estimation, we further construct hypothesis tests for latent variable models in the high dimensional regime, which have not been established before. High dimensionality poses significant challenges for assessing the uncertainty (e.g., testing hypotheses) of the constructed estimators. For example, [15] show that the limiting distribution of the Lasso estimator is not Gaussian even in the low dimensional regime. A variety of approaches have been proposed to correct the Lasso estimator to attain asymptotic normality, including the debiasing method [13], the desparsification methods [26, 32] as well as instrumental variable-based methods [4]. Meanwhile, [16, 17, 24] propose the post-selection procedures for exact inference. In addition, several authors propose methods based on data splitting [20, 29], stability selection [19] and `2-confidence sets [22]. However, these approaches mainly focus on generalized linear models rather than latent variable models. In addition, their results heavily rely on the fact that the estimator is a global optimum of a convex program. In comparison, our approach applies to a much broader family of statistical models with latent structures. For these latent variable models, it is computationally infeasible to 2 obtain the global maximum of the penalized likelihood due to the nonconcavity of the likelihood function. Unlike existing approaches, our inferential theory is developed for the estimator attained by the proposed high dimensional EM algorithm, which is not necessarily a global optimum to any optimization formulation. Another line of research for the estimation of latent variable models is the tensor method, which exploits the structures of third or higher order moments. See [1] and the references therein. However, existing tensor methods primarily focus on the low dimensional regime where d ⌧n. In addition, since the high order sample moments generally have a slow statistical rate of convergence, the estimators obtained by the tensor methods usually have a suboptimal statistical rate even for d ⌧n. For example, [9] establish the p d6/n statistical rate of convergence for mixture of regression model, which is suboptimal compared with the p d/n minimax lower bound. Similarly, in high dimensional settings, the statistical rates of convergence attained by tensor methods are significantly slower than the statistical rate obtained in this paper. The latent variable models considered in this paper have been well studied. Nevertheless, only a few works establish theoretical guarantees for the EM algorithm. In particular, for Gaussian mixture model, [10, 11] establish parameter estimation guarantees for the EM algorithm and its extensions. For mixture of regression model, [31] establish exact parameter recovery guarantees for the EM algorithm under a noiseless setting. For high dimensional mixture of regression model, [23] analyze the gradient EM algorithm for the `1-penalized log-likelihood. They establish support recovery guarantees for the attained local optimum but have no parameter estimation guarantees. In comparison with existing works, this paper establishes a general inferential framework for simultaneous parameter estimation and uncertainty assessment based on a novel high dimensional EM algorithm. Our analysis provides the first theoretical guarantee of parameter estimation and asymptotic inference in high dimensional regimes for the EM algorithm and its applications to a broad family of latent variable models. Notation: The matrix (p, q)-norm, i.e., k · kp,q, is obtained by taking the `p-norm of each row and then taking the `q-norm of the obtained row norms. We use C, C0, . . . to denote generic constants. Their values may vary from line to line. We will introduce more notations in §2.2. 2 Methodology We first introduce the high dimensional EM Algorithm and then the respective inferential procedure. As examples, we consider their applications to Gaussian mixture model and mixture of regression model. For compactness, we defer the details to §A of the appendix. More models are included in the longer version of this paper. Algorithm 1 High Dimensional EM Algorithm 1: Parameter: Sparsity Parameter bs, Maximum Number of Iterations T 2: Initialization: bSinit supp " βinit, bs # , β(0) trunc " βinit, bSinit# $ supp(·, ·) and trunc(·, ·) are defined in (2.2) and (2.3) 3: For t = 0 to T −1 4: E-step: Evaluate Qn " β; β(t)# 5: M-step: β(t+0.5) Mn " β(t)# $ Mn(·) is implemented as in Algorithm 2 or 3 6: T-step: bS(t+0.5) supp " β(t+0.5), bs # , β(t+1) trunc " β(t+0.5), bS(t+0.5)# 7: End For 8: Output: bβ β(T ) Algorithm 2 Maximization Implementation of the M-step 1: Input: β(t), Qn " β; β(t)# Output: Mn " β(t)# argmaxβ Qn " β; β(t)# Algorithm 3 Gradient Ascent Implementation of the M-step 1: Input: β(t), Qn " β; β(t)# Parameter: Stepsize ⌘> 0 2: Output: Mn " β(t)# β(t) + ⌘· rQn " β(t); β(t)# 2.1 High Dimensional EM Algorithm Before we introduce the proposed high dimensional EM Algorithm (Algorithm 1), we briefly review the classical EM algorithm. Let hβ(y) be the probability density function of Y 2 Y, where β 2 Rd is the model parameter. For latent variable models, we assume that hβ(y) is obtained by marginalizing over an unobserved latent variable Z 2 Z, i.e., hβ(y) = R Z fβ(y, z) dz. Let kβ(z | y) be the density 3 of Z conditioning on the observed variable Y = y, i.e., kβ(z | y) = fβ(y, z)/hβ(y). We define Qn(β; β0) = 1 n n X i=1 Z Z kβ0(z | yi) · log fβ(yi, z) dz. (2.1) See §B of the appendix for a detailed derivation. At the t-th iteration of the classical EM algorithm, we evaluate Qn , β; β(t)at the E-step and then perform maxβ Qn , β; β(t)at the M-step. The proposed high dimensional EM algorithm (Algorithm 1) is built upon the E-step and M-step (lines 4 and 5) of the classical EM algorithm. In addition to the exact maximization implementation of the M-step (Algorithm 2), we allow the gradient ascent implementation of the M-step (Algorithm 3), which performs an approximate maximization via a gradient ascent step. To handle the challenge of high dimensionality, in line 6 of Algorithm 1 we perform a truncation step (T-step) to enforce the sparsity structure. In detail, we define supp(β, s): The set of index j’s corresponding to the top s largest |βj|’s. (2.2) Also, for an index set S ✓{1, . . . , d}, we define the trunc(·, ·) function in line 6 as ⇥ trunc(β, S) ⇤ j = βj · 1{j 2 S}. (2.3) Note that β(t+0.5) is the output of the M-step (line 5) at the t-th iteration of the high dimensional EM algorithm. To obtain β(t+1), the T-step (line 6) preserves the entries of β(t+0.5) with the top bs large magnitudes and sets the rest to zero. Here bs is a tuning parameter that controls the sparsity level (line 1). By iteratively performing the E-step, M-step and T-step, the high dimensional EM algorithm attains an bs-sparse estimator bβ = β(T ) (line 8). Here T is the total number of iterations. 2.2 Asymptotic Inference Notation: Let r1Q(β; β0) be the gradient with respect to β and r2Q(β; β0) be the gradient with respect to β0. If there is no confusion, we simply denote rQ(β; β0) = r1Q(β; β0) as in the previous sections. We define the higher order derivatives in the same manner, e.g., r2 1,2Q(β; β0) is calculated by first taking derivative with respect to β and then with respect to β0. For β = , β> 1 , β> 2 -> 2 Rd with β1 2 Rd1, β2 2 Rd2 and d1 + d2 = d, we use notations such as vβ1 2 Rd1 and Aβ1,β2 2 Rd1⇥d2 to denote the corresponding subvector of v 2 Rd and the submatrix of A 2 Rd⇥d. We aim to conduct asymptotic inference for low dimensional components of the high dimensional parameter β⇤. Without loss of generality, we consider a single entry of β⇤. In particular, we assume β⇤= ⇥ ↵⇤, (γ⇤)>⇤>, where ↵⇤2 R is the entry of interest, while γ⇤2 Rd−1 is treated as the nuisance parameter. In the following, we construct a high dimensional score test named decorrelated score test. It is worth noting that, our method and theory can be easily generalized to perform statistical inference for an arbitrary low dimensional subvector of β⇤. Decorrelated Score Test: For score test, we are primarily interested in testing H0 : ↵⇤= 0, since this null hypothesis characterizes the uncertainty in variable selection. Our method easily generalizes to H0 : ↵⇤= ↵0 with ↵0 6= 0. For notational simplicity, we define the following key quantity Tn(β) = r2 1,1Qn(β; β) + r2 1,2Qn(β; β) 2 Rd⇥d. (2.4) Let β = , ↵, γ>->. We define the decorrelated score function Sn(·, ·) 2 R as Sn(β, λ) = ⇥ r1Qn(β; β) ⇤ ↵−w(β, λ)> · ⇥ r1Qn(β; β) ⇤ γ. (2.5) Here w(β, λ) 2 Rd−1 is obtained using the following Dantzig selector [8] w(β, λ) = argmin w2Rd−1 kwk1, subject to ##⇥ Tn(β) ⇤ γ,↵− ⇥ Tn(β) ⇤ γ,γ · w ## 1 λ, (2.6) where λ > 0 is a tuning parameter. Let bβ = , b↵, bγ>->, where bβ is the estimator attained by the high dimensional EM algorithm (Algorithm 1). We define the decorrelated score statistic as pn · Sn , bβ0, λ -1! − ⇥ Tn , bβ0 -⇤ ↵|γ 1/2, (2.7) where bβ0 = , 0, bγ>->, and ⇥ Tn , bβ0 -⇤ ↵|γ = ⇥ 1, −w , bβ0, λ ->⇤ · Tn , bβ0 · ⇥ 1, −w , bβ0, λ ->⇤>. Here we use bβ0 instead of bβ since we are interested in the null hypothesis H0 : ↵⇤= 0. We can also replace bβ0 with bβ and the theoretical results will remain the same. In §4 we will prove the proposed decorrelated score statistic in (2.7) is asymptotically N(0, 1). Consequently, the decorrelated score 4 test with significance level δ 2 (0, 1) takes the form S(δ) = 1 !pn · Sn , bβ0, λ -1! − ⇥ Tn , bβ0 -⇤ ↵|γ 1/2 /2 ⇥ −Φ−1(1 −δ/2), Φ−1(1 −δ/2) ⇤ , where Φ−1(·) is the inverse function of the Gaussian cumulative distribution function. If S(δ) = 1, we reject the null hypothesis H0 : ↵⇤= 0. The intuition of this decorrelated score test is explained in §D of the appendix. The key theoretical observation is Theorem 2.1, which connects r1Qn(·; ·) in (2.5) and Tn(·) in (2.7) with the score function and Fisher information in the presence of latent structures. Let `n(β) be the log-likelihood. Its score function is r`n(β) and the Fisher information is I(β⇤) = −Eβ⇤⇥ r2`n(β⇤) ⇤1 n, where Eβ⇤(·) is the expectation under the model with parameter β⇤. Theorem 2.1. For the true parameter β⇤and any β 2 Rd, it holds that r1Qn(β; β) = r`n(β)/n, and Eβ⇤⇥ Tn(β⇤) ⇤ = −I(β⇤) = Eβ⇤⇥ r2`n(β⇤) ⇤1 n. (2.8) Proof. See §I.1 of the appendix for a detailed proof. Based on the decorrelated score test, it is easy to establish the decorrelated Wald test, which allows us to construct confidence intervals. For compactness we defer it to the longer version of this paper. 3 Theory of Computation and Estimation Before we present the main results, we introduce three technical conditions, which will significantly ease our presentation. They will be verified for specific latent variable models in §E of the appendix. The first two conditions, proposed by [2], characterize the properties of the population version lower bound function Q(·; ·), i.e., the expectation of Qn(·; ·) defined in (2.1). We define the respective population version M-step as follows. For the M-step in Algorithm 2, we define M(β) = argmax β0 Q(β0; β). (3.1) For the M-step in Algorithm 3, we define M(β) = β + ⌘· r1Q(β; β), (3.2) where ⌘> 0 is the stepsize in Algorithm 3. We use B to denote the basin of attraction, i.e., the local region where the high dimensional EM algorithm enjoys desired guarantees. Condition 3.1. We define two versions of this condition. • Lipschitz-Gradient-1(γ1, B). For the true parameter β⇤and any β 2 B, we have ##r1Q ⇥ M(β); β⇤⇤ −r1Q ⇥ M(β); β ⇤## 2 γ1 · kβ −β⇤k2, (3.3) where M(·) is the population version M-step (maximization implementation) defined in (3.1). • Lipschitz-Gradient-2(γ2, B). For the true parameter β⇤and any β 2 B, we have ##r1Q(β; β⇤) −r1Q(β; β) ## 2 γ2 · kβ −β⇤k2. (3.4) Condition 3.1 defines a variant of Lipschitz continuity for r1Q(·; ·). In the sequel, we will use (3.3) and (3.4) in the analysis of the two implementations of the M-step respectively. Condition 3.2 Concavity-Smoothness(µ, ⌫, B). For any β1, β2 2 B, Q(·; β⇤) is µ-smooth, i.e., Q(β1; β⇤) ≥Q(β2; β⇤) + (β1 −β2)> · r1Q(β2; β⇤) −µ/2 · kβ2 −β1k2 2, (3.5) and ⌫-strongly concave, i.e., Q(β1; β⇤) Q(β2; β⇤) + (β1 −β2)> · r1Q(β2; β⇤) −⌫/2 · kβ2 −β1k2 2. (3.6) This condition indicates that, when the second variable of Q(·; ·) is fixed to be β⇤, the function is ‘sandwiched’ between two quadratic functions. The third condition characterizes the statistical error between the sample version and population version M-steps, i.e., Mn(·) defined in Algorithms 2 and 3, and M(·) in (3.1) and (3.2). Recall k · k0 denotes the total number of nonzero entries in a vector. Condition 3.3 Statistical-Error(✏, δ, s, n, B). For any fixed β 2 B with kβk0 s, we have that ##M(β) −Mn(β) ## 1 ✏ (3.7) holds with probability at least 1 −δ. Here ✏> 0 possibly depends on δ, sparsity level s, sample size n, dimension d, as well as the basin of attraction B. In (3.7) the statistical error ✏quantifies the `1-norm of the difference between the population version and sample version M-steps. Particularly, we constrain the input β of M(·) and Mn(·) to be s-sparse. Such a condition is different from the one used by [2]. In detail, they quantify the statistical error 5 with the `2-norm and do not constrain the input of M(·) and Mn(·) to be sparse. Consequently, our subsequent statistical analysis is different from theirs. The reason we use the `1-norm is that, it characterizes the more refined entrywise statistical error, which converges at a fast rate of p log d/n (possibly with extra factors depending on specific models). In comparison, the `2-norm statistical error converges at a slow rate of p d/n, which does not decrease to zero as n increases with d ≫n. Furthermore, the fine-grained entrywise statistical error is crucial to our key proof for quantifying the effects of the truncation step (line 6 of Algorithm 1) on the iterative solution sequence. 3.1 Main Results To simplify the technical analysis of the high dimensional EM algorithm, we focus on its resampling version, which is illustrated in Algorithm 4 in §C of the appendix. Theorem 3.4. We define B = ! β : kβ −β⇤k2 R , where R = · kβ⇤k2 for some 2 (0, 1). We assume Condition Concavity-Smoothness(µ, ⌫, B) holds and ##βinit −β⇤## 2 R/2. • For the maximization implementation of the M-step (Algorithm 2), we suppose that Condition Lipschitz-Gradient-1(γ1, B) holds with ⇢1 := γ1/⌫2 (0, 1) and bs = ⌃ C · max ! 16/(1/⇢1 −1)2, 4 · (1 + )2/(1 −)2 · s⇤⌥ , (3.8) ,p bs + C0/ p 1 −· p s⇤· ✏min ! (1 −p⇢1)2 · R, (1 −)2/[2 · (1 + )] · kβ⇤k2 . (3.9) Here C ≥1 and C0 > 0 are constants. Under Condition Statistical-Error(✏, δ/T, bs, n/T, B) we have that, for t = 1, . . . , T, ##β(t) −β⇤## 2 ⇢t/2 1 · R | {z } Optimization Error + ,p bs + C0/ p 1 −· p s⇤/(1 −p⇢1) · ✏ | {z } Statistical Error (3.10) holds with probability at least 1 −δ, where C0 is the same constant as in (3.9). • For the gradient ascent implementation of the M-step (Algorithm 3), we suppose that Condition Lipschitz-Gradient-2(γ2, B) holds with ⇢2 := 1 −2 · (⌫−γ2)/(⌫+ µ) 2 (0, 1) and the stepsize in Algorithm 3 is set to ⌘= 2/(⌫+ µ). Meanwhile, we assume (3.8) and (3.9) hold with ⇢1 replaced by ⇢2. Under Condition Statistical-Error(✏, δ/T, bs, n/T, B) we have that, for t = 1, . . . , T, (3.10) holds with probability at least 1 −δ, in which ⇢1 is replaced with ⇢2. Proof. See §G.1 of the appendix for a detailed proof. The assumption in (3.8) states that the sparsity parameter bs is chosen to be sufficiently large and also of the same order as the true sparsity level s⇤. This assumption ensures that the error incurred by the truncation step can be upper bounded. In addition, as is shown for specific latent variable models in §E of the appendix, the error term ✏in Condition Statistical-Error(✏, δ/T, bs, n/T, B) decreases as sample size n increases. By the assumption in (3.8), ,p bs + C0/p1 −· p s⇤is of the same order as p s⇤. Therefore, the assumption in (3.9) suggests the sample size n is sufficiently large such that p s⇤· ✏is sufficiently small. These assumptions guarantee that the entire iterative solution sequence remains within the basin of attraction B in the presence of statistical error. Theorem 3.4 illustrates that, the upper bound of the overall estimation error can be decomposed into two terms. The first term is the upper bound of optimization error, which decreases to zero at a geometric rate of convergence, because we have ⇢1, ⇢2 < 1. Meanwhile, the second term is the upper bound of statistical error, which does not depend on t. Since ,p bs + C0/p1 −· p s⇤is of the same order as p s⇤, this term is proportional to p s⇤· ✏, where ✏is the entrywise statistical error between M(·) and Mn(·). In §E of the appendix we prove that, for each specific latent variable model, ✏is roughly of the order p log d/n. (There may be extra factors attached to ✏depending on each specific model.) Therefore, the statistical error term is roughly of the order p s⇤· log d/n. Consequently, for a sufficiently large t = T such that the optimization and statistical error terms in (3.10) are of the same order, the final estimator bβ = β(T ) attains a (near-)optimal p s⇤· log d/n (possibly with extra factors) statistical rate. For compactness, we give the following example and defer the details to §E. Implications for Gaussian Mixture Model: We assume y1, . . . , yn are the n i.i.d. realizations of Y = Z · β⇤+ V . Here Z is a Rademacher random variable, i.e., P(Z = +1) = P(Z = −1) = 1/2, and V ⇠N(0, σ2 · Id) is independent of Z, where σ is the standard deviation. Suppose that we have kβ⇤k2/σ ≥r, where r > 0 is a sufficiently large constant that denotes the minimum signal-to-noise ratio. In §E of the appendix we prove that there exists some constant C > 0 such that Conditions 6 Lipschitz-Gradient-1(γ1, B) and Concavity-Smoothness(µ, ⌫, B) hold with γ1 = exp , −C · r2, µ = ⌫= 1, B = ! β : kβ −β⇤k2 R with R = · kβ⇤k2, = 1/4. For a sufficiently large n, we have that Condition Statistical-Error(✏, δ, s, n, B) holds with ✏= C · , kβ⇤k1 + σ · q⇥ log d + log(2/δ) ⇤1 n. Then the first part of Theorem 3.4 implies ## bβ −β⇤## 2 C · p s⇤· log d · log n/n for a sufficiently large T, which is near-optimal with respect to the minimax lower bound p s⇤log d/n. 4 Theory of Inference To simplify the presentation of the unified framework, we lay out several technical conditions, which will be verified for each model. Let ⇣EM, ⇣G, ⇣T and ⇣L be four quantities that scale with s⇤, d and n. These conditions will be verified for specific latent variable models in §F of the appendix. Condition 4.1 Parameter-Estimation , ⇣EM. We have ## bβ −β⇤## 1 = OP , ⇣EM. Condition 4.2 Gradient-Statistical-Error , ⇣G. We have ##r1Qn(β⇤; β⇤) −r1Q(β⇤; β⇤) ## 1 = OP , ⇣G. Condition 4.3 Tn(·)-Concentration , ⇣T. We have ##Tn(β⇤) −Eβ⇤⇥ Tn(β⇤) ⇤## 1,1 = OP , ⇣T. Condition 4.4 Tn(·)-Lipschitz , ⇣L. For any β, we have ##Tn(β) −Tn(β⇤) ## 1,1 = OP , ⇣L· kβ −β⇤k1. In the sequel, we lay out an assumption on several population quantities and the sample size n. Recall that β⇤= [↵⇤, (γ⇤)>]>, where ↵⇤2 R is the entry of interest, while γ⇤2 Rd−1 is the nuisance parameter. By the notations in §2.2, ⇥ I(β⇤) ⇤ γ,γ 2 R(d−1)⇥(d−1) and ⇥ I(β⇤) ⇤ γ,↵2 R(d−1)⇥1 denote the submatrices of the Fisher information matrix I(β⇤) 2 Rd⇥d. We define w⇤, s⇤ w and S⇤ w as w⇤= ⇥ I(β⇤) ⇤−1 γ,γ · ⇥ I(β⇤) ⇤ γ,↵2 Rd−1, s⇤ w = kw⇤k0, and S⇤ w = supp(w⇤). (4.1) We define λ1 ⇥ I(β⇤) ⇤ and λd ⇥ I(β⇤) ⇤ as the largest and smallest eigenvalues of I(β⇤), and ⇥ I(β⇤) ⇤ ↵|γ = ⇥ I(β⇤) ⇤ ↵,↵− ⇥ I(β⇤) ⇤> γ,↵· ⇥ I(β⇤) ⇤−1 γ,γ · ⇥ I(β⇤) ⇤ γ,↵2 R. (4.2) According to (4.1) and (4.2), we can easily verify that ⇥ I(β⇤) ⇤ ↵|γ = ⇥ 1, −(w⇤)>⇤ · I(β⇤) · ⇥ 1, −(w⇤)>⇤>. (4.3) The following assumption ensures that λd ⇥ I(β⇤) ⇤ > 0. Hence, ⇥ I(β⇤) ⇤ γ,γ in (4.1) is invertible. Also, according to (4.3) and the fact that λd ⇥ I(β⇤) ⇤ > 0, we have ⇥ I(β⇤) ⇤ ↵|γ > 0. Assumption 4.5 . We impose the following assumptions. • For positive constants ⇢max and ⇢min, we assume ⇢max ≥λ1 ⇥ I(β⇤) ⇤ ≥λd ⇥ I(β⇤) ⇤ ≥⇢min, ⇥ I(β⇤) ⇤ ↵|γ = O(1), ⇥ I(β⇤) ⇤−1 ↵|γ = O(1). (4.4) • The tuning parameter λ of the Dantzig selector in (2.6) is set to λ = C · , ⇣T + ⇣L · ⇣EM· , 1 + kw⇤k1 , (4.5) where C ≥1 is a sufficiently large constant. The sample size n is sufficiently large such that max ! kw⇤k1, 1 · s⇤ w · λ = o(1), ⇣EM = o(1), s⇤ w · λ · ⇣G = o(1/pn), (4.6) λ · ⇣EM = o(1/pn), max ! 1, kw⇤k1 · ⇣L · , ⇣EM-2 = o(1/pn). The assumption on λd ⇥ I(β⇤) ⇤ guarantees that the Fisher information matrix is positive definite. The other assumptions in (4.4) guarantee the existence of the asymptotic variance of pn · Sn , bβ0, λ in the score statistic defined in (2.7). Similar assumptions are standard in existing asymptotic inference results. For example, for mixture of regression model, [14] impose variants of these assumptions. For specific models, we will show that ⇣EM, ⇣G, ⇣T and λ all decrease with n, while ⇣L increases with n at a slow rate. Therefore, the assumptions in (4.6) ensure that the sample size n is sufficiently large. We will make these assumptions more explicit after we specify ⇣EM, ⇣G, ⇣T and ⇣L for each 7 model. Note the assumptions in (4.6) imply that s⇤ w = kw⇤k0 needs to be small. For instance, for λ specified in (4.5), max ! kw⇤k1, 1 · s⇤ w · λ = o(1) in (4.6) implies s⇤ w · ⇣T = o(1). In the following, we will prove that ⇣T is of the order p log d/n. Hence, we require that s⇤ w = o ,p n/ log d ⌧d−1, i.e., w⇤2 Rd−1 is sparse. Such a sparsity assumption can be understood as follows. According to the definition of w⇤in (4.1), we have ⇥ I(β⇤) ⇤ γ,γ · w⇤= ⇥ I(β⇤) ⇤ γ,↵. Therefore, such a sparsity assumption suggests ⇥ I(β⇤) ⇤ γ,↵lies within the span of a few columns of ⇥ I(β⇤) ⇤ γ,γ. Such a sparsity assumption on w⇤is necessary, because otherwise it is difficult to accurately estimate w⇤in high dimensional regimes. In the context of high dimensional generalized linear models, [26, 32] impose similar sparsity assumptions. 4.1 Main Results Decorrelated Score Test: The next theorem establishes the asymptotic normality of the decorrelated score statistic defined in (2.7). Theorem 4.6. We consider β⇤= ⇥ ↵⇤, (γ⇤)>⇤> with ↵⇤= 0. Under Assumption 4.5 and Conditions 4.1-4.4, we have that for n ! 1, pn · Sn , bβ0, λ -1! − ⇥ Tn , bβ0 -⇤ ↵|γ 1/2 D −! N(0, 1), (4.7) where bβ0 and ⇥ Tn , bβ0 -⇤ ↵|γ 2 R are defined in (2.7). The limiting variance of the decorrelated score function pn · Sn , bβ0, λ is ⇥ I(β⇤) ⇤ ↵|γ, which is defined in (4.2). Proof. See §G.2 of the appendix for a detailed proof. Optimality: [27] prove that for inferring ↵⇤in the presence of nuisance parameter γ⇤, ⇥ I(β⇤) ⇤ ↵|γ is the semiparametric efficient information, i.e., the minimum limiting variance of the (rescaled) score function. Our proposed decorrelated score function achieves such a semiparametric information lower bound and is therefore in this sense optimal. In the following, we use Gaussian mixture model to illustrate the effectiveness of Theorem 4.6. We defer the details and the implications for mixture of regression to §F of the appendix. Implications for Gaussian Mixture Model: Under the same model considered in §3.1, if we assume all quantities except s⇤ w, s⇤, d and n are constant, then we have that Conditions 4.1-4.4 hold with ⇣EM = s⇤p log d · log n/n, ⇣G = p log d/n, ⇣T = p log d/n and ⇣L = , log d + log n -3/2. Thus, under Assumption 4.5, (4.7) holds when n ! 1. Also, we can verify that (4.6) in Assumption 4.5 holds if max ! s⇤ w, s⇤ 2 · (s⇤)2 · (log d)5 = o ⇥ n/(log n)2⇤ . 5 Conclusion We propose a novel high dimensional EM algorithm which naturally incorporates sparsity structure. Our theory shows that, with a suitable initialization, the proposed algorithm converges at a geometric rate and achieves an estimator with the (near-)optimal statistical rate of convergence. Beyond point estimation, we further propose the decorrelated score and Wald statistics for testing hypotheses and constructing confidence intervals for low dimensional components of high dimensional parameters. We apply the proposed algorithmic framework to a broad family of high dimensional latent variable models. For these models, our framework establishes the first computationally feasible approach for optimal parameter estimation and asymptotic inference under high dimensional settings. References [1] A N A N D K U M A R, A., G E, R., H S U, D., K A K A D E, S. M. and T E L G A R S K Y, M. (2014). Tensor decompositions for learning latent variable models. Journal of Machine Learning Research 15 2773–2832. [2] BA L A K R I S H N A N, S., WA I N W R I G H T, M. J. and Y U, B. (2014). Statistical guarantees for the EM algorithm: From population to sample-based analysis. arXiv preprint arXiv:1408.2156 . [3] B A RT H O L O M E W, D . J ., K N OT T, M . and M O U S TA K I , I . (2011). Latent variable models and factor analysis: A unified approach, vol. 899. Wiley. [4] B E L L O N I, A ., C H E N, D ., C H E R N O Z H U K OV, V. and H A N S E N, C . (2012). Sparse models and methods for optimal instruments with an application to eminent domain. Econometrica 80 2369–2429. [5] B I C K E L , P. J ., R I T OV, Y. and T S Y B A K OV, A . B . (2009). Simultaneous analysis of Lasso and Dantzig selector. Annals of Statistics 37 1705–1732. 8 [6] B O U C H E RO N, S., L U G O S I, G. and M A S S A RT, P. (2013). Concentration inequalities: A nonasymptotic theory of independence. Oxford University Press. [7] C A I, T., L I U, W. and L U O, X . (2011). A constrained `1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association 106 594–607. [8] C A N D `E S, E . and TAO, T. (2007). The Dantzig selector: Statistical estimation when p is much larger than n. Annals of Statistics 35 2313–2351. [9] C H AG A N T Y, A. T. and L I A N G, P. (2013). Spectral experts for estimating mixtures of linear regressions. arXiv preprint arXiv:1306.3729 . [10] C H AU D H U R I , K ., DA S G U P TA , S . and VAT TA N I , A . (2009). Learning mixtures of Gaussians using the k-means algorithm. arXiv preprint arXiv:0912.0086 . [11] DA S G U P TA, S. and S C H U L M A N, L. (2007). A probabilistic analysis of EM for mixtures of separated, spherical Gaussians. Journal of Machine Learning Research 8 203–226. [12] D E M P S T E R , A . P., L A I R D , N . M . and RU B I N , D . B . (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society. Series B (Statistical Methodology) 39 1–38. [13] JAVA N M A R D , A . and M O N TA N A R I , A . (2014). Confidence intervals and hypothesis testing for high-dimensional regression. Journal of Machine Learning Research 15 2869–2909. [14] K H A L I L I, A. and C H E N, J. (2007). Variables selection in finite mixture of regression models. Journal of the American Statistical Association 102 1025–1038. [15] K N I G H T, K . and F U , W. (2000). Asymptotics for Lasso-type estimators. Annals of Statistics 28 1356–1378. [16] L E E, J. D., S U N, D. L., S U N, Y. and TAY L O R, J. E. (2013). Exact inference after model selection via the Lasso. arXiv preprint arXiv:1311.6238 . [17] L O C K H A RT, R., TAY L O R, J., T I B S H I R A N I, R. J. and T I B S H I R A N I, R. (2014). A significance test for the Lasso. Annals of Statistics 42 413–468. [18] M CL AC H L A N, G. and K R I S H N A N, T. (2007). The EM algorithm and extensions, vol. 382. Wiley. [19] M E I N S H AU S E N, N. and B ¨U H L M A N N, P. (2010). Stability selection. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72 417–473. [20] M E I N S H AU S E N , N ., M E I E R , L . and B ¨U H L M A N N , P. (2009). p-values for high-dimensional regression. Journal of the American Statistical Association 104 1671–1681. [21] N E S T E ROV, Y. (2004). Introductory lectures on convex optimization:A basic course, vol. 87. Springer. [22] N I C K L, R. and VA N D E G E E R, S. (2013). Confidence sets in sparse regression. Annals of Statistics 41 2852–2876. [23] S T ¨A D L E R , N ., B ¨U H L M A N N , P. and VA N D E G E E R , S . (2010). `1-penalization for mixture regression models. TEST 19 209–256. [24] TAY L O R, J., L O C K H A RT, R., T I B S H I R A N I, R. J. and T I B S H I R A N I, R. (2014). Post-selection adaptive inference for least angle regression and the Lasso. arXiv preprint arXiv:1401.3889 . [25] T S E N G, P. (2004). An analysis of the EM algorithm and entropy-like proximal point methods. Mathematics of Operations Research 29 27–44. [26] VA N D E G E E R, S ., B ¨U H L M A N N, P., R I T OV, Y. and D E Z E U R E, R . (2014). On asymptotically optimal confidence regions and tests for high-dimensional models. Annals of Statistics 42 1166–1202. [27] VA N D E R VA A RT, A. W. (2000). Asymptotic statistics, vol. 3. Cambridge University Press. [28] V E R S H Y N I N , R . (2010). Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027 . [29] WA S S E R M A N, L. and RO E D E R, K. (2009). High-dimensional variable selection. Annals of Statistics 37 2178–2201. [30] W U , C . F. J . (1983). On the convergence properties of the EM algorithm. Annals of Statistics 11 95–103. [31] Y I , X ., C A R A M A N I S , C . and S A N G H AV I , S . (2013). Alternating minimization for mixed linear regression. arXiv preprint arXiv:1310.3745 . [32] Z H A N G, C . - H . and Z H A N G, S . S . (2014). Confidence intervals for low dimensional parameters in high dimensional linear models. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 76 217–242. 9 | 2015 | 36 |
5,880 | Subspace Clustering with Irrelevant Features via Robust Dantzig Selector Chao Qu Department of Mechanical Engineering National University of Singapore A0117143@u.nus.edu Huan Xu Department of Mechanical Engineering National University of Singapore mpexuh@nus.edu.sg Abstract This paper considers the subspace clustering problem where the data contains irrelevant or corrupted features. We propose a method termed “robust Dantzig selector” which can successfully identify the clustering structure even with the presence of irrelevant features. The idea is simple yet powerful: we replace the inner product by its robust counterpart, which is insensitive to the irrelevant features given an upper bound of the number of irrelevant features. We establish theoretical guarantees for the algorithm to identify the correct subspace, and demonstrate the effectiveness of the algorithm via numerical simulations. To the best of our knowledge, this is the first method developed to tackle subspace clustering with irrelevant features. 1 Introduction The last decade has witnessed fast growing attention in research of high-dimensional data: images, videos, DNA microarray data and data from many other applications all have the property that the dimensionality can be comparable or even much larger than the number of samples. While this setup appears ill-posed in the first sight, the inference and recovery is possible by exploiting the fact that high-dimensional data often possess low dimensional structures [3, 14, 19]. On the other hand, in this era of big data, huge amounts of data are collected everywhere, and such data is generally heterogeneous. Clean data and irrelevant or even corrupted information are often mixed together, which motivates us to consider the high-dimensional, big but dirty data problem. In particular, we study the subspace clustering problem in this setting. Subspace clustering is an important subject in analyzing high-dimensional data, inspired by many real applications[15]. Given data points lying in the union of multiple linear spaces, subspace clustering aims to identify all these linear spaces, and cluster the sample points according to the linear spaces they belong to. Here, different subspaces may correspond to motion of different objects in video sequence [11, 17, 20], different rotations, translations and thickness in handwritten digit or the latent communities for the social graph [15, 5]. A variety of algorithms of subspace clustering have been proposed in the last several years including algebraic algorithms [16], iterative methods [9, 1], statistical methods [11, 10], and spectral clustering-based methods [6, 7]. Among them, sparse subspace clustering (SSC) not only achieves state-of-art empirical performance, but also possesses elegant theoretical guarantees. In [12], the authors provide a geometric analysis of SSC which explains rigorously why SSC is successful even when the subspaces are overlapping [12]. [18] and [13] extend SSC to the noisy case, where data are contaminated by additive Gaussian noise. Different from these work, we focus on the case where some irrelevant features are involved. 1 Mathematically, SSC indeed solves for each sample a sparse linear regression problem with the dictionary being all other samples. Many properties of sparse linear regression problem are well understood in the clean data case. However, the performance of most standard algorithms deteriorates (e.g. LASSO and OMP) even only a few entries are corrupted. As such, it is well expected that standard SSC breaks for subspace clustering with irrelevant or corrupted features (see Section 5 for numerical evidences). Sparse regression under corruption is a hard problem, and few work has addressed this problem [8][21] [4]. Our contribution: Inspired by [4], we use a simple yet powerful tool called robust inner product and propose the robust Dantzig selector to solve the subspace clustering problem with irrelevant features. While our work is based upon the robust inner product developed to solve robust sparse regression, the analysis is quite different from the regression case since both the data structures and the tasks are completely different: for example, the RIP condition – essential for sparse regression – is hardly satisfied for subspace clustering [18]. We provide sufficient conditions to ensure that the Robust Dantzig selector can detect the true subspace clustering. We further demonstrate via numerical simulation the effectiveness of the proposed method. To the best of our knowledge, this is the first attempt to perform subspace clustering with irrelevant features. 2 Problem setup and method 2.1 Notations and model The clean data matrix is denoted by XA ∈RD×N, where each column corresponds to a data point, normalized to a unit vector. The data points are lying on a union of L subspace S = ∪L l=1Sl. Each subspace Sl is of dimension dl which is smaller than D and contains Nl data samples with N1+N2+· · ·+NL = N. We denote the observed dirty data matrix by X ∈R(D+D1)×N. Out of the D + D1 features, up to D1 of them are irrelevant. Without loss of generality, let X = [XT O, XT A]T , where XO ∈RD1×N denotes the irrelevant data. The subscript A and O denote the set of row indices corresponding to true and irrelevant features and the superscript T denotes the transpose. Notice that we do not know O a priori except its cardinality is D1. The model is illustrated in Figure 1. Let X(l) A ∈RD×Nl denote the selection of columns in XA that belongs to Sl. Similarly, denote the corresponding columns in X by X(l). Without loss of generality, let X = [X(1), X(2), ..., X(L)] be ordered. Further more, we use the subscript “−i”to describe a matrix that excludes the column i, e.g., (XA)(l) −i = [(xA)(l) 1 , ..., (xA)(l) i−1, (xA)(l) i+1, ..., (xA)(l) Nl]. We use the superscript lc to describe a matrix that excludes column in subspace l, e.g., (XA)lc = [X(1) A , ..., X(l−1) A , X(l+1) A , ..., X(L) A ]. For a matrix Σ, we use Σs,η to denote the submatrix with row indices in set s and column indices in set η. For any matrix Z, P(Z) denotes the symmetrized convex hull of its column, i.e., P(Z) = conv(±z1, ±z2, ...., ±zN) . We define P l −i := P((XA)(l) −i) for simplification, i.e., the symmetrized convex hull of clean data in subspace l except data i. Finally we use ∥· ∥2 to denote the l2 norm of a vector and ∥· ∥∞to denote infinity norm of a vector or a matrix. Caligraphic letters such as X, Xl represent the set containing all columns of the corresponding clean data matrix. Figure 1: Illustration of the model of irrelevant features in the subspace clustering problem. The left one is the model addressed in this paper: Among total D + D1 features, up tp D1 of them are irrelevant. The right one illustrates a more general case, where the value of any D1 element of each column can be arbitrary (e.g., due to corruptions). It is a harder case and left for future work. 2 Figure 2: Illustration of the Subspace Detection Property. Here, each figure corresponds to a matrix where each column is ci, and non-zero entries are in white. The left figure satisfies this property. The right one does not. 2.2 Method In this secion we present our method as well as the intuition that derives it. When all observed data are clean, to solve the subspace clustering problem, the celebrated SSC [6] proposes to solve the following convex programming min ci ∥ci∥1 s.t. xi = X−ici, (1) for each data point xi. When data are corrupted by noise of small magnitude such as Gaussian noise, a straightforward extension of SSC is the Lasso type method called “Lasso-SSC” [18, 13] min ci ∥ci∥1 + λ 2 ∥xi −X−ici∥2 2. (2) Note that while Formulation (2) has the same form as Lasso, it is used to solve the subspace clustering task. In particular, the support recovery analysis of Lasso does not extend to this case, as X−i typically does not satisfy the RIP condition [18]. This paper considers the case where X contains irrelevant/gross corrupted features. As we discussed above, Lasso is not robust to such corruption. An intuitive idea is to consider the following formulation first proposed for sparse linear regression [21]. min ci,E ∥ci∥1 + λ 2 ∥xi −(X−i −E)ci∥2 2 + η∥E∥∗, (3) where ∥· ∥∗is some norm corresponding to the sparse type of E. One major challenge of this formulation is that it is not convex. As such, it is not clear how to efficiently find the optimal solution, and how to analyze the property of the solution (typically done via convex analysis) in the subspace clustering task. Our method is based on the idea of robust inner product. The robust inner product ⟨a, b⟩k is defined as follows: For vector a ∈RD, b ∈RD, we compute qi = aibi, i = 1, ..., N. Then {|qi|} are sorted and the smallest (D −k) are selected. Let Ωbe the set of selected indices, then ⟨a, b⟩k = P i∈Ωqi, i.e., the largest k terms are truncated. Our main idea is to replace all inner products involved by robust counterparts ⟨a, b⟩D1, where D1 is the upper bound of the number of irrelevant features. The intuition is that the irrelevant features with large magnitude may affect the correct subspace clustering. This simple truncation process will avoid this. We remark that we do not need to know the exact number of irrelevant feature, but instead only an upper bound of it. Extending (2) using the robust inner product leads the following formulation: min ci ∥ci∥1 + λ 2 cT i ˆΣci −λˆγT ci, (4) where ˆΣ and ˆγ are robust counterparts of XT −iX−i and XT −ixi. Unfortunately, ˆΣ may not be a positive semidefinite matrix, thus (4) is not a convex program. Unlike the work [4][8] which studies 3 non-convexity in linear regression, the difficulty of non-convexity in the subspace clustering task appears to be hard to overcome. Instead we turn to the Dantzig Selector, which is essentially a linear program (and hence no positive semidefiniteness is required): min ci ∥ci∥1 + λ∥XT −i(X−ici −xi)∥∞. (5) Replace all inner product by its robust counterpart, we propose the following Robust Dantzig Selector, which can be easily recast as a linear program: Robust Dantzig Selector: min ci ∥ci∥1 + λ∥ˆΣci −ˆγ∥∞, (6) Subspace Detection Property: To measure whether the algorithm is successful, we define the criterion Subspace Detection Property following [18]. We say that the Subspace Detection Property holds, if and only if for all i, the optimal solution to the robust Dantzig Selector satisfies (1) Non-triviality: ci is not a zero vector; (2) Self-Expressiveness Property: nonzeros entries of ci correspond to only columns of X sampled from the same subspace as xi. See Figure 2 for illustrations. 3 Main Results To avoid repetition and cluttered notations, we denote the following primal convex problem by P(Σ, γ) min c ∥c∥1 + λ∥Σc −γ∥∞. Its dual problem, denoted by D(Σ, γ), is max ξ ⟨ξ, γ⟩ subject to ∥ξ∥1 = λ ∥Σξ∥∞≤1. (7) Before we presents our results, we define some quantities. The dual direction is an important geometric term introdcued in analyzing SSC [12]. Here we define similarly the dual direction of the robust Dantzig selector: Notice that the dual of robust Dantzig problem is D(ˆΣ, ˆγ), where ˆγ and ˆΣ are robust counterparts of XT −ixi and XT −iX−i respectively (recall that X−i and xi are the dirty data). We decompose ˆΣ into two parts ˆΣ = (XA)T −i(XA)−i+ ˜Σ, where the first term corresponds to the clean data, and the second term is due to the irrelevant features and truncation from the robust inner product. Thus, the second constraint of the dual problem becomes ∥((XA)T −i(XA)−i + ˜Σ)ξ∥∞≤1. Let ξ be the optimal solution to the above optimization problem, we define v(xi, X−i, λ) := (XA)−iξ and the dual direction as vl = v(xl i,X(l) −i,λ) ∥v(xl i,X(l) −i,λ)∥2 . Similarly as SSC [12], we define the subspace incoherence. Let V l = [vl 1, vl 2, ..., vl Nl]. The incoherence of a point set Xl to other clean data points is defined as µ(Xl) = maxk:k̸=l ∥(X(k) A )T V l∥∞. Recall that we decompose ˆΣ and ˆγ as ˆΣ = (XA)T −i(XA)−i + ˜Σ and ˆγ = (XA)T −i(xA)i + ˜γ. Intuitively, for robust Dantzig selecter to succeed, we want ˜Σ and ˜γ not too large. Particularly, we assume ∥(xA)i∥∞≤ϵ1 and ∥(XA)−i∥∞≤ϵ2. Theorem 1 (Deterministic Model). Denote µl := µ(Xl), rl := mini:xi∈Xl r(P l −i), r := minl=1,...,L rl and suppose µl < rl for all l. If 1 r2 −4D1ϵ1ϵ2r −2D1ϵ2 2 < min l rl −ul 2D1ϵ2 2(ul + rl), (8) then the subspace detection property holds for all λ in the range 1 r2 −4D1ϵ1ϵ2r −2D1ϵ2 2 < λ < min l rl −ul 2D1ϵ2 2(ul + rl). (9) 4 In an ideal case when D1 = 0, the condition of the upper bound of λ reduces to rl > ul, similar to the condition for SSC in the noiseless case [12]. Based on Condition (8), under a randomized generative model, we can derive how many irrelevant features can be tolerated. Theorem 2 (Random model). Suppose there are L subspaces and for simplicity, all subspaces have same dimension d and are chosen uniformly at random. For each subspace there are ρd + 1 points chosen independently and uniformly at random. Up to D1 features of data are irrelevant. Each data point (including true and irrelevant features) is independent from other data points. Then for some universal constants C1, C2, the subspace detection property holds with probability at least 1 −4 N −N exp(−√ρd) if d ≤Dc2(ρ) log(ρ) 12 log N , and 1 1 2c2(ρ) log ρ d −( √ 2c(ρ) q log ρ d + 1) C1D1(log D+C2 log N) D < λ < 1 −κ 1 + κ D C1D1(log D + C2 log N), where κ = q 12d log N Dc2(ρ) log ρ ; c(ρ) is a constant only depending on the density of data points on subspace and satisfies (1) c(ρ) > 0 for all ρ > 1, (2) there is a numerical value ρ0, such that for all ρ > ρ0, one can take c(ρ) = 1/ √ 8. Simplifying the above conditions, we can determine the number of irrelevant features that can be tolerated. In particular, if d ≥2c2(ρ) log ρ and we choose the λ as λ = 4d c2(ρ) log ρ, then the maximal number of irrelevant feature D1 that can be torelated is D1 = min{ c(ρ)D log ρ 8C1d(log(D) + C2 log N), 1 −κ 1 + κ C0Dc2(ρ) log ρ C1d(log(D) + C2 log N)}, with probability at least 1 −4 N −N exp(−√ρd). If d ≤2c2(ρ) log ρ, and we choose the same λ, then the number of irrelevant feature we can tolerate is D1 = min{ Dc(ρ) q log ρ d 4 √ 2C1(log(D) + C2 log N), 1 −κ 1 + κ C0Dc2(ρ) log ρ C1d(log(D) + C2 log N)}, with probability at least 1 −4 N −N exp(−√ρd). Remark 1. If D is much larger than D1, the lower bound of λ is proportional to the subspace dimension d. When d increases, the upper bound of λ decreases, since 1−κ 1+κ decreases. Thus the valid range of λ shrinks when d increases. Remark 2. Ignoring the logarithm terms, when d is large, the tolerable D1 is proportional to min(C1 1−κ 1+κ D d , C2 D d ). When d is small, D1 is proportional to min(C1 1−κ 1+κ D d , C2D/ √ d) . 4 Roadmap of the Proof In this section, we lay out the roadmap of proof. In specific we want to establish the condition with the number of irrelevant features, and the structure of data (i.e., the incoherence µ and inradius r) for the algorithm to succeed. Indeed, we provide a lower bound of λ such that the optimal solution ci is not trivial; and an upper bound of λ so that the Self-Expressiveness Property holds. Combining them together established the theorems. 5 4.1 Self-Expressiveness Property The Self-Expressiveness Property is related to the upper bound of λ. The proof technique is inspired by [18] and [12], we first establish the following lemma, which provides a sufficient condition such that Self-Expressiveness Property holds of the problem 6. Lemma 1. Consider a matrix Σ ∈RN×N and γ ∈RN×1, If there exist a pair (˜c, ξ) such that ˜c has a support S ⊆T and sgn(˜cs) + Σs,ηξη = 0, ∥Σsc∩T,ηξη∥∞≤1, ∥ξ∥1 = λ, ∥ΣT c,ηξη∥∞< 1, (10) where η is the set of indices of entry i such that |(Σ˜c −γ)i| = ∥Σ˜c −γ∥∞, then for all optimal solution c∗to the problem P(Σ, γ), we have c∗ T c = 0. The variable ξ in Lemma 1 is often termed the “dual certificate”. We next consider an oracle problem P(ˆΣl,l, ˆγl), and use its dual optimal variable denoted by ˆξ, to construct such a dual certificate. This candidate satisfies all conditions in the Lemma 1 automatically except to show ∥ˆΣlc,ˆη ˆξˆη∥∞< 1, (11) where lc denotes the set of indices expect the ones corresponding to subspace l. We can compare this condition with the corresponding one in analyzing SSC, in which one need ∥(X)(lc)T v∥∞< 1, where v is the dual certificate. Recall that we can decompose ˆΣlc,ˆη = (XA)(lc)T (XA)ˆη + ˜Σlc,ˆη. Thus Condition 11 becomes ∥(XA)(lc)T ((XA)ˆη ˆξˆη) + ˜Σlc,ˆη ˆξˆη∥∞< 1. (12) To show this holds, we need to bound two terms ∥(XA)ˆη ˆξˆη∥2 and ∥˜Σlc,ˆη ˆξˆη∥∞. Bounding ∥˜Σ∥∞, ∥˜γ∥∞ The following lemma relates D1 with ∥˜Σ∥∞and ∥˜γ∥∞. Lemma 2. Suppose ˆΣ and ˆγ are robust counterparts of XT −iX−i and XT −ixi respectively and among D + D1 features, up to D1 are irrelevant. We can decompose ˆΣ and ˆγ into following form ˆΣ = (XA)T −i(XA)−i + ˜Σ and ˆγ = (XA)T −i(xA)i + ˜γ. We define δ1 := ∥˜γ∥∞and δ2 := ∥˜Σ∥∞.If ∥(xA)i∥∞≤ϵ1 and ∥(XA)−i∥∞≤ϵ2, then δ2 ≤2D1ϵ2 2, δ1 ≤2D1ϵ1ϵ2. We then bound ϵ1 and ϵ2 in the random model using the upper bound of the spherical cap [2]. Indeed we have ϵ1 ≤C1(log D + C2 log N)/ √ D and ϵ2 ≤C1(log D + C2 log N)/ √ D with high probability. Bounding ∥Xˆη ˆξˆη∥2 By exploiting the feasible condition in the dual of the oracle problem, we obtain the following bound: ∥Xˆη ˆξˆη∥2 ≤1 + 2D1λϵ2 2 r(P l −i) . Furthermore, r(P l −i) can be lower bound by c(ρ) √ 2 q log ρ d and ϵ2 can be upper bounded by C1(log D+ C2 log N)/ √ D in the random model with high probability. Thus the RHS can be upper bounded. Plugging this upper bound into (12), we obtain the upper bound of λ. 4.2 Non-triviality with sufficiently large λ To ensure that the solution is not trivial (i.e., not all-zero), we need a lower bound on λ. 6 If λ satisfies the following condition, the optimal solution to problem 6 can not be zero λ > 1 r2(P l −i) −2D1ϵ2 2 −4r(P l −i)D1ϵ1ϵ2 . (13) The proof idea is to show when λ is large enough, the trivial solution c = 0 can not be optimal. In particular, if c = 0, the corresponding value in the primal problem is λ∥ˆγl∥∞. We then establish a lower bound of ∥ˆγl∥∞and a upper bound of ∥c∥1 + λ∥ˆΣl,lc −ˆγl∥∞so that the following inequality always holds by some carefully choosen c. ∥c∥1 + λ∥ˆΣl,lc −ˆγl∥∞< λ∥ˆγl∥∞. (14) We then further lower bound the RHS of Equation (13) using the bound of ϵ1, ϵ2 and r(P l −i). Notice that condition (14) requires that λ > A and condition (11) requires λ < B, where A and B are some terms depending on the number of irrelevant features. Thus we require A < B to get the maximal number of irrelevant features that can be tolerated. 5 Numerical simulations In this section, we use three numerical experiments to demonstrate the effectiveness of our method to handle irrelevant/corrupted features. In particular, we test the performance of our method and effect of number of irrelevant features and dimension subspaces d with respect to different λ. In all experiments, the ambient dimension D = 200, sample density ρ = 5, the subspace are drawn uniformly at random. Each subspace has ρd+1 points chosen independently and uniformly random. We measure the success of the algorithms using the relative violation of the subspace detection property defined as follows, RelV iolation(C, M) = P (i,j)/∈M |C|i,j P (i,j)∈M |C|i,j , where C = [c1, c2, ..., cN], M is the ground truth mask containing all (i, j) such that xi, xj belong to a same subspace. If RelV iolation(C, M) = 0, then the subspace detection property is satisfied. We also check whether we obtain a trivial solution, i.e., if any column in C is all-zero. We first compare the robust Dantzig selector(λ = 2) with SSC and LASSO-SSC ( λ = 10). The results are shown in Figure 3. The X-axis is the number of irrelevant features and the Y-axis is the Relviolation defined above. The ambient dimension D = 200, L = 3, d = 5, the relative sample density ρ = 5. The values of irrelevant features are independently sampled from a uniform distribution in the region [−2.5, 2.5] in (a) and [−10, 10] in (b). We observe from Figure 3 that both SSC and Lasso SSC are very sensitive to irrelevant information. (Notice that RelViolation=0.1 is pretty large and can be considered as clustering failure.) Compared with that, the proposed Robust Dantzig Selector performs very well. Even when D1 = 20, it still detects the true subspaces perfectly. In the same setting, we do some further experiments, our method breaks when D1 is about 40. We also do further experiment for Lasso-SSC with different λ in the supplementary material to show Lasso-SSC is not robust to irrelevant features. We also examine the relation of λ to the performance of the algorithm. In Figure 4a, we test the subspace detection property with different λ and D1. When λ is too small, the algorithm gives a trivial solution (the black region in the figure). As we increase the value of λ, the corresponding solutions satisfy the subspace detection property (represented as the white region in the figure). When λ is larger than certain upper bound, RelV iolation becomes non-zero, indicating errors in subspace clustering. In Figure 4b, we test the subspace detection property with different λ and d. Notice we rescale λ with d, since by Theorem 3, λ should be proportional to d. We observe that the valid region of λ shrinks with increasing d which matches our theorem. 6 Conclusion and future work We studied subspace clustering with irrelevant features, and proposed the “robust Dantzig selector” based on the idea of robust inner product, essentially a truncated version of inner product to avoid 7 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 Number of irrelevant features RelViolation Original SSC Lasso SSC Robust Dantzig Selector (a) 0 5 10 15 20 0 0.2 0.4 0.6 0.8 1 Number of irrelevant features RelViolation Original SSC Lasso SSC Robust Dantzig Selector (b) Figure 3: Relviolation with different D1. Simulated with D = 200, d = 5, L = 3, ρ = 5, λ = 2, and D1 from 1 to 20. Number of irrelevant features D1 λ 1 2 3 4 5 6 7 8 9 10 10.5 10 9.5 9 8.5 8 7.5 7 6.5 6 5.5 5 4.5 4 3.5 3 2.5 2 1.5 1 (a) Exact recovery with different number of irrelevant features. Simulated with D = 200, d = 5, L = 3, ρ = 5 with an increasing D1 from 1 to 10. Black region: trivial solution. White region: Non-trivial solution with RelViolation=0. Gray region: RelViolation> 0.02. Subspace dimension d λ/d 4 6 8 10 12 14 16 2.5 2.3 2.1 1.9 1.7 1.5 1.3 1.1 0.9 0.7 0.5 0.3 0.1 (b) Exact recovery with different subspace dimension d. Simulated with D = 200, L = 3, ρ = 5, D1 = 5 and an increasing d from 4 to 16. Black region: trivial solution. White region: Non-trivial solution with RelViolation=0. Gray region: RelViolation> 0.02. Figure 4: Subspace detection property with different λ, D1, d. any single entry having too large influnce on the result. We established the sufficient conditions for the algorithm to exactly detect the true subspace under the deterministic model and the random model. Simulation results demonstrate that the proposed method is robust to irrelevant information whereas the performance of original SSC and LASSO-SSC significantly deteriorates. We now outline some directions of future research. An immediate future work is to study theoretical guarantees of the proposed method under the semi-random model, where each subspace is chosen deterministically, while samples are randomly distributed on the respective subspace. The challenge here is to bound the subspace incoherence, previous methods uses the rotation invariance of the data, which is not possible in our case as the robust inner product is invariant to rotations. Acknowledgments This work is partially supported by the Ministry of Education of Singapore AcRF Tier Two grant R-265-000-443-112, and A*STAR SERC PSF grant R-265-000-540-305. References [1] Pankaj K Agarwal and Nabil H Mustafa. k-means projective clustering. In Proceedings of the 23rd ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pages 8 155–165, 2004. [2] Keith Ball. An elementary introduction to modern convex geometry. Flavors of geometry, 31:1–58, 1997. [3] Emmanuel J Cand`es, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM, 58(3):11, 2011. [4] Yudong Chen, Constantine Caramanis, and Shie Mannor. Robust sparse regression under adversarial corruption. In Proceedings of the 30th International Conference on Machine Learning, pages 774–782, 2013. [5] Yudong Chen, Ali Jalali, Sujay Sanghavi, and Huan Xu. Clustering partially observed graphs via convex optimization. The Journal of Machine Learning Research, 15(1):2213–2238, 2014. [6] Ehsan Elhamifar and Ren´e Vidal. Sparse subspace clustering. In CVPR 2009, pages 2790– 2797. [7] Guangcan Liu, Zhouchen Lin, and Yong Yu. Robust subspace segmentation by low-rank representation. In Proceedings of the 27th International Conference on Machine Learning, pages 663–670, 2010. [8] 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. [9] Le Lu and Ren´e Vidal. Combined central and subspace clustering for computer vision applications. In Proceedings of the 23rd international conference on Machine learning, pages 593–600, 2006. [10] Yi Ma, Harm Derksen, Wei Hong, and John Wright. Segmentation of multivariate mixed data via lossy data coding and compression. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(9):1546–1562, 2007. [11] Shankar R Rao, Roberto Tron, Ren´e Vidal, and Yi Ma. Motion segmentation via robust subspace separation in the presence of outlying, incomplete, or corrupted trajectories. In CVPR 2008. [12] Mahdi Soltanolkotabi, Emmanuel J Candes, et al. A geometric analysis of subspace clustering with outliers. The Annals of Statistics, 40(4):2195–2238, 2012. [13] Mahdi Soltanolkotabi, Ehsan Elhamifar, Emmanuel J Candes, et al. Robust subspace clustering. The Annals of Statistics, 42(2):669–699, 2014. [14] R. Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society. Series B, pages 267–288, 1996. [15] Ren´e Vidal. A tutorial on subspace clustering. IEEE Signal Processing Magazine, 28(2):52– 68, 2010. [16] Rene Vidal, Yi Ma, and Shankar Sastry. Generalized principal component analysis (gpca). IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(12):1945–1959, 2005. [17] Ren´e Vidal, Roberto Tron, and Richard Hartley. Multiframe motion segmentation with missing data using powerfactorization and gpca. International Journal of Computer Vision, 79(1):85– 105, 2008. [18] Yu-Xiang Wang and Huan Xu. Noisy sparse subspace clustering. In Proceedings of The 30th International Conference on Machine Learning, pages 89–97, 2013. [19] H. Xu, C. Caramanis, and S. Sanghavi. Robust PCA via outlier pursuit. IEEE Transactions on Information Theory, 58(5):3047–3064, 2012. [20] Jingyu Yan and Marc Pollefeys. A general framework for motion segmentation: Independent, articulated, rigid, non-rigid, degenerate and non-degenerate. In ECCV 2006, pages 94–106. 2006. [21] Hao Zhu, Geert Leus, and Georgios B Giannakis. Sparsity-cognizant total least-squares for perturbed compressive sampling. IEEE Transactions on Signal Processing, 59(5):2002–2016, 2011. 9 | 2015 | 360 |
5,881 | Variational Consensus Monte Carlo Maxim Rabinovich, Elaine Angelino, and Michael I. Jordan Computer Science Division University of California, Berkeley {rabinovich, elaine, jordan}@eecs.berkeley.edu Abstract Practitioners of Bayesian statistics have long depended on Markov chain Monte Carlo (MCMC) to obtain samples from intractable posterior distributions. Unfortunately, MCMC algorithms are typically serial, and do not scale to the large datasets typical of modern machine learning. The recently proposed consensus Monte Carlo algorithm removes this limitation by partitioning the data and drawing samples conditional on each partition in parallel [22]. A fixed aggregation function then combines these samples, yielding approximate posterior samples. We introduce variational consensus Monte Carlo (VCMC), a variational Bayes algorithm that optimizes over aggregation functions to obtain samples from a distribution that better approximates the target. The resulting objective contains an intractable entropy term; we therefore derive a relaxation of the objective and show that the relaxed problem is blockwise concave under mild conditions. We illustrate the advantages of our algorithm on three inference tasks from the literature, demonstrating both the superior quality of the posterior approximation and the moderate overhead of the optimization step. Our algorithm achieves a relative error reduction (measured against serial MCMC) of up to 39% compared to consensus Monte Carlo on the task of estimating 300-dimensional probit regression parameter expectations; similarly, it achieves an error reduction of 92% on the task of estimating cluster comembership probabilities in a Gaussian mixture model with 8 components in 8 dimensions. Furthermore, these gains come at moderate cost compared to the runtime of serial MCMC—achieving near-ideal speedup in some instances. 1 Introduction Modern statistical inference demands scalability to massive datasets and high-dimensional models. Innovation in distributed and stochastic optimization has enabled parameter estimation in this setting, e.g. via stochastic [3] and asynchronous [20] variants of gradient descent. Achieving similar success in Bayesian inference – where the target is a posterior distribution over parameter values, rather than a point estimate – remains computationally challenging. Two dominant approaches to Bayesian computation are variational Bayes and Markov chain Monte Carlo (MCMC). Within the former, scalable algorithms like stochastic variational inference [11] and streaming variational Bayes [4] have successfully imported ideas from optimization. Within MCMC, adaptive subsampling procedures [2, 14], stochastic gradient Langevin dynamics [25], and Firefly Monte Carlo [16] have applied similar ideas, achieving computational gains by operating only on data subsets. These algorithms are serial, however, and thus cannot take advantage of multicore and multi-machine architectures. This motivates data-parallel MCMC algorithms such as asynchronous variants of Gibbs sampling [1, 8, 12]. Our work belongs to a class of communication-avoiding data-parallel MCMC algorithms. These algorithms partition the full dataset X1:N into K disjoint subsets XI1:K where XIk denotes the data 1 associated with core k. Each core samples from a subposterior distribution, pk (✓k) / p (XIk | ✓k) p (✓k)1/K , (1) and then a centralized procedure combines the samples into an approximation of the full posterior. Due to their efficiency, such procedures have recently received substantial attention [18, 22, 24]. One of these algorithms, consensus Monte Carlo (CMC), requires communication only at the start and end of sampling [22]. CMC proceeds from the intuition that subposterior samples, when aggregated correctly, can approximate full posterior samples. This is formally backed by the factorization p (✓| x1:N) / p (✓) K Y k=1 p (XIk | ✓) = K Y k=1 pk (✓) . (2) If one can approximate the subposterior densities pk, using kernel density estimates for instance [18], it is therefore possible to recombine them into an estimate of the full posterior. Unfortunately, the factorization does not make it immediately clear how to aggregate on the level of samples without first having to obtain an estimate of the densities pk themselves. CMC alters (2) to untie the parameters across partitions and plug in a deterministic link F from the ✓k to ✓: p (✓| x1:N) ⇡ K Y k=1 pk (✓k) · δ✓=F (✓1,...,✓K). (3) This approximation and an aggregation function motivated by a Gaussian approximation lie at the core of the CMC algorithm [22]. The introduction of CMC raises numerous interesting questions whose answers are essential to its wider application. Two among these stand out as particularly vital. First, how should the aggregation function be chosen to achieve the closest possible approximation to the target posterior? Second, when model parameters exhibit structure or must conform to constraints — if they are, for example, positive semidefinite covariance matrices or labeled centers of clusters — how can the weighted averaging strategy of Scott et al. [22] be modified to account for this structure? In this paper, we propose variational consensus Monte Carlo (VCMC), a novel class of data-parallel MCMC algorithms that allow both questions to be addressed. By formulating the choice of aggregation function as a variational Bayes problem, VCMC makes it possible to adaptively choose the aggregation function to achieve a closer approximation to the true posterior. The flexibility of VCMC likewise supports nonlinear aggregation functions, including structured aggregation functions applicable to not purely vectorial inference problems. An appealing benefit of the VCMC point of view is a clarification of the untying step leading to (3). In VCMC, the approximate factorization corresponds to a variational approximation to the true posterior. This approximation can be viewed as the joint distribution of (✓1, . . . , ✓K) and ✓in an augmented model that assumes conditional independence between the data partitions and posits a deterministic mapping from partition-level parameters to the single global parameter. The added flexibility of this point-of-view makes it possible to move beyond subposteriors and include alternative forms of (3) within the CMC framework. In particular, it is possible to define pk (✓k) = p (✓k) p (XIk | ✓k), using partial posteriors in place of subposteriors (cf. [23]). Although extensive investigation of this issue is beyond the scope of this paper, we provide some evidence in Section 6 that partial posteriors are a better choice in some circumstances and demonstrate that VCMC can provide substantial gains in both the partial posterior and subposterior settings. Before proceeding, we outline the remainder of this paper. Below, in §2, we review CMC and related data-parallel MCMC algorithms. Next, we cast CMC as a variational Bayes problem in §3. We define the variational optimization objective in §4, addressing the challenging entropy term by relaxing it to a concave lower bound, and give conditions for which this leads to a blockwise concave maximization problem. In §5, we define several aggregation functions, including novel ones that enable aggregation of structured samples—e.g. positive semidefinite matrices and mixture model parameters. In §6, we evaluate the performance of VCMC and CMC relative to serial MCMC. We replicate experiments carried out by Scott et al. [22] and execute more challenging experiments in higher dimensions and with more data. Finally in §7, we summarize our approach and discuss several open problems generated by this work. 2 2 Related work We focus on data-parallel MCMC algorithms for large-scale Bayesian posterior sampling. Several recent research threads propose schemes in the setting where the posterior factors as in (2). In general, these parallel strategies are approximate relative to serial procedures, and the specific algorithms differ in terms of the approximations employed and amount of communication required. At one end of the communication spectrum are algorithms that fit into the MapReduce model [7]. First, K parallel cores sample from K subposteriors, defined in (1), via any Monte Carlo sampling procedure. The subposterior samples are then aggregated to obtain approximate samples from the full posterior. This leads to the challenge of designing proper and efficient aggregation procedures. Scott et al. [22] propose consensus Monte Carlo (CMC), which constructs approximate posterior samples via weighted averages of subposterior samples; our algorithms are motivated by this work. Let ✓k,t denote the t-th subposterior sample from core k. In CMC, the aggregation function averages across each set of K samples {✓k,t}K k=1 to produce one approximate posterior sample ˆ✓t. Uniform averaging is a natural but na¨ıve heuristic that can in fact be improved upon via a weighted average, ˆ✓= F (✓1:K) = K X k=1 Wk✓k, (4) where in general, ✓k is a vector and Wk can be a matrix. The authors derive weights motivated by the special case of a Gaussian posterior, where each subposterior is consequently also Gaussian. Let ⌃k be the covariance of the k-th subposterior. This suggests weights Wk = ⌃−1 k equal to the subposteriors’ inverse covariances. CMC treats arbitrary subpostertiors as Gaussians, aggregating with weights given by empirical estimates of ˆ⌃−1 k computed from the observed subposterior samples. Neiswanger et al. [18] propose aggregation at the level of distributions rather than samples. Here, the idea is to form an approximate posterior via a product of density estimates fit to each subposterior, and then sample from this approximate posterior. The accuracy and computational requirements of this approach depend on the complexity of these density estimates. Wang and Dunson [24] develop alternate data-parallel MCMC methods based on applying a Weierstrass transform to each subposterior. These Weierstrass sampling procedures introduce auxiliary variables and additional communication between computational cores. 3 Consensus Monte Carlo as variational inference Given the distributional form of the CMC framework (3), we would like to choose F so that the induced distribution on ✓is as close as possible to the true posterior. This is precisely the problem addressed by variational Bayes, which approximates an intractable posterior p (✓| X) by the solution q⇤to the constrained optimization problem min DKL (q || p (· | X)) subject to q 2 Q, where Q is the family of variational approximations to the distribution, usually chosen to make both optimization and evaluation of target expectations tractable. We thus view the aggregation problem in CMC as a variational inference problem, with the variational family given by all distributions Q = QF = {qF : F 2 F}, where each F is in some function class F and defines a density qF (✓) = Z ⌦K K Y k=1 pk (✓k) · δ✓=F (✓1,...,✓K) d✓1:K. In practice, we optimize over finite-dimensional F using projected stochastic gradient descent (SGD). 4 The variational optimization problem Standard optimization of the variational Bayes objective uses the evidence lower bound (ELBO) log p (X) = log Eq p (✓, X) q (✓) % ≥Eq log p (✓, X) q (✓) % = log p (X) −DKL (q || p (· | X)) =: LVB (q) . (5) 3 We can therefore recast the variational optimization problem in an equivalent form as max LVB (q) subject to q 2 Q. Unfortunately, the variational Bayes objective LVB remains difficult to optimize. Indeed, by writing LVB (q) = Eq [log p (✓, X)] + H [q] we see that optimizing LVB requires computing an entropy H [q] and its gradients. We can deal with this issue by deriving a lower bound on the entropy that relaxes the objective further. Concretely, suppose that every F 2 F can be decomposed as F (✓1:K) = PK k=1 Fk (✓k), with each Fk a differentiable bijection. Since the ✓k come from subposteriors conditioning on different segments of the data, they are independent. The entropy power inequality [6] therefore implies H [q] ≥max 1kK H [Fk (✓k)] = max 1kK (H [pk] + Epk [log det [J (Fk) (✓k)]]) ≥ min 1kK H [pk] + max 1kK Epk [log det [J (Fk) (✓k)]] (6) ≥ min 1kK H [pk] + 1 K K X k=1 Epk [log det [J (Fk) (✓k)]] =: ˜H [q] , (7) where J (f) denotes the Jacobian of the function f. The proof can be found in the supplement. This approach gives an explicit, easily computed approximation to the entropy—and this approximation is a lower bound, allowing us to interpret it simply as a further relaxation of the original inference problem. Furthermore, and crucially, it decouples pk and Fk, thereby making it possible to optimize over Fk without estimating the entropy of any pk. We note additionally that if we are willing to sacrifice concavity, we can use the tighter lower bound on the entropy given by (6). Putting everything together, we can define our relaxed variational objective as L (q) = Eq [log p (✓, X)] + ˜H [q] . (8) Maximizing this function is the variational Bayes problem we consider in the remainder of the paper. Conditions for concavity Under certain conditions, the problem posed above is blockwise concave. To see when this holds, we use the language of graphical models and exponential families. To derive the result in the greatest possible generality, we decompose the variational objective as LVB = Eq [log p (✓, X)] + H [q] ≥˜L + ˜H [q] and prove concavity directly for ˜L, then treat our choice of relaxed entropy (7). We emphasize that while the entropy relaxation is only defined for decomposed aggregation functions, concavity of the partial objective holds for arbitrary aggregation functions. All proofs are in the supplement. Suppose the model distribution is specified via a graphical model G, so that ✓= (✓u)u2V (G), such that each conditional distribution is defined by an exponential family log p ⇣ ✓u | ✓par(u)⌘ = log hu (✓u) + X u02par(u) ⇣ ✓u0⌘T T u0!u (✓u) −log Au ⇣ ✓par(u)⌘ . If each of these log conditional density functions is log-concave in ✓u, we can guarantee that the log likelihood is concave in each ✓u individually. Theorem 4.1 (Blockwise concavity of the variational cross-entropy). Suppose that the model distribution is specified by a graphical model G in which each conditional probability density is a log-concave exponential family. Suppose further that the variational aggregation function family satisfies F = Q u2V (G) Fu such that we can decompose each aggregation function across nodes via F (✓) = (F u (✓u))u2V (G) , F 2 F and F u 2 Fu. If each Fu is a convex subset of some vector space Hu, then the variational cross-entropy ˜L is concave in each F u individually. 4 Assuming that the aggregation function can be decomposed into a sum over functions of individual subposterior terms we can also prove concavity of our entropy relaxation (7). Theorem 4.2 (Concavity of the relaxed entropy). Suppose F = QK k=1 Fk, with each function F 2 F decomposing as F (✓1, . . . , ✓K) = PK k=1 Fk (✓k) for unique bijective Fk 2 Fk. Then the relaxed entropy (7) is concave in F. As a result, we derive concavity of the variational objective in a broad range of settings. Corollary 4.1 (Concavity of the variational objective). Under the hypotheses of Theorems 4.1 and 4.2, the variational Bayes objective L = ˜L + ˜H is concave in each F u individually. 5 Variational aggregation function families The performance of our algorithm depends critically on the choice of aggregation function family F. The family must be sufficiently simple to support efficient optimization, expressive to capture the complex transformation from the set of subposteriors to the full posterior, and structured to preserve structure in the parameters. We now illustrate some aggregation functions that meet these criteria. Vector aggregation. In the simplest case, ✓2 Rd is an unconstrained vector. Then, a linear aggregation function FW = PK k=1 Wk✓k makes sense, and it is natural to impose constraints to make this sum behave like a weighted average—i.e., each Wk 2 Sd + is a positive semidefinite (PSD) matrix and PK k=1 Wk = Id. For computational reasons, it is often desirable to restrict to diagonal Wk. Spectral aggregation. Cases involving structure exhibit more interesting behavior. Indeed, if our parameter is a PSD matrix ⇤2 Sd +, applying the vector aggregation function above to the flattened vector form vec (⇤) of the parameter does not suffice. Denoting elementwise matrix product as ◦, we note that this strategy would in general lead to FW (⇤1:m) = PK k=1 Wk ◦⇤k /2 Sd +. We therefore introduce a more sophisticated aggregation function that preserves PSD structure. For this, given symmetric A 2 Rd⇥d, define R (A) and D (A) to be orthogonal and diagonal matrices, respectively, such that A = R (A)T D (A) R (A). Impose further—and crucially—the canonical ordering D (A)11 ≥· · · ≥D (A)dd. We can then define our spectral aggregation function by F spec W (⇤1:K) = K X k=1 R (⇤k)T [WkD (⇤k)] R (⇤k) . Assuming Wk 2 Sd +, the output of this function is guaranteed to be PSD, as required. As above we restrict the set of Wk to the matrix simplex {(Wk)K k=1 : Wk 2 Sd +, PK k=1 Wk = I}. Combinatorial aggregation. Additional complexity arises with unidentifiable latent variables and, more generally, models with multimodal posteriors. Since this class encompasses many popular algorithms in machine learning, including factor analysis, mixtures of Gaussians and multinomials, and latent Dirichlet allocation (LDA), we now show how our framework can accommodate them. For concreteness, suppose now that our model parameters are given by ✓2 RL⇥d, where L denotes the number of global latent variables (e.g. cluster centers). We introduce discrete alignment parameters ak that indicate how latent variables associated with partitions map to global latent variables. Each ak is thus a one-to-one correspondence [L] ! [L], with ak` denoting the index on worker core k of cluster center `. For fixed a, we then obtain the variational aggregation function Fa (✓1:K) = ✓K X k=1 Wk`✓kak`(`) ◆L `=1 . Optimization can then proceed in an alternating manner, switching between the alignments ak and the weights Wk, or in a greedy manner, fixing the alignments at the start and optimizing the weight matrices. In practice, we do the latter, aligning using a simple heuristic objective O (a) = PK k=2 PL `=1 &&¯✓kak` −¯✓1` &&2 2 , where ¯✓k` denotes the mean value of cluster center ` on partition k. As O suggests, we set a1` = `. Minimizing O via the Hungarian algorithm [15] leads to good alignments. 5 Figure 1: High-dimensional probit regression (d = 300). Moment approximation error for the uniform and Gaussian averaging baselines and VCMC, relative to serial MCMC, for subposteriors (left) and partial posteriors (right); note the different vertical axis scales. We assessed three groups of functions: first moments, with f(β) = βj for 1 j d; pure second moments, with f(β) = β2 j for 1 j d; and mixed second moments, with f(β) = βiβj for 1 i < j d. For brevity, results for pure second moments are relegated to Figure 5 in the supplement. 6 Empirical evaluation We now evaluate VCMC on three inference problems, in a range of data and dimensionality conditions. In the vector parameter case, we compare directly to the simple weighting baselines corresponding to previous work on CMC [22]; in the other cases, we compare to structured analogues of these weighting schemes. Our experiments demonstrate the advantages of VCMC across the whole range of model dimensionality, data quantity, and availability of parallel resources. Baseline weight settings. Scott et al. [22] studied linear aggregation functions with fixed weights, W unif k = 1 K · Id and W gauss k / diag ⇣ ˆ⌃k ⌘−1 , (9) corresponding to uniform averaging and Gaussian averaging, respectively, where ˆ⌃k denotes the standard empirical estimate of the covariance. These are our baselines for comparison. Evaluation metrics. Since the goal of MCMC is usually to estimate event probabilities and function expectations, we evaluate algorithm accuracy for such estimates, relative to serial MCMC output. For each model, we consider a suite of test functions f 2 F (e.g. low degree polynomials, cluster comembership indicators), and we assess the error of each algorithm A using the metric ✏A (f) = |EA [f] −EMCMC [f]| |EMCMC [f]| . In the body of the paper, we report median values of ✏A, computed within each test function class. The supplement expands on this further, showing quartiles for the differences in ✏VCMC and ✏CMC. Bayesian probit regression. We consider the nonconjugate probit regression model. In this case, we use linear aggregation functions as our function class. For computational efficiency, we also limit ourselves to diagonal Wk. We use Gibbs sampling on the following augmented model: β ⇠N(0, σ2Id), Zn | β, xn ⇠N(βT xn, 1), Yn | Zn, β, xn = ⇢1 if Zn > 0, 0 otherwise. This augmentation allows us to implement an efficient and rapidly mixing Gibbs sampler, where β | x1:N = X, z1:N = z ⇠N $ ⌃XT z, ⌃ % , ⌃= $ σ−2Id + XT X %−1 . We run two experiments: the first using a data generating distribution from Scott et al. [22], with N = 8500 data points and d = 5 dimensions, and the second using N = 105 data points and d = 300 dimensions. As shown in Figure 1 and, in the supplement,1 Figures 4 and 5, VCMC decreases the error of moment estimation compared to the baselines, with substantial gains starting at K = 25 partitions (and increasing with K). We also run the high-dimensional experiment using partial posteriors [23] in place of subposteriors, and observe substantially lower errors in this case. 6 Figure 2: High-dimensional normal-inverse Wishart model (d = 100). (Far left, left, right) Moment approximation error for the uniform and Gaussian averaging baselines and VCMC, relative to serial MCMC. Letting ⇢j denote the jth largest eigenvalue of ⇤−1, we assessed three groups of functions: first moments, with f(⇤) = ⇢j for 1 j d; pure second moments, with f(⇤) = ⇢2 j for 1 j d; and mixed second moments, with f(⇤) = ⇢i⇢j for 1 i < j d. (Far right) Graph of error in estimating E [⇢j] as a function of j (where ⇢1 ≥⇢2 ≥· · · ≥⇢d). Normal-inverse Wishart model. To compare directly to prior work [22], we consider the normalinverse Wishart model ⇤⇠Wishart (⌫, V ) , Xn | µ, ⇤⇠N ! µ, ⇤−1" . Here, we use spectral aggregation rules as our function class, restricting to diagonal Wk for computational efficiency. We run two sets of experiments: one using the covariance matrix from Scott et al. [22], with N = 5000 data points and d = 5 dimensions, and one using a higher-dimensional covariance matrix designed to have a small spectral gap and a range of eigenvalues, with N = 105 data points and d = 100 dimensions. In both cases, we use a form of projected SGD, using 40 samples per iteration to estimate the variational gradients and running 25 iterations of optimization. We note that because the mean µ is treated as a point-estimated parameter, one could sample ⇤ exactly using normal-inverse Wishart conjugacy [10]. As Figure 2 shows,2 VCMC improves both first and second posterior moment estimation as compared to the baselines. Here, the greatest gains from VCMC appear at large numbers of partitions (K = 50, 100). We also note that uniform and Gaussian averaging perform similarly because the variances do not differ much across partitions. Mixture of Gaussians. A substantial portion of Bayesian inference focuses on latent variable models and, in particular, mixture models. We therefore evaluate VCMC on a mixture of Gaussians, ✓1:L ⇠N ! 0, ⌧2Id " , Zn ⇠Cat (⇡) , Xn | Zn = z ⇠N ! ✓z, σ2Id " , where the mixture weights ⇡and the prior and likelihood variances ⌧2 and σ2 are assumed known. We use the combinatorial aggregation functions defined in Section 5; we set L = 8, ⌧= 2, σ = 1, and ⇡uniform and generate N = 5 ⇥104 data points in d = 8 dimensions, using the model from Nishihara et al. [19]. The resulting inference problem is therefore L ⇥d = 64-dimensional. All samples were drawn using the PyStan implementation of Hamiltonian Monte Carlo (HMC). As Figure 3a shows, VCMC drastically improves moment estimation compared to the baseline Gaussian averaging (9). To assess how VCMC influences estimates in cluster membership probabilities, we generated 100 new test points from the model and analyzed cluster comembership probabilities for all pairs in the test set. Concretely, for each xi and xj in the test data, we estimated P [xi and xj belong to the same cluster]. Figure 3a shows the resulting boost in accuracy: when σ = 1, VCMC delivers estimates close to those of serial MCMC, across all numbers of partitions; the errors are larger for σ = 2. Unlike previous models, uniform averaging here outperforms Gaussian averaging, and indeed is competitive with VCMC. Assessing computational efficiency. The efficiency of VCMC depends on that of the optimization step, which depends on factors including the step size schedule, number of samples used per iteration to estimate gradients, and size of data minibatches used per iteration. Extensively assessing the influence of all these factors is beyond the scope of this paper, and is an active area of research both in general and specifically in the context of variational inference [13, 17, 21]. Here, we provide 1Due to space constraints, we relegate results for d = 5 to the supplement. 2Due to space constraints, we compare to the d = 5 experiment of Scott et al. [22] in the supplement. 7 (a) Mixture of Gaussians (d = 8, L = 8). (b) Error versus timing and speedup measurements. Figure 3: (a) Expectation approximation error for the uniform and Gaussian baselines and VCMC. We report the median error, relative to serial MCMC, for cluster comembership probabilities of pairs of test data points, for (left) σ = 1 and (right) σ = 2, where we run the VCMC optimization procedure for 50 and 200 iterations, respectively. When σ = 2, some comembership probabilities are estimated poorly by all methods; we therefore only use the 70% of comembership probabilities with the smallest errors across all the methods. (b) (Left) VCMC error as a function of number of seconds of optimization. The cost of optimization is nonnegligible, but still moderate compared to serial MCMC—particularly since our optimization scheme only needs small batches of samples and can therefore operate concurrently with the sampler. (Right) Error versus speedup relative to serial MCMC, for both CMC with Gaussian averaging (small markers) and VCMC (large markers). an initial assessment of the computational efficiency of VCMC, taking the probit regression and Gaussian mixture models as our examples, using step sizes and sample numbers from above, and eschewing minibatching on data points. Figure 3b shows timing results for both models. For the probit regression, while the optimization cost is not negligible, it is significantly smaller than that of serial sampling, which takes over 6000 seconds to produce 1000 effective samples.3 Across most numbers of partitions, approximately 25 iterations—corresponding to less than 1500 seconds of wall clock time—suffices to give errors close to those at convergence. For the mixture, on the other hand, the computational cost of optimization is minimal compared to serial sampling. We can see this in the overall speedup of VCMC relative to serial MCMC: for sampling and optimization combined, low numbers of partitions (K 25) achieve speedups close to the ideal value of K, and large numbers (K = 50, 100) still achieve good speedups of about K/2. The cost of the VCMC optimization step is thus moderate—and, when the MCMC step is expensive, small enough to preserve the linear speedup of embarrassingly parallel sampling. Moreover, since the serial bottleneck is an optimization, we are optimistic that performance, both in terms of number of iterations and wall clock time, can be significantly increased by using techniques like data minibatching [9], adaptive step sizes [21], or asynchronous updates [20]. 7 Conclusion and future work The flexibility of variational consensus Monte Carlo (VCMC) opens several avenues for further research. Following previous work on data-parallel MCMC, we used the subposterior factorization. Our variational framework can accomodate more general factorizations that might be more statistically or computationally efficient – e.g. the factorization used by Broderick et al. [4]. We also introduced structured sample aggregation, and analyzed some concrete instantiations. Complex latent variable models would require more sophisticated aggregation functions – e.g. ones that account for symmetries in the model [5] or lift the parameter to a higher dimensional space before aggregating. Finally, recall that our algorithm – again following previous work – aggregates in a sample-by-sample manner, cf. (4). Other aggregation paradigms may be useful in building approximations to multimodal posteriors or in boosting the statistical efficiency of the overall sampler. Acknowledgments. We thank R.P. Adams, N. Altieri, T. Broderick, R. Giordano, M.J. Johnson, and S.L. Scott for helpful discussions. E.A. is supported by the Miller Institute for Basic Research in Science, University of California, Berkeley. M.R. is supported by a Hertz Foundation Fellowship, generously endowed by Google, and an NSF Graduate Research Fellowship. Support for this project was provided by Amazon and by ONR under the MURI program (N00014-11-1-0688). 3We ran the sampler for 5100 iterations, including 100 burnin steps, and kept every fifth sample. 8 References [1] A. U. Asuncion, P. Smyth, and M. Welling. Asynchronous distributed learning of topic models. In Advances in Neural Information Processing Systems 21, pages 81–88, 2008. [2] R. Bardenet, A. Doucet, and C. Holmes. Towards scaling up Markov chain Monte Carlo: An adaptive subsampling approach. In Proceedings of the 31st International Conference on Machine Learning, 2014. [3] D. P. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont, MA, 2nd edition, 1990. [4] T. Broderick, N. Boyd, A. Wibisono, A. C. Wilson, and M. I. Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems 26, pages 1727–1735, 2013. [5] T. Campbell and J. P. How. Approximate decentralized Bayesian inference. In 30th Conference on Uncertainty in Artificial Intelligence, 2014. [6] T. M. Cover and J. A. Thomas. Elements of Information Theory (Wiley Series in Telecommunications and Signal Processing). Wiley-Interscience, 2006. [7] J. Dean and S. Ghemawat. MapReduce: Simplified data processing on large clusters. Communications of the ACM, 51(1):107–113, Jan. 2008. [8] F. Doshi-Velez, D. A. Knowles, S. Mohamed, and Z. Ghahramani. Large scale nonparametric Bayesian inference: Data parallelisation in the Indian buffet process. In Advances in Neural Information Processing Systems 22, pages 1294–1302, 2009. [9] J. C. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011. [10] A. Gelman, J. B. Carlin, H. S. Stern, D. B. Dunson, A. Vehtari, and D. B. Rubin. Bayesian Data Analysis, Third Edition. Chapman and Hall/CRC, 2013. [11] M. D. Hoffman, D. M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14(1):1303–1347, May 2013. [12] M. Johnson, J. Saunderson, and A. Willsky. Analyzing Hogwild parallel Gaussian Gibbs sampling. In Advances in Neural Information Processing Systems 26, pages 2715–2723, 2013. [13] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems 26, pages 315–323, 2013. [14] A. Korattikara, Y. Chen, and M. Welling. Austerity in MCMC land: Cutting the Metropolis-Hastings budget. In Proceedings of the 31st International Conference on Machine Learning, 2014. [15] H. W. Kuhn. The Hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2 (1-2):83–97, 1955. [16] D. Maclaurin and R. P. Adams. Firefly Monte Carlo: Exact MCMC with subsets of data. In Proceedings of 30th Conference on Uncertainty in Artificial Intelligence, 2014. [17] S. Mandt and D. M. Blei. Smoothed gradients for stochastic variational inference. In Advances in Neural Information Processing Systems 27, pages 2438–2446, 2014. [18] W. Neiswanger, C. Wang, and E. Xing. Asymptotically exact, embarrassingly parallel MCMC. In 30th Conference on Uncertainty in Artificial Intelligence, 2014. [19] R. Nishihara, I. Murray, and R. P. Adams. Parallel MCMC with generalized elliptical slice sampling. Journal of Machine Learning Research, 15:2087–2112, 2014. [20] F. Niu, B. Recht, C. R´e, and S. Wright. Hogwild!: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems 24, pages 693–701, 2011. [21] R. Ranganath, C. Wang, D. M. Blei, and E. P. Xing. An adaptive learning rate for stochastic variational inference. In Proceedings of the 30th International Conference on Machine Learning, pages 298–306, 2013. [22] S. L. Scott, A. W. Blocker, and F. V. Bonassi. Bayes and big data: The consensus Monte Carlo algorithm. In Bayes 250, 2013. [23] H. Strathmann, D. Sejdinovic, and M. Girolami. Unbiased Bayes for big data: Paths of partial posteriors. arXiv:1501.03326, 2015. [24] X. Wang and D. B. Dunson. Parallel MCMC via Weierstrass sampler. arXiv:1312.4605, 2013. [25] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th International Conference on Machine Learning, 2011. 9 | 2015 | 361 |
5,882 | Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks Samy Bengio, Oriol Vinyals, Navdeep Jaitly, Noam Shazeer Google Research Mountain View, CA, USA {bengio,vinyals,ndjaitly,noam}@google.com Abstract Recurrent Neural Networks can be trained to produce sequences of tokens given some input, as exemplified by recent results in machine translation and image captioning. The current approach to training them consists of maximizing the likelihood of each token in the sequence given the current (recurrent) state and the previous token. At inference, the unknown previous token is then replaced by a token generated by the model itself. This discrepancy between training and inference can yield errors that can accumulate quickly along the generated sequence. We propose a curriculum learning strategy to gently change the training process from a fully guided scheme using the true previous token, towards a less guided scheme which mostly uses the generated token instead. Experiments on several sequence prediction tasks show that this approach yields significant improvements. Moreover, it was used succesfully in our winning entry to the MSCOCO image captioning challenge, 2015. 1 Introduction Recurrent neural networks can be used to process sequences, either as input, output or both. While they are known to be hard to train when there are long term dependencies in the data [1], some versions like the Long Short-Term Memory (LSTM) [2] are better suited for this. In fact, they have recently shown impressive performance in several sequence prediction problems including machine translation [3], contextual parsing [4], image captioning [5] and even video description [6]. In this paper, we consider the set of problems that attempt to generate a sequence of tokens of variable size, such as the problem of machine translation, where the goal is to translate a given sentence from a source language to a target language. We also consider problems in which the input is not necessarily a sequence, like the image captioning problem, where the goal is to generate a textual description of a given image. In both cases, recurrent neural networks (or their variants like LSTMs) are generally trained to maximize the likelihood of generating the target sequence of tokens given the input. In practice, this is done by maximizing the likelihood of each target token given the current state of the model (which summarizes the input and the past output tokens) and the previous target token, which helps the model learn a kind of language model over target tokens. However, during inference, true previous target tokens are unavailable, and are thus replaced by tokens generated by the model itself, yielding a discrepancy between how the model is used at training and inference. This discrepancy can be mitigated by the use of a beam search heuristic maintaining several generated target sequences, but for continuous state space models like recurrent neural networks, there is no dynamic programming approach, so the effective number of sequences considered remains small, even with beam search. 1 The main problem is that mistakes made early in the sequence generation process are fed as input to the model and can be quickly amplified because the model might be in a part of the state space it has never seen at training time. Here, we propose a curriculum learning approach [7] to gently bridge the gap between training and inference for sequence prediction tasks using recurrent neural networks. We propose to change the training process in order to gradually force the model to deal with its own mistakes, as it would have to during inference. Doing so, the model explores more during training and is thus more robust to correct its own mistakes at inference as it has learned to do so during training. We will show experimentally that this approach yields better performance on several sequence prediction tasks. The paper is organized as follows: in Section 2, we present our proposed approach to better train sequence prediction tasks with recurrent neural networks; this is followed by Section 3 which draws links to some related approaches. We then present some experimental results in Section 4 and conclude in Section 5. 2 Proposed Approach We are considering supervised tasks where the training set is given in terms of N input/output pairs {Xi, Y i}N i=1, where Xi is the input and can be either static (like an image) or dynamic (like a sequence) while the target output Y i is a sequence yi 1, yi 2, . . . , yi Ti of a variable number of tokens that belong to a fixed known dictionary. 2.1 Model Given a single input/output pair (X, Y ), the log probability P(Y |X) can be computed as: log P(Y |X) = log P(yT 1 |X) = T X t=1 log P(yt|yt−1 1 , X) (1) where Y is a sequence of length T represented by tokens y1, y2, . . . , yT . The latter term in the above equation is estimated by a recurrent neural network with parameters θ by introducing a state vector, ht, that is a function of the previous state, ht−1, and the previous output token, yt−1, i.e. log P(yt|yt−1 1 , X; θ) = log P(yt|ht; θ) (2) where ht is computed by a recurrent neural network as follows: ht = f(X; θ) if t = 1, f(ht−1, yt−1; θ) otherwise. (3) P(yt|ht; θ) is often implemented as a linear projection1 of the state vector ht into a vector of scores, one for each token of the output dictionary, followed by a softmax transformation to ensure the scores are properly normalized (positive and sum to 1). f(h, y) is usually a non-linear function that combines the previous state and the previous output in order to produce the current state. This means that the model focuses on learning to output the next token given the current state of the model AND the previous token. Thus, the model represents the probability distribution of sequences in the most general form - unlike Conditional Random Fields [8] and other models that assume independence between between outputs at different time steps, given latent variable states. The capacity of the model is only limited by the representational capacity of the recurrent and feedforward layers. LSTMs, with their ability to learn long range structure are especially well suited to this task and make it possible to learn rich distributions over sequences. In order to learn variable length sequences, a special token, <EOS>, that signifies the end of a sequence is added to the dictionary and the model. During training, <EOS> is concatenated to the end of each sequence. During inference, the model generates tokens until it generates <EOS>. 1 Although one could also use a multi-layered non-linear projection. 2 2.2 Training Training recurrent neural networks to solve such tasks is usually accomplished by using mini-batch stochastic gradient descent to look for a set of parameters θ⋆that maximizes the log likelihood of producing the correct target sequence Y i given the input data Xi for all training pairs (Xi, Y i): θ⋆= arg max θ X (Xi,Y i) log P(Y i|Xi; θ) . (4) 2.3 Inference During inference the model can generate the full sequence yT 1 given X by generating one token at a time, and advancing time by one step. When an <EOS> token is generated, it signifies the end of the sequence. For this process, at time t, the model needs as input the output token yt−1 from the last time step in order to produce yt. Since we do not have access to the true previous token, we can instead either select the most likely one given our model, or sample according to it. Searching for the sequence Y with the highest probability given X is too expensive because of the combinatorial growth in the number of sequences. Instead we use a beam searching procedure to generate k “best” sequences. We do this by maintaining a heap of m best candidate sequences. At each time step new candidates are generated by extending each candidate by one token and adding them to the heap. At the end of the step, the heap is re-pruned to only keep m candidates. The beam searching is truncated when no new sequences are added, and k best sequences are returned. While beam search is often used for discrete state based models like Hidden Markov Models where dynamic programming can be used, it is harder to use efficiently for continuous state based models like recurrent neural networks, since there is no way to factor the followed state paths in a continuous space, and hence the actual number of candidates that can be kept during beam search decoding is very small. In all these cases, if a wrong decision is taken at time t −1, the model can be in a part of the state space that is very different from those visited from the training distribution and for which it doesn’t know what to do. Worse, it can easily lead to cumulative bad decisions - a classic problem in sequential Gibbs sampling type approaches to sampling, where future samples can have no influence on the past. 2.4 Bridging the Gap with Scheduled Sampling The main difference between training and inference for sequence prediction tasks when predicting token yt is whether we use the true previous token yt−1 or an estimate ˆyt−1 coming from the model itself. We propose here a sampling mechanism that will randomly decide, during training, whether we use yt−1 or ˆyt−1. Assuming we use a mini-batch based stochastic gradient descent approach, for every token to predict yt ∈Y of the ith mini-batch of the training algorithm, we propose to flip a coin and use the true previous token with probability ϵi, or an estimate coming from the model itself with probability (1 −ϵi)2 The estimate of the model can be obtained by sampling a token according to the probability distribution modeled by P(yt−1|ht−1), or can be taken as the arg maxs P(yt−1 = s|ht−1). This process is illustrated in Figure 1. When ϵi = 1, the model is trained exactly as before, while when ϵi = 0 the model is trained in the same setting as inference. We propose here a curriculum learning strategy to go from one to the other: intuitively, at the beginning of training, sampling from the model would yield a random token since the model is not well trained, which could lead to very slow convergence, so selecting more often the true previous token should help; on the other hand, at the end of training, ϵi should favor sampling from the model more often, as this corresponds to the true inference situation, and one expects the model to already be good enough to handle it and sample reasonable tokens. 2Note that in the experiments, we flipped the coin for every token. We also tried to flip the coin once per sequence, but the results were much worse, most probably because consecutive errors are amplified during the first rounds of training. 3 Figure 1: Illustration of the Scheduled Sampling approach, where one flips a coin at every time step to decide to use the true previous token or one sampled from the model itself. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 200 400 600 800 1000 Exponential decay Inverse sigmoid decay Linear decay Figure 2: Examples of decay schedules. We thus propose to use a schedule to decrease ϵi as a function of i itself, in a similar manner used to decrease the learning rate in most modern stochastic gradient descent approaches. Examples of such schedules can be seen in Figure 2 as follows: • Linear decay: ϵi = max(ϵ, k −ci) where 0 ≤ϵ < 1 is the minimum amount of truth to be given to the model and k and c provide the offset and slope of the decay, which depend on the expected speed of convergence. • Exponential decay: ϵi = ki where k < 1 is a constant that depends on the expected speed of convergence. • Inverse sigmoid decay: ϵi = k/(k+exp(i/k)) where k ≥1 depends on the expected speed of convergence. We call our approach Scheduled Sampling. Note that when we sample the previous token ˆyt−1 from the model itself while training, we could back-propagate the gradient of the losses at times t →T through that decision. This was not done in the experiments described in this paper and is left for future work. 3 Related Work The discrepancy between the training and inference distributions has already been noticed in the literature, in particular for control and reinforcement learning tasks. SEARN [9] was proposed to tackle problems where supervised training examples might be different from actual test examples when each example is made of a sequence of decisions, like acting in a complex environment where a few mistakes of the model early in the sequential decision process might compound and yield a very poor global performance. Their proposed approach involves a meta-algorithm where at each meta-iteration one trains a new model according to the current policy (essentially the expected decisions for each situation), applies it on a test set and modifies the next iteration policy in order to account for the previous decisions and errors. The new policy is thus a combination of the previous one and the actual behavior of the model. In comparison to SEARN and related ideas [10, 11], our proposed approach is completely online: a single model is trained and the policy slowly evolves during training, instead of a batch approach, which makes it much faster to train3 Furthermore, SEARN has been proposed in the context of reinforcement learning, while we consider the supervised learning setting trained using stochastic gradient descent on the overall objective. Other approaches have considered the problem from a ranking perspective, in particular for parsing tasks [12] where the target output is a tree. In this case, the authors proposed to use a beam search both during training and inference, so that both phases are aligned. The training beam is used to find 3In fact, in the experiments we report in this paper, our proposed approach was not meaningfully slower (nor faster) to train than the baseline. 4 the best current estimate of the model, which is compared to the guided solution (the truth) using a ranking loss. Unfortunately, this is not feasible when using a model like a recurrent neural network (which is now the state-of-the-art technique in many sequential tasks), as the state sequence cannot be factored easily (because it is a multi-dimensional continuous state) and thus beam search is hard to use efficiently at training time (as well as inference time, in fact). Finally, [13] proposed an online algorithm for parsing problems that adapts the targets through the use of a dynamic oracle that takes into account the decisions of the model. The trained model is a perceptron and is thus not state-based like a recurrent neural network, and the probability of choosing the truth is fixed during training. 4 Experiments We describe in this section experiments on three different tasks, in order to show that scheduled sampling can be helpful in different settings. We report results on image captioning, constituency parsing and speech recognition. 4.1 Image Captioning Image captioning has attracted a lot of attention in the past year. The task can be formulated as a mapping of an image onto a sequence of words describing its content in some natural language, and most proposed approaches employ some form of recurrent network structure with simple decoding schemes [5, 6, 14, 15, 16]. A notable exception is the system proposed in [17], which does not directly optimize the log likelihood of the caption given the image, and instead proposes a pipelined approach. Since an image can have many valid captions, the evaluation of this task is still an open problem. Some attempts have been made to design metrics that positively correlate with human evaluation [18], and a common set of tools have been published by the MSCOCO team [19]. We used the MSCOCO dataset from [19] to train our model. We trained on 75k images and report results on a separate development set of 5k additional images. Each image in the corpus has 5 different captions, so the training procedure picks one at random, creates a mini-batch of examples, and optimizes the objective function defined in (4). The image is preprocessed by a pretrained convolutional neural network (without the last classification layer) similar to the one described in [20], and the resulting image embedding is treated as if it was the first word from which the model starts generating language. The recurrent neural network generating words is an LSTM with one layer of 512 hidden units, and the input words are represented by embedding vectors of size 512. The number of words in the dictionary is 8857. We used an inverse sigmoid decay schedule for ϵi for the scheduled sampling approach. Table 1 shows the results on various metrics on the development set. Each of these metrics is a variant of estimating the overlap between the obtained sequence of words and the target one. Since there were 5 target captions per image, the best result is always chosen. To the best of our knowledge, the baseline results are consistent (slightly better) with the current state-of-the-art on that task. While dropout helped in terms of log likelihood (as expected but not shown), it had a negative impact on the real metrics. On the other hand, scheduled sampling successfully trained a model more resilient to failures due to training and inference mismatch, which likely yielded higher quality captions according to all the metrics. Ensembling models also yielded better performance, both for the baseline and the schedule sampling approach. It is also interesting to note that a model trained while always sampling from itself (hence in a regime similar to inference), dubbed Always Sampling in the table, yielded very poor performance, as expected because the model has a hard time learning the task in that case. We also trained a model with scheduled sampling, but instead of sampling from the model, we sampled from a uniform distribution, in order to verify that it was important to build on the current model and that the performance boost was not just a simple form of regularization. We called this Uniform Scheduled Sampling and the results are better than the baseline, but not as good as our proposed approach. We also experimented with flipping the coin once per sequence instead of once per token, but the results were as poor as the Always Sampling approach. 5 Table 1: Various metrics (the higher the better) on the MSCOCO development set for the image captioning task. Approach vs Metric BLEU-4 METEOR CIDER Baseline 28.8 24.2 89.5 Baseline with Dropout 28.1 23.9 87.0 Always Sampling 11.2 15.7 49.7 Scheduled Sampling 30.6 24.3 92.1 Uniform Scheduled Sampling 29.2 24.2 90.9 Baseline ensemble of 10 30.7 25.1 95.7 Scheduled Sampling ensemble of 5 32.3 25.4 98.7 It’s worth noting that we used our scheduled sampling approach to participate in the 2015 MSCOCO image captioning challenge [21] and ranked first in the final leaderboard. 4.2 Constituency Parsing Another less obvious connection with the any-to-sequence paradigm is constituency parsing. Recent work [4] has proposed an interpretation of a parse tree as a sequence of linear “operations” that build up the tree. This linearization procedure allowed them to train a model that can map a sentence onto its parse tree without any modification to the any-to-sequence formulation. The trained model has one layer of 512 LSTM cells and words are represented by embedding vectors of size 512. We used an attention mechanism similar to the one described in [22] which helps, when considering the next output token to produce yt, to focus on part of the input sequence only by applying a softmax over the LSTM state vectors corresponding to the input sequence. The input word dictionary contained around 90k words, while the target dictionary contained 128 symbols used to describe the tree. We used an inverse sigmoid decay schedule for ϵi in the scheduled sampling approach. Parsing is quite different from image captioning as the function that one has to learn is almost deterministic. In contrast to an image having a large number of valid captions, most sentences have a unique parse tree (although some very difficult cases exist). Thus, the model operates almost deterministically, which can be seen by observing that the train and test perplexities are extremely low compared to image captioning (1.1 vs. 7). This different operating regime makes for an interesting comparison, as one would not expect the baseline algorithm to make many mistakes. However, and as can be seen in Table 2, scheduled sampling has a positive effect which is additive to dropout. In this table we report the F1 score on the WSJ 22 development set [23]. We should also emphasize that there are only 40k training instances, so overfitting contributes largely to the performance of our system. Whether the effect of sampling during training helps with regard to overfitting or the training/inference mismatch is unclear, but the result is positive and additive with dropout. Once again, a model trained by always sampling from itself instead of using the groundtruth previous token as input yielded very bad results, in fact so bad that the resulting trees were often not valid trees (hence the “-” in the corresponding F1 metric). Table 2: F1 score (the higher the better) on the validation set of the parsing task. Approach F1 Baseline LSTM 86.54 Baseline LSTM with Dropout 87.0 Always Sampling Scheduled Sampling 88.08 Scheduled Sampling with Dropout 88.68 6 4.3 Speech Recognition For the speech recognition experiments, we used a slightly different setting from the rest of the paper. Each training example is an input/output pair (X, Y ), where X is a sequence of T input vectors x1, x2, · · · xT and Y is a sequence of T tokens y1, y2, · · · yT so each yt is aligned with the corresponding xt. Here, xt are the acoustic features represented by log Mel filter bank spectra at frame t, and yt is the corresponding target. The targets used were HMM-state labels generated from a GMM-HMM recipe, using the Kaldi toolkit [24] but could very well have been phoneme labels. This setting is different from the other experiments in that the model we used is the following: log P(Y |X; θ) = log P(yT 1 |xT 1 ; θ) = T X t=1 log P(yt|yt−1 1 , xt 1; θ) = T X t=1 log P(yt|ht; θ) (5) where ht is computed by a recurrent neural network as follows: ht = f(oh, S, x1; θ) if t = 1, f(ht−1, yt−1, xt; θ) otherwise. (6) where oh is a vector of 0’s with same dimensionality as ht’s and S is an extra token added to the dictionary to represent the start of each sequence. We generated data for these experiments using the TIMIT4 corpus and the KALDI toolkit as described in [25]. Standard configurations were used for the experiments - 40 dimensional log Mel filter banks and their first and second order temporal derivatives were used as inputs to each frame. 180 dimensional targets were generated for each time frame using forced alignment to transcripts using a trained GMM-HMM system. The training, validation and test sets have 3696, 400 and 192 sequences respectively, and their average length was 304 frames. The validation set was used to choose the best epoch in training, and the model parameters from that epoch were used to evaluate the test set. The trained models had two layers of 250 LSTM cells and a softmax layer, for each of five configurations - a baseline configuration where the ground truth was always fed to the model, a configuration (Always Sampling) where the model was only fed in its own predictions from the last time step, and three scheduled sampling configurations (Scheduled Sampling 1-3), where ϵi was ramped linearly from a maximum value to a minimum value over ten epochs and then kept constant at the final value. For each configuration, we trained 3 models and report average performance over them. Training of each model was done over frame targets from the GMM. The baseline configurations typically reached the best validation accuracy after approximately 14 epochs whereas the sampling models reached the best accuracy after approximately 9 epochs, after which the validation accuracy decreased. This is probably because the way we trained our models is not exact - it does not account for the gradient of the sampling probabilities from which we sampled our targets. Future effort at tackling this problem may further improve results. Testing was done by finding the best sequence from beam search decoding (using a beam size of 10 beams) and computing the error rate over the sequences. We also report the next step error rate (where the model was fed in the ground truth to predict the class of the next frame) for each of the models on the validation set to summarize the performance of the models on the training objective. Table 3 shows a summary of the results It can be seen that the baseline performs better next step prediction than the models that sample the tokens for input. This is to be expected, since the former has access to the groundtruth. However, it can be seen that the models that were trained with sampling perform better than the baseline during decoding. It can also be seen that for this problem, the “Always Sampling” model performs quite 4https://catalog.ldc.upenn.edu/LDC93S1. 7 well. We hypothesize that this has to do with the nature of the dataset. The HMM-aligned states have a lot of correlation - the same state appears as the target for several frames, and most of the states are constrained only to go to a subset of other states. Next step prediction with groundtruth labels on this task ends up paying disproportionate attention to the structure of the labels (yt−1 1 ) and not enough to the acoustics input (xt 1). Thus it achieves very good next step prediction error when the groundtruth sequence is fed in with the acoustic information, but is not able to exploit the acoustic information sufficiently when the groundtruth sequence is not fed in. For this model the testing conditions are too far from the training condition for it to make good predictions. The model that is only fed its own prediction (Always Sampling) ends up exploiting all the information it can find in the acoustic signal, and effectively ignores its own predictions to influence the next step prediction. Thus at test time, it performs just as well as it does during training. A model such as the attention model of [26] which predicts phone sequences directly, instead of the highly redundant HMM state sequences, would not suffer from this problem because it would need to exploit both the acoustic signal and the language model sufficiently to make predictions. Nevertheless, even in this setting, adding scheduled sampling still helped to improve the decoding frame error rate. Note that typically speech recognition experiments use HMMs to decode predictions from neural networks in a hybrid model. Here we avoid using an HMM altogether and hence we do not have the advantage of the smoothing that results from the HMM architecture and the language models. Thus the results are not directly comparable to the typical hybrid model results. Table 3: Frame Error Rate (FER) on the speech recognition experiments. In next step prediction (reported on validation set) the ground truth is fed in to predict the next target like it is done during training. In decoding experiments (reported on test set), beam searching is done to find the best sequence. We report results on four different linear schedulings of sampling, where ϵi was ramped down linearly from ϵs to ϵe. For the baseline, the model was only fed in the ground truth. See Section 4.3 for an analysis of the results. Approach ϵs ϵe Next Step FER Decoding FER Always Sampling 0 0 34.6 35.8 Scheduled Sampling 1 0.25 0 34.3 34.5 Scheduled Sampling 2 0.5 0 34.1 35.0 Scheduled Sampling 3 0.9 0.5 19.8 42.0 Baseline LSTM 1 1 15.0 46.0 5 Conclusion Using recurrent neural networks to predict sequences of tokens has many useful applications like machine translation and image description. However, the current approach to training them, predicting one token at a time, conditioned on the state and the previous correct token, is different from how we actually use them and thus is prone to the accumulation of errors along the decision paths. In this paper, we proposed a curriculum learning approach to slowly change the training objective from an easy task, where the previous token is known, to a realistic one, where it is provided by the model itself. Experiments on several sequence prediction tasks yield performance improvements, while not incurring longer training times. Future work includes back-propagating the errors through the sampling decisions, as well as exploring better sampling strategies including conditioning on some confidence measure from the model itself. References [1] Y. Bengio, P. Simard, and P. Frasconi. Learning long term dependencies is hard. IEEE Transactions on Neural Networks, 5(2):157–166, 1994. [2] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8), 1997. [3] I. Sutskever, O. Vinyals, and Q. Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, NIPS, 2014. [4] O. Vinyals, L. Kaiser, T. Koo, S. Petrov, I. Sutskever, and G. Hinton. Grammar as a foreign language. In arXiv:1412.7449, 2014. 8 [5] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan. Show and tell: A neural image caption generator. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2015. [6] 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 IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2015. [7] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In Proceedings of the International Conference on Machine Learning, ICML, 2009. [8] J. D. Lafferty, A. McCallum, and F. C. N. Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the Eighteenth International Conference on Machine Learning, ICML, pages 282–289, San Francisco, CA, USA, 2001. Morgan Kaufmann Publishers Inc. [9] H. Daum´e III, J. Langford, and D. Marcu. Search-based structured prediction as classification. Machine Learning Journal, 2009. [10] S. Ross, G. J. Gordon, and J. A. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the Workshop on Artificial Intelligence and Statistics, AISTATS, 2011. [11] A. Venkatraman, M. Herbert, and J. A. Bagnell. Improving multi-step prediction of learned time series models. In Twenty-Ninth AAAI Conference on Artificial Intelligence, AAAI, 2015. [12] M. Collins and B. Roark. Incremental parsing with the perceptron algorithm. In Proceedings of the Association for Computational Linguistics, ACL, 2004. [13] Y. Goldberg and J. Nivre. A dynamic oracle for arc-eager dependency parsing. In Proceedings of COLING, 2012. [14] J. Mao, W. Xu, Y. Yang, J. Wang, Z. H. Huang, and A. Yuille. Deep captioning with multimodal recurrent neural networks (m-rnn). In International Conference on Learning Representations, ICLR, 2015. [15] R. Kiros, R. Salakhutdinov, and R. Zemel. Unifying visual-semantic embeddings with multimodal neural language models. In TACL, 2015. [16] A. Karpathy and F.-F. Li. Deep visual-semantic alignments for generating image descriptions. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2015. [17] H. Fang, S. Gupta, F. Iandola, R. K. Srivastava, L. Deng, P. Dollar, J. Gao, X. He, M. Mitchell, J. C. Platt, C. L. Zitnick, and G. Zweig. From captions to visual concepts and back. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2015. [18] R. Vedantam, C. L. Zitnick, and D. Parikh. CIDEr: Consensus-based image description evaluation. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2015. [19] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Doll´ar, and C. L. Zitnick. Microsoft coco: Common objects in context. arXiv:1405.0312, 2014. [20] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the International Conference on Machine Learning, ICML, 2015. [21] Y. Cui, M. R. Ronchi, T.-Y. Lin, P. Dollr, and L. Zitnick. Microsoft coco captioning challenge. http://mscoco.org/dataset/#captions-challenge2015, 2015. [22] 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. [23] E. Hovy, M. Marcus, M. Palmer, L. Ramshaw, and R. Weischedel. Ontonotes: The 90% solution. In Proceedings of the Human Language Technology Conference of the NAACL, Short Papers, pages 57–60, New York City, USA, June 2006. Association for Computational Linguistics. [24] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannemann, P. Motlicek, Y. Qian, P. Schwarz, J. Silovsky, G. Stemmer, and K. Vesely. The kaldi speech recognition toolkit. In IEEE 2011 Workshop on Automatic Speech Recognition and Understanding. IEEE Signal Processing Society, December 2011. IEEE Catalog No.: CFP11SRW-USB. [25] N. Jaitly. Exploring Deep Learning Methods for discovering features in speech signals. PhD thesis, University of Toronto, 2014. [26] Jan Chorowski, Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. End-to-end continuous speech recognition using attention-based recurrent nn: First results. arXiv preprint arXiv:1412.1602, 2014. 9 | 2015 | 362 |
5,883 | Path-SGD: Path-Normalized Optimization in Deep Neural Networks Behnam Neyshabur Toyota Technological Institute at Chicago bneyshabur@ttic.edu Ruslan Salakhutdinov Departments of Statistics and Computer Science University of Toronto rsalakhu@cs.toronto.edu Nathan Srebro Toyota Technological Institute at Chicago nati@ttic.edu Abstract We revisit the choice of SGD for training deep neural networks by reconsidering the appropriate geometry in which to optimize the weights. We argue for a geometry invariant to rescaling of weights that does not affect the output of the network, and suggest Path-SGD, which is an approximate steepest descent method with respect to a path-wise regularizer related to max-norm regularization. Path-SGD is easy and efficient to implement and leads to empirical gains over SGD and AdaGrad. 1 Introduction Training deep networks is a challenging problem [16, 2] and various heuristics and optimization algorithms have been suggested in order to improve the efficiency of the training [5, 9, 4]. However, training deep architectures is still considerably slow and the problem has remained open. Many of the current training methods rely on good initialization and then performing Stochastic Gradient Descent (SGD), sometimes together with an adaptive stepsize or momentum term [16, 1, 6]. Revisiting the choice of gradient descent, we recall that optimization is inherently tied to a choice of geometry or measure of distance, norm or divergence. Gradient descent for example is tied to the ℓ2 norm as it is the steepest descent with respect to ℓ2 norm in the parameter space, while coordinate descent corresponds to steepest descent with respect to the ℓ1 norm and exp-gradient (multiplicative weight) updates is tied to an entropic divergence. Moreover, at least when the objective function is convex, convergence behavior is tied to the corresponding norms or potentials. For example, with gradient descent, or SGD, convergence speeds depend on the ℓ2 norm of the optimum. The norm or divergence can be viewed as a regularizer for the updates. There is therefore also a strong link between regularization for optimization and regularization for learning: optimization may provide implicit regularization in terms of its corresponding geometry, and for ideal optimization performance the optimization geometry should be aligned with inductive bias driving the learning [14]. Is the ℓ2 geometry on the weights the appropriate geometry for the space of deep networks? Or can we suggest a geometry with more desirable properties that would enable faster optimization and perhaps also better implicit regularization? As suggested above, this question is also linked to the choice of an appropriate regularizer for deep networks. Focusing on networks with RELU activations, we observe that scaling down the incoming edges to a hidden unit and scaling up the outgoing edges by the same factor yields an equivalent network 1 0 100 200 300 0 0.5 1 1.5 2 2.5 Epoch Objective Balanced Unbalanced (a) Training on MNIST 100 10-4 SGD Update 100 ~100 ~104 ~100 1 1 Rescaling 1 u v u v u v ≈ (b) Weight explosion in an unbalanced network 8 6 8 3 7 7 8 4 v u 6 1 1 1 4 2 1 1 v u 60.2 10.5 70.1 10.2 30.4 20.5 70.1 30.1 v u 60 10 0.1 10 0.4 20 0.1 0.1 v u SGD Update SGD Update ≈ Rescaling (c) Poor updates in an unbalanced network Figure 1: (a): Evolution of the cross-entropy error function when training a feed-forward network on MNIST with two hidden layers, each containing 4000 hidden units. The unbalanced initialization (blue curve) is generated by applying a sequence of rescaling functions on the balanced initializations (red curve). (b): Updates for a simple case where the input is x = 1, thresholds are set to zero (constant), the stepsize is 1, and the gradient with respect to output is δ = −1. (c): Updated network for the case where the input is x = (1, 1), thresholds are set to zero (constant), the stepsize is 1, and the gradient with respect to output is δ = (−1, −1). computing the same function. Since predictions are invariant to such rescalings, it is natural to seek a geometry, and corresponding optimization method, that is similarly invariant. We consider here a geometry inspired by max-norm regularization (regularizing the maximum norm of incoming weights into any unit) which seems to provide a better inductive bias compared to the ℓ2 norm (weight decay) [3, 15]. But to achieve rescaling invariance, we use not the max-norm itself, but rather the minimum max-norm over all rescalings of the weights. We discuss how this measure can be expressed as a “path regularizer” and can be computed efficiently. We therefore suggest a novel optimization method, Path-SGD, that is an approximate steepest descent method with respect to path regularization. Path-SGDis rescaling-invariant and we demonstrate that Path-SGDoutperforms gradient descent and AdaGrad for classifications tasks on several benchmark datasets. Notations A feedforward neural network that computes a function f : RD →RC can be represented by a directed acyclic graph (DAG) G(V, E) with D input nodes vin[1], . . . , vin[D] ∈V , C output nodes vout[1], . . . , vout[C] ∈V , weights w : E →R and an activation function σ : R →R that is applied on the internal nodes (hidden units). We denote the function computed by this network as fG,w,σ. In this paper we focus on RELU (REctified Linear Unit) activation function σRELU(x) = max{0, x}. We refer to the depth d of the network which is the length of the longest directed path in G. For any 0 ≤i ≤d, we define V i in to be the set of vertices with longest path of length i to an input unit and V i out is defined similarly for paths to output units. In layered networks V i in = V d−i out is the set of hidden units in a hidden layer i. 2 Rescaling and Unbalanceness One of the special properties of RELU activation function is non-negative homogeneity. That is, for any scalar c ≥0 and any x ∈R, we have σRELU(c · x) = c · σRELU(x). This interesting property allows the network to be rescaled without changing the function computed by the network. We define the rescaling function ρc,v(w), such that given the weights of the network w : E →R, a constant c > 0, and a node v, the rescaling function multiplies the incoming edges and divides the outgoing edges of v by c. That is, ρc,v(w) maps w to the weights ˜w for the rescaled network, where for any (u1 →u2) ∈E: ˜w(u1→u2) = c.w(u1→u2) u2 = v, 1 cw(u1→u2) u1 = v, w(u1→u2) otherwise. (1) 2 It is easy to see that the rescaled network computes the same function, i.e. fG,w,σRELU = fG,ρc,v(w),σRELU. We say that the two networks with weights w and ˜w are rescaling equivalent denoted by w ∼˜w if and only if one of them can be transformed to another by applying a sequence of rescaling functions ρc,v. Given a training set S = {(x1, yn), . . . , (xn, yn)}, our goal is to minimize the following objective function: L(w) = 1 n n X i=1 ℓ(fw(xi), yi). (2) Let w(t) be the weights at step t of the optimization. We consider update step of the following form w(t+1) = w(t) + ∆w(t+1). For example, for gradient descent, we have ∆w(t+1) = −η∇L(w(t)), where η is the step-size. In the stochastic setting, such as SGD or mini-batch gradient descent, we calculate the gradient on a small subset of the training set. Since rescaling equivalent networks compute the same function, it is desirable to have an update rule that is not affected by rescaling. We call an optimization method rescaling invariant if the updates of rescaling equivalent networks are rescaling equivalent. That is, if we start at either one of the two rescaling equivalent weight vectors ˜w(0) ∼w(0), after applying t update steps separately on ˜w(0) and w(0), they will remain rescaling equivalent and we have ˜w(t) ∼w(t). Unfortunately, gradient descent is not rescaling invariant. The main problem with the gradient updates is that scaling down the weights of an edge will also scale up the gradient which, as we see later, is exactly the opposite of what is expected from a rescaling invariant update. Furthermore, gradient descent performs very poorly on “unbalanced” networks. We say that a network is balanced if the norm of incoming weights to different units are roughly the same or within a small range. For example, Figure 1(a) shows a huge gap in the performance of SGD initialized with a randomly generated balanced network w(0), when training on MNIST, compared to a network initialized with unbalanced weights ˜w(0). Here ˜w(0) is generated by applying a sequence of random rescaling functions on w(0) (and therefore w(0) ∼˜w(0)). In an unbalanced network, gradient descent updates could blow up the smaller weights, while keeping the larger weights almost unchanged. This is illustrated in Figure 1(b). If this were the only issue, one could scale down all the weights after each update. However, in an unbalanced network, the relative changes in the weights are also very different compared to a balanced network. For example, Figure 1(c) shows how two rescaling equivalent networks could end up computing a very different function after only a single update. 3 Magnitude/Scale measures for deep networks Following [12], we consider the grouping of weights going into each node of the network. This forms the following generic group-norm type regularizer, parametrized by 1 ≤p, q ≤∞: µp,q(w) = X v∈V X (u→v)∈E w(u→v) p q/p 1/q . (3) Two simple cases of above group-norm are p = q = 1 and p = q = 2 that correspond to overall ℓ1 regularization and weight decay respectively. Another form of regularization that is shown to be very effective in RELU networks is the max-norm regularization, which is the maximum over all units of norm of incoming edge to the unit1 [3, 15]. The max-norm correspond to “per-unit” regularization when we set q = ∞in equation (4) and can be written in the following form: µp,∞(w) = sup v∈V X (u→v)∈E w(u→v) p 1/p (4) 1This definition of max-norm is a bit different than the one used in the context of matrix factorization [13]. The later is similar to the minimum upper bound over ℓ2 norm of both outgoing edges from the input units and incoming edges to the output units in a two layer feed-forward network. 3 Weight decay is probably the most commonly used regularizer. On the other hand, per-unit regularization might not seem ideal as it is very extreme in the sense that the value of regularizer corresponds to the highest value among all nodes. However, the situation is very different for networks with RELU activations (and other activation functions with non-negative homogeneity property). In these cases, per-unit ℓ2 regularization has shown to be very effective [15]. The main reason could be because RELU networks can be rebalanced in such a way that all hidden units have the same norm. Hence, per-unit regularization will not be a crude measure anymore. Since µp,∞is not rescaling invariant and the values of the scale measure are different for rescaling equivalent networks, it is desirable to look for the minimum value of a regularizer among all rescaling equivalent networks. Surprisingly, for a feed-forward network, the minimum ℓp per-unit regularizer among all rescaling equivalent networks can be efficiently computed by a single forward step. To see this, we consider the vector π(w), the path vector, where the number of coordinates of π(w) is equal to the total number of paths from the input to output units and each coordinate of π(w) is the equal to the product of weights along a path from an input nodes to an output node. The ℓp-path regularizer is then defined as the ℓp norm of π(w) [12]: φp(w) = ∥π(w)∥p = X vin[i] e1 →v1 e2 →v2... ed →vout[j] d Y k=1 wek p 1/p (5) The following Lemma establishes that the ℓp-path regularizer corresponds to the minimum over all equivalent networks of the per-unit ℓp norm: Lemma 3.1 ([12]). φp(w) = min ˜ w∼w µp,∞( ˜w) d The definition (5) of the ℓp-path regularizer involves an exponential number of terms. But it can be computed efficiently by dynamic programming in a single forward step using the following equivalent form as nested sums: φp(w) = X (vd−1→vout[j])∈E w(vd−1→vout[j]) p X (vd−2→vd−1)∈E . . . X (vin[i]→v1)∈E w(vin[i]→v1) p 1/p A straightforward consequence of Lemma 3.1 is that the ℓp path-regularizer φp is invariant to rescaling, i.e. for any ˜w ∼w, φp( ˜w) = φp(w). 4 Path-SGD: An Approximate Path-Regularized Steepest Descent Motivated by empirical performance of max-norm regularization and the fact that path-regularizer is invariant to rescaling, we are interested in deriving the steepest descent direction with respect to the path regularizer φp(w): w(t+1) = arg min w η D ∇L(w(t)), w E + 1 2
π(w) −π(w(t))
2 p (6) = arg min w η D ∇L(w(t)), w E + 1 2 X vin[i] e1 →v1 e2 →v2... ed →vout[j] d Y k=1 wek − d Y k=1 w(t) ek p 2/p = arg min w J(t)(w) The steepest descent step (6) is hard to calculate exactly. Instead, we will update each coordinate we independently (and synchronously) based on (6). That is: w(t+1) e = arg min we J(t)(w) s.t. ∀e′̸=e we′ = w(t) e′ (7) Taking the partial derivative with respect to we and setting it to zero we obtain: 0 = η ∂L ∂we (w(t)) + we −w(t) e X vin[i]··· e →...vout[j] Y e′̸=e w(t) e′ p 2/p 4 Algorithm 1 Path-SGDupdate rule 1: ∀v∈V 0 in γin(v) = 1 ▷Initialization 2: ∀v∈V 0 out γout(v) = 1 3: for i = 1 to d do 4: ∀v∈V i in γin(v) = P (u→v)∈E γin(u) w(u,v) p 5: ∀v∈V i outγout(v) = P (v→u)∈E w(v,u) p γout(u) 6: end for 7: ∀(u→v)∈E γ(w(t), (u, v)) = γin(u)2/pγout(v)2/p 8: ∀e∈Ew(t+1) e = w(t) e − η γ(w(t),e) ∂L ∂we (w(t)) ▷Update Rule where vin[i] · · · e→. . . vout[j] denotes the paths from any input unit i to any output unit j that includes e. Solving for we gives us the following update rule: ˆw(t+1) e = w(t) e − η γp(w(t), e) ∂L ∂w(w(t)) (8) where γp(w, e) is given as γp(w, e) = X vin[i]··· e →...vout[j] Y e′̸=e |we′|p 2/p (9) We call the optimization using the update rule (8) path-normalized gradient descent. When used in stochastic settings, we refer to it as Path-SGD. Now that we know Path-SGDis an approximate steepest descent with respect to the path-regularizer, we can ask whether or not this makes Path-SGDa rescaling invariant optimization method. The next theorem proves that Path-SGDis indeed rescaling invariant. Theorem 4.1. Path-SGDis rescaling invariant. Proof. It is sufficient to prove that using the update rule (8), for any c > 0 and any v ∈E, if ˜w(t) = ρc,v(w(t)), then ˜w(t+1) = ρc,v(w(t+1)). For any edge e in the network, if e is neither incoming nor outgoing edge of the node v, then ˜w(e) = w(e), and since the gradient is also the same for edge e we have ˜w(t+1) e = w(t+1) e . However, if e is an incoming edge to v, we have that ˜w(t)(e) = cw(t)(e). Moreover, since the outgoing edges of v are divided by c, we get γp( ˜w(t), e) = γp(w(t),e) c2 and ∂L ∂we ( ˜w(t)) = ∂L c∂we (w(t)). Therefore, ˜w(t+1) e = cw(t) e − c2η γp(w(t), e) ∂L c∂we (w(t)) = c w(t) − η γp(w(t), e) ∂L ∂we (w(t)) = cw(t+1) e . A similar argument proves the invariance of Path-SGDupdate rule for outgoing edges of v. Therefore, Path-SGDis rescaling invariant. Efficient Implementation: The Path-SGD update rule (8), in the way it is written, needs to consider all the paths, which is exponential in the depth of the network. However, it can be calculated in a time that is no more than a forward-backward step on a single data point. That is, in a mini-batch setting with batch size B, if the backpropagation on the mini-batch can be done in time BT, the running time of the Path-SGD on the mini-batch will be roughly (B + 1)T – a very moderate runtime increase with typical mini-batch sizes of hundreds or thousands of points. Algorithm 1 shows an efficient implementation of the Path-SGD update rule. We next compare Path-SGDto other optimization methods in both balanced and unbalanced settings. 5 Table 1: General information on datasets used in the experiments. Data Set Dimensionality Classes Training Set Test Set CIFAR-10 3072 (32 × 32 color) 10 50000 10000 CIFAR-100 3072 (32 × 32 color) 100 50000 10000 MNIST 784 (28 × 28 grayscale) 10 60000 10000 SVHN 3072 (32 × 32 color) 10 73257 26032 5 Experiments In this section, we compare ℓ2-Path-SGDto two commonly used optimization methods in deep learning, SGD and AdaGrad. We conduct our experiments on four common benchmark datasets: the standard MNIST dataset of handwritten digits [8]; CIFAR-10 and CIFAR-100 datasets of tiny images of natural scenes [7]; and Street View House Numbers (SVHN) dataset containing color images of house numbers collected by Google Street View [10]. Details of the datasets are shown in Table 1. In all of our experiments, we trained feed-forward networks with two hidden layers, each containing 4000 hidden units. We used mini-batches of size 100 and the step-size of 10−α, where α is an integer between 0 and 10. To choose α, for each dataset, we considered the validation errors over the validation set (10000 randomly chosen points that are kept out during the initial training) and picked the one that reaches the minimum error faster. We then trained the network over the entire training set. All the networks were trained both with and without dropout. When training with dropout, at each update step, we retained each unit with probability 0.5. We tried both balanced and unbalanced initializations. In balanced initialization, incoming weights to each unit v are initialized to i.i.d samples from a Gaussian distribution with standard deviation 1/ p fan-in(v). In the unbalanced setting, we first initialized the weights to be the same as the balanced weights. We then picked 2000 hidden units randomly with replacement. For each unit, we multiplied its incoming edge and divided its outgoing edge by 10c, where c was chosen randomly from log-normal distribution. The optimization results without dropout are shown in Figure 2. For each of the four datasets, the plots for objective function (cross-entropy), the training error and the test error are shown from left to right where in each plot the values are reported on different epochs during the optimization. Although we proved that Path-SGDupdates are the same for balanced and unbalanced initializations, to verify that despite numerical issues they are indeed identical, we trained Path-SGDwith both balanced and unbalanced initializations. Since the curves were exactly the same we only show a single curve. We can see that as expected, the unbalanced initialization considerably hurts the performance of SGD and AdaGrad (in many cases their training and test errors are not even in the range of the plot to be displayed), while Path-SGDperforms essentially the same. Another interesting observation is that even in the balanced settings, not only does Path-SGDoften get to the same value of objective function, training and test error faster, but also the final generalization error for Path-SGDis sometimes considerably lower than SGD and AdaGrad (except CIFAR-100 where the generalization error for SGD is slightly better compared to Path-SGD). The plots for test errors could also imply that implicit regularization due to steepest descent with respect to path-regularizer leads to a solution that generalizes better. This view is similar to observations in [11] on the role of implicit regularization in deep learning. The results for training with dropout are shown in Figure 3, where here we suppressed the (very poor) results on unbalanced initializations. We observe that except for MNIST, Path-SGDconvergences much faster than SGD or AdaGrad. It also generalizes better to the test set, which again shows the effectiveness of path-normalized updates. The results suggest that Path-SGDoutperforms SGD and AdaGrad in two different ways. First, it can achieve the same accuracy much faster and second, the implicit regularization by Path-SGDleads to a local minima that can generalize better even when the training error is zero. This can be better analyzed by looking at the plots for more number of epochs which we have provided in the supplementary material. We should also point that Path-SGD can be easily combined with AdaGrad to take 6 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 . 0 20 40 60 80 100 0 1 2 3 4 5 . 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 . 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 Epoch . 0 20 40 60 80 100 0 0.05 0.1 0.15 0.2 . 0 20 40 60 80 100 0 0.02 0.04 0.06 0.08 0.1 . 0 20 40 60 80 100 0 0.005 0.01 0.015 0.02 . 0 20 40 60 80 100 0 0.05 0.1 0.15 0.2 Epoch . 0 20 40 60 80 100 0.4 0.45 0.5 0.55 0.6 . Path−SGD − Unbalanced SGD − Balanced SGD − Unbalanced AdaGrad − Balanced AdaGrad − Unbalanced 0 20 40 60 80 100 0.65 0.7 0.75 0.8 0.85 . 0 20 40 60 80 100 0.015 0.02 0.025 0.03 0.035 . 0 20 40 60 80 100 0.14 0.15 0.16 0.17 0.18 0.19 0.2 Epoch . CIFAR-10 CIFAR-100 MNIST SVHN Cross-Entropy Training Loss 0/1 Training Error 0/1 Test Error Figure 2: Learning curves using different optimization methods for 4 datasets without dropout. Left panel displays the cross-entropy objective function; middle and right panels show the corresponding values of the training and test errors, where the values are reported on different epochs during the course of optimization. Best viewed in color. advantage of the adaptive stepsize or used together with a momentum term. This could potentially perform even better compare to Path-SGD. 6 Discussion We revisited the choice of the Euclidean geometry on the weights of RELU networks, suggested an alternative optimization method approximately corresponding to a different geometry, and showed that using such an alternative geometry can be beneficial. In this work we show proof-of-concept success, and we expect Path-SGD to be beneficial also in large-scale training for very deep convolutional networks. Combining Path-SGD with AdaGrad, with momentum or with other optimization heuristics might further enhance results. Although we do believe Path-SGD is a very good optimization method, and is an easy plug-in for SGD, we hope this work will also inspire others to consider other geometries, other regularizers and perhaps better, update rules. A particular property of Path-SGD is its rescaling invariance, which we 7 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 . 0 20 40 60 80 100 0 1 2 3 4 5 . 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 . 0 20 40 60 80 100 0 0.5 1 1.5 2 2.5 Epoch . 0 20 40 60 80 100 0 0.1 0.2 0.3 0.4 . 0 20 40 60 80 100 0 0.2 0.4 0.6 0.8 . 0 20 40 60 80 100 0 0.02 0.04 0.06 0.08 . 0 20 40 60 80 100 0 0.1 0.2 0.3 0.4 Epoch . 0 20 40 60 80 100 0.35 0.4 0.45 0.5 0.55 . Path−SGD + Dropout SGD + Dropout AdaGrad + Dropout 0 20 40 60 80 100 0.6 0.65 0.7 0.75 0.8 . 0 20 40 60 80 100 0.015 0.02 0.025 0.03 0.035 . 0 20 40 60 80 100 0.12 0.13 0.14 0.15 0.16 0.17 0.18 Epoch . CIFAR-10 CIFAR-100 MNIST SVHN Cross-Entropy Training Loss 0/1 Training Error 0/1 Test Error Figure 3: Learning curves using different optimization methods for 4 datasets with dropout. Left panel displays the cross-entropy objective function; middle and right panels show the corresponding values of the training and test errors. Best viewed in color. argue is appropriate for RELU networks. But Path-SGD is certainly not the only rescaling invariant update possible, and other invariant geometries might be even better. Path-SGD can also be viewed as a tractable approximation to natural gradient, which ignores the activations, the input distribution and dependencies between different paths. Natural gradient updates are also invariant to rebalancing but are generally computationally intractable. Finally, we choose to use steepest descent because of its simplicity of implementation. A better choice might be mirror descent with respect to an appropriate potential function, but such a construction seems particularly challenging considering the non-convexity of neural networks. Acknowledgments Research was partially funded by NSF award IIS-1302662 and Intel ICRI-CI. We thank Ryota Tomioka and Hao Tang for insightful discussions and Leon Bottou for pointing out the connection to natural gradient. 8 References [1] John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121 – 2159, 2011. [2] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010. [3] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron C. Courville, and Yoshua Bengio. Maxout networks. In Proceedings of the 30th International Conference on Machine Learning, ICML, pages 1319–1327, 2013. [4] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. arXiv preprint arXiv:1502.01852, 2015. [5] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In arXiv, 2015. [6] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [7] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Computer Science Department, University of Toronto, Tech. Rep, 1(4):7, 2009. [8] Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [9] James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In ICML, 2015. [10] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, 2011. [11] Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. In search of the real inductive bias: On the role of implicit regularization in deep learning. International Conference on Learning Representations (ICLR) workshop track, 2015. [12] Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. COLT, 2015. [13] Nathan Srebro and Adi Shraibman. Rank, trace-norm and max-norm. In Learning Theory, pages 545–560. Springer, 2005. [14] Nathan Srebro, Karthik Sridharan, and Ambuj Tewari. On the universality of online mirror descent. In Advances in neural information processing systems, pages 2645–2653, 2011. [15] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. [16] I. Sutskever, J. Martens, George Dahl, and Geoffery Hinton. On the importance of momentum and initialization in deep learning. In ICML, 2013. 9 | 2015 | 363 |
5,884 | Orthogonal NMF through Subspace Exploration Megasthenis Asteris The University of Texas at Austin megas@utexas.edu Dimitris Papailiopoulos University of California, Berkeley dimitrisp@berkeley.edu Alexandros G. Dimakis The University of Texas at Austin dimakis@austin.utexas.edu Abstract Orthogonal Nonnegative Matrix Factorization (ONMF) aims to approximate a nonnegative matrix as the product of two k-dimensional nonnegative factors, one of which has orthonormal columns. It yields potentially useful data representations as superposition of disjoint parts, while it has been shown to work well for clustering tasks where traditional methods underperform. Existing algorithms rely mostly on heuristics, which despite their good empirical performance, lack provable performance guarantees. We present a new ONMF algorithm with provable approximation guarantees. For any constant dimension k, we obtain an additive EPTAS without any assumptions on the input. Our algorithm relies on a novel approximation to the related Nonnegative Principal Component Analysis (NNPCA) problem; given an arbitrary data matrix, NNPCA seeks k nonnegative components that jointly capture most of the variance. Our NNPCA algorithm is of independent interest and generalizes previous work that could only obtain guarantees for a single component. We evaluate our algorithms on several real and synthetic datasets and show that their performance matches or outperforms the state of the art. 1 Introduction Orthogonal NMF The success of Nonnegative Matrix Factorization (NMF) in a range of disciplines spanning data mining, chemometrics, signal processing and more, has driven an extensive practical and theoretical study [1, 2, 3, 4, 5, 6, 7, 8]. Its power lies in its potential to generate meaningful decompositions of data into non-subtractive combinations of a few nonnegative parts. Orthogonal NMF (ONMF) [9] is a variant of NMF with an additional orthogonality constraint: given a real nonnegative m × n matrix M and a target dimension k, typically much smaller than m and n, we seek to approximate M by the product of an m × k nonnegative matrix W with orthogonal (w.l.o.g, orthonormal) columns, and an n × k nonnegative matrix H. In the form of an optimization, (ONMF) E⋆≜ min W≥0, H≥0 W⊤W=Ik ∥M −WH⊤∥2 F. (1) Since W is nonnegative, its columns are orthogonal if and only if they have disjoint supports. In turn, each row of M is approximated by a scaled version of a single (transposed) column of H. Despite the admittedly limited representational power compared to NMF, ONMF yields sparser partbased representations that are potentially easier to interpret, while it naturally lends itself to certain applications. In a clustering setting, for example, W serves as a cluster membership matrix and the 1 columns of H correspond to k cluster centroids [9, 10, 11]. Empirical evidence shows that ONMF performs remarkably well in certain clustering tasks, such as document classification [6, 11, 12, 13, 14, 15]. In the analysis of textual data where M is a words by documents matrix, the orthogonal columns of W can be interpreted as topics defined by disjoint subsets of words. In the case of an image dataset, with each column of M corresponding to an image evaluated on multiple pixels, each of the orthogonal base vectors highlights a disjoint segment of the image area. Nonnegative PCA For any given factor W ≥0 with orthonormal columns, the second ONMF factor H is readily determined: H = M⊤W ≥0. This follows from the fact that M is by assumption nonnegative. Based on the above, it can be shown that the ONMF problem (1) is equivalent to (NNPCA) V⋆≜ max W∈Wk ∥M⊤W∥2 F, (2) where Wk ≜ W ∈Rm×k : W ≥0, W⊤W = Ik . For arbitrary —i.e., not necessarily nonnegative— matrices M, the non-convex maximization (2) coincides with the Nonnegative Principal Component Analysis (NNPCA) problem [16]. Similarly to vanilla PCA, NNPCA seeks k orthogonal components that jointly capture most of the variance of the (centered) data in M. The nonzero entries of the extracted components, however, must be positive, which renders the problem NP-hard even in the case of a single component (k = 1) [17]. Our Contributions We present a novel algorithm for NNPCA. Our algorithm approximates the solution to (2) for any real input matrix and is accompanied with global approximation guarantees. Using the above as a building block, we develop an algorithm to approximately solve the ONMF problem (1) on any nonnegative matrix. Our algorithm outputs a solution that strictly satisfies both the nonnegativity and the orthogonality constraints. Our main results are as follows: Theorem 1. (NNPCA) For any m × n matrix M, desired number of components k, and accuracy parameter ǫ ∈(0, 1), our NNPCA algorithm computes W ∈Wk such that
M⊤W
2 F ≥(1 −ǫ) · V⋆−k · σ2 r+1(M), where σr+1(M) is the (r + 1)th singular value of M, in time TSVD(r) + O 1 ǫ r·k · k · m . Here, TSVD(r) denotes the time required to compute a rank-r approximation M of the input M using the truncated singular value decomposition (SVD). Our NNPCA algorithm operates on the low-rank matrix M. The parameter r controls a natural trade-off; higher values of r lead to tighter guarantees, but impact the running time of our algorithm. Finally, note that despite the exponential dependence in r and k, the complexity scales polynomially in the ambient dimension of the input. If the input matrix M is nonnegative, as in any instance of the ONMF problem, we can compute an approximate orthogonal nonnegative factorization in two steps: first obtain an orthogonal factor W by (approximately) solving the NNPCA problem on M, and subsequently set H = M⊤W. Theorem 2. (ONMF) For any m × n nonnegative matrix M, target dimension k, and desired accuracy ǫ ∈(0, 1), our ONMF algorithm computes an ONMF pair W, H, such that ∥M −WH⊤∥2 F ≤E⋆+ ǫ · ∥M∥2 F, in time TSVD( k ǫ ) + O 1 ǫ k2/ǫ · k · m . For any constant dimension k, Theorem 2 implies an additive EPTAS for the relative ONMF approximation error. This is, to the best our knowledge, the first general ONMF approximation guarantee since we impose no assumptions on M beyond nonnegativity. We evaluate our NNPCA and ONMF algorithms on synthetic and real datasets. As we discuss in Section 4, for several cases we show improvements compared to the previous state of the art. Related Work ONMF as a variant of NMF first appeared implicitly in [18]. The formulation in (1) was introduced in [9]. Several algorithms in a subsequent line of work [12, 13, 19, 20, 21, 22] approximately solve variants of that optimization problem. Most rely on modifying approaches for NMF to accommodate the orthogonality constraint; either exploiting the additional structural properties in the objective [13], introducing a penalization term [9], or updating the current estimate 2 in suitable directions [12], they typically reduce to a multiplicative update rule which attains orthogonality only in a limit sense. In [11], the authors suggest two alternative approaches: an EM algorithm motivated by connections to spherical k-means, and an augmented Lagrangian formulation that explicitly enforces orthogonality, but only achieves nonnegativity in the limit. Despite their good performance in practice, existing methods only guarantee local convergence. W·H⊤ ONMF W·H⊤ Sep. NMF Figure 1: ONMF and Separable NMF, upon appropriate permutation of the rows of M. In the first case, each row of M is approximated by a single row of H⊤, while in the second, by a nonnegative combination of all k rows of H⊤. A significant body of work [23, 24, 25, 26] has focused on Separable NMF, a variant of NMF partially related to ONMF. Sep. NMF seeks to decompose M into the product of two nonnegative matrices W and H⊤where W contains a permutation of the k × k identity matrix. Intuitively, the geometric picture of Sep. NMF should be quite different from that of ONMF: in the former, the rows of H⊤are the extreme rays of a convex cone enclosing all rows of M, while in the latter they should be scattered in the interior of that cone so that each row of M has one representative in small angular distance. Algebraically, ONMF factors approximately satisfy the structural requirement of Sep. NMF, but the converse is not true: a Sep. NMF solution is not a valid ONMF solution (Fig. 1). In the NNPCA front, nonnegativity as a constraint on PCA first appeared in [16], which proposed a coordinate-descent scheme on a penalized version of (2) to compute a set of nonnegative components. In [27], the authors developed a framework stemming from Expectation-Maximization (EM) on a generative model of PCA to compute a nonnegative (and optionally sparse) component. In [17], the authors proposed an algorithm based on sampling points from a low-dimensional subspace of the data covariance and projecting them on the nonnegative orthant. [27] and [17] focus on the single-component problem; multiple components can be computed sequentially employing a heuristic deflation step. Our main theoretical result is a generalization of the analysis of [17] for multiple components. Finally, note that despite the connection between the two problems, existing algorithms for ONMF are not suitable for NNPCA as they only operate on nonnegative matrices. 2 Algorithms and Guarantees 2.1 Overview We first develop an algorithm to approximately solve the NNPCA problem (2) on any arbitrary — i.e., not necessarily nonnegative— m × n matrix M. The core idea is to solve the NNPCA problem not directly on M, but a rank-r approximation M instead. Our main technical contribution is a procedure that approximates the solution to the constrained maximization (2) on a rank-r matrix within a multiplicative factor arbitrarily close to 1, in time exponential in r, but polynomial in the dimensions of the input. Our Low Rank NNPCA algorithm relies on generating a large number of candidate solutions, one of which provably achieves objective value close to optimal. The k nonnegative components W ∈Wk returned by our Low Rank NNPCA algorithm on the sketch M are used as a surrogate for the desired components of the original input M. Intuitively, the performance of the extracted nonnegative components depends on how well M is approximated by the low rank sketch M; a higher rank approximation leads to better results. However, the complexity of our low rank solver depends exponentially in the rank of its input. A natural trade-off arises between the quality of the extracted components and the running time of our NNPCA algorithm. Using our NNPCA algorithm as a building block, we propose a novel algorithm for the ONMF problem (1). In an ONMF instance, we are given an m × n nonnegative matrix M and a target dimension k < m, n, and seek to approximate M with a product WH⊤of two nonnegative matrices, where W additionally has orthonormal columns. Computing such a factorization is equivalent to solving the NNPCA problem on the nonnegative matrix M. (See Appendix A.1 for a formal argument.) Once a nonnegative orthogonal factor W is obtained, the second ONMF factor is readily determined: H = M⊤W minimizes the Frobenius approximation error in (1) for a given W. Under an appropriate configuration of the accuracy parameters, for any nonnegative m × n input M and constant target dimension k, our algorithm yields an additive EPTAS for the relative approximation error, without any additional assumptions on the input data. 3 2.2 Main Results Algorithm 1 LowRankNNPCA input real m × n rank-r matrix M, k, ǫ ∈(0, 1) output W ∈Wk ⊂Rm×k {See Lemma 1} 1: C ←{} {Candidate solutions} 2: U, Σ, V ←SVD(M, r) {Trunc. SVD} 3: for each C ∈N ⊗k ǫ/2 Sr−1 2 do 4: A ←UΣC {A ∈Rm×k} 5: c W ←LocalOptW(A) {Alg. 3} 6: C ←C ∪ c W 7: end for 8: W ←arg maxW∈C ∥M ⊤W∥2 F Low Rank NNPCA We develop an algorithm to approximately solve the NNPCA problem on an m × n real rank-r matrix M: W⋆≜arg max W∈Wk ∥M ⊤W∥. (3) The procedure, which lies in the core of our subsequent developments, is encoded in Alg. 1. We describe it in detail in Section 3. The key observation is that irrespectively of the dimensions of the input, the maximization in (3) can be reduced to k · r unknowns. The algorithm generates a large number of k-tuples of r-dimensional points; the collection of tuples is denoted by N ⊗k ǫ/2 Sr−1 2 , the kth Cartesian power of an ǫ/2-net of the r-dimensional unit sphere. Using these points, we effectively sample the column-space of the input M. Each tuple yields a feasible solution W ∈Wk through a computationally efficient subroutine (Alg. 3). The best among those candidate solutions is provably close to the optimal W⋆with respect to the objective in (2). The approximation guarantees are formally established in the following lemma. Lemma 1. For any real m×n matrix M with rank r, desired number of components k, and accuracy parameter ǫ ∈(0, 1), Algorithm 1 outputs W ∈Wk such that ∥M ⊤W∥2 F ≥(1 −ǫ) · ∥M ⊤W⋆∥2 F, where W⋆is the optimal solution defined in (3), in time TSVD(r) + O 2 ǫ r·k · k · m . Proof. (See Appendix A.2.) Nonnegative PCA Given an arbitrary real m × n matrix M, we can generate a rank-r sketch M and solve the low rank NNPCA problem on M using Algorithm 1. The output W ∈Wk of the low rank problem can be used as a surrogate for the desired components of the original input M. For simplicity, here we consider the case where M is the rank-r approximation of M obtained by the truncated SVD. Intuitively, the performance of the extracted components on the original data matrix M will depend on how well the latter is approximated by M, and in turn by the spectral decay of the input data. For example, if M exhibits a sharp spectral decay, which is frequently the case in real data, a moderate value of r suffices to obtain a good approximation. This leads to our first main theorem which formally establishes the guarantees of our NNPCA algorithm. Theorem 1. For any real m × n matrix M, let M be its best rank-r approximation. Algorithm 1 with input M, and parameters k and ǫ ∈(0, 1), outputs W ∈Wk such that
M⊤W
2 F ≥(1 −ǫ) ·
M⊤W⋆
2 F −k ·
M −M
2 2, where W⋆≜arg maxW∈Wk
M⊤W
2 F, in time TSVD(r) + O 1 ǫ r·k · k · m . Proof. The proof follows from Lemma 1. It is formally provided in Appendix A.3. Theorem 1 establishes a trade-off between the computational complexity of the proposed NNPCA approach and the tightness of the approximation guarantees; higher values of r imply smaller ∥M −M∥2 2 and in turn a tighter bound (assuming that the singular values of M decay), but have an exponential impact on the running time. Despite the exponential dependence on r and k, our approach is polynomial in the dimensions of the input M, dominated by the truncated SVD. In practice, Algorithm 1 can be terminated early returning the best computed result at the time of termination, sacrificing the theoretical approximation guarantees. In Section 4 we empirically evaluate our algorithm on real datasets and demonstrate that even for small values of r, our NNPCA algorithms significantly outperforms existing approaches. 4 Orthogonal NMF The NNPCA algorithm straightforwardly yields an algorithm for the ONMF problem (1). In an ONMF instance, the input matrix M is by assumption nonnegative. Given any m × k orthogonal nonnegative factor W, the optimal choice for the second factor is H = M⊤W. Hence, it suffices to determine W, which can be obtained by solving the NNPCA problem on M. Algorithm 2 ONMFS input : m × n real M ≥0, r, k, ǫ ∈(0, 1) 1: M ←SVD(M, r) 2: W ←LowRankNNPCA M, k, ǫ {Alg. 1} 3: H ←M⊤W output W, H The proposed ONMF algorithm is outlined in Alg. 2. Given a nonnegative m × n matrix M, we first obtain a rank-r approximation M via the truncated SVD, where r is an accuracy parameter. Using Alg. 1 on M, we compute an orthogonal nonnegative factor W ∈Wk that approximately maximizes (3) within a desired accuracy. The second ONMF factor H is readily determined as described earlier. The accuracy parameter r once again controls a trade-off between the quality of the ONMF factors and the complexity of the algorithm. We note, however, that for any target dimension k and desired accuracy parameter ǫ, setting r = ⌈k/ǫ⌉suffices to achieve an additive ǫ error on the relative approximation error of the ONMF problem. More formally, Theorem 2. For any m × n real nonnegative matrix M, target dimension k, and desired accuracy ǫ ∈(0, 1), Algorithm 2 with parameter r = ⌈k/ǫ⌉outputs an ONMF pair W, H, such that ∥M −WH⊤∥2 F ≤E⋆+ ε · ∥M∥2 F, in time TSVD( k ǫ ) + O 1 ǫ k2/ǫ · (k · m) . Proof. (See Appendix A.4.) Theorem 2 implies an additive EPTAS1 for the relative approximation error in the ONMF problem for any constant target dimension k; Algorithm 2 runs in time polynomial in the dimensions of the input M. Finally, note that it did not require any assumption on M beyond nonnegativity. 3 The Low Rank NNPCA Algorithm In this section, we re-visit Alg. 1, which plays a central role in our developments, as it is the key piece of our NNPCA and in turn our ONMF algorithm. Alg. 1 approximately solves the NNPCA problem (3) on a rank-r, m × n matrix M. It operates by producing a large, but tractable number of candidate solutions W ∈Wk, and returns the one that maximizes the objective value in (2). In the sequel, we provide a brief description of the ideas behind the algorithm. We are interested in approximately solving the low rank NNPCA problem (3). Let M = UΣV ⊤ denote the truncated SVD of M. For any W ∈Rm×k, ∥M ⊤W∥2 F = ∥ΣU ⊤W∥2 F = k X j=1 ∥ΣU ⊤wj∥2 2 = k X j=1 max cj∈Sr−1 2 wj, UΣcj 2, (4) where Sr−1 2 denotes the r-dimensional ℓ2-unit sphere. Let C denote the r × k variable formed by stacking the unit-norm vectors cj, j = 1, . . . , k. The key observation is that for a given C, we can efficiently compute a W ∈Wk that maximizes the right-hand side of (4). The procedure for that task is outlined in Alg. 3. Hence, the NNPCA problem (3) is reduced to determining the optimal value of the low-dimensional variable C. But, first let us we provide a brief description of Alg. 3. 1 Additive EPTAS (Efficient Polynomial Time approximation Scheme [28, 29]) refers to an algorithm that can approximate the solution of an optimization problem within an arbitrarily small additive error ǫ and has complexity that scales polynomially in the input size n, but possibly exponentially in 1/ǫ. EPTAS is more efficient than a PTAS because it enforces a polynomial dependency on n for any ǫ, i.e., a running time f(1/ǫ) · p(n), where p(n) is polynomial. For example, a running time of O(n 1/ǫ) is considered PTAS, but not EPTAS. 5 Algorithm 3 LocalOptW input : real m × k matrix A output c W = arg maxW∈Wk Pk j=1 wj, aj 2 1: CW ←{} 2: for each s ∈{±1}k do 3: A′ ←A · diag(s) 4: Ij ←{}, j = 1, . . . , k 5: for i = 1 . . . , m do 6: j⋆←arg maxj A′ ij 7: if A′ ij⋆≥0 then 8: Ij⋆←Ij⋆∪{i} 9: end if 10: end for 11: W ←0m×k 12: for j = 1, . . . , k do 13: [wj]Ij ←[a′ j]Ij/∥[a′ j]Ij∥ 14: end for 15: CW ←CW ∪W 16: end for 17: c W ←arg maxW∈CW Pk j=1 wj, aj 2 For a fixed r × k matrix C, Algorithm 3 computes c W ≜arg max W∈Wk k X j=1 wj, aj 2, (5) where A≜UΣC. The challenge is to determine the support of the optimal solution c W; if an oracle revealed the optimal supports Ij, j = 1, . . . , k of its columns, then the exact value of the nonzero entries would be determined by the Cauchy-Schwarz inequality, and the contribution of the jth summand in (5) would be equal to P i∈Ij A2 ij. Due to the nonnegativity constrains in Wk, the optimal support Ij of the jth column must contain indices corresponding to only nonnegative or nonpositive entries of aj, but not a combination of both. Algorithm 3 considers all 2k possible sign combinations for the support sets implicitly by solving (5) on all 2k matrices A′ = A · diag(s), s ∈{±1}k. Hence, we may assume without loss of generality that all support sets correspond to nonnegative entries of A. Moreover, if index i ∈[m] is assigned to Ij, then the contribution of the entire ith row of A to the objective is equal to A2 ij. Based on the above, Algorithm 3 constructs the collection of the support sets by assigning index i to Ij if and only if Aij is nonnegative and the largest among the entries of the ith row of A. The algorithm runs in time2 O(2k · k · m) and guarantees that the output is the optimal solution to (5). A more formal analysis of the Alg. 3 is provided in Section A.5. Thus far, we have seen that any given value of C can be associated with a feasible solution W ∈Wk via the maximization (5) and Alg. 3. If we could efficiently consider all possible values in the (continuous) domain of C, we would be able to recover the pair that maximizes (4) and, in turn, the optimal solution of (3). However, that is not possible. Instead, we consider a fine discretization of the domain of C and settle for an approximate solution. In particular, let Nǫ(Sr−1 2 ) denote a finite ǫ-net of the r-dimensional ℓ2-unit sphere; for any point in Sr−1 2 , the net contains a point within distance ǫ from the former. (see Appendix C for the construction of such a net). Further, let [Nǫ(Sr−1 2 )]⊗k denote the kth Cartesian power of the previous net; the latter is a collection of r × k matrices C. Alg. 1 operates on this collection: for each C it identifies a candidate solution W ∈Wk via the maximization (5) using Algorithm 3. By the properties of the ǫ-nets, it can be shown that at least one of the computed candidate solutions must attain an objective value close to the optimal of (3). The guarantees of Alg. 1 are formally established in Lemma 1. A detailed analysis of the algorithm is provided in the corresponding proof in Appendix A.2. This completes the description of our algorithmic developments. 4 Experimental Evaluation NNPCA We compare our NNPCA algorithm against three existing approaches: NSPCA [16], EM [27] and NNSPAN [17] on real datasets. NSPCA computes multiple nonnegative, but not necessarily orthogonal components; a parameter α penalizes the overlap among their supports. We set a high penalty (α = 1e10) to promote orthogonality. EM and NNSPAN compute only a single nonnegative component. Multiple components are computed consecutively, interleaving an appropriate deflation step. To ensure orthogonality, the deflation step effectively zeroes out the variables used in previously extracted components. Finally, note that both the EM and NSPCA algorithms are randomly initialized. All depicted values are the best results over multiple random restarts. For our algorithm, we use a sketch of rank r = 4 of the (centered) input data. Further we apply an early termination criterion; execution is terminated if no improvement is observed in a number of consecutive iterations (samples). This can only hurt the performance of our algorithm. 2 When used as a subroutine in Alg. 1, Alg. 3 can be simplified into an O(k · m) procedure (lines 4-14). 6 Components 1 2 3 4 5 6 7 8 Cumulative Expl. Variance 0 1 2 3 4 5 6 7 +59:95% NNSPCA EM NNSPAN ONMFS (a) # Target Components 2 3 4 5 6 7 8 Cumulative Expl. Variance 0 1 2 3 4 5 6 7 +1.26% +3.76% +19.87% +32.96% +42.64% +52.15% +59.95% ONMFS NNSPAN EM NNSPCA (b) Figure 2: Cumul. variance captured by k nonnegative components; CBCL dataset [30]. In Fig. 2(a), we set k = 8 and plot the cumul. variance versus the number of components. EM and NNSPAN extract components greedily; first components achieve high value, but subsequent ones contribute less to the objective. Our algorithm jointly optimizes the k = 8 components, achieving a 59.95% improvement over the second best method. Fig. 2(b) depicts the cumul. variance for various values of k. We note the percentage improvement of our algorithm over the second best method. CBCL Dataset. The CBCL dataset [30] contains 2429, 19 × 19 pixel, gray scale face images. It has been used in the evaluation of all three methods [16, 17, 27]. We extract k orthogonal nonnegative components using all methods and compare the total explained variance, i.e., the objective in (2). We note that input data has been centered and it is hence not nonnegative. Fig. 2(a) depicts the cumulative explained variance versus the number of components for k = 8. EM and NNSPAN extract components greedily with a deflation step; the first component achieves high value, but subsequent ones contribute less to the total variance. On the contrary, our algorithm jointly optimizes the k = 8 components, achieving an approximately 60% increase in the total variance compared to the second best method. We repeat the experiment for k = 2, . . . , 8. Fig. 2(b) depicts the total variance captured by each method for each value of k. Our algorithm significantly outperforms the existing approaches. Additional Datasets. We solve the NNPCA problem on various datasets obtained from [31]. We arbitrarily set the target number of components to k = 5 and configure our algorithm to use a rank-4 sketch of the input. Table 1 lists the total variance captured by the extracted components for each method. Our algorithm consistently outperforms the other approaches. ONMF We compare our algorithm with several state-of-the-art ONMF algorithms i) the O-PNMF algorithm of [13] (for 1000 iterations), and ii) the more recent ONP-MF iii) EM-ONMF algorithms of [11, 32] (for 1000 iterations). We also compare to clustering methods (namely, vanilla and spherical k-means) since such algorithms also yield an approximate ONMF. NSPCA EM NNSPAN ONMFS AMZN COM. REV (1500×10000) 5.44e + 01 7.32e + 03 7.32e + 03 7.86e + 03 (+7.37%) ARCENCE TRAIN (100×10000) 4.96e + 04 3.01e + 07 3.00e + 07 3.80e + 07 (+26.7%) ISOLET-5 (1559×617) 5.83e −01 3.54e + 01 3.55e + 01 4.55e + 01 (+28.03%) LEUKEMIA (72×12582) 3.02e + 07 7.94e + 09 8.02e + 09 1.04e + 10 (+29.57%) MFEAT PIX (2000×240) 2.00e + 01 3.20e + 02 3.25e + 02 5.24e + 02 (+61.17%) LOW RES. SPEC. (531×100) 3.98e + 06 2.29e + 08 2.29e + 08 2.41e + 08 (+5.34%) BOW:KOS (3430×6906) 4.96e −02 2.96e + 01 3.00e + 01 4.59e + 01 (+52.95%) Table 1: Total variance captured by k = 5 nonnegative components on various datasets [31]. For each dataset, we list (#samples×#variables) and the variance captured by each method; higher values are better. Our algorithm (labeled ONMFS) operates on a rank-4 sketch in all cases, and consistently achieves the best results. We note the percentage improvement over the second best method. 7 p (Noise power) 10-2 10-1 100 kM ! WH>k2 F=kMk2 F 0 0.05 0.1 0.15 0.2 0.25 K-means Sp. K-means O-PNMF ONP-MF EM-ONMF ONMFS Figure 3: Relative Frob. approximation error on synthetic data. Data points (samples) are generated by randomly scaling and adding noise to one of five base points that have been randomly selected from the unit hypercube in 100 dimensions. We run ONMF methods with target dimension k = 5. Our algorithm is labeled as ONMFS. Synthetic data. We generate a synthetic dataset as follows. We select five base vectors cj, j = 1, . . . , 5 randomly and independently from the unit hypercube in 100 dimensions. Then, we generate data points xi = ai ·cj +p·ni, for some j ∈{1, . . . , 5}, where ai ∼U([0.1, 1]), ni ∼N(0, I), and p is a parameter controlling the noise variance. Any negative entries of xi are set to zero. We vary p in [10−2, 1]. For each p value, we compute an approximate ONMF on 10 randomly generated datasets and measure the relative Frobenius approximation error. For the methods that involved random initialization, we run 10 averaging iterations per MonteCarlo trial. Our algorithm is configured to operate on a rank-5 sketch. Figure 3 depicts the relative error achieved by each method (averaged over the random trials) versus the noise variance p. Our algorithm, labeled ONMFS achieves competitive or higher accuracy for most values in the range of p. Real Datasets. We apply the ONMF algorithms on various nonnegative datasets obtained from [31]. We arbitrarily set the target number of components to k = 6. Table 2 lists the relative Frobenius approximation error achieved by each algorithm. We note that on the text datasets (e.g., Bag of Words [31]) we run the algorithms on the uncentered word-by-document matrix. Our algorithm performs competitively compared to other methods. 5 Conclusions We presented a novel algorithm for approximately solving the ONMF problem on a nonnegative matrix. Our algorithm relied on a new method for solving the NNPCA problem. The latter jointly optimizes multiple orthogonal nonnegative components and provably achieves an objective value close to optimal. Our ONMF algorithm is the first one to be equipped with theoretical approximation guarantees; for a constant target dimension k, it yields an additive EPTAS for the relative approximation error. Empirical evaluation on synthetic and real datasets demonstrates that our algorithms outperform or match existing approaches in both problems. Acknowledgments DP is generously supported by NSF awards CCF-1217058 and CCF-1116404 and MURI AFOSR grant 556016. This research has been supported by NSF Grants CCF 1344179, 1344364, 1407278, 1422549 and ARO YIP W911NF-14-1-0258. K-MEANS O-PNMF ONP-MF EM-ONMF ONMFS AMZN COM. REV (10000×1500) 0.0547 0.1153 0.1153 0.0467 0.0462(5) ARCENCE TRAIN (100×10000) 0.0837 − 0.1250 0.0856 0.0788(4) MFEAT PIX (2000×240) 0.2489 0.2974 0.3074 0.2447 0.2615 (4) PEMS TRAIN (267×138672) 0.1441 0.1439 0.1380 0.1278 0.1283 (5) BOW:KOS (3430×6906) 0.8193 0.7692 0.7671 0.7671 0.7609(4) BOW:ENRON (28102×39861) 0.9946 − 0.6728 0.7148 0.6540(4) BOW:NIPS (1500×12419) 0.8137 0.7277 0.7277 0.7375 0.7252(5) BOW:NYTIMES (102660×3 · 105) − − 0.9199 0.9238 0.9199(5) Table 2: ONMF approximation error on nonnegative datasets [31]. For each dataset, we list the size (#samples×#variables) and the relative Frobenius approximation error achieved by each method; lower values are better. We arbitrarily set the target dimension k = 6. Dashes (-) denote an invalid solution/non-convergence. For our method, we note in parentheses the approximation rank r used. 8 References [1] Daniel D Lee and H Sebastian Seung. Algorithms for non-negative matrix factorization. In Advances in neural information processing systems, pages 556–562, 2000. [2] Gershon Buchsbaum and Orin Bloch. Color categories revealed by non-negative matrix factorization of munsell color spectra. Vision research, 42(5):559–563, 2002. [3] Farial Shahnaz, Michael W Berry, V Paul Pauca, and Robert J Plemmons. Document clustering using nonnegative matrix factorization. Information Processing & Management, 42(2):373–386, 2006. [4] Chih-Jen Lin. Projected gradient methods for nonnegative matrix factorization. Neural computation, 19(10):2756–2779, 2007. [5] Andrzej Cichocki, Rafal Zdunek, Anh Huy Phan, and Shun-ichi Amari. Nonnegative matrix and tensor factorizations: applications to exploratory multi-way data analysis and blind source separation. John Wiley & Sons, 2009. [6] Victor Bittorf, Benjamin Recht, Christopher Re, and Joel A Tropp. Factoring nonnegative matrices with linear programs. Advances in Neural Information Processing Systems, 25:1223–1231, 2012. [7] Nicolas Gillis and Stephen A Vavasis. Fast and robust recursive algorithms for separable nonnegative matrix factorization. arXiv preprint arXiv:1208.1237, 2012. [8] K Huang, ND Sidiropoulos, and A Swamiy. Nmf revisited: New uniqueness results and algorithms. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 4524–4528. IEEE, 2013. [9] Chris Ding, Tao Li, Wei Peng, and Haesun Park. Orthogonal nonnegative matrix t-factorizations for clustering. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 126–135. ACM, 2006. [10] Tao Li and Chris Ding. The relationships among various nonnegative matrix factorization methods for clustering. In Data Mining, 2006. ICDM’06. Sixth International Conference on, pages 362–371. IEEE, 2006. [11] Filippo Pompili, Nicolas Gillis, P-A Absil, and Franc¸ois Glineur. Two algorithms for orthogonal nonnegative matrix factorization with application to clustering. arXiv preprint arXiv:1201.0901, 2012. [12] Seungjin Choi. Algorithms for orthogonal nonnegative matrix factorization. In Neural Networks, 2008. IJCNN 2008.(IEEE World Congress on Computational Intelligence). IEEE International Joint Conference on, pages 1828–1832. IEEE, 2008. [13] Zhirong Yang and Erkki Oja. Linear and nonlinear projective nonnegative matrix factorization. Neural Networks, IEEE Transactions on, 21(5):734–749, 2010. [14] Da Kuang, Haesun Park, and Chris HQ Ding. Symmetric nonnegative matrix factorization for graph clustering. In SDM, volume 12, pages 106–117. SIAM, 2012. [15] Zhirong Yang, Tele Hao, Onur Dikmen, Xi Chen, and Erkki Oja. Clustering by nonnegative matrix factorization using graph random walk. In Advances in Neural Information Processing Systems, pages 1088–1096, 2012. [16] Ron Zass and Amnon Shashua. Nonnegative sparse pca. In Advances in Neural Information Processing Systems 19, pages 1561–1568, Cambridge, MA, 2007. MIT Press. [17] Megasthenis Asteris, Dimitris Papailiopoulos, and Alexandros Dimakis. Nonnegative sparse pca with provable guarantees. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1728–1736, 2014. [18] Zhijian Yuan and Erkki Oja. Projective nonnegative matrix factorization for image compression and feature extraction. In Image Analysis, pages 333–342. Springer, 2005. [19] Hualiang Li, T¨ulay Adal, Wei Wang, Darren Emge, and Andrzej Cichocki. Non-negative matrix factorization with orthogonality constraints and its application to raman spectroscopy. The Journal of VLSI Signal Processing Systems for Signal, Image, and Video Technology, 48(1-2):83–97, 2007. [20] Bin Cao, Dou Shen, Jian-Tao Sun, Xuanhui Wang, Qiang Yang, and Zheng Chen. Detect and track latent factors with online nonnegative matrix factorization. In IJCAI, volume 7, pages 2689–2694, 2007. [21] Xin Li, William KW Cheung, Jiming Liu, and Zhili Wu. A novel orthogonal nmf-based belief compression for pomdps. In Proceedings of the 24th international conference on Machine learning, pages 537–544. ACM, 2007. [22] Gang Chen, Fei Wang, and Changshui Zhang. Collaborative filtering using orthogonal nonnegative matrix tri-factorization. Information Processing & Management, 45(3):368–379, 2009. [23] NA Gillis and S Vavasis. Fast and robust recursive algorithms for separable nonnegative matrix factorization. IEEE transactions on pattern analysis and machine intelligence, 2013. [24] Sanjeev Arora, Rong Ge, Yoni Halpern, David Mimno, Ankur Moitra, David Sontag, Yichen Wu, and Michael Zhu. A practical algorithm for topic modeling with provable guarantees. arXiv preprint arXiv:1212.4777, 2012. [25] Sanjeev Arora, Rong Ge, Ravindran Kannan, and Ankur Moitra. Computing a nonnegative matrix factorization–provably. In Proceedings of the 44th symposium on Theory of Computing, pages 145–162, 2012. [26] Abhishek Kumar, Vikas Sindhwani, and Prabhanjan Kambadur. Fast conical hull algorithms for near-separable non-negative matrix factorization. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 231–239, 2013. [27] Christian D. Sigg and Joachim M. Buhmann. Expectation-maximization for sparse and non-negative pca. In Proceedings of the 25th International Conference on Machine Learning, ICML ’08, pages 960–967, New York, NY, USA, 2008. ACM. [28] Liming Cai, Michael Fellows, David Juedes, and Frances Rosamond. On efficient polynomial-time approximation schemes for problems on planar structures. Journal of Computer and System Sciences, 2003. [29] Marco Cesati and Luca Trevisan. On the efficiency of polynomial time approximation schemes. Information Processing Letters, 64(4):165–171, 1997. [30] Kah-Kay Sung. Learning and example selection for object and pattern recognition. PhD thesis, PhD thesis, MIT, Artificial Intelligence Laboratory and Center for Biological and Computational Learning, Cambridge, MA, 1996. [31] M. Lichman. UCI machine learning repository, 2013. [32] Filippo Pompili, Nicolas Gillis, Pierre-Antoine Absil, and Franc¸ois Glineur. Onp-mf: An orthogonal nonnegative matrix factorization algorithm with application to clustering. In ESANN 2013, 2013. [33] K. Bache and M. Lichman. UCI machine learning repository, 2013. 9 | 2015 | 364 |
5,885 | M-Statistic for Kernel Change-Point Detection Shuang Li, Yao Xie H. Milton Stewart School of Industrial and Systems Engineering Georgian Institute of Technology sli370@gatech.edu yao.xie@isye.gatech.edu Hanjun Dai, Le Song Computational Science and Engineering College of Computing Georgia Institute of Technology hanjundai@gatech.edu lsong@cc.gatech.edu Abstract Detecting the emergence of an abrupt change-point is a classic problem in statistics and machine learning. Kernel-based nonparametric statistics have been proposed for this task which make fewer assumptions on the distributions than traditional parametric approach. However, none of the existing kernel statistics has provided a computationally efficient way to characterize the extremal behavior of the statistic. Such characterization is crucial for setting the detection threshold, to control the significance level in the offline case as well as the average run length in the online case. In this paper we propose two related computationally efficient M-statistics for kernel-based change-point detection when the amount of background data is large. A novel theoretical result of the paper is the characterization of the tail probability of these statistics using a new technique based on change-ofmeasure. Such characterization provides us accurate detection thresholds for both offline and online cases in computationally efficient manner, without the need to resort to the more expensive simulations such as bootstrapping. We show that our methods perform well in both synthetic and real world data. 1 Introduction Detecting the emergence of abrupt change-points is a classic problem in statistics and machine learning. Given a sequence of samples, x1, x2, . . . , xt, from a domain X, we are interested in detecting a possible change-point ⌧, such that before ⌧, the samples xi ⇠P i.i.d. for i ⌧, where P is the so-called background distribution, and after the change-point, the samples xi ⇠Q i.i.d. for i ≥⌧+1, where Q is a post-change distribution. Here the time horizon t can be either a fixed number t = T0 (called an offline or fixed-sample problem), or t is not fixed and we keep getting new samples (called a sequential or online problem). Our goal is to detect the existence of the change-point in the offline setting, or detect the emergence of a change-point as soon as possible after it occurs in the online setting. We will restrict our attention to detecting one change-point, which arises often in monitoring problems. One such example is the seismic event detection [9], where we would like to detect the onset of the event precisely in retrospect to better understand earthquakes or as quickly as possible from the streaming data. Ideally, the detection algorithm can also be robust to distributional assumptions as we wish to detect all kinds of seismic events that are different from the background. Typically we have a large amount of background data (since seismic events are rare), and we want the algorithm to exploit these data while being computationally efficient. Classical approaches for change-point detection are usually parametric, meaning that they rely on strong assumptions on the distribution. Nonparametric and kernel approaches are distribution free and more robust as they provide consistent results over larger classes of data distributions (they can possibly be less powerful in settings where a clear distributional assumption can be made). In particular, many kernel based statistics have been proposed in the machine learning literature [5, 2, 18, 6, 7, 1] which typically work better in real data with few assumptions. However, none of these existing kernel statistics has provided a computationally efficient way to characterize 1 the tail probability of the extremal value of these statistics. Characterization such tail probability is crucial for setting the correct detection thresholds for both the offline and online cases. Furthermore, efficiency is also an important consideration since typically the amount of background data is very large. In this case, one has the freedom to restructure and sample the background data during the statistical design to gain computational efficiency. On the other hand, change-point detection problems are related to the statistical two-sample test problems; however, they are usually more difficult in that for change-point detection, we need to search for the unknown change-point location ⌧. For instance, in the offline case, this corresponds to taking a maximum of a series of statistics each corresponding to one putative change-point location (a similar idea was used in [5] for the offline case), and in the online case, we have to characterize the average run length of the test statistic hitting the threshold, which necessarily results in taking a maximum of the statistics over time. Moreover, the statistics being maxed over are usually highly correlated. Hence, analyzing the tail probabilities of the test statistic for change-point detection typically requires more sophisticated probabilistic tools. In this paper, we design two related M-statistics for change-point detection based on kernel maximum mean discrepancy (MMD) for two-sample test [3, 4]. Although MMD has a nice unbiased and minimum variance U-statistic estimator (MMDu), it can not be directly applied since MMDu costs O(n2) to compute based on a sample of n data points. In the change-point detection case, this translates to a complexity quadratically grows with the number of background observations and the detection time horizon t. Therefore, we adopt a strategy inspired by the recently developed B-test statistic [17] and design a O(n) statistic for change-point detection. At a high level, our methods sample N blocks of background data of size B, compute quadratic-time MMDu of each reference block with the post-change block, and then average the results. However, different from the simple two-sample test case, in order to provide an accurate change-point detection threshold, the background block needs to be designed in a novel structured way in the offline setting and updated recursively in the online setting. Besides presenting the new M-statistics, our contributions also include: (1) deriving accurate approximations to the significance level in the offline case, and average run length in the online case, for our M-statistics, which enable us to determine thresholds efficiently without recurring to the onerous simulations (e.g. repeated bootstrapping); (2) obtaining a closed-form variance estimator which allows us to form the M-statistic easily; (3) developing novel structured ways to design background blocks in the offline setting and rules for update in the online setting, which also leads to desired correlation structures of our statistics that enable accurate approximations for tail probability. To approximate the asymptotic tail probabilities, we adopt a highly sophisticated technique based on change-of-measure, recently developed in a series of paper by Yakir and Siegmund et al. [16]. The numerical accuracy of our approximations are validated by numerical examples. We demonstrate the good performance of our method using real speech and human activity data. We also find that, in the two-sample testing scenario, it is always beneficial to increase the block size B as the distribution for the statistic under the null and the alternative will be better separated; however, this is no longer the case in online change-point detection, because a larger block size inevitably causes a larger detection delay. Finally, we point to future directions to relax our Gaussian approximation and correct for the skewness of the kernel-based statistics. 2 Background and Related Work We briefly review kernel-based methods and the maximum mean discrepancy. A reproducing kernel Hilbert space (RKHS) F on X with a kernel k(x, x0) is a Hilbert space of functions f(·) : X 7! R with inner product h·, ·iF. Its element k(x, ·) satisfies the reproducing property: hf(·), k(x, ·)iF = f(x), and consequently, hk(x, ·), k(x0, ·)iF = k(x, x0), meaning that we can view the evaluation of a function f at any point x 2 X as an inner product. Assume there are two sets with n observations from a domain X, where X = {x1, x2, . . . , xn} are drawn i.i.d. from distribution P, and Y = {y1, y2, . . . , yn} are drawn i.i.d. from distribution Q. The maximum mean discrepancy (MMD) is defined as [3] MMD0[F, P, Q] := supf2F {Ex[f(x)] −Ey[f(y)]} . An unbiased estimate of MMD2 0 can be obtained using U-statistic MMD2 u[F, X, Y ] = 1 n(n −1) n X i,j=1,i6=j h(xi, xj, yi, yj), (1) 2 where h(·) is the kernel of the U-statistic defined as h(xi, xj, yi, yj) = k(xi, xj) + k(yi, yj) − k(xi, yj) −k(xj, yi). Intuitively, the empirical test statistic MMD2 u is expected to be small (close to zero) if P = Q, and large if P and Q are far apart. The complexity for evaluating (1) is O(n2) since we have to form the so-called Gram matrix for the data. Under H0 (P = Q), the U-statistic is degenerate and distributed the same as an infinite sum of Chi-square variables. To improve the computational efficiency and obtain an easy-to-compute threshold for hypothesis testing, recently, [17] proposed an alternative statistic for MMD2 0 called B-test. The key idea of the approach is to partition the n samples from P and Q into N non-overlapping blocks, X1, . . . , XN and Y1, . . . , YN, each of constant size B. Then MMD2 u[F, Xi, Yi] is computed for each pair of blocks and averaged over the N blocks to result in MMD2 B[F, X, Y ] = 1 N PN i=1 MMD2 u[F, Xi, Yi]. Since B is constant, N ⇠O(n), and the computational complexity of MMD2 B[F, X, Y ] is O(B2n), a significant reduction compared to MMD2 u[F, X, Y ]. Furthermore, by averaging MMD2 u[F, Xi, Yi] over independent blocks, the B-statistic is asymptotically normal leveraging over the central limit theorem. This latter property also allows a simple threshold to be derived for the two-sample test rather than resorting to more expensive bootstrapping approach. Our later statistics are inspired by B-statistic. However, the change-point detection setting requires significant new derivations to obtain the test threshold since one cares about the maximum of MMD2 B[F, X, Y ] computed at different point in time. Moreover, the change-point detection case consists of a sum of highly correlated MMD statistics, because these MMD2 B are formed with a common test block of data. This is inevitable in our change-point detection problems because test data is much less than the reference data. Hence, we cannot use the central limit theorem (even a martingale version), but have to adopt the aforementioned change-of-measure approach. Related work. Other nonparametric change-point detection approach has been proposed in the literature. In the offline setting, [5] designs a kernel-based test statistic, based on a so-called running maximum partition strategy to test for the presence of a change-point; [18] studies a related problem in which there are s anomalous sequences out of n sequences to be detected and they construct a test statistic using MMD. In the online setting, [6] presents a meta-algorithm that compares data in some “reference window” to the data in the current window, using some empirical distance measures (not kernel-based); [1] detects abrupt changes by comparing two sets of descriptors extracted online from the signal at each time instant: the immediate past set and the immediate future set; based on soft margin single-class support vector machine (SVM), they build a dissimilarity measure (which is asymptotically equivalent to the Fisher ratio in the Gaussian case) in the feature space between those sets without estimating densities as an intermediate step; [7] uses a density-ratio estimation to detect change-point, and models the density-ratio using a non-parametric Gaussian kernel model, whose parameters are updated online through stochastic gradient decent. The above work lack theoretical analysis for the extremal behavior of the statistics or average run length. 3 M-statistic for offline and online change-point detection Give a sequence of observations {. . . , x−2, x−1, x0, x1, . . . , xt}, xi 2 X, with {. . . , x−2, x−1, x0} denoting the sequence of background (or reference) data. Assume a large amount of reference data is available. Our goal is to detect the existence of a change-point ⌧, such that before the change-point, samples are i.i.d. with a distribution P, and after the change-point, samples are i.i.d. with a different distribution Q. The location ⌧where the change-point occurs is unknown. We may formulate this problem as a hypothesis test, where the null hypothesis states that there is no change-point, and the alternative hypothesis is that there exists a change-point at some time ⌧. We will construct our kernel-based M-statistic using the maximum mean discrepancy (MMD) to measure the difference between distributions of the reference and the test data. We denote by Y the block of data which potentially contains a change-point (also referred to as the post-change block or test block). In the offline setting, we assume the size of Y can be up to Bmax, and we want to search for a location of the change-point ⌧within Y such that observations after ⌧ are from a different distribution. Inspired by the idea of B-test [17], we sample N reference blocks of size Bmax independently from the reference pool, and index them as XBmax i , i = 1, . . . , N. Since we search for a location B (2 B Bmax) within Y for a change-point, we construct sub-block from Y by taking B contiguous data points, and denote them as Y B. To form the statistic, we correspondingly construct sub-blocks from each reference block by taking B contiguous data points out of that block, and index these sub-blocks as X(B) i (illustrated in Fig. 1(a)). We then compute 3 …… time B B B B B 2 2 2 2 2 …… Block containing potential change point MMDu2 XN Bmax , Y(Bmax Pool of reference data XN Bmax X3 Bmax X2 Bmax X1 Bmax Y Bmax 𝑡 Bmax Bmax Bmax Bmax Bmax time …… …… Pool of reference data sample sample Pool of reference data Block containing potential change point MMDu2 𝑋𝑖 𝐵0,𝑡, 𝑌(𝐵0,𝑡 Xi B0,t Xi B0,t+1 Y(B0,t Y(B0,t+1 𝑡 𝑡+ 1 𝐵0 (a): offline (b): sequential Figure 1: Illustration of (a) offline case: data are split into blocks of size Bmax, indexed backwards from time t, and we consider blocks of size B, B = 2, . . . , Bmax; (b) online case. Assuming we have large amount of reference or background data that follows the null distribution. MMD2 u between (X(B) i , Y (B)), and average over blocks ZB := 1 N N X i=1 MMD2 u(X(B) i , Y (B)) = 1 NB(B −1) N X i=1 B X j,l=1,j6=l h(X(B) i,j , X(B) i,l , Y (B) j , Y (B) l ), (2) where XB i,j denotes the jth sample in X(B) i , and Y (B) j denotes the j th sample in Y B. Due to the property of MMD2 u, under the null hypothesis, E[ZB] = 0. Let Var[ZB] denote the variance of ZB under the null. The expression of ZB is given by (6) in the following section. We see the variance depends on the block size B and the number of blocks N. As B increases Var[ZB] decreases (also illustrated in Figure 5 in the appendix). Considering this, we standardize the statistic, maximize over all values of B to define the offline M-statistic, and detect a change-point whenever the M-statistic exceeds the threshold b > 0: M := max B2{2,3,...,Bmax} ZB/ p Var[ZB] | {z } Z0 B > b, {offline change-point detection} (3) where varying the block-size from 2 to Bmax corresponds to searching for the unknown change-point location. In the online setting, suppose the post-change block Y has size B0 and we construct it using a sliding window. In this case, the potential change-point is declared as the end of each block Y . To form the statistic, we take NB0 samples without replacement (since we assume the reference data are i.i.d.with distribution P) from the reference pool to form N reference blocks, compute the quadratic MMD2 u statistics between each reference block and the post-change block, and then average them. When there is a new sample (time moves from t to t + 1), we append the new sample in the reference block, remove the oldest sample from the post-change block, and move it to the reference pool. The reference blocks are also updated accordingly: the end point of each reference block is moved to the reference pool, and a new point is sampled and appended to the front of each reference block, as shown in Fig. 1(b). Using the sliding window scheme described above, similarly, we may define an online M-statistic by forming a standardized average of the MMD2 u between the post-change block in a sliding window and the reference block: ZB0,t := 1 N N X i=1 MMD2 u(X(B0,t) i , Y (B0,t)), (4) where B0 is the fixed block-size, X(B0,t) i is the ith reference block of size B0 at time t, and Y (B0,t) is the the post-change block of size B0 at time t. In the online case, we have to characterize the average run length of the test statistic hitting the threshold, which necessarily results in taking a maximum of the statistics over time. The online change-point detection procedure is a stopping time, where we detect a change-point whenever the normalized ZB0,t exceeds a pre-determined threshold b > 0: T = inf{t : ZB0,t/ p Var[ZB0] | {z } Mt > b}. {online change-point detection} (5) Note in the online case, we actually take a maximum of the standardized statistics over time. There is a recursive way to calculate the online M-statistic efficiently, explained in Section A in the appendix. At the stopping time T, we claim that there exists a change-point. There is a tradeoff in choosing the block size B0 in online setting: a small block size will incur a smaller computational cost, which may be important for the online case, and it also enables smaller detection delay for strong change4 point magnitude; however, the disadvantage of a small B0 is a lower power, which corresponds to a longer detection delay when the change-point magnitude is weak (for example, the amplitude of the mean shift is small). Examples of offline and online M-statistics are demonstrated in Fig. 2 based on synthetic data and a segment of the real seismic signal. We see that the proposed offline M-statistic powerfully detects the existence of a change-point and accurately pinpoints where the change occurs; the online M-statistic quickly hits the threshold as soon as the change happens. 0 100 200 300 400 500 −10 −5 0 5 10 Time Signal 0 100 200 300 400 500 0 5 10 B Statistic Normal (0,1) b=3.34 0 100 200 300 400 500 −10 −5 0 5 10 Time Signal 0 100 200 300 400 500 0 5 10 B Statistic Peak Normal (0,1) Laplace (0,1) b=3.34 0 100 200 300 400 500 −10 0 10 Time Signal 0 100 200 300 400 500 0 5 10 Time Statistic b=3.55 Normal (0,1) Laplace (0,1) 200 400 600 800 1000 −100 −50 0 50 100 Time Seismic Signal 200 400 600 800 1000 0 50 100 Time Statistic Bandw=Med Bandw=100Med Bandw=0.1Med b=3.55 (a): Offline, null (b): Offline, ⌧= 250 (c): Online, ⌧= 250 (d) seismic signal Figure 2: Examples of offline and online M-statistic with N = 5: (a) and (b), offline case without and with a change-point (Bmax = 500 and the maximum is obtained when B = 263); (c) online case with a change-point at ⌧= 250, stopping-time T = 268 (detection delay is 18), and we use B0 = 50; (d) a real seismic signal and M-statistic with different kernel bandwidth. All thresholds are theoretical values and are marked in red. 4 Theoretical Performance Analysis We obtain an analytical expression for the variance Var[ZB] in (3) and (5), by leveraging the correspondence between the MMD2 u statistics and U-statistic [11] (since ZB is some form of U-statistic), and exploiting the known properties of U-statistic. We also derive the covariance structure for the online and offline standardized ZB statistics, which is crucial for proving theorems 3 and 4. Lemma 1 (Variance of ZB under the null.) Given any fixed block size B and number of blocks N, under the null hypothesis, Var[ZB] = ✓B 2 ◆−1 1 N E[h2(x, x0, y, y0)] + N −1 N Cov [h(x, x0, y, y0), h(x00, x000, y, y0)] + , (6) where x, x0, x00, x000, y, and y0 are i.i.d. with the null distribution P. Lemma 1 suggests an easy way to estimate the variance Var[ZB] from the reference data. To estimate (6), we need to first estimate E[h2(x, x0, y, y0)], by each time drawing four samples without replacement from the reference data, use them for x, x0, y, y0, evaluate the sampled function value, and then form a Monte Carlo average. Similarly, we may estimate Cov [h(x, x0, y, y0), h(x00, x000, y, y0)]. Lemma 2 (Covariance structure of the standardized ZB statistics.) Under the null hypothesis, given u and v in [2, Bmax], for the offline case ru,v := Cov (Z0 u, Z0 v) = s✓u 2 ◆✓v 2 ◆-✓u _ v 2 ◆ , (7) where u _ v = max{u, v}, and for the online case, r0 u,v := Cov(Mu, Mu+s) = (1 −s B0 )(1 − s B0 −1), for s ≥0. In the offline setting, the choice of the threshold b involves a tradeoff between two standard performance metrics: (i) the significant level (SL), which is the probability that the M-statistic exceeds the threshold b under the null hypothesis (i.e., when there is no change-point); and (ii) power, which is the probability of the statistic exceeds the threshold under the alternative hypothesis. In the online setting, there are two analogous performance metrics commonly used for analyzing change-point detection procedures [15]: (i) the expected value of the stopping time when there is no change, the average run length (ARL); (ii) the expected detection delay (EDD), defined to be the expected stopping time in the extreme case where a change occurs immediately at ⌧= 0. We focus on analyzing SL and ARL of our methods, since they play key roles in setting thresholds. We derive accurate approximations to these quantities as functions of the threshold b, so that given a prescribed SL or 5 ARL, we can solve for the corresponding b analytically. Let P1 and E1 denote, respectively, the probability measure and expectation under the null. Theorem 3 (SL in offline case.) When b ! 1 and b/pBmax ! c for some constant c, the significant level of the offline M-statistic defined in (3) is given by P1 ( max B2{2,3,...,Bmax} ZB p Var[ZB] > b ) = b2e−1 2 b2· Bmax X B=2 (2B −1) 2 p 2⇡B(B −1)⌫ b s 2B −1 B(B −1) ! +o(1), (8) where the special function ⌫(u) ⇡ (2/u)(Φ(u/2)−0.5) (u/2)Φ(u/2)+φ(u/2), φ is the probability density function and Φ(x) is the cumulative distribution function of the standard normal distribution, respectively. The proof of theorem 3 uses a change-of-measure argument, which is based on the likelihood ratio identity (see, e.g., [12, 16]). The likelihood ratio identity relates computing of the tail probability under the null to computing a sum of expectations each under an alternative distribution indexed by a particular parameter value. To illustrate, assume the probability density function (pdf) under the null is f(u). Given a function g!(x), with ! in some index set ⌦,, we may introduce a family of alternative distributions with pdf f!(u) = e✓g!(u)− !(✓)f(u), where !(✓) := log R e✓g!(u)f(u)du is the log moment generating function, and ✓is the parameter that we may assign an arbitrary value. It can be easily verified that f!(u) is a pdf. Using this family of alternative, we may calculate the probability of an event A under the original distribution f, by calculating a sum of expectations: P{A} = E P !2⌦e`! P s2⌦e`s ; A + = X !2⌦ E![e`!; A], where E[U; A] := E[UI{A}], the indicator function I{A} is one when event A is true and zero otherwise, E! is the expectation using pdf f!(u), `! = log[f(u)/f!(u)] = ✓g!(u) − !(✓), is the log-likelyhood ratio, and we have the freedom to choose a different ✓value for each f!. The basic idea of change-of-measure in our setting is to treat Z0 B := ZB/Var[ZB], as a random field indexed by B. Then to characterize SL, we need to study the tail probability of the maximum of this random field. Relate this to the setting above, Z0 B corresponds to g!(u), B corresponds to !, and A corresponds to the threshold crossing event. To compute the expectations under the alternative measures, we will take a few steps. First, we choose a parameter value ✓B for each pdf associated with a parameter value B, such that ˙ B(✓B) = b. This is equivalent to setting the mean under each alternative probability to the threshold b: EB[Z0 B] = b and it allows us to use the local central limit theorem since under the alternative measure boundary cross has much larger probability. Second, we will express the random quantities involved in the expectations, as a functions of the so-called local field terms: {`B −`s : s = B, B ± 1, . . .}, as well as the re-centered log-likelihood ratios: ˜`B = `B −b. We show that they are asymptotically independent as b ! 1 and b grows on the order of p B, and this further simplifies our calculation. The last step is to analyze the covariance structure of the random field (Lemma 2 in the following), and approximate it using a Gaussian random field. Note that the terms Z0 u and Z0 v have non-negligible correlation due to our construction: they share the same post-change block Y (B). We then apply the localization theorem (Theorem 5.2 in [16]) to obtain the final result. Theorem 4 (ARL in online case.) When b ! 1 and b/pB0 ! c0 for some constant c0, the average run length (ARL) of the stopping time T defined in (5) is given by E1[T] = eb2/2 b2 · ( (2B0 −1) p 2⇡B0(B0 −1) · ⌫ b s 2(2B0 −1) B0(B0 −1) !)−1 + o(1). (9) Proof for Theorem 4 is similar to that for Theorem 3, due to the fact that for a given m > 0, P1{T m} = P1 ⇢ max 1tm Mt > b 4 . (10) Hence, we also need to study the tail probability of the maximum of a random field Mt = ZB0,t/ p ZB0,t for a fixed block size B0. A similar change-of-measure approach can be used, except that the covariance structure of Mt in the online case is slightly different from the offline case. This tail probability turns out to be in a form of P1{T m} = mλ + o(1). Using similar argu6 ments as those in [13, 14], we may see that T is asymptotically exponentially distributed. Hence, P1{T m} −[1 −exp(−λm)] ! 0. Consequently E1{T} ⇠λ−1, which leads to (9). Theorem 4 shows that ARL ⇠O(eb2) and, hence, b ⇠O(plog ARL). On the other hand, the EDD is typically on the order of b/∆using the Wald’s identity [12] (although a more careful analysis should be carried out in the future work), where ∆is the Kullback-Leibler (KL) divergence between the null and alternative distributions (on a order of a constant). Hence, given a desired ARL (typically on the order of 5000 or 10000), the error made in the estimated threshold will only be translated linearly to EDD. This is a blessing to us and it means typically a reasonably accurate b will cause little performance loss in EDD. Similarly, Theorem 3 shows that SL ⇠O(e−b2) and a similar argument can be made for the offline case. 5 Numerical examples We test the performance of the M-statistic using simulation and real world data. Here we only highlight the main results. More details can be found in Appendix C. In the following examples, we use a Gaussian kernel: k(Y, Y 0) = exp 5 −kY −Y 0k2/2σ26 , where σ > 0 is the kernel bandwidth and we use the “median trick” [10, 8] to get the bandwidth which is estimated using the background data. Accuracy of Lemma 1 for estimating Var[ZB]. Fig. 5 in the appendix shows the empirical distributions of ZB when B = 2 and B = 200, when N = 5. In both cases, we generate 10000 random instances, which are computed from data following N(0, I), I 2 R20⇥20 to represent the null distribution. Moreover, we also plot the Gaussian pdf with sample mean and sample variance, which matches well with the empirical distribution. Note the approximation works better when the block size decreases. (The skewness of the statistic can be corrected; see discussions in Section 7). Accuracy of theoretical results for estimating threshold. For the offline case, we compare the thresholds obtained from numerical simulations, bootstrapping, and using our approximation in Theorem 3, for various SL values ↵. We choose the maximum block size to be Bmax = 20. In the appendix, Fig. 6(a) demonstrates how a threshold is obtained by simulation, for ↵= 0.05, the threshold b = 2.88 corresponds to the 95% quantile of the empirical distribution of the offline Mstatistic. For a range of b values, Fig. 6(b) compares the empirical SL value ↵from simulation with that predicted by Theorem 3, and shows that theory is quite accurate for small ↵, which is desirable as we usually care of small ↵’s to obtain thresholds. Table 1 shows that our approximation works quite well to determine thresholds given ↵’s: thresholds obtained by our theory matches quite well with that obtained from Monte Carlo simulation (the null distribution is N(0, I), I 2 R20⇥20), and even from bootstrapping for a real data scenario. Here, the “bootstrap” thresholds are for a speech signal from the CENSREC-1-C dataset. In this case, the null distribution P is unknown, and we only have 3000 samples speech signals. Thus we generate bootstrap samples to estimate the threshold, as shown in Fig. 7 in the appendix. These b’s obtained from theoretical approximations have little performance degradation, and we will discuss how to improve in Section 7. Table 1: Comparison of thresholds for offline case, determined by simulation, bootstrapping and theory respectively, for various SL value ↵. ↵ Bmax = 10 Bmax = 20 Bmax = 50 b (sim) b (boot) b (the) b (sim) b (boot) b (the) b (sim) b (boot) b (the) 0.20 1.78 1.77 2.00 1.97 2.29 2.25 2.21 2.47 2.48 0.15 2.02 2.05 2.18 2.18 2.63 2.41 2.44 2.78 2.62 0.10 2.29 2.45 2.40 2.47 3.09 2.60 2.70 3.25 2.80 For the online case, we also compare the thresholds obtained from simulation (using 5000 instances) for various ARL and from Theorem 4, respectively. As predicated by theory, the threshold is consistently accurate for various null distributions (shown in Fig. 3). Also note from Fig. 3 that the precision improves as B0 increases. The null distributions we consider include N(0, 1), exponential distribution with mean 1, a Erdos-Renyi random graph with 10 nodes and probability of 0.2 of forming random edges, and Laplace distribution. Expected detection delays (EDD). In the online setting, we compare EDD (with the assumption ⌧= 0) of detecting a change-point when the signal is 20 dimensional and the transition happens 7 0 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 ARL(104) b Gaussian(0,I) Exp(1) Random Graph (Node=10, p=0.2) Laplace(0,1) Theory 0 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 ARL(104) b Gaussian(0,I) Exp(1) Random Graph (Node=10, p=0.2) Laplace(0,1) Theory 0 0.2 0.4 0.6 0.8 1 1 2 3 4 5 6 7 ARL(104) b Gaussian(0,I) Exp(1) Random Graph (Node=10, p=0.2) Laplace(0,1) Theory (a): B0 = 10 (b): B0 = 50 (c): B0 = 200 Figure 3: In online case, for a range of ARL values, comparison b obtained from simulation and from Theorem 4 under various null distributions. from a zero-mean Gaussian N(0, I20) to a non-zero mean Gaussian N(µ, I20), where the postchange mean vector µ is element-wise equal to a constant mean shift. In this setting, Fig. 10(a) demonstrates the tradeoff in choosing a block size: when block size is too small the statistical power of the M-statistic is weak and hence EDD is large; on the other hand, when block size is too large, although statistical power is good, EDD is also large because the way we update the test block. Therefore, there is an optimal block size for each case. Fig. 10(b) shows the optimal block size decreases as the mean shift increases, as expected. 6 Real-data We test the performance of our M-statistics using real data. Our datasets include: (1) CENSREC1-C: a real-world speech dataset in the Speech Resource Consortium (SRC) corpora provided by National Institute of Informatics (NII)1; (2) Human Activity Sensing Consortium (HASC) challenge 2011 data2. We compare our M-statistic with a state-of-the-art algorithm, the relative densityratio (RDR) estimate [7] (one limitation of the RDR algorithm, however, is that it is not suitable for high-dimensional data because estimating density ratio in the high-dimensional setting is illposed). To achieve reasonable performance for the RDR algorithm, we adjust the bandwidth and the regularization parameter at each time step and, hence, the RDR algorithm is computationally more expensive than the M-statistics method. We use the Area Under Curve (AUC) [7] (the larger the better) as a performance metric. Our M-statistics have competitive performance compared with the baseline RDR algorithm in the real data testing. Here we report the main results and the details can be found in Appendix D. For the speech data, our goal is to detect the onset of speech signal emergent from the background noise (the background noises are taken from real acoustic signals, such as background noise in highway, airport and subway stations). The overall AUC for the Mstatistic is .8014 and for the baseline algorithm is .7578. For human activity detection data, we aim at detection the onset of transitioning from one activity to another. Each data consists of human activity information collected by portable three-axis accelerometers. The overall AUC for the M-statistic is .8871 and for the baseline algorithm is .7161. 7 Discussions We may be able to improve the precision of the tail probability approximation in theorems 3 and 4 to account for skewness of Z0 B. In the change-of-measurement argument, we need to choose parameter values ✓B such that ˙ B(✓B) = b. Currently, we use a Gaussian assumption Z0 B ⇠N(0, 1) and, hence, B(✓) = ✓2/2, and ✓B = b. We may improve the precision if we are able to estimate skewness (Z0 B) for Z0 B. In particular, we can include the skewness in the log moment generating function approximation B(✓) ⇡✓2/2+(Z0 B)✓3/6 when we estimate the change-of-measurement parameter: setting the derivative of this to b and solving a quadratic equation (Z0 B)✓2/2 + ✓= b for ✓0 B. This will change the leading exponent term in (8) from e−b2/2 to be e 0 B(✓0 B)−✓0 Bb. A similar improvement can be done for the ARL approximation in Theorem 4. Acknowledgments This research was supported in part by CMMI-1538746 and CCF-1442635 to Y.X.; NSF/NIH BIGDATA 1R01GM108341, ONR N00014-15-1-2340, NSF IIS-1218749, NSF CAREER IIS-1350983 to L.S.. 1 Available from http://research.nii.ac.jp/src/en/CENSREC-1-C.html 2 Available from http://hasc.jp/hc2011 8 References [1] F. Desobry, M. Davy, and C. Doncarli. An online kernel change detection algorithm. IEEE Trans. Sig. Proc., 2005. [2] F. Enikeeva and Z. Harchaoui. High-dimensional change-point detection with sparse alternatives. arXiv:1312.1900, 2014. [3] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Sch¨olkopf, and Alexander Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(1):723–773, 2012. [4] Z. Harchaoui, F. Bach, O. Cappe, and E. Moulines. Kernel-based methods for hypothesis testing. IEEE Sig. Proc. Magazine, pages 87–97, 2013. [5] Z. Harchaoui, F. Bach, and E. Moulines. Kernel change-point analysis. In Adv. in Neural Information Processing Systems 21 (NIPS 2008), 2008. [6] D. Kifer, S. Ben-David, and J. Gehrke. Detecting change in data streams. In Proc. of the 30th VLDB Conf., 2004. [7] Song Liu, Makoto Yamada, Nigel Collier, and Masashi Sugiyama. Change-point detection in time-series data by direct density-ratio estimation. Neural Networks, 43:72–83, 2013. [8] Aaditya Ramdas, Sashank Jakkam Reddi, Barnab´as P´oczos, Aarti Singh, and Larry Wasserman. On the decreasing power of kernel and distance based nonparametric hypothesis tests in high dimensions. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. [9] Z. E. Ross and Y. Ben-Zion. Automatic picking of direct P, S seismic phases and fault zone head waves. Geophys. J. Int., 2014. [10] Bernhard Scholkopf and Alexander J Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2001. [11] R. J. Serfling. U-Statistics. Approximation theorems of mathematical statistics. John Wiley & Sons, 1980. [12] D. Siegmund. Sequential analysis: tests and confidence intervals. Springer, 1985. [13] D. Siegmund and E. S. Venkatraman. Using the generalized likelihood ratio statistic for sequential detection of a change-point. Ann. Statist., (23):255–271, 1995. [14] D. Siegmund and B. Yakir. Detecting the emergence of a signal in a noisy image. Stat. Interface, (1):3–12, 2008. [15] Y. Xie and D. Siegmund. Sequential multi-sensor change-point detection. Annals of Statistics, 41(2):670–692, 2013. [16] B. Yakir. Extremes in random fields: A theory and its applications. Wiley, 2013. [17] W. Zaremba, A. Gretton, and M. Blaschko. B-test: low variance kernel two-sample test. In Adv. Neural Info. Proc. Sys. (NIPS), 2013. [18] S. Zou, Y. Liang, H. V. Poor, and X. Shi. Nonparametric detection of anomalous data via kernel mean embedding. arXiv:1405.2294, 2014. 9 | 2015 | 365 |
5,886 | Active Learning from Weak and Strong Labelers Chicheng Zhang UC San Diego chichengzhang@ucsd.edu Kamalika Chaudhuri UC San Diego kamalika@eng.ucsd.edu Abstract An active learner is given a hypothesis class, a large set of unlabeled examples and the ability to interactively query labels to an oracle of a subset of these examples; the goal of the learner is to learn a hypothesis in the class that fits the data well by making as few label queries as possible. This work addresses active learning with labels obtained from strong and weak labelers, where in addition to the standard active learning setting, we have an extra weak labeler which may occasionally provide incorrect labels. An example is learning to classify medical images where either expensive labels may be obtained from a physician (oracle or strong labeler), or cheaper but occasionally incorrect labels may be obtained from a medical resident (weak labeler). Our goal is to learn a classifier with low error on data labeled by the oracle, while using the weak labeler to reduce the number of label queries made to this labeler. We provide an active learning algorithm for this setting, establish its statistical consistency, and analyze its label complexity to characterize when it can provide label savings over using the strong labeler alone. 1 Introduction An active learner is given a hypothesis class, a large set of unlabeled examples and the ability to interactively make label queries to an oracle on a subset of these examples; the goal of the learner is to learn a hypothesis in the class that fits the data well by making as few oracle queries as possible. As labeling examples is a tedious task for any one person, many applications of active learning involve synthesizing labels from multiple experts who may have slightly different labeling patterns. While a body of recent empirical work [27, 28, 29, 25, 26, 11] has developed methods for combining labels from multiple experts, little is known on the theory of actively learning with labels from multiple annotators. For example, what kind of assumptions are needed for methods that use labels from multiple sources to work, when these methods are statistically consistent, and when they can yield benefits over plain active learning are all open questions. This work addresses these questions in the context of active learning from strong and weak labelers. Specifically, in addition to unlabeled data and the usual labeling oracle in standard active learning, we have an extra weak labeler. The labeling oracle is a gold standard – an expert on the problem domain – and it provides high quality but expensive labels. The weak labeler is cheap, but may provide incorrect labels on some inputs. An example is learning to classify medical images where either expensive labels may be obtained from a physician (oracle), or cheaper but occasionally incorrect labels may be obtained from a medical resident (weak labeler). Our goal is to learn a classifier in a hypothesis class whose error with respect to the data labeled by the oracle is low, while exploiting the weak labeler to reduce the number of queries made to this oracle. Observe that in our model the weak labeler can be incorrect anywhere, and does not necessarily provide uniformly noisy labels everywhere, as was assumed by some previous works [7, 23]. 1 A plausible approach in this framework is to learn a difference classifier to predict where the weak labeler differs from the oracle, and then use a standard active learning algorithm which queries the weak labeler when this difference classifier predicts agreement. Our first key observation is that this approach is statistically inconsistent; false negative errors (that predict no difference when O and W differ) lead to biased annotation for the target classification task. We address this problem by learning instead a cost-sensitive difference classifier that ensures that false negative errors rarely occur. Our second key observation is that as existing active learning algorithms usually query labels in localized regions of space, it is sufficient to train the difference classifier restricted to this region and still maintain consistency. This process leads to significant label savings. Combining these two ideas, we get an algorithm that is provably statistically consistent and that works under the assumption that there is a good difference classifier with low false negative error. We analyze the label complexity of our algorithm as measured by the number of label requests to the labeling oracle. In general we cannot expect any consistent algorithm to provide label savings under all circumstances, and indeed our worst case asymptotic label complexity is the same as that of active learning using the oracle alone. Our analysis characterizes when we can achieve label savings, and we show that this happens for example if the weak labeler agrees with the labeling oracle for some fraction of the examples close to the decision boundary. Moreover, when the target classification task is agnostic, the number of labels required to learn the difference classifier is of a lower order than the number of labels required for active learning; thus in realistic cases, learning the difference classifier adds only a small overhead to the total label requirement, and overall we get label savings over using the oracle alone. Related Work. There has been a considerable amount of empirical work on active learning where multiple annotators can provide labels for the unlabeled examples. One line of work assumes a generative model for each annotator’s labels. The learning algorithm learns the parameters of the individual labelers, and uses them to decide which labeler to query for each example. [28, 29, 12] consider separate logistic regression models for each annotator, while [18, 19] assume that each annotator’s labels are corrupted with a different amount of random classification noise. A second line of work [11, 15] that includes Pro-Active Learning, assumes that each labeler is an expert over an unknown subset of categories, and uses data to measure the class-wise expertise in order to optimally place label queries. In general, it is not known under what conditions these algorithms are statistically consistent, particularly when the modeling assumptions do not strictly hold, and under what conditions they provide label savings over regular active learning. [24], the first theoretical work to consider this problem, consider a model where the weak labeler is more likely to provide incorrect labels in heterogeneous regions of space where similar examples have different labels. Their formalization is orthogonal to ours – while theirs is more natural in a non-parametric setting, ours is more natural for fitting classifiers in a hypothesis class. In a NIPS 2014 Workshop paper, [20] have also considered learning from strong and weak labelers; unlike ours, their work is in the online selective sampling setting, and applies only to linear classifiers and robust regression. [10] study learning from multiple teachers in the online selective sampling setting in a model where different labelers have different regions of expertise. Finally, there is a large body of theoretical work [1, 8, 9, 13, 30, 2, 4] on learning a binary classifier based on interactive label queries made to a single labeler. In the realizable case, [21, 8] show that a generalization of binary search provides an exponential improvement in label complexity over passive learning. The problem is more challenging, however, in the more realistic agnostic case, where such approaches lead to inconsistency. The two styles of algorithms for agnostic active learning are disagreement-based active learning (DBAL) [1, 9, 13, 4] and the more recent marginbased or confidence-based active learning [2, 30]. Our algorithm builds on recent work in DBAL [4, 14]. 2 Preliminaries The Model. We begin with a general framework for actively learning from weak and strong labelers. In the standard active learning setting, we are given unlabelled data drawn from a distribution U over an input space X , a label space Y = {−1,1}, a hypothesis class H , and a labeling oracle O to which we can make interactive queries. 2 In our setting, we additionally have access to a weak labeling oracle W which we can query interactively. Querying W is significantly cheaper than querying O; however, querying W generates a label yW drawn from a conditional distribution PW(yW|x) which is not the same as the conditional distribution PO(yO|x) of O. Let D be the data distribution over labelled examples such that: PD(x,y) = PU(x)PO(y|x). Our goal is to learn a classifier h in the hypothesis class H such that with probability ≥1−δ over the sample, we have: PD(h(x) = y) ≤minh′∈H PD(h′(x) = y)+ε, while making as few (interactive) queries to O as possible. Observe that in this model W may disagree with the oracle O anywhere in the input space; this is unlike previous frameworks [7, 23] where labels assigned by the weak labeler are corrupted by random classification noise with a higher variance than the labeling oracle. We believe this feature makes our model more realistic. Second, unlike [24], mistakes made by the weak labeler do not have to be close to the decision boundary. This keeps the model general and simple, and allows greater flexibility to weak labelers. Our analysis shows that if W is largely incorrect close to the decision boundary, then our algorithm will automatically make more queries to O in its later stages. Finally note that O is allowed to be non-realizable with respect to the target hypothesis class H . Background on Active Learning Algorithms. The standard active learning setting is very similar to ours, the only difference being that we have access to the weak oracle W. There has been a long line of work on active learning [1, 6, 8, 13, 2, 9, 4, 30]. Our algorithms are based on a style called disagreement-based active learning (DBAL). The main idea is as follows. Based on the examples seen so far, the algorithm maintains a candidate set Vt of classifiers in H that is guaranteed with high probability to contain h∗, the classifier in H with the lowest error. Given a randomly drawn unlabeled example xt, if all classifiers in Vt agree on its label, then this label is inferred; observe that with high probability, this inferred label is h∗(xt). Otherwise, xt is said to be in the disagreement region of Vt, and the algorithm queries O for its label. Vt is updated based on xt and its label, and algorithm continues. Recent works in DBAL [9, 4] have observed that it is possible to determine if an xt is in the disagreement region of Vt without explicitly maintaining Vt. Instead, a labelled dataset St is maintained; the labels of the examples in St are obtained by either querying the oracle or direct inference. To determine whether an xt lies in the disagreement region of Vt, two constrained ERM procedures are performed; empirical risk is minimized over St while constraining the classifier to output the label of xt as 1 and −1 respectively. If these two classifiers have similar training errors, then xt lies in the disagreement region of Vt; otherwise the algorithm infers a label for xt that agrees with the label assigned by h∗. More Definitions and Notation. The error of a classifier h under a labelled data distribution Q is defined as: errQ(h) = P(x,y)∼Q(h(x) = y); we use the notation err(h,S) to denote its empirical error on a labelled data set S. We use the notation h∗to denote the classifier with the lowest error under D and ν to denote its error errD(h∗), where D is the target labelled data distribution. Our active learning algorithm implicitly maintains a (1 −δ)-confidence set for h∗throughout the algorithm. Given a set S of labelled examples, a set of classifiers V(S) ⊆H is said to be a (1−δ)confidence set for h∗with respect to S if h∗∈V with probability ≥1−δ over S. The disagreement between two classifiers h1 and h2 under an unlabelled data distribution U, denoted by ρU(h1,h2), is Px∼U(h1(x) = h2(x)). Observe that the disagreements under U form a pseudometric over H . We use BU(h,r) to denote a ball of radius r centered around h in this metric. The disagreement region of a set V of classifiers, denoted by DIS(V), is the set of all examples x ∈X such that there exist two classifiers h1 and h2 in V for which h1(x) = h2(x). 3 Algorithm Our main algorithm is a standard single-annotator DBAL algorithm with a major modification: when the DBAL algorithm makes a label query, we use an extra sub-routine to decide whether this query should be made to the oracle or the weak labeler, and make it accordingly. How do we make this 3 decision? We try to predict if weak labeler differs from the oracle on this example; if so, query the oracle, otherwise, query the weak labeler. Key Idea 1: Cost Sensitive Difference Classifier. How do we predict if the weak labeler differs from the oracle? A plausible approach is to learn a difference classifier hd f in a hypothesis class H d f to determine if there is a difference. Our first key observation is when the region where O and W differ cannot be perfectly modeled by H d f , the resulting active learning algorithm is statistically inconsistent. Any false negative errors (that is, incorrectly predicting no difference) made by difference classifier leads to biased annotation for the target classification task, which in turn leads to inconsistency. We address this problem by instead learning a cost-sensitive difference classifier and we assume that a classifier with low false negative error exists in H d f . While training, we constrain the false negative error of the difference classifier to be low, and minimize the number of predicted positives (or disagreements between W and O) subject to this constraint. This ensures that the annotated data used by the active learning algorithm has diminishing bias, thus ensuring consistency. Key Idea 2: Localized Difference Classifier Training. Unfortunately, even with cost-sensitive training, directly learning a difference classifier accurately is expensive. If d′ is the VC-dimension of the difference hypothesis class H d f , to learn a target classifier to excess error ε, we need a difference classifier with false negative error O(ε), which, from standard generalization theory, requires ˜O(d′/ε) labels [5, 22]! Our second key observation is that we can save on labels by training the difference classifier in a localized manner – because the DBAL algorithm that builds the target classifier only makes label queries in the disagreement region of the current confidence set for h∗. Therefore we train the difference classifier only on this region and still maintain consistency. Additionally this provides label savings because while training the target classifier to excess error ε, we need to train a difference classifier with only ˜O(d′φk/ε) labels where φk is the probability mass of this disagreement region. The localized training process leads to an additional technical challenge: as the confidence set for h∗is updated, its disagreement region changes. We address this through an epoch-based DBAL algorithm, where the confidence set is updated and a fresh difference classifier is trained in each epoch. Main Algorithm. Our main algorithm (Algorithm 1) combines these two key ideas, and like [4], implicitly maintains the (1 −δ)-confidence set for h∗by through a labeled dataset ˆSk. In epoch k, the target excess error is εk ≈1 2k , and the goal of Algorithm 1 is to generate a labeled dataset ˆSk that implicitly represents a (1−δk)-confidence set on h∗. Additionally, ˆSk has the property that the empirical risk minimizer over it has excess error ≤εk. A naive way to generate such an ˆSk is by drawing ˜O(d/ε2 k ) labeled examples, where d is the VC dimension of H . Our goal, however, is to generate ˆSk using a much smaller number of label queries, which is accomplished by Algorithm 5. This is done in two ways. First, like standard DBAL, we infer the label of any x that lies outside the disagreement region of the current confidence set for h∗. Algorithm 4 identifies whether an x lies in this region. Second, for any x in the disagreement region, we determine whether O and W agree on x using a difference classifier; if there is agreement, we query W, else we query O. The difference classifier used to determine agreement is retrained in the beginning of each epoch by Algorithm 2, which ensures that the annotation has low bias. The algorithms use a constrained ERM procedure CONS-LEARN. Given a hypothesis class H, a labeled dataset S and a set of constraining examples C, CONS-LEARNH(C,S) returns a classifier in H that minimizes the empirical error on S subject to h(xi) = yi for each (xi,yi) ∈C. Identifying the Disagreement Region. Algorithm 4 (deferred to the Appendix) identifies if an unlabeled example x lies in the disagreement region of the current (1 −δ)-confidence set for h∗; recall that this confidence set is implicitly maintained through ˆSk. The identification is based on two ERM queries. Let ˆh be the empirical risk minimizer on the current labeled dataset ˆSk−1, and ˆh′ be the empirical risk minimizer on ˆSk−1 under the constraint that ˆh′(x) = −ˆh(x). If the training errors of ˆh and ˆh′ are very different, then, all classifiers with training error close to that of ˆh assign the same label to x, and x lies outside the current disagreement region. 4 Training the Difference Classifier. Algorithm 2 trains a difference classifier on a random set of examples which lies in the disagreement region of the current confidence set for h∗. The training process is cost-sensitive, and is similar to [16, 17, 5, 22]. A hard bound is imposed on the falsenegative error, which translates to a bound on the annotation bias for the target task. The number of positives (i.e., the number of examples where W and O differ) is minimized subject to this constraint; this amounts to (approximately) minimizing the fraction of queries made to O. The number of labeled examples used in training is large enough to ensure false negative error O(εk/φk) over the disagreement region of the current confidence set; here φk is the probability mass of this disagreement region under U. This ensures that the overall annotation bias introduced by this procedure in the target task is at most O(εk). As φk is small and typically diminishes with k, this requires less labels than training the difference classifier globally which would have required ˜O(d′/εk) queries to O. Algorithm 1 Active Learning Algorithm from Weak and Strong Labelers 1: Input: Unlabeled distribution U, target excess error ε, confidence δ, labeling oracle O, weak oracle W, hypothesis class H , hypothesis class for difference classifier H d f . 2: Output: Classifier ˆh in H . 3: Initialize: initial error ε0 = 1, confidence δ0 = δ/4. Total number of epochs k0 = ⌈log 1 ε ⌉. 4: Initial number of examples n0 = O( 1 ε2 0 (d ln 1 ε2 0 +ln 1 δ0 )). 5: Draw a fresh sample and query O for its labels ˆS0 = {(x1,y1),...,(xn0,yn0)}. Let σ0 = σ(n0,δ0). 6: for k = 1,2,...,k0 do 7: Set target excess error εk = 2−k, confidence δk = δ/4(k +1)2. 8: # Train Difference Classifier 9: ˆhd f k ←Call Algorithm 2 with inputs unlabeled distribution U, oracles W and O, target excess error εk, confidence δk/2, previously labeled dataset ˆSk−1. 10: # Adaptive Active Learning using Difference Classifier 11: σk, ˆSk ←Call Algorithm 5 with inputs unlabeled distribution U, oracles W and O, difference classifier ˆhd f k , target excess error εk, confidence δk/2, previously labeled dataset ˆSk−1. 12: end for 13: return ˆh ←CONS-LEARNH (/0, ˆSk0). Adaptive Active Learning using the Difference Classifier. Finally, Algorithm 5 (deferred to the Appendix) is our main active learning procedure, which generates a labeled dataset ˆSk that is implicitly used to maintain a tighter (1−δ)-confidence set for h∗. Specifically, Algorithm 5 generates a ˆSk such that the set Vk defined as: Vk = {h : err(h, ˆSk)−min ˆhk∈H err(ˆhk, ˆSk) ≤3εk/4} has the property that: {h : errD(h)−errD(h∗) ≤εk/2} ⊆Vk ⊆{h : errD(h)−errD(h∗) ≤εk} This is achieved by labeling, through inference or query, a large enough sample of unlabeled data drawn from U. Labels are obtained from three sources - direct inference (if x lies outside the disagreement region as identified by Algorithm 4), querying O (if the difference classifier predicts a difference), and querying W. How large should the sample be to reach the target excess error? If errD(h∗) = ν, then achieving an excess error of ε requires ˜O(dν/ε2 k ) samples, where d is the VC dimension of the hypothesis class. As ν is unknown in advance, we use a doubling procedure in lines 4-14 to iteratively determine the sample size. 1Note that if in Algorithm 3, the upper confidence bound of Px∼U(in disagr region( ˆT, 3ε 2 ,x) = 1) is lower than ε/64, then we can halt Algorithm 2 and return an arbitrary hd f in H d f . Using this hd f will still guarantee the correctness of Algorithm 1. 5 Algorithm 2 Training Algorithm for Difference Classifier 1: Input: Unlabeled distribution U, oracles W and O, target error ε, hypothesis class H d f , confidence δ, previous labeled dataset ˆT. 2: Output: Difference classifier ˆhd f . 3: Let ˆp be an estimate of Px∼U(in disagr region( ˆT, 3ε 2 ,x) = 1), obtained by calling Algorithm 3(deferred to the Appendix) with failure probability δ/3. 1 4: Let U′ = /0, i = 1, and m = 64·1024 ˆp ε (d′ ln 512·1024 ˆp ε +ln 72 δ ) (1) 5: repeat 6: Draw an example xi from U. 7: if in disagr region( ˆT, 3ε 2 ,xi) = 1 then # xi is inside the disagreement region 8: query both W and O for labels to get yi,W and yi,O. 9: end if 10: U′ = U′ ∪{(xi,yi,O,yi,W)} 11: i = i+1 12: until |U′| = m 13: Learn a classifier ˆhd f ∈H d f based on the following empirical risk minimizer: ˆhd f = argminhd f ∈H d f m ∑ i=1 1(hd f (xi) = +1), s.t. m ∑ i=1 1(hd f (xi) = −1∧yi,O = yi,W) ≤mε/256 ˆp (2) 14: return ˆhd f . 4 Performance Guarantees We now examine the performance of our algorithm, which is measured by the number of label queries made to the oracle O. Additionally we require our algorithm to be statistically consistent, which means that the true error of the output classifier should converge to the true error of the best classifier in H on the data distribution D. Since our framework is very general, we cannot expect any statistically consistent algorithm to achieve label savings over using O alone under all circumstances. For example, if labels provided by W are the complete opposite of O, no algorithm will achieve both consistency and label savings. We next provide an assumption under which Algorithm 1 works and yields label savings. Assumption. The following assumption states that difference hypothesis class contains a good costsensitive predictor of when O and W differ in the disagreement region of BU(h∗,r); a predictor is good if it has low false-negative error and predicts a positive label with low frequency. If there is no such predictor, then we cannot expect an algorithm similar to ours to achieve label savings. Assumption 1. Let D be the joint distribution: PD(x,yO,yW) = PU(x)PW(yW|x)PO(yO|x). For any r,η > 0, there exists an hd f η,r ∈H d f with the following properties: PD(hd f η,r(x) = −1,x ∈DIS(BU(h∗,r)),yO = yW) ≤η (3) PD(hd f η,r(x) = 1,x ∈DIS(BU(h∗,r))) ≤α(r,η) (4) Note that (3), which states there is a hd f ∈H d f with low false-negative error, is minimally restrictive, and is trivially satisfied if H d f includes the constant classifier that always predicts 1. Theorem shows that (3) is sufficient to ensure statistical consistency. (4) in addition states that the number of positives predicted by the classifier hd f η,r is upper bounded by α(r,η). Note α(r,η) ≤PU(DIS(BU(h∗,r))) always; performance gain is obtained when α(r,η) is lower, which happens when the difference classifier predicts agreement on a significant portion of DIS(BU(h∗,r)). 6 Consistency. Provided Assumption 1 holds, we next show that Algorithm 1 is statistically consistent. Establishing consistency is non-trivial for our algorithm as the output classifier is trained on labels from both O and W. Theorem 1 (Consistency). Let h∗be the classifier that minimizes the error with respect to D. If Assumption 1 holds, then with probability ≥1−δ, the classifier ˆh output by Algorithm 1 satisfies: errD(ˆh) ≤errD(h∗)+ε. Label Complexity. The label complexity of standard DBAL is measured in terms of the disagreement coefficient. The disagreement coefficient θ(r) at scale r is defined as: θ(r) = suph∈H supr′≥r PU(DIS(BU(h,r′)) r′ ; intuitively, this measures the rate of shrinkage of the disagreement region with the radius of the ball BU(h,r) for any h in H . It was shown by [9] that the label complexity of DBAL for target excess generalization error ε is ˜O(dθ(2ν + ε)(1 + ν2 ε2 )) where the ˜O notation hides factors logarithmic in 1/ε and 1/δ. In contrast, the label complexity of our algorithm can be stated in Theorem 2. Here we use the ˜O notation for convenience; we have the same dependence on log1/ε and log1/δ as the bounds for DBAL. Theorem 2 (Label Complexity). Let d be the VC dimension of H and let d′ be the VC dimension of H d f . If Assumption 1 holds, and if the error of the best classifier in H on D is ν, then with probability ≥1−δ, the following hold: 1. The number of label queries made by Algorithm 1 to the oracle O in epoch k at most: mk = ˜O d(2ν +εk−1)(α(2ν +εk−1, εk−1 1024)+εk−1) ε2 k + d′P(DIS(BU(h∗,2ν +εk−1))) εk (5) 2. The total number of label queries made by Algorithm 1 to the oracle O is at most: ˜O sup r≥ε α(2ν +r, r 1024)+r 2ν +r ·d ν2 ε2 +1 +θ(2ν +ε)d′ ν ε +1 (6) 4.1 Discussion The first terms in (5) and (6) represent the labels needed to learn the target classifier, and second terms represent the overhead in learning the difference classifier. In the realistic agnostic case (where ν > 0), as ε →0, the second terms are lower order compared to the label complexity of DBAL. Thus even if d′ is somewhat larger than d, fitting the difference classifier does not incur an asymptotically high overhead in the more realistic agnostic case. In the realizable case, when d′ ≈d, the second terms are of the same order as the first; therefore we should use a simpler difference hypothesis class H d f in this case. We believe that the lower order overhead term comes from the fact that there exists a classifier in H d f whose false negative error is very low. Comparing Theorem 2 with the corresponding results for DBAL, we observe that instead of θ(2ν + ε), we have the term supr≥ε α(2ν+r,r/1024) 2ν+r . Since supr≥ε α(2ν+r,r/1024) 2ν+r ≤θ(2ν + ε), the worst case asymptotic label complexity is the same as that of standard DBAL. This label complexity may be considerably better however if supr≥ε α(2ν+r,r/1024) 2ν+r is less than the disagreement coefficient. As we expect, this will happen when the region of difference between W and O restricted to the disagreement regions is relatively small, and this region is well-modeled by the difference hypothesis class H d f . An interesting case is when the weak labeler differs from O close to the decision boundary and agrees with O away from this boundary. In this case, any consistent algorithm should switch to querying O close to the decision boundary. Indeed in earlier epochs, α is low, and our algorithm obtains a good difference classifier and achieves label savings. In later epochs, α is high, the difference classifiers always predict a difference and the label complexity of the later epochs of our algorithm is the same order as DBAL. In practice, if we suspect that we are in this case, we can switch to plain active learning once εk is small enough. Case Study: Linear Classfication under Uniform Distribution. We provide a simple example where our algorithm provides a better asymptotic label complexity than DBAL. Let H be the class 7 + − w∗ P({x : hw∗(x) = yO}) = ν + − W {x : P(yO = yW|x) > 0} P({x : ¯hd f(x) = 1}) = g = o( √ dν) Figure 1: Linear classification over unit ball with d = 2. Left: Decision boundary of labeler O and h∗= hw∗. The region where O differs from h∗is shaded, and has probability ν. Middle: Decision boundary of weak labeler W. Right: ¯hd f , W and O. Note that {x : P(yO = yW|x) > 0} ⊆{x : ¯hd f (x) = 1}. of homogeneous linear separators on the d-dimensional unit ball and let H d f = {hΔh′ : h,h′ ∈H }. Furthermore, let U be the uniform distribution over the unit ball. Suppose that O is a deterministic labeler such that errD(h∗) = ν > 0. Moreover, suppose that W is such that there exists a difference classifier ¯hd f with false negative error 0 for which PU(¯hd f (x) = 1) ≤g. Additionally, we assume that g = o( √ dν); observe that this is not a strict assumption on H d f , as ν could be as much as a constant. Figure 1 shows an example in d = 2 that satisfies these assumptions. In this case, as ε →0, Theorem 2 gives the following label complexity bound. Corollary 1. With probability ≥1−δ, the number of label queries made to oracle O by Algorithm 1 is ˜O d max( g ν ,1)( ν2 ε2 +1)+d3/2 1+ ν ε , where the ˜O notation hides factors logarithmic in 1/ε and 1/δ. As g = o( √ dν), this improves over the label complexity of DBAL, which is ˜O(d3/2(1+ ν2 ε2 )). Conclusion. In this paper, we take a step towards a theoretical understanding of active learning from multiple annotators through a learning theoretic formalization for learning from weak and strong labelers. Our work shows that multiple annotators can be successfully combined to do active learning in a statistically consistent manner under a general setting with few assumptions; moreover, under reasonable conditions, this kind of learning can provide label savings over plain active learning. An avenue for future work is to explore a more general setting where we have multiple labelers with expertise on different regions of the input space. Can we combine inputs from such labelers in a statistically consistent manner? Second, our algorithm is intended for a setting where W is biased, and performs suboptimally when the label generated by W is a random corruption of the label provided by O. How can we account for both random noise and bias in active learning from weak and strong labelers? Acknowledgements We thank NSF under IIS 1162581 for research support and Jennifer Dy for introducing us to the problem of active learning from multiple labelers. References [1] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. J. Comput. Syst. Sci., 75(1):78–89, 2009. [2] M.-F. Balcan and P. M. Long. Active and passive learning of linear separators under logconcave distributions. In COLT, 2013. [3] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Active learning with an ERM oracle, 2009. 8 [4] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [5] Nader H. Bshouty and Lynn Burroughs. Maximizing agreements with one-sided error with applications to heuristic learning. Machine Learning, 59(1-2):99–123, 2005. [6] D. A. Cohn, L. E. Atlas, and R. E. Ladner. Improving generalization with active learning. Machine Learning, 15(2), 1994. [7] K. Crammer, M. J. Kearns, and J. Wortman. Learning from data of variable quality. In NIPS, 2005. [8] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, 2005. [9] S. Dasgupta, D. Hsu, and C. Monteleoni. A general agnostic active learning algorithm. In NIPS, 2007. [10] O. Dekel, C. Gentile, and K. Sridharan. Selective sampling and active learning from single and multiple teachers. JMLR, 13:2655–2697, 2012. [11] P. Donmez and J. Carbonell. Proactive learning: Cost-sensitive active learning with multiple imperfect oracles. In CIKM, 2008. [12] Meng Fang, Xingquan Zhu, Bin Li, Wei Ding, and Xindong Wu. Self-taught active learning from crowds. In ICDM, pages 858–863. IEEE, 2012. [13] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [14] D. Hsu. Algorithms for Active Learning. PhD thesis, UC San Diego, 2010. [15] Panagiotis G Ipeirotis, Foster Provost, Victor S Sheng, and Jing Wang. Repeated labeling using multiple noisy labelers. Data Mining and Knowledge Discovery, 28(2):402–441, 2014. [16] Adam Tauman Kalai, Varun Kanade, and Yishay Mansour. Reliable agnostic learning. J. Comput. Syst. Sci., 78(5):1481–1495, 2012. [17] Varun Kanade and Justin Thaler. Distribution-independent reliable learning. In COLT, 2014. [18] C. H. Lin, Mausam, and D. S. Weld. To re(label), or not to re(label). In HCOMP, 2014. [19] C.H. Lin, Mausam, and D.S. Weld. Reactive learning: Actively trading off larger noisier training sets against smaller cleaner ones. In ICML Workshop on Crowdsourcing and Machine Learning and ICML Active Learning Workshop, 2015. [20] L. Malago, N. Cesa-Bianchi, and J. Renders. Online active learning with strong and weak annotators. In NIPS Workshop on Learning from the Wisdom of Crowds, 2014. [21] R. D. Nowak. The geometry of generalized binary search. IEEE Transactions on Information Theory, 57(12):7893–7906, 2011. [22] Hans Ulrich Simon. Pac-learning in the presence of one-sided classification noise. Ann. Math. Artif. Intell., 71(4):283–300, 2014. [23] S. Song, K. Chaudhuri, and A. D. Sarwate. Learning from data with heterogeneous noise using sgd. In AISTATS, 2015. [24] R. Urner, S. Ben-David, and O. Shamir. Learning from weak teachers. In AISTATS, pages 1252–1260, 2012. [25] S. Vijayanarasimhan and K. Grauman. What’s it going to cost you?: Predicting effort vs. informativeness for multi-label image annotations. In CVPR, pages 2262–2269, 2009. [26] S. Vijayanarasimhan and K. Grauman. Cost-sensitive active visual category learning. IJCV, 91(1):24–44, 2011. [27] P. Welinder, S. Branson, S. Belongie, and P. Perona. The multidimensional wisdom of crowds. In NIPS, pages 2424–2432, 2010. [28] Y. Yan, R. Rosales, G. Fung, and J. G. Dy. Active learning from crowds. In ICML, pages 1161–1168, 2011. [29] Y. Yan, R. Rosales, G. Fung, F. Farooq, B. Rao, and J. G. Dy. Active learning from multiple knowledge sources. In AISTATS, pages 1350–1357, 2012. [30] C. Zhang and K. Chaudhuri. Beyond disagreement-based agnostic active learning. In NIPS, 2014. 9 | 2015 | 366 |
5,887 | Sum-of-Squares Lower Bounds for Sparse PCA Tengyu Ma∗1 and Avi Wigderson†2 1Department of Computer Science, Princeton University 2School of Mathematics, Institute for Advanced Study Abstract This paper establishes a statistical versus computational trade-off for solving a basic high-dimensional machine learning problem via a basic convex relaxation method. Specifically, we consider the Sparse Principal Component Analysis (Sparse PCA) problem, and the family of Sum-of-Squares (SoS, aka Lasserre/Parillo) convex relaxations. It was well known that in large dimension p, a planted k-sparse unit vector can be in principle detected using only n ≈k log p (Gaussian or Bernoulli) samples, but all efficient (polynomial time) algorithms known require n ≈k2 samples. It was also known that this quadratic gap cannot be improved by the the most basic semi-definite (SDP, aka spectral) relaxation, equivalent to a degree-2 SoS algorithms. Here we prove that also degree-4 SoS algorithms cannot improve this quadratic gap. This average-case lower bound adds to the small collection of hardness results in machine learning for this powerful family of convex relaxation algorithms. Moreover, our design of moments (or “pseudo-expectations”) for this lower bound is quite different than previous lower bounds. Establishing lower bounds for higher degree SoS algorithms for remains a challenging problem. 1 Introduction We start with a general discussion of the tension between sample size and computational efficiency in statistical and learning problems. We then describe the concrete model and problem at hand: Sumof-Squares algorithms and the Sparse-PCA problem. All are broad topics studied from different viewpoints, and the given references provide more information. 1.1 Statistical vs. computational sample-size Modern machine learning and statistical inference problems are often high dimensional, and it is highly desirable to solve them using far less samples than the ambient dimension. Luckily, we often know, or assume, some underlying structure of the objects sought, which allows such savings in principle. Typical such assumption is that the number of real degrees of freedom is far smaller than the dimension; examples include sparsity constraints for vectors, and low rank for matrices and tensors. The main difficulty that occurs in nearly all these problems is that while information theoretically the sought answer is present (with high probability) in a small number of samples, actually computing (or even approximating) it from these many samples is a computationally hard problem. It is often expressed as a non-convex optimization program which is NP-hard in the worst case, and seemingly hard even on random instances. Given this state of affairs, relaxed formulations of such non-convex programs were proposed, which can be solved efficiently, but sometimes to achieve accurate results seem to require far more samples ∗Supported in part by Simons Award for Graduate Students in Theoretical Computer Science †Supported in part by NSF grant CCF-1412958 1 than existential bounds provide. This phenomenon has been coined the “statistical versus computational trade-off” by Chandrasekaran and Jordan [1], who motivate and formalize one framework to study it in which efficient algorithms come from the Sum-of-Squares family of convex relaxations (which we shall presently discuss). They further give a detailed study of this trade-off for the basic de-noising problem [2, 3, 4] in various settings (some exhibiting the trade-off and others that do not). This trade-off was observed in other practical machine learning problems, in particular for the Sparse PCA problem that will be our focus, by Berthet and Rigollet [5]. As it turns out, the study of the same phenomenon was proposed even earlier in computational complexity, primarily from theoretical motivations. Decatur, Goldreich and Ron [6] initiate the study of “computational sample complexity” to study statistical versus computation trade-offs in samplesize. In their framework efficient algorithms are arbitrary polynomial time ones, not restricted to any particular structure like convex relaxations. They point out for example that in the distribution-free PAC-learning framework of Vapnik-Chervonenkis and Valiant, there is often no such trade-off. The reason is that the number of samples is essentially determined (up to logarithmic factors, which we will mostly ignore here) by the VC-dimension of the given concept class learned, and moreover, an “Occam algorithm” (computing any consistent hypothesis) suffices for classification from these many samples. So, in the many cases where efficiently finding a hypothesis consistent with the data is possible, enough samples to learn are enough to do so efficiently! This paper also provide examples where this is not the case in PAC learning, and then turns to an extensive study of possible trade-offs for learning various concept classes under the uniform distribution. This direction was further developed by Servedio [7]. The fast growth of Big Data research, the variety of problems successfully attacked by various heuristics and the attempts to find efficient algorithms with provable guarantees is a growing area of interaction between statisticians and machine learning researchers on the one hand, and optimization and computer scientists on the other. The trade-offs between sample size and computational complexity, which seems to be present for many such problems, reflects a curious “conflict” between these fields, as in the first more data is good news, as it allows more accurate inference and prediction, whereas in the second it is bad news, as a larger input size is a source of increased complexity and inefficiency. More importantly, understanding this phenomenon can serve as a guide to the design of better algorithms from both a statistical and computational viewpoints, especially for problems in which data acquisition itself is costly, and not just computation. A basic question is thus for which problems is such trade-off inherent, and to establish the limits of what is achievable by efficient methods. Establishing a trade-off has two parts. One has to prove an existential, information theoretic upper bound on the number of samples needed when efficiency is not an issue, and then prove a computational lower bound on the number of samples for the class of efficient algorithms at hand. Needless to say, it is desirable that the lower bounds hold for as wide a class of algorithms as possible, and that it will match the best known upper bound achieved by algorithms from this class. The most general one, the computational complexity framework of [6, 7] allows all polynomial-time algorithms. Here one cannot hope for unconditional lower bounds, and so existing lower bounds rely on computational assumptions, e.g.”cryptographic assumptions”, e.g. that factoring integers has no polynomial time algorithm, or other average case assumptions. For example, hardness of refuting random 3CNF was used for establishing the sample-computational tradeoff for learning halfspaces [8], and hardness of finding planted clique in random graphs was used for tradeoff in sparse PCA [5, 9]. On the other hand, in frameworks such as [1], where the class of efficient algorithms is more restricted (e.g. a family of convex relaxations), one can hope to prove unconditional lower bounds, which are called “integrality gaps” in the optimization and algorithms literature. Our main result is of this nature, adding to the small number of such lower bounds for machine learning problems. We now describe and motivate SoS convex relaxations algorithms, and the Sparse PCA problem. 1.2 Sum-of-Squares convex relaxations Sum-of-Squares algorithms (sometimes called the Lasserre hierarchy) encompasses perhaps the strongest known algorithmic technique for a diverse set of optimization problems. It is a family of convex relaxations introduced independently around the year 2000 by Lasserre [10], Parillo [11], and in the (equivalent) context of proof systems by Grigoriev [12]. These papers followed better and better understanding in real algebraic geometry [13, 14, 15, 16, 17, 18, 19]of David Hilbert’s 2 famous 17th problem on certifying the non-negativity of a polynomial by writing it as a sum of squares (which explains the name of this method). We only briefly describe this important class of algorithms; far more can be found in the book [20] and the excellent extensive survey [21]. The SoS method provides a principled way of adding constraints to a linear or convex program in a way that obtains tighter and tighter convex sets containing all solutions of the original problem. This family of algorithms is parametrized by their degree d (sometimes called the number of rounds); as d gets larger, the approximation becomes better, but the running time becomes slower, specifically nO(d). Thus in practice one hopes that small degree (ideally constant) would provide sufficiently good approximation, so that the algorithm would run in polynomial time. This method extends the standard semi-definite relaxation (SDP, sometimes called spectral), that is captured already by degree-2 SoS algorithms. Moreover, it is more powerful than two earlier families of relaxations: the Sherali-Adams [22] and Lov´asz-Scrijver [23] hierarchies. The introduction of these algorithms has made a huge splash in the optimization community, and numerous applications of it to problems in diverse fields were found that greatly improve solution quality and time performance over all past methods. For large classes of problems they are considered the strongest algorithmic technique known. Relevant to us is the very recent growing set of applications of constant-degree SoS algorithms to machine learning problems, such as [24, 25, 26]. The survey [27] contains some of these exciting developments. Section 2.1 contains some selfcontained material about the general framework SoS algorithms as well. Given their power, it was natural to consider proving lower bounds on what SoS algorithms can do. There has been an impressive progress on SoS degree lower bounds (via beautiful techniques) for a variety of combinatorial optimization problems [28, 12, 29, 30]. However, for machine learning problems relatively few such lower bounds (above SDP level) are known [26, 31] and follow via reductions to the above bounds. So it is interesting to enrich the set of techniques for proving such limits on the power of SoS for ML. The lower bound we prove indeed seem to follow a different route than previous such proofs. 1.3 Sparse PCA Sparse principal component analysis, the version of the classical PCA problem which assumes that the direction of variance of the data has a sparse structure, is by now a central problem of highdiminsional statistical analysis. In this paper we focus on the single-spiked covariance model introduced by Johnstone [32]. One observes n samples from p-dimensional Gaussian distribution with covariance Σ = λvvT + I where (the planted vector) v is assumed to be a unit-norm sparse vector with at most k non-zero entries, and λ > 0 represents the strength of the signal. The task is to find (or estimate) the sparse vector v. More general versions of the problem allow several sparse directions/components and general covariance matrix [33, 34]. Sparse PCA and its variants have a wide variety of applications ranging from signal processing to biology: see, e.g., [35, 36, 37, 38]. The hardness of Sparse PCA, at least in the worst case, can be seen through its connection to the (NP-hard) Clique problem in graphs. Note that if Σ is a {0, 1} adjacency matrix of a graph (with 1’s on the diagonal), then it has a k-sparse eigenvector v with eigenvalue k if and only if the graph has a k-clique. This connection between these two problems is actually deeper, and will appear again below, for our real, average case version above. From a theoretical point of view, Sparse PCA is one of the simplest examples where we observe a gap between the number of samples needed information theoretically and the number of samples needed for a polynomial time estimator: It has been well understood [39, 40, 41] that information theoretically, given n = O(k log p) samples1, one can estimate v up to constant error (in euclidean norm), using a non-convex (therefore not polynomial time) optimization algorithm. On the other hand, all the existing provable polynomial time algorithms [36, 42, 34, 43], which use either diagonal thresholding (for the single spiked model) or semidefinite programming (for general covariance), first introduced for this problem in [44], need at least quadratically many samples to solve the problem, namely n = O(k2). Moreover, Krauthgamer, Nadler and Vilenchik [45] and Berthet and Rigollet [41] have shown that for semi-definite programs (SDP) this bound is tight. Specifically, the natural SDP cannot even solve the detection problem: to distinguish the data from covariance 1We treat λ as a constant so that we omit the dependence on it for simplicity throughout the introduction section 3 Σ = λvvT + I from the null hypothesis in which no sparse vector is planted, namely the n samples are drawn from the Gaussian distribution with covariance matrix I. Recall that the natural SDP for this problem (and many others) is just the first level of the SoS hierarchy, namely degree-2. Given the importance of the Sparse PCA, it is an intriguing question whether one can solve it efficiently with far fewer samples by allowing degree-d SoS algorithms with larger d. A very interesting conditional negative answer was suggested by Berthet and Rigollet [41]. They gave an efficient reduction from Planted Clique2 problem to Sparse PCA, which shows in particular that degree-d SoS algorithms for Sparse PCA will imply similar ones for Planted Clique. Gao, Ma and Zhou [9] strengthen the result by establishing the hardness of the Gaussian singlespiked covariance model, which is an interesting subset of models considered by [5]. These are useful as nontrivial constant-degree SoS lower bounds for Planted Clique were recently proved by [30, 46] (see there for the precise description, history and motivation for Planted Clique). As [41, 9] argue, strong yet believed bounds, if true, would imply that the quadratic gap is tight for any constant d. Before the submission of this paper, the known lower bounds above for planted clique were not strong enough yet to yield any lower bound for Sparse PCA beyond the minimax sample complexity. We also note that the recent progress [47, 48] that show the tight lower bounds for planted clique, together with the reductions of [5, 9], also imply the tight lower bounds for Sparse PCA, as shown in this paper. 1.4 Our contribution We give a direct, unconditional lower bound proof for computing Sparse PCA using degree-4 SoS algorithms, showing that they too require n = eΩ(k2) samples to solve the detection problem (Theorem 3.1), which is tight up to polylogarithmic factors when the strength of the signal λ is a constant. Indeed the theorem gives a lower bound for every strength λ, which becomes weaker as λ gets larger. Our proof proceeds by constructing the necessary pseudo-moments for the SoS program that achieve too high an objective value (in the jargon of optimization, we prove an “integrality gap” for these programs). As usual in such proofs, there is tension between having the pseudo-moments satisfy the constraints of the program and keeping them positive semidefinite (PSD). Differing from past lower bound proofs, we construct two different PSD moments, each approximately satisfying one sets of constraints in the program and is negligible on the rest. Thus, their sum give PSD moments which approximately satisfy all constraints. We then perturb these moments to satisfy constraints exactly, and show that with high probability over the random data, this perturbation leaves the moments PSD. We note several features of our lower bound proof which makes the result particularly strong and general. First, it applies not only for the Gaussian distribution, but also for Bernoulli and other distributions. Indeed, we give a set of natural (pseudorandomness) conditions on the sampled data vectors under which the SoS algorithm is “fooled”, and show that these conditions are satisfied with high probability under many similar distributions (possessing strong concentration of measure). Next, our lower bound holds even if the hidden sparse vector is discrete, namely its entries come from the set {0, ± 1 √ k}. We also extend the lower bound for the detection problem to apply also to the estimation problem, in the regime when the ambient dimension is linear in the number of samples, namely n ≤p ≤Bn for constant B. Organization: Section 2 provides more backgrounds of sparse PCA and SoS algorithms. We state our main results in Section 3. A complete paper is available as supplementary material or on arxiv. 2 Formal description of the model and problem Notation: We will assume that n, k, p are all sufficiently large3, and that n ≤p. Throughout this paper, by “with high probability some event happens”, we mean the failure probability is bounded by p−c for every constant c, as p tends to infinity. Sparse PCA estimation and detection problems We will consider the simplest setting of sparse PCA, which is called single-spiked covariance model in literature [32] (note that restricting to a 2An average case version of the Clique problem in which the input is a random graph in which a much larger than expected clique is planted. 3Or we assume that they go to infinity as typically done in statistics. 4 special case makes our lower bound hold in all generalizations of this simple model). In this model, the task is to recover a single sparse vector from noisy samples as follows. The “hidden data” is an unknown k-sparse vector v ∈Rp with |v|0 = k and ∥v∥= 1. To make the task easier (and so the lower bound stronger), we even assume that v has discrete entries, namely that vi ∈{0, ± 1 √ k} for all i ∈[p]. We observe n noisy samples X1, . . . , Xn ∈Rp that are generated as follows. Each is independently drawn as Xj = √ λgjv + ξj from a distribution which generalizes both Gaussian and Bernoulli noise to v. Namely, the gj’s are i.i.d real random variable with mean 0 and variance 1, and ξj’s are i.i.d random vectors which have independent entries with mean zero and variance 1. Therefore under this model, the covariance of Xi is equal to λvvT +I. Moreover, we assume that gj and entries of ξj are sub-gaussian4 with variance proxy O(1). Given these samples, the estimation problem is to approximate the unknown sparse vector v (up to sign flip). It is also interesting to also consider the sparse component detection problem [41, 5], which is the decision problem of distinguishing from random samples the following two distributions H0: data Xj = ξj is purely random Hv: data Xj = ξj + √ λgjv contains a hidden sparse signal with strength λ. Rigollet [49] observed that a polynomial time algorithm for estimation version of sparse PCA with constant error implies that an algorithm for the detection problem with twice number of the samples. Thus, for polynomial time lower bounds, it suffices to consider the detection problem. We will use X as a shorthand for the p × n matrix X1, . . . , Xn . We denote the rows of X as XT 1 , . . . , XT p , therefore Xi’s are n-dimensional column vectors. The empirical covariance matrix is defined as ˆΣ = 1 nXXT . Statistically optimal estimator/detector It is well known that the following non-convex program achieves optimal statistical minimax rate for the estimation problem and the optimal sample complexity for the detection problem. Note that we scale the variables x up by a factor of √ k for simplicity (the hidden vector now has entries from {0, ±1}). λk max(ˆΣ) = 1 k · max ⟨ˆΣ, xxT ⟩ (2.1) subject to ∥x∥2 2 = k, ∥x∥0 = k (2.2) Proposition 2.1 ([42], [41], [39] informally stated). The non-convex program (2.1) statistically optimally solves the sparse PCA problem when n ≥Ck/λ2 log p for some sufficiently large C. Namely, the following hold with high probability. If X is generated from Hv, then optimal solution xopt of program (2.1) satisfies ∥1 k · xoptxT opt −vvT ∥≤1 3, and the objective value λk max(ˆΣ) is at least 1 + 2λ 3 . On the other hand, if X is generated from null hypothesis H0, then λk max(ˆΣ) is at most 1 + λ 3 . Therefore, for the detection problem, once can simply use the test λk max(ˆΣ) > 1 + λ 2 to distinguish the case of H0 and Hv, with n = eΩ(k/λ2) samples. However, this test is highly inefficient, as the best known ways for computing λk max(ˆΣ) take exponential time! We now turn to consider efficient ways of solving this problem. 2.1 Sum of Squares (Lasserre) Relaxations Here we will only briefly introduce the basic ideas of Sum-of-Squares (Lasserre) relaxation that will be used for this paper. We refer readers to the extensive [20, 21, 27] for detailed discussions of sum of squares algorithms and proofs and their applications to algorithm design. Let R[x]d denote the set of all real polynomials of degree at most d with n variables x1, . . . , xn. We start by defining the notion of pseudo-moment (sometimes called pseudo-expectation ). The intuition is that these pseudo-moments behave like the actual first d moments of a real probability distribution. 4A real random variable X is subgaussian with variance proxy σ2 if it has similar tail behavior as gaussian distribution with variance σ2. More formally, if for any t ∈R, E[exp(tX)] ≤exp(t2σ2/2) 5 Definition 2.2 (pseudo-moment). A degree-d pseudo-moments M is a linear operator that maps R[x]d to R and satisfies M(1) = 1 and M(p2(x)) ≥0 for all real polynomials p(x) of degree at most d/2. For a mutli-set S ⊂[n], we use xS to denote the monomial Q i∈S xi. Since M is a linear operator, it can be clearly described by all the values of M on the monomial of degree d, that is, all the values of M(xS) for mutli-set S of size at most d uniquely determines M. Moreover, the nonnegativity constraint M(p(x)2) ≥0 is equivalent to the positive semidefiniteness of the matrix-form (as defined below), and therefore the set of all pseudo-moments is convex. Definition 2.3 (matrix-form). For an even integer d and any degree-d pseudo-moments M, we define the matrix-form of M as the trivial way of viewing all the values of M on monomials as a matrix: we use mat(M) to denote the matrix that is indexed by multi-subset S of [n] with size at most d/2, and mat(M)S,T = M(xSxT ). Given polynomials p(x) and q1(x), . . . , qm(x) of degree at most d, and a polynomial program, Maximize p(x) (2.3) Subject to qi(x) = 0, ∀i ∈[m] We can write a sum of squares based relaxation in the following way: Instead of searching over x ∈Rn, we search over all the possible “pseudo-moments” M of a hypothetical distribution over solutions x, that satisfy the constraints above. The key of the relaxation is to consider only moments up to degree d. Concretely, we have the following semidefinite program in roughly nd variables. Variables M(xS) ∀S : |S| ≤d Maximize M(p(x)) (2.4) Subject to M(qi(x)xK) = 0 ∀i, K : |K| + deg(qi) ≤d mat(M) ⪰0 Note that (2.4) is a valid relaxation because for any solution x∗of (2.3), if we define M(xS) to be M(xS) = xS ∗, then M satisfies all the constraints and the objective value is p(x∗). Therefore it is guaranteed that the optimal value of (2.4) is always larger than that of (2.3). Finally, the key point is that this program can be solved efficiently, in polynomial time in its size, namely in time nO(d). As d grows, the constraints added make the “pseudo-distribution” defined by the moments closer and closer to an actual distribution, thus providing a tighter relaxation, at the cost of a larger running time to solve it. In the next section we apply this relaxation to the Sparse PCA problem and state our results. 3 Main Results To exploit the sum of squares relaxation framework as described in Section 2.1], we first convert the statistically optimal estimator/detector (2.1) into the “polynomial” program version below. Maximize⟨ˆΣ, xxT ⟩ (3.1) subject to∥x∥2 2 = k, and x3 i = xi, ∀i ∈[p] (3.2& 3.3) |x|1 ≤k (3.4) The non-convex sparsity constraint (2.2) is replaced by the polynomial constraint (3.3), which ensures that any solution vector x has entries in {0, ±1}, and so together with the constraint (3.2) guarantees that it has precisely k non-zero ±1 entries. The constraint (.3.3) implies other natural constraints that one may add to the program in order to make it stronger: for example, the upper bound on each entry xi, the lower bound on the non-zero entries of xi, and the constraint ∥x∥4 ≥k which is used as a surrogate for k-sparse vectors in [25, 24]. Note that we also added an ℓ1 sparsity constraint (3.4) (which is convex) as is often used in practice and makes our lower bound even stronger. Of course, it is formally implied by the other constraints, but not in low-degree SoS. Now we are ready to apply the sum-of-squares relaxation scheme described in Section 2.1) to the polynomial program above as . For degree-4 relaxation we obtain the following semidefinite program SoS4(ˆΣ), which we view as an algorithm for both detection and estimation problems. Note 6 that the same objective function, with only the three constraints (C1&2), (C6) gives the degree-2 relaxation, which is precisely the standard SDP relaxation of Sparse PCA studied in [42, 41, 45]. So clearly SoS4(ˆΣ) subsumes the SDP relaxation. Algorithm 1 SoS4(ˆΣ): Degree-4 Sum of Squares Relaxation Solve the following SDP and obtain optimal objective value SoS4(ˆΣ) and maximizer M ∗. Variables: M(S), for all mutli-sets S of size at most 4. SoS4(ˆΣ) = max X i,j M(xixj)ˆΣij (Obj) subject to X i∈[p] M(x2 i ) = k and X i,j∈[p] |M(xixj)| ≤k2 (C1&2) M(x3 i xj) = M(xixj), and X ℓ∈[p] M(x2 ℓxixj) = kM(xixj), ∀i, j ∈[p] (C4) X i,j,s,t∈[p] |M(xixjxsxt)| ≤k4 and M ⪰0 (C5&6) Output: 1. For detection problem : output Hv if SoS4(ˆΣ) > (1 + 1 2λ)k, H0 otherwise 2. For estimation problem: output M ∗ 2 = (M ∗(xixj))i,j∈[p] Before stating the lower bounds for both detection and estimation in the next two subsections, we comment on the choices made for the outputs of the algorithm in both, as clearly other choices can be made that would be interesting to investigate. For detection, we pick the natural threshold (1+ 1 2λ)k from the statistically optimal detection algorithm of Section 2. Our lower bound of the objective under H0 is actually a large constant multiple of λk, so we could have taken a higher threshold. To analyze even higher ones would require analyzing the behavior of SoS4 under the (planted) alternative distribution Hv. For estimation we output the maximizer M ∗ 2 of the objective function, and prove that it is not too correlated with the rank-1 matrix vvT in the planted distribution Hv. This suggest, but does not prove, that the leading eigenvector of M ∗ 2 (which is a natural estimator for v) is not too correlated with v. We finally note that Rigollet’s efficient reduction from detection to estimation is not in the SoS framework, and so our detection lower bound does not automatically imply the one for estimation. For the detection problem, we prove that SoS4(ˆΣ) gives a large objective on null hypothesis H0. Theorem 3.1. There exists absolute constant C and r such that for 1 ≤λ < min{k1/4, √n} and any p ≥Cλn, k ≥Cλ7/6√n logr p, the following holds. When the data X is drawn from the null hypothesis H0, then with high probability (1−p−10), the objective value of degree-4 sum of squares relaxation SoS4(ˆΣ) is at least 10λk. Consequently, Algorithm 1 can’t solve the detection problem. To parse the theorem and to understand its consequence, consider first the case when λ is a constant (which is also arguably the most interesting regime). Then the theorem says that when we have only n ≪k2 samples, degree-4 SoS relaxation SoS4 still overfits heavily to the randomness of the data X under the null hypothesis H0. Therefore, using SoS4(ˆΣ) > (1 + λ 2 )k (or even 10λk) as a threshold will fail with high probability to distinguish H0 and Hv. We note that for constant λ our result is essentially tight in terms of the dependencies between n, k, p. The condition p = eΩ(n) is necessary since otherwise when p = o(n), even without the sum of squares relaxation, the objective value is controlled by (1 + o(1))k since ˆΣ has maximum eigenvalue 1 + o(1) in this regime. Furthermore, as mentioned in the introduction, k ≥eΩ(√n) is also necessary (up to poly-logarithmic factors), since when n ≫k2, a simple diagonal thresholding algorithm works for this simple single-spike model. When λ is not considered as a constant, the dependence of the lower bound on λ is not optimal, but close. Ideally one could expect that as long as k ≫λ√n, and p ≥λn, the objective value on the null hypothesis is at least Ω(λk). Tightening the λ1/6 slack, and possibly extending the range of 7 λ are left to future study. Finally, we note that he result can be extended to a lower bound for the estimation problem, which is presented in the supplementary material. References [1] Venkat Chandrasekaran and Michael I. Jordan. Computational and statistical tradeoffs via convex relaxation. Proceedings of the National Academy of Sciences, 110(13):E1181–E1190, 2013. [2] IM Johnstone. Function estimation and gaussian sequence models. Unpublished manuscript, 2002. [3] D. L. Donoho. De-noising by soft-thresholding. IEEE Trans. Inf. Theor., 41(3):613–627, May 1995. [4] David L. Donoho and Iain M. Johnstone. Minimax estimation via wavelet shrinkage. Ann. Statist., 26(3):879–921, 06 1998. [5] Quentin Berthet and Philippe Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT 2013 - The 26th Annual Conference on Learning Theory, June 12-14, 2013, Princeton University, NJ, USA, pages 1046–1066, 2013. [6] Scott Decatur, Oded Goldreich, and Dana Ron. Computational sample complexity. In Proceedings of the Tenth Annual Conference on Computational Learning Theory, COLT ’97, pages 130–142, New York, NY, USA, 1997. ACM. [7] Rocco A. Servedio. Computational sample complexity and attribute-efficient learning. Journal of Computer and System Sciences, 60(1):161 – 178, 2000. [8] Amit Daniely, Nati Linial, and Shai Shalev-Shwartz. More data speeds up training time in learning halfspaces over sparse vectors. In Christopher J. C. Burges, L´eon Bottou, Zoubin Ghahramani, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States., pages 145–153, 2013. [9] C. Gao, Z. Ma, and H. H. Zhou. Sparse CCA: Adaptive Estimation and Computational Barriers. ArXiv e-prints, September 2014. [10] Jean B. Lasserre. Global optimization with polynomials and the problem of moments. SIAM Journal on Optimization, 11(3):796–817, 2001. [11] Pablo A. Parrilo. Structured Semidefinite Programs and Semialgebraic Geometry Methods in Robustness and Optimization. PhD thesis, California Institute of Technology, 2000. [12] Dima Grigoriev. Linear lower bound on degrees of positivstellensatz calculus proofs for the parity. Theoretical Computer Science, 259(1):613–622, 2001. [13] Emil Artin. ¨Uber die zerlegung definiter funktionen in quadrate. In Abhandlungen aus dem mathematischen Seminar der Universit¨at Hamburg, volume 5, pages 100–115. Springer, 1927. [14] Jean-Louis Krivine. Anneaux pr´eordonn´es. Journal d’analyse math´ematique, 1964. [15] Gilbert Stengle. A nullstellensatz and a positivstellensatz in semialgebraic geometry. Mathematische Annalen, 207(2):87–97, 1974. [16] N.Z. Shor. An approach to obtaining global extremums in polynomial mathematical programming problems. Cybernetics, 23(5):695–700, 1987. [17] Konrad Schm¨udgen. Thek-moment problem for compact semi-algebraic sets. Mathematische Annalen, 289(1):203–206, 1991. [18] Mihai Putinar. Positive polynomials on compact semi-algebraic sets. Indiana University Mathematics Journal, 42(3):969–984, 1993. [19] Yurii Nesterov. Squared functional systems and optimization problems. In Hans Frenk, Kees Roos, Tams Terlaky, and Shuzhong Zhang, editors, High Performance Optimization, volume 33 of Applied Optimization, pages 405–440. Springer US, 2000. [20] Jean Bernard Lasserre. An introduction to polynomial and semi-algebraic optimization. Cambridge Texts in Applied Mathematics. Cambridge: Cambridge University Press. , 2015. [21] Monique Laurent. Sums of squares, moment matrices and optimization over polynomials. In Mihai Putinar and Seth Sullivant, editors, Emerging Applications of Algebraic Geometry, volume 149 of The IMA Volumes in Mathematics and its Applications, pages 157–270. Springer New York, 2009. [22] Hanif D. Sherali and Warren P. Adams. A hierarchy of relaxations between the continuous and convex hull representations for zero-one programming problems. SIAM Journal on Discrete Mathematics, 3(3):411– 430, 1990. [23] L. Lov´asz and A. Schrijver. Cones of matrices and set-functions and 01 optimization. SIAM Journal on Optimization, 1(2):166–190, 1991. 8 [24] Boaz Barak, Jonathan A. Kelner, and David Steurer. Dictionary learning and tensor decomposition via the sum-of-squares method. In Proceedings of the Forty-seventh Annual ACM Symposium on Theory of Computing, STOC ’15, 2015. [25] Boaz Barak, Jonathan A. Kelner, and David Steurer. Rounding sum-of-squares relaxations. In STOC, pages 31–40, 2014. [26] Boaz Barak and Ankur Moitra. Tensor prediction, rademacher complexity and random 3-xor. CoRR, abs/1501.06521, 2015. [27] Boaz Barak and David Steurer. Sum-of-squares proofs and the quest toward optimal algorithms. In Proceedings of International Congress of Mathematicians (ICM), 2014. To appear. [28] D. Grigoriev. Complexity of positivstellensatz proofs for the knapsack. computational complexity, 10(2):139–154, 2001. [29] Grant Schoenebeck. Linear level lasserre lower bounds for certain k-csps. In Proceedings of the 2008 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’08, pages 593–602, Washington, DC, USA, 2008. IEEE Computer Society. [30] Raghu Meka, Aaron Potechin, and Avi Wigderson. Sum-of-squares lower bounds for planted clique. CoRR, abs/1503.06447, 2015. [31] Z. Wang, Q. Gu, and H. Liu. Statistical Limits of Convex Relaxations. ArXiv e-prints, March 2015. [32] Iain M. Johnstone. On the distribution of the largest eigenvalue in principal components analysis. Ann. Statist., 29(2):295–327, 04 2001. [33] Zongming Ma. Sparse principal component analysis and iterative thresholding. Ann. Statist., 41(2):772– 801, 04 2013. [34] Vincent Q. Vu and Jing Lei. Minimax sparse principal subspace estimation in high dimensions. Ann. Statist., 41(6):2905–2947, 12 2013. [35] U. Alon, N. Barkai, D. A. Notterman, K. Gish, S. Ybarra, D. Mack, and A. J. Levine. Broad patterns of gene expression revealed by clustering analysis of tumor and normal colon tissues probed by oligonucleotide arrays. Proceedings of the National Academy of Sciences, 96(12):6745–6750, 1999. [36] Iain M. Johnstone and Arthur Yu Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486):pp. 682–703, 2009. [37] Xi Chen. Adaptive elastic-net sparse principal component analysis for pathway association testing. Statistical Applications in Genetics and Molecular Biology, 10, 2011. [38] Rodolphe Jenatton, Guillaume Obozinski, and Francis R. Bach. Structured sparse principal component analysis. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2010, Chia Laguna Resort, Sardinia, Italy, May 13-15, 2010, pages 366–373, 2010. [39] Vincent Q. Vu and Jing Lei. Minimax rates of estimation for sparse PCA in high dimensions. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2012, La Palma, Canary Islands, April 21-23, 2012, pages 1278–1286, 2012. [40] Debashis Paul and Iain M Johnstone. Augmented sparse principal component analysis for high dimensional data. arXiv preprint arXiv:1202.1242, 2012. [41] Quentin Berthet and Philippe Rigollet. Optimal detection of sparse principal components in high dimension. The Annals of Statistics, 41(4):1780–1815, 2013. [42] Arash A. Amini and Martin J. Wainwright. High-dimensional analysis of semidefinite relaxations for sparse principal components. Ann. Statist., 37(5B):2877–2921, 10 2009. [43] Yash Deshpande and Andrea Montanari. Sparse PCA via covariance thresholding. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 334–342, 2014. [44] 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. [45] Robert Krauthgamer, Boaz Nadler, and Dan Vilenchik. Do semidefinite relaxations solve sparse pca up to the information limit? The Annals of Statistics, 43(3):1300–1322, 2015. [46] Y. Deshpande and A. Montanari. Improved Sum-of-Squares Lower Bounds for Hidden Clique and Hidden Submatrix Problems. ArXiv e-prints, February 2015. [47] Prasad Raghavendra and Tselil Schramm. Tight lower bounds for planted clique in the degree-4 SOS program. CoRR, abs/1507.05136, 2015. [48] Samuel B. Hopkins, Pravesh K. Kothari, and Aaron Potechin. Sos and planted clique: Tight analysis of MPW moments at all degrees and an optimal lower bound at degree four. CoRR, abs/1507.05230, 2015. [49] Tengyu Ma and Philippe Rigollet. personal communication, 2014. 9 | 2015 | 367 |
5,888 | Where are they looking? Adri`a Recasens∗ Aditya Khosla∗ Carl Vondrick Antonio Torralba Massachusetts Institute of Technology {recasens, khosla, vondrick, torralba}@csail.mit.edu (* - indicates equal contribution) Abstract Humans have the remarkable ability to follow the gaze of other people to identify what they are looking at. Following eye gaze, or gaze-following, is an important ability that allows us to understand what other people are thinking, the actions they are performing, and even predict what they might do next. Despite the importance of this topic, this problem has only been studied in limited scenarios within the computer vision community. In this paper, we propose a deep neural networkbased approach for gaze-following and a new benchmark dataset, GazeFollow, for thorough evaluation. Given an image and the location of a head, our approach follows the gaze of the person and identifies the object being looked at. Our deep network is able to discover how to extract head pose and gaze orientation, and to select objects in the scene that are in the predicted line of sight and likely to be looked at (such as televisions, balls and food). The quantitative evaluation shows that our approach produces reliable results, even when viewing only the back of the head. While our method outperforms several baseline approaches, we are still far from reaching human performance on this task. Overall, we believe that gazefollowing is a challenging and important problem that deserves more attention from the community. 1 Introduction You step out of your house and notice a group of people looking up. You look up and realize they are looking at an aeroplane in the sky. Despite the object being far away, humans have the remarkable ability to precisely follow the gaze direction of another person, a task commonly referred to as gazefollowing (see [3] for a review). Such an ability is a key element to understanding what people are doing in a scene and their intentions. Similarly, it is crucial for a computer vision system to have this ability to better understand and interpret people. For instance, a person might be holding a book but looking at the television, or a group of people might be looking at the same object which can indicate that they are collaborating at some task, or they might be looking at different places which can indicate that they are not familiar with each other or that they are performing unrelated tasks Figure 1: Gaze-following: We present a model that learns to predict where people in images are looking. We also introduce GazeFollow, a new large-scale annotated dataset for gaze-following. 1 (see Figure 1). Gaze-following has applications in robotics and human interaction interfaces where it is important to understand the object of interest of a person. Gaze-following can also be used to predict what a person will do next as people tend to attend to objects they are planning to interact with even before they start an action. Despite the importance of this topic, only a few works in computer vision have explored gazefollowing [5, 16, 14, 15, 18]. Previous work on gaze-following addresses the problem by limiting the scope (e.g., people looking at each other only [14]), by restricting the situations (e.g., scenes with multiple people only or synthetic scenarios [9, 7]), or by using complex inputs (multiple images [5, 15, 18] or eye-tracking data [6]). Only [16] tackles the unrestricted gaze-following scenario but relies on face detectors (therefore can not handle situations such as people looking away from the camera) and is not evaluated on a gaze-following task. Our goal is to perform gaze-following in natural settings without making restrictive assumptions and when only a single view is available. We want to address the general gaze-following problem to be able to handle situations in which several people are looking at each other, and one or more people are interacting with one or more objects. In this paper, we formulate the problem of gaze-following as: given a single picture containing one or more people, the task is to the predict the location that each person in a scene is looking at. To address this problem, we introduce a deep architecture that learns to combine information about the head orientation and head location with the scene content in order to follow the gaze of a person inside the picture. The input to our model is a picture and the location of the person for who we want to follow the gaze, and the output is a distribution over possible locations that the selected person might be looking at. This output distribution can be seen as a saliency map from the point of view of the person inside the picture. To train and evaluate our model, we also introduce GazeFollow, a large-scale benchmark dataset for gaze-following. Our model, code and dataset are available for download at http://gazefollow.csail.mit.edu. Related Work (Saliency): Although strongly related, there are a number of important distinctions between gaze-following [3] and saliency models of attention [8]. In traditional models of visual attention, the goal is to predict the eye fixations of an observer looking at a picture, while in gazefollowing the goal is to estimate what is being looked at by a person inside a picture. Most saliency models focus on predicting fixations while an observer is free-viewing an image [8, 11] (see [2] for a review). However, in gaze-following, the people in the picture are generally engaged in a task or navigating an environment and, therefore, are not free-viewing and might fixate on objects even when they are not the most salient. A model for gaze-following has to be able to follow the line of sight and then select, among all possible elements that cross the line of sight, which objects are likely to be the center of attention. Both tasks (gaze-following and saliency modeling) are related in several interesting ways. For instance, [1] showed that gaze-following of people inside a picture can influence the fixations of an observer looking at the picture as the object being fixated by the people inside the picture will attract the attention of the observer of the picture. Related Work (Gaze): The work on gaze-following in computer vision is very limited. Gazefollowing is used in [16] to improve models of free-viewing saliency prediction. However, they only estimate the gaze direction without identifying the object being attended. Further, their reliance on a face detector [23] prevents them from being able to estimate gaze for people looking away from the camera. Another way of approaching gaze-following is using a wearable eye-tracker to precisely measure the gaze of several people in a scene. For instance, [6] used an eye tracker to predict the next object the user will interact with, and to improve action recognition in egocentric vision. In [14] they propose detecting people looking at each other in a movie in order to better identify interactions between people. As in [16], this work only relies on the direction of gaze without estimating the object being attended, and, therefore, cannot address the general problem of gaze-following, in which a person is interacting with an object. In [5], they perform gaze-following in scenes with multiple observers in an image by finding the regions in which multiple lines of sight intersect. Their method needs multiple people in the scene, each with an egocentric camera, used to get 3D head location, as the model only uses head orientation information and does not incorporate knowledge about the content of the scene. In [15, 18], the authors propose a system to infer the region attracting the attention of a group of people (social saliency prediction). As in [5] their method takes as input a set of pictures taken from the viewpoint of each of the people present in the image and it does not perform gaze-following. Our method only uses a single third-person view of the scene to infer gaze. 2 (a) Example test images and annotations Fixation Loc. Density Norm. Fixation Loc. Density Avg. Gaze Direction Direction Color Code Head Location Density 0 1 x y x y x y x y (b) Test set statistics Figure 2: GazeFollow Dataset: We introduce a new dataset for gaze-following in natural images. On the left, we show several example annotations and images. In the graphs on the right, we summarize a few statistics about test partition of the dataset. The top three heat maps show the probability density for the location of the head, the fixation location, and the fixation location normalized with respect to the head position. The bottom shows the average gaze direction for various head positions. 2 GazeFollow: A Large-Scale Gaze-Following Dataset In order to both train and evaluate models, we built GazeFollow, a large-scale dataset annotated with the location of where people in images are looking. We used several major datasets that contain people as a source of images: 1, 548 images from SUN [19], 33, 790 images from MS COCO [13], 9, 135 images from Actions 40 [20], 7, 791 images from PASCAL [4], 508 images from the ImageNet detection challenge [17] and 198, 097 images from the Places dataset [22]. This concatenation results in a challenging and large image collection of people performing diverse activities in many everyday scenarios. Since the source datasets do not have gaze ground-truth, we annotated it using Amazon’s Mechanical Turk (AMT). Workers used our online tool to mark the center of a person’s eyes and where the worker believed the person was looking. Workers could indicate if the person was looking outside the image or if the person’s head was not visible. To control quality, we included images with known ground-truth, and we used these to detect and discard poor annotations. Finally, we obtained 130, 339 people in 122, 143 images, with gaze locations inside the image. We use about 4, 782 people of our dataset for testing and the rest for training. We ensured that every person in an image is part of the same split, and to avoid bias, we picked images for testing such that the fixation locations were uniformly distributed across the image. Further, to evaluate human consistency on gaze-following, we collected 10 gaze annotations per person for the test set. We show some example annotations and statistics of the dataset in Fig.2. We designed our dataset to capture various fixation scenarios. For example, some images contain several people with joint attention while others contain people looking at each other. The number of people in the image can vary, ranging from a single person to a crowd of people. Moreover, we observed that while some people have consistent fixation locations others have bimodal or largely inconsistent distributions, suggesting that solutions to the gaze-following problem could be multimodal. 3 Learning to Follow Gaze At a high level, our model is inspired by how humans tend to follow gaze. When people infer where another person is looking, they often first look at the person’s head and eyes to estimate their field of view, and subsequently reason about salient objects in their perspective to predict where they are looking. In this section, we present a model that emulates this approach. 3 full image
xi
head
xh head location xp saliency map
S(xi) gaze mask G(xh, xp) Saliency Pathway Gaze Pathway ...
Shifted Grids CONV CONV CONV CONV CONV CONV CONV CONV CONV CONV gaze prediction ŷ CONV element-wise product FC FC FC FC FC FC FC FC FC Figure 3: Network architecture: We show the architecture of our deep network for gaze-following. Our network has two main components: the saliency pathway (top) to estimate saliency and the gaze pathway (bottom) to estimate gaze direction. See Section 3 for details. 3.1 Gaze and Saliency Pathways Suppose we have an image xi and a person for whom we want to predict gaze. We parameterize this person with a quantized spatial location of the person’s head xp and a cropped, close-up image of their head xh. Given x, we seek to predict the spatial location of the person’s fixation y. Encouraged by progress in deep learning, we also use deep networks to predict a person’s fixation. Keeping the motivation from Section 3 in mind, we design our network to have two separate pathways for gaze and saliency. The gaze pathway only has access to the closeup image of the person’s head and their location, and produces a spatial map, G(xh, xp), of size D × D. The saliency pathway sees the full image but not the person’s location, and produces another spatial map, S(xi), of the same size D × D. We then combine the pathways with an element-wise product: ˆy = F (G(xh, xp) ⊗S(xi)) where ⊗represents the element-wise product. F(·) is a fully connected layer that uses the multiplied pathways to predict where the person is looking, ˆy. Since the two network pathways only receive a subset of the inputs, they cannot themselves solve the full problem during training, and instead are forced to solve subproblems. Our intention is that, since the gaze pathway only has access to the person’s head, xh and location, xp, we expect it will learn to predict the direction of gaze. Likewise, since the saliency pathway does not know which person to follow, we hope it learns to find objects that are salient, independent of the person’s viewpoint. The element-wise product allows these two pathways to interact in a way that is similar to how humans approach this task. In order for a location in the element-wise product to be activated, both the gaze and saliency pathways must have large activations. Saliency map: To form the saliency pathway, we use a convolutional network on the full image to produce a hidden representation of size D ×D ×K. Since [21] shows that objects tend to emerge in these deep representations, we can create a gaze-following saliency map by learning the importance of these objects. To do this, we add a convolutional layer that convolves the hidden representation with a w ∈R1×1×K filter, which produces the D × D saliency map. Here, the sign and magnitude of w can be interpreted as weights indicating an object’s importance for gaze-following saliency. Gaze mask: In the gaze pathway, we use a convolutional network on the head image. We concatenate its output with the head position and use several fully connected layers and a final sigmoid to predict the D × D gaze mask. Pathway visualization: Fig. 4 shows examples of the (a) gaze masks and (b) saliency maps learned by our network. Fig. 4(b) also compares the saliency maps of our network with the saliency computed using a state of the art saliency model [11]. Note that our model learns a notion of saliency that is relevant for the gaze-following task and places emphasis on certain objects that people tend to look at (e.g., balls and televisions). In the third example, the red light coming from the computer mouse is salient in the Judd et al [11] model but that object is not relevant in a gaze-following task as the computer monitor is more likely to be the target of attention of the person inside the picture. 4 free-view saliency gaze saliency (a) gaze mask saliency (b) input image free-view saliency gaze saliency input image free-view saliency gaze saliency input image Figure 4: Pathway visualization: (a) The gaze mask output by our network for various head poses. (b) Each triplet of images show, from left to right, the input image, its free-viewing saliency estimated using [11], and the gaze-following saliency estimated using our network. These examples clearly illustrate the differences between free-viewing saliency [11] and gaze-following saliency. 3.2 Multimodal Predictions Although humans can often follow gaze reliably, predicting gaze is sometimes ambiguous. If there are several salient objects in the image, or the eye pose cannot be accurately perceived, then humans may disagree when predicting gaze. We can observe this for several examples in Fig. 2. Consequently, we want to design our model to support multimodal predictions. We could formulate our problem as a regression task (i.e., regress the Cartesian coordinates of fixations) but then our predictions would be unimodal. Instead, we can formulate our problem as a classification task, which naturally supports multimodal outputs because each category has a confidence value. To do this, we quantize the fixation location y into a N × N grid. Then, the job of the network is to classify the inputs x into one of N 2 classes. The model output ˆy ∈RN×N is the confidence that the person is fixating in each grid cell. Shifted grids: For classification, we must choose the number of grid cells, N. If we pick a small N, our predictions will suffer from poor precision. If we pick a large N, there will be more precision, but the learning problem becomes harder because standard classification losses do not gradually penalize spatial categories −a misclassification that is off by just one cell should be penalized less than errors multiple cells away. To alleviate this trade-off, we propose the use of shifted grids, as illustrated in Fig. 3, where the network solves several overlapping classification problems. The network predicts locations in multiple grids where each grid is shifted such that cells in one grid overlap with cells in other grids. We then average the shifted outputs to produce the final prediction. 3.3 Training We train our network end-to-end using backpropagation. We use a softmax loss for each shifted grid and average their losses. Since we only supervise the network with gaze fixations, we do not enforce that the gaze and saliency pathways solve their respective subproblems. Rather, we expect that the proposed network structure encourages these roles to emerge automatically (which they do, as shown in Fig. 6). Implementation details: We implemented the network using Caffe [10]. The convolutional layers in both the gaze and saliency pathways follow the architecture of the first five layers of the AlexNet architecture [12]. In our experiments, we initialize these convolutional layers of the saliency pathway with the Places-CNN [22] and those of the gaze pathway with ImageNet-CNN [12]. The last convolutional layer of the saliency pathway has a 1 × 1 × 256 convolution kernel (i.e., K = 256). The remaining fully connected layers in the gaze pathway are of sizes 100, 400, 200, and 169 respectively. The saliency map and gaze mask are 13 × 13 in size (i.e., D = 13), and we use 5 shifted grids of size 5 × 5 each (i.e., N = 5). For learning, we augment our training data with flips and random crops with the fixation locations adjusted accordingly. 5 Figure 5: Qualitative results: We show several examples of successes and failures of our model. The red lines indicate ground truth gaze, and the yellow, our predicted gaze. Min Model AUC Dist. Dist. Ang. Our 0.878 0.190 0.113 24◦ SVM+shift grid 0.788 0.268 0.186 40◦ SVM+one grid 0.758 0.276 0.193 43◦ Judd [11] 0.711 0.337 0.250 54◦ Fixed bias 0.674 0.306 0.219 48◦ Center 0.633 0.313 0.230 49◦ Random 0.504 0.484 0.391 69◦ One human 0.924 0.096 0.040 11◦ (a) Main Evaluation Min Model AUC Dist. Dist. Ang. No image 0.821 0.221 0.142 27◦ No position 0.837 0.238 0.158 32◦ No head 0.822 0.264 0.179 41◦ No eltwise 0.876 0.193 0.117 25◦ 5 × 5 grid 0.839 0.245 0.164 36◦ 10 × 10 grid 0.873 0.218 0.138 30◦ L2 loss 0.768 0.245 0.169 34◦ Our full 0.878 0.190 0.113 24◦ (b) Model Diagnostics Table 1: Evaluation: (a) We evaluate our model against baselines and (b) analyze how it performances with some components disabled. AUC refers to the area under the ROC curve (higher is better). Dist. refers to the L2 distance to the average of ground truth fixation, while Min Dist. refers to the L2 distance to the nearest ground truth fixation (lower is better). Ang. is the angular error of predicted gaze in degrees (lower is better). See Section 4 for details. 4 Experiments 4.1 Setup We evaluate the ability of our model to predict where people in images are looking. We use the disjoint train and test sets from GazeFollow, as described in Section 2, to train and evaluate our model. The test set was randomly sampled such that the fixation location was approximately uniform, and ignored people who were looking outside the picture or at the camera. Similar to PASCAL VOC Action Recognition [4] where ground-truth person bounding boxes are available both during training and testing, we assume that we are given the head location at both train and test time. This allows us to focus our attention on the primary task of gaze-following. In Section 4.3, we show that our method performs well even when using a simple head detector. Our primary evaluation metric compares the ground truth annotations1 against the distribution predicted by our model. We use the Area Under Curve (AUC) criteria from [11] where the predicted heatmap is used as confidences to produce an ROC curve. The AUC is the area under this ROC curve. If our model behaves perfectly, the AUC will be 1 while chance performance is 0.5. L2 distance: We evaluate the Euclidean distance between our prediction and the average of ground truth annotations. We assume each image is of size 1 × 1 when computing the L2 distance. Additionally, as the ground truth may be multimodal, we also report the minimum L2 distance between our pre1Note that, as mentioned in Section 2, we obtain 10 annotations per person in the test set. 6 diction and all ground truth annotations. Angular error: Using the ground truth eye position from the annotation we compute the gaze vectors for the average ground truth fixations and our prediction, and report the angular difference between them. We compare our approach against several baselines ranging from simple (center, fixed bias) to more complex (SVM, free-viewing saliency) as described below. Center: The prediction is always the center of the image. Fixed bias: The prediction is given by the average of fixations from the training set for heads in similar locations as the test image. SVM: We generate features by concatenating the quantized eye position with pool5 of the ImageNet-CNN [12] for both the full image and the head image. We train a SVM on these features to predict gaze using a similar classification grid setup as our model. We evaluate this approach for both, a single grid and shifted grids. Freeviewing saliency: We use a state-of-the-art free-viewing saliency model [11] as a predictor of gaze. Although free-viewing saliency models ignore head orientation and location, they may still identify important objects in the image. 4.2 Results We compare our model against baselines in Tbl.1(a). Our method archives an AUC of 0.878 and a mean Euclidean error of 0.190, outperforming all baselines significantly in all the evaluation metrics. The SVM model using shifted grids shows the best baseline performance, surpassing the one grid baseline by a reasonable margin. This verifies the effectiveness of the shifted grids approach proposed in this work. Fig.5 shows some example outputs of our method. These qualitative results show that our method is able to distinguish people in the image by using the gaze pathway to model a person’s point of view, as it produces different outputs for different people in the same image. Furthermore, it is also able to find salient objects in images, such as balls or food. However, the method still has certain limitations. The lack of 3D understanding generates some wrong predictions, as illustrated by the 1st image in the 2nd row of Fig. 5, where one of the predictions is in a different plane of depth. To obtain an approximate upper bound on prediction performance, we evaluate human performance on this task. Since we annotated our test set 10 times, we can quantify how well one annotation predicts the mean of the remaining 9 annotations. A single human is able to achieve an AUC of 0.924 and a mean Euclidean error of 0.096. While our approach outperforms all baselines, it is still far from reaching human performance. We hope that the availability of GazeFollow will motivate further research in this direction, allowing machines to reach human level performance. 4.3 Analysis Ablation study: In Tbl. 1(b), we report the performance after removing different components of our model, one at a time, to better understand their significance. In general, all three of inputs (image, position and head) contribute to the performance of our model. Interestingly, the model with only the head and its position achieves comparable angular error to our full method, suggesting that the gaze pathway is largely responsible for estimating the gaze direction. Further, we show the results of our model with single output grids (5×5 and 10×10). Removing shifted grids hurts performance significantly as shifted grids have a spatially graded loss function, which is important for learning. Internal representation: In Fig. 6, we visualize the various stages of our network. We show the output of each of the pathways as well as the element wise product. For example, in the second row we have two different girls writing on the blackboard. The gaze mask effectively creates a heat map of the field of view for the girl in the right, while the saliency map identifies the salient spots in the image. The element-wise multiplication of the saliency map and gaze mask removes the responses of the girl on the left and attenuates the saliency of the right girl’s head. Finally, our shifted grids approach accurately predicts where the girl is looking. Further, we apply the technique from [21] to visualize the top activations for different units in the fifth convolutional layer of the saliency pathway. We use filter weights from the sixth convolutional layer to rank their contribution to the saliency map. Fig. 7 shows four units with positive (left) and negative (right) contributions to the saliency map. Interestingly, w learns positive weights for salient objects such as switched on TV monitors and balls, and negative weights for non-salient objects. 7 input image gaze mask saliency product output prediction Figure 6: Visualization of internal representations: We visualize the output of different components of our model. The green circle indicates the person whose gaze we are trying to predict, the red dots/lines show the ground truth gaze, and the yellow line is our predicted gaze. positive weight units negative weight units pizza head screen ball surface lights horizon floor Figure 7: Visualization of saliency units: We visualize several units in our saliency pathway by finding images with high scoring activations, similar to [21]. We sort the units by w, the weights of the sixth convolutional layer (See Section 3.1 for more details). Positive weights tend to correspond to salient everyday objects, while negative weights tend to correspond to background objects. Automatic head detection: To evaluate the impact of imperfect head locations on our system, we built a simple head detector, and input its detections into our model. For detections surpassing the intersection over union threshold of 0.5, our model achieved an AUC of 0.868, as compared to an AUC of 0.878 when using ground-truth head locations. This demonstrates that our model is robust to inaccurate head detections, and can easily be made fully-automatic. 5 Conclusion Accurate gaze-following achieving human-level performance will be an important tool to enable systems that can interpret human behavior and social situations. In this paper, we have introduced a model that learns to do gaze-following using GazeFollow, a large-scale dataset of human annotated gaze. Our model automatically learns to extract the line of sight from heads, without using any supervision on head pose, and to detect salient objects that people are likely to interact with, without requiring object-level annotations during training. We hope that our model and dataset will serve as important resources to facilitate further research in this direction. Acknowledgements. We thank Andrew Owens for helpful discussions. Funding for this research was partially supported by the Obra Social “la Caixa” Fellowship for Post-Graduate Studies to AR and a Google PhD Fellowship to CV. 8 References [1] A. Borji, D. Parks, and L. Itti. Complementary effects of gaze direction and early saliency in guiding fixations during free viewing. Journal of vision, 14(13):3, 2014. [2] A. Borji, D. N. Sihite, and L. Itti. Salient object detection: A benchmark. In ECCV. 2012. [3] N. Emery. The eyes have it: the neuroethology, function and evolution of social gaze. Neuroscience & Biobehavioral Reviews, 2000. [4] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes (VOC) Challenge. IJCV, 2010. [5] A. Fathi, J. K. Hodgins, and J. M. Rehg. Social interactions: A first-person perspective. In CVPR, 2012. [6] A. Fathi, Y. Li, and J. M. Rehg. Learning to recognize daily actions using gaze. In ECCV. 2012. [7] M. W. Hoffman, D. B. Grimes, A. P. Shon, and R. P. Rao. A probabilistic model of gaze imitation and shared attention. Neural Networks, 2006. [8] L. Itti and C. Koch. Computational modelling of visual attention. Nature Reviews Neuroscience, 2001. [9] H. Jasso, J. Triesch, and G. De´ak. Using eye direction cues for gaze following–a developmental model. In ICDL, 2006. [10] Y. Jia. Caffe: An open source convolutional architecture for fast feature embedding. http://caffe.berkeleyvision.org, 2013. [11] T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In CVPR, 2009. [12] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [13] T.-Y. 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. [14] M. J. Marin-Jimenez, A. Zisserman, M. Eichner, and V. Ferrari. Detecting people looking at each other in videos. IJCV, 2014. [15] H. Park, E. Jain, and Y. Sheikh. Predicting primary gaze behavior using social saliency fields. In ICCV, 2013. [16] D. Parks, A. Borji, and L. Itti. Augmented saliency model using automatic 3d head pose detection and learned gaze following in natural scenes. Vision Research, 2014. [17] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 2015. [18] H. Soo Park and J. Shi. Social saliency prediction. In CVPR, 2015. [19] 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. [20] B. Yao, X. Jiang, A. Khosla, A. L. Lin, L. Guibas, and L. Fei-Fei. Human action recognition by learning bases of action attributes and parts. In ICCV, 2011. [21] B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Object detectors emerge in deep scene cnns. In ICLR, 2015. [22] B. Zhou, A. Lapedriza, J. Xiao, A. Torralba, and A. Oliva. Learning deep features for scene recognition using places database. In NIPS, 2014. [23] X. Zhu and D. Ramanan. Face detection, pose estimation, and landmark localization in the wild. In CVPR, 2012. 9 | 2015 | 368 |
5,889 | Softstar: Heuristic-Guided Probabilistic Inference Mathew Monfort Computer Science Department University of Illinois at Chicago Chicago, IL 60607 mmonfo2@uic.edu Brenden M. Lake Center for Data Science New York University New York, NY 10003 brenden@nyu.edu Brian D. Ziebart Computer Science Department University of Illinois at Chicago Chicago, IL 60607 bziebart@uic.edu Patrick Lucey Disney Research Pittsburgh Pittsburgh, PA 15232 patrick.lucey@disneyresearch.com Joshua B. Tenenbaum Brain and Cognitive Sciences Department Massachusetts Institute of Technology Cambridge, MA 02139 jbt@mit.edu Abstract Recent machine learning methods for sequential behavior prediction estimate the motives of behavior rather than the behavior itself. This higher-level abstraction improves generalization in different prediction settings, but computing predictions often becomes intractable in large decision spaces. We propose the Softstar algorithm, a softened heuristic-guided search technique for the maximum entropy inverse optimal control model of sequential behavior. This approach supports probabilistic search with bounded approximation error at a significantly reduced computational cost when compared to sampling based methods. We present the algorithm, analyze approximation guarantees, and compare performance with simulation-based inference on two distinct complex decision tasks. 1 Introduction Inverse optimal control (IOC) [13], also known as inverse reinforcement learning [18, 1] and inverse planning [3], has become a powerful technique for learning to control or make decisions based on expert demonstrations [1, 20]. IOC estimates the utilities of a decision process that rationalizes an expert’s demonstrated control sequences. Those estimated utilities can then be used in an (optimal) controller to solve new decision problems, producing behavior that is similar to demonstrations. Predictive extensions to IOC [17, 23, 2, 16, 19, 6] recognize the inconsistencies, and inherent suboptimality, of repeated behavior by incorporating uncertainty. They provide probabilistic forecasts of future decisions in which stochasticity is due to this uncertainty rather than the stochasticity of the decision process’s dynamics. These models’ distributions over plans and policies can typically be defined as softened versions of optimal sequential decision criteria. A key challenge for predictive IOC is that many decision sequences are embedded within large decision processes. Symmetries in the decision process can be exploited to improve efficiency [21], but decision processes are not guaranteed to be (close to) symmetric. Approximation approaches to probabilistic structured prediction include approximate maxent IOC [12], heuristic-guided sampling [15], and graph-based IOC [7]. However, few guarantees are provided by these approaches; they are not complete and the set of variable assignments uncovered may not be representative of the model’s distribution. Seeking to provide stronger guarantees and improve efficiency over previous methods, we present Softstar, a heuristic-guided probabilistic search algorithm for inverse optimal control. Our approach 1 generalizes the A* search algorithm [8] to calculate distributions over decision sequences in predictive IOC settings allowing for efficient bounded approximations of the near-optimal path distribution through a decision space. This distribution can then be used to update a set of trainable parameters, θ, that motivate the behavior of the decision process via a cost/reward function [18, 1, 3, 23]. We establish theoretical guarantees of this approach and demonstrate its effectiveness in two settings: learning stroke trajectories for Latin characters and modeling the ball-handling decision process of professional soccer. 2 Background 2.1 State-space graphs and Heuristic-guided search In this work, we restrict our consideration to deterministic planning tasks with discrete state spaces. The space of plans and their costs can be succinctly represented using a state-space graph, G = (S, E, cost). With vertices, s ∈S, representing states of the planning task and directed edges, eab ∈E, representing available transitions between states sa and sb. The neighbor set of state s, N(s), is the set of states to which s has a directed edge and a cost function, cost(s, s′), represents the relative desirability of transitioning between states s and s′. The optimal plan from state s1 to goal state sT is a variable-length sequence of states (s1, s2, . . . , sT ) forming a path through the graph minimizing a cumulative penalty. Letting h(s) represent the cost of the optimal path from state s to state sT (i.e., the cost-to-go or value of s) and defining h(sT ) ≜0, the optimal path corresponds to a fixed-point solution of the next state selection criterion [5]: h(s) = min s′∈N (s) h(s′) + cost(s, s′), st+1 = argmin s′∈N (st) h(s′) + cost(st, s′). (1) The optimal path distance to the start state, d(s), can be similarly defined (with d(s1) ≜0) as d(s) = min s′:s∈N(s′) d(s′) + cost(s′, s). (2) Dynamic programming algorithms, such as Dijkstra’s [9], search the space of paths through the state-space graph in order of increasing d(s) to find the optimal path. Doing so implicitly considers all paths up to the length of the optimal path to the goal. Additional knowledge can significantly reduce the portion of the state space needed to be explored to obtain an optimal plan. For example, A* search [11] explores partial state sequences by expanding states that minimize an estimate, f(s) = d(s) + ˆh(s), combining the minimal cost to reach state s, d(s), with a heuristic estimate of the remaining cost-to-go, ˆh(s). A priority queue is used to keep track of expanded states and their respective estimates. A* search then expands the state at the top of the queue (lowest f(s)) and adds its neighboring states to the queue. When the heuristic estimate is admissible (i.e. ˆh(s) ≤h(s) ∀s ∈S), the algorithm terminates with a guaranteed optimal solution once the best “unexpanded” state’s estimate, f(s), is worse than the best discovered path to the goal. 2.2 Predictive inverse optimal control Maximum entropy IOC algorithms [23, 22] estimate a stochastic action policy that is most uncertain while still guaranteeing the same expected cost as demonstrated behavior on an unknown cost function [1]. For planning settings with deterministic dynamics, this yields a probability distribution over state sequences that are consistent with paths through the state-space graph, ˆP(s1:T ) ∝e−costθ(s1:T ), where costθ(s1:T ) = T −1 X t=1 θTf(st, st+1) is a linearly weighted vector of state-transition features combined using the feature function, f(st, st+1), and a learned parameter vector, θ. Calculating the marginal state probabilities of this distribution is important for estimating model parameters. The forward-backward algorithm [4] can be employed, but for large state-spaces it may not be practical. 2 3 Approach Motivated by the efficiency of heuristic-guided search algorithms for optimal planning, we define an analogous approximation task in the predictive inference setting and present an algorithm that leverages heuristic functions to accomplish this task efficiently with bounded approximation error. The problem being addressed is the inefficiency of existing inference methods for reward/cost-based probabilistic models of behavior. We present a method using ideas from heuristic-guided search (i.e., A*) for estimating path distributions through large scale deterministic graphs with bounded approximation guarantees. This is an improvement over previous methods as it results in more accurate distribution estimations without the complexity/sub-optimality concerns of path sampling and is suitable for any problem that can be represented as such a graph. Additionally, since the proposed method does not sample paths, but instead searches the space as in A*, it does not need to retrace its steps along a previously searched trajectory to find a new path to the goal. It will instead create a new branch from an already explored state. Sampling would require retracing an entire sequence until this branching state was reached. This allows for improvements in efficiency in addition to the distribution estimation improvements. 3.1 Inference as softened planning We begin our investigation by recasting the inference task from the perspective of softened planning where the predictive IOC distribution over state sequences factors into a stochastic policy [23], π(st+1|st) = ehsoft(st)−hsoft(st+1)−θTf(st,st+1), (3) according to a softened cost-to-go , hsoft(s), recurrence that is a relaxation of the Bellman equation: hsoft(st) = −log X st:T ∈Ξst,sT e−costθ(st:T ) = softmin st+1∈N (st) hsoft(st+1) + θTf(st, st+1) (4) where Ξst,sT is the set of all paths from st to sT; the softmin, softmin x α(x) ≜−log X x e−α(x), is a smoothed relaxation of the min function1, and the goal state value is initially 0 and ∞for others. A similar softened minimum distance exists in the forward direction from the start state, dsoft(st) = −log X s1:t∈Ξs1,st e−costθ(s1:t) = softmin st−1∈N (st) dsoft(st−1) + θTf(st−1, st) . By combining forward and backward soft distances, important marginal expectations are obtained and used to predict state visitation probabilities and fit the maximum entropy IOC model’s parameters [23]. Efficient search and learning require accurate estimates of dsoft and hsoft values since the expected number of occurrences of the transition from sa to sb under the soft path distribution is: e−dsoft(sa)−hsoft(sb)−θTf(sa,sb)+dsoft(sT). (5) These cost-to-go and distance functions can be computed in closed-form using a geometric series, B = A(I −A)−1 = A + A2 + A3 + A4 + · · · , (6) where Ai,j = e−cost(si,sj) for any states si and sj ∈S. The (i, j)th entry of B is related to the softmin of all the paths from si to sj. Specifically, the softened cost-to-go can be written as hsoft(si) = −log bsi,sT. Unfortunately, the required matrix inversion operation is computationally expensive, preventing its use in typical inverse optimal control applications. In fact, power iteration methods used for sparse matrix inversion closely resemble the softened Bellman updates of Equation (4) that have instead been used for IOC [22]. 1Equivalently, min x α(x)+softmin x n α(x) −min x α(x) o is employed to avoid overflow/underflow in practice. 3 3.2 Challenges and approximation desiderata In contrast with optimal control and planning tasks, softened distance functions, dsoft(s), and costto-go functions, hsoft(s), in predictive IOC are based on many paths rather than a single (best) one. Thus, unlike in A* search, each sub-optimal path cannot simply be ignored; its influence must instead be incorporated into the softened distance calculation (4). This key distinction poses a significantly different objective for heuristic-guided probabilistic search: Find a subset of paths for which the softmin distances closely approximate the softmin of the entire path set. While we would hope that a small subset of paths exists that provides a close approximation, the cost function weights and the structure of the state-space graph ultimately determine if this is the case. With this in mind, we aim to construct a method with the following desiderata for an algorithm that seeks a small approximation set and analyze its guarantees: 1. Known bounds on approximation guarantees; 2. Convergence to any desired approximation guarantee; 3. Efficienct finding small approximation sets of paths. 3.3 Regimes of Convergence In A* search, theoretical results are based on the assumption that all infinite length paths have infinite cost (i.e., any cycle has a positive cost) [11]. This avoids a negative cost cycle regime of non-convergence. Leading to a stronger requirement for our predictive setting are three regimes of convergence for the predictive IOC distribution, characterized by: 1. An infinite-length most likely plan; 2. A finite-length most likely plan with expected infinite-length plans; and 3. A finite expected plan length. The first regime results from the same situation described for optimal planning: reachable cycles of negative cost. The second regime arises when the number of paths grows faster than the penalization of the weights from the additional cost of longer paths (without negative cycles) and is non-convergent. The final regime is convergent. An additional assumption is needed in the predictive IOC setting to avoid the second regime of nonconvergence. We assume that a fixed bound on the entropy of the distribution of paths, H(S1:T ) ≜ E[−log P(S1:T )] ≤Hmax, is known. Theorem 1 Expected costs under the predictive IOC distribution are related to entropy and softmin path costs by E[costθ(S1:T )] = H(S1:T ) −dsoft(sT). Together, bounds on the entropy and softmin distance function constrain expected costs under the predictive IOC distribution (Theorem 1). 3.4 Computing approximation error bounds A* search with a non-monotonic heuristic function guarantees optimality when the priority queue’s minimal element has an estimate dsoft(s) + ˆhsoft(s) exceeding the best start-to-goal path cost, dsoft(sT). Though optimality is no longer guaranteed in the softmin search setting, approximations to the softmin distance are obtained by considering a subset of paths (Lemma 1). Lemma 1 Let Ξ represent the entire set (potentially infinite in size) of paths from state s to sT. We can partition the set Ξ into two sets Ξa and Ξb such that Ξa ∪Ξb = Ξ and Ξa ∩Ξb = ∅and define dΞ soft as the softmin over all paths in set Ξ. Then, given a lower bound estimate for the distance, ˆdsoft(s) ≤dsoft(s), we have e−dΞ soft(s) −e−dΞa soft (s) ≤e−ˆd Ξb soft (s). We establish a bound on the error introduced by considering the set of paths through a set of states S≈in the following Theorem. Theorem 2 Given an approximation state subset S≈⊆S with neighbors of the approximation set defined as N(S≈) ≜ [ s∈S≈ N(s) −S≈, the approximation loss of exact search for paths through 4 this approximation set (i.e., paths with non-terminal vertices from S≈and terminal vertices from S≈∪N(S≈)) is bounded by the softmin of the set’s neighbors estimates, e−dsoft(sT) −e−dS≈ soft (sT) ≤ e−softmins∈N (S≈){dS≈ soft (s)+ˆhsoft(s)}, where dS≈ soft(s) is the softmin of all paths with terminal state s and all previous states within S≈. Thus, for a dynamic construction of the approximation set S≈, a bound on approximation error can be maintained by tracking the weights of all states in the neighborhood of that set. In practice, even computing the exact softened distance function for paths through a small subset of states may be computationally impractical. Theorem 3 establishes the approximate search bounds when only a subset of paths in the approximation set are employed to compute the soft distance. Theorem 3 If a subset of paths Ξ′ S≈⊆ΞS≈(and ¯Ξ′S≈⊆ΞS≈−Ξ′ S≈represents a set of paths that are prefixes for all of the remaining paths within S≈) through the approximation set S≈is employed to compute the soft distance, the error of the resulting estimate is bounded by: e−dsoft(sT) −e−d Ξ′ S≈ soft (sT) ≤e −softmin softmins∈N (S≈) ( d Ξ′ S≈ soft (s)+ˆhsoft(s) ) ,softmins∈S≈ ( d ¯ Ξ′S≈ soft (s)+ˆhsoft(s) ) . 3.5 Softstar: Greedy forward path exploration and backward cost-to-go estimation Our algorithm greedily expands nodes by considering the state contributing the most to the approximation bound (Theorem 3). This is accomplished by extending A* search in the following algorithm. Algorithm 1 Softstar: Greedy forward and approximate backward search with fixed ordering Input: State-space graph G, initial state s1, goal sT, heuristic ˆhsoft, and approximation bound ϵ Output: Approximate soft distance to goal hS≈ soft Set hsoft(s) = dsoft(s) = fsoft(s) = ∞∀s ∈S, hsoft(sT) = 0, dsoft(s1) = 0 and fsoft(s1) = ˆhsoft(s1) Insert ⟨s1, fsoft(s1)⟩into priority queue P and initialize empty stack O while softmin s∈P (fsoft(s)) + ϵ ≤dsoft(sT) do Set s →min element popped from P Push s onto O for s′ ∈N(s) do fsoft(s′) = softmin(fsoft(s′), dsoft(s) +cost(s, s′)+ˆhsoft(s′)) dsoft(s′) = softmin(dsoft(s′), dsoft(s) +cost(s, s′)) (Re-)Insert ⟨s′, fsoft(s′)⟩into P end end while O not empty do Set s →top element popped from O for s′ ∈N(s) do hsoft(s) = softmin(hsoft(s), hsoft(s′) + cost(s, s′)) end end return hsoft For insertions to the priority queue, if s′ already exists in the queue, its estimate is updated to the softmin of its previous estimate and the new insertion estimate. Additionally, the softmin of all of the estimates of elements on the queue can be dynamically updated as elements are added and removed. The queue contains some states that have never been explored and some that have. The former correspond to the neighbors of the approximation state set and the latter correspond to the search approximation error within the approximation state set (Theorem 3). The softmin over all elements of the priority queue thus provides a bound on the approximation error of the returned distance measure. The exploration order, O, is a stack containing the order that each state is explored/expanded. A loop through the reverse of the node exploration ordering (stack O) generated by the forward search computes complementary backward cost-to-go values, hsoft. The expected number of occur5 rences of state transitions can then be calculated for the approximate distribution (5). The bound on the difference between the expected path cost of this approximate distribution and the actual distribution over the entire state set is established in Theorem 4. Theorem 4 The cost expectation inaccuracy introduced by employing state set S≈is bounded by |E[costθ(S1:T )] −ES≈[costθ(S1:T )]| ≤ e dS≈ soft (sT)−softmin s∈P (fsoft(s))EP [costθ(S1:T )] −ES≈[costθ(S1:T )] , where: ES≈is the expectation under the approximate state set produced by the algorithm; softmin s∈P (fsoft(s)) is the softmin of fsoft for all the states remaining on the priority queue after the first while loop of Algorithm 1; and EP is the expectation over all paths not considered in the second while loop (i.e., remaining on the queue). EP is unknown, but can be bounded using Theorem 1. 3.6 Completeness guarantee The notion of monotonicity extends to the probabilistic setting, guaranteeing that the expansion of a state provides no looser bounds than the unexpanded state (Definition 1). Definition 1 A heuristic function ˆhsoft is monotonic if and only if ∀s ∈ S, ˆhsoft(s) ≥ softmin s′∈N (s) n ˆhsoft(s′) + cost(s, s′) o . Assuming this, the completeness of the proposed algorithm can be established (Theorem 5). Theorem 5 For monotonic heuristic functions and finite softmin distances, convergence to any level of softmin approximation is guaranteed by Algorithm 1. 4 Experimental Validation We demonstrate the effectiveness of our approach on datasets for Latin character construction using sequences of pen strokes and ball-handling decisions of professional soccer players. In both cases we learn the parameters of a state-action cost function that motivates the behavior in the demonstrated data and using the softstar algorithm to estimate the state-action feature distributions needed to update the parameters of the cost function [23]. We refer to the appendix for more information. We focus our experimental results on estimating state-action feature distributions through large state spaces for inverse optimal control as there is a lot of room for improvement over standard approaches which typically use sampling based methods to estimate the distributions providing few (if any) approximation guarantees. Softstar directly estimates this distribution with bounded approximation error allowing for a more accurate estimation and more informed parameter updates. 4.1 Comparison approaches We compare our approach to heuristic guided maximum entropy sampling [15], approximate maximum entropy sampling [12], reversible jump Markov chain Monte Carlo (MCMC) [10], and a search that is not guided by heuristics (comparable to Dijkstra’s algorithm for planning). For consistency, we use the softmin distance to generate the values of each state in MCMC. Results were collected on an Intel i7-3720QM CPU at 2.60GHz. 4.2 Character drawing We apply our approach to the task of predicting the sequential pen strokes used to draw characters from the Latin alphabet. The task is to learn the behavior of how a person draws a character given some nodal skeleton. Despite the apparent simplicity, applying standard IOC methods is challenging due to the large planning graph corresponding to a fine-grained representation of the task. We demonstrate the effectiveness of our method against other commonly employed techniques. Demonstrated data: The data consists of a randomly separated training set of 400 drawn characters, each with a unique demonstrated trajectory, and a separate test set of 52 examples where the handwritten characters are converted into skeletons of nodes within a unit character frame [14]. 6 Figure 1: Character skeleton with two pen strokes. For example, the character in Figure 1 was drawn using two strokes, red and green respectively. The numbering indicates the start of each stroke. State and feature representation: The state consists of a two node history (previous and current node) and a bitmap signifying which edges are covered/uncovered. The state space size is 2|E|(|V | + 1)2 with |E| edges and |V | nodes. The number of nodes is increased by one to account for the initial state. For example, a character with 16 nodes and 15 edges with has a corresponding state space of about 9.47 million states. The initial state has no nodal history and a bitmap with all uncovered edges. The goal state will have a two node history as defined above, and a fully set bitmap representing all edges as covered. Any transition between nodes is allowed, with transitions between neighbors defined as edge draws and all others as pen lifts. The appendix provides additional details on the feature representation. Heuristic: We consider a heuristic function that combines the (soft) minimum costs of covering each remaining uncovered edge in a character assuming all moves that do not cross an uncovered edge have zero cost. Formally, it is expressed using the set of uncovered edges, Eu, and the set of all possible costs of traversing edge i, cost(ei), as ˆhsoft(s) = X ei∈Eu softmin ei cost(ei). 4.3 Professional Soccer In addition, we apply our approach to the task of modeling the discrete spatial decision process of the ball-handler for single possession open plays in professional soccer. As in the character drawing task, we demonstrate the effectiveness of our approach against other commonly employed techniques. Demonstrated data: Tracking information from 93 games consisting of player locations and time steps of significant events/actions were pre-processed into sets of sequential actions in single possessions. Each possession may include multiple different team-mates handling the ball at different times resulting in a team decision process on actions rather than single player actions/decisions. Discretizing the soccer field into cells leads to a very large decision process when considering actions to each cell at each step. We increase generalization by reformatting the field coordinates so that the origin lies in the center of the team’s goal and all playing fields are normalized to 105m by 68m and discretized into 5x4m cells. Formatting the field coordinates based on the distances from the goal of the team in possession doubles the amount of training data for similar coordinates. The positive and negative half planes of the y axis capture which side of the goal the ball is located on. We train a spatial decision model on 92 of the games and evaluate the learned ball trajectories on a single test game. The data contains 20,337 training possession sequences and 230 test sequences. State and feature representation: The state consists of a two action history where an action is designated as a type-cell tuple where the type is the action (pass, shot, clear, dribble, or cross) and the cell is the destination cell with the most recent action containing the ball’s current location. There are 1433 possible actions at each step in a trajectory resulting in about 2.05 million possible states. There are 28 Euclidean features for each action type and 29 that apply to all action types resulting in 168 total features.We use the same features as the character drawing model and include a different set of features for each action type to learn unique action based cost functions. Heuristic: We use the softmin cost over all possible actions from the current state as a heuristic. It is admissible if the next state is assumed to always be the goal: ˆhsoft(s) = softmin s′∈N (s) {cost(s, s′)}. 4.4 Comparison of learning efficiency We compare Softstar to other inference procedures for large scale IOC and measure the average test set log-loss, equivalent to the difference between the cost of the demonstrated path, cost(s1:T ), and the softmin distance to the goal, dsoft(goal), −log P(path) = cost(s1:T ) −dsoft(goal). 7 Log-Loss After Each Training Epoch Average Test Log-Loss 5 10 15 20 25 30 35 40 Training Epoch 0 2 4 6 8 10 Approximate Max Ent Heuristic Max Ent SoftStar Average Test Log-Loss 50 100 150 200 250 Training Epoch 0 5 10 15 20 25 Approximate Max Ent Heuristic Max Ent SoftStar Figure 2: Training efficiency on the Character (left) and Soccer domains (right). Figure 2 shows the decrease of the test set log-loss after each training epoch. The proposed method learns the models far more efficiently than both approximate max ent IOC [12] and heuristic guided sampling [15]. This is likely due to the more accurate estimation of the feature expectations that results from searching the graph rather than sampling trajectories. The improved efficiency of the proposed method is also evident if we analyze the respective time taken to train each model. Softstar took ~5 hours to train 10 epochs for the character model and ~12 hours to train 25 epochs for the soccer model. To compare, heuristic sampling took ~9 hours for the character model and ~17 hours for the soccer model, and approximate max ent took ~10 hours for the character model and ~20 hours for the soccer model. 4.5 Analysis of inference efficiency In addition to evaluating learning efficiency, we compare the average time efficiency for generating lower bounds on the estimated softmin distance to the goal for each model in Figure 3. Softmin Distance Estimation as a Function of Time Estimated Softmin Distance 0 50 100 150 Seconds 0 20 40 60 80 100 MCMC Approximate Max Ent Heuristic Max Ent Soft Star Estimated Softmin Distance 0 50 100 150 200 Seconds 0 20 40 60 80 100 MCMC Approximate Max Ent Heuristic Max Ent Softstar Figure 3: Inference efficiency evaluations for the Character (left) and Soccer domains (right). The MCMC approach has trouble with local optima. While the unguided algorithm does not experience this problem, it instead explores a large number of improbable paths to the goal. The proposed method avoids low probability paths and converges much faster than the comparison methods. MCMC fails to converge on both examples even after 1,200 seconds, matching past experience with the character data where MCMC proved incapable of efficient inference. 5 Conclusions In this work, we extended heuristic-guided search techniques for optimal planning to the predictive inverse optimal control setting. Probabilistic search in these settings is significantly more computationally demanding than A* search, both in theory and practice, primarily due to key differences between the min and softmin functions. However, despite this, we found significant performance improvements compared to other IOC inference methods by employing heuristic-guided search ideas. Acknowledgements This material is based upon work supported by the National Science Foundation under Grant No. #1227495, Purposeful Prediction: Co-robot Interaction via Understanding Intent and Goals. 8 References [1] Peter Abbeel and Andrew Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings International Conference on Machine Learning, pages 1–8, 2004. [2] Monica Babes, Vukosi Marivate, Kaushik Subramanian, and Michael L Littman. Apprenticeship learning about multiple intentions. In International Conference on Machine Learning, 2011. [3] Chris L. Baker, Joshua B. Tenenbaum, and Rebecca R. Saxe. Goal inference as inverse planning. In Conference of the Cognitive Science Society, 2007. [4] Leonard E Baum. An equality and associated maximization technique in statistical estimation for probabilistic functions of markov processes. Inequalities, 3:1–8, 1972. [5] Richard Bellman. A Markovian decision process. Journal of Mathematics and Mechanics, 6:679–684, 1957. [6] Abdeslam Boularias, Jens Kober, and Jan Peters. Relative entropy inverse reinforcement learning. In Proceedings of the International Conference on Artificial Intelligence and Statistics, pages 182–189, 2011. [7] Arunkumar Byravan, Mathew Monfort, Brian Ziebart, Byron Boots, and Dieter Fox. Graph-based inverse optimal control for robot manipulation. In Proceedings of the International Joint Conference on Artificial Intelligence, 2015. [8] Rina Dechter and Judea Pearl. Generalized best-first search strategies and the optimality of a*. J. ACM, July 1985. [9] Edsger W. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik, 1959. [10] Peter J. Green. Reversible jump markov chain monte carlo computation and bayesian model determination. Biometrika, 82:711–732, 1995. [11] Peter E. Hart, Nils J. Nilsson, and Bertram Raphael. A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics, 4:100–107, 1968. [12] De-An Huang, Amir massoud Farahman, Kris M. Kitani, and J. Andrew Bagnell. Approximate maxent inverse optimal control and its application for mental simulation of human interactions. In AAAI, 2015. [13] Rudolf E. Kalman. When is a linear control system optimal? Trans. ASME, J. Basic Engrg., 86:51–60, 1964. [14] Brenden M Lake, Ruslan Salakhutdinov, and Josh Tenenbaum. One-shot learning by inverting a compositional causal process. In NIPS, 2013. [15] Mathew Monfort, Brenden M. Lake, Brian D. Ziebart, and Joshua B. Tenenbaum. Predictive inverse optimal control in large decision processes via heuristic-based search. In ICML Workshop on Robot Learning, 2013. [16] Mathew Monfort, Anqi Liu, and Brian Ziebart. Intent prediction and trajectory forecasting via predictive inverse linear-quadratic regulation. In AAAI, 2015. [17] Gergely Neu and Csaba Szepesv´ari. Apprenticeship learning using inverse reinforcement learning and gradient methods. In Proceedings UAI, pages 295–302, 2007. [18] Andrew Y. Ng and Stuart Russell. Algorithms for inverse reinforcement learning. In Proceedings International Conference on Machine Learning, 2000. [19] Deepak Ramachandran and Eyal Amir. Bayesian inverse reinforcement learning. In Proceedings International Joint Conferences on Artificial Intelligence, pages 2586–2591, 2007. [20] Nathan D. Ratliff, J. Andrew Bagnell, and Martin A. Zinkevich. Maximum margin planning. In Proceedings International Conference on Machine Learning, pages 729–736, 2006. [21] Paul Vernaza and Drew Bagnell. Efficient high dimensional maximum entropy modeling via symmetric partition functions. In Advances in Neural Information Processing Systems, pages 575–583, 2012. [22] Brian D. Ziebart, J. Andrew Bagnell, and Anind K. Dey. Modeling interaction via the principle of maximum causal entropy. In International Conference on Machine Learning, 2010. [23] Brian D. Ziebart, Andrew Maas, J. Andrew Bagnell, and Anind K. Dey. Maximum entropy inverse reinforcement learning. In Association for the Advancement of Artificial Intelligence, 2008. 9 | 2015 | 369 |
5,890 | Learning Continuous Control Policies by Stochastic Value Gradients Nicolas Heess⇤, Greg Wayne⇤, David Silver, Timothy Lillicrap, Yuval Tassa, Tom Erez Google DeepMind {heess, gregwayne, davidsilver, countzero, tassa, etom}@google.com ⇤These authors contributed equally. Abstract We present a unified framework for learning continuous control policies using backpropagation. It supports stochastic control by treating stochasticity in the Bellman equation as a deterministic function of exogenous noise. The product is a spectrum of general policy gradient algorithms that range from model-free methods with value functions to model-based methods without value functions. We use learned models but only require observations from the environment instead of observations from model-predicted trajectories, minimizing the impact of compounded model errors. We apply these algorithms first to a toy stochastic control problem and then to several physics-based control problems in simulation. One of these variants, SVG(1), shows the effectiveness of learning models, value functions, and policies simultaneously in continuous domains. 1 Introduction Policy gradient algorithms maximize the expectation of cumulative reward by following the gradient of this expectation with respect to the policy parameters. Most existing algorithms estimate this gradient in a model-free manner by sampling returns from the real environment and rely on a likelihood ratio estimator [32, 26]. Such estimates tend to have high variance and require large numbers of samples or, conversely, low-dimensional policy parameterizations. A second approach to estimate a policy gradient relies on backpropagation instead of likelihood ratio methods. If a differentiable environment model is available, one can link together the policy, model, and reward function to compute an analytic policy gradient by backpropagation of reward along a trajectory [18, 11, 6, 9]. Instead of using entire trajectories, one can estimate future rewards using a learned value function (a critic) and compute policy gradients from subsequences of trajectories. It is also possible to backpropagate analytic action derivatives from a Q-function to compute the policy gradient without a model [31, 21, 23]. Following Fairbank [8], we refer to methods that compute the policy gradient through backpropagation as value gradient methods. In this paper, we address two limitations of prior value gradient algorithms. The first is that, in contrast to likelihood ratio methods, value gradient algorithms are only suitable for training deterministic policies. Stochastic policies have several advantages: for example, they can be beneficial for partially observed problems [24]; they permit on-policy exploration; and because stochastic policies can assign probability mass to off-policy trajectories, we can train a stochastic policy on samples from an experience database in a principled manner. When an environment model is used, value gradient algorithms have also been critically limited to operation in deterministic environments. By exploiting a mathematical tool known as “re-parameterization” that has found recent use for generative models [20, 12], we extend the scope of value gradient algorithms to include the optimization of stochastic policies in stochastic environments. We thus describe our framework as Stochastic Value Gradient (SVG) methods. Secondly, we show that an environment dynamics model, value function, and policy can be learned jointly with neural networks based only on environment interaction. Learned dynamics models are often inaccurate, which we mitigate by computing value gradients along real system trajectories instead of planned ones, a feature shared by model-free 1 methods [32, 26]. This substantially reduces the impact of model error because we only use models to compute policy gradients, not for prediction, combining advantages of model-based and modelfree methods with fewer of their drawbacks. We present several algorithms that range from model-based to model-free methods, flexibly combining models of environment dynamics with value functions to optimize policies in stochastic or deterministic environments. Experimentally, we demonstrate that SVG methods can be applied using generic neural networks with tens of thousands of parameters while making minimal assumptions about plants or environments. By examining a simple stochastic control problem, we show that SVG algorithms can optimize policies where model-based planning and likelihood ratio methods cannot. We provide evidence that value function approximation can compensate for degraded models, demonstrating the increased robustness of SVG methods over model-based planning. Finally, we use SVG algorithms to solve a variety of challenging, under-actuated, physical control problems, including swimming of snakes, reaching, tracking, and grabbing with a robot arm, fall-recovery for a monoped, and locomotion for a planar cheetah and biped. 2 Background We consider discrete-time Markov Decision Processes (MDPs) with continuous states and actions and denote the state and action at time step t by st 2 RNS and at 2 RNA, respectively. The MDP has an initial state distribution s0 ⇠p0(·), a transition distribution st+1 ⇠p(·|st, at), and a (potentially time-varying) reward function rt = r(st, at, t).1 We consider time-invariant stochastic policies a ⇠p(·|s; ✓), parameterized by ✓. The goal of policy optimization is to find policy parameters ✓that maximize the expected sum of future rewards. We optimize either finite-horizon or infinite-horizon sums, i.e., J(✓) = E hPT t=0 γtrt##✓ i or J(✓) = E ⇥P1 t=0 γtrt##✓ ⇤ where γ 2 [0, 1] is a discount factor.2 When possible, we represent a variable at the next time step using the “tick” notation, e.g., s0 , st+1. In what follows, we make extensive use of the state-action-value Q-function and state-value Vfunction. Qt(s, a) = E "X ⌧=t γ⌧−tr⌧##st = s, at = a, ✓ # ; V t(s) = E "X ⌧=t γ⌧−tr⌧##st = s, ✓ # . (1) For finite-horizon problems, the value functions are time-dependent, e.g., V 0 , V t+1(s0), and for infinite-horizon problems the value functions are stationary, V 0 , V (s0). The relevant meaning should be clear from the context. The state-value function can be expressed recursively using the stochastic Bellman equation V t(s) = Z rt + γ Z V t+1(s0)p(s0|s, a)ds0 , p(a|s; ✓)da. (2) We abbreviate partial differentiation using subscripts, gx , @g(x, y)/@x. 3 Deterministic value gradients The deterministic Bellman equation takes the form V (s) = r(s, a)+γV 0(f(s, a)) for a deterministic model s0 = f(s, a) and deterministic policy a = ⇡(s; ✓). Differentiating the equation with respect to the state and policy yields an expression for the value gradient Vs = rs + ra⇡s + γV 0 s0(fs + fa⇡s), (3) V✓= ra⇡✓+ γV 0 s0fa⇡✓+ γV 0 ✓. (4) In eq. 4, the term γV 0 ✓arises because the total derivative includes policy gradient contributions from subsequent time steps (full derivation in Appendix A). For a purely model-based formalism, these equations are used as a pair of coupled recursions that, starting from the termination of a trajectory, proceed backward in time to compute the gradient of the value function with respect to the state and policy parameters. V 0 ✓returns the total policy gradient. When a state-value function is used 1We make use of a time-varying reward function only in one problem to encode a terminal reward. 2γ < 1 for the infinite-horizon case. 2 after one step in the recursion, ra⇡✓+ γV 0 s0fa⇡✓directly expresses the contribution of the current time step to the policy gradient. Summing these gradients over the trajectory gives the total policy gradient. When a Q-function is used, the per-time step contribution to the policy gradient takes the form Qa⇡✓. 4 Stochastic value gradients One limitation of the gradient computation in eqs. 3 and 4 is that the model and policy must be deterministic. Additionally, the accuracy of the policy gradient V✓is highly sensitive to modeling errors. We introduce two critical changes: First, in section 4.1, we transform the stochastic Bellman equation (eq. 2) to permit backpropagating value information in a stochastic setting. This also enables us to compute gradients along real trajectories, not ones sampled from a model, making the approach robust to model error, leading to our first algorithm “SVG(1),” described in section 4.2. Second, in section 4.3, we show how value function critics can be integrated into this framework, leading to the algorithms “SVG(1)” and “SVG(0)”, which expand the Bellman recursion for 1 and 0 steps, respectively. Value functions further increase robustness to model error and extend our framework to infinite-horizon control. 4.1 Differentiating the stochastic Bellman equation Re-parameterization of distributions Our goal is to backpropagate through the stochastic Bellman equation. To do so, we make use of a concept called “re-parameterization”, which permits us to compute derivatives of deterministic and stochastic models in the same way. A very simple example of re-parameterization is to write a conditional Gaussian density p(y|x) = N(y|µ(x), σ2(x)) as the function y = µ(x) + σ(x)⇠, where ⇠⇠N(0, 1). From this point of view, one produces samples procedurally by first sampling ⇠, then deterministically constructing y. Here, we consider conditional densities whose samples are generated by a deterministic function of an input noise variable and other conditioning variables: y = f(x, ⇠), where ⇠⇠⇢(·), a fixed noise distribution. Rich density models can be expressed in this form [20, 12]. Expectations of a function g(y) become Ep(y|x)g(y) = R g(f(x, ⇠))⇢(⇠)d⇠. The advantage of working with re-parameterized distributions is that we can now obtain a simple Monte-Carlo estimator of the derivative of an expectation with respect to x: rxEp(y|x)g(y) = E⇢(⇠)gyfx ⇡1 M M X i=1 gyfx ## ⇠=⇠i. (5) In contrast to likelihood ratio-based Monte Carlo estimators, rx log p(y|x)g(y), this formula makes direct use of the Jacobian of g. Re-parameterization of the Bellman equation We now re-parameterize the Bellman equation. When re-parameterized, the stochastic policy takes the form a = ⇡(s, ⌘; ✓), and the stochastic environment the form s0 = f(s, a, ⇠) for noise variables ⌘⇠⇢(⌘) and ⇠⇠⇢(⇠), respectively. Inserting these functions into eq. (2) yields V (s) = E⇢(⌘) r(s, ⇡(s, ⌘; ✓)) + γE⇢(⇠) ⇥ V 0(f(s, ⇡(s, ⌘; ✓), ⇠)) ⇤, . (6) Differentiating eq. 6 with respect to the current state s and policy parameters ✓gives Vs = E⇢(⌘) rs + ra⇡s + γE⇢(⇠)V 0 s0(fs + fa⇡s) , , (7) V✓= E⇢(⌘) ra⇡✓+ γE⇢(⇠) ⇥ V 0 s0fa⇡✓+ V 0 ✓ ⇤, . (8) We are interested in controlling systems with a priori unknown dynamics. Consequently, in the following, we replace instances of f or its derivatives with a learned model ˆf. Gradient evaluation by planning A planning method to compute a gradient estimate is to compute a trajectory by running the policy in loop with a model while sampling the associated noise variables, yielding a trajectory ⌧= (s1, ⌘1, a1, ⇠1, s2, ⌘2, a2, ⇠2, . . . ). On this sampled trajectory, a Monte-Carlo estimate of the policy gradient can be computed by the backward recursions: 3 vs = [rs + ra⇡s + γv0 s0(ˆfs + ˆfa⇡s)] ## ⌘,⇠, (9) v✓= [ra⇡✓+ γ(v0 s0ˆfa⇡✓+ v0 ✓)] ## ⌘,⇠, (10) where have written lower-case v to emphasize that the quantities are one-sample estimates3, and “ ## x” means “evaluated at x”. Gradient evaluation on real trajectories An important advantage of stochastic over deterministic models is that they can assign probability mass to observations produced by the real environment. In a deterministic formulation, there is no principled way to account for mismatch between model predictions and observed trajectories. In this case, the policy and environment noise (⌘, ⇠) that produced the observed trajectory are considered unknown. By an application of Bayes’ rule, which we explain in Appendix B, we can rewrite the expectations in equations 7 and 8 given the observations (s, a, s0) as Vs = Ep(a|s)Ep(s0|s,a)Ep(⌘,⇠|s,a,s0) rs + ra⇡+γV 0 s0(ˆfs + ˆfa⇡s) , , (11) V✓= Ep(a|s)Ep(s0|s,a)Ep(⌘,⇠|s,a,s0) ra⇡✓+ γ(V 0 s0ˆfa⇡✓+ V 0 ✓) , , (12) where we can now replace the two outer expectations with samples derived from interaction with the real environment. In the special case of additive noise, s0 = ˆf(s, a) + ⇠, it is possible to use a deterministic model to compute the derivatives (ˆfs,ˆfa). The noise’s influence is restricted to the gradient of the value of the next state, V 0 s0, and does not affect the model Jacobian. If we consider it desirable to capture more complicated environment noise, we can use a re-parameterized generative model and infer the missing noise variables, possibly by sampling from p(⌘, ⇠|s, a, s0). 4.2 SVG(1) SVG(1) computes value gradients by backward recursions on finite-horizon trajectories. After every episode, we train the model, ˆf, followed by the policy, ⇡. We provide pseudocode for this in Algorithm 1 but discuss further implementation details in section 5 and in the experiments. Algorithm 1 SVG(1) 1: Given empty experience database D 2: for trajectory = 0 to 1 do 3: for t = 0 to T do 4: Apply control a = ⇡(s, ⌘; ✓), ⌘⇠⇢(⌘) 5: Insert (s, a, r, s0) into D 6: end for 7: Train generative model ˆf using D 8: v0 s = 0 (finite-horizon) 9: v0 ✓= 0 (finite-horizon) 10: for t = T down to 0 do 11: Infer ⇠|(s, a, s0) and ⌘|(s, a) 12: v✓= [ra⇡✓+ γ(v0 s0ˆfa⇡✓+ v0 ✓)] !! ⌘,⇠ 13: vs = [rs + ra⇡s + γv0 s0(ˆfs + ˆfa⇡s)] !! ⌘,⇠ 14: end for 15: Apply gradient-based update using v0 ✓ 16: end for Algorithm 2 SVG(1) with Replay 1: Given empty experience database D 2: for t = 0 to 1 do 3: Apply control ⇡(s, ⌘; ✓), ⌘⇠⇢(⌘) 4: Observe r, s0 5: Insert (s, a, r, s0) into D 6: // Model and critic updates 7: Train generative model ˆf using D 8: Train value function ˆV using D (Alg. 4) 9: // Policy update 10: Sample (sk, ak, rk, sk+1) from D (k t) 11: w = p(ak|sk;✓t) p(ak|sk;✓k) 12: Infer ⇠k|(sk, ak, sk+1) and ⌘k|(sk, ak) 13: v✓= w(ra + γ ˆV 0 s0ˆfa)⇡✓ !! ⌘k,⇠k 14: Apply gradient-based update using v✓ 15: end for 4.3 SVG(1) and SVG(0) In our framework, we may learn a parametric estimate of the expected value ˆV (s; ⌫) (critic) with parameters ⌫. The derivative of the critic value with respect to the state, ˆVs, can be used in place of the sample gradient estimate given in eq. (9). The critic can reduce the variance of the gradient estimates because ˆV approximates the expectation of future rewards while eq. (9) provides only a 3In the finite-horizon formulation, the gradient calculation starts at the end of the trajectory for which the only terms remaining in eq. (9) are vT s ⇡rT s + rT a ⇡T s . After the recursion, the total derivative of the value function with respect to the policy parameters is given by v0 ✓, which is a one-sample estimate of r✓J. 4 single-trajectory estimate. Additionally, the value function can be used at the end of an episode to approximate the infinite-horizon policy gradient. Finally, eq. (9) involves the repeated multiplication of Jacobians of the approximate model ˆfs, ˆfa. Just as model error can compound in forward planning, model gradient error can compound during backpropagation. Furthermore, SVG(1) is on-policy. That is, after each episode, a single gradient-based update is made to the policy, and the policy optimization does not revisit those trajectory data again. To increase data-efficiency, we construct an off-policy, experience replay [15, 29] algorithm that uses models and value functions, SVG(1) with Experience Replay (SVG(1)-ER). This algorithm also has the advantage that it can perform an infinite-horizon computation. To construct an off-policy estimator, we perform importance-weighting of the current policy distribution with respect to a proposal distribution, q(s, a): ˆV✓= Eq(s,a)Ep(s0|s,a)Ep(⌘,⇠|s,a,s0) p(a|s; ✓) q(a|s) ra⇡✓+ γ ˆV 0 sˆfa⇡✓ , . (13) Specifically, we maintain a database with tuples of past state transitions (sk, ak, rk, sk+1). Each proposal drawn from q is a sample of a tuple from the database. At time t, the importance-weight w , p/q = p(ak|sk;✓t) p(ak|sk,✓k), where ✓k comprise the policy parameters in use at the historical time step k. We do not importance-weight the marginal distribution over states q(s) generated by a policy; this is widely considered to be intractable. Similarly, we use experience replay for value function learning. Details can be found in Appendix C. Pseudocode for the SVG(1) algorithm with Experience Replay is in Algorithm 2. We also provide a model-free stochastic value gradient algorithm, SVG(0) (Algorithm 3 in the Appendix). This algorithm is very similar to SVG(1) and is the stochastic analogue of the recently introduced Deterministic Policy Gradient algorithm (DPG) [23, 14, 4]. Unlike DPG, instead of assuming a deterministic policy, SVG(0) estimates the derivative around the policy noise Ep(⌘) ⇥ Qa⇡✓ ##⌘ ⇤ .4 This, for example, permits learning policy noise variance. The relative merit of SVG(1) versus SVG(0) depends on whether the model or value function is easier to learn and is task-dependent. We expect that model-based algorithms such as SVG(1) will show the strongest advantages in multitask settings where the system dynamics are fixed, but the reward function is variable. SVG(1) performed well across all experiments, including ones introducing capacity constraints on the value function and model. SVG(1)-ER demonstrated a significant advantage over all other tested algorithms. 5 Model and value learning We can use almost any kind of differentiable, generative model. In our work, we have parameterized the models as neural networks. Our framework supports nonlinear state- and action-dependent noise, notable properties of biological actuators. For example, this can be described by the parametric form ˆf(s, a, ⇠) = ˆµ(s, a) + ˆσ(s, a)⇠. Model learning amounts to a purely supervised problem based on observed state transitions. Our model and policy training occur jointly. There is no “motorbabbling” period used to identify the model. As new transitions are observed, the model is trained first, followed by the value function (for SVG(1)), followed by the policy. To ensure that the model does not forget information about state transitions, we maintain an experience database and cull batches of examples from the database for every model update. Additionally, we model the statechange by s0 = ˆf(s, a, ⇠) + s and have found that constructing models as separate sub-networks per predicted state dimension improved model quality significantly. Our framework also permits a variety of means to learn the value function models. We can use temporal difference learning [25] or regression to empirical episode returns. Since SVG(1) is modelbased, we can also use Bellman residual minimization [3]. In practice, we used a version of “fitted” policy evaluation. Pseudocode is available in Appendix C, Algorithm 4. 6 Experiments We tested the SVG algorithms in two sets of experiments. In the first set of experiments (section 6.1), we test whether evaluating gradients on real environment trajectories and value function ap4Note that ⇡is a function of the state and noise variable. 5 Figure 1: From left to right: 7-Link Swimmer; Reacher; Gripper; Monoped; Half-Cheetah; Walker proximation can reduce the impact of model error. In our second set (section 6.2), we show that SVG(1) can be applied to several complicated, multidimensional physics environments involving contact dynamics (Figure 1) in the MuJoCo simulator [28]. Below we only briefly summarize the main properties of each environment: further details of the simulations can be found in Appendix D and supplement. In all cases, we use generic, 2 hidden-layer neural networks with tanh activation functions to represent models, value functions, and policies. A video montage is available at https://youtu.be/PYdL7bcn_cM. 6.1 Analyzing SVG Gradient evaluation on real trajectories vs. planning To demonstrate the difficulty of planning with a stochastic model, we first present a very simple control problem for which SVG(1) easily learns a control policy but for which an otherwise identical planner fails entirely. Our example is based on a problem due to [16]. The policy directly controls the velocity of a point-mass “hand” on a 2D plane. By means of a spring-coupling, the hand exerts a force on a ball mass; the ball additionally experiences a gravitational force and random forces (Gaussian noise). The goal is to bring hand and ball into one of two randomly chosen target configurations with a relevant reward being provided only at the final time step. With simulation time step 0.01s, this demands controlling and backpropagating the distal reward along a trajectory of 1, 000 steps. Because this experiment has a non-stationary, time-dependent value function, this problem also favors model-based value gradients over methods using value functions. SVG(1) easily learns this task, but the planner, which uses trajectories from the model, shows little improvement. The planner simulates trajectories using the learned stochastic model and backpropagates along those simulated trajectories (eqs. 9 and 10) [18]. The extremely long time-horizon lets prediction error accumulate and thus renders roll-outs highly inaccurate, leading to much worse final performance (c.f. Fig. 2, left).5 Robustness to degraded models and value functions We investigated the sensitivity of SVG(1) and SVG(1) to the quality of the learned model on Swimmer. Swimmer is a chain body with multiple links immersed in a fluid environment with drag forces that allow the body to propel itself [5, 27]. We build chains of 3, 5, or 7 links, corresponding to 10, 14, or 18-dimensional state spaces with 2, 4, or 6-dimensional action spaces. The body is initialized in random configurations with respect to a central goal location. Thus, to solve the task, the body must turn to re-orient and then produce an undulation to move to the goal. To assess the impact of model quality, we learned to control a link-3 swimmer with SVG(1) and SVG(1) while varying the capacity of the network used to model the environment (5, 10, or 20 hidden units for each state dimension subnetwork (Appendix D); i.e., in this task we intentionally shrink the neural network model to investigate the sensitivity of our methods to model inaccuracy. While with a high capacity model (20 hidden units per state dimension), both SVG(1) and SVG(1) successfully learn to solve the task, the performance of SVG(1) drops significantly as model capacity is reduced (c.f. Fig. 3, middle). SVG(1) still works well for models with only 5 hidden units, and it also scales up to 5 and 7-link versions of the swimmer (Figs. 3, right and 4, left). To compare SVG(1) to conventional model-free approaches, we also tested a state-of-the-art actor-critic algorithm that learns a V -function and updates the policy using the TD-error δ = r + γV 0 −V as an estimate of the advantage, yielding the policy gradient v✓= δr✓log ⇡[30]. (SVG(1) and the AC algorithm used the same code for learning V .) SVG(1) outperformed the model-free approach in the 3-, 5-, and 7-link swimmer tasks (c.f. Fig. 3, left, right; Fig. 4, top left). In figure panels 2, middle, 3, right, and 4, left column, we show that experience replay for the policy can improve the data efficiency and performance of SVG(1). 5We also tested REINFORCE on this problem but achieved very poor results due to the long horizon. 6 Hand Cartpole Cartpole Figure 2: Left: Backpropagation through a model along observed stochastic trajectories is able to optimize a stochastic policy in a stochastic environment, but an otherwise equivalent planning algorithm that simulates the transitions with a learned stochastic model makes little progress due to compounding model error. Middle: SVG and DPG algorithms on cart-pole. SVG(1)-ER learns the fastest. Right: When the value function capacity is reduced from 200 hidden units in the first layer to 100 and then again to 50, SVG(1) exhibits less performance degradation than the Q-function-based DPG, presumably because the dynamics model contains auxiliary information about the Q function. Swimmer-5 Swimmer-3 Swimmer-3 Figure 3: Left: For a 3-link swimmer, with relatively simple dynamics, the compared methods yield similar results and possibly a slight advantage to the purely model-based SVG(1). Middle: However, as the environment model’s capacity is reduced from 20 to 10 then to 5 hidden units per state-dimension subnetwork, SVG(1) dramatically deteriorates, whereas SVG(1) shows undisturbed performance. Right: For a 5-link swimmer, SVG(1)-ER learns faster and asymptotes at higher performance than the other tested algorithms. Similarly, we tested the impact of varying the capacity of the value function approximator (Fig. 2, right) on a cart-pole. The V-function-based SVG(1) degrades less severely than the Q-functionbased DPG presumably because it computes the policy gradient with the aid of the dynamics model. 6.2 SVG in complex environments In a second set of experiments we demonstrated that SVG(1)-ER can be applied to several challenging physical control problems with stochastic, non-linear, and discontinuous dynamics due to contacts. Reacher is an arm stationed within a walled box with 6 state dimensions and 3 action dimensions and the (x, y) coordinates of a target site, giving 8 state dimensions in total. In 4-Target Reacher, the site was randomly placed at one of the four corners of the box, and the arm in a random configuration at the beginning of each trial. In Moving-Target Reacher, the site moved at a randomized speed and heading in the box with reflections at the walls. Solving this latter problem implies that the policy has generalized over the entire work space. Gripper augments the reacher arm with a manipulator that can grab a ball in a randomized position and return it to a specified site. Monoped has 14 state dimensions, 4 action dimensions, and ground contact dynamics. The monoped begins falling from a height and must remain standing. Additionally, we apply Gaussian random noise to the torques controlling the joints with a standard deviation of 5% of the total possible actuator strength at all points in time, reducing the stability of upright postures. Half-Cheetah is a planar cat robot designed to run based on [29] with 18 state dimensions and 6 action dimensions. Half-Cheetah has a version with springs to aid balanced standing and a version without them. Walker is a planar biped, based on the environment from [22]. Results Figure 4 shows learning curves for several repeats for each of the tasks. We found that in all cases SVG(1) solved the problem well; we provide videos of the learned policies in the supplemental material. The 4-target reacher reliably finished at the target site, and in the tracking task followed the moving target successfully. SVG(1)-ER has a clear advantage on this task as also borne out in the cart-pole and swimmer experiments. The cheetah gaits varied slightly from experiment to experiment but in all cases made good forward progress. For the monoped, the policies were able to balance well beyond the 200 time steps of training episodes and were able to resist significantly 7 Monoped 2D-Walker Gripper Avg. reward (arbitrary units) 4-Target Reacher Half-Cheetah Avg. reward (arbitrary units) Swimmer-7 Figure 4: Across several different domains, SVG(1)-ER reliably optimizes policies, clearly settling into similar local optima. On the 4-target Reacher, SVG(1)-ER shows a noticeable efficiency and performance gain relative to the other algorithms. higher adversarial noise levels than used during training (up to 25% noise). We were able to learn gripping and walking behavior, although walking policies that achieved similar reward levels did not always exhibit equally good walking phenotypes. 7 Related work Writing the noise variables as exogenous inputs to the system to allow direct differentiation with respect to the system state (equation 7) is a known device in control theory [10, 7] where the model is given analytically. The idea of using a model to optimize a parametric policy around real trajectories is presented heuristically in [17] and [1] for deterministic policies and models. Also in the limit of deterministic policies and models, the recursions we have derived in Algorithm 1 reduce to those of [2]. Werbos defines an actor-critic algorithm called Heuristic Dynamic Programming that uses a deterministic model to roll-forward one step to produce a state prediction that is evaluated by a value function [31]. Deisenroth et al. have used Gaussian process models to compute policy gradients that are sensitive to model-uncertainty [6], and Levine et al. have optimized impressive policies with the aid of a non-parametric trajectory optimizer and locally-linear models [13]. Our work in contrast has focused on using global, neural network models conjoined to value function approximators. 8 Discussion We have shown that two potential problems with value gradient methods, their reliance on planning and restriction to deterministic models, can be exorcised, broadening their relevance to reinforcement learning. We have shown experimentally that the SVG framework can train neural network policies in a robust manner to solve interesting continuous control problems. The framework includes algorithm variants beyond the ones tested in this paper, for example, ones that combine a value function with k steps of back-propagation through a model (SVG(k)). Augmenting SVG(1) with experience replay led to the best results, and a similar extension could be applied to any SVG(k). Furthermore, we did not harness sophisticated generative models of stochastic dynamics, but one could readily do so, presenting great room for growth. Acknowledgements We thank Arthur Guez, Danilo Rezende, Hado van Hasselt, John Schulman, Jonathan Hunt, Nando de Freitas, Martin Riedmiller, Remi Munos, Shakir Mohamed, and Theophane Weber for helpful discussions and John Schulman for sharing his walker model. 8 References [1] P. Abbeel, M. Quigley, and A. Y. Ng. Using inaccurate models in reinforcement learning. In ICML, 2006. [2] C. G. Atkeson. Efficient robust policy optimization. In ACC, 2012. [3] L. Baird. Residual algorithms: Reinforcement learning with function approximation. In ICML, 1995. [4] D. Balduzzi and M. Ghifary. Compatible value gradients for reinforcement learning of continuous deep policies. arXiv preprint arXiv:1509.03005, 2015. [5] R. Coulom. Reinforcement learning using neural networks, with applications to motor control. PhD thesis, Institut National Polytechnique de Grenoble-INPG, 2002. [6] M. Deisenroth and C. E. Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In (ICML), 2011. [7] M. Fairbank. Value-gradient learning. PhD thesis, City University London, 2014. [8] M. Fairbank and E. Alonso. Value-gradient learning. In IJCNN, 2012. [9] I. Grondman. Online Model Learning Algorithms for Actor-Critic Control. PhD thesis, TU Delft, Delft University of Technology, 2015. [10] D. H. Jacobson and D. Q. Mayne. Differential dynamic programming. 1970. [11] M. I. Jordan and D. E. Rumelhart. Forward models: Supervised learning with a distal teacher. Cognitive science, 16(3):307–354, 1992. [12] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [13] S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In NIPS, 2014. [14] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. [15] L.-J. Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3-4):293–321, 1992. [16] R. Munos. Policy gradient in continuous time. Journal of Machine Learning Research, 7:771–791, 2006. [17] K. S. Narendra and K. Parthasarathy. Identification and control of dynamical systems using neural networks. IEEE Transactions on Neural Networks, 1(1):4–27, 1990. [18] D. H. Nguyen and B. Widrow. Neural networks for self-learning control systems. IEEE Control Systems Magazine, 10(3):18–23, 1990. [19] R. Pascanu, T. Mikolov, and Y. Bengio. On the difficulty of training recurrent neural networks. In ICML, 2013. [20] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. [21] Martin Riedmiller. Neural fitted q iteration–first experiences with a data efficient neural reinforcement learning method. In Machine Learning: ECML 2005, pages 317–328. Springer, 2005. [22] J. Schulman, S. Levine, P. Moritz, M. I. Jordan, and P. Abbeel. Trust region policy optimization. CoRR, abs/1502.05477, 2015. [23] D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller. Deterministic policy gradient algorithms. In ICML, 2014. [24] S. P. Singh. Learning without state-estimation in partially observable Markovian decision processes. In ICML, 1994. [25] Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3(1):9– 44, 1988. [26] R.S. Sutton, D. A. McAllester, S. P. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In NIPS, 1999. [27] Y. Tassa, T. Erez, and W.D. Smart. Receding horizon differential dynamic programming. In NIPS, 2008. [28] E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. In IROS, 2012. [29] P. Wawrzy´nski. A cat-like robot real-time learning to run. In Adaptive and Natural Computing Algorithms, pages 380–390. Springer, 2009. [30] P. Wawrzy´nski. Real-time reinforcement learning by sequential actor–critics and experience replay. Neural Networks, 22(10):1484–1497, 2009. [31] P. J Werbos. A menu of designs for reinforcement learning over time. Neural networks for control, pages 67–95, 1990. [32] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. 9 | 2015 | 37 |
5,891 | Fast Bidirectional Probability Estimation in Markov Models Siddhartha Banerjee ∗ sbanerjee@cornell.edu Peter Lofgren† plofgren@cs.stanford.edu Abstract We develop a new bidirectional algorithm for estimating Markov chain multi-step transition probabilities: given a Markov chain, we want to estimate the probability of hitting a given target state in ℓsteps after starting from a given source distribution. Given the target state t, we use a (reverse) local power iteration to construct an ‘expanded target distribution’, which has the same mean as the quantity we want to estimate, but a smaller variance – this can then be sampled efficiently by a Monte Carlo algorithm. Our method extends to any Markov chain on a discrete (finite or countable) state-space, and can be extended to compute functions of multi-step transition probabilities such as PageRank, graph diffusions, hitting/return times, etc. Our main result is that in ‘sparse’ Markov Chains – wherein the number of transitions between states is comparable to the number of states – the running time of our algorithm for a uniform-random target node is order-wise smaller than Monte Carlo and power iteration based algorithms; in particular, our method can estimate a probability p using only O(1/√p) running time. 1 Introduction Markov chains are one of the workhorses of stochastic modeling, finding use across a variety of applications – MCMC algorithms for simulation and statistical inference; to compute network centrality metrics for data mining applications; statistical physics; operations management models for reliability, inventory and supply chains, etc. In this paper, we consider a fundamental problem associated with Markov chains, which we refer to as the multi-step transition probability estimation (or MSTP-estimation) problem: given a Markov Chain on state space S with transition matrix P, an initial source distribution σ over S, a target state t ∈S and a fixed length ℓ, we are interested in computing the ℓ-step transition probability from σ to t. Formally, we want to estimate: pℓ σ[t] := ⟨σP ℓ, et⟩= σP ℓeT t , (1) where et is the indicator vector of state t. A natural parametrization for the complexity of MSTPestimation is in terms of the minimum transition probabilities we want to detect: given a desired minimum detection threshold δ, we want algorithms that give estimates which guarantee small relative error for any (σ, t, ℓ) such that pℓ σ[t] > δ. Parametrizing in terms of the minimum detection threshold δ can be thought of as benchmarking against a standard Monte Carlo algorithm, which estimates pℓ σ[t] by sampling independent ℓ-step paths starting from states sampled from σ. An alternate technique for MSTP-estimation is based on linear algebraic iterations, in particular, the (local) power iteration. We discuss these in more detail in Section 1.2. Crucially, however, both these techniques have a running time of Ω(1/δ) for testing if pℓ σ[t] > δ (cf. Section 1.2). ∗Siddhartha Banerjee is an assistant professor at the School of Operations Research and Information Engineering at Cornell (http://people.orie.cornell.edu/sbanerjee). †Peter Lofgren is a graduate student in the Computer Science Department at Stanford (http://cs. stanford.edu/people/plofgren/). 1 1.1 Our Results To the best of our knowledge, our work gives the first bidirectional algorithm for MSTP-estimation which works for general discrete state-space Markov chains1. The algorithm we develop is very simple, both in terms of implementation and analysis. Moreover, we prove that in many settings, it is order-wise faster than existing techniques. Our algorithm consists of two distinct forward and reverse components, which are executed sequentially. In brief, the two components proceed as follows: • Reverse-work: Starting from the target node t, we perform a sequence of reverse local power iterations – in particular, we use the REVERSE-PUSH operation defined in Algorithm 1. • Forward-work: We next sample a number of random walks of length ℓ, starting from σ and transitioning according to P, and return the sum of residues on the walk as an estimate of pℓ σ[t]. This full algorithm, which we refer to as the Bidirectional-MSTP estimator, is formalized in Algorithm 2. It works for all countable-state Markov chains, giving the following accuracy result: Theorem 1 (For details, refer Section 2.3). Given any Markov chain P, source distribution σ, terminal state t, length ℓ, threshold δ and relative error ϵ, Bidirectional-MSTP (Algorithm 2) returns an unbiased estimate bpℓ σ[t] for pℓ σ[t], which, with high probability, satisfies: bpℓ σ[t] −pℓ σ[t] < max ϵpℓ σ[t], δ . Since we dynamically adjust the number of REVERSE-PUSH operations to ensure that all residues are small, the proof of the above theorem follows from straightforward concentration bounds. Since Bidirectional-MSTP combines local power iteration and Monte Carlo techniques, a natural question is when the algorithm is faster than both. It is easy to to construct scenarios where the runtime of Bidirectional-MSTP is comparable to its two constituent algorithms – for example, if t has more than 1/δ in-neighbors. Surprisingly, however, we show that in sparse Markov chains and for typical target states, Bidirectional-MSTP is order-wise faster: Theorem 2 (For details, refer Section 2.3). Given any Markov chain P, source distribution σ, length ℓ, threshold δ and desired accuracy ϵ; then for a uniform random choice of t ∈S, the Bidirectional-MSTP algorithm has a running time of eO(ℓ3/2 q d/δ), where d is the average number of neighbors of nodes in S. Thus, for typical targets, we can estimate transition probabilities of order δ in time only O(1/ √ δ). Note that we do not need for every state that the number of neighboring states is small, but rather, that they are small on average – for example, this is true in ‘power-law’ networks, where some nodes have very high degree, but the average degree is small. The proof of this result is based on a modification of an argument in [2] – refer Section 2.3 for details. Estimating transition probabilities to a target state is one of the fundamental primitives in Markov chain models – hence, we believe that our algorithm can prove useful in a variety of application domains. In Section 3, we briefly describe how to adapt our method for some of these applications – estimating hitting/return times and stationary probabilities, extensions to non-homogenous Markov chains (in particular, for estimating graph diffusions and heat kernels), connections to local algorithms and expansion testing. In addition, our MSTP-estimator could be useful in several other applications – estimating ruin probabilities in reliability models, buffer overflows in queueing systems, in statistical physics simulations, etc. 1.2 Existing Approaches for MSTP-Estimation There are two main techniques used for MSTP-estimation. The first is a natural Monte Carlo algorithm: we estimate pℓ σ[t] by sampling independent ℓ-step paths, each starting from a random state sampled from σ. A simple concentration argument shows that for a given value of δ, we need eΘ(1/δ) samples to get an accurate estimate of pℓ σ[t], irrespective of the choice of t, and the structure 1Bidirectional estimators have been developed before for reversible Markov chains [1]; our method however is not only more general, but conceptually and operationally simpler than these techniques (cf. Section 1.2). 2 of P. Note that this algorithm is agnostic of the terminal state t; it gives an accurate estimate for any t such that pℓ σ[t] > δ. On the other hand, the problem also admits a natural linear algebraic solution, using the standard power iteration starting with σ, or the reverse power iteration starting with et (which is obtained by re-writing Equation (1) as pℓ σ[t] := σ(et(P T )ℓ)T ). When the state space is large, performing a direct power iteration is infeasible – however, there are localized versions of the power iteration that are still efficient. Such algorithms have been developed, among other applications, for PageRank estimation [3, 4] and for heat kernel estimation [5]. Although slow in the worst case 2, such local update algorithms are often fast in practice, as unlike Monte Carlo methods they exploit the local structure of the chain. However even in sparse Markov chains and for a large fraction of target states, their running time can be Ω(1/δ). For example, consider a random walk on a random dregular graph and let δ = o(1/n) – then for ℓ∼logd(1/δ), verifying pℓ es[t] > δ is equivalent to uncovering the entire logd(1/δ) neighborhood of s. Since a large random d-regular graph is (whp) an expander, this neighborhood has Ω(1/δ) distinct nodes. Finally, note that as with Monte Carlo, power iterations can be adapted to either the source or terminal state, but not both. For reversible Markov chains, one can get a bidirectional algorithms for estimating pℓ es[t] based on colliding random walks. For example, consider the problem of estimating length-2ℓrandom walk transition probabilities in a regular undirected graph G(V, E) on n vertices [1, 6]. The main idea is that to test if a random walk goes from s to t in 2ℓsteps with probability ≥δ, we can generate two independent random walks of length ℓ, starting from s and t respectively, and detect if they terminate at the same intermediate node. Suppose pw, qw are the probabilities that a length-ℓwalk from s and t respectively terminate at node w – then from the reversibility of the chain, we have that p2ℓ σ [t] = P w∈V pwqw; this is also the collision probability. The critical observation is that if we generate p 1/δ walks from s and t, then we get 1/δ potential collisions, which is sufficient to detect if p2ℓ σ [t] > δ. This argument forms the basis of the birthday-paradox, and similar techniques used in a variety of estimation problems (eg., see [7]). Showing concentration for this estimator is tricky as the samples are not independent; moreover, to control the variance of the samples, the algorithms often need to separately deal with ‘heavy’ intermediate nodes, where pw or qw are much larger than O(1/n). Our proposed approach is much simpler both in terms of algorithm and analysis, and more significantly, it extends beyond reversible chains to any general discrete state-space Markov chain. The most similar approach to ours is the recent FAST-PPR algorithm of Lofgren et al. [2] for PageRank estimation; our algorithm borrows several ideas and techniques from that work. However, the FAST-PPR algorithm relies heavily on the structure of PageRank – in particular, the fact that the PageRank walk has Geometric(α) length (and hence can be stopped and restarted due to the memoryless property). Our work provides an elegant and powerful generalization of the FAST-PPR algorithm, extending the approach to general Markov chains. 2 The Bidirectional MSTP-estimation Algorithm 2.1 Algorithm As described in Section 1.1, given a target state t, our bidirectional MSTP algorithm keeps track of a pair of vectors – the estimate vector qk t ∈Rn and the residual vector rk t ∈Rn – for each length k ∈{0, 1, 2, . . . , ℓ}. The vectors are initially all set to 0 (i.e., the all-0 vector), except r0 t which is initialized as et. Moreover, they are updated using a reverse push operation defined as: Algorithm 1 REVERSE-PUSH(v, i) Inputs: Transition matrix P, estimate vector qi t, residual vectors ri t, ri+1 t 1: return New estimate vectors {eqi t} and residual-vectors {eri t} computed as: eqi t ←qi t + ⟨ri t, ev⟩ev; eri t ←ri t −⟨ri t, ev⟩ev; eri+1 t ←ri+1 t + ⟨ri t, ev⟩ evP T 2In particular, local power iterations are slow if a state has a very large out-neighborhood (for the forward iteration) or in-neighborhood (for the reverse update). 3 The main observation behind our algorithm is that we can re-write pℓ σ[t] in terms of {qk t , rk t } as an expectation over random sample-paths of the Markov chain as follows (cf. Equation (3)): pℓ σ[t] = ⟨σ, qℓ t⟩+ ℓ X k=0 EVk∼σP k rℓ−k t (Vk) (2) In other words, given vectors {qk t , rk t }, we can get an unbiased estimator for pℓ σ[t] by sampling a length-ℓrandom trajectory {V0, V1, . . . , Vℓ} of the Markov chain P starting at a random state V0 sampled from the source distribution σ, and then adding the residuals along the trajectory as in Equation (2). We formalize this bidirectional MSTP algorithm in Algorithm 2. Algorithm 2 Bidirectional-MSTP(P, σ, t, ℓmax, δ) Inputs: Transition matrix P, source distribution σ, target state t, maximum steps ℓmax, minimum probability threshold δ, relative error bound ϵ, failure probability pf 1: Set accuracy parameter c based on ϵ and pf and set reverse threshold δr (cf. Theorems 1 and 2) (in our experiments we use c = 7 and δr = p δ/c) 2: Initialize: Estimate vectors qk t = 0 , ∀k ∈{0, 1, 2, . . . , ℓ}, Residual vectors r0 t = et and rk t = 0 , ∀k ∈{1, 2, 3, . . . , ℓ} 3: for i ∈{0, 1, . . . , ℓmax} do 4: while ∃v ∈S s.t. ri t[v] > δr do 5: Execute REVERSE-PUSH(v, i) 6: end while 7: end for 8: Set number of sample paths nf = cℓmaxδr/δ (See Theorem 1 for details) 9: for index i ∈{1, 2, . . . , nf} do 10: Sample starting node V 0 i ∼σ 11: Generate sample path Ti = {V 0 i , V 1 i , . . . , V ℓmax i } of length ℓmax starting from V 0 i 12: For ℓ∈{1, 2, . . . , ℓmax}: sample k ∼Uniform[0, ℓ] and compute Sℓ t,i = ℓrℓ−k t [V k i ] (We reinterpret the sum over k in Equation 2 as an expectation and sample k rather sum over k ≤ℓfor computational speed.) 13: end for 14: return {bpℓ σ[t]}ℓ∈[ℓmax], where bpℓ σ[t] = ⟨σ, qℓ t⟩+ (1/nf) Pnf i=1 Sℓ t,i 2.2 Some Intuition Behind our Approach Before formally analyzing the performance of our MSTP-estimation algorithm, we first build some intuition as to why it works. In particular, it is useful to interpret the estimates and residues in probabilistic/combinatorial terms. In Figure 1, we have considered a simple Markov chain on three states – Solid, Hollow and Checkered (henceforth (S, H, C)). On the right side, we have illustrated an intermediate stage of reverse work using S as the target, after performing the REVERSE-PUSH operations (S, 0), (H, 1), (C, 1) and (S, 2) in that order. Each push at level i uncovers a collection Figure 1: Visualizing a sequence of REVERSE-PUSH operations: Given the Markov chain on the left with S as the target, we perform REVERSE-PUSH operations (S, 0), (H, 1), (C, 1),(S, 2). 4 of length-(i + 1) paths terminating at S – for example, in the figure, we have uncovered all length 2 and 3 paths, and several length 4 paths. The crucial observation is that each uncovered path of length i starting from a node v is accounted for in either qi v or ri v. In particular, in Figure 1, all paths starting at solid nodes are stored in the estimates of the corresponding states, while those starting at blurred nodes are stored in the residue. Now we can use this set of pre-discovered paths to boost the estimate returned by Monte Carlo trajectories generated starting from the source distribution. The dotted line in the figure represents the current reverse-work frontier – it separates the fully uncovered neighborhood of (S, 0) from the remaining states (v, i). In a sense, what the REVERSE-PUSH operation does is construct a sequence of importancesampling weights, which can then be used for Monte Carlo. An important novelty here is that the importance-sampling weights are: (i) adapted to the target state, and (ii) dynamically adjusted to ensure the Monte Carlo estimates have low variance. Viewed in this light, it is easy to see how the algorithm can be modified to applications beyond basic MSTP-estimation: for example, to nonhomogenous Markov chains, or for estimating the probability of hitting a target state t for the first time in ℓsteps (cf. Section 3). Essentially, we only need an appropriate reverse-push/dynamic programming update for the quantity of interest (with associated invariant, as in Equation (2)). 2.3 Performance Analysis We first formalize the critical invariant introduced in Equation (2): Lemma 1. Given a terminal state t, suppose we initialize q0 t = 0, r0 t = et and qk t , rk t = 0 ∀k ≥ 0. Then for any source distribution σ and length ℓ, after any arbitrary sequence of REVERSEPUSH(v, k) operations, the vectors {qk t , rk t } satisfy the invariant: pℓ σ[t] = ⟨σ, qℓ t⟩+ ℓ X k=0 ⟨σP k, rℓ−k t ⟩ (3) The proof follows the outline of a similar result in Andersen et al. [4] for PageRank estimation; due to lack of space, we defer it to our full version [8]. Using this result, we can now characterize the accuracy of the Bidirectional-MSTP algorithm: Theorem 1. We are given any Markov chain P, source distribution σ, terminal state t, maximum length ℓmax and also parameters δ, pf and ϵ (i.e., the desired threshold, failure probability and relative error). Suppose we choose any reverse threshold δr > δ, and set the number of samplepaths nf = cδr/δ, where c = max 6e/ϵ2, 1/ ln 2 ln (2ℓmax/pf). Then for any length ℓ≤ℓmax with probability at least 1 −pf, the estimate returned by Bidirectional-MSTP satisfies: bpℓ σ[t] −pℓ σ[t] < max ϵpℓ σ[t], δ . Proof. Given any Markov chain P and terminal state t, note first that for a given length ℓ≤ℓmax, Equation (2) shows that the estimate bpℓ σ[t] is an unbiased estimator. Now, for any random-trajectory Tk, we have that the score Sℓ t,k obeys: (i) E[Sℓ t,k] ≤pℓ σ[t] and (ii) Sℓ t,k ∈[0, ℓδr]; the first inequality again follows from Equation (2), while the second follows from the fact that we executed REVERSE-PUSH operations until all residual values were less than δr. Now consider the rescaled random variable Xk = Sℓ t,k/(ℓδr) and X = P k∈[nf ] Xk; then we have that Xk ∈[0, 1], E[X] ≤(nf/ℓδr)pℓ σ[t] and also (X −E[X]) = (nf/ℓδr)(bpℓ σ[t] −pℓ σ[t]). Moreover, using standard Chernoff bounds (cf. Theorem 1.1 in [9]), we have that: P [|X −E[X]| > ϵE[X]] < 2 exp −ϵ2E[X] 3 and P[X > b] ≤2−b for any b > 2eE[X] Now we consider two cases: 1. E[Sℓ t,k] > δ/2e (i.e., E[X] > nfδ/2eℓδr = c/2e): Here, we can use the first concentration bound to get: P bpℓ σ[t] −pℓ σ[t] ≥ϵpℓ σ[t] = P |X −E[X]| ≥ϵnf ℓδr pℓ σ[t] ≤P [|X −E[X]| ≥ϵE[X]] ≤2 exp −ϵ2E[X] 3 ≤2 exp −ϵ2c 6e , 5 where we use that nf = cℓmaxδr/δ (cf. Algorithm 2). Moreover, by the union bound, we have: P [ ℓ≤ℓmax bpℓ σ[t] −pℓ σ[t] ≥ϵpℓ σ[t] ≤2ℓmax exp −ϵ2c 32e , Now as long as c ≥ 6e/ϵ2 ln (2ℓmax/pf), we get the desired failure probability. 2. E[Sℓ t,k] < δ/2e (i.e., E[X] < c/2e): In this case, note first that since X > 0, we have that pℓ σ[t] −bpℓ σ[t] ≤(nf/ℓδr)E[X] ≤δ/2e < δ. On the other hand, we also have: P bpℓ σ[t] −pℓ σ[t] ≥δ = P X −E[X] ≥nfδ ℓδr ≤P [X ≥c] ≤2−c, where the last inequality follows from our second concentration bound, which holds since we have c > 2eE[X]. Now as before, we can use the union bound to show that the failure probability is bounded by pf as long as c ≥log2 (ℓmax/pf). Combining the two cases, we see that as long as c ≥max 6e/ϵ2, 1/ ln 2 ln (2ℓmax/pf), then we have P hS ℓ≤ℓmax bpℓ σ[t] −pℓ σ[t] ≥max{δ, ϵpℓ σ[t]} i ≤pf. One aspect that is not obvious from the intuition in Section 2.2 or the accuracy analysis is if using a bidirectional method actually improves the running time of MSTP-estimation. This is addressed by the following result, which shows that for typical targets, our algorithm achieves significant speedup: Theorem 2. Let any Markov chain P, source distribution σ, maximum length ℓmax and parameters δ, pf and ϵ be given. Suppose we set δr = q ϵ2δ ℓmax log(ℓmax/pf ). Then for a uniform random choice of t ∈S, the Bidirectional-MSTP algorithm has a running time of eO ℓ3/2 max q d/δ . Proof. The runtime of Algorithm 2 consists of two parts: Forward-work (i.e., for generating trajectories): we generate nf = cℓmaxδr/δ sample trajectories, each of length ℓmax – hence the running time is O cδℓ2 max/δ for any Markov chain P, source distribution σ and target node t. Substituting for c from Theorem 1, we get that the forward-work running time Tf = O ℓ2 maxδr log(ℓmax/pf ) ϵ2δ . Reverse-work (i.e., for REVERSE-PUSH operations): Let Tr denote the reverse-work runtime for a uniform random choice of t ∈S. Then we have: E[Tr] = 1 |S| X t∈S ℓmax X k=0 X v∈S (din(v) + 1)1{REVERSE-PUSH(v,k) is executed} Now for a given t ∈S and k ∈{0, 1, . . . , ℓmax}, note that the only states v ∈S on which we execute REVERSE-PUSH(v, k) are those with residual rk t (v) > δr – consequently, for these states, we have that qk t (v) > δr, and hence, by Equation (3), we have that pk ev[t] ≥δr (by setting σ = ev, i.e., starting from state v). Moreover, a REVERSE-PUSH(v, k) operation involves updating the residuals for din(v)+1 states. Note that P t∈S pk ev[t] = 1 and hence, via a straightforward counting argument, we have that for any v ∈S, P t∈S 1{pkev [t]≥δr} ≤1/δr. Thus, we have: E[Tr] ≤1 |S| X t∈S ℓmax X k=0 X v∈S (din(v) + 1)1{pkev [t]≥δr} = 1 |S| X v∈S ℓmax X k=0 X t∈S (din(v) + 1)1{pkev [t]≥δr} ≤1 |S| X v∈S (ℓmax + 1) · (din(v) + 1) 1 δr = O ℓmax δr · P v∈S din(v) |S| = O ℓmaxd δr Finally, we choose δr = q ϵ2δ ℓmax log(ℓmax/pf ) to balance Tf and Tr and get the result. 6 3 Applications of MSTP estimation • Estimating the Stationary Distribution and Hitting Probabilities: MSTP-estimation can be used in two ways to estimate stationary probabilities π[t]. First, if we know the mixing time τmix of the chain P, we can directly use Algorithm 2 to approximate π[t] by setting ℓmax = τmix and using any source distribution σ. Theorem 2 then guarantees that we can estimate a stationary probability of order δ in time O(τ 3/2 mix q d/δ). In comparison, Monte Carlo has O(τmix/δ) runtime. We note that in practice, we usually do not know the mixing time – in such a setting, our algorithm can be used to compute an estimate of pℓ σ[t] for all values of ℓ≤ℓmax. An alternative is to modify Algorithm 2 to estimate the truncated hitting time bpℓ,hit σ [t](i.e., the probability of hitting t starting from σ for the first time in ℓsteps). By setting σ = et, we get an estimate for the expected truncated return time E[Tt1{Tt≤ℓmax}] = P ℓ≤ℓmax ℓbpℓ,hit et [t]. Now, using that fact that π[t] = 1/E[Tt], we can get a lower bound for π[t] which converges to π[t] as ℓmax →∞. We note also that the truncated hitting time has been shown to be useful in other applications such as identifying similar documents on a document-word-author graph [10]. To estimate the truncated hitting time, we modify Algorithm 2 as follows: at each stage i ∈ {1, 2, . . . , ℓmax} (note: not i = 0), instead of REVERSE-PUSH(t, i), we update eqi t[t] = qi t[t] + ri t[t], set eri t[t] = 0 and do not push back ri t[t] to the in-neighbors of t in the (i + 1)th stage. The remaining algorithm remains the same. It is easy to see from the discussion in Section 2.2 that the resulting quantity bpℓ,hit σ [t] is an unbiased estimate of P[Hitting time of t = ℓ|X0 ∼σ] – we omit a formal proof due to lack of space. • Exact Stationary Probabilities in Strong Doeblin chains: A strong Doeblin chain [11] is obtained by mixing a Markov chain P and a distribution σ as follows: at each transition, the process proceeds according to P with probability α, else samples a state from σ. Doeblin chains are widely used in ML applications – special cases include the celebrated PageRank metric [12], variants such as HITS and SALSA [13], and other algorithms for applications such as ranking [14] and structured prediction [15]. An important property of these chains is that if we sample a starting node V0 from σ and sample a trajectory of length Geometric(α) starting from V0, then the terminal node is an unbiased sample from the stationary distribution [16]. There are two ways in which our algorithm can be used for this purpose: one is to replace the REVERSE-PUSH algorithm with a corresponding local update algorithm for the strong Doeblin chain (similar to the one in Andersen et al. [4] for PageRank), and then sample random trajectories of length Geometric(α). A more direct technique is to choose some ℓmax >> 1/α, estimate {pℓ σ[t]} ∀ℓ∈[ℓmax] and then directly compute the stationary distribution as p[t] = Pℓmax ℓ=1 αℓ−1(1 −α)pℓ σ[t]. • Graph Diffusions: If we assign a weight αi to random walks of length i on a (weighted) graph, the resulting scoring functions f(P, σ)[t] := P∞ i=0 αi σT P i [t] are known as a graph diffusions [17] and are used in a variety of applications. The case where αi = αi−1(1 −α) corresponds to PageRank. If instead the length is drawn according to a Poisson distribution (i.e., αi = e−ααi/i!), then the resulting function is called the heat-kernel h(G, α) – this too has several applications, including finding communities (clusters) in large networks [5]. Note that for any function f as defined above, the truncated sum f ℓmax = Pℓmax i=0 αi pT σ P i obeys ||f −f ℓmax||∞≤P∞ ℓmax+1 αi. Thus a guarantee on an estimate for the truncated sum directly translates to a guarantee on the estimate for the diffusion. We can use MSTP-estimation to efficiently estimate these truncated sums. We perform numerical experiments on heat kernel estimation in the next section. • Conductance Testing in Graphs: MSTP-estimation is an essential primitive for conductance testing in large Markov chains [1]. In particular, in regular undirected graphs, Kale et al [6] develop a sublinear bidirectional estimator based on counting collisions between walks in order to identify ‘weak’ nodes – those which belong to sets with small conductance. Our algorithm can be used to extend this process to any graph, including weighted and directed graphs. • Local Algorithms: There is a lot of interest recently on local algorithms – those which perform computations given only a small neighborhood of a source node [18]. In this regard, we note that Bidirectional-MSTP gives a natural local algorithm for MSTP estimation, and thus for the applications mentioned above – given a k-hop neighborhood around the source and target, we can perform Bidirectional-MSTP with ℓmax set to k. The proof of this follows from the fact that the invariant in Equation (2) holds after any sequence of REVERSE-PUSH operations. 7 Figure 2: Estimating heat kernels: Bidirectional MSTP-estimation vs. Monte Carlo, Forward Push. To compare runtimes, we choose parameters such that the mean relative error of all algorithms is around 10%. Notice that Bidirectional-MSTP is 100 times faster than the other algorithms. 4 Experiments To demonstrate the efficiency of our algorithm on large Markov chains, we use heat kernel estimation (cf. Section 3) as an example application. The heat kernel is a non-homogenous Markov chain, defined as the probability of stopping at the target on a random walk from the source, where the walk length is sampled from a Poisson(ℓ) Distribution. In real-world graphs, a heat-kernel value between a pair of nodes has been shown to be a good indicator of an underlying community relationship [5] – this suggests that it can serve as a metric for personalized search on social networks. For example, if a social network user s wants to view a list of users attending some event, then sorting these users by heat kernel values will result in the most similar users to s appearing on top. Bidirectional-MSTP is ideal for such personalized search applications, as the set of users filtered by a search query is typically much smaller than the set of nodes on the network. In Figure 2, we compare the runtime of different algorithms for heat kernel computation on four real-world graphs, ranging from millions to billions of edges 3. For each graph, for random (source, target) pairs, we compute the heat kernel using Bidirectional-MSTP, as well as two benchmark algorithms – Monte Carlo, and the Forward Push algorithm (as presented in [5]). All three algorithms have parameters which allow them to trade off speed and accuracy – for a fair comparison, we choose parameters such that the empirical mean relative error each algorithm is 10%. All three algorithms were implemented in Scala – for the forward push algorithm, our implementation follows the code linked from [5]). We set average walk-length ℓ= 5 (since longer walks will mix into the stationary distribution), and set the maximum length to ℓ+10 √ ℓ≈27; the probability of a walk being longer than this is 10−12, which is negligible. For reproducibility, our source code is available on our website (cf. [8]). Figure 2 shows that across all graphs, Bidirectional-MSTP is 100x faster than the two benchmark algorithms. For example, on the Twitter graph, it can estimate a heat kernel score is 0.1 seconds, while the the other algorithms take more than 4 minutes. We note though that Monte Carlo and Forward Push can return scores from the source to all targets, rather than just one target – thus Bidirectional-MSTP is most useful when we want the score for a small set of targets. Acknowledgments Research supported by the DARPA GRAPHS program via grant FA9550-12-1-0411, and by NSF grant 1447697. Peter Lofgren was supported by an NPSC fellowship. Thanks to Ashish Goel and other members of the Social Algorithms Lab at Stanford for many helpful discussions. 3Pokec [19], Live Journal [20], and Orkut [20] datasets are from the SNAP [21]; Twitter-2010 [22] was downloaded from the Laboratory for Web Algorithmics [23]. Refer to our full version [8] for details. 8 References [1] Oded Goldreich and Dana Ron. On testing expansion in bounded-degree graphs. In Studies in Complexity and Cryptography. Miscellanea on the Interplay between Randomness and Computation. Springer, 2011. [2] Peter Lofgren, Siddhartha Banerjee, Ashish Goel, and C Seshadhri. FAST-PPR: Scaling personalized PageRank estimation for large graphs. In ACM SIGKDD’14, 2014. [3] Reid Andersen, Fan Chung, and Kevin Lang. Local graph partitioning using PageRank vectors. In IEEE FOCS’06, 2006. [4] Reid Andersen, Christian Borgs, Jennifer Chayes, John Hopcraft, Vahab S Mirrokni, and Shang-Hua Teng. Local computation of PageRank contributions. In Algorithms and Models for the Web-Graph. Springer, 2007. [5] Kyle Kloster and David F Gleich. Heat kernel based community detection. In ACM SIGKDD’14, 2014. [6] Satyen Kale, Yuval Peres, and C Seshadhri. Noise tolerance of expanders and sublinear expander reconstruction. In IEEE FOCS’08, 2008. [7] Rajeev Motwani, Rina Panigrahy, and Ying Xu. Estimating sum by weighted sampling. In Automata, Languages and Programming, pages 53–64. Springer, 2007. [8] Siddhartha Banerjee and Peter Lofgren. Fast bidirectional probability estimation in markov models. Technical report, 2015. http://arxiv.org/abs/1507.05998. [9] Devdatt P Dubhashi and Alessandro Panconesi. Concentration of measure for the analysis of randomized algorithms. Cambridge University Press, 2009. [10] Purnamrita Sarkar, Andrew W Moore, and Amit Prakash. Fast incremental proximity search in large graphs. In Proceedings of the 25th international conference on Machine learning, pages 896–903. ACM, 2008. [11] Wolfgang Doeblin. Elements d’une theorie generale des chaines simples constantes de markoff. In Annales Scientifiques de l’Ecole Normale Sup´erieure, volume 57, pages 61–111. Soci´et´e math´ematique de France, 1940. [12] Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. The pagerank citation ranking: bringing order to the web. 1999. [13] Ronny Lempel and Shlomo Moran. The stochastic approach for link-structure analysis (SALSA) and the TKC effect. Computer Networks, 33(1):387–401, 2000. [14] Sahand Negahban, Sewoong Oh, and Devavrat Shah. Iterative ranking from pair-wise comparisons. In Advances in Neural Information Processing Systems, pages 2474–2482, 2012. [15] Jacob Steinhardt and Percy Liang. Learning fast-mixing models for structured prediction. In ICML’15, 2015. [16] Krishna B Athreya and ¨Orjan Stenflo. Perfect sampling for Doeblin chains. Sankhy¯a: The Indian Journal of Statistics, pages 763–777, 2003. [17] Fan Chung. The heat kernel as the pagerank of a graph. Proceedings of the National Academy of Sciences, 104(50):19735–19740, 2007. [18] Christina E Lee, Asuman Ozdaglar, and Devavrat Shah. Computing the stationary distribution locally. In Advances in Neural Information Processing Systems, pages 1376–1384, 2013. [19] Lubos Takac and Michal Zabovsky. Data analysis in public social networks. In International. Scientific Conf. & Workshop Present Day Trends of Innovations, 2012. [20] Alan Mislove, Massimiliano Marcon, Krishna P. Gummadi, Peter Druschel, and Bobby Bhattacharjee. Measurement and Analysis of Online Social Networks. In Proceedings of the 5th ACM/Usenix Internet Measurement Conference (IMC’07), San Diego, CA, October 2007. [21] Stanford Network Analysis Platform (SNAP). http://http://snap.stanford.edu/. Accessed: 2014-02-11. [22] Paolo Boldi, Marco Rosa, Massimo Santini, and Sebastiano Vigna. Layered label propagation: A multi resolution coordinate-free ordering for compressing social networks. In ACM WWW’11, 2011. [23] Laboratory for Web Algorithmics. http://law.di.unimi.it/datasets.php. Accessed: 201402-11. 9 | 2015 | 370 |
5,892 | Learning to Linearize Under Uncertainty Ross Goroshin∗1 Michael Mathieu∗1 Yann LeCun1,2 1Dept. of Computer Science, Courant Institute of Mathematical Science, New York, NY 2Facebook AI Research, New York, NY {goroshin,mathieu,yann}@cs.nyu.edu Abstract Training deep feature hierarchies to solve supervised learning tasks has achieved state of the art performance on many problems in computer vision. However, a principled way in which to train such hierarchies in the unsupervised setting has remained elusive. In this work we suggest a new architecture and loss for training deep feature hierarchies that linearize the transformations observed in unlabeled natural video sequences. This is done by training a generative model to predict video frames. We also address the problem of inherent uncertainty in prediction by introducing latent variables that are non-deterministic functions of the input into the network architecture. 1 Introduction The recent success of deep feature learning in the supervised setting has inspired renewed interest in feature learning in weakly supervised and unsupervised settings. Recent findings in computer vision problems have shown that the representations learned for one task can be readily transferred to others [10], which naturally leads to the question: does there exist a generically useful feature representation, and if so what principles can be exploited to learn it? Recently there has been a flurry of work on learning features from video using varying degrees of supervision [14][12][13]. Temporal coherence in video can be considered as a form of weak supervision that can be exploited for feature learning. More precisely, if we assume that data occupies some low dimensional “manifold” in a high dimensional space, then videos can be considered as one-dimensional trajectories on this manifold parametrized by time. Many unsupervised learning algorithms can be viewed as various parameterizations (implicit or explicit) of the data manifold [1]. For instance, sparse coding implicitly assumes a locally linear model of the data manifold [9]. In this work, we assume that deep convolutional networks are good parametric models for natural data. Parameterizations of the data manifold can be learned by training these networks to linearize short temporal trajectories, thereby implicitly learning a local parametrization. In this work we cast the linearization objective as a frame prediction problem. As in many other unsupervised learning schemes, this necessitates a generative model. Several recent works have also trained deep networks for the task of frame prediction [12][14][13]. However, unlike other works that focus on prediction as a final objective, in this work prediction is regarded as a proxy for learning representations. We introduce a loss and architecture that addresses two main problems in frame prediction: (1) minimizing L2 error between the predicted and actual frame leads to unrealistically blurry predictions, which potentially compromises the learned representation, and (2) copying the most recent frame to the input seems to be a hard-to-escape trap of the objective function, which results in the network learning little more than the identity function. We argue that the source of blur partially stems from the inherent unpredictability of natural data; in cases where multiple valid predictions are plausible, a deterministic network will learn to average between all the plausible predictions. To address the first problem we introduce a set of latent variables that are non-deterministic ∗Equal contribution 1 functions of the input, which are used to explain the unpredictable aspects of natural videos. The second problem is addressed by introducing an architecture that explicitly formulates the prediction in the linearized feature space. The paper is organized as follows. Section 2 reviews relevant prior work. Section 3 introduces the basic architecture used for learning linearized representations. Subsection 3.1 introduces “phasepooling”–an operator that facilitates linearization by inducing a topology on the feature space. Subsection 3.2 introduces a latent variable formulation as a means of learning to linearize under uncertainty. Section 4 presents experimental results on relatively simple datasets to illustrate the main ideas of our work. Finally, Section 5 offers directions for future research. 2 Prior Work This work was heavily inspired by the philosophy revived by Hinton et al. [5], which introduced “capsule” units. In that work, an equivariant representation is learned by the capsules when the true latent states were provided to the network as implicit targets. Our work allows us to move to a more unsupervised setting in which the true latent states are not only unknown, but represent completely arbitrary qualities. This was made possible with two assumptions: (1) that temporally adjacent samples also correspond to neighbors in the latent space, (2) predictions of future samples can be formulated as linear operations in the latent space. In theory, the representation learned by our method is very similar to the representation learned by the “capsules”; this representation has a locally stable “what” component and a locally linear, or equivariant “where” component. Theoretical properties of linearizing features were studied in [3]. Several recent works propose schemes for learning representations from video which use varying degrees of supervision[12][14][13][4]. For instance, [13] assumes that the pre-trained network from [7] is already available and training consists of learning to mimic this network. Similarly, [14] learns a representation by receiving supervision from a tracker. This work is more closely related to fully unsupervised approaches for learning representations from video such as [4][6][2][15][8]. It is most related to [12] which also trains a decoder to explicitly predict video frames. Our proposed architecture was inspired by those presented in in [11] and [16]. 3 Learning Linearized Representations Our goal is to obtain a representation of each input sequence that varies linearly in time by transforming each frame individually. Furthermore, we assume that this transformation can be learned by a deep, feed forward network referred to as the encoder, denoted by the function FW . Denote the code for frame xt by zt = FW (xt). Assume that the dataset is parameterized by a temporal index t so it is described by the sequence X = {..., xt−1, xt, xt+1, ...} with a corresponding feature sequence produced by the encoder Z = {..., zt−1, zt, zt+1, ...}. Thus our goal is to train FW to produce a sequence Z whose average local curvature is smaller than sequence X. A scale invariant local measure of curvature is the cosine distance between the two vectors formed by three temporally adjacent samples. However, minimizing the curvature directly can result in the trivial solutions: zt = ct ∀t and zt = c ∀t. These solutions are trivial because they are virtually uninformative with respect to the input xt and therefore cannot be a meaningful representation of the input. To avoid this solution, we also minimize the prediction error in the input space. The predicted frame is generated in two steps: (i) linearly extrapolation in code space to obtain a predicted code ˆzt+1 = a[zt zt−1]T followed by (ii) a decoding with GW , which generates the predicted frame ˆxt+1 = GW (ˆzt+1). For example, if a = [2, −1] the predicted code ˆzt+1 corresponds to a constant speed linear extrapolation of zt and zt−1. The L2 prediction error is minimized by jointly training the encoder and decoder networks. Note that minimizing prediction error alone will not necessarily lead to low curvature trajectories in Z since the decoder is unconstrained; the decoder may learn a many to one mapping which maps different codes to the same output image without forcing them to be equal. To prevent this, we add an explicit curvature penalty to the loss, corresponding to the cosine distance between (zt −zt−1) and (zt+1 −zt). The complete loss to minimize is: L = 1 2∥GW (a zt zt−1T ) −xt+1∥2 2 −λ(zt −zt−1)T (zt+1 −zt) ∥zt −zt−1∥∥zt+1 −zt∥ (1) 2 time x y z (a) x−Intensity Three−Pixel Video y−Intensity z−Intensity (b) Figure 1: (a) A video generated by translating a Gaussian intensity bump over a three pixel array (x,y,z), (b) the corresponding manifold parametrized by time in three dimensional space prediction enc pool m2 p2 enc pool m3 p3 m3 p3 ~ ~ enc pool m1 p1 x1 x2 x3 unpool dec x3 ~ L2 x3 cosine distance Figure 2: The basic linear prediction architecture with shared weight encoders This feature learning scheme can be implemented using an autoencoder-like network with shared encoder weights. 3.1 Phase Pooling Thus far we have assumed a generic architecture for FW and GW . We now consider custom architectures and operators that are particularly suitable for the task of linearization. To motivate the definition of these operators, consider a video generated by translating a Gaussian “intensity bump” over a three pixel region at constant speed. The video corresponds to a one dimensional manifold in three dimensional space, i.e. a curve parameterized by time (see Figure 1). Next, assume that some convolutional feature detector fires only when centered on the bump. Applying the max-pooling operator to the activations of the detector in this three-pixel region signifies the presence of the feature somewhere in this region (i.e. the “what”). Applying the argmax operator over the region returns the position (i.e. the “where”) with respect to some local coordinate frame defined over the pooling region. This position variable varies linearly as the bump translates, and thus parameterizes the curve in Figure 1b. These two channels, namely the what and the where, can also be regarded as generalized magnitude m and phase p, corresponding to a factorized representation: the magnitude represents the active set of parameters, while the phase represents the set of local coordinates in this active set. We refer to the operator that outputs both the max and argmax channels as the “phase-pooling” operator. In this example, spatial pooling was used to linearize the translation of a fixed feature. More generally, the phase-pooling operator can locally linearize arbitrary transformations if pooling is performed not only spatially, but also across features in some topology. In order to be able to back-propagate through p, we define a soft version of the max and argmax operators within each pool group. For simplicity, assume that the encoder has a fully convolutional architecture which outputs a set of feature maps, possibly of a different resolution than the input. Although we can define an arbitrary topology in feature space, for now assume that we have the 3 familiar three-dimensional spatial feature map representation where each activation is a function z(f, x, y), where x and y correspond to the spatial location, and f is the feature map index. Assuming that the feature activations are positive, we define our soft “max-pooling” operator for the kth neighborhood Nk as: mk = X Nk z(f, x, y) eβz(f,x,y) P Nk eβz(f′,x′,y′) ≈max Nk z(f, x, y), (2) where β ≥0. Note that the fraction in the sum is a softmax operation (parametrized by β), which is positive and sums to one in each pooling region. The larger the β, the closer it is to a unimodal distribution and therefore the better mk approximates the max operation. On the other hand, if β = 0, Equation 2 reduces to average-pooling. Finally, note that mk is simply the expected value of z (restricted to Nk) under the softmax distribution. Assuming that the activation pattern within each neighborhood is approximately unimodal, we can define a soft versions of the argmax operator. The vector pk approximates the local coordinates in the feature topology at which the max activation value occurred. Assuming that pooling is done volumetrically, that is, spatially and across features, pk will have three components. In general, the number of components in pk is equal to the dimension of the topology of our feature space induced by the pooling neighborhood. The dimensionality of pk can also be interpreted as the maximal intrinsic dimension of the data. If we define a local standard coordinate system in each pooling volume to be bounded between -1 and +1, the soft “argmax-pooling” operator is defined by the vector-valued sum: pk = X Nk "f x y # eβz(f,x,y) P Nk eβz(f′,x′,y′) ≈arg max Nk z(f, x, y), (3) where the indices f, x, y take values from -1 to 1 in equal increments over the pooling region. Again, we observe that pk is simply the expected value of [f x y]T under the softmax distribution. The phase-pooling operator acts on the output of the encoder, therefore it can simply be considered as the last encoding step. Correspondingly we define an “un-pooling” operation as the first step of the decoder, which produces reconstructed activation maps by placing the magnitudes m at appropriate locations given by the phases p. Because the phase-pooling operator produces both magnitude and phase signals for each of the two input frames, it remains to define the predicted magnitude and phase of the third frame. In general, this linear extrapolation operator can be learned, however “hard-coding” this operator allows us to place implicit priors on the magnitude and phase channels. The predicted magnitude and phase are defined as follows: mt+1 = mt+mt−1 2 (4) pt+1 = 2pt −pt−1 (5) Predicting the magnitude as the mean of the past imposes an implicit stability prior on m, i.e. the temporal sequence corresponding to the m channel should be stable between adjacent frames. The linear extrapolation of the phase variable imposes an implicit linear prior on p. Thus such an architecture produces a factorized representation composed of a locally stable m and locally linearly varying p. When phase-pooling is used curvature regularization is only applied to the p variables. The full prediction architecture is shown in Figure 2. 3.2 Addressing Uncertainty Natural video can be inherently unpredictable; objects enter and leave the field of view, and out of plane rotations can also introduce previously invisible content. In this case, the prediction should correspond to the most likely outcome that can be learned by training on similar video. However, if multiple outcomes are present in the training set then minimizing the L2 distance to these multiple outcomes induces the network to predict the average outcome. In practice, this phenomena results in blurry predictions and may lead the encoder to learn a less discriminative representation of the input. To address this inherent unpredictability we introduce latent variables δ to the prediction architecture that are not deterministic functions of the input. These variables can be adjusted using the target 4 xt+1 in order to minimize the prediction L2 error. The interpretation of these variables is that they explain all aspects of the prediction that are not captured by the encoder. For example, δ can be used to switch between multiple, equally likely predictions. It is important to control the capacity of δ to prevent it from explaining the entire prediction on its own. Therefore δ is restricted to act only as a correction term in the code space output by the encoder. To further restrict the capacity of δ we enforce that dim(δ) ≪dim(z). More specifically, the δ-corrected code is defined as: ˆzt+1 δ = zt + (W1δ) ⊙a zt zt−1T (6) Where W1 is a trainable matrix of size dim(δ) × dim(z), and ⊙denotes the component-wise product. During training, δ is inferred (using gradient descent) for each training sample by minimizing the loss in Equation 7. The corresponding adjusted ˆzt+1 δ is then used for back-propagation through W and W1. At test time δ can be selected via sampling, assuming its distribution on the training set has been previously estimated. L = min δ ∥GW (ˆzt+1 δ ) −xt+1∥2 2 −λ(zt −zt−1)T (zt+1 −zt) ∥zt −zt−1∥∥zt+1 −zt∥ (7) The following algorithm details how the above loss is minimized using stochastic gradient descent: Algorithm 1 Minibatch stochastic gradient descent training for prediction with uncertainty. The number of δ-gradient descent steps (k) is treated as a hyper-parameter. for number of training epochs do Sample a mini-batch of temporal triplets {xt−1, xt, xt+1} Set δ0 = 0 Forward propagate xt−1, xt through the network and obtain the codes zt−1, zt and the prediction ˆxt+1 0 for i =1 to k do Compute the L2 prediction error Back propagate the error through the decoder to compute the gradient ∂L ∂δi−1 Update δi = δi−1 −α ∂L ∂δi−1 Compute ˆzt+1 δi = zt + (W1δi) ⊙a zt zt−1T Compute ˆxt+1 i = GW (zt+1 δi ) end for Back propagate the full encoder/predictor loss from Equation 7 using δk, and update the weight matrices W and W1 end for When phase pooling is used we allow δ to only affect the phase variables in Equation 5, this further encourages the magnitude to be stable and places all the uncertainty in the phase. 4 Experiments The following experiments evaluate the proposed feature learning architecture and loss. In the first set of experiments we train a shallow architecture on natural data and visualize the learned features in order gain a basic intuition. In the second set of experiments we train a deep architecture on simulated movies generated from the NORB dataset. By generating frames from interpolated and extrapolated points in code space we show that a linearized representation of the input is learned. Finally, we explore the role of uncertainty by training on only partially predictable sequences, we show that our latent variable formulation can account for this uncertainty enabling the encoder to learn a linearized representation even in this setting. 4.1 Shallow Architecture Trained on Natural Data To gain an intuition for the features learned by a phase-pooling architecture let us consider an encoder architecture comprised of the following stages: convolutional filter bank, rectifying point-wise nonlinearity, and phase-pooling. The decoder architecture is comprised of an un-pooling stage followed by a convolutional filter bank. This architecture was trained on simulated 32 × 32 movie 5 Encoder Prediction Decoder Shallow Architecture 1 Conv+ReLU 64 × 9 × 9 Average Mag. Conv 64 × 9 × 9 Phase Pool 4 Linear Extrap. Phase Shallow Architecture 2 Conv+ReLU 64 × 9 × 9 Average Mag. Conv 64 × 9 × 9 Phase Pool 4 stride 2 Linear Extrap. Phase Deep Architecture 1 None FC+ReLU 8192 × 8192 Conv+ReLU 16 × 9 × 9 Reshape 32 × 16 × 16 Conv+ReLU 32 × 9 × 9 SpatialPadding 8 × 8 FC+ReLU 8192 × 4096 Conv+ReLU 16 × 9 × 9 SpatialPadding 8 × 8 Conv 1 × 9 × 9 Deep Architecture 2 Linear Extrapolation FC+ReLU 4096 × 8192 Conv+ReLU 16 × 9 × 9 Reshape 32 × 16 × 16 Conv+ReLU 32 × 9 × 9 SpatialPadding 8 × 8 FC+ReLU 8192 × 4096 Conv+ReLU 16 × 9 × 9 SpatialPadding 8 × 8 Conv 1 × 9 × 9 Deep Architecture 3 Unpool 8 × 8 Conv+ReLU 16 × 9 × 9 FC+ReLU 4096 × 8192 Conv+ReLU 32 × 9 × 9 Average Mag. Reshape 32 × 16 × 16 FC+ReLU 8192 × 4096 Linear Extrap. Phase SpatialPadding 8 × 8 Reshape 64 × 8 × 8 Conv+ReLU 16 × 9 × 9 Phase Pool 8 × 8 SpatialPadding 8 × 8 Conv 1 × 9 × 9 Table 1: Summary of architectures frames taken from YouTube videos [4]. Each frame triplet is generated by transforming still frames with a sequence of three rigid transformations (translation, scale, rotation). More specifically let A be a random rigid transformation parameterized by τ, and let x denote a still image reshaped into a column vector, the generated triplet of frames is given by {f1 = Aτ= 1 3 x, f2 = Aτ= 2 3 x, f3 = Aτ=1x}. Two variants of this architecture were trained, their full architecture is summarized in the first two lines of Table 1. In Shallow Architecture 1, phase pooling is performed spatially in non-overlapping groups of 4 × 4 and across features in a one-dimensional topology consisting of non-overlapping groups of four. Each of the 16 pool-groups produce a code consisting of a scalar m and a three-component p = [pf, px, py]T (corresponding to two spatial and one feature dimensions); thus the encoder architecture produces a code of size 16 × 4 × 8 × 8 for each frame. The corresponding filters whose activations were pooled together are laid out horizontally in groups of four in Figure 3(a). Note that each group learns to exhibit a strong ordering corresponding to the linearized variable pf. Because global rigid transformations can be locally well approximated by translations, the features learn to parameterize local translations. In effect the network learns to linearize the input by tracking common features in the video sequence. Unlike the spatial phase variables, pf can linearize sub-pixel translations. Next, the architecture described in column 2 of Table 1 was trained on natural movie patches with the natural motion present in the real videos. The architecture differs in only in that pooling across features is done with overlap (groups of 4, stride of 2). The resulting decoder filters are displayed in Figure 3 (b). Note that pooling with overlap introduces smoother transitions between the pool groups. Although some groups still capture translations, more complex transformations are learned from natural movies. 4.2 Deep Architecture trained on NORB In the next set of experiments we trained deep feature hierarchies that have the capacity to linearize a richer class of transformations. To evaluate the properties of the learned features in a controlled setting, the networks were trained on simulated videos generated using the NORB dataset rescaled to 32 × 32 to reduce training time. The simulated videos are generated by tracing constant speed trajectories with random starting points in the two-dimensional latent space of pitch and azimuth rotations. In other words, the models are trained on triplets of frames ordered by their rotation angles. As before, presented with two frames as input, the models are trained to predict the third frame. Recall that prediction is merely a proxy for learning linearized feature representations. One way to evaluate the linearization properties of the learned features is to linearly interpolate (or extrapolate) 6 (a) Shallow Architecture 1 (b) Shallow Architecture 2 Figure 3: Decoder filters learned by shallow phase-pooling architectures (a) (b) Figure 4: (a) Test samples input to the network (b) Linear interpolation in code space learned by our Siamese-encoder network new codes and visualize the corresponding images via forward propagation through the decoder. This simultaneously tests the encoder’s capability to linearize the input and the decoder’s (generative) capability to synthesize images from the linearized codes. In order to perform these tests we must have an explicit code representation, which is not always available. For instance, consider a simple scheme in which a generic deep network is trained to predict the third frame from the concatenated input of two previous frames. Such a network does not even provide an explicit feature representation for evaluation. A simple baseline architecture that affords this type of evaluation is a Siamese encoder followed by a decoder, this exactly corresponds to our proposed architecture with the linear prediction layer removed. Such an architecture is equivalent to learning the weights of the linear prediction layer of the model shown in Figure 2. In the following experiment we evaluate the effects of: (1) fixing v.s. learning the linear prediction operator, (2) including the phase pooling operation, (3) including explicit curvature regularization (second term in Equation 1). Let us first consider Deep Architecture 1 summarized in Table 1. In this architecture a Siamese encoder produces a code of size 4096 for each frame. The codes corresponding to the two frames are concatenated together and propagated to the decoder. In this architecture the first linear layer of the decoder can be interpreted as a learned linear prediction layer. Figure 4a shows three frames from the test set corresponding to temporal indices 1,2, and 3, respectively. Figure 4b shows the generated frames corresponding to interpolated codes at temporal indices: 0, 0.5, 1, 1.5, 2, 2.5, 3. The images were generated by propagating the corresponding codes through the decoder. Codes corresponding to non-integer temporal indices were obtained by linearly interpolating in code space. Deep Architecture 2 differs from Deep Architecture 1 in that it generates the predicted code via a fixed linear extrapolation in code space. The extrapolated code is then fed to the decoder that generates the predicted image. Note that the fully connected stage of the decoder has half as many free parameters compared to the previous architecture. This architecture is further restricted by propagating only the predicted code to the decoder. For instance, unlike in Deep Architecture 1, the decoder cannot copy any of the input frames to the output. The generated images corresponding to this architecture are shown in Figure 5a. These images more closely resemble images from the dataset. Furthermore, Deep Architecture 2 achieves a lower L2 prediction error than Deep Architecture 1. 7 (a) (b) (c) (d) Figure 5: Linear interpolation in code space learned by our model. (a) no phase-pooling, no curvature regularization, (b) with phase pooling and curvature regularization Interpolation results obtained by minimizing (c) Equation 1 and (d) Equation 7 trained with only partially predictable simulated video Finally, Deep Architecture 3 uses phase-pooling in the encoder, and “un-pooling” in the decoder. This architecture makes use of phase-pooling in a two-dimensional feature space arranged on an 8 × 8 grid. The pooling is done in a single group over all the fully-connected features producing a feature vector of dimension 192 (64 × 3) compared to 4096 in previous architectures. Nevertheless this architecture achieves the best overall L2 prediction error and generates the most visually realistic images (Figure 5b). In this subsection we compare the representation learned by minimizing the loss in Equation 1 to Equation 7. Uncertainty is simulated by generating triplet sequences where the third frame is skipped randomly with equal probability, determined by Bernoulli variable s. For example, the sequences corresponding to models with rotation angles 0◦, 20◦, 40◦and 0◦, 20◦, 60◦are equally likely. Minimizing Equation 1 with Deep Architecture 3 results in the images displayed in Figure 5c. The interpolations are blurred due to the averaging effect discussed in Subsection 3.2. On the other hand minimizing Equation 7 (Figure 5d) partially recovers the sharpness of Figure 5b. For this experiment, we used a three-dimensional, real valued δ. Moreover training a linear predictor to infer binary variable s from δ (after training) results in a 94% test set accuracy. This suggests that δ does indeed capture the uncertainty in the data. 5 Discussion In this work we have proposed a new loss and architecture for learning locally linearized features from video. We have also proposed a method that introduces latent variables that are nondeterministic functions of the input for coping with inherent uncertainty in video. In future work we will suggest methods for “stacking” these architectures that will linearize more complex features over longer temporal scales. Acknowledgments We thank Jonathan Tompson, Joan Bruna, and David Eigen for many insightful discussions. We also gratefully acknowledge NVIDIA Corporation for the donation of a Tesla K40 GPU used for this research. 8 References [1] Yoshua Bengio, Aaron C. Courville, and Pascal Vincent. Representation learning: A review and new perspectives. Technical report, University of Montreal, 2012. [2] Charles F. Cadieu and Bruno A. Olshausen. Learning intermediate-level representations of form and motion from natural movies. Neural Computation, 2012. [3] Taco S Cohen and Max Welling. Transformation properties of learned visual representations. arXiv preprint arXiv:1412.7659, 2014. [4] Ross Goroshin, Joan Bruna, Jonathan Tompson, David Eigen, and Yann LeCun. Unsupervised learning of spatiotemporally coherent metrics. arXiv preprint arXiv:1412.6056, 2014. [5] Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In Artificial Neural Networks and Machine Learning–ICANN 2011, pages 44–51. Springer, 2011. [6] Christoph Kayser, Wolfgang Einhauser, Olaf Dummer, Peter Konig, and Konrad Kding. Extracting slow subspaces from natural videos leads to complex cells. In ICANN’2001, 2001. [7] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, volume 1, page 4, 2012. [8] Hossein Mobahi, Ronana Collobert, and Jason Weston. Deep learning from temporal coherence in video. In ICML, 2009. [9] Bruno A Olshausen and David J Field. Sparse coding of sensory inputs. Current opinion in neurobiology, 14(4):481–487, 2004. [10] Maxime Oquab, Leon Bottou, Ivan Laptev, and Josef Sivic. Learning and transferring midlevel image representations using convolutional neural networks. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 1717–1724. IEEE, 2014. [11] M Ranzato, Fu Jie Huang, Y-L Boureau, and Yann LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pages 1–8. IEEE, 2007. [12] MarcAurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. Video (language) modeling: a baseline for generative models of natural videos. arXiv preprint arXiv:1412.6604, 2014. [13] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Anticipating the future by watching unlabeled video. arXiv preprint arXiv:1504.08023, 2015. [14] Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. arXiv preprint arXiv:1505.00687, 2015. [15] Laurenz Wiskott and Terrence J. Sejnowski. Slow feature analysis: Unsupervised learning of invariances. Neural Computation, 2002. [16] Matthew D Zeiler, Dilip Krishnan, Graham W Taylor, and Robert Fergus. Deconvolutional networks. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2528–2535. IEEE, 2010. 9 | 2015 | 371 |
5,893 | Variance Reduced Stochastic Gradient Descent with Neighbors Thomas Hofmann Department of Computer Science ETH Zurich, Switzerland Aurelien Lucchi Department of Computer Science ETH Zurich, Switzerland Simon Lacoste-Julien INRIA - Sierra Project-Team ´Ecole Normale Sup´erieure, Paris, France Brian McWilliams Department of Computer Science ETH Zurich, Switzerland Abstract Stochastic Gradient Descent (SGD) is a workhorse in machine learning, yet its slow convergence can be a computational bottleneck. Variance reduction techniques such as SAG, SVRG and SAGA have been proposed to overcome this weakness, achieving linear convergence. However, these methods are either based on computations of full gradients at pivot points, or on keeping per data point corrections in memory. Therefore speed-ups relative to SGD may need a minimal number of epochs in order to materialize. This paper investigates algorithms that can exploit neighborhood structure in the training data to share and re-use information about past stochastic gradients across data points, which offers advantages in the transient optimization phase. As a side-product we provide a unified convergence analysis for a family of variance reduction algorithms, which we call memorization algorithms. We provide experimental results supporting our theory. 1 Introduction We consider a general problem that is pervasive in machine learning, namely optimization of an empirical or regularized convex risk function. Given a convex loss l and a µ-strongly convex regularizer Ω, one aims at finding a parameter vector w which minimizes the (empirical) expectation: w∗= argmin w f(w), f(w) = 1 n n X i=1 fi(w), fi(w) := l(w, (xi, yi)) + Ω(w) . (1) We assume throughout that each fi has L-Lipschitz-continuous gradients. Steepest descent can find the minimizer w∗, but requires repeated computations of full gradients f ′(w), which becomes prohibitive for massive data sets. Stochastic gradient descent (SGD) is a popular alternative, in particular in the context of large-scale learning [2, 10]. SGD updates only involve f ′ i(w) for an index i chosen uniformly at random, providing an unbiased gradient estimate, since Ef ′ i(w) = f ′(w). It is a surprising recent finding [11, 5, 9, 6] that the finite sum structure of f allows for significantly faster convergence in expectation. Instead of the standard O(1/t) rate of SGD for strongly-convex functions, it is possible to obtain linear convergence with geometric rates. While SGD requires asymptotically vanishing learning rates, often chosen to be O(1/t) [7], these more recent methods introduce corrections that ensure convergence for constant learning rates. Based on the work mentioned above, the contributions of our paper are as follows: First, we define a family of variance reducing SGD algorithms, called memorization algorithms, which includes SAGA and SVRG as special cases, and develop a unifying analysis technique for it. Second, we 1 show geometric rates for all step sizes γ < 1 4L, including a universal (µ-independent) step size choice, providing the first µ-adaptive convergence proof for SVRG. Third, based on the above analysis, we present new insights into the trade-offs between freshness and biasedness of the corrections computed from previous stochastic gradients. Fourth, we propose a new class of algorithms that resolves this trade-off by computing corrections based on stochastic gradients at neighboring points. We experimentally show its benefits in the regime of learning with a small number of epochs. 2 Memorization Algorithms 2.1 Algorithms Variance Reduced SGD Given an optimization problem as in (1), we investigate a class of stochastic gradient descent algorithms that generates an iterate sequence wt (t ≥0) with updates taking the form: w+ = w −γgi(w), gi(w) = f ′ i(w) −¯αi with ¯αi := αi −¯α, (2) where ¯α := 1 n Pn j=1 αj. Here w is the current and w+ the new parameter vector, γ is the step size, and i is an index selected uniformly at random. ¯αi are variance correction terms such that E¯αi = 0, which guarantees unbiasedness Egi(w) = f ′(w). The aim is to define updates of asymptotically vanishing variance, i.e. gi(w) →0 as w →w∗, which requires ¯αi →f ′ i(w∗). This implies that corrections need to be designed in a way to exactly cancel out the stochasticity of f ′ i(w∗) at the optimum. How the memory αj is updated distinguishes the different algorithms that we consider. SAGA The SAGA algorithm [4] maintains variance corrections αi by memorizing stochastic gradients. The update rule is α+ i = f ′ i(w) for the selected i, and α+ j = αj, for j ̸= i. Note that these corrections will be used the next time the same index i gets sampled. Setting ¯αi := αi −¯α guarantees unbiasedness. Obviously, ¯α can be updated incrementally. SAGA reuses the stochastic gradient f ′ i(w) computed at step t to update w as well as ¯αi. q-SAGA We also consider q-SAGA, a method that updates q ≥1 randomly chosen αj variables at each iteration. This is a convenient reference point to investigate the advantages of “fresher” corrections. Note that in SAGA the corrections will be on average n iterations “old”. In q-SAGA this can be controlled to be n/q at the expense of additional gradient computations. SVRG We reformulate a variant of SVRG [5] in our framework using a randomization argument similar to (but simpler than) the one suggested in [6]. Fix q > 0 and draw in each iteration r ∼ Uniform[0; 1). If r < q/n, a complete update, α+ j = f ′ j(w) (∀j) is performed, otherwise they are left unchanged. While q-SAGA updates exactly q variables in each iteration, SVRG occasionally updates all α variables by triggering an additional sweep through the data. There is an option to not maintain α variables explicitly and to save on space by storing only ¯α = f ′(w) and w. Uniform Memorization Algorithms Motivated by SAGA and SVRG, we define a class of algorithms, which we call uniform memorization algorithms. Definition 1. A uniform q-memorization algorithm evolves iterates w according to Eq. (2) and selects in each iteration a random index set J of memory locations to update according to α+ j := f ′ j(w) if j ∈J αj otherwise, (3) such that any j has the same probability of q/n of being updated, i.e. ∀j, P J∋j P{J} = q n. Note that q-SAGA and the above SVRG are special cases. For q-SAGA: P{J} = 1/ n q if |J| = q P{J} = 0 otherwise. For SVRG: P{∅} = 1 −q/n, P{[1 : n]} = q/n, P{J} = 0, otherwise. N-SAGA Because we need it in Section 3, we will also define an algorithm, which we call NSAGA, which makes use of a neighborhood system Ni ⊆{1, . . . , n} and which selects neighborhoods uniformly, i.e. P{Ni} = 1 n. Note that Definition 1 requires |{i : j ∈Ni}| = q (∀j). 2 Finally, note that for generalized linear models where fi depends on xi only through ⟨w, xi⟩, we get f ′ i(w) = ξ′ i(w)xi, i.e. the update direction is determined by xi, whereas the effective step length depends on the derivative of a scalar function ξi(w). As used in [9], this leads to significant memory savings as one only needs to store the scalars ξ′ i(w) as xi is always given when performing an update. 2.2 Analysis Recurrence of Iterates The evolution equation (2) in expectation implies the recurrence (by crucially using the unbiasedness condition Egi(w) = f ′(w)): E∥w+−w∗∥2 = ∥w −w∗∥2 −2γ⟨f ′(w), w −w∗⟩+ γ2E∥gi(w)∥2 . (4) Here and in the rest of this paper, expectations are always taken only with respect to i (conditioned on the past). We utilize a number of bounds (see [4]), which exploit strong convexity of f (wherever µ appears) as well as Lipschitz continuity of the fi-gradients (wherever L appears): ⟨f ′(w), w −w∗⟩≥f(w) −f(w∗) + µ 2 ∥w −w∗∥2 , (5) E∥gi(w)∥2 ≤2E∥f ′ i(w) −f ′ i(w∗)∥2 + 2E∥¯αi −f ′ i(w∗)∥2 , (6) ∥f ′ i(w) −f ′ i(w∗)∥2 ≤2Lhi(w), hi(w) := fi(w) −fi(w∗) −⟨w −w∗, f ′ i(w∗)⟩, (7) E∥f ′ i(w)−f ′ i(w∗)∥2 ≤2Lf δ(w), f δ(w) := f(w) −f(w∗) , (8) E∥¯αi −f ′ i(w∗)∥2 = E∥αi −f ′ i(w∗)∥2 −∥¯α∥2 ≤E∥αi −f ′ i(w∗)∥2. (9) Eq. (6) can be generalized [4] using ∥x±y∥2 ≤(1+β)∥x∥2+(1+β−1)∥y∥2 with β > 0. However for the sake of simplicity, we sacrifice tightness and choose β = 1. Applying all of the above yields: Lemma 1. For the iterate sequence of any algorithm that evolves solutions according to Eq. (2), the following holds for a single update step, in expectation over the choice of i: ∥w −w∗∥2 −E∥w+ −w∗∥2 ≥γµ∥w −w∗∥2 −2γ2E∥αi −f ′ i(w∗)∥2 + 2γ −4γ2L f δ(w) . All proofs are deferred to the Appendix. Ideal and Approximate Variance Correction Note that in the ideal case of αi = f ′ i(w∗), we would immediately get a condition for a contraction by choosing γ = 1 2L, yielding a rate of 1 −ρ with ρ = γµ = µ 2L, which is half the inverse of the condition number κ := L/µ. How can we further bound E∥αi −f ′ i(w∗)∥2 in the case of “non-ideal” variance-reducing SGD? A key insight is that for memorization algorithms, we can apply the smoothness bound in Eq. (7) ∥αi −f ′ i(w∗)∥2 = ∥f ′ i(wτi) −f ′ i(w∗)∥2 ≤2Lhi(wτi), (where wτi is old w) . (10) Note that if we only had approximations βi in the sense that ∥βi −αi∥2 ≤ϵi (see Section 3), then we can use ∥x −y∥≤2∥x∥+ 2∥y∥to get the somewhat worse bound: ∥βi −f ′ i(w∗)∥2 ≤2∥αi −f ′ i(w∗)∥2 + 2∥βi −αi∥2 ≤4Lhi(wτi) + 2ϵi. (11) Lyapunov Function Ideally, we would like to show that for a suitable choice of γ, each iteration results in a contraction E∥w+ −w∗∥2 ≤(1 −ρ)∥w −w∗∥2, where 0 < ρ ≤1. However, the main challenge arises from the fact that the quantities αi represent stochastic gradients from previous iterations. This requires a somewhat more complex proof technique. Adapting the Lyapunov function method from [4], we define upper bounds Hi ≥∥αi −f ′ i(w∗)∥2 such that Hi →0 as w →w∗. We start with α0 i =0 and (conceptually) initialize Hi = ∥f ′ i(w∗)∥2, and then update Hi in sync with αi, H+ i := 2L hi(w) if αi is updated Hi otherwise (12) so that we always maintain valid bounds ∥αi −f ′ i(w∗)∥2 ≤Hi and E∥αi −f ′ i(w∗)∥2 ≤¯H with ¯H := 1 n Pn i=1 Hi. The Hi are quantities showing up in the analysis, but need not be computed. We now define a σ-parameterized family of Lyapunov functions1 Lσ(w, H) := ∥w −w∗∥2 + Sσ ¯H, with S := γn Lq and 0 ≤σ ≤1 . (13) 1This is a simplified version of the one appearing in [4], as we assume f ′(w∗) = 0 (unconstrained regime). 3 In expectation under a random update, the Lyapunov function Lσ changes as ELσ(w+, H+) = E∥w+ −w∗∥2 + Sσ E ¯H+. We can readily apply Lemma 1 to bound the first part. The second part is due to (12), which mirrors the update of the α variables. By crucially using the property that any αj has the same probability of being updated in (3), we get the following result: Lemma 2. For a uniform q-memorization algorithm, it holds that E ¯H+ = n −q n ¯H + 2Lq n f δ(w). (14) Note that in expectation the shrinkage does not depend on the location of previous iterates wτ and the new increment is proportional to the sub-optimality of the current iterate w. Technically, this is how the possibly complicated dependency on previous iterates is dealt with in an effective manner. Convergence Analysis We first state our main Lemma about Lyapunov function contractions: Lemma 3. Fix c ∈(0; 1] and σ ∈[0; 1] arbitrarily. For any uniform q-memorization algorithm with sufficiently small step size γ such that γ ≤1 2L min Kσ K + 2cσ , 1 −σ , and K := 4qL nµ , (15) we have that ELσ(w+, H+) ≤(1 −ρ)Lσ(w, H), with ρ := cµγ. (16) Note that γ < 1 2L maxσ∈[0,1] min{σ, 1 −σ} = 1 4L (in the c →0 limit). By maximizing the bounds in Lemma 3 over the choices of c and σ, we obtain our main result that provides guaranteed geometric rates for all step sizes up to 1 4L. Theorem 1. Consider a uniform q-memorization algorithm. For any step size γ = a 4L with a < 1, the algorithm converges at a geometric rate of at least (1 −ρ(γ)) with ρ(γ) = q n · 1 −a 1 −a/2 = µ 4L · K(1 −a) 1 −a/2 , if γ ≥γ∗(K), otherwise ρ(γ) = µγ (17) where γ∗(K) := a∗(K) 4L , a∗(K) := 2K 1 + K + √ 1 + K2 , K := 4qL nµ = 4q n κ . (18) We would like to provide more insights into this result. Corollary 1. In Theorem 1, ρ is maximized for γ = γ∗(K). We can write ρ∗(K) = ρ(γ∗) as ρ∗(K) = µ 4La∗(K) = q n a∗(K) K = q n 2 1 + K + √ 1 + K2 (19) In the big data regime ρ∗= q n(1 −1 2K + O(K3)), whereas in the ill-conditioned case ρ∗= µ 4L(1 −1 2K−1 + O(K−3)). The guaranteed rate is bounded by µ 4L in the regime where the condition number dominates n (large K) and by q n in the opposite regime of large data (small K). Note that if K ≤1, we have ρ∗= ζ q n with ζ ∈[2/(2 + √ 2); 1] ≈[0.585; 1]. So for q ≤n µ 4L, it pays off to increase freshness as it affects the rate proportionally. In the ill-conditioned regime (κ > n), the influence of q vanishes. Note that for γ ≥γ∗(K), γ → 1 4L the rate decreases monotonically, yet the decrease is only minor. With the exception of a small neighborhood around 1 4L, the entire range of γ ∈[γ∗; 1 4L) results in very similar rates. Underestimating γ∗however leads to a (significant) slow-down by a factor γ/γ∗. As the optimal choice of γ depends on K, i.e. µ, we would prefer step sizes that are µ-independent, thus giving rates that adapt to the local curvature (see [9]). It turns out that by choosing a step size that maximizes minK ρ(γ)/ρ∗(K), we obtain a K-agnostic step size with rate off by at most 1/2: Corollary 2. Choosing γ = 2− √ 2 4L , leads to ρ(γ) ≥(2 − √ 2)ρ∗(K) > 1 2ρ∗(K) for all K. To gain more insights into the trade-offs for these fixed large universal step sizes, the following corollary details the range of rates obtained: Corollary 3. Choosing γ = a 4L with a < 1 yields ρ = min{ 1−a 1−1 2 a q n, a 4 µ L}. In particular, we have for the choice γ = 1 5L that ρ = min{ 1 3 q n, 1 5 µ L} (roughly matching the rate given in [4] for q = 1). 4 3 Sharing Gradient Memory 3.1 ϵ-Approximation Analysis As we have seen, fresher gradient memory, i.e. a larger choice for q, affects the guaranteed convergence rate as ρ ∼q/n. However, as long as one step of a q-memorization algorithm is as expensive as q steps of a 1-memorization algorithm, this insight does not lead to practical improvements per se. Yet, it raises the question, whether we can accelerate these methods, in particular N-SAGA, by approximating gradients stored in the αi variables. Note that we are always using the correct stochastic gradients in the current update and by assuring P i ¯αi = 0, we will not introduce any bias in the update direction. Rather, we lose the guarantee of asymptotically vanishing variance at w∗. However, as we will show, it is possible to retain geometric rates up to a δ-ball around w∗. We will focus on SAGA-style updates for concreteness and investigate an algorithm that mirrors NSAGA with the only difference that it maintains approximations βi to the true αi variables. We aim to guarantee E∥αi −βi∥2 ≤ϵ and will use Eq. (11) to modify the right-hand-side of Lemma 1. We see that approximation errors ϵi are multiplied with γ2, which implies that we should aim for small learning rates, ideally without compromising the N-SAGA rate. From Theorem 1 and Corollary 1 we can see that we can choose γ ≲q/µn for n sufficiently large, which indicates that there is hope to dampen the effects of the approximations. We now make this argument more precise. Theorem 2. Consider a uniform q-memorization algorithm with α-updates that are on average ϵaccurate (i.e. E∥αi −βi∥2 ≤ϵ). For any step size γ ≤˜γ(K), where ˜γ is given by Corollary 5 in the appendix (note that ˜γ(K) ≥2 3γ∗(K) and ˜γ(K) →γ∗(K) as K →0), we get EL(wt, Ht) ≤(1 −µγ)tL0 + 4γϵ µ , with L0 := ∥w0 −w∗∥2 + s(γ)E∥fi(w∗)∥2, (20) where E denote the (unconditional) expectation over histories (in contrast to E which is conditional), and s(γ) := 4γ Kµ(1 −2Lγ). Corollary 4. With γ = min{µ, ˜γ(K)} we have 4γϵ µ ≤4ϵ, with a rate ρ = min{µ2, µ˜γ} . (21) In the relevant case of µ ∼1/√n, we thus converge towards some √ϵ-ball around w∗at a similar rate as for the exact method. For µ ∼n−1, we have to reduce the step size significantly to compensate the extra variance and to still converge to an √ϵ-ball, resulting in the slower rate ρ ∼n−2, instead of ρ ∼n−1. We also note that the geometric convergence of SGD with a constant step size to a neighborhood of the solution (also proven in [8]) can arise as a special case in our analysis. By setting αi = 0 in Lemma 1, we can take ϵ = E∥f ′ i(w∗)∥2 for SGD. An approximate q-memorization algorithm can thus be interpreted as making ϵ an algorithmic parameter, rather than a fixed value as in SGD. 3.2 Algorithms Sharing Gradient Memory We now discuss our proposal of using neighborhoods for sharing gradient information between close-by data points. Thereby we avoid an increase in gradient computations relative to q- or N-SAGA at the expense of suffering an approximation bias. This leads to a new tradeoff between freshness and approximation quality, which can be resolved in non-trivial ways, depending on the desired final optimization accuracy. We distinguish two types of quantities. First, the gradient memory αi as defined by the reference algorithm N-SAGA. Second, the shared gradient memory state βi, which is used in a modified update rule in Eq. (2), i.e. w+ = w −γ(f ′ i(w) −βi + ¯β). Assume that we select an index i for the weight update, then we generalize Eq. (3) as follows β+ j := f ′ i(w) if j ∈Ni βj otherwise , ¯β := 1 n n X i=1 βi, ¯βi := βi −¯β . (22) In the important case of generalized linear models, where one has f ′ i(w) = ξ′ i(w)xi, we can modify the relevant case in Eq. (22) by β+ j := ξ′ i(w)xj. This has the advantages of using the correct direction, while reducing storage requirements. 5 Approximation Bounds For our analysis, we need to control the error ∥αi −βi∥2 ≤ϵi. This obviously requires problem-specific investigations. Let us first look at the case of ridge regression. fi(w) := 1 2(⟨xi, w⟩−yi)2 + λ 2 ∥w∥2 and thus f ′ i(w) = ξ′ i(w)xi + λw with ξ′ i(w) := ⟨xi, w⟩−yi. Considering j ∈Ni being updated, we have ∥α+ j −β+ j ∥= |ξ′ j(w) −ξ′ i(w)|∥xj∥≤(δij∥w∥+ |yj −yi|) ∥xj∥=: ϵij(w) (23) where δij := ∥xi −xj∥. Note that this can be pre-computed with the exception of the norm ∥w∥ that we only know at the time of an update. Similarly, for regularized logistic regression with y ∈{−1, 1}, we have ξ′ i(w) = yi/(1 + eyi⟨xi,w⟩). With the requirement on neighbors that yi = yj we get ∥α+ j −β+ j ∥≤eδij∥w∥−1 1 + e−⟨xi,w⟩∥xj∥=: ϵij(w) (24) Again, we can pre-compute δij and ∥xj∥. In addition to ξ′ i(w) we can also store ⟨xi, w⟩. ϵN-SAGA We can use these bounds in two ways. First, assuming that the iterates stay within a norm-ball (e.g. L2-ball), we can derive upper bounds ϵj(r) ≥max{ϵij(w) : j ∈Ni, ∥w∥≤r}, ϵ(r) = 1 n X j ϵj(r) . (25) Obviously, the more compact the neighborhoods are, the smaller ϵ(r). This is most useful for the analysis. Second, we can specify a target accuracy ϵ and then prune neighborhoods dynamically. This approach is more practically relevant as it allows us to directly control ϵ. However, a dynamically varying neighborhood violates Definition 1. We fix this in a sound manner by modifying the memory updates as follows: β+ j := f ′ i(w) if j ∈Ni and ϵij(w) ≤ϵ f ′ j(w) if j ∈Ni and ϵij(w) > ϵ βj otherwise (26) This allows us to interpolate between sharing more aggressively (saving computation) and performing more computations in an exact manner. In the limit of ϵ →0, we recover N-SAGA, as ϵ →ϵmax we recover the first variant mentioned. Computing Neighborhoods Note that the pairwise Euclidean distances show up in the bounds in Eq. (23) and (24). In the classification case we also require yi = yj, whereas in the ridge regression case, we also want |yi −yj| to be small. Thus modulo filtering, this suggests the use of Euclidean distances as the metric for defining neighborhoods. Standard approximation techniques for finding near(est) neighbors can be used. This comes with a computational overhead, yet the additional costs will amortize over multiple runs or multiple data analysis tasks. 4 Experimental Results Algorithms We present experimental results on the performance of the different variants of memorization algorithms for variance reduced SGD as discussed in this paper. SAGA has been uniformly superior to SVRG in our experiments, so we compare SAGA and ϵN-SAGA (from Eq. (26)), alongside with SGD as a straw man and q-SAGA as a point of reference for speed-ups. We have chosen q = 20 for q-SAGA and ϵN-SAGA. The same setting was used across all data sets and experiments. Data Sets As special cases for the choice of the loss function and regularizer in Eq. (1), we consider two commonly occurring problems in machine learning, namely least-square regression and ℓ2-regularized logistic regression. We apply least-square regression on the million song year regression from the UCI repository. This dataset contains n = 515, 345 data points, each described by d = 90 input features. We apply logistic regression on the cov and ijcnn1 datasets obtained from the libsvm website 2. The cov dataset contains n = 581, 012 data points, each described by d = 54 input features. The ijcnn1 dataset contains n = 49, 990 data points, each described by d = 22 input features. We added an ℓ2-regularizer Ω(w) = µ∥w∥2 2 to ensure the objective is strongly convex. 2http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets 6 (a) Cov (b) Ijcnn1 (c) Year epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -8 10 -6 10 -4 10 -2 10 0 SGD cst SGD SAGA q-SAGA 0N -SAGA 0 =1 0N -SAGA 0 =0.1 0N -SAGA 0 =0.01 epochs 2 4 6 8 10 Suboptimality 10 -10 10 -8 10 -6 10 -4 10 -2 10 0 SGD cst SGD SAGA q-SAGA 0N -SAGA 0 =0.1 0N -SAGA 0 =0.05 0N -SAGA 0 =0.01 epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -8 10 -6 10 -4 10 -2 10 0 SGD cst SGD SAGA q-SAGA 0N -SAGA 0 =2 0N -SAGA 0 =1 0N -SAGA 0 =0.5 µ = 10−1, gradient evaluation epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -8 10 -6 10 -4 10 -2 10 0 epochs 2 4 6 8 10 Suboptimality 10 -8 10 -6 10 -4 10 -2 10 0 epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -8 10 -6 10 -4 10 -2 10 0 µ = 10−3, gradient evaluation epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -10 10 -8 10 -6 10 -4 10 -2 10 0 epochs 2 4 6 8 10 Suboptimality 10 -10 10 -5 10 0 epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -10 10 -5 10 0 µ = 10−1, datapoint evaluation epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -10 10 -5 10 0 epochs 2 4 6 8 10 Suboptimality 10 -10 10 -5 10 0 epochs 2 4 6 8 10 12 14 16 18 Suboptimality 10 -10 10 -8 10 -6 10 -4 10 -2 10 0 µ = 10−3, datapoint evaluation Figure 1: Comparison of ϵN-SAGA, q-SAGA, SAGA and SGD (with decreasing and constant step size) on three datasets. The top two rows show the suboptimality as a function of the number of gradient evaluations for two different values of µ = 10−1, 10−3. The bottom two rows show the suboptimality as a function of the number of datapoint evaluations (i.e. number of stochastic updates) for two different values of µ = 10−1, 10−3. 7 Experimental Protocol We have run the algorithms in question in an i.i.d. sampling setting and averaged the results over 5 runs. Figure 1 shows the evolution of the suboptimality f δ of the objective as a function of two different metrics: (1) in terms of the number of update steps performed (“datapoint evaluation”), and (2) in terms of the number of gradient computations (“gradient evaluation”). Note that SGD and SAGA compute one stochastic gradient per update step unlike q-SAGA, which is included here not as a practically relevant algorithm, but as an indication of potential improvements that could be achieved by fresher corrections. A step size γ = q µn was used everywhere, except for “plain SGD”. Note that as K ≪1 in all cases, this is close to the optimal value suggested by our analysis; moreover, using a step size of ∼ 1 L for SAGA as suggested in previous work [9] did not appear to give better results. For plain SGD, we used a schedule of the form γt = γ0/t with constants optimized coarsely via cross-validation. The x-axis is expressed in units of n (suggestively called ”epochs”). SAGA vs. SGD cst As we can see, if we run SGD with the same constant step size as SAGA, it takes several epochs until SAGA really shows a significant gain. The constant step-size variant of SGD is faster in the early stages until it converges to a neighborhood of the optimum, where individual runs start showing a very noisy behavior. SAGA vs. q-SAGA q-SAGA outperforms plain SAGA quite consistently when counting stochastic update steps. This establishes optimistic reference curves of what we can expect to achieve with ϵN-SAGA. The actual speed-up is somewhat data set dependent. ϵN-SAGA vs. SAGA and q-SAGA ϵN-SAGA with sufficiently small ϵ can realize much of the possible freshness gains of q-SAGA and performs very similar for a few (2-10) epochs, where it traces nicely between the SAGA and q-SAGA curves. We see solid speed-ups on all three datasets for both µ = 0.1 and µ = 0.001. Asymptotics It should be clearly stated that running ϵN-SAGA at a fixed ϵ for longer will not result in good asymptotics on the empirical risk. This is because, as theory predicts, ϵN-SAGA can not drive the suboptimality to zero, but rather levels-off at a point determined by ϵ. In our experiments, the cross-over point with SAGA was typically after 5 −15 epochs. Note that the gains in the first epochs can be significant, though. In practice, one will either define a desired accuracy level and choose ϵ accordingly or one will switch to SAGA for accurate convergence. 5 Conclusion We have generalized variance reduced SGD methods under the name of memorization algorithms and presented a corresponding analysis, which commonly applies to all such methods. We have investigated in detail the range of safe step sizes with their corresponding geometric rates as guaranteed by our theory. This has delivered a number of new insights, for instance about the trade-offs between small (∼1 n) and large (∼ 1 4L) step sizes in different regimes as well as about the role of the freshness of stochastic gradients evaluated at past iterates. We have also investigated and quantified the effect of additional errors in the variance correction terms on the convergence behavior. Dependent on how µ scales with n, we have shown that such errors can be tolerated, yet, for small µ, may have a negative effect on the convergence rate as much smaller step sizes are needed to still guarantee convergence to a small region. We believe this result to be relevant for a number of approximation techniques in the context of variance reduced SGD. Motivated by these insights and results of our analysis, we have proposed ϵN-SAGA, a modification of SAGA that exploits similarities between training data points by defining a neighborhood system. Approximate versions of per-data point gradients are then computed by sharing information among neighbors. This opens-up the possibility of variance-reduction in a streaming data setting, where each data point is only seen once. We believe this to be a promising direction for future work. Empirically, we have been able to achieve consistent speed-ups for the initial phase of regularized risk minimization. This shows that approximate computations of variance correction terms constitutes a promising approach of trading-off computation with solution accuracy. Acknowledgments We would like to thank Yannic Kilcher, Martin Jaggi, R´emi Leblond and the anonymous reviewers for helpful suggestions and corrections. 8 References [1] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Commun. ACM, 51(1):117–122, 2008. [2] L. Bottou. Large-scale machine learning with stochastic gradient descent. In COMPSTAT, pages 177–186. Springer, 2010. [3] S. Dasgupta and K. Sinha. Randomized partition trees for nearest neighbor search. Algorithmica, 72(1):237–263, 2015. [4] A. Defazio, F. Bach, and S. Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In Advances in Neural Information Processing Systems, pages 1646–1654, 2014. [5] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [6] J. Koneˇcn`y and P. Richt´arik. Semi-stochastic gradient descent methods. arXiv preprint arXiv:1312.1666, 2013. [7] H. Robbins and S. Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951. [8] M. Schmidt. Convergence rate of stochastic gradient with constant step size. UBC Technical Report, 2014. [9] M. Schmidt, N. L. Roux, and F. Bach. Minimizing finite sums with the stochastic average gradient. arXiv preprint arXiv:1309.2388, 2013. [10] S. Shalev-Shwartz, Y. Singer, N. Srebro, and A. Cotter. Pegasos: Primal estimated sub-gradient solver for SVM. Mathematical programming, 127(1):3–30, 2011. [11] 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. 9 | 2015 | 372 |
5,894 | On Elicitation Complexity Rafael Frongillo University of Colorado, Boulder raf@colorado.edu Ian A. Kash Microsoft Research iankash@microsoft.com Abstract Elicitation is the study of statistics or properties which are computable via empirical risk minimization. While several recent papers have approached the general question of which properties are elicitable, we suggest that this is the wrong question—all properties are elicitable by first eliciting the entire distribution or data set, and thus the important question is how elicitable. Specifically, what is the minimum number of regression parameters needed to compute the property? Building on previous work, we introduce a new notion of elicitation complexity and lay the foundations for a calculus of elicitation. We establish several general results and techniques for proving upper and lower bounds on elicitation complexity. These results provide tight bounds for eliciting the Bayes risk of any loss, a large class of properties which includes spectral risk measures and several new properties of interest. 1 Introduction Empirical risk minimization (ERM) is a domininant framework for supervised machine learning, and a key component of many learning algorithms. A statistic or property is simply a functional assigning a vector of values to each distribution. We say that such a property is elicitable, if for some loss function it can be represented as the unique minimizer of the expected loss under the distribution. Thus, the study of which properties are elicitable can be viewed as the study of which statistics are computable via ERM [1, 2, 3]. The study of property elicitation began in statistics [4, 5, 6, 7], and is gaining momentum in machine learning [8, 1, 2, 3], economics [9, 10], and most recently, finance [11, 12, 13, 14, 15]. A sequence of papers starting with Savage [4] has looked at the full characterization of losses which elicit the mean of a distribution, or more generally the expectation of a vector-valued random variable [16, 3]. The case of real-valued properties is also now well in hand [9, 1]. The general vector-valued case is still generally open, with recent progress in [3, 2, 15]. Recently, a parallel thread of research has been underway in finance, to understand which financial risk measures, among several in use or proposed to help regulate the risks of financial institutions, are computable via regression, i.e., elicitable (cf. references above). More often than not, these papers have concluded that most risk measures under consideration are not elicitable, notable exceptions being generalized quantiles (e.g. value-at-risk, expectiles) and expected utility [13, 12]. Throughout the growing momentum of the study of elicitation, one question has been central: which properties are elicitable? It is clear, however, that all properties are “indirectly” elicitable if one first elicits the distribution using a standard proper scoring rule. Therefore, in the present work, we suggest replacing this question with a more nuanced one: how elicitable are various properties? Specifically, heeding the suggestion of Gneiting [7], we adapt to our setting the notion of elicitation complexity introduced by Lambert et al. [17], which captures how many parameters one needs to maintain in an ERM procedure for the property in question. Indeed, if a real-valued property is found not to be elicitable, such as the variance, one should not abandon it, but rather ask how many parameters are required to compute it via ERM. 1 Our work is heavily inspired by the recent progress along these lines of Fissler and Ziegel [15], who show that spectral risk measures of support k have elicitation complexity at most k + 1. Spectral risk measures are among those under consideration in the finance community, and this result shows that while not elicitable in the classical sense, their elicitation complexity is still low, and hence one can develop reasonable regression procedures for them. Our results extend to these and many other risk measures (see § 4.6), often providing matching lower bounds on the complexity as well. Our contributions are the following. We first introduce an adapted definition of elicitation complexity which we believe to be the right notion to focus on going forward. We establish a few simple but useful results which allow for a kind of calculus of elicitation; for example, conditions under which the complexity of eliciting two properties in tandem is the sum of their individual complexities. In § 3, we derive several techniques for proving both upper and lower bounds on elicitation complexity which apply primarily to the Bayes risks from decision theory, or optimal expected loss functions. The class includes spectral risk measures among several others; see § 4. We conclude with brief remarks and open questions. 2 Preliminaries and Foundation Let Ωbe a set of outcomes and P ⊆∆(Ω) be a convex set of probability measures. The goal of elicitation is to learn something about the distribution p ∈P, specifically some function Γ(p) such as the mean or variance, by minimizing a loss function. Definition 1. A property is a function Γ : P →Rk, for some k ∈N, which associates a desired report value to each distribution.1 We let Γr .= {p ∈P | r = Γ(p)} denote the set of distributions p corresponding to report value r. Given a property Γ, we want to ensure that the best result is to reveal the value of the property using a loss function that evaluates the report using a sample from the distribution. Definition 2. A loss function L : Rk × Ω→R elicits a property Γ : P →Rk if for all p ∈P, Γ(p) = arginfr L(r, p), where L(r, p) .= Ep[L(r, ·)]. A property is elicitable if some loss elicits it. For example, when Ω= R, the mean Γ(p) = Ep[ω] is elicitable via squared loss L(r, ω) = (r−ω)2. A well-known necessary condition for elicitability is convexity of the level sets of Γ. Proposition 1 (Osband [5]). If Γ is elicitable, the level sets Γr are convex for all r ∈Γ(P). One can easily check that the mean Γ(p) = Ep[ω] has convex level sets, yet the variance Γ(p) = Ep[(ω −Ep[ω])2] does not, and hence is not elicitable [9]. It is often useful to work with a stronger condition, that not only is Γr convex, but it is the intersection of a linear subspace with P. This condition is equivalent the existence of an identification function, a functional describing the level sets of Γ [17, 1]. Definition 3. A function V : R×Ω→Rk is an identification function for Γ : P →Rk, or identifies Γ, if for all r ∈Γ(P) it holds that p ∈Γr ⇐⇒V (r, p) = 0 ∈Rk, where as with L(r, p) above we write V (r, p) .= Ep[V (r, ω)]. Γ is identifiable if there exists a V identifying it. One can check for example that V (r, ω) = ω −r identifies the mean. We can now define the classes of identifiable and elicitable properties, along with the complexity of identifying or eliciting a given property. Naturally, a property is k-identifiable if it is the link of a k-dimensional identifiable property, and k-elicitable if it is the link of a k-dimensional elicitable property. The elicitation complexity of a property is then simply the minimum dimension k needed for it to be k-elicitable. Definition 4. Let Ik(P) denote the class of all identifiable properties Γ : P →Rk, and Ek(P) denote the class of all elicitable properties Γ : P →Rk. We write I(P) = S k∈N Ik(P) and E(P) = S k∈N Ek(P). Definition 5. A property Γ is k-identifiable if there exists ˆΓ ∈Ik(P) and f such that Γ = f ◦ˆΓ. The identification complexity of Γ is defined as iden(Γ) = min{k : Γ is k-identifiable}. 1We will also consider Γ : P →RN. 2 Definition 6. A property Γ is k-elicitable if there exists ˆΓ ∈Ek(P) and f such that Γ = f ◦ˆΓ. The elicitation complexity of Γ is defined as elic(Γ) = min{k : Γ is k-elicitable}. To make the above definitions concrete, recall that the variance σ2(p) = Ep[(Ep[ω]−ω)2] is not elicitable, as its level sets are not convex, a necessary condition by Prop. 1. Note however that we may write σ2(p) = Ep[ω2]−Ep[ω]2, which can be obtained from the property ˆΓ(p) = (Ep[ω], Ep[ω2]). It is well-known [4, 7] that ˆΓ is both elicitable and identifiable as the expectation of a vector-valued random variable X(ω) = (ω, ω2), using for example L(r, ω) = ∥r−X(ω)∥2 and V (r, ω) = r−X(ω). Thus, we can recover σ2 as a link of the elicitable and identifiable ˆΓ : P →R2, and as no such ˆΓ : P →R exists, we have iden(σ2) = elic(σ2) = 2. In this example, the variance has a stronger property than merely being 2-identifiable and 2elicitable, namely that there is a single ˆΓ that satisfies both of these simultaneously. In fact this is quite common, and identifiability provides geometric structure that we make use of in our lower bounds. Thus, most of our results use this refined notion of elicitation complexity. Definition 7. A property Γ has (identifiable) elicitation complexity elicI(Γ) = min{k : ∃ˆΓ, f such that ˆΓ ∈Ek(P) ∩Ik(P) and Γ = f ◦ˆΓ}. Note that restricting our attention to elicI effectively requires elicI(Γ) ≥iden(Γ); specifically, if Γ is derived from some elicitable ˆΓ, then ˆΓ must be identifiable as well. This restriction is only relevant for our lower bounds, as our upper bounds give losses explicitly.2 Note however that some restriction on Ek(P) is necessary, as otherwise pathological constructions giving injective mappings from R to Rk would render all properties 1-elicitable. To alleviate this issue, some authors require continuity (e.g. [1]) while others like we do require identifiability (e.g. [15]), which can be motivated by the fact that for any differentiable loss L for Γ, V (r, ω) = ∇rL(·, ω) will identify Γ provided Ep[L] has no inflection points or local minima. An important future direction is to relax this identifiability assumption, as there are very natural (set-valued) properties with iden > elic.3 Our definition of elicitation complexity differs from the notion proposed by Lambert et al. [17], in that the components of ˆΓ above do not need to be individually elicitable. This turns out to have a large impact, as under their definition the property Γ(p) = maxω∈Ωp({ω}) for finite Ωhas elicitation complexity |Ω| −1, whereas under our definition elicI(Γ) = 2; see Example 4.3. Fissler and Ziegel [15] propose a closer but still different definition, with the complexity being the smallest k such that Γ is a component of a k-dimensional elicitable property. Again, this definition can lead to larger complexities than necessary; take for example the squared mean Γ(p) = Ep[ω]2 when Ω= R, which has elicI(Γ) = 1 with ˆΓ(p) = Ep[ω] and f(x) = x2, but is not elicitable and thus has complexity 2 under [15]. We believe that, modulo regularity assumptions on Ek(P), our definition is better suited to studying the difficulty of eliciting properties: viewing f as a (potentially dimensionreducing) link function, our definition captures the minimum number of parameters needed in an ERM computation of the property in question, followed by a simple one-time application of f. 2.1 Foundations of Elicitation Complexity In the remainder of this section, we make some simple, but useful, observations about iden(Γ) and elicI(Γ). We have already discussed one such observation after Definition 7: elicI(Γ) ≥iden(Γ). It is natural to start with some trivial upper bounds. Clearly, whenever p ∈P can be uniquely determined by some number of elicitable parameters then the elicitation complexity of every property is at most that number. The following propositions give two notable applications of this observation.4 Proposition 2. When |Ω| = n, every property Γ has elicI(Γ) ≤n −1. Proof. The probability distribution is determined by the probability of any n −1 outcomes, and the probability associated with a given outcome is both elicitable and identifiable. 2Our main lower bound (Thm 2) merely requires Γ to have convex level sets, which is necessary by Prop. 1. 3One may take for example Γ(p) = argmaxi p(Ai) for a finite measurable partition A1, . . . , An of Ω. 4Note that these restrictions on Ωmay easily be placed on P instead; e.g. finite Ωis equivalent to P having support on a finite subset of Ω, or even being piecewise constant on some disjoint events. 3 Proposition 3. When Ω= R,5 every property Γ has elicI(Γ) ≤ω (countable).6 One well-studied class of properties are those where Γ is linear, i.e., the expectation of some vectorvalued random variable. All such properties are elicitable and identifiable (cf. [4, 8, 3]), with elicI(Γ) ≤k, but of course the complexity can be lower if the range of Γ is not full-dimensional. Lemma 1. Let X : Ω→Rk be P-integrable and Γ(p) = Ep[X]. Then elicI(Γ) = dim(affhull(Γ(P))), the dimension of the affine hull of the range of Γ. It is easy to create redundant properties in various ways. For example, given elicitable properties Γ1 and Γ2 the property Γ .= {Γ1, Γ2, Γ1 + Γ2} clearly contains redundant information. A concrete case is Γ = {mean squared, variance, 2nd moment}, which, as we have seen, has elicI(Γ) = 2. The following definitions and lemma capture various aspects of a lack of such redundancy. Definition 8. Property Γ : P →Rk in I(P) is of full rank if iden(Γ) = k. Note that there are two ways for a property to fail to be full rank. First, as the examples above suggest, Γ can be “redundant” so that it is a link of a lower-dimensional identifiable property. Full rank can also be violated if more dimensions are needed to identify the property than to specify it. This is the case with, e.g., the variance which is a 1 dimensional property but has iden(σ2) = 2. Definition 9. Properties Γ, Γ′ ∈I(P) are independent if iden({Γ, Γ′}) = iden(Γ) + iden(Γ′). Lemma 2. If Γ, Γ′ ∈E(P) are full rank and independent, then elicI({Γ, Γ′}) = elicI(Γ)+elicI(Γ′). To illustrate the lemma, elicI(variance) = 2, yet Γ = {mean,variance} has elicI(Γ) = 2, so clearly the mean and variance are not both independent and full rank. (As we have seen, variance is not full rank.) However, the mean and second moment satisfy both by Lemma 1. Another important case is when Γ consists of some number of distinct quantiles. Osband [5] essentially showed that quantiles are independent and of full rank, so their elicitation complexity is the number of quantiles being elicited. Lemma 3. Let Ω= R and P be a class of probability measures with continuously differentiable and invertible CDFs F, which is sufficiently rich in the sense that for all x1, . . . , xk ∈R, span({F −1(x1), . . . , F −1(xk)}, F ∈P) = Rk. Let qα, denote the α-quantile function. Then if α1, . . . , αk are all distinct, Γ = {qα1, . . . , qαk} has elicI(Γ) = k. The quantile example in particular allows us to see that all complexity classes, including ω, are occupied. In fact, our results to follow will show something stronger: even for real-valued properties Γ : P →R, all classes are occupied; we give here the result that follows from our bounds on spectral risk measures in Example 4.4, but this holds for many other P; see e.g. Example 4.2. Proposition 4. Let P as in Lemma 3. Then for all k ∈N there exists γ : P →R with elicI(γ) = k. 3 Eliciting the Bayes Risk In this section we prove two theorems that provide our main tools for proving upper and lower bounds respectively on elicitation complexity. Of course many properties are known to be elicitable, and the losses that elicit them provide such an upper bound for that case. We provide such a construction for properties that can be expressed as the pointwise minimum of an indexed set of functions. Interestingly, our construction does not elicit the minimum directly, but as a joint elicitation of the value and the function that realizes this value. The form (1) is that of a scoring rule for the linear property p 7→Ep[Xa], except that here the index a itself is also elicited.7 Theorem 1. Let {Xa : Ω→R}a∈A be a set of P-integrable functions indexed by A ⊆Rk. Then if infa Ep[Xa] is attained, the property γ(p) = mina Ep[Xa] is (k + 1)-elicitable. In particular, L((r, a), ω) = H(r) + h(r)(Xa −r) (1) elicits p 7→{(γ(p), a) : Ep[Xa]=γ(p)} for any strictly decreasing h : R →R+ with d drH = h. 5Here and throughout, when Ω= Rk we assume the Borel σ-algebra. 6Omitted proofs can be found in the appendix of the full version of this paper. 7As we focus on elicitation complexity, we have not tried to characterize all ways to elicit this joint property, or other properties we give explicit losses for. See § 4.1 for an example where additional losses are possible. 4 Proof. We will work with gains instead of losses, and show that S((r, a), ω) = g(r) + dgr(Xa −r) elicits p 7→{(γ(p), a) : Ep[Xa] = γ(p)} for γ(p) = maxa Ep[Xa]. Here g is convex with strictly increasing and positive subgradient dg. For any fixed a, we have by the subgradient inequality, S((r, a), p) = g(r) + dgr(Ep[Xa] −r) ≤g(Ep[Xa]) = S((Ep[Xa], a), p) , and as dg is strictly increasing, g is strictly convex, so r = Ep[Xa] is the unique maximizer. Now letting ˜S(a, p) = S((Ep[Xa], a), p), we have argmax a∈A ˜S(a, p) = argmax a∈A g(Ep[Xa]) = argmax a∈A Ep[Xa] , because g is strictly increasing. We now have argmax a∈A,r∈R S((r, a), p) = (Ep[Xa], a) : a ∈argmax a∈A Ep[Xa] . One natural way to get such an indexed set of functions is to take an arbitrary loss function L(r, ω), in which case this pointwise minimum corresponds to the Bayes risk, which is simply the minimum possible expected loss under some distribution p. Definition 10. Given loss function L : A × Ω→R on some prediction set A, the Bayes risk of L is defined as L(p) := infa∈A L(a, p). One illustration of the power of Theorem 1 is that the Bayes risk of a loss eliciting a k-dimensional property is itself (k + 1)-elicitable. Corollary 1. If L : Rk × Ω→R is a loss function eliciting Γ : P →Rk, then the loss L((r, a), ω) = L′(a, ω) + H(r) + h(r)(L(a, ω) −r) (2) elicits {L, Γ}, where h : R →R+ is any positive strictly decreasing function, H(r) = R r 0 h(x)dx, and L′ is any surrogate loss eliciting Γ.8 If Γ ∈Ik(P), elicI(L) ≤k + 1. We now turn to our second theorem which provides lower bounds for the elicitation complexity of the Bayes risk. A first observation, which follows from standard convex analysis, is that L is concave, and thus it is unlikely to be elicitable directly, as the level sets of L are likely to be nonconvex. To show a lower bound greater than 1, however, we will need much stronger techniques. In particular, while L must be concave, it may not be strictly so, thus enabling level sets which are potentially amenable to elicitation. In fact, L must be flat between any two distributions which share a minimizer. Crucial to our lower bound is the fact that whenever the minimizer of L differs between two distributions, L is essentially strictly concave between them. Lemma 4. Suppose loss L with Bayes risk L elicits Γ : P →Rk. Then for any p, p′ ∈P with Γ(p) ̸= Γ(p′), we have L(λp + (1 −λ)p′) > λL(p) + (1 −λ)L(p′) for all λ ∈(0, 1). With this lemma in hand we can prove our lower bound. The crucial insight is that an identification function for the Bayes risk of a loss eliciting a property can, through a link, be used to identify that property. Corollary 1 tells us that k + 1 parameters suffice for the Bayes risk of a k-dimensional property, and our lower bound shows this is often necessary. Only k parameters suffice, however, when the property value itself provides all the information required to compute the Bayes risk; for example, dropping the y2 term from squared loss gives L(x, y) = x2 −2xy and L(p) = −Ep[y]2, giving elic(L) = 1. Thus the theorem splits the lower bound into two cases. Theorem 2. If a loss L elicits some Γ ∈Ek(P) with elicitation complexity elicI(Γ) = k, then its Bayes risk L has elicI(L) ≥k. Moreover, if we can write L = f ◦Γ for some function f : Rk →R, then we have elicI(L) = k; otherwise, elicI(L) = k + 1. Proof. Let ˆΓ ∈Eℓsuch that L = g ◦ˆΓ for some g : Rℓ→R. 8Note that one could easily lift the requirement that Γ be a function, and allow Γ(p) to be the set of minimizers of the loss (cf. [18]). We will use this additional power in Example 4.4. 5 We show by contradiction that for all p, p′ ∈P, ˆΓ(p) = ˆΓ(p′) implies Γ(p) = Γ(p′). Otherwise, we have p, p′ with ˆΓ(p) = ˆΓ(p′), and thus L(p) = L(p′), but Γ(p) ̸= Γ(p′). Lemma 4 would then give us some pλ = λp + (1 −λ)p′ with L(pλ) > L(p). But as the level sets ˆΓˆr are convex by Prop. 1, we would have ˆΓ(pλ) = ˆΓ(p), which would imply L(pλ) = L(p). We now can conclude that there exists h : Rℓ→Rk such that Γ = h◦ˆΓ. But as ˆΓ ∈Eℓ, this implies elicI(Γ) ≤ℓ, so clearly we need ℓ≥k. Finally, if ℓ= k we have L = g ◦ˆΓ = g ◦h−1 ◦Γ. The upper bounds follow from Corollary 1. 4 Examples and Applications We now give several applications of our results. Several upper bounds are novel, as well as all lower bounds greater than 2. In the examples, unless we refer to Ωexplicitly we will assume Ω= R and write y ∈Ωso that y ∼p. In each setting, we also make several standard regularity assumptions which we suppress for ease of exposition — for example, for the variance and variantile we assume finite first and second moments (which must span R2), and whenever we discuss quantiles we will assume that P is as in Lemma 3, though we will not require as much regularity for our upper bounds. 4.1 Variance In Section 2 we showed that elicI(σ2) = 2. As a warm up, let us see how to recover this statement using our results on the Bayes risk. We can view σ2 as the Bayes risk of squared loss L(x, y) = (x− y)2, which of course elicits the mean: L(p) = minx∈R Ep[(x −y)2] = Ep[(Ep[y] −y)2] = σ2(p). This gives us elicI(σ2) ≤2 by Corollary 1, with a matching lower bound by Theorem 2, as the variance is not simply a function of the mean. Corollary 1 gives losses such as L((x, v), y) = e−v((x −y)2 −v) −e−v which elict {Ep[y], σ2(p)}, but in fact there are losses which cannot be represented by the form (2), showing that we do not have a full characterization; for example, ˆL((x, v), y) = v2 + v(x −y)(2(x + y) + 1) + (x −y)2 (x + y)2 + x + y + 1 . This ˆL was generated via squared loss
z − h y y2 i
2 with respect to the norm ∥z∥2 = z⊤h 1 −1/2 −1/2 1 i z, which elicits the first two moments, and link function (z1, z2) 7→(z1, z2 −z2 1). 4.2 Convex Functions of Means Another simple example is γ(p) = G(Ep[X]) for some strictly convex function G : Rk →R and P-integrable X : Ω→Rk. To avoid degeneracies, we assume dim affhull{Ep[X] : p ∈P} = k, i.e. Γ is full rank. Letting {dGp}p∈P be a selection of subgradients of G, the loss L(r, ω) = −(G(r) + dGr(X(ω) −r)) elicits Γ : p 7→Ep[X] (cf. [3]), and moreover we have γ(p) = −L(p). By Lemma 1, elicI(Γ) = k. One easily checks that L = G ◦Γ, so now by Theorem 2, elicI(γ) = k as well. Letting {Xk}k∈N be a family of such “full rank” random variables, this gives us a sequence of real-valued properties γk(p) = ∥Ep[X]∥2 with elicI(γk) = k, proving Proposition 4. 4.3 Modal Mass With Ω= R consider the property γβ(p) = maxx∈R p([x −β, x + β]), namely, the maximum probability mass contained in an interval of width 2β. Theorem 1 easily shows elicI(γβ) ≤2, as ˆγβ(p) = argmaxx∈R p([x −β, x + β]) is elicited by L(x, y) = 1|x−y|>β, and γβ(p) = 1 − L(p). Similarly, in the case of finite Ω, γ(p) = maxω∈Ωp({ω}) is simply the expected score (gain rather than loss) of the mode γ(p) = argmaxω∈Ωp({ω}), which is elicitable for finite Ω(but not otherwise; see Heinrich [19]). In both cases, one can easily check that the level sets of γ are not convex, so elicI(γ) = 2; alternatively Theorem 2 applies in the first case. As mentioned following Definition 6, the result for finite Ωdiffers from the definitions of Lambert et al. [17], where the elicitation complexity of γ is |Ω|−1. 6 4.4 Expected Shortfall and Other Spectral Risk Measures One important application of our results on the elicitation complexity of the Bayes risk is the elicitability of various financial risk measures. One of the most popular financial risk measures is expected shortfall ESα : P →R, also called conditional value at risk (CVaR) or average value at risk (AVaR), which we define as follows (cf. [20, eq.(18)], [21, eq.(3.21)]): ESα(p) = inf z∈R Ep 1 α(z −y)1z≥y −z = inf z∈R Ep 1 α(z −y)(1z≥y −α) −y . (3) Despite the importance of elicitability to financial regulation [11, 22], ESα is not elicitable [7]. It was recently shown by Fissler and Ziegel [15], however, that elicI(ESα) = 2. They also consider the broader class of spectral risk measures, which can be represented as ρµ(p) = R [0,1] ESα(p)dµ(α), where µ is a probability measure on [0, 1] (cf. [20, eq. (36)]). In the case where µ has finite support µ = Pk i=1 βiδαi for point distributions δ, βi > 0, we can rewrite ρµ using the above as: ρµ(p) = k X i=1 βiESαi(p) = inf z∈Rk ( Ep " k X i=1 βi αi (zi −y)(1zi≥y −αi) −y #) . (4) They conclude elicI(ρµ) ≤k + 1 unless µ({1}) = 1 in which case elicI(ρµ) = 1. We show how to recover these results together with matching lower bounds. It is well-known that the infimum in eq. (4) is attained by any of the k quantiles in qα1(p), . . . , qαk(p), so we conclude elicI(ρµ) ≤k +1 by Theorem 1, and in particular the property {ρµ, qα1, . . . , qαk} is elicitable. The family of losses from Corollary 1 coincide with the characterization of Fissler and Ziegel [15] (see § D.1). For a lower bound, as elicI({qα1, . . . , qαk}) = k whenever the αi are distinct by Lemma 3, Theorem 2 gives us elicI(ρµ) = k + 1 whenever µ({1}) < 1, and of course elicI(ρµ) = 1 if µ({1}) = 1. 4.5 Variantile The τ-expectile, a type of generalized quantile introduced by Newey and Powell [23], is defined as the solution x = µτ to the equation Ep [|1x≥y −τ|(x −y)] = 0. (This also shows µτ ∈I1.) Here we propose the τ-variantile, an asymmetric variance-like measure with respect to the τ-expectile: just as the mean is the solution x = µ to the equation Ep[x −y] = 0, and the variance is σ2(p) = Ep[(µ −y)2], we define the τ-variantile σ2 τ by σ2 τ(p) = Ep |1µτ ≥y −τ|(µτ −y)2 . It is well-known that µτ can be expressed as the minimizer of a asymmetric least squares problem: the loss L(x, y) = |1x≥y −τ|(x −y)2 elicits µτ [23, 7]. Hence, just as the variance turned out to be a Bayes risk for the mean, so is the τ-variantile for the τ-expectile: µτ = argmin x∈R Ep |1x≥y −τ|(x −y)2 =⇒ σ2 τ = min x∈R Ep |1x≥y −τ|(x −y)2 . We now see the pair {µτ, σ2 τ} is elicitable by Corollary 1, and by Theorem 2 we have elicI(σ2 τ) = 2. 4.6 Deviation and Risk Measures Rockafellar and Uryasev [21] introduce “risk quadrangles” in which they relate a risk R, deviation D, error E, and a statistic S, all functions from random variables to the reals, as follows: R(X) = min C {C + E(X −C)}, D(X) = min C {E(X −C)}, S(X) = argmin C {E(X −C)} . Our results provide tight bounds for many of the risk and deviation measures in their paper. The most immediate case is the expectation quadrangle case, where E(X) = E[e(X)] for some e : R →R. In this case, if S(X) ∈I1(P) Theorem 2 implies elicI(R) = elicI(D) = 2 provided S is nonconstant and e non-linear. This includes several of their examples, e.g. truncated mean, log-exp, and rate-based. Beyond the expectation case, the authors show a Mixing Theorem, where they consider D(X) = min C min B1,..,Bk ( k X i=1 λiEi(X −C −Bi) X i λiBi = 0 ) = min B′ 1,..,B′ k ( k X i=1 λiEi(X −B′ i) ) . Once again, if the Ei are all of expectation type and Si ∈I1, Theorem 1 gives elicI(D) = elicI(R) ≤k + 1, with a matching lower bound from Theorem 2 provided the Si are all independent. The Reverting Theorem for a pair E1, E2 can be seen as a special case of the above where 7 one replaces E2(X) by E2(−X). Consequently, we have tight bounds for the elicitation complexity of several other examples, including superquantiles (the same as spectral risk measures), the quantile-radius quadrangle, and optimized certainty equivalents of Ben-Tal and Teboulle [24]. Our results offer an explaination for the existence of regression procedures for some of these risk/deviation measures. For example, a proceedure called superquantile regression was introduced in Rockafellar et al. [25], which computes spectral risk measures. In light of Theorem 1, one could interpret their procedure as simply performing regression on the k different quantiles as well as the Bayes risk. In fact, our results show that any risk/deviation generated by mixing several expectation quadrangles will have a similar procedure, in which the B′ i variables are simply computed along side the measure of interest. Even more broadly, such regression procedures exist for any Bayes risk. 5 Discussion We have outlined a theory of elicitation complexity which we believe is the right notion of complexity for ERM, and provided techniques and results for upper and lower bounds. In particular, we now have tight bounds for the large class of Bayes risks, including several applications of note such as spectral risk measures. Our results also offer an explanation for why procedures like superquantile regression are possible, and extend this logic to all Bayes risks. There many natural open problems in elicitation complexity. Perhaps the most apparent are the characterizations of the complexity classes {Γ : elic(Γ) = k}, and in particular, determining the elicitation complexity of properties which are known to be non-elicitabile, such as the mode [19] and smallest confidence interval [18]. In this paper we have focused on elicitation complexity with respect to the class of identifiable properties I, which we denoted elicI. This choice of notation was deliberate; one may define elicC := min{k : ∃ˆΓ ∈Ek ∩C, ∃f, Γ = f ◦ˆΓ} to be the complexity with respect to some arbitrary class of properties C. Some examples of interest might be elicE for expected values, of interest to the prediction market literature [8], and eliccvx for properties elicitable by a loss which is convex in r, of interest for efficiently performing ERM. Another interesting line of questioning follows from the notion of conditional elicitation, properties which are elicitable as long as the value of some other elicitable property is known. This notion was introduced by Emmer et al. [11], who showed that the variance and expected shortfall are both conditionally elicitable, on Ep[y] and qα(p) respectively. Intuitively, knowing that Γ is elicitable conditional on an elicitable Γ′ would suggest that perhaps the pair {Γ, Γ′} is elicitable; Fissler and Ziegel [15] note that it is an open question whether this joint elicitability holds in general. The Bayes risk L for Γ is elicitable conditioned on Γ, and as we saw above, the pair {Γ, L} is jointly elicitable as well. We give a counter-example in Figure 1, however, which also illustrates the subtlety of characterizing all elicitable properties. p1 p2 p3 p1 p2 p3 Figure 1: Depictions of the level sets of two properties, one elicitable and the other not. The left is a Bayes risk together with its property, and thus elicitable, while the right is shown in [3] not to be elicitable. Here the planes are shown to illustrate the fact that these are both conditionally elicitable: the height of the plane (the intersept (p3, 0, 0) for example) is elicitable from the characterizations for scalar properties [9, 1], and conditioned on the plane, the properties are both linear and thus links of expected values, which are also elicitable. 8 References [1] Ingo Steinwart, Chlo Pasin, Robert Williamson, and Siyu Zhang. Elicitation and Identification of Properties. In Proceedings of The 27th Conference on Learning Theory, pages 482–526, 2014. [2] A. Agarwal and S. Agrawal. On Consistent Surrogate Risk Minimization and Property Elicitation. In COLT, 2015. [3] Rafael Frongillo and Ian Kash. Vector-Valued Property Elicitation. In Proceedings of the 28th Conference on Learning Theory, pages 1–18, 2015. [4] L.J. Savage. Elicitation of personal probabilities and expectations. Journal of the American Statistical Association, pages 783–801, 1971. [5] Kent Harold Osband. Providing Incentives for Better Cost Forecasting. University of California, Berkeley, 1985. [6] T. Gneiting and A.E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007. [7] T. Gneiting. Making and Evaluating Point Forecasts. Journal of the American Statistical Association, 106(494):746–762, 2011. [8] J. Abernethy and R. Frongillo. A characterization of scoring rules for linear properties. In Proceedings of the 25th Conference on Learning Theory, pages 1–27, 2012. [9] N.S. Lambert. Elicitation and Evaluation of Statistical Forecasts. Preprint, 2011. [10] N.S. Lambert and Y. Shoham. Eliciting truthful answers to multiple-choice questions. In Proceedings of the 10th ACM conference on Electronic commerce, pages 109–118, 2009. [11] Susanne Emmer, Marie Kratz, and Dirk Tasche. What is the best risk measure in practice? A comparison of standard measures. arXiv:1312.1645 [q-fin], December 2013. arXiv: 1312.1645. [12] Fabio Bellini and Valeria Bignozzi. Elicitable risk measures. This is a preprint of an article accepted for publication in Quantitative Finance (doi 10.1080/14697688.2014. 946955), 2013. [13] Johanna F. Ziegel. Coherence and elicitability. Mathematical Finance, 2014. arXiv: 1303.1690. [14] Ruodu Wang and Johanna F. Ziegel. Elicitable distortion risk measures: A concise proof. Statistics & Probability Letters, 100:172–175, May 2015. [15] Tobias Fissler and Johanna F. Ziegel. Higher order elicitability and Osband’s principle. arXiv:1503.08123 [math, q-fin, stat], March 2015. arXiv: 1503.08123. [16] A. Banerjee, X. Guo, and H. Wang. On the optimality of conditional expectation as a Bregman predictor. IEEE Transactions on Information Theory, 51(7):2664–2669, July 2005. [17] N.S. Lambert, D.M. Pennock, and Y. Shoham. Eliciting properties of probability distributions. In Proceedings of the 9th ACM Conference on Electronic Commerce, pages 129–138, 2008. [18] Rafael Frongillo and Ian Kash. General truthfulness characterizations via convex analysis. In Web and Internet Economics, pages 354–370. Springer, 2014. [19] C. Heinrich. The mode functional is not elicitable. Biometrika, page ast048, 2013. [20] Hans Fllmer and Stefan Weber. The Axiomatic Approach to Risk Measures for Capital Determination. Annual Review of Financial Economics, 7(1), 2015. [21] R. Tyrrell Rockafellar and Stan Uryasev. The fundamental risk quadrangle in risk management, optimization and statistical estimation. Surveys in Operations Research and Management Science, 18(1):33–53, 2013. [22] Tobias Fissler, Johanna F. Ziegel, and Tilmann Gneiting. Expected Shortfall is jointly elicitable with Value at Risk - Implications for backtesting. arXiv:1507.00244 [q-fin], July 2015. arXiv: 1507.00244. [23] Whitney K. Newey and James L. Powell. Asymmetric least squares estimation and testing. Econometrica: Journal of the Econometric Society, pages 819–847, 1987. [24] Aharon Ben-Tal and Marc Teboulle. AN OLD-NEW CONCEPT OF CONVEX RISK MEASURES: THE OPTIMIZED CERTAINTY EQUIVALENT. Mathematical Finance, 17(3):449–476, 2007. [25] R. T. Rockafellar, J. O. Royset, and S. I. Miranda. Superquantile regression with applications to buffered reliability, uncertainty quantification, and conditional value-at-risk. European Journal of Operational Research, 234:140–154, 2014. 9 | 2015 | 373 |
5,895 | Learning with Relaxed Supervision Jacob Steinhardt Stanford University jsteinhardt@cs.stanford.edu Percy Liang Stanford University pliang@cs.stanford.edu Abstract For weakly-supervised problems with deterministic constraints between the latent variables and observed output, learning necessitates performing inference over latent variables conditioned on the output, which can be intractable no matter how simple the model family is. Even finding a single latent variable setting that satisfies the constraints could be difficult; for instance, the observed output may be the result of a latent database query or graphics program which must be inferred. Here, the difficulty lies in not the model but the supervision, and poor approximations at this stage could lead to following the wrong learning signal entirely. In this paper, we develop a rigorous approach to relaxing the supervision, which yields asymptotically consistent parameter estimates despite altering the supervision. Our approach parameterizes a family of increasingly accurate relaxations, and jointly optimizes both the model and relaxation parameters, while formulating constraints between these parameters to ensure efficient inference. These efficiency constraints allow us to learn in otherwise intractable settings, while asymptotic consistency ensures that we always follow a valid learning signal. 1 Introduction We are interested in the problem of learning from intractable supervision. For example, for a question answering application, we might want to learn a semantic parser that maps a question x (e.g., “Which president is from Arkansas?”) to a logical form z (e.g., USPresident(e) ∧ PlaceOfBirth(e, Arkansas)) that executes to the answer y (e.g., BillClinton). If we are only given (x, y) pairs as training data [1, 2, 3], then even if the model pθ(z | x) is tractable, it is still intractable to incorporate the hard supervision constraint [S(z, y) = 1] since z and y live in a large space and S(z, y) can be complex (e.g., S(z, y) = 1 iff z executes to y on a database). In addition to semantic parsing, intractable supervision also shows up in inverse graphics [4, 5, 6], relation extraction [7, 8], program induction [9], and planning tasks with complex, long-term goals [10]. As we scale to weaker supervision and richer output spaces, such intractabilities will become the norm. One can handle the intractable constraints in various ways: by relaxing them [11], by applying them in expectation [12], or by using approximate inference [8]. However, as these constraints are part of the supervision rather than the model, altering them can fundamentally change the learning process; this raises the question of when such approximations are faithful enough to learn a good model. In this paper, we propose a framework that addresses these questions formally, by constructing a relaxed supervision function with well-characterized statistical and computational properties. Our approach is sketched in Figure 1: we start with an intractable supervision function q∞(y | z) (given by the constraint S), together with a model family pθ(z | x). We then replace q∞by a family of functions qβ(y | z) which contains q∞, giving rise to a joint model pθ,β(y, z | x). We ensure tractability of inference by constraining pθ(z | x) and pθ,β(z | x, y) to stay close together, so that the supervision y is never too surprising to the model. Finally, we optimize θ and β subject to this tractability constraint; when qβ(y | z) is properly normalized, there is always pressure to use the true 1 tractable region intractable region θ β learning trajectory less accurate more accurate less exact more exact Figure 1: Sketch of our approach; we define a family of relaxations qβ of the supervision, and then jointly optimize both θ and β. If the supervision qβ is too harsh relative to the accuracy of the current model pθ, inference becomes intractable. In Section 4, we formulate constraints to avoid this intractable region and learn within the tractable region. supervision q∞, and we can prove that the global optimum of pθ,β is an asymptotically consistent estimate of the true model. Section 2 introduces the relaxed supervision model qβ(y | z) ∝exp(β⊤ψ(z, y)), where ψ(z, y) = 0 iff the constraint S(z, y) is satisfied (the original supervision is then obtained when β = ∞). Section 3 studies the statistical properties of this relaxation, establishing asymptotic consistency as well as characterizing the properties for any fixed β: we show roughly that both the loss and statistical efficiency degrade by a factor of β−1 min, the inverse of the smallest coordinate of β. In Section 4, we introduce novel tractability constraints, show that inference is efficient if the constraints are satisfied, and present an EM-like algorithm for constrained optimization of the likelihood. Finally, in Section 5, we explore the empirical properties of this algorithm on two illustrative examples. 2 Framework We assume that we are given a partially supervised problem x →z →y where (x, y) ∈X × Y are observed and z ∈Z is unobserved. We model z given x as an exponential family pθ(z | x) = exp(θ⊤φ(x, z)−A(θ; x)), and assume that y = f(z) is a known deterministic function of z. Hence: pθ(y | x) = X z S(z, y) exp(θ⊤φ(x, z) −A(θ; x)), (1) where S(z, y) ∈{0, 1} encodes the constraint [f(z) = y]. In general, f could have complicated structure, rendering inference (i.e., computing pθ(z | x, y), which is needed for learning) intractable. To alleviate this, we consider projections πj mapping Y to some smaller set Yj; we then obtain the (hopefully simpler) constraint that f(z) and y match under πj: Sj(z, y) def = [πj(f(z)) = πj(y)]. We assume π1 × · · · × πk is injective, which implies that S(z, y) equals the conjunction Vk j=1 Sj(z, y). We also assume that some part of S (call it T(z, y)) can be imposed tractably. We can always take T ≡1, but it is better to include as much of S as possible because T will be handled exactly while S will be approximated. We record our assumptions below: Definition 2.1. Let S(z, y) encode the constraint f(z) = y. We say that (T, π1, . . . , πk) logically decomposes S if (1) S implies T and (2) π1 × · · · × πk is injective. Before continuing, we give three examples to illustrate the definitions above. Example 2.2 (Translation from unordered supervision). Suppose that given an input sentence x, each word is passed through the same unknown 1-to-1 substitution cipher to obtain an enciphered sentence z, and then ordering is removed to obtain an output y = multiset(z). For example, we might have x = abaa, z = dcdd, and y = {c : 1, d : 3}. Suppose the vocabulary is {1, . . . , V }. Our constraint is S(z, y) = [y = multiset(z)], which logically decomposes as [y = f(z) z }| { multiset(z)] | {z } S(z,y) ⇐⇒[zi ∈y for all i] | {z } T(z,y) ∧ V^ j=1 [count(z, j) = πj(y) z }| { count(y, j)] | {z } Sj(z,y) , (2) where count(·, j) counts the number of occurrences of the word j. The constraint T is useful because it lets us restrict attention to words in y (rather than all of {1, . . . , V }), which dramatically reduces the search space. If each sentence has length L, then Yj = πj(Y) = {0, . . . , L}. Example 2.3 (Conjunctive semantic parsing). Suppose again that x is an input sentence, and that each input word xi ∈{1, . . . , V } maps to a predicate (set) zi ∈{Q1, . . . , Qm}, and the meaning y 2 of the sentence is the intersection of the predicates. For instance, if the sentence x is “brown dog”, and Q6 is the set of all brown objects and Q11 is the set of all dogs, then z1 = Q6, z2 = Q11, and y = Q6 ∩Q11 is the set of all brown dogs. In general, we define y = JzK def = z1 ∩· · · ∩zl. This is a simplified form of learning semantic parsers from denotations [2]. We let Y be every set that is obtainable as an intersection of predicates Q, and define πj(y) = [y ⊆ Qj] for j = 1, . . . , m (so Yj = {0, 1}). Note that for all y ∈Y, we have y = ∩j:πj(y)=1Qj, so π1 × · · · × πm is injective. We then have the following logical decomposition: y = JzK | {z } S(z,y) ⇐⇒[zi ⊇y for all i] | {z } T(z,y) ∧ m ^ j=1 [JzK ⊆Qj] = πj(y) z }| { [y ⊆Qj] | {z } Sj(z,y) . (3) The first constraint T factors across i, so it can be handled tractably. Example 2.4 (Predicate abstraction). Next, we consider a program induction task; here the input x might be “smallest square divisible by six larger than 1000”, z would be argmin{i1 | mod(i1,6) = 0 and i1 = i2*i2 and i1 > 1000}, and y would be 1296; hence S(z, y) = 1 if z evaluates to y. Suppose that we have a collection of predicates πj, such as π1(y) = mod(y, 6), π2(y) = isPrime(y), etc. These predicates are useful for giving partial credit; for instance, it is easier to satisfy mod(y, 6) = 0 than y = 1296, but many programs that satisfy the former will have pieces that are also in the correct z. Using the πj to decompose S will therefore provide a more tractable learning signal that still yields useful information. Relaxing the supervision. Returning to the general framework, let us now use Sj and T to relax S, and thus also pθ(y | x). First, define penalty features ψj(z, y) = Sj(z, y) −1, and also define qβ(y | z) ∝T(z, y) exp β⊤ψ(z, y) for any vector β ≥0. Then, −log qβ(y | z) measures how far S(z, y) is from being satisfied: for each violated Sj, we incur a penalty βj (or infinite penalty if T is violated). Note that the original q∞(y | z) = S(z, y) corresponds to β1 = · · · = βk = +∞. Normalization constant. The log-normalization constant A(β; z) for qβ is equal to log(P y∈Y T(z, y) exp(β⊤ψ(z, y))); this is in general difficult to compute, since ψ could have arbitrary structure. Fortunately, we can uniformly upper-bound A(β; z) by a tractable quantity A(β): Proposition 2.5. For any z, we have the following bound: A(β; z) ≤ k X j=1 log (1 + (|Yj|−1) exp(−βj)) def = A(β). (4) See the supplement for proof; the intuition is that, by injectivity of π1 × · · · × πk, we can bound Y by the product set Qk j=1 Yj. We now define our joint model, which is a relaxation of (1): qβ(y | z) = T(z, y) exp β⊤ψ(z, y) −A(β) , (5) pθ,β(y | x) = X z T(z, y) exp(θ⊤φ(x, z) + β⊤ψ(z, y) −A(θ; x) −A(β)), (6) L(θ, β) = Ex,y∼p∗[−log pθ,β(y | x)], where p∗is the true distribution. (7) The relaxation parameter β provides a trade-off between faithfulness to the original objective (large β) and tractability (small β). Importantly, pθ,β(y | x) produces valid probabilities which can be meaningfully compared across different β; this will be important later in allowing us to optimize β. (Note that while P y pθ,β(y | x) < 1 if the bound (4) is not tight, this gap vanishes as β →∞.) 3 Analysis We now analyze the effects of relaxing supervision (i.e., taking β < ∞); proofs may be found in the supplement. We will analyze the following properties: 1. Effect on loss: How does the value of the relaxation parameter β affect the (unrelaxed) loss of the learned parameters θ (assuming we had infinite data and perfect optimization)? 3 2. Amount of data needed to learn: How does β affect the amount of data needed in order to identify the optimal parameters? 3. Optimizing β and consistency: What happens if we optimize β jointly with θ? Is there natural pressure to increase β and do we eventually recover the unrelaxed solution? Notation. Let Ep∗denote the expectation under x, y ∼p∗, and let L(θ, ∞) denote the unrelaxed loss (see (5)–(7)). Let L∗= infθ L(θ, ∞) be the optimal unrelaxed loss and θ∗be the minimizing argument. Finally, let Eθ and Covθ denote the expectation and covariance, respectively, under pθ(z | x). To simplify expressions, we will often omit the arguments from φ(x, z) and ψ(z, y), and use S and ¬S for the events [S(z, y) = 1] and [S(z, y) = 0]. For simplicity, assume that T(z, y) ≡1. Effect on loss. Suppose we set β to some fixed value (β1, . . . , βk) and let θ∗ β be the minimizer of L(θ, β). Since θ∗ β is optimized for L(·, β) rather than L(·, ∞), it is possible that L(θ∗ β, ∞) is very large; indeed, if pθ∗ β(y | x) is zero for even a single outlier (x, y), then L(θ∗ β, ∞) will be infinite. However, we can bound θ∗ β under an alternative loss that is less sensitive to outliers: Proposition 3.1. Let βmin = mink j=1 βj. Then, Ep∗[1 −pθ∗ β(y | x)] ≤ L∗ 1−exp(−βmin). The key idea in the proof is that replacing S with exp(β⊤ψ) in pθ,β does not change the loss too much, in the sense that S ≤exp(β⊤ψ) ≤exp(−βmin) + (1 −exp(−βmin))S. When βmin ≪1, L∗ 1−exp(−βmin) ≈ L∗ βmin . Hence, the error increases roughly linearly with β−1 min. If βmin is large and the original loss L∗is small, then L(·, β) is a good surrogate. Of particular interest is the case L∗= 0 (perfect predictions); in this case, the relaxed loss L(·, β) also yields a perfect predictor for any β > 0. Note conversely that Proposition 3.1 is vacuous when L∗≥1. We show in the supplement that Proposition 3.1 is essentially tight: Lemma 3.2. For any 0 < βmin < L∗, there exists a model with loss L∗and a relaxation parameter β = (βmin, ∞, . . . , ∞), such that Ep∗[pθ∗ β(y | x)] = 0. Amount of data needed to learn. To estimate how much data is needed to learn, we compute the Fisher information Iβ def = ∇2 θL(θ∗ β, β), which measures the statistical efficiency of the maximum likelihood estimator [13]. All of the equations below follow from standard properties of exponential families [14], with calculations in the supplement. For the unrelaxed loss, the Fisher information is: I∞= Ep∗[Pθ∗[¬S] (Eθ∗[φ ⊗φ | ¬S] −Eθ∗[φ ⊗φ | S])] . (8) Hence θ∗is easy to estimate if the features have high variance when S = 0 and low variance when S = 1. This should be true if all z with S(z, y) = 1 have similar feature values while the z with S(z, y) = 0 have varying feature values. In the relaxed case, the Fisher information can be written to first order as Iβ = Ep∗ h Covθ∗ β φ(x, z) ⊗φ(x, z), −β⊤ψ(z, y) i + O β2 . (9) In other words, Iβ, to first order, is the covariance of the penalty −β⊤ψ with the second-order statistics of φ. To interpret this, we will make the simplifying assumptions that (1) βj = βmin for all j, and (2) the events ¬Sj are all disjoint. In this case, −β⊤ψ = βmin¬S, and the covariance in (9) simplifies to Covθ∗ β φ ⊗φ, −β⊤ψ = βminPθ∗ β[S]Pθ∗ β[¬S] Eθ∗ β[φ ⊗φ | ¬S] −Eθ∗ β[φ ⊗φ | S] . (10) Relative to (8), we pick up a βPθ∗ β[S] factor. If we further assume that Pθ∗ β[S] ≈1, we see that the amount of data required to learn under the relaxation increases by a factor of roughly β−1 min. Optimizing β. We now study the effects of optimizing both θ and β jointly. Importantly, joint optimization recovers the true distribution pθ∗in the infinite data limit: Proposition 3.3. Suppose the model is well-specified: p∗(y | x) = pθ∗(y | x) for all x, y. Then, all global optima of L(θ, β) satisfy pθ,β(y | x) = p∗(y | x); one such optimum is θ = θ∗, β = ∞. 4 There is thus always pressure to send β to ∞and θ to θ∗. The key fact in the proof is that the log-loss L(θ, β) is never smaller than the conditional entropy Hp∗(y | x), with equality iff pθ,β = p∗. Summary. Based on our analyses above, we can conclude that relaxation has the following impact: • Loss: The loss increases by a factor of β−1 min in the worst case. • Amount of data: In at least one regime, the amount of data needed to learn is β−1 min times larger. The general theme is that the larger β is, the better the statistical properties of the maximumlikelihood estimator. However, larger β also makes the distribution pθ,β less tractable, as qβ(y | z) becomes concentrated on a smaller set of y’s. This creates a trade-off between computational efficiency (small β) and statistical accuracy (large β). We explore this trade-off in more detail in the next section, and show that in some cases we can get the best of both worlds. 4 Constraints for Efficient Inference In light of the previous section, we would like to make β as large as possible; on the other hand, if β is too large, we are back to imposing S exactly and inference becomes intractable. We would therefore like to optimize β subject to a tractability constraint ensuring that we can still perform efficient inference, as sketched earlier in Figure 1. We will use rejection sampling as the inference procedure, with the acceptance rate as a measure of tractability. To formalize our approach, we assume that the model pθ(z | x) and the constraint T(z, y) are jointly tractable, so that we can efficiently draw exact samples from pθ,T(z | x, y) def = T(z, y) exp θ⊤φ(x, z) −AT(θ; x, y) , (11) where AT(θ; x, y) = log(P z T(z, y) exp(θ⊤φ(x, z))). Most learning algorithms require the conditional expectations of φ and ψ given x and y; we therefore need to sample the distribution pθ,β(z | x, y) = T(z, y) exp θ⊤φ(x, z) + β⊤ψ(z, y) −A(θ, β; x, y) , where (12) A(θ, β; x, y) def = log X z T(z, y) exp(θ⊤φ(x, z) + β⊤ψ(z, y)) ! . (13) Since β⊤ψ ≤0, we can draw exact samples from pθ,β using rejection sampling: (1) sample z from pθ,T(· | x, y), and (2) accept with probability exp(β⊤ψ(z, y)). If the acceptance rate is high, this algorithm lets us tractably sample from (12). Intuitively, when θ is far from the optimum, the model pθ and constraints Sj will clash, necessitating a small value of β to stay tractable. As θ improves, more of the constraints Sj will be satisfied automatically under pθ, allowing us to increase β. Formally, the expected number of samples is the inverse of the acceptance probability and can be expressed as (see the supplement for details) X z pθ,T(z | x, y) exp(β⊤ψ(z, y)) −1 = exp (AT(θ; x, y) −A(θ, β; x, y)) . (14) We can then minimize the loss L(θ, β) = A(θ; x) + A(β) −A(θ, β; x, y) (see (6)–(7) and (13)) subject to the tractability constraint Ex,y[exp (AT(θ; x, y) −A(θ, β; x, y))] ≤τ, where τ is our computational budget. While one might have initially worried that rejection sampling will perform poorly, this constraint guarantees that it will perform well by bounding the number of rejections. Implementation details. To minimize L subject to a constraint on (14), we will develop an EM-like algorithm; the algorithm maintains an inner approximation to the constraint set as well as an upper bound on the loss, both of which will be updated with each iteration of the algorithm. These bounds are obtained by linearizing A(θ, β; x, y); more precisely, for any (˜θ, ˜β) we have by convexity: A(θ, β; x, y) ≥˜A(θ, β; x, y) def = A(˜θ, ˜β; x, y) + (θ −˜θ)⊤˜φ + (β −˜β)⊤˜ψ, (15) where ˜φ def = X z p˜θ, ˜β(z | x, y)φ(x, z), ˜ψ def = X z p˜θ, ˜β(z | x, y)ψ(z, y). 5 We thus obtain a bound ˜L on the loss L, as well as a tractability constraint C1, which are both convex: minimize Ep∗ h A(θ; x) + A(β) −˜A(θ, β; x, y) i (˜L) subject to Ep∗ h exp AT(θ; x, y) −˜A(θ, β; x, y) i ≤τ. (C1) We will iteratively solve the above minimization, and then update ˜L and C1 using the minimizing (θ, β) from the previous step. Note that the minimization itself can be done without inference; we only need to do inference when updating ˜φ and ˜ψ. Since inference is tractable at (˜θ, ˜β) by design, we can obtain unbiased estimates of ˜φ and ˜ψ using the rejection sampler described earlier. We can also estimate A(˜θ, ˜β; x, y) at the same time by using samples from p˜θ,T and the relation (14). A practical issue is that C1 becomes overly stringent when (θ, β) is far away from (˜θ, ˜β). It is therefore difficult to make large moves in parameter space, which is especially bad for getting started initially. We can solve this using the trivial constraint exp k X j=1 βj ≤τ, (C0) which will also ensure tractability. We use (C0) for several initial iterations, then optimize the rest of the way using (C1). To avoid degeneracies at β = 0, we also constrain β ≥ϵ in all iterations. We will typically take ϵ = 1/k, which is feasible for (C0) assuming τ ≥exp(1).1 To summarize, we have obtained an iterative algorithm for jointly minimizing L(θ, β), such that pθ,β(z | x, y) always admits efficient rejection sampling. Pseudocode is provided in Algorithm 1; note that all population expectations Ep∗should now be replaced with sample averages. Algorithm 1 Minimizing L(θ, β) while guaranteeing tractable inference. Input training data (x(i), y(i))n i=1. Initialize ˜θ = 0, ˜βj = ϵ for j = 1, . . . , k. while not converged do Estimate ˜φ(i), ˜ψ(i), and A(˜θ, ˜β; x(i), y(i)) for i = 1, . . . , n by sampling p˜θ, ˜β(z |x(i), y(i)). Estimate the functions ˜A(θ, β; x(i), y(i)) using the output from the preceding step. Let (ˆθ, ˆβ) be the solution to minimize θ,β 1 n n X i=1 A(θ; x(i)) + A(β) −˜A(θ, β; x(i), y(i)) subject to (C0), βj ≥ϵ for j = 1, . . . , k Update (˜θ, ˜β) ←(ˆθ, ˆβ). end while Repeat the same loop as above, with the constraint (C0) replaced by (C1). Output (˜θ, ˜β). 5 Experiments We now empirically explore our method’s behavior. All of our code, data, and experiments may be found on the CodaLab worksheet for this paper at https://www.codalab.org/worksheets/ 0xc9db508bb80446d2b66cbc8e2c74c052/, which also contains more detailed plots beyond those shown here. We would like to answer the following questions: • Fixed β: For a fixed β, how does the relaxation parameter β affect the learned parameters? What is the trade-off between accuracy and computation as we vary β? 1If only some of the constraints Sj are active for each y (e.g. for translation we only have to worry about the words that actually appear in the output sentence), then we need only include those βj in the sum for (C0). This can lead to substantial gains, since now k is effectively the sentence length rather than the vocabulary size. 6 104 105 106 107 108 number of samples 0.0 0.2 0.4 0.6 0.8 1.0 accuracy AdaptFull(50) AdaptTied(50) Fixed(0.8) Fixed(0.5) Fixed(0.2) Fixed(0.1) (a) 104 105 106 107 108 109 number of samples 0.0 0.2 0.4 0.6 0.8 1.0 accuracy AdaptFull(200) AdaptTied(200) AdaptFull(100) AdaptFull(50) Fixed(0.5) Fixed(0.3) Fixed(0.2) (b) Figure 2: (a) Accuracy versus computation (measured by number of samples drawn by the rejection sampler) for the unordered translation task. (b) Corresponding plot for the conjunctive semantic parsing task. For both tasks, the FIXED method needs an order of magnitude more samples to achieve comparable accuracy to either adaptive method. • Adapting β: Does optimizing β affect performance? Is the per-coordinate adaptivity of our relaxation advantageous, or can we set all coordinates of β to be equal? How does the computational budget τ (from C0 and C1) impact the optimization? To answer these questions, we considered using a fixed β (FIXED(β)), optimizing β with a computational constraint τ (ADAPTFULL(τ)), and performing the same optimization with all coordinates of β constrained to be equal (ADAPTTIED(τ)). For optimization, we used Algorithm 1, using S = 50 samples to approximate each ˜φ(i) and ˜ψ(i), and using the solver SNOPT [15] for the inner optimization. We ran Algorithm 1 for 50 iterations; when β is not fixed, we apply the constraint (C0) for the first 10 iterations and (C1) for the remaining 40 iterations; when it is fixed, we do not apply any constraint. Unordered translation. We first consider the translation task from Example 2.2. Recall that we are given a vocabulary [V ] def = {1, . . . , V }, and wish to recover an unknown 1-1 substitution cipher c : [V ] →[V ]. Given an input sentence x1:L, the latent z is the result of applying c, where zi is c(xi) with probability 1 −δ and uniform over [V ] with probability δ. To model this, we define a feature φu,v(x, z) that counts the number of times that xi = u and zi = v; hence, pθ(z | x) ∝ exp(PL i=1 θxi,zi). Recall also that the output y = multiset(z). In our experiments, we generated n = 100 sentences of length L = 20 with vocabulary size V = 102. For each pair of adjacent words (x2i−1, x2i), we set x2i−1 = 3j +1 with j drawn from a power law distribution on {0, . . . , V/3 −1} with exponent r ≥0; we then set x2i to 3j + 2 or 3j + 3 with equal probability. This ensures that there are pairs of words that co-occur often (without which the constraint T would already solve the problem). We set r = 1.2 and δ = 0.1, which produces a moderate range of word frequencies as well as a moderate noise level (we also considered setting either r or δ to 0, but omitted these results because essentially all methods achieved ceiling accuracy; the interested reader may find them in our CodaLab worksheet). We set the computational budget τ = 50 for the constraints C0 and C1, and ϵ = 1 L as the lower bound on β. To measure accuracy, we look at the fraction of words whose modal prediction under the model corresponds to the correct mapping. We plot accuracy versus computation (i.e., cumulative number of samples drawn by the rejection sampler up through the current iteration) in Figure 2a; note that the number of samples is plotted on a log-scale. For the FIXED methods, there is a clear trade-off between computation and accuracy, with multiplicative increases in computation needed to obtain additive increases in accuracy. The adaptive methods completely surpass this trade-off curve, achieving higher accuracy than FIXED(0.8) while using an order of magnitude less computation. The ADAPTFULL and ADAPTTIED methods achieve similar results to each other; in both cases, all coordinates of β eventually obtained their maximum value of 5.0, which we set as a cap for numerical reasons, and which corresponds closely to imposing the exact supervision signal. 7 Conjunctive semantic parsing. We also ran experiments on the semantic parsing task from Example 2.3. We used vocabulary size V = 150, and represented each predicate Q as a subset of [U], where U = 300. The five most common words in [V ] mapped to the empty predicate Q = [U], and the remaining words mapped to a random subset of 85% of [U]. We used n = 100 and sentence length L = 25. Each word in the input was drawn independently from a power law with r = 0.8. A word was mapped to its correct predicate with probability 1−δ and to a uniformly random predicate with probability δ, with δ = 0.1. We constrained the denotation y = JzK to have non-zero size by re-generating each examples until this constraint held. We used the same model pθ(z | x) as before, and again measured accuracy based on the fraction of the vocabulary for which the modal prediction was correct. We set τ = 50, 100, 200 to compare the effect of different computational budgets. Results are shown in Figure 2b. Once again, the adaptive methods substantially outperform the FIXED methods. We also see that the accuracy of the algorithm is relatively invariant to the computational budget τ — indeed, for all of the adaptive methods, all coordinates of β eventually obtained their maximum value, meaning that we were always using the exact supervision signal by the end of the optimization. These results are broadly similar to the translation task, suggesting that our method generalizes across tasks. 6 Related Work and Discussion For a fixed relaxation β, our loss L(θ, β) is similar to the Jensen risk bound defined by Gimpel and Smith [16]. For varying β, our framework is similar in spirit to annealing, where the entire objective is relaxed by exponentiation, and the relaxation is reduced over time. An advantage of our method is that we do not have to pick a fixed annealing schedule; it falls out of learning, and moreover, each constraint can be annealed at its own pace. Under model well-specification, optimizing the relaxed likelihood recovers the same distribution as optimizing the original likelihood. In this sense, our approach is similar in spirit to approaches such as pseudolikelihood [17, 18] and, more distantly, reward shaping in reinforcement learning [19]. There has in the past been considerable interest in specifying and learning under constraints on model predictions, leading to a family of ideas including constraint-driven learning [11], generalized expectation criteria [20, 21], Bayesian measurements [22], and posterior regularization [23]. These ideas are nicely summarized in Section 4 of [23], and involve relaxing the constraint either by using a variational approximation or by applying the constraint in expectation rather than pointwise (e.g., replacing the constraint h(x, z, y) ≥1 with E[h(x, z, y)] ≥1). This leads to tractable inference when the function h can be tractably incorporated as a factor in the model, which is the case for many problems of interest (including the translation task in this paper). In general, however, inference will be intractable even under the relaxation, or the relaxation could lead to different learned parameters; this motivates our framework, which handles a more general class of problems and has asymptotic consistency of the learned parameters. The idea of learning with explicit constraints on computation appears in the context of prioritized search [24], MCMC [25, 26], and dynamic feature selection [27, 28, 29]. These methods focus on keeping the model tractable; in contrast, we assume a tractable model and focus on the supervision. While the parameters of the model can be informed by the supervision, relaxing the supervision as we do could fundamentally alter the learning process, and requires careful analysis to ensure that we stay grounded to the data. As an analogy, consider driving a car with a damaged steering wheel (approximate model) versus not being able to see the road (approximate supervision); intuitively, the latter appears to pose a more fundamental challenge. Intractable supervision is a key bottleneck in many applications, and will only become more so as we incorporate more sophisticated logical constraints into our statistical models. While we have laid down a framework that grapples with this issue, there is much to be explored—e.g., deriving stochastic updates for optimization, as well as tractability constraints for more sophisticated inference methods. Acknowledgments. The first author was supported by a Fannie & John Hertz Fellowship and an NSF Graduate Research Fellowship. The second author was supported by a Microsoft Research Faculty Fellowship. We are also grateful to the referees for their valuable comments. 8 References [1] J. Clarke, D. Goldwasser, M. Chang, and D. Roth. Driving semantic parsing from the world’s response. In Computational Natural Language Learning (CoNLL), pages 18–27, 2010. [2] P. Liang, M. I. Jordan, and D. Klein. Learning dependency-based compositional semantics. In Association for Computational Linguistics (ACL), pages 590–599, 2011. [3] Y. Artzi and L. Zettlemoyer. Weakly supervised learning of semantic parsers for mapping instructions to actions. Transactions of the Association for Computational Linguistics (TACL), 1:49–62, 2013. [4] M. Fisher, D. Ritchie, M. Savva, T. Funkhouser, and P. Hanrahan. Example-based synthesis of 3D object arrangements. ACM SIGGRAPH Asia, 12, 2012. [5] V. Mansinghka, T. D. Kulkarni, Y. N. Perov, and J. Tenenbaum. Approximate Bayesian image interpretation using generative probabilistic graphics programs. In Advances in Neural Information Processing Systems (NIPS), pages 1520–1528, 2013. [6] A. X. Chang, M. Savva, and C. D. Manning. Learning spatial knowledge for text to 3D scene generation. In Empirical Methods in Natural Language Processing (EMNLP), 2014. [7] M. Mintz, S. Bills, R. Snow, and D. Jurafsky. Distant supervision for relation extraction without labeled data. In Association for Computational Linguistics (ACL), pages 1003–1011, 2009. [8] S. Riedel, L. Yao, and A. McCallum. Modeling relations and their mentions without labeled text. In Machine Learning and Knowledge Discovery in Databases (ECML PKDD), pages 148–163, 2010. [9] S. Gulwani. Automating string processing in spreadsheets using input-output examples. ACM SIGPLAN Notices, 46(1):317–330, 2011. [10] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [11] M. Chang, L. Ratinov, and D. Roth. Guiding semi-supervision with constraint-driven learning. In Association for Computational Linguistics (ACL), pages 280–287, 2007. [12] J. Grac¸a, K. Ganchev, and B. Taskar. Expectation maximization and posterior constraints. In NIPS, 2008. [13] A. W. van der Vaart. Asymptotic statistics. Cambridge University Press, 1998. [14] F. Nielsen and V. Garcia. Statistical exponential families: A digest with flash cards. arXiv preprint arXiv:0911.4863, 2009. [15] P. E. Gill, W. Murray, and M. A. Saunders. SNOPT: An SQP algorithm for large-scale constrained optimization. SIAM Journal on Optimization, 12(4):979–1006, 2002. [16] K. Gimpel and N. A. Smith. Softmax-margin CRFs: Training log-linear models with cost functions. In North American Association for Computational Linguistics (NAACL), pages 733–736, 2010. [17] J. Besag. The analysis of non-lattice data. The Statistician, 24:179–195, 1975. [18] P. Liang and M. I. Jordan. An asymptotic analysis of generative, discriminative, and pseudolikelihood estimators. In International Conference on Machine Learning (ICML), pages 584–591, 2008. [19] A. Y. Ng, D. Harada, and S. Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In International Conference on Machine Learning (ICML), 1999. [20] G. Mann and A. McCallum. Generalized expectation criteria for semi-supervised learning of conditional random fields. In HLT/ACL, pages 870–878, 2008. [21] G. Druck, G. Mann, and A. McCallum. Learning from labeled features using generalized expectation criteria. In ACM Special Interest Group on Information Retreival (SIGIR), pages 595–602, 2008. [22] P. Liang, M. I. Jordan, and D. Klein. Learning from measurements in exponential families. In International Conference on Machine Learning (ICML), 2009. [23] K. Ganchev, J. Grac¸a, J. Gillenwater, and B. Taskar. Posterior regularization for structured latent variable models. Journal of Machine Learning Research (JMLR), 11:2001–2049, 2010. [24] J. Jiang, A. Teichert, J. Eisner, and H. Daume. Learned prioritization for trading off accuracy and speed. In Advances in Neural Information Processing Systems (NIPS), 2012. [25] T. Shi, J. Steinhardt, and P. Liang. Learning where to sample in structured prediction. In AISTATS, 2015. [26] J. Steinhardt and P. Liang. Learning fast-mixing models for structured prediction. In ICML, 2015. [27] H. He, H. Daume, and J. Eisner. Cost-sensitive dynamic feature selection. In ICML Inferning Workshop, 2012. [28] H. He, H. Daume, and J. Eisner. Dynamic feature selection for dependency parsing. In EMNLP, 2013. [29] D. J. Weiss and B. Taskar. Learning adaptive value of information for structured prediction. In Advances in Neural Information Processing Systems (NIPS), pages 953–961, 2013. 9 | 2015 | 374 |
5,896 | Matrix Completion Under Monotonic Single Index Models Ravi Ganti Wisconsin Institutes for Discovery UW-Madison gantimahapat@wisc.edu Laura Balzano Electrical Engineering and Computer Sciences University of Michigan Ann Arbor girasole@umich.edu Rebecca Willett Department of Electrical and Computer Engineering UW-Madison rmwillett@wisc.edu Abstract Most recent results in matrix completion assume that the matrix under consideration is low-rank or that the columns are in a union of low-rank subspaces. In real-world settings, however, the linear structure underlying these models is distorted by a (typically unknown) nonlinear transformation. This paper addresses the challenge of matrix completion in the face of such nonlinearities. Given a few observations of a matrix that are obtained by applying a Lipschitz, monotonic function to a low rank matrix, our task is to estimate the remaining unobserved entries. We propose a novel matrix completion method that alternates between lowrank matrix estimation and monotonic function estimation to estimate the missing matrix elements. Mean squared error bounds provide insight into how well the matrix can be estimated based on the size, rank of the matrix and properties of the nonlinear transformation. Empirical results on synthetic and real-world datasets demonstrate the competitiveness of the proposed approach. 1 Introduction In matrix completion, one has access to a matrix with only a few observed entries, and the task is to estimate the entire matrix using the observed entries. This problem has a plethora of applications such as collaborative filtering, recommender systems [1] and sensor networks [2]. Matrix completion has been well studied in machine learning, and we now know how to recover certain matrices given a few observed entries of the matrix [3, 4] when it is assumed to be low rank. Typical work in matrix completion assumes that the matrix to be recovered is incoherent, low rank, and entries are sampled uniformly at random [5, 6, 4, 3, 7, 8]. While recent work has focused on relaxing the incoherence and sampling conditions under which matrix completion succeeds, there has been little work for matrix completion when the underlying matrix is of high rank. More specifically, we shall assume that the matrix that we need to complete is obtained by applying some unknown, non-linear function to each element of an unknown low-rank matrix. Because of the application of a non-linear transformation, the resulting ratings matrix tends to have a large rank. To understand the effect of the application of non-linear transformation on a low-rank matrix, we shall consider the following simple experiment: Given an n × m matrix X, let X = Pm i=1 σiuiv⊤ i be its SVD. The rank of the matrix X is the number of non-zero singular values. Given an ϵ ∈(0, 1), define the effective rank of X as follows: rϵ(X) = min ( k ∈N : sPm j=k+1 σ2 j Pm j=1 σ2 j ≤ϵ ) . (1) 1 0 5 10 15 20 25 30 35 40 45 50 2 4 6 8 10 12 14 16 18 20 c Effective rank Figure 1: The plot shows the r0.01(X) defined in equation (1) obtained by applying a non-linear function g⋆to each element of Z, where g⋆(z) = 1 1+exp(−cz). Z is a 30 × 20 matrix of rank 5. The effective rank of X tells us the rank k of the lowest rank approximator ˆX that satisfies || ˆX −X||F ||X||F ≤ϵ. (2) In figure (1), we show the effect of applying a non-linear monotonic function g⋆(z) = 1 1+exp(−cz) to the elements of a low-rank matrix Z. As c increases both the rank of X and its effective rank rϵ(X) grow rapidly with c, rendering traditional matrix completion methods ineffective even in the presence of mild nonlinearities. 1.1 Our Model and contributions In this paper we consider the high-rank matrix completion problem where the data generating process is as follows: There is some unknown matrix Z⋆∈Rn×m with m ≤n and of rank r ≪m. A non-linear, monotonic, L- Lipschitz function g⋆is applied to each element of the matrix Z⋆to get another matrix M ⋆. A noisy version of M ⋆, which we call X, is observed on a subset of indices denoted by Ω⊂[n] × [m]. M ⋆ i,j = g⋆(Z⋆ i,j), ∀i ∈[n], j ∈[m] (3) XΩ= (M ⋆+ N)Ω (4) The function g⋆is called the transfer function. We shall assume that E[N] = 0, and the entries of N are i.i.d. We shall also assume that the index set Ωis generated uniformly at random with replacement from the set [n] × [m] 1. Our task is to reliably estimate the entire matrix M ⋆given observations of X on Ω. We shall call the above model as Monotonic Matrix Completion (MMC). To illustrate our framework we shall consider the following two simple examples. In recommender systems users are required to provide discrete ratings of various objects. For example, in the Netflix problem users are required to rate movies on a scale of 1 −5 2. These discrete scores can be thought of as obtained by applying a rounding function to some ideal real valued score matrix given by the users. This real-valued score matrix may be well modeled by a low-rank matrix, but the application of the rounding function 3 increases the rank of the original low-rank matrix. Another important example is that of completion of Gaussian kernel matrices. Gaussian kernel matrices are used in kernel based learning methods. The Gaussian kernel matrix of a set of n points is an n × n matrix obtained by applying the Gaussian function on an underlying Euclidean distance matrix. The Euclidean distance matrix is a low-rank matrix [9]. However, in many cases one cannot measure all pair-wise distances between objects, resulting in an incomplete Euclidean distance matrix and hence an incomplete kernel matrix. Completing the kernel matrix can then be viewed as completing a matrix of large rank. In this paper we study this matrix completion problem and provide algorithms with provable error guarantees. Our contributions are as follows: 1. In Section (3) we propose an optimization formulation to estimate matrices in the above described context. In order to do this we introduce two formulations, one using a squared 1By [n] we denote the set {1, 2 . . . , n} 2This is typical of many other recommender engines such as Pandora.com, Last.fm and Amazon.com. 3Technically the rounding function is not a Lipschitz function but can be well approximated by a Lipschitz function. 2 loss, which we call MMC - LS, and another using a calibrated loss function, which we call as MMC −c. For both these formulations we minimize w.r.t. M ⋆and g⋆. This calibrated loss function has the property that the minimizer of the calibrated loss satisfies equation (3). 2. We propose alternating minimization algorithms to solve our optimization problem. Our proposed algorithms, called MMC−c and MMC-LS, alternate between solving a quadratic program to estimate g⋆and performing projected gradient descent updates to estimate the matrix Z⋆. MMC outputs the matrix ˆ M where ˆ Mi,j = ˆg( ˆZi,j). 3. In Section (4) we analyze the mean squared error (MSE) of the matrix ˆ M returned by one step of the MMC −c algorithm. The upper bound on the MSE of the matrix ˆ M output by MMC depends only on the rank r of the matrix Z⋆and not on the rank of matrix M ⋆. This property makes our analysis useful because the matrix M ⋆could be potentially high rank and our results imply reliable estimation of a high rank matrix with error guarantees that depend on the rank of the matrix Z⋆. 4. We compare our proposed algorithms to state-of-art implementations of low rank matrix completion on both synthetic and real datasets (Section 5). 2 Related work Classical matrix completion with and without noise has been investigated by several authors [5, 6, 4, 3, 7, 8]. The recovery techniques proposed in these papers solve a convex optimization problem that minimizes the nuclear norm of the matrix subject to convex constraints. Progress has also been made on designing efficient algorithms to solve the ensuing convex optimization problem [10, 11, 12, 13]. Recovery techniques based on nuclear norm minimization guarantee matrix recovery under the condition that a) the matrix is low rank, b) the matrix is incoherent or not very spiky, and c) the entries are observed uniformly at random. Literature on high rank matrix completion is relatively sparse. When columns or rows of the matrix belong to a union of subspaces, then the matrix tends to be of high rank. For such high rank matrix completion problems algorithms have been proposed that exploit the fact that multiple low-rank subspaces can be learned by clustering the columns or rows and learning subspaces from each of the clusters. While Eriksson et al. [14] suggested looking at the neighbourhood of each incomplete point for completion, [15] used a combination of spectral clustering techniques as done in [16, 17] along with learning sparse representations via convex optimization to estimate the incomplete matrix. Singh et al. [18] consider a certain specific class of high-rank matrices that are obtained from ultra-metrics. In [19] the authors consider a model similar to ours, but instead of learning a single monotonic function, they learn multiple monotonic functions, one for each row of the matrix. However, unlike in this paper, their focus is on a ranking problem and their proposed algorithms lack theoretical guarantees. Davenport et al [20] studied the one-bit matrix completion problem. Their model is a special case of the matrix completion model considered in this paper. In the one-bit matrix completion problem we assume that g⋆is known and is the CDF of an appropriate probability distribution, and the matrix X is a boolean matrix where each entry takes the value 1 with probability Mi,j, and 0 with probability 1−Mi,j. Since g⋆is known, the focus in one-bit matrix completion problems is accurate estimation of Z⋆. To the best of our knowledge the MMC model considered in this paper has not been investigated before. The MMC model is inspired by the single-index model (SIM) that has been studied both in statistics [21, 22] and econometrics for regression problems [23, 24]. Our MMC model can be thought of as an extension of SIM to matrix completion problems. 3 Algorithms for matrix completion Our goal is to estimate g⋆and Z⋆from the model in equations (3- 4). We approach this problem via mathematical optimization. Before we discuss our algorithms, we mention in brief an algorithm for the problem of learning Lipschitz, monotonic functions in 1- dimension. This algorithm will be used for learning the link function in MMC. 3 The LPAV algorithm: Suppose we are given data (p1, y1), . . . (pn, yn), where p1 ≤p2 . . . ≤pn, and y1, . . . , yn are real numbers. Let G def= {g : R →R, g is L-Lipschitz and monotonic}. The LPAV 4 algorithm introduced in [21] outputs the best function ˆg in G that minimizes Pn i=1(g(pi) − yi)2. In order to do this, the LPAV first solves the following optimization problem: ˆz = arg min z∈Rn ∥z −y∥2 2 s.t. 0 ≤zj −zi ≤L(pj −pi) if pi ≤pj (5) where, ˆg(pi) def= ˆzi. This gives us the value of ˆg on a discrete set of points p1, . . . , pn. To get ˆg everywhere else on the real line, we simply perform linear interpolation as follows: ˆg(ζ) = ˆz1, if ζ ≤p1 ˆzn, if ζ ≥pn µˆzi + (1 −µ)ˆzi+1 if ζ = µpi + (1 −µ)pi+1 (6) 3.1 Squared loss minimization A natural approach to the monotonic matrix completion problem is to learn g⋆, Z⋆via squared loss minimization. In order to do this we need to solve the following optimization problem: min g,Z X Ω (g(Zi,j) −Xi,j)2 g : R →R is L-Lipschitz and monotonic rank(Z) ≤r. (7) The problem is a non-convex optimization problem individually in parameters g, Z. A reasonable approach to solve this optimization problem would be to perform optimization w.r.t. each variable while keeping the other variable fixed. For instance, in iteration t, while estimating Z one would keep g fixed, to say gt−1, and then perform projected gradient descent w.r.t. Z. This leads to the following updates for Z: Zt i,j ←Zt−1 i,j −η(gt−1(Zt−1 i,j ) −Xi,j)(gt−1)′(Zt−1 i,j ) , ∀(i, j) ∈Ω (8) Zt ←Pr(Zt) (9) where η > 0 is a step-size used in our projected gradient descent procedure, and Pr is projection on the rank r cone. The above update involves both the function gt−1 and its derivative (gt−1)′. Since our link function is monotonic, one can use the LPAV algorithm to estimate this link function gt−1. Furthermore since LPAV estimates gt−1 as a piece-wise linear function, the function has a sub-differential everywhere and the sub-differential (gt−1)′ can be obtained very cheaply. Hence, the projected gradient update shown in equation (8) along with the LPAV algorithm can be iteratively used to learn estimates for Z⋆and g⋆. We shall call this algorithm as MMC−LS. Incorrect estimation of gt−1 will also lead to incorrect estimation of the derivative (gt−1)′. Hence, we would expect MMC−LS to be less accurate than a learning algorithm that does not have to estimate (gt−1)′. We next outline an approach that provides a principled way to derive updates for Zt and gt that does not require us to estimate derivatives of the transfer function, as in MMC−LS. 3.2 Minimization of a calibrated loss function and the MMC algorithm. Let Φ : R →R be a differentiable function that satisfies Φ′ = g⋆. Furthermore, since g⋆is a monotonic function, Φ will be a convex loss function. Now, suppose g⋆(and hence Φ) is known. Consider the following function of Z L(Z; Φ, Ω) = EX X (i,j)∈Ω Φ(Zi,j) −Xi,jZi,j . (10) The above loss function is convex in Z, since Φ is convex. Differentiating the expression on the R.H.S. of Equation 10 w.r.t. Z, and setting it to 0, we get X (i,j)∈Ω g⋆(Zi,j) −EXi,j = 0. (11) 4LPAV stands for Lipschitz Pool Adjacent Violator 4 The MMC model shown in Equation (3) satisfies Equation (11) and is therefore a minimizer of the loss function L(Z; Φ, Ω). Hence, the loss function (10) is “calibrated” for the MMC model that we are interested in. The idea of using calibrated loss functions was first introduced for learning single index models [25]. When the transfer function is identity, Φ is a quadratic function and we get the squared loss approach that we discussed in section (3.1). The above discussion assumes that g⋆is known. However in the MMC model this is not the case. To get around this problem, we consider the following optimization problem min Φ,Z L(Φ, Z; Ω) = min Φ,Z EX X (i,j)∈Ω Φ(Zi,j) −Xi,jZi,j (12) where Φ : R →R is a convex function, with Φ′ = g and Z ∈Rm×n is a low-rank matrix. Since, we know that g⋆is a Lipschitz, monotonic function, we shall solve a constrained optimization problem that enforces Lipschitz constraints on g and low rank constraints on Z. We consider the sample version of the optimization problem shown in equation (12). min Φ rank(Z)≤r L(Φ, Z; Ω) = min Φ,Z X (i,j)∈Ω Φ(Zi,j) −Xi,jZi,j (13) The pseudo-code of our algorithm MMC that solves the above optimization problem (13) is shown in algorithm (1). MMC optimizes for Φ and Z alternatively, where we fix one variable and update another. At the start of iteration t, we have at our disposal iterates ˆgt−1, and Zt−1. To update our estimate of Z, we perform gradient descent with fixed Φ such that Φ′ = ˆgt−1. Notice that the objective in equation (13) is convex w.r.t. Z. This is in contrast to the least squares objective where the objective in equation (7) is non-convex w.r.t. Z. The gradient of L(Z; Φ) w.r.t. Z is ∇Zi,jL(Z; Φ) = X (i,j)∈Ω ˆgt−1( ˆZt−1 i,j ) −Xi,j. (14) Gradient descent updates on ˆZt−1 using the above gradient calculation leads to an update of the form ˆZt i,j ←ˆZt−1 i,j −η(ˆgt−1( ˆZt−1 i,j ) −Xi,j)1(i,j)∈Ω ˆZt ←Pr( ˆZt) (15) Equation (15) projects matrix ˆZt onto a cone of matrices of rank r. This entails performing SVD on ˆZt and retaining the top r singular vectors and singular values while discarding the rest. This is done in steps 4, 5 of Algorithm (1). As can be seen from the above equation we do not need to estimate derivative of ˆgt−1. This, along with the convexity of the optimization problem in Equation (13) w.r.t. Z for a given Φ are two of the key advantages of using a calibrated loss function over the previously proposed squared loss minimization formulation. Optimization over Φ. In round t of algorithm (1), we have ˆZt after performing steps 4, 5. Differentiating the objective function in equation (13) w.r.t. Z, we get that the optimal Φ function should satisfy X (i,j)∈Ω ˆgt( ˆZt i,j) −Xi,j = 0, (16) where Φ′ = ˆgt. This provides us with a strategy to calculate ˆgt. Let, ˆXi,j def= ˆgt( ˆZt i,j). Then solving the optimization problem in equation (16) is equivalent to solving the following optimization problem. min ˆ X X (i,j)∈Ω ( ˆXi,j −Xi,j)2 subject to: 0 ≤−ˆXi,j + ˆXk,l ≤L( ˆZt k,l −ˆZt i,j) if ˆZt i,j ≤ˆZt k,l, (i, j) ∈Ω, (k, l) ∈Ω (17) where L is the Lipschitz constant of g⋆. We shall assume that L is known and does not need to be estimated. The gradient, w.r.t. ˆX, of the objective function, in equation (17), when set to zero is 5 the same as Equation (16). The constraints enforce monotonicity of ˆgt and the Lipschitz property of ˆgt. The above optimization routine is exactly the LPAV algorithm. The solution ˆX obtained from solving the LPAV problem can be used to define ˆgt on XΩ. These two steps are repeated for T iterations. After T iterations we have ˆgT defined on ˆZT Ω. In order to define ˆgT everywhere else on the real line we perform linear interpolation as shown in equation (6). Algorithm 1 Monotonic Matrix Completion (MMC) Input: Parameters η > 0, T > 0, r, Data:XΩ, Ω Output: ˆ M = ˆgT ( ˆZT ) 1: Initialize ˆZ0 = mn |Ω| XΩ, where XΩis the matrix X with zeros filled in at the unobserved locations. 2: Initialize ˆg0(z) = |Ω| mnz 3: for t = 1, . . . , T do 4: ˆZt i,j ←ˆZt−1 i,j −η(ˆgt−1( ˆZt−1 i,j ) −Xi,j)1(i,j)∈Ω 5: ˆZt ←Pr( ˆZt) 6: Solve the optimization problem in (17) to get ˆX 7: Set ˆgt( ˆZt i,j) = ˆXi,j for all (i, j) ∈Ω. 8: end for 9: Obtain ˆgT on the entire real line using linear interpolation shown in equation (6). Let us now explain our initialization procedure. Define XΩ def= P|Ω| j=1 X ◦∆j, where each ∆j is a boolean mask with zeros everywhere and a 1 at an index corresponding to the index of an observed entry. A ◦B is the Hadamard product, i.e. entry-wise product of matrices A, B. We have |Ω| such boolean masks each corresponding to an observed entry. We initialize ˆZ0 Ωto mn |Ω| XΩ= mn |Ω| P|Ω| j=1 X ◦∆j. Because each observed index is assumed to be sampled uniformly at random with replacement, our initialization is guaranteed to be an unbiased estimate of X. 4 MSE Analysis of MMC We shall analyze our algorithm, MMC, for the case of T = 1, under the modeling assumption shown in Equations (4) and (3). Additionally, we will assume that the matrices Z⋆and M ⋆are bounded entry-wise in absolute value by 1. When T = 1, the MMC algorithm estimates ˆZ, ˆg and ˆ M as follows ˆZ = Pr mnXΩ |Ω| . (18) ˆg is obtained by solving the LPAV problem from Equation (17) with ˆZ shown in Equation (18). This allows us to define ˆ Mi,j = ˆg( ˆZi,j), ∀i = [n], j = [m]. Define the mean squared error (MSE) of our estimate ˆ M as MSE( ˆ M) = E 1 mn n X i=1 m X j=1 ( ˆ Mi,j −Mi,j)2 . (19) Denote by ||M|| the spectral norm of a matrix M. We need the following additional technical assumptions: A1. ∥Z⋆∥= O(√n). A2. σr+1(X) = ˜O(√n) with probability at least 1 −δ, where ˜O hides terms logarithmic in 1/δ. Z⋆has entries bounded in absolute value by 1. This means that in the worst case, ||Z⋆|| = √mn. Assumption A1 requires that the spectral norm of Z⋆is not very large. Assumption A2 is a weak assumption on the decay of the spectrum of M ⋆. By assumption X = M ⋆+ N. Applying Weyl’s 6 inequality we get σr+1(X) ≤σr+1(M ⋆) + σ1(N). Since N is a zero-mean noise matrix with independent bounded entries, N is a matrix with sub-Gaussian entries. This means that σ1(N) = ˜O(√n) with high probability. Hence, assumption A2 can be interpreted as imposing the condition σr+1(M ⋆) = O(√n). This means that while M ⋆could be full rank, the (r + 1)th singular value of M ⋆cannot be too large. Theorem 1. Let µ1 def= E||N||, µ2 def= E||N||2. Let α = ||M ⋆−Z⋆||. Then, under assumptions A1 and A2, the MSE of the estimator output by MMC with T = 1 is given by MSE( ˆ M) = O r r m + p mn log(n) |Ω| + mn |Ω|3/2 + s r m√n µ1 + µ2 √n + s rα m√n 1 + α √n + s rmn log2(n) |Ω|2 ! . (20) where O(·) notation hides universal constants, and the Lipschitz constant L of g⋆. We would like to mention that the result derived for MMC-1 can be made to hold true for T > 1, by an additional large deviation argument. Interpretation of our results: Our upper bounds on the MSE of MMC depends on the quantity α = ||M ⋆−Z⋆||, and µ1, µ2. Since matrix N has independent zero-mean entries which are bounded in absolute value by 1, N is a sub-Gaussian matrix with independent entries. For such matrices µ1 = O(√n), µ2 = O(n) (see Theorem 5.39 in [26]). With these settings we can simplify the expression in Equation (20) to MSE( ˆ M) = ˜O r r m + p mn log(n) |Ω| + mn |Ω|3/2 + s rα m√n 1 + α √n + s rmn log2(n) |Ω|2 ! . A remarkable fact about our sample complexity results is that the sample complexity is independent of the rank of matrix M ⋆, which could be large. Instead it depends on the rank of matrix Z⋆which we assume to be small. The dependence on M ⋆is via the term α = ||M ⋆−Z⋆||. From equation (4) it is evident that the best error guarantees are obtained when α = O(√n). For such values of α equation (4) reduces to, MSE( ˆ M) = ˜O r r m + p mn log(n) |Ω| + mn |Ω|3/2 + √mn |Ω| + s rmn log2(n) |Ω|2 ! . This result can be converted into a sample complexity bound as follows. If we are given |Ω| = ˜O( mn ϵ 2/3), then MSE( ˆ M) ≤p r m + ϵ. It is important to note that the floor of the MSE is p r m, which depends on the rank of Z⋆and not on rank(M ⋆), which can be much larger than r. 5 Experimental results We compare the performance of MMC−1, MMC−c, MMC- LS, and nuclear norm based low-rank matrix completion (LRMC) [4] on various synthetic and real world datasets. The objective metric that we use to compare different algorithms is the root mean squared error (RMSE) of the algorithms on unobserved, test indices of the incomplete matrix. 5.1 Synthetic experiments For our synthetic experiments we generated a random 30 × 20 matrix Z⋆of rank 5 by taking the product of two random Gaussian matrices of size n × r, and r × m, with n = 30, m = 20, r = 5. The matrix M ⋆was generated using the function, g⋆(M ⋆ i,j) = 1/(1 + exp(−cZ⋆ i,j)), where c > 0. By increasing c, we increase the Lipschitz constant of the function g⋆, making the matrix completion task harder. For large enough c, Mi,j ≈sgn(Zi,j). We consider the noiseless version of the problem where X = M ⋆. Each entry in the matrix X was sampled with probability p, and the sampled entries are observed. This makes E|Ω| = mnp. For our implementations we assume that r is unknown, 7 0
0.1
0.2
0.3
0.4
0.5
LRMC
MMC-‐LS
MMC-‐1
MMC-‐c
RMSE
on
test
data
c=1.0
p=0.2
p=0.35
p=0.5
p=0.7
0
0.2
0.4
0.6
0.8
LRMC
MMC-‐LS
MMC-‐1
MMC-‐c
RMSE
on
test
data
c=10
p=0.2
p=0.35
p=0.5
p=0.7
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
LRMC
MMC-‐LS
MMC-‐1
MMC-‐c
RMSE
on
test
data
c=40
p=0.2
p=0.35
p=0.5
p=0.7
Figure 2: RMSE of different methods at different values of c. and estimate it either (i) via the use of a dedicated validation set in the case of MMC −1 or (ii) adaptively, where we progressively increase the estimate of our rank until a sufficient decrease in error over the training set is achieved [13]. For an implementation of the LRMC algorithm we used a standard off-the-shelf implementation from TFOCS [27]. In order to speed up the run time of MMC, we also keep track of the training set error, and terminate iterations if the relative residual on the training set goes below a certain threshold 5. In the supplement we provide a plot that demonstrates that, for MMC−c, the RMSE on the training dataset has a decreasing trend and reaches the required threshold in at most 50 iterations. Hence, we set T = 50. Figure (2) show the RMSE of each method for different values of p, c. As one can see from figure (2), the RMSE of all the methods improves for any given c as p increases. This is expected since as p increases E|Ω| = pmn also increases. As c increases, g⋆becomes steeper increasing the effective rank of X. This makes matrix completion task hard. For small p, such as p = 0.2, MMC −1 is competitive with MMC −c and MMC−LS and is often the best. In fact for small p, irrespective of the value of c, LRMC is far inferior to other methods. For larger p, MMC −c works the best achieving smaller RMSE over other methods. 5.2 Experiments on real datasets We performed experimental comparisons on four real world datasets: paper recommendation, Jester3, ML-100k, Cameraman. All of the above datasets, except the Cameraman dataset, are ratings datasets, where users have rated a few of the several different items. For the Jester-3 dataset we used 5 randomly chosen ratings for each user for training, 5 randomly chosen rating for validation and the remaining for testing. ML-100k comes with its own training and testing dataset. We used 20% of the training data for validation. For the Cameraman and the paper recommendation datasets 20% of the data was used for training, 20% for validation and the rest for testing. The baseline algorithm chosen for low rank matrix completion is LMaFit-A [13] 6. For each of the datasets we report the RMSE of MMC −1, MMC −c, and LMaFit-A on the test sets. We excluded MMC-LS from these experiments because in all of our datasets the number of observed entries is a very small fraction of the total number of entries, and from our results on synthetic datasets we know that MMC−LS is not the best performing algorithm in such cases. Table 1 shows the RMSE over the test set of the different matrix completion methods. As we see the RMSE of MMC −c is the smallest of all the methods, surpassing LMaFit-A by a large margin. Table 1: RMSE of different methods on real datasets. Dataset Dimensions |Ω| r0.01(X) LMaFit-A MMC −1 MMC −c PaperReco 3426 × 50 34294 47 0.4026 0.4247 0.2965 Jester-3 24938 × 100 124690 66 6.8728 5.327 5.2348 ML-100k 1682 × 943 64000 391 3.3101 1.388 1.1533 Cameraman 1536 × 512 157016 393 0.0754 0.1656 0.06885 6 Conclusions and future work We have investigated a new framework and for high rank matrix completion problems called monotonic matrix completion and proposed new algorithms. In the future we would like to investigate if one could relax improve the theoretical results. 5For our experiments this threshold is set to 0.001. 6http://lmafit.blogs.rice.edu/. The parameter k in the LMaFit algorithm was set to effective rank, and we used est rank=1 for LMaFit-A. 8 References [1] Prem Melville and Vikas Sindhwani. Recommender systems. In Encyclopedia of machine learning. Springer, 2010. [2] Mihai Cucuringu. Graph realization and low-rank matrix completion. PhD thesis, Princeton University, 2012. [3] Benjamin Recht. A simpler approach to matrix completion. JMLR, 12:3413–3430, 2011. [4] Emmanuel J Cand`es and Benjamin Recht. Exact matrix completion via convex optimization. FOCM, 9(6):717–772, 2009. [5] Emmanuel J Candes and Yaniv Plan. Matrix completion with noise. Proceedings of the IEEE, 98(6):925– 936, 2010. [6] Sahand Negahban and Martin J Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. The Journal of Machine Learning Research, 13(1):1665–1697, 2012. [7] Raghunandan H Keshavan, Andrea Montanari, and Sewoong Oh. Matrix completion from a few entries. Information Theory, IEEE Transactions on, 56(6):2980–2998, 2010. [8] David Gross. Recovering low-rank matrices from few coefficients in any basis. Information Theory, IEEE Transactions on, 57(3):1548–1566, 2011. [9] Jon Dattorro. Convex optimization & Euclidean distance geometry. Lulu. com, 2010. [10] Bart Vandereycken. Low-rank matrix completion by riemannian optimization. SIAM Journal on Optimization, 23(2):1214–1236, 2013. [11] Mingkui Tan, Ivor W Tsang, Li Wang, Bart Vandereycken, and Sinno J Pan. Riemannian pursuit for big matrix recovery. In ICML, pages 1539–1547, 2014. [12] Zheng Wang, Ming-Jun Lai, Zhaosong Lu, Wei Fan, Hasan Davulcu, and Jieping Ye. Rank-one matrix pursuit for matrix completion. In ICML, pages 91–99, 2014. [13] Zaiwen Wen, Wotao Yin, and Yin Zhang. Solving a low-rank factorization model for matrix completion by a nonlinear successive over-relaxation algorithm. Mathematical Programming Computation, 2012. [14] Brian Eriksson, Laura Balzano, and Robert Nowak. High-rank matrix completion. In AISTATS, 2012. [15] Congyuan Yang, Daniel Robinson, and Rene Vidal. Sparse subspace clustering with missing entries. In ICML, 2015. [16] Mahdi Soltanolkotabi, Emmanuel J Candes, et al. A geometric analysis of subspace clustering with outliers. The Annals of Statistics, 40(4):2195–2238, 2012. [17] Ehsan Elhamifar and Rene Vidal. Sparse subspace clustering: Algorithm, theory, and applications. TPAMI, 2013. [18] Aarti Singh, Akshay Krishnamurthy, Sivaraman Balakrishnan, and Min Xu. Completion of high-rank ultrametric matrices using selective entries. In SPCOM, pages 1–5. IEEE, 2012. [19] Oluwasanmi Koyejo, Sreangsu Acharyya, and Joydeep Ghosh. Retargeted matrix factorization for collaborative filtering. In Proceedings of the 7th ACM conference on Recommender systems, pages 49–56. ACM, 2013. [20] Mark A Davenport, Yaniv Plan, Ewout van den Berg, and Mary Wootters. 1-bit matrix completion. Information and Inference, 3(3):189–223, 2014. [21] Sham M Kakade, Varun Kanade, Ohad Shamir, and Adam Kalai. Efficient learning of generalized linear and single index models with isotonic regression. In NIPS, 2011. [22] Adam Tauman Kalai and Ravi Sastry. The isotron algorithm: High-dimensional isotonic regression. In COLT, 2009. [23] Hidehiko Ichimura. Semiparametric least squares (sls) and weighted sls estimation of single-index models. Journal of Econometrics, 58(1):71–120, 1993. [24] Joel L Horowitz and Wolfgang H¨ardle. Direct semiparametric estimation of single-index models with discrete covariates. Journal of the American Statistical Association, 91(436):1632–1640, 1996. [25] Alekh Agarwal, Sham Kakade, Nikos Karampatziakis, Le Song, and Gregory Valiant. Least squares revisited: Scalable approaches for multi-class prediction. In ICML, pages 541–549, 2014. [26] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [27] Stephen Becker, E Candes, and M Grant. Tfocs: Flexible first-order methods for rank minimization. In Low-rank Matrix Optimization Symposium, SIAM Conference on Optimization, 2011. 9 | 2015 | 375 |
5,897 | Principal Geodesic Analysis for Probability Measures under the Optimal Transport Metric Vivien Seguy Graduate School of Informatics Kyoto University vivien.seguy@iip.ist.i.kyoto-u.ac.jp Marco Cuturi Graduate School of Informatics Kyoto University mcuturi@i.kyoto-u.ac.jp Abstract Given a family of probability measures in P(X), the space of probability measures on a Hilbert space X, our goal in this paper is to highlight one ore more curves in P(X) that summarize efficiently that family. We propose to study this problem under the optimal transport (Wasserstein) geometry, using curves that are restricted to be geodesic segments under that metric. We show that concepts that play a key role in Euclidean PCA, such as data centering or orthogonality of principal directions, find a natural equivalent in the optimal transport geometry, using Wasserstein means and differential geometry. The implementation of these ideas is, however, computationally challenging. To achieve scalable algorithms that can handle thousands of measures, we propose to use a relaxed definition for geodesics and regularized optimal transport distances. The interest of our approach is demonstrated on images seen either as shapes or color histograms. 1 Introduction Optimal transport distances (Villani, 2008), a.k.a Wasserstein or earth mover’s distances, define a powerful geometry to compare probability measures supported on a metric space X. The Wasserstein space P(X)—the space of probability measures on X endowed with the Wasserstein distance—is a metric space which has received ample interest from a theoretical perspective. Given the prominent role played by probability measures and feature histograms in machine learning, the properties of P(X) can also have practical implications in data science. This was shown by Agueh and Carlier (2011) who described first Wasserstein means of probability measures. Wasserstein means have been recently used in Bayesian inference (Srivastava et al., 2015), clustering (Cuturi and Doucet, 2014), graphics (Solomon et al., 2015) or brain imaging (Gramfort et al., 2015). When X is not just metric but also a Hilbert space, P(X) is an infinite-dimensional Riemannian manifold (Ambrosio et al. 2006, Chap. 8; Villani 2008, Part II). Three recent contributions by Boissard et al. (2015, §5.2), Bigot et al. (2015) and Wang et al. (2013) exploit directly or indirectly this structure to extend Principal Component Analysis (PCA) to P(X). These important seminal papers are, however, limited in their applicability and/or the type of curves they output. Our goal in this paper is to propose more general and scalable algorithms to carry out Wasserstein principal geodesic analysis on probability measures, and not simply dimensionality reduction as explained below. Principal Geodesics in P(X) vs. Dimensionality Reduction on P(X) We provide in Fig. 1 a simple example that illustrates the motivation of this paper, and which also shows how our approach differentiates itself from existing dimensionality reduction algorithms (linear and non-linear) that draw inspiration from PCA. As shown in Fig. 1, linear PCA cannot produce components that remain in P(X). Even more advanced tools, such as those proposed by Hastie and Stuetzle (1989), fall slightly short of that goal. On the other hand, Wasserstein geodesic analysis yields geodesic components in P(X) that are easy to interpret and which can also be used to reduce dimensionality. 1 P(X) Wasserstein Principal Geodesics Euclidean Principal Components Principal Curve Figure 1: (top-left) Dataset: 60 × 60 images of a single Chinese character randomly translated, scaled and slightly rotated (36 images displayed out of 300 used). Each image is handled as a normalized histogram of 3, 600 non-negative intensities. (middle-left) Dataset schematically drawn on P(X). The Wasserstein principal geodesics of this dataset are depicted in red, its Euclidean components in blue, and its principal curve (Verbeek et al., 2002) in yellow. (right) Actual curves (blue colors depict negative intensities, green intensities ≥1). Neither the Euclidean components nor the principal curve belong to P(X), nor can they be interpreted as meaningful axis of variation. Foundations of PCA and Riemannian Extensions Carrying out PCA on a family (x1, . . . , xn) of points taken in a space X can be described in abstract terms as: (i) define a mean element ¯x for that dataset; (ii) define a family of components in X, typically geodesic curves, that contain ¯x; (iii) fit a component by making it follow the xi’s as closely as possible, in the sense that the sum of the distances of each point xi to that component is minimized; (iv) fit additional components by iterating step (iii) several times, with the added constraint that each new component is different (orthogonal) enough to the previous components. When X is Euclidean and the xi’s are vectors in Rd, the (n + 1)-th component vn+1 can be computed iteratively by solving: vn+1 ∈ argmin v∈V ⊥ n ,||v||2=1 N X i=1 min t∈R ∥xi −(¯x + tv)∥2 2, where V0 def. = ∅, and Vn def. = span{v1, · · · , vn}. (1) Since PCA is known to boil down to a simple eigen-decomposition when X is Euclidean or Hilbertian (Sch¨olkopf et al., 1997), Eq. (1) looks artificially complicated. This formulation is, however, extremely useful to generalize PCA to Riemannian manifolds (Fletcher et al., 2004). This generalization proceeds first by replacing vector means, lines and orthogonality conditions using respectively Fr´echet means (1948), geodesics, and orthogonality in tangent spaces. Riemannian PCA builds then upon the knowledge of the exponential map at each point x of the manifold X. Each exponential map expx is locally bijective between the tangent space Tx of x and X. After computing the Fr´echet mean ¯x of the dataset, the logarithmic map log¯x at ¯x (the inverse of exp¯x) is used to map all data points xi onto T¯x. Because T¯x is a Euclidean space by definition of Riemannian manifolds, the dataset (log¯x xi)i can be studied using Euclidean PCA. Principal geodesics in X can then be recovered by applying the exponential map to a principal component v⋆, {exp¯x(tv⋆), |t| < ε}. From Riemannian PCA to Wasserstein PCA: Related Work As remarked by Bigot et al. (2015), Fletcher et al.’s approach cannot be used as it is to define Wasserstein geodesic PCA, because P(X) is infinite dimensional and because there are no known ways to define exponential maps which are locally bijective between Wasserstein tangent spaces and the manifold of probability measures. To circumvent this problem, Boissard et al. (2015), Bigot et al. (2015) have proposed to formulate the geodesic PCA problem directly as an optimization problem over curves in P(X). 2 Boissard et al. and Bigot et al. study the Wasserstein PCA problem in restricted scenarios: Bigot et al. focus their attention on measures supported on X = R, which considerably simplifies their analysis since it is known in that case that the Wasserstein space P(R) can be embedded isometrically in L1(R); Boissard et al. assume that each input measure has been generated from a single template density (the mean measure) which has been transformed according to one “admissible deformation” taken in a parameterized family of deformation maps. Their approach to Wasserstein PCA boils down to a functional PCA on such maps. Wang et al. proposed a more general approach: given a family of input empirical measures (µ1, . . . , µN), they propose to compute first a “template measure” ˜µ using k-means clustering on P i µi. They consider next all optimal transport plans πi between that template ˜µ and each of the measures µi, and propose to compute the barycentric projection (see Eq. 8) of each optimal transport plan πi to recover Monge maps Ti, on which standard PCA can be used. This approach is computationally attractive since it requires the computation of only one optimal transport per input measure. Its weakness lies, however, in the fact that the curves in P(X) obtained by displacing ˜µ along each of these PCA directions are not geodesics in general. Contributions and Outline We propose a new algorithm to compute Wasserstein Principal Geodesics (WPG) in P(X) for arbitrary Hilbert spaces X. We use several approximations—both of the optimal transport metric and of its geodesics—to obtain tractable algorithms that can scale to thousands of measures. We provide first in §2 a review of the key concepts used in this paper, namely Wasserstein distances and means, geodesics and tangent spaces in the Wasserstein space. We propose in §3 to parameterize a Wasserstein principal component (PC) using two velocity fields defined on the support of the Wasserstein mean of all measures, and formulate the WPG problem as that of optimizing these velocity fields so that the average distance of all measures to that PC is minimal. This problem is non-convex and non-smooth. We propose to optimize smooth upperbounds of that objective using entropy regularized optimal transport in §4. The practical interest of our approach is demonstrated in §5 on toy samples, datasets of shapes and histograms of colors. Notations We write ⟨A, B ⟩for the Frobenius dot-product of matrices A and B. D(u) is the diagonal matrix of vector u. For a mapping f : Y →Y, we say that f acts on a measure µ ∈P(Y) through the pushforward operator # to define a new measure f#µ ∈P(Y). This measure is characterized by the identity (f#µ)(B) = µ(f −1(B)) for any Borel set B ⊂Y. We write p1 and p2 for the canonical projection operators X 2 →X, defined as p1(x1, x2) = x1 and p2(x1, x2) = x2. 2 Background on Optimal Transport Wasserstein Distances We start this section with the main mathematical object of this paper: Definition 1. (Villani, 2008, Def. 6.1) Let P(X) the space of probability measures on a Hilbert space X. Let Π(ν, η) be the set of probability measures on X 2 with marginals ν and η, i.e. p1#π = ν and p2#π = η. The squared 2-Wasserstein distance between ν and η in P(X) is defined as: W 2 2 (ν, η) = inf π∈Π(ν,η) Z X 2 ∥x −y∥2 X dπ(x, y). (2) Wasserstein Barycenters Given a family of N probability measures (µ1, · · · , µN) in P(X) and weights λ ∈RN +, Agueh and Carlier (2011) define ¯µ, the Wasserstein barycenter of these measures: ¯µ ∈argmin ν∈P (X) N X i=1 λiW 2 2 (µi, ν). Our paper relies on several algorithms which have been recently proposed (Benamou et al., 2015; Bonneel et al., 2015; Carlier et al., 2015; Cuturi and Doucet, 2014) to compute such barycenters. Wasserstein Geodesics Given two measures ν and η, let Π⋆(ν, η) be the set of optimal couplings for Eq. (2). Informally speaking, it is well known that if either ν or η are absolutely continuous measures, then any optimal coupling π⋆∈Π⋆(ν, η) is degenerated in the sense that, assuming for instance that ν is absolutely continuous, for all x in the support of ν only one point y ∈X is such that dπ⋆(x, y) > 0. In that case, the optimal transport is said to have no mass splitting, and 3 there exists an optimal mapping T : X →X such that π⋆can be written, using a pushforward, as π⋆= (id×T)#ν. When there is no mass splitting to transport ν to η, McCann’s interpolant (1997): gt = ((1 −t)id + tT)#ν, t ∈[0, 1], (3) defines a geodesic curve in the Wasserstein space, i.e. (gt)t is locally the shortest path between any two measures located on the geodesic, with respect to W2. In the more general case, where no optimal map T exists and mass splitting occurs (for some locations x one may have dπ⋆(x, y) > 0 for several y), then a geodesic can still be defined, but it relies on the optimal plan π⋆instead: gt = ((1−t)p1 +tp2)#π⋆, t ∈[0, 1], (Ambrosio et al., 2006, §7.2). Both cases are shown in Fig. 2. 1.3 1.4 1.5 1.6 1.7 1.8 0 0.1 0.2 0.3 0.4 η ν geodesic g1/3 g2/3 0.8 1 1.2 1.4 1.6 0.5 0.55 0.6 0.65 0.7 η ν geodesic g1/3 g2/3 Figure 2: Both plots display geodesic curves between two empirical measures ν and η on R2. An optimal map exists in the left plot (no mass splitting occurs), whereas some of the mass of ν needs to be split to be transported onto η on the right plot. Tangent Space and Tangent Vectors We briefly describe in this section the tangent spaces of P(X), and refer to (Ambrosio et al., 2006, Chap. 8) for more details. Let µ : I ⊂R →P(X) be a curve in P(X). For a given time t, the tangent space of P(X) at µt is a subset of L2(µt, X), the space of square-integrable velocity fields supported on Supp(µt). At any t, there exists tangent vectors vt in L2(µt, X) such that limh→0 W2(µt+h, (id + hvt)#µt)/|h| = 0. Given a geodesic curve in P(X) parameterized as Eq. (3), its corresponding tangent vector at time zero is v = T −id. 3 Wasserstein Principal Geodesics Geodesic Parameterization The goal of principal geodesic analysis is to define geodesic curves in P(X) that go through the mean ¯µ and which pass close enough to all target measures µi. To that end, geodesic curves can be parameterized with two end points ν and η. However, to avoid dealing with the constraint that a principal geodesic needs to go through ¯µ, one can start instead from ¯µ, and consider a velocity field v ∈L2(¯µ, X) which displaces all of the mass of ¯µ in both directions: gt(v) def. = (id + tv) #¯µ, t ∈[−1, 1]. (4) Lemma 7.2.1 of Ambrosio et al. (2006) implies that any geodesic going through ¯µ can be written as Eq. (4). Hence, we do not lose any generality using this parameterization. However, given an arbitrary vector field v, the curve (gt(v))t is not necessarily a geodesic. Indeed, the maps id ± v are not necessarily in the set C¯µ def. = {r ∈L2(¯µ, X)|(id×r)#¯µ ∈Π⋆(¯µ, r#¯µ)} of maps that are optimal when moving mass away from ¯µ. Ensuring thus, at each step of our algorithm, that v is still such that (gt(v))t is a geodesic curve is particularly challenging. To relax this strong assumption, we propose to use a generalized formulation of geodesics, which builds upon not one but two velocity fields, as introduced by Ambrosio et al. (2006, §9.2): Definition 2. (adapted from (Ambrosio et al., 2006, §9.2)) Let σ, ν, η ∈P(X), and assume there is an optimal mapping T (σ,ν) from σ to ν and an optimal mapping T (σ,η) from σ to η. A generalized geodesic, illustrated in Fig. 3 between ν and η with base σ is defined by, gt = (1 −t)T (σ,ν) + tT (σ,η) #σ, t ∈[0, 1]. Choosing ¯µ as the base measure in Definition 2, and two fields v1, v2 such that id −v1, id + v2 are optimal mappings (in C¯µ), we can define the following generalized geodesic gt(v1, v2): gt(v1, v2) def. = (id −v1 + t(v1 + v2)) #¯µ, for t ∈[0, 1]. (5) 4 Generalized geodesics become true geodesics when v1 and v2 are positively proportional. We can thus consider a regularizer that controls the deviation from that property by defining Ω(v1, v2) = (⟨v1, v2 ⟩L2(¯µ,X) −∥v1∥L2(¯µ,X)∥v2∥L2(¯µ,X))2, which is minimal when v1 and v2 are indeed positively proportional. We can now formulate the WPG problem as computing, for n ≥0, the (n+1)th principal (generalized) geodesic component of a family of measures (µi)i by solving, with λ > 0: min v1,v2∈L2(¯µ,X) λΩ(v1, v2) + N X i=1 min t∈[0,1]W 2 2 (gt(v1, v2), µi), s.t. ( id −v1, id + v2 ∈C¯µ, v1+v2 ∈span({v(i) 1 + v(i) 2 }i≤n)⊥. (6) 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 σ ν η gσ → ν gσ → η g g1/3 g2/3 Figure 3: Generalized geodesic interpolation between two empirical measures ν and η using the base measure σ, all defined on X = R2. This problem is not convex in v1, v2. We propose to find an approximation of that minimum by a projected gradient descent, with a projection that is to be understood in terms of an alternative metric on the space of vector fields L2(¯µ, X). To preserve the optimality of the mappings id −v1 and id + v2 between iterations, we introduce in the next paragraph a suitable projection operator on L2(¯µ, X). Remark 1. A trivial way to ensure that (gt(v))t is geodesic is to impose that the vector field v is a translation, namely that v is uniformly equal to a vector τ on all of Supp(¯µ). One can show in that case that the WPG problem described in Eq. (6) outputs an optimal vector τ which is the Euclidean principal component of the family formed by the means of each measure µi. Projection on the Optimal Mapping Set We use a projected gradient descent method to solve Eq. (6) approximately. We will compute the gradient of a local upper-bound of the objective of Eq. (6) and update v1 and v2 accordingly. We then need to ensure that v1 and v2 are such that id−v1 and id + v2 belong to the set of optimal mappings C¯µ. To do so, we would ideally want to compute the projection r2 of id + v2 in C¯µ r2 = argmin r∈C¯µ ∥(id + v2) −r∥2 L2(¯µ,X), (7) to update v2 ←r2 −id. Westdickenberg (2010) has shown that the set of optimal mappings C¯µ is a convex closed cone in L2(¯µ, X), leading to the existence and the unicity of the solution of Eq. (7). However, there is to our knowledge no known method to compute the projection r2 of id + v2. There is nevertheless a well known and efficient approach to find a mapping r2 in C¯µ which is close to id + v2. That approach, known as the the barycentric projection, requires to compute first an optimal coupling π⋆between ¯µ and (id + v2)#¯µ, to define then a (conditional expectation) map Tπ⋆(x) def. = Z X ydπ⋆(y|x). (8) Ambrosio et al. (2006, Theorem 12.4.4) or Reich (2013, Lemma 3.1) have shown that Tπ⋆is indeed an optimal mapping between ¯µ and Tπ⋆#¯µ. We can thus set the velocity field as v2 ←Tπ⋆−id to carry out an approximate projection. We show in the supplementary material that this operator can be in fact interpreted as a projection under a pseudo-metric GW¯µ on L2(¯µ, X). 4 Computing Principal Generalized Geodesics in Practice We show in this section that when X = Rd, the steps outlined above can be implemented efficiently. Input Measures and Their Barycenter Each input measure in the family (µ1, · · · , µN) is a finite weighted sum of Diracs, described by ni points contained in a matrix Xi of size d × ni, and a (nonnegative) weight vector ai of dimension ni summing to 1. The Wasserstein mean of these measures is given and equal to ¯µ = Pp k=1 bkδyk, where the nonnegative vector b = (b1, · · · , bp) sums to one, and Y = [y1, · · · , yp] ∈Rd×p is the matrix containing locations of ¯µ. 5 Generalized Geodesic Two velocity vectors for each of the p points in ¯µ are needed to parameterize a generalized geodesic. These velocity fields will be represented by two matrices V1 = [v1 1, · · · , v1 p] and V2 = [v2 1, · · · , v2 p] in Rd×p. Assuming that these velocity fields yield optimal mappings, the points at time t of that generalized geodesic are the measures parameterized by t, gt(V1, V2) = p X k=1 bkδzt k, with locations Zt = [zt 1, . . . , zt p] def. = Y −V1 + t(V1 + V2). The squared 2-Wasserstein distance between datum µi and a point gt(V1, V2) on the geodesic is: W 2 2 (gt(V1, V2), µi) = min P ∈U(b,ai)⟨P, MZtXi ⟩, (9) where U(b, ai) is the transportation polytope {P ∈Rp×ni + , P1ni = b, P T 1p = ai}, and MZtXi stands for the p × ni matrix of squared-Euclidean distances between the p and ni column vectors of Zt and Xi respectively. Writing zt = D(ZT t Zt) and xi = D(XT i Xi), we have that MZtXi = zt1T ni + 1pxT i −2ZT t Xi ∈Rp×ni, which, by taking into account the marginal conditions on P ∈U(b, ai), leads to, ⟨P, MZtXi ⟩= bT zt + aT i xi −2⟨P, ZT t Xi ⟩. (10) 1. Majorization of the Distance of each µi to the Principal Geodesic Using Eq. (10), the distance between each µi and the PC (gt(V1, V2))t can be cast as a function fi of (V1, V2): fi(V1, V2) def. = min t∈[0,1] bT zt + aT i xi + min P ∈U(b,ai) −2⟨P, (Y −V1 + t(V1 + V2))T Xi ⟩ . (11) where we have replaced Zt above by its explicit form in t to highlight that the objective above is quadratic convex plus piecewise linear concave as a function of t, and thus neither convex nor concave. Assume that we are given P ♯and t♯that are approximate arg-minima for fi(V1, V2). For any A, B in Rd×p, we thus have that each distance fi(V1, V2) appearing in Eq. (6), is such that fi(A, B) ⩽mV1V2 i (A, B) def. = ⟨P ♯, MZt♯Xi ⟩. (12) We can thus use a majorization-minimization procedure (Hunter and Lange, 2000) to minimize the sum of terms fi by iteratively creating majorization functions mV1V2 i at each iterate (V1, V2). All functions mV1V2 i are quadratic convex. Given that we need to ensure that these velocity fields yield optimal mappings, and that they may also need to satisfy orthogonality constraints with respect to lower-order principal components, we use gradient steps to update V1, V2, which can be recovered using (Cuturi and Doucet, 2014, §4.3) and the chain rule as: ∇1mV1V2 i = 2(t♯−1)(Zt♯−XiP ♯T D(b−1)), ∇2mV1V2 i = 2t♯(Zt♯−XiP ♯T D(b−1)). (13) 2. Efficient Approximation of P ♯and t♯ As discussed above, gradients for majorization functions mV1V2 i can be obtained using approximate minima P ♯and t♯for each function fi. Because the objective of Eq. (11) is not convex w.r.t. t, we propose to do an exhaustive 1-d grid search with K values in [0, 1]. This approach would still require, in theory, to solve K optimal transport problems to solve Eq. (11) for each of the N input measures. To carry out this step efficiently, we propose to use entropy regularized transport (Cuturi, 2013), which allows for much faster computations and efficient parallelizations to recover approximately optimal transports P ♯. 3. Projected Gradient Update Velocity fields are updated with a gradient stepsize β > 0, V1 ←V1 −β N X i=1 ∇1mV1V2 i + λ∇1Ω ! , V2 ←V2 −β N X i=1 ∇2mV1V2 i + λ∇2Ω ! , followed by a projection step to enforce that V1 and V2 lie in span(V (1) 1 + V (1) 2 , · · · , V (n) 1 + V (n) 2 )⊥ in the L2(¯µ, X) sense when computing the (n+ 1)th PC. We finally apply the barycentric projection operator defined in the end of §3. We first need to compute two optimal transport plans, P ⋆ 1 ∈argmin P ∈U(b,b) ⟨P, MY (Y −V1) ⟩, P ⋆ 2 ∈argmin P ∈U(b,b) ⟨P, MY (Y +V2) ⟩, (14) to form the barycentric projections, which then yield updated velocity vectors: V1 ←− (Y −V1)P ⋆T 1 D(b−1) −Y , V2 ←(Y + V2)P ⋆T 2 D(b−1) −Y. (15) We repeat steps 1,2,3 until convergence. Pseudo-code is given in the supplementary material. 6 5 Experiments -1 0 1 2 3 -1 -0.5 0 0.5 ¯µ µ1 µ2 µ3 µ4 pc1 -6 -4 -2 0 2 4 6 -3 -2 -1 0 1 2 3 ¯µ µ1 µ2 µ3 pc1 pc2 Figure 4: Wasserstein mean ¯µ and first PC computed on a dataset of four (left) and three (right) empirical measures. The second PC is also displayed in the right figure. Toy samples: We first run our algorithm on two simple synthetic examples. We consider respectively 4 and 3 empirical measures supported on a small number of locations in X = R2, so that we can compute their exact Wasserstein means, using the multi-marginal linear programming formulation given in (Agueh and Carlier, 2011, §4). These measures and their mean (red squares) are shown in Fig. 4. The first principal component on the left example is able to capture both the variability of average measure locations, from left to right, and also the variability in the spread of the measure locations. On the right example, the first principal component captures the overall elliptic shape of the supports of all considered measures. The second principal component reflects the variability in the parameters of each ellipse on which measures are located. The variability in the weights of each location is also captured through the Wasserstein mean, since each single line of a generalized geodesic has a corresponding location and weight in the Wasserstein mean. MNIST: For each of the digits ranging from 0 to 9, we sample 1,000 images in the MNIST database representing that digit. Each image, originally a 28x28 grayscale image, is converted into a probability distribution on that grid by normalizing each intensity by the total intensity in the image. We compute the Wasserstein mean for each digit using the approach of Benamou et al. (2015). We then follow our approach to compute the first three principal geodesics for each digit. Geodesics for four of these digits are displayed in Fig. 5 by showing intermediary (rasterized) measures on the curves. While some deformations in these curves can be attributed to relatively simple rotations around the digit center, more interesting deformations appear in some of the curves, such as the the loop on the bottom left of digit 2. Our results are easy to interpret, unlike those obtained with Wang et al.’s approach (2013) on these datasets, see supplementary material. Fig. 6 displays the first PC obtained on a subset of MNIST composed of 2,000 images of 2 and 4 in equal proportions. t = 0 t = 1 PC1 PC2 PC3 Figure 5: 1000 images for each of the digits 1,2,3,4 were sampled from the MNIST database. We display above the first three PCs sampled at times tk = k/4, k = 0, . . . , 4 for each of these digits. Color histograms: We consider a subset of the Caltech-256 Dataset composed of three image categories: waterfalls, tomatoes and tennis balls, resulting in a set of 295 color images. The pixels 7 Figure 6: First PC on a subset of MNIST composed of one thousand 2s and one thousand 4s. contained in each image can be seen as a point-cloud in the RGB color space [0, 1]3. We use k-means quantization to reduce the size of these uniform point-clouds into a set of k = 128 weighted points, using cluster assignments to define the weights of each of the k cluster centroids. Each image can be thus regarded as a discrete probability measure of 128 atoms in the tridimensional RGB space. We then compute the Wasserstein barycenter of these measures supported on p = 256 locations using (Cuturi and Doucet, 2014, Alg.2). Principal components are then computed as described in §4. The computation for a single PC is performed within 15 minutes on an iMac (3.4GHz Intel Core i7). Fig. 7 displays color palettes sampled along each of the first three PCs. The first PC suggests that the main source of color variability in the dataset is the illumination, each pixel going from dark to light. Second and third PCs display the variation of colors induced by the typical images’ dominant colors (blue, red, yellow). Fig. 8 displays the second PC, along with three images projected on that curve. The projection of a given image on a PC is obtained by finding first the optimal time t⋆such that the distance of that image to the PC at t⋆is minimum, and then by computing an optimal color transfer (Piti´e et al., 2007) between the original image and the histogram at time t⋆. Figure 7: Each row represents a PC displayed at regular time intervals from t = 0 (left) to t = 1 (right), from the first PC (top) to the third PC (bottom). Figure 8: Color palettes from the second PC (t = 0 on the left, t = 1 on the right) displayed at times t = 0, 1 3, 2 3, 1. Images displayed in the top row are original; their projection on the PC is displayed below, using a color transfer with the palette in the PC to which they are the closest. Conclusion We have proposed an approximate projected gradient descent method to compute generalized geodesic principal components for probability measures. Our experiments suggest that these principal geodesics may be useful to analyze shapes and distributions, and that they do not require any parameterization of shapes or deformations to be used in practice. Aknowledgements MC acknowledges the support of JSPS young researcher A grant 26700002. 8 References Martial Agueh and Guillaume Carlier. Barycenters in the Wasserstein space. SIAM Journal on Mathematical Analysis, 43(2):904–924, 2011. Luigi Ambrosio, Nicola Gigli, and Giuseppe Savar´e. Gradient flows: in metric spaces and in the space of probability measures. Springer, 2006. Jean-David Benamou, Guillaume Carlier, Marco Cuturi, Luca Nenna, and Gabriel Peyr´e. Iterative Bregman projections for regularized transportation problems. SIAM Journal on Scientific Computing, 37(2):A1111– A1138, 2015. J´er´emie Bigot, Ra´ul Gouet, Thierry Klein, and Alfredo L´opez. Geodesic PCA in the Wasserstein space by convex PCA. Annales de l’Institut Henri Poincar´e B: Probability and Statistics, 2015. Emmanuel Boissard, Thibaut Le Gouic, Jean-Michel Loubes, et al. Distributions template estimate with Wasserstein metrics. Bernoulli, 21(2):740–759, 2015. Nicolas Bonneel, Julien Rabin, Gabriel Peyr´e, and Hanspeter Pfister. Sliced and radon Wasserstein barycenters of measures. Journal of Mathematical Imaging and Vision, 51(1):22–45, 2015. Guillaume Carlier, Adam Oberman, and Edouard Oudet. Numerical methods for matching for teams and Wasserstein barycenters. ESAIM: Mathematical Modelling and Numerical Analysis, 2015. to appear. Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, pages 2292–2300, 2013. Marco Cuturi and Arnaud Doucet. Fast computation of Wasserstein barycenters. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 685–693, 2014. P. Thomas Fletcher, Conglin Lu, Stephen M. Pizer, and Sarang Joshi. Principal geodesic analysis for the study of nonlinear statistics of shape. Medical Imaging, IEEE Transactions on, 23(8):995–1005, 2004. Maurice Fr´echet. Les ´el´ements al´eatoires de nature quelconque dans un espace distanci´e. In Annales de l’institut Henri Poincar´e, volume 10, pages 215–310. Presses universitaires de France, 1948. Alexandre Gramfort, Gabriel Peyr´e, and Marco Cuturi. Fast optimal transport averaging of neuroimaging data. In Information Processing in Medical Imaging (IPMI). Springer, 2015. Trevor Hastie and Werner Stuetzle. Principal curves. Journal of the American Statistical Association, 84(406): 502–516, 1989. David R Hunter and Kenneth Lange. Quantile regression via an MM algorithm. Journal of Computational and Graphical Statistics, 9(1):60–77, 2000. Robert J McCann. A convexity principle for interacting gases. Advances in mathematics, 128(1):153–179, 1997. Franc¸ois Piti´e, Anil C Kokaram, and Rozenn Dahyot. Automated colour grading using colour distribution transfer. Computer Vision and Image Understanding, 107(1):123–137, 2007. Sebastian Reich. A nonparametric ensemble transform method for bayesian inference. SIAM Journal on Scientific Computing, 35(4):A2013–A2024, 2013. Bernhard Sch¨olkopf, Alexander Smola, and Klaus-Robert M¨uller. Kernel principal component analysis. In Artificial Neural Networks, ICANN’97, pages 583–588. Springer, 1997. Justin Solomon, Fernando de Goes, Gabriel Peyr´e, Marco Cuturi, Adrian Butscher, Andy Nguyen, Tao Du, and Leonidas Guibas. Convolutional Wasserstein distances: Efficient optimal transportation on geometric domains. ACM Transactions on Graphics (Proc. SIGGRAPH 2015), 34(4), 2015. Sanvesh Srivastava, Volkan Cevher, Quoc Tran-Dinh, and David B Dunson. Wasp: Scalable bayes via barycenters of subset posteriors. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 912–920, 2015. Jakob J Verbeek, Nikos Vlassis, and B Kr¨ose. A k-segments algorithm for finding principal curves. Pattern Recognition Letters, 23(8):1009–1017, 2002. C´edric Villani. Optimal transport: old and new, volume 338. Springer, 2008. Wei Wang, Dejan Slepˇcev, Saurav Basu, John A Ozolek, and Gustavo K Rohde. A linear optimal transportation framework for quantifying and visualizing variations in sets of images. International journal of computer vision, 101(2):254–269, 2013. Michael Westdickenberg. Projections onto the cone of optimal transport maps and compressible fluid flows. Journal of Hyperbolic Differential Equations, 7(04):605–649, 2010. 9 | 2015 | 376 |
5,898 | HONOR: Hybrid Optimization for NOn-convex Regularized problems Pinghua Gong Univeristy of Michigan, Ann Arbor, MI 48109 gongp@umich.edu Jieping Ye Univeristy of Michigan, Ann Arbor, MI 48109 jpye@umich.edu Abstract Recent years have witnessed the superiority of non-convex sparse learning formulations over their convex counterparts in both theory and practice. However, due to the non-convexity and non-smoothness of the regularizer, how to efficiently solve the non-convex optimization problem for large-scale data is still quite challenging. In this paper, we propose an efficient Hybrid Optimization algorithm for NOn-convex Regularized problems (HONOR). Specifically, we develop a hybrid scheme which effectively integrates a Quasi-Newton (QN) step and a Gradient Descent (GD) step. Our contributions are as follows: (1) HONOR incorporates the second-order information to greatly speed up the convergence, while it avoids solving a regularized quadratic programming and only involves matrixvector multiplications without explicitly forming the inverse Hessian matrix. (2) We establish a rigorous convergence analysis for HONOR, which shows that convergence is guaranteed even for non-convex problems, while it is typically challenging to analyze the convergence for non-convex problems. (3) We conduct empirical studies on large-scale data sets and results demonstrate that HONOR converges significantly faster than state-of-the-art algorithms. 1 Introduction Sparse learning with convex regularization has been successfully applied to a wide range of applications including marker genes identification [19], face recognition [22], image restoration [2], text corpora understanding [9] and radar imaging [20]. However, it has been shown recently that many convex sparse learning formulations are inferior to their non-convex counterparts in both theory and practice [27, 12, 23, 25, 16, 26, 24, 11]. Popular non-convex sparsity-inducing penalties include Smoothly Clipped Absolute Deviation (SCAD) [10], Log-Sum Penalty (LSP) [6] and Minimax Concave Penalty (MCP) [23]. Although non-convex sparse learning reveals its advantage over the convex one, it remains a challenge to develop an efficient algorithm to solve the non-convex optimization problem especially for large-scale data. DC programming [21] is a popular approach to solve non-convex problems whose objective functions can be expressed as the difference of two convex functions. However, a potentially non-trivial convex subproblem is required to solve at each iteration, which is not practical for large-scale problems. SparseNet [16] can solve a least squares problem with a non-convex penalty. At each step, SparseNet solves a univariate subproblem with a non-convex penalty which admits a closed-form solution. However, to establish the convergence analysis, the parameter of the non-convex penalty is required to be restricted to some interval such that the univariate subproblem (with a non-convex penalty) is convex. Moreover, it is quite challenging to extend SparseNet to non-convex problems with a non-least-squares loss, as the univariate subproblem generally does not admit a closed-form solution. The GIST algorithm [14] can solve a class of non-convex regularized problems by iteratively solving a possibly non-convex proximal operator problem, which in turn admits a closed-form solution. However, GIST does not well exploit the second-order information. The DC-PN algorithm 1 [18] can incorporate the second-order information to solve non-convex regularized problems but it requires to solve a non-trivial regularized quadratic subproblem at each iteration. In this paper, we propose an efficient Hybrid Optimization algorithm for NOn-convex Regularized problems (HONOR), which incorporates the second-order information to speed up the convergence. HONOR adopts a hybrid optimization scheme which chooses either a Quasi-Newton (QN) step or a Gradient Descent (GD) step per iteration mainly depending on whether an iterate has very small components. If an iterate does not have any small component, the QN-step is adopted, which uses L-BFGS to exploit the second-order information. The key advantage of the QN-step is that it does not need to solve a regularized quadratic programming and only involves matrix-vector multiplications without explicitly forming the inverse Hessian matrix. If an iterate has small components, we switch to a GD-step. Our detailed theoretical analysis sheds light on the effect of such a hybrid scheme on the convergence of the algorithm. Specifically, we provide a rigorous convergence analysis for HONOR, which shows that every limit point of the sequence generated by HONOR is a Clarke critical point. It is worth noting that the convergence analysis for a non-convex problem is typically much more challenging than the convex one, because many important properties for a convex problem may not hold for non-convex problems. Empirical studies are also conducted on large-scale data sets which include up to millions of samples and features; results demonstrate that HONOR converges significantly faster than state-of-the-art algorithms. 2 Non-convex Sparse Learning We focus on the following non-convex regularized optimization problem: min x∈Rn {f(x) = l(x) + r(x)} , (1) where we make the following assumptions throughout the paper: (A1) l(x) is coercive, continuously differentiable and ∇l(x) is Lipschitz continuous with constant L. Moreover, l(x) > −∞for all x ∈Rn. (A2) r(x) = Pn i=1 ρ(|xi|), where ρ(t) is non-decreasing, continuously differentiable and concave with respect to t in [0, ∞); ρ(0) = 0 and ρ′(0) ̸= 0 with ρ′(t) = ∂ρ(t)/∂t denoting the derivative of ρ(t) at the point t. Remark 1 Assumption (A1) allows l(x) to be non-convex. Assumption (A2) implies that ρ(|xi|) is generally non-convex with respect to xi and the only convex case is ρ(|xi|) = λ|xi| with λ > 0. Moreover, ρ(|xi|) is continuously differentiable with respect to xi in (−∞, 0) ∪(0, ∞) and nondifferentiable at xi = 0. In particular, ∂ρ(|xi|)/∂xi = σ(xi)ρ′(|xi|) for any xi ̸= 0, where σ(xi) = 1, if xi > 0; σ(xi) = −1, if xi < 0 and σ(xi) = 0, otherwise. In addition, ρ′(0) > 0 must hold (Otherwise ρ′(0) < 0 implies ρ(t) ≤ρ(0) + ρ′(0)t < 0 for any t > 0, contradicting the fact that ρ(t) is non-decreasing). It is also easy to show that, under the assumptions above, both l(x) and r(x) are locally Lipschitz continuous. Thus, the Clarke subdifferential [7] is well-defined. The commonly used least squares loss and the logistic regression loss satisfy the assumption (A1); we can add a small term δ∥x∥2 to make them coercive. The following popular non-convex regularizers satisfy the assumption (A2), where λ > 0 and θ > 0 except that θ > 2 for SCAD. • LSP: ρ(|xi|) = λ log(1 + |xi|/θ). • SCAD: ρ(|xi|) = λ|xi|, if |xi| ≤λ, −x2 i +2θλ|xi|−λ2 2(θ−1) , if λ < |xi| ≤θλ, (θ + 1)λ2/2, if |xi| > θλ. • MCP: ρ(|xi|) = λ|xi| −x2 i /(2θ), if |xi| ≤θλ, θλ2/2, if |xi| > θλ. Due to the non-convexity and non-differentiability of problem (1), the traditional subdifferential concept for the convex optimization is not applicable here. Thus, we use the Clarke subdifferential [7] to characterize the optimality of problem (1). We say ¯x is a Clarke critical point of problem (1), if 0 ∈∂of(¯x), where ∂of(¯x) is the Clarke subdifferential of f(x) at x = ¯x. To be self-contained, 2 we briefly review the Clarke subdifferential: for a locally Lipschitz continuous function f(x), the Clarke generalized directional derivative of f(x) at x = ¯x along the direction d is defined as f o(¯x; d) = lim sup x→¯x,α↓0 f(x + αd) −f(x) α . Then, the Clarke subdifferential of f(x) at x = ¯x is defined as ∂of(¯x) = {δ ∈Rn : f o(¯x; d) ≥dT δ, ∀d ∈Rn}. Interested readers may refer to Proposition 4 in the Supplement A for more properties about the Clarke Subdifferential. We want to emphasize that some basic properties of the subdifferential of a convex function may not hold for the Clarke Subdifferential of a non-convex function. 3 Proposed Optimization Algorithm: HONOR Since each decomposable component function of the regularizer is only non-differentiable at the origin, the objective function is differentiable, if the segment between any two consecutive iterates do not cross any axis. This motivates us to design an algorithm which can keep the current iterate in the same orthant of the previous iterate. Before we present the detailed HONOR algorithm, we introduce two functions as follows: Define a function π : Rn 7→Rn with the i-th entry being: πi(xi; yi) = xi, if σ(xi) = σ(yi), 0, otherwise, where y ∈Rn (yi is the i-th entry of y) is the parameter of the function π; σ(·) is the sign function defined as follows: σ(xi) = 1, if xi > 0; σ(xi) = −1, if xi < 0 and σ(xi) = 0, otherwise. Define the pseudo-gradient ⋄f(x) whose i-th entry is given by: ⋄if(x) = ∇il(x) + ρ′(|xi|), if xi > 0, ∇il(x) −ρ′(|xi|), if xi < 0, ∇il(x) + ρ′(0), if xi = 0, ∇il(x) + ρ′(0) < 0, ∇il(x) −ρ′(0), if xi = 0, ∇il(x) −ρ′(0) > 0, 0, otherwise, where ρ′(t) is the derivative of ρ(t) at the point t. Remark 2 If r(x) is convex, ⋄f(x) is the minimum-norm sub-gradient of f(x) at x. Thus, −⋄f(x) is a descent direction. However, ⋄f(x) is not even a sub-gradient of f(x) if r(x) is non-convex. This indicates that some obvious concepts and properties for a convex problem may not hold in the non-convex case. Thus, it is significantly more challenging to develop and analyze algorithms for a non-convex problem. Interestingly, we can still show that vk = −⋄f(xk) is a descent direction at the point xk (refer to Supplement D and replace pk = π(dk; vk) with vk). To utilize the second-order information, we may perform the optimization along the direction dk = Hkvk, where Hk is a positive definite matrix containing the second-order information. However, dk is not necessarily a descent direction. To address this issue, we use the following slightly modified direction pk: pk = π(dk; vk). We can show that pk is a descent direction (proof is provided in Supplement D). Thus, we can perform the optimization along the direction pk. Recall that we need to keep the current iterate in the same orthant of the previous iterate. So the following iterative scheme is proposed: xk(α) = π(xk + αpk; ξk), (2) where ξk i = σ(xk i ), if xk i ̸= 0, σ(vk i ), if xk i = 0, (3) 3 and α is a step size chosen by the following line search procedure: for constants α0 > 0, β, γ ∈ (0, 1) and m = 0, 1, · · ·, find the smallest integer m with α = α0βm such that the following inequality holds: f(xk(α)) ≤f(xk) −γα(vk)T dk. (4) However, only using the above iterative scheme may not guarantee the convergence. The main challenge is: if there exists a subsequence K such that {xk i }K converges to zero, it is possible that for sufficiently large k ∈K, |xk i | is arbitrarily small but never equal to zero (refer to the proof of Theorem 1 for more details). To address this issue, we propose a hybrid optimization scheme. Specifically, for a small constant ǫ > 0, if Ik = {i ∈{1, · · · , n} : 0 < |xk i | ≤min(∥vk∥, ǫ), xk i vk i < 0} is not empty, we switch the iteration to the following gradient descent step (GD-step): xk(α) = arg min x ∇l(xk)T (x −xk) + 1 2α∥x −xk∥2 + r(x) , where α is a step size chosen by the following line search procedure: for constants α0 > 0, β, γ ∈ (0, 1) and m = 0, 1, · · ·, find the smallest integer m with α = α0βm such that the following inequality holds: f(xk(α)) ≤f(xk) −γ 2α∥xk(α) −xk∥2. (5) The detailed steps of the algorithm are presented in Algorithm 1. Remark 3 Algorithm 1 is similar to OWL-QN-type algorithms in [1, 3, 4, 17, 13]. However, HONOR is significantly different from them: (1) The OWL-QN-type algorithms can only handle ℓ1regularized convex problems while HONOR is applicable to a class of non-convex problems beyond ℓ1-regularized ones. (2) The convergence analyses of the OWL-QN-type algorithms heavily rely on the convexity of the ℓ1-regularized problem. In contrast, the convergence analysis for HONOR is applicable to non-convex cases beyond the convex ones, which is a non-trivial extension. Algorithm 1: HONOR: Hybrid Optimization for NOn-convex Regularized problems 1 Initialize x0, H0 and choose β, γ ∈(0, 1), ǫ > 0, α0 > 0; 2 for k = 0 to maxiter do 3 Compute vk ←−⋄f(xk) and Ik = {i ∈{1, · · · , n} : 0 < |xk i | ≤ǫk, xk i vk i < 0}, where ǫk = min(∥vk∥, ǫ); 4 Initialize α ←α0; 5 if Ik = ∅then 6 (QN-step) 7 Compute dk ←Hkvk with a positive definite matrix Hk using L-BFGS; 8 Alignment: pk ←π(dk; vk); 9 while Eq. (4) is not satisfied do 10 α ←αβ; xk(α) ←π(xk + αpk; ξk); 11 end 12 else 13 (GD-step) 14 while Eq. (5) is not satisfied do 15 α ←αβ; 16 xk(α) ←arg minx ∇l(xk)T (x −xk) + 1 2α∥x −xk∥2 + r(x) ; 17 end 18 end 19 xk+1 ←xk(α); 20 if some stopping criterion is satisfied then 21 stop and return xk+1; 22 end 23 end 4 4 Convergence Analysis We first present a few basic propositions and then provide the convergence theorem based on the propositions; all proofs of the presented propositions are carefully handled due to the lack of convexity. First of all, an optimality condition is presented (proof is provided in Supplement B), which will be directly used in the proof of Theorem 1. Proposition 1 Let ¯x = limk∈K,k→∞xk, vk = −⋄f(xk) and ¯v = −⋄f(¯x), where K is a subsequence of {1, 2, · · · , k, k + 1, · · · }. If lim infk∈K,k→∞|vk i | = 0 for all i ∈{1, · · · , n}, then ¯v = 0 and ¯x is a Clarke critical point of problem (1). We subsequently show that we have a Lipschitz-continuous-like inequality in the following proposition (proof is provided in Supplement C), which is crucial to prove the final convergence theorem. Proposition 2 Let vk = −⋄f(xk), xk(α) = π(xk +αpk; ξk) and qk α = 1 α(π(xk +αpk; ξk)−xk) with α > 0. Then under assumptions (A1) and (A2), we have (i) ∇l(xk)T (xk(α) −xk) + r(xk(α)) −r(xk) ≤−(vk)T (xk(α) −xk), (6) (ii) f(xk(α)) ≤f(xk) −α(vk)T qk α + α2L 2 ∥qk α∥2. (7) We next show that both line search criteria in the QN-step [Eq. (4)] and the GD-step [Eq. (5)] at any iteration k is satisfied in a finite number of trials (proof is provided in Supplement D). Proposition 3 At any iteration k of the HONOR algorithm, if xk is not a Clarke critical point of problem (1), then (a) for the QN-step, there exists an α ∈[¯αk, α0] with 0 < ¯αk ≤α0 such that the line search criterion in Eq. (4) is satisfied; (b) for the GD-step, the line search criterion in Eq. (5) is satisfied whenever α ≥β min(α0, (1 −γ)/L). That is, both line search criteria at any iteration k are satisfied in a finite number of trials. We are now ready to provide the convergence proof for the HONOR algorithm: Theorem 1 The sequence {xk} generated by the HONOR algorithm has at least a limit point and every limit point of {xk} is a Clarke critical point of problem (1). Proof It follows from Proposition 3 that both line search criteria in the QN-step [Eq. (4)] and the GD-step [Eq. (5)] at each iteration can be satisfied in a finite number of trials. Let αk be the accepted step size at iteration k. Then we have f(xk) −f(xk+1) ≥γαk(vk)T dk = γαk(vk)T Hkvk (QN-step), (8) or f(xk) −f(xk+1) ≥ γ 2αk ∥xk+1 −xk∥2 ≥ γ 2α0 ∥xk+1 −xk∥2 (GD-step). (9) Recall that Hk is positive definite and γ > 0, αk > 0, which together with Eqs.(8), (9) imply that {f(xk)} is monotonically decreasing. Thus, {f(xk)} converges to a finite value ¯f, since f is bounded from below (note that l(x) > −∞and r(x) ≥0 for all x ∈Rn). Due to the boundedness of {xk} (see Proposition 7 in Supplement F), the sequence {xk} generated by the HONOR algorithm has at least a limit point ¯x. Since f is continuous, there exists a subsequence K of {1, 2 · · · , k, k + 1, · · · } such that lim k∈K,k→∞xk = ¯x, (10) lim k→∞f(xk) = lim k∈K,k→∞f(xk) = ¯f = f(¯x). (11) In the following, we prove the theorem by contradiction. Assume that ¯x is not a Clarke critical point of problem (1). Then by Proposition 1, there exists at least one i ∈{1, · · · , n} such that lim inf k∈K,k→∞|vk i | > 0. (12) 5 We next consider the following two cases: (a) There exist a subsequence ˜K of K and an integer ˜k > 0 such that for all k ∈˜K, k ≥˜k, the GD-step is adopted. Then for all k ∈˜K, k ≥˜k, we have xk+1 = arg min x ∇l(xk)T (x −xk) + 1 2αk ∥x −xk∥2 + r(x) . Thus, by the optimality condition of the above problem and properties of the Clarke subdifferential (Proposition 4 in Supplement A), we have 0 ∈∇l(xk) + 1 αk (xk+1 −xk) + ∂or(xk+1). (13) Taking limits with k ∈˜K for Eq. (9) and considering Eqs. (10), (11), we have lim k∈˜K,k→∞ ∥xk+1 −xk∥2 ≤0 ⇒ lim k∈˜K,k→∞ xk = lim k∈˜K,k→∞ xk+1 = ¯x. (14) Taking limits with k ∈˜K for Eq. (13) and considering Eq. (14), αk ≥β min(α0, (1 −γ)/L) [Proposition 3] and ∂or(·) is upper-semicontinuous (upper-hemicontinuous) [8] (see Proposition 4 in the Supplement A), we have 0 ∈∇l(¯x) + ∂or(¯x) = ∂of(¯x), which contradicts the assumption that ¯x is not a Clarke critical point of problem (1). (b) There exists an integer ˆk > 0 such that for all k ∈K, k ≥ˆk, the QN-step is adopted. According to Remark 7 (in Supplement F), we know that the smallest eigenvalue of Hk is uniformly bounded from below by a positive constant, which together with Eq. (12) implies lim inf k∈K,k→∞(vk)T Hkvk > 0. (15) Taking limits with k ∈K for Eq. (8), we have lim k∈K,k→∞γαk(vk)T Hkvk ≤0, which together with γ ∈(0, 1), αk ∈(0, α0] and Eq. (15) implies that lim k∈K,k→∞αk = 0. (16) Eq. (12) implies that there exist an integer ˇk > 0 and a constant ¯ǫ > 0 such that ǫk = min(∥vk∥, ǫ) ≥¯ǫ for all k ∈K, k ≥ˇk. Notice that for all k ∈K, k ≥ˆk, the QN-step is adopted. Thus, we obtain that Ik = {i ∈{1, · · · , n} : 0 < |xk i | ≤ǫk, xk i vk i < 0} = ∅for all k ∈K, k ≥ˆk. We also notice that, if |xk i | ≥¯ǫ, then there exists a constant ¯αi > 0 such that xk i (α) = πi(xk i + αpk i ; ξk i ) = xk i + αpk i for all α ∈(0, ¯αi], as {pk i } is bounded (Proposition 8 in Supplement F). Therefore, we conclude that, for all k ∈K, k ≥¯k = max(ˇk, ˆk) and for all i ∈{1, · · · , n}, at least one of the following three cases must happen: xk i = 0 ⇒xk i (α) = πi(xk i + αpk i ; ξk i ) = xk i + αpk i , ∀α > 0, or |xk i | > ǫk ≥¯ǫ ⇒xk i (α) = πi(xk i + αpk i ; ξk i ) = xk i + αpk i , ∀α ∈(0, ¯αi], or xk i vk i ≥0 ⇒xk i pk i ≥0 ⇒xk i (α) = πi(xk i + αpk i ; ξk i ) = xk i + αpk i , ∀α > 0. It follows that there exists a constant ¯α > 0 such that qk α = 1 α(xk(α) −xk) = pk, ∀k ∈K, k ≥¯k, α ∈(0, ¯α]. (17) Thus, considering |pk i | = |πi(dk i ; vk i )| ≤|dk i | and vk i pk i ≥vk i dk i for all i ∈{1, · · · , n}, we have ∥qk α∥2 = ∥pk∥2 ≤∥dk∥2 = (vk)T (Hk)2vk, ∀k ∈K, k ≥¯k, α ∈(0, ¯α], (18) (vk)T qk α = (vk)T pk ≥(vk)T dk = (vk)T Hkvk, ∀k ∈K, k ≥¯k, α ∈(0, ¯α]. (19) 6 According to Proposition 8 (in Supplement F), we know that the largest eigenvalue of Hk is uniformly bounded from above by some positive constant M. Thus, we have (vk)T (Hk)2vk ≤ 2 αL(vk)T Hkvk − 2 αL −M (vk)T Hkvk, ∀k, which together with Eqs. (18), (19) and dk = Hkvk implies ∥qk α∥2 ≤ 2 αL(vk)T qk α − 2 αL −M (vk)T dk, ∀k ∈K, k ≥¯k, α ∈(0, ¯α]. (20) Considering Eqs. (7), (20), we have f(xk(α)) ≤f(xk) −α 1 −αLM 2 (vk)T dk, ∀k ∈K, k ≥¯k, α ∈(0, ¯α], which together with (vk)T dk = (vk)T Hkvk ≥0 implies that the line search criterion in the QN-step [Eq. (4)] is satisfied if 1 −αLM 2 ≥γ , 0 < α ≤α0 and 0 < α ≤¯α, ∀k ∈K, k ≥¯k. Considering the backtracking form of the line search in QN-step [Eq. (4)], we conclude that the line search criterion in the QN-step [Eq. (4)] is satisfied whenever αk ≥β min(min(¯α, α0), 2(1 −γ)/(LM)) > 0, ∀k ∈K, k ≥¯k. This leads to a contradiction with Eq. (16). By (a) and (b), we conclude that ¯x = limk∈K,k→∞xk is a Clarke critical point of problem (1). □ 5 Experiments In this section, we evaluate the efficiency of HONOR on solving the non-convex regularized logistic regression problem1 by setting l(x) = 1/N PN i=1 log(1 + exp(−yiaT i x)), where ai ∈ Rn is the i-th sample associated with the label yi ∈{1, −1}. Three non-convex regularizers (LSP, MCP and SCAD) are included in experiments, where the parameters are set as λ = 1/N and θ = 10−2λ (θ is set as 2 + 10−2λ for SCAD as it requires θ > 2). We compare HONOR with the non-convex solver2 GIST [14] on three large-scale, high-dimensional and sparse data sets which are summarized in Table 1. All data sets can be downloaded from http://www.csie.ntu.edu.tw/˜cjlin/libsvmtools/datasets/. Table 1: Data set statistics. datasets kdd2010a kdd2010b url ♯samples N 510,302 748,401 2,396,130 dimensionality n 20,216,830 29,890,095 3,231,961 All algorithms are implemented in Matlab 2015a under a Linux operating system and executed on an Intel Core i7-4790 CPU (@3.6GHz) with 32GB memory. We choose the starting points x0 for the compared algorithms using the same random vector whose entries are i.i.d. sampled from the standard Gaussian distribution. We terminate the compared algorithms if the relative change of two consecutive objective function values is less than 10−5 or the number of iterations exceeds 1000 (HONOR) or 10000 (GIST). For HONOR, we set γ = 10−5, β = 0.5, α0 = 1 and the number of unrolling steps in L-BFGS as m = 10. For GIST, we use the non-monotone line search in experiments as it usually performs better than its monotone counterpart. To show how the convergence behavior of HONOR varies over the parameter ǫ, we use three values: ǫ = 10−10, 10−6, 10−2. We report the objective function value (in log-scale) vs. CPU time (in seconds) plots in Figure 1. We can observe from Figure 1 that: (1) If ǫ is set to a small value, the QN-step is adopted at almost all steps in HONOR and HONOR converges significantly faster than GIST for all three non-convex 1We do not include the term δ∥x∥2 in the objective and find that the proposed algorithm still works well. 2We do not involve SparseNet, DC programming and DC-PN in comparison, because (1) adapting SparseNet to the logistic regression problem is challenging; (2) DC programming is shown to be much inferior to GIST; (3) The objective function value of DC-PN is larger than GIST in most cases [18]. 7 regularizers on all three data sets. This shows that using the second-order information greatly speeds up the convergence. (2) When ǫ increases, the ratio of the GD-step adopted in HONOR increases. Meanwhile, the convergence performance of HONOR generally degrades. In some cases, setting a slightly larger ǫ and adopting a small number of GD steps even sligtly boosts the convergence performance of HONOR (the green curves in the first row). But setting ǫ to a very small value is always safe to guarantee the fast convergence of HONOR. (3) When ǫ is large enough, the GD steps dominate all iterations of HONOR and HONOR converge much slower. In this case, HONOR converges even slower than GIST. The reason is that, at each iteration of HONOR, extra computational cost is required in addition to the basic computation in the GD-step. Moreover, the non-monotone line search is used in GIST while the monotone line search is adopted in the GD-step. (4) In some cases (the first row), GIST is trapped in a local solution which has a much larger objective function value than HONOR with a small ǫ. This implies that HONOR may have a potential of escaping from high error plateau which often exists in high dimensional non-convex problems. These results show the great potential of HONOR for solving large-scale non-convex sparse learning problems. CPU time (seconds) 0 200 400 600 800 1000 1200 Objective function value (logged scale) 100 101 LSP (kdd2010a) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 200 400 600 800 1000 1200 Objective function value (logged scale) 100 101 LSP (kdd2010b) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 2000 4000 6000 8000 10000 12000 14000 Objective function value (logged scale) 10-1 100 101 LSP (url) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 500 1000 1500 2000 2500 3000 Objective function value (logged scale) 10-2 10-1 100 MCP (kdd2010a) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 500 1000 1500 2000 2500 3000 3500 4000 Objective function value (logged scale) 10-3 10-2 10-1 100 MCP (kdd2010b) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) ×104 0 0.5 1 1.5 2 2.5 3 Objective function value (logged scale) 10-3 10-2 10-1 100 MCP (url) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 500 1000 1500 2000 2500 Objective function value (logged scale) 10-2 10-1 100 SCAD (kdd2010a) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) 0 1000 2000 3000 4000 Objective function value (logged scale) 10-3 10-2 10-1 100 SCAD (kdd2010b) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST CPU time (seconds) ×104 0 0.5 1 1.5 2 2.5 Objective function value (logged scale) 10-3 10-2 10-1 100 SCAD (url) HONOR(ǫ=1e-10) HONOR(ǫ=1e-6) HONOR(ǫ=1e-2) GIST Figure 1: Objective function value (in log-scale) vs. CPU time (in seconds) plots for different non-convex regularizers and different large-scale and high-dimensional data sets. The ratios of the GD-step adopted in HONOR are: LSP (kdd2010a): 0%, 1%, 34%; LSP (kdd2010b): 0%, 2%, 27%; LSP (url): 0.1%, 2%, 35%; MCP (kdd2010a): 0%, 88%, 100%; MCP (kdd2010b): 0%, 89%, 100%; MCP (url): 0%, 97%, 100%; SCAD (kdd2010a): 0%, 43%, 100%; SCAD (2010b): 0%, 32%, 99.5%; SCAD (url): 0%, 79%, 100%. 6 Conclusions In this paper, we propose an efficient optimization algorithm called HONOR for solving non-convex regularized sparse learning problems. HONOR incorporates the second-order information to speed up the convergence in practice and uses a carefully designed hybrid optimization scheme to guarantee the convergence in theory. Experiments are conducted on large-scale data sets and results show that HONOR converges significantly faster than state-of-the-art algorithms. In our future work, we plan to develop parallel/distributed variants of HONOR to tackle much larger data sets. Acknowledgements This work is supported in part by research grants from NIH (R01 LM010730, U54 EB020403) and NSF (IIS- 0953662, III-1539991, III-1539722). 8 References [1] G. Andrew and J. Gao. Scalable training of ℓ1-regularized log-linear models. In ICML, pages 33–40, 2007. [2] J. Bioucas-Dias and M. Figueiredo. A new TwIST: two-step iterative shrinkage/thresholding algorithms for image restoration. IEEE Transactions on Image Processing, 16(12):2992–3004, 2007. [3] R. H. Byrd, G. M. Chin, J. Nocedal, and F. Oztoprak. A family of second-order methods for convex ℓ1-regularized optimization. Technical report, Industrial Engineering and Management Sciences, Northwestern University, Evanston, IL, 2012. [4] R. H. Byrd, G. M. Chin, J. Nocedal, and Y. Wu. Sample size selection in optimization methods for machine learning. Mathematical Programming, 134(1):127–155, 2012. [5] R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 16(5):1190–1208, 1995. [6] E. Candes, M. Wakin, and S. Boyd. Enhancing sparsity by reweighted ℓ1 minimization. Journal of Fourier Analysis and Applications, 14(5):877–905, 2008. [7] F. Clarke. Optimization and Nonsmooth Analysis. John Wiley&Sons, New York, 1983. [8] J. Dutta. Generalized derivatives and nonsmooth optimization, a finite dimensional tour. Top, 13(2):185– 279, 2005. [9] L. El Ghaoui, G. Li, V. Duong, V. Pham, A. Srivastava, and K. Bhaduri. Sparse machine learning methods for understanding large text corpora. In CIDU, pages 159–173, 2011. [10] 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. [11] J. Fan, L. Xue, and H. Zou. Strong oracle optimality of folded concave penalized estimation. Annals of Statistics, 42(3):819, 2014. [12] G. Gasso, A. Rakotomamonjy, and S. Canu. Recovering sparse signals with a certain family of nonconvex penalties and dc programming. IEEE Transactions on Signal Processing, 57(12):4686–4698, 2009. [13] P. Gong and J. Ye. A modified orthant-wise limited memory quasi-newton method with convergence analysis. In ICML, 2015. [14] P. Gong, C. Zhang, Z. Lu, J. Huang, and J. Ye. A general iterative shrinkage and thresholding algorithm for non-convex regularized optimization problems. In ICML, volume 28, pages 37–45, 2013. [15] N. Jorge and J. Stephen. Numerical Optimization. Springer, 1999. [16] R. Mazumder, J. Friedman, and T. Hastie. Sparsenet: Coordinate descent with nonconvex penalties. Journal of the American Statistical Association, 106(495), 2011. [17] P. Olsen, F. Oztoprak, J. Nocedal, and S. Rennie. Newton-like methods for sparse inverse covariance estimation. In Advances in Neural Information Processing Systems (NIPS), pages 764–772, 2012. [18] A. Rakotomamonjy, R. Flamary, and G. Gasso. Dc proximal newton for non-convex optimization problems. 2014. [19] S. Shevade and S. Keerthi. A simple and efficient algorithm for gene selection using sparse logistic regression. Bioinformatics, 19(17):2246, 2003. [20] X. Tan, W. Roberts, J. Li, and P. Stoica. Sparse learning via iterative minimization with application to mimo radar imaging. IEEE Transactions on Signal Processing, 59(3):1088–1101, 2011. [21] P. Tao and L. An. The dc (difference of convex functions) programming and dca revisited with dc models of real world nonconvex optimization problems. Annals of Operations Research, 133(1-4):23–46, 2005. [22] J. Wright, A. Yang, A. Ganesh, S. Sastry, and Y. Ma. Robust face recognition via sparse representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(2):210–227, 2008. [23] C. Zhang. Nearly unbiased variable selection under minimax concave penalty. The Annals of Statistics, 38(2):894–942, 2010. [24] C. Zhang and T. Zhang. A general theory of concave regularization for high-dimensional sparse estimation problems. Statistical Science, 27(4):576–593, 2012. [25] T. Zhang. Analysis of multi-stage convex relaxation for sparse regularization. JMLR, 11:1081–1107, 2010. [26] T. Zhang. Multi-stage convex relaxation for feature selection. Bernoulli, 2012. [27] H. Zou and R. Li. One-step sparse estimates in nonconcave penalized likelihood models. Annals of Statistics, 36(4):1509, 2008. 9 | 2015 | 377 |
5,899 | The Poisson Gamma Belief Network Mingyuan Zhou McCombs School of Business The University of Texas at Austin Austin, TX 78712, USA Yulai Cong National Laboratory of RSP Xidian University Xi’an, Shaanxi, China Bo Chen National Laboratory of RSP Xidian University Xi’an, Shaanxi, China Abstract To infer a multilayer representation of high-dimensional count vectors, we propose the Poisson gamma belief network (PGBN) that factorizes each of its layers into the product of a connection weight matrix and the nonnegative real hidden units of the next layer. The PGBN’s hidden layers are jointly trained with an upward-downward Gibbs sampler, each iteration of which upward samples Dirichlet distributed connection weight vectors starting from the first layer (bottom data layer), and then downward samples gamma distributed hidden units starting from the top hidden layer. The gamma-negative binomial process combined with a layer-wise training strategy allows the PGBN to infer the width of each layer given a fixed budget on the width of the first layer. The PGBN with a single hidden layer reduces to Poisson factor analysis. Example results on text analysis illustrate interesting relationships between the width of the first layer and the inferred network structure, and demonstrate that the PGBN, whose hidden units are imposed with correlated gamma priors, can add more layers to increase its performance gains over Poisson factor analysis, given the same limit on the width of the first layer. 1 Introduction There has been significant recent interest in deep learning. Despite its tremendous success in supervised learning, inferring a multilayer data representation in an unsupervised manner remains a challenging problem [1, 2, 3]. The sigmoid belief network (SBN), which connects the binary units of adjacent layers via the sigmoid functions, infers a deep representation of multivariate binary vectors [4, 5]. The deep belief network (DBN) [6] is a SBN whose top hidden layer is replaced by the restricted Boltzmann machine (RBM) [7] that is undirected. The deep Boltzmann machine (DBM) is an undirected deep network that connects the binary units of adjacent layers using the RBMs [8]. All these deep networks are designed to model binary observations. Although one may modify the bottom layer to model Gaussian and multinomial observations, the hidden units of these networks are still typically restricted to be binary [8, 9, 10]. One may further consider the exponential family harmoniums [11, 12] to construct more general networks with non-binary hidden units, but often at the expense of noticeably increased complexity in training and data fitting. Moving beyond conventional deep networks using binary hidden units, we construct a deep directed network with gamma distributed nonnegative real hidden units to unsupervisedly infer a multilayer representation of multivariate count vectors, with a simple but powerful mechanism to capture the correlations among the visible/hidden features across all layers and handle highly overdispersed counts. The proposed model is called the Poisson gamma belief network (PGBN), which factorizes the observed count vectors under the Poisson likelihood into the product of a factor loading matrix and the gamma distributed hidden units (factor scores) of layer one; and further factorizes the shape parameters of the gamma hidden units of each layer into the product of a connection weight matrix and the gamma hidden units of the next layer. Distinct from previous deep networks that often utilize binary units for tractable inference and require tuning both the width (number of hidden units) of each layer and the network depth (number of layers), the PGBN employs nonnegative real hidden 1 units and automatically infers the widths of subsequent layers given a fixed budget on the width of its first layer. Note that the budget could be infinite and hence the whole network can grow without bound as more data are being observed. When the budget is finite and hence the ultimate capacity of the network is limited, we find that the PGBN equipped with a narrower first layer could increase its depth to match or even outperform a shallower network with a substantially wider first layer. The gamma distribution density function has the highly desired strong non-linearity for deep learning, but the existence of neither a conjugate prior nor a closed-form maximum likelihood estimate for its shape parameter makes a deep network with gamma hidden units appear unattractive. Despite seemingly difficult, we discover that, by generalizing the data augmentation and marginalization techniques for discrete data [13], one may propagate latent counts one layer at a time from the bottom data layer to the top hidden layer, with which one may derive an efficient upward-downward Gibbs sampler that, one layer at a time in each iteration, upward samples Dirichlet distributed connection weight vectors and then downward samples gamma distributed hidden units. In addition to constructing a new deep network that well fits multivariate count data and developing an efficient upward-downward Gibbs sampler, other contributions of the paper include: 1) combining the gamma-negative binomial process [13, 14] with a layer-wise training strategy to automatically infer the network structure; 2) revealing the relationship between the upper bound imposed on the width of the first layer and the inferred widths of subsequent layers; 3) revealing the relationship between the network depth and the model’s ability to model overdispersed counts; 4) and generating a multivariate high-dimensional random count vector, whose distribution is governed by the PGBN, by propagating the gamma hidden units of the top hidden layer back to the bottom data layer. 1.1 Useful count distributions and their relationships Let the Chinese restaurant table (CRT) distribution l ∼CRT(n, r) represent the distribution of a random count generated as l = Pn i=1 bi, bi ∼Bernoulli [r/(r + i −1)] . Its probability mass function (PMF) can be expressed as P(l | n, r) = Γ(r)rl Γ(n+r)|s(n, l)|, where l ∈Z, Z := {0, 1, . . . , n}, and |s(n, l)| are unsigned Stirling numbers of the first kind. Let u ∼Log(p) denote the logarithmic distribution with PMF P(u | p) = 1 −ln(1−p) pu u , where u ∈{1, 2, . . .}. Let n ∼NB(r, p) denote the negative binomial (NB) distribution with PMF P(n | r, p) = Γ(n+r) n!Γ(r) pn(1 −p)r, where n ∈Z. The NB distribution n ∼NB(r, p) can be generated as a gamma mixed Poisson distribution as n ∼ Pois(λ), λ ∼Gam [r, p/(1 −p)] , where p/(1−p) is the gamma scale parameter. As shown in [13], the joint distribution of n and l given r and p in l ∼CRT(n, r), n ∼NB(r, p), where l ∈{0, . . . , n} and n ∈Z, is the same as that in n = Pl t=1 ut, ut ∼Log(p), l ∼Pois[−r ln(1 −p)], which is called the Poisson-logarithmic bivariate distribution, with PMF P(n, l | r, p) = |s(n,l)|rl n! pn(1 −p)r. 2 The Poisson Gamma Belief Network Assuming the observations are multivariate count vectors x(1) j ∈ZK0, the generative model of the Poisson gamma belief network (PGBN) with T hidden layers, from top to bottom, is expressed as θ(T ) j ∼Gam r, 1 c(T +1) j , · · · θ(t) j ∼Gam Φ(t+1)θ(t+1) j , 1 c(t+1) j , · · · x(1) j ∼Pois Φ(1)θ(1) j , θ(1) j ∼Gam Φ(2)θ(2) j , p(2) j 1 −p(2) j . (1) The PGBN factorizes the count observation x(1) j into the product of the factor loading Φ(1) ∈ RK0×K1 + and hidden units θ(1) j ∈RK1 + of layer one under the Poisson likelihood, where R+ = {x : x ≥0}, and for t = 1, 2, . . . , T −1, factorizes the shape parameters of the gamma distributed hidden units θ(t) j ∈RKt + of layer t into the product of the connection weight matrix Φ(t+1) ∈RKt×Kt+1 + and the hidden units θ(t+1) j ∈RKt+1 + of layer t + 1; the top layer’s hidden units θ(T ) j share the same 2 vector r = (r1, . . . , rKT )′ as their gamma shape parameters; and the p(2) j are probability parameters and {1/c(t)}3,T +1 are gamma scale parameters, with c(2) j := 1 −p(2) j p(2) j . For scale identifiabilty and ease of inference, each column of Φ(t) ∈RKt−1×Kt + is restricted to have a unit L1 norm. To complete the hierarchical model, for t ∈{1, . . . , T −1}, we let φ(t) k ∼Dir η(t), . . . , η(t) , rk ∼Gam γ0/KT , 1/c0 (2) and impose c0 ∼Gam(e0, 1/f0) and γ0 ∼Gam(a0, 1/b0); and for t ∈{3, . . . , T + 1}, we let p(2) j ∼Beta(a0, b0), c(t) j ∼Gam(e0, 1/f0). (3) We expect the correlations between the rows (features) of (x(1) 1 , . . . , x(1) J ) to be captured by the columns of Φ(1), and the correlations between the rows (latent features) of (θ(t) 1 , . . . , θ(t) J ) to be captured by the columns of Φ(t+1). Even if all Φ(t) for t ≥2 are identity matrices, indicating no correlations between latent features, our analysis will show that a deep structure with T ≥2 could still benefit data fitting by better modeling the variability of the latent features θ(1) j . Sigmoid and deep belief networks. Under the hierarchical model in (1), given the connection weight matrices, the joint distribution of the count observations and gamma hidden units of the PGBN can be expressed, similar to those of the sigmoid and deep belief networks [3], as P x(1) j , {θ(t) j }t {Φ(t)}t = P x(1) j Φ(1), θ(1) j hQT −1 t=1 P θ(t) j Φ(t+1), θ(t+1) j i P θ(T ) j . With φv: representing the vth row Φ, for the gamma hidden units θ(t) vj we have P θ(t) vj φ(t+1) v: , θ(t+1) j , c(t+1) j+1 = c(t+1) j+1 φ(t+1) v: θ(t+1) j Γ φ(t+1) v: θ(t+1) j θ(t) vj φ(t+1) v: θ(t+1) j −1 e−c(t+1) j+1 θ(t) vj , (4) which are highly nonlinear functions that are strongly desired in deep learning. By contrast, with the sigmoid function σ(x) = 1/(1 + e−x) and bias terms b(t+1) v , a sigmoid/deep belief network would connect the binary hidden units θ(t) vj ∈{0, 1} of layer t (for deep belief networks, t < T −1 ) to the product of the connection weights and binary hidden units of the next layer with P θ(t) vj = 1 φ(t+1) v: , θ(t+1) j , b(t+1) v = σ b(t+1) v + φ(t+1) v: θ(t+1) j . (5) Comparing (4) with (5) clearly shows the differences between the gamma nonnegative hidden units and the sigmoid link based binary hidden units. Note that the rectified linear units have emerged as powerful alternatives of sigmoid units to introduce nonlinearity [15]. It would be interesting to use the gamma units to introduce nonlinearity in the positive region of the rectified linear units. Deep Poisson factor analysis. With T = 1, the PGBN specified by (1)-(3) reduces to Poisson factor analysis (PFA) using the (truncated) gamma-negative binomial process [13], which is also related to latent Dirichlet allocation [16] if the Dirichlet priors are imposed on both φ(1) k and θ(1) j . With T ≥2, the PGBN is related to the gamma Markov chain hinted by Corollary 2 of [13] and realized in [17], the deep exponential family of [18], and the deep PFA of [19]. Different from the PGBN, in [18], it is the gamma scale but not shape parameters that are chained and factorized; in [19], it is the correlations between binary topic usage indicators but not the full connection weights that are captured; and neither [18] nor [19] provide a principled way to learn the network structure. Below we break the PGBN of T layers into T related submodels that are solved with the same subroutine. 2.1 The propagation of latent counts and model properties Lemma 1 (Augment-and-conquer the PGBN). With p(1) j := 1 −e−1 and p(t+1) j := −ln(1 −p(t) j ) . h c(t+1) j −ln(1 −p(t) j ) i (6) for t = 1, . . . , T, one may connect the observed (if t = 1) or some latent (if t ≥2) counts x(t) j ∈ ZKt−1 to the product Φ(t)θ(t) j at layer t under the Poisson likelihood as x(t) j ∼Pois h −Φ(t)θ(t) j ln 1 −p(t) j i . (7) 3 Proof. By definition (7) is true for layer t = 1. Suppose that (7) is true for layer t ≥2, then we can augment each count x(t) vj into the summation of Kt latent counts that are smaller or equal as x(t) vj = PKt k=1 x(t) vjk, x(t) vjk ∼Pois h −φ(t) vkθ(t) kj ln 1 −p(t) j i , (8) where v ∈{1, . . . , Kt−1}. With m(t)(t+1) kj := x(t) ·jk := PKt−1 v=1 x(t) vjk representing the number of times that factor k ∈{1, . . . , Kt} of layer t appears in observation j and m(t)(t+1) j := x(t) ·j1, . . . , x(t) ·jKt ′, since PKt−1 v=1 φ(t) vk = 1, we can marginalize out Φ(t) as in [20], leading to m(t)(t+1) j ∼Pois h −θ(t) j ln 1 −p(t) j i . Further marginalizing out the gamma distributed θ(t) j from the above Poisson likelihood leads to m(t)(t+1) j ∼NB Φ(t+1)θ(t+1) j , p(t+1) j . (9) The kth element of m(t)(t+1) j can be augmented under its compound Poisson representation as m(t)(t+1) kj = Px(t+1) kj ℓ=1 uℓ, uℓ∼Log(p(t+1) j ), x(t+1) kj ∼Pois h −φ(t+1) k: θ(t+1) j ln 1 −p(t+1) j i . Thus if (7) is true for layer t, then it is also true for layer t + 1. Corollary 2 (Propagate the latent counts upward). Using Lemma 4.1 of [20] on (8) and Theorem 1 of [13] on (9), we can propagate the latent counts x(t) vj of layer t upward to layer t + 1 as n x(t) vj1, . . . , x(t) vjKt x(t) vj , φ(t) v: , θ(t) j o ∼Mult x(t) vj , φ(t) v1 θ(t) 1j PKt k=1 φ(t) vk θ(t) kj , . . . , φ(t) vKtθ(t) Ktj PKt k=1 φ(t) vk θ(t) kj , (10) x(t+1) kj m(t)(t+1) kj , φ(t+1) k: , θ(t+1) j ∼CRT m(t)(t+1) kj , φ(t+1) k: θ(t+1) j . (11) As x(t) ·j = m(t)(t+1) ·j and x(t+1) kj is in the same order as ln m(t)(t+1) kj , the total count of layer t + 1, expressed as P j x(t+1) ·j , would often be much smaller than that of layer t, expressed as P j x(t) ·j . Thus the PGBN may use P j x(T ) ·j as a simple criterion to decide whether to add more layers. 2.2 Modeling overdispersed counts In comparison to a single-layer shallow model with T = 1 that assumes the hidden units of layer one to be independent in the prior, the multilayer deep model with T ≥2 captures the correlations between them. Note that for the extreme case that Φ(t) = IKt for t ≥2 are all identity matrices, which indicates that there are no correlations between the features of θ(t−1) j left to be captured, the deep structure could still provide benefits as it helps model latent counts m(1)(2) j that may be highly overdispersed. For example, supposing Φ(t) = IK2 for all t ≥2, then from (1) and (9) we have m(1)(2) kj ∼NB(θ(2) kj , p(2) j ), . . . , θ(t) kj ∼Gam(θ(t+1) kj , 1/c(t+1) j ), . . . , θ(T ) kj ∼Gam(rk, 1/c(T +1) j ). For simplicity, let us further assume c(t) j = 1 for all t ≥3. Using the laws of total expectation and total variance, we have E θ(2) kj | rk = rk and Var θ(2) kj | rk = (T −1)rk, and hence E m(1)(2) kj | rk = rkp(2) j /(1 −p(2) j ), Var m(1)(2) kj | rk = rkp(2) j 1 −p(2) j −2 h 1 + (T −1)p(2) j i . In comparison to PFA with m(1)(2) kj | rk ∼NB(rk, p(2) j ), with a variance-to-mean ratio of 1/(1 − p(2) j ), the PGBN with T hidden layers, which mixes the shape of m(1)(2) kj ∼NB(θ(2) kj , p(2) j ) with a chain of gamma random variables, increases the variance-to-mean ratio of the latent count m(1)(2) kj given rk by a factor of 1 + (T −1)p(2) j , and hence could better model highly overdispersed counts. 4 2.3 Upward-downward Gibbs sampling With Lemma 1 and Corollary 2 and the width of the first layer being bounded by K1 max, we develop an upward-downward Gibbs sampler for the PGBN, each iteration of which proceeds as follows: Sample x(t) vjk. We can sample x(t) vjk for all layers using (10). But for the first hidden layer, we may treat each observed count x(1) vj as a sequence of word tokens at the vth term (in a vocabulary of size V := K0) in the jth document, and assign the x(1) ·j words {vji}i=1,x(1) ·j one after another to the latent factors (topics), with both the topics Φ(1) and topic weights θ(1) j marginalized out, as P(zji = k | −) ∝ η(1)+x(1)−ji vji·k V η(1)+x(1)−ji ··k x(1)−ji ·jk + φ(2) k: θ(2) j , k ∈{1, . . . , K1 max}, (12) where zji is the topic index for vji and x(1) vjk := P i δ(vji = v, zji = k) counts the number of times that term v appears in document j; we use the · symbol to represent summing over the corresponding index, e.g., x(t) ·jk := P v x(t) vjk, and use x−ji to denote the count x calculated without considering word i in document j. The collapsed Gibbs sampling update equation shown above is related to the one developed in [21] for latent Dirichlet allocation, and the one developed in [22] for PFA using the beta-negative binomial process. When T = 1, we would replace the terms φ(2) k: θ(2) j with rk for PFA built on the gamma-negative binomial process [13] (or with απk for the hierarchical Dirichlet process latent Dirichlet allocation, see [23] and [22] for details), and add an additional term to account for the possibility of creating an additional topic [22]. For simplicity, in this paper, we truncate the nonparametric Bayesian model with K1 max factors and let rk ∼Gam(γ0/K1 max, 1/c0) if T = 1. Sample φ(t) k . Given these latent counts, we sample the factors/topics φ(t) k as (φ(t) k | −) ∼Dir η(t) + x(t) 1·k, . . . , η(t) + x(t) Kt−1·k . (13) Sample x(t+1) vj . We sample x(t+1) j using (11), replacing Φ(T +1)θ(T +1) j with r := (r1, . . . , rKT )′. Sample θ(t) j . Using (7) and the gamma-Poisson conjugacy, we sample θj as (θ(t) j | −) ∼Gamma Φ(t+1)θ(t+1) j + m(t)(t+1) j , h c(t+1) j −ln 1 −p(t) j i−1 . (14) Sample r. Both γ0 and c0 are sampled using related equations in [13]. We sample r as (rv | −) ∼Gam γ0/KT + x(T +1) v· , h c0 −P j ln 1 −p(T +1) j i−1 . (15) Sample c(t) j . With θ(t) ·j := PKt k=1 θ(t) kj for t ≤T and θ(T +1) ·j := r·, we sample p(2) j and {c(t) j }t≥3 as (p(2) j | −) ∼Beta a0+m(1)(2) ·j , b0+θ(2) ·j , (c(t) j | −) ∼Gamma e0+θ(t) ·j , h f0+θ(t−1) ·j i−1 , (16) and calculate c(2) j and {p(t) j }t≥3 with (6). 2.4 Learning the network structure with layer-wise training As jointly training all layers together is often difficult, existing deep networks are typically trained using a greedy layer-wise unsupervised training algorithm, such as the one proposed in [6] to train the deep belief networks. The effectiveness of this training strategy is further analyzed in [24]. By contrast, the PGBN has a simple Gibbs sampler to jointly train all its hidden layers, as described in Section 2.3, and hence does not require greedy layer-wise training. Yet the same as commonly used deep learning algorithms, it still needs to specify the number of layers and the width of each layer. In this paper, we adopt the idea of layer-wise training for the PGBN, not because of the lack of an effective joint-training algorithm, but for the purpose of learning the width of each hidden layer in a greedy layer-wise manner, given a fixed budget on the width of the first layer. The proposed layer-wise training strategy is summarized in Algorithm 1. With a PGBN of T −1 layers that has already been trained, the key idea is to use a truncated gamma-negative binomial process [13] to model the latent count matrix for the newly added top layer as m(T )(T +1) kj ∼NB(rk, p(T +1) j ), rk ∼ 5 Algorithm 1 The PGBN upward-downward Gibbs sampler that uses a layer-wise training strategy to train a set of networks, each of which adds an additional hidden layer on top of the previously inferred network, retrains all its layers jointly, and prunes inactive factors from the last layer. Inputs: observed counts {xvj}v,j, upper bound of the width of the first layer K1 max, upper bound of the number of layers Tmax, and hyper-parameters. Outputs: A total of Tmax jointly trained PGBNs with depths T = 1, T = 2, . . ., and T = Tmax. 1: for T = 1, 2, . . . , Tmax do Jointly train all the T layers of the network 2: Set KT −1, the inferred width of layer T −1, as KT max, the upper bound of layer T’s width. 3: for iter = 1 : BT + CT do Upward-downward Gibbs sampling 4: Sample {zji}j,i using collapsed inference; Calculate {x(1) vjk}v,k,j; Sample {x(2) vj }v,j ; 5: for t = 2, 3, . . . , T do 6: Sample {x(t) vjk}v,j,k ; Sample {φ(t) k }k ; Sample {x(t+1) vj }v,j ; 7: end for 8: Sample p(2) j and Calculate c(2) j ; Sample {c(t) j }j,t and Calculate {p(t) j }j,t for t = 3, . . . , T + 1 9: for t = T, T −1, . . . , 2 do 10: Sample r if t = T; Sample {θ(t) j }j ; 11: end for 12: if iter = BT then 13: Prune layer T’s inactive factors {φ(T ) k }k:x(T ) ··k =0, let KT = P k δ(x(T ) ··k > 0), and update r; 14: end if 15: end for 16: Output the posterior means (according to the last MCMC sample) of all remaining factors {φ(t) k }k,t as the inferred network of T layers, and {rk}KT k=1 as the gamma shape parameters of layer T’s hidden units. 17: end for Gam(γ0/KT max, 1/c0), and rely on that stochastic process’s shrinkage mechanism to prune inactive factors (connection weight vectors) of layer T, and hence the inferred KT would be smaller than KT max if KT max is sufficiently large. The newly added layer and the layers below it would be jointly trained, but with the structure below the newly added layer kept unchanged. Note that when T = 1, the PGBN would infer the number of active factors if K1 max is set large enough, otherwise, it would still assign the factors with different weights rk, but may not be able to prune any of them. 3 Experimental Results We apply the PGBNs for topic modeling of text corpora, each document of which is represented as a term-frequency count vector. Note that the PGBN with a single hidden layer is identical to the (truncated) gamma-negative binomial process PFA of [13], which is a nonparametric Bayesian algorithm that performs similarly to the hierarchical Dirichlet process latent Dirichlet allocation [23] for text analysis, and is considered as a strong baseline that outperforms a large number of topic modeling algorithms. Thus we will focus on making comparison to the PGBN with a single layer, with its layer width set to be large to approximate the performance of the gamma-negative binomial process PFA. We evaluate the PGBNs’ performance by examining both how well they unsupervisedly extract low-dimensional features for document classification, and how well they predict heldout word tokens. Matlab code will be available in http://mingyuanzhou.github.io/. We use Algorithm 1 to learn, in a layer-wise manner, from the training data the weight matrices Φ(1), . . . , Φ(Tmax) and the top-layer hidden units’ gamma shape parameters r: to add layer T to a previously trained network with T −1 layers, we use BT iterations to jointly train Φ(T ) and r together with {Φ(t)}1,T −1, prune the inactive factors of layer T, and continue the joint training with another CT iterations. We set the hyper-parameters as a0 = b0 = 0.01 and e0 = f0 = 1. Given the trained network, we apply the upward-downward Gibbs sampler to collect 500 MCMC samples after 500 burnins to estimate the posterior mean of the feature usage proportion vector θ(1) j /θ(1) ·j at the first hidden layer, for every document in both the training and testing sets. Feature learning for binary classification. We consider the 20 newsgroups dataset (http://qwone.com/∼jason/20Newsgroups/) that consists of 18,774 documents from 20 different news groups, with a vocabulary of size K0 = 61,188. It is partitioned into a training set of 11,269 documents and a testing set of 7,505 ones. We first consider two binary classification tasks that distinguish between the comp.sys.ibm.pc.hardware and comp.sys.mac.hardware, and between the sci.electronics and sci.med news groups. For each binary classification task, we remove a standard list of stop words and only consider the terms that appear at least five times, and report the classification accuracies based on 12 independent random trials. With the upper bound of the first layer’s 6 Number of layers T 1 2 3 4 5 6 7 8 Classification accuracy 82 82.5 83 83.5 84 84.5 85 85.5 86 86.5 87 (a) ibm.pc.hardware vs mac.hardware Number of layers T 1 2 3 4 5 6 7 8 Classification accuracy 91 91.5 92 92.5 93 93.5 94 94.5 95 (b) sci.electronics vs sci.med Number of layers T 2 4 6 8 Classification accuracy 77 78 79 80 81 82 83 84 85 86(c) ibm.pc.hardware vs mac.hardware Number of layers T 2 4 6 8 Classification accuracy 91.5 92 92.5 93 93.5 94 94.5 95 (d) sci.electronics vs sci.med K1max = 25 K1max = 50 K1max = 100 K1max = 200 K1max = 400 K1max = 600 K1max = 800 Figure 1: Classification accuracy (%) as a function of the network depth T for two 20newsgroups binary classification tasks, with η(t) = 0.01 for all layers. (a)-(b): the boxplots of the accuracies of 12 independent runs with K1 max = 800. (c)-(d): the average accuracies of these 12 runs for various K1 max and T. Note that K1 max = 800 is large enough to cover all active first-layer topics (inferred to be around 500 for both binary classification tasks), whereas all the first-layer topics would be used if K1 max = 25, 50, 100, or 200. Number of layers T 1 2 3 4 5 6 7 Classification accuracy 71 72 73 74 75 76 77 78 79 (a) K1max = 50 K1max = 100 K1max = 200 K1max = 400 K1max = 600 K1max = 800 K1max 100 200 300 400 500 600 700 800 Classification accuracy 71 72 73 74 75 76 77 78 79 (b) T = 1 T = 2 T = 3 T = 4 T = 5 Figure 2: Classification accuracy (%) of the PGBNs for 20newsgroups multi-class classification (a) as a function of the depth T with various K1 max and (b) as a function of K1 max with various depths, with η(t) = 0.05 for all layers. The widths of hidden layers are automatically inferred, with K1 max = 50, 100, 200, 400, 600, or 800. Note that K1 max = 800 is large enough to cover all active first-layer topics, whereas all the first-layer topics would be used if K1 max = 50, 100, or 200. width set as K1 max ∈{25, 50, 100, 200, 400, 600, 800}, and Bt = Ct = 1000 and η(t) = 0.01 for all t, we use Algorithm 1 to train a network with T ∈{1, 2, . . . , 8} layers. Denote ¯θj as the estimated K1 dimensional feature vector for document j, where K1 ≤K1 max is the inferred number of active factors of the first layer that is bounded by the pre-specified truncation level K1 max. We use the L2 regularized logistic regression provided by the LIBLINEAR package [25] to train a linear classifier on ¯θj in the training set and use it to classify ¯θj in the test set, where the regularization parameter is five-folder cross-validated on the training set from (2−10, 2−9, . . . , 215). As shown in Fig. 1, modifying the PGBN from a single-layer shallow network to a multilayer deep one clearly improves the qualities of the unsupervisedly extracted feature vectors. In a random trial, with K1 max = 800, we infer a network structure of (K1, . . . , K8) = (512, 154, 75, 54, 47, 37, 34, 29) for the first binary classification task, and (K1, . . . , K8) = (491, 143, 74, 49, 36, 32, 28, 26) for the second one. Figs. 1(c)-(d) also show that increasing the network depth in general improves the performance, but the first-layer width clearly plays an important role in controlling the ultimate network capacity. This insight is further illustrated below. Feature learning for multi-class classification. We test the PGBNs for multi-class classification on 20newsgroups. After removing a standard list of stopwords and the terms that appear less than five times, we obtain a vocabulary with K0 = 33, 420. We set Ct = 500 and η(t) = 0.05 for all t. If K1 max ≤400, we set Bt = 1000 for all t, otherwise we set B1 = 1000 and Bt = 500 for t ≥2. We use all 11,269 training documents to infer a set of networks with Tmax ∈{1, . . . , 5} and K1 max ∈{50, 100, 200, 400, 600, 800}, and mimic the same testing procedure used for binary classification to extract low-dimensional feature vectors, with which each testing document is classified to one of the 20 news groups using the L2 regularized logistic regression. Fig. 2 shows a clear trend of improvement in classification accuracy by increasing the network depth with a limited first-layer width, or by increasing the upper bound of the width of the first layer with the depth fixed. For example, a single-layer PGBN with K1 max = 100 could add one or more layers to slightly outperform a single-layer PGBN with K1 max = 200, and a single-layer PGBN with K1 max = 200 could add layers to clearly outperform a single-layer PGBN with K1 max as large as 800. We also note that each iteration of jointly training multiple layers costs moderately more than that of training a single layer, e.g., with K1 max = 400, a training iteration on a single core of an Intel Xeon 2.7 GHz CPU on average takes about 5.6, 6.7, 7.1 seconds for the PGBN with 1, 3, and 5 layers, respectively. Examining the inferred network structure also reveals interesting details. For example, in a random trial with Algorithm 1, the inferred network widths (K1, . . . , K5) are 7 K1max 25 100 200 400 600 800 Perplexity 500 550 600 650 700 750 (a) T = 1 T = 2 T = 3 T = 4 T = 5 K1max 25 100 200 400 600 800 Perplexity -2 0 2 4 6 8 10 12 14 (b) T = 1 T = 2 T = 3 T = 4 T = 5 Figure 3: (a) per-heldout-word perplexity (the lower the better) for the NIPS12 corpus (using the 2000 most frequent terms) as a function of the upper bound of the first layer width K1 max and network depth T, with 30% of the word tokens in each document used for training and η(t) = 0.05 for all t. (b) for visualization, each curve in (a) is reproduced by subtracting its values from the average perplexity of the single-layer network. (50, 50, 50, 50, 50), (200, 161, 130, 94, 63), (528, 129, 109, 98, 91), and (608, 100, 99, 96, 89), for K1 max = 50, 200, 600, and 800, respectively. This indicates that for a network with an insufficient budget on its first-layer width, as the network depth increases, its inferred layer widths decay more slowly than a network with a sufficient or surplus budget on its first-layer width; and a network with a surplus budget on its first-layer width may only need relatively small widths for its higher hidden layers. In the Appendix, we provide comparisons of accuracies between the PGBN and other related algorithms, including these of [9] and [26], on similar multi-class document classification tasks. Perplexities for holdout words. In addition to examining the performance of the PGBN for unsupervised feature learning, we also consider a more direct approach that we randomly choose 30% of the word tokens in each document as training, and use the remaining ones to calculate per-heldoutword perplexity. We consider the NIPS12 (http://www.cs.nyu.edu/∼roweis/data.html) corpus, limiting the vocabulary to the 2000 most frequent terms. We set η(t) = 0.05 and Ct = 500 for all t, set B1 = 1000 and Bt = 500 for t ≥2, and consider five random trials. Among the Bt + Ct Gibbs sampling iterations used to train layer t, we collect one sample per five iterations during the last 500 iterations, for each of which we draw the topics {φ(1) k }k and topics weights θ(1) j , to compute the per-heldout-word perplexity using Equation (34) of [13]. As shown in Fig. 3, we observe a clear trend of improvement by increasing both K1 max and T. Qualitative analysis and document simulation. In addition to these quantitative experiments, we have also examined the topics learned at each layer. We use Qt−1 ℓ=1 Φ(ℓ) φ(t) k to project topic k of layer t as a V -dimensional word probability vector. Generally speaking, the topics at lower layers are more specific, whereas those at higher layers are more general. E.g., examining the results used to produce Fig. 3, with K1 max = 200 and T = 5, the PGBN infers a network with (K1, . . . , K5) = (200, 164, 106, 60, 42). The ranks (by popularity) and top five words of three example topics for layer T = 5 are “6 network units input learning training,” “15 data model learning set image,” and “34 network learning model input neural;” while these of five example topics of layer T = 1 are “19 likelihood em mixture parameters data,” “37 bayesian posterior prior log evidence,” “62 variables belief networks conditional inference,” “126 boltzmann binary machine energy hinton,” and “127 speech speaker acoustic vowel phonetic.” We have also tried drawing θ(T ) ∼Gam r, 1/c(T +1) j and downward passing it through the T-layer network to generate synthetic documents, which are found to be quite interpretable and reflect various general aspects of the corpus used to train the network. We provide in the Appendix a number of synthetic documents generated from a PGBN trained on the 20newsgroups corpus, whose inferred structure is (K1, . . . , K5) = (608, 100, 99, 96, 89). 4 Conclusions The Poisson gamma belief network is proposed to extract a multilayer deep representation for highdimensional count vectors, with an efficient upward-downward Gibbs sampler to jointly train all its layers and a layer-wise training strategy to automatically infer the network structure. Example results clearly demonstrate the advantages of deep topic models. For big data problems, in practice one may rarely has a sufficient budget to allow the first-layer width to grow without bound, thus it is natural to consider a belief network that can use a deep representation to not only enhance its representation power, but also better allocate its computational resource. Our algorithm achieves a good compromise between the widths of hidden layers and the depth of the network. Acknowledgements. M. Zhou thanks TACC for computational support. B. Chen thanks the support of the Thousand Young Talent Program of China, NSC-China (61372132), and NCET-13-0945. 8 References [1] Y. Bengio and Y. LeCun. Scaling learning algorithms towards AI. In L´eon Bottou, Olivier Chapelle, D. DeCoste, and J. Weston, editors, Large Scale Kernel Machines. MIT Press, 2007. [2] M Ranzato, F. J. Huang, Y.-L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In CVPR, 2007. [3] Y. Bengio, I. J. Goodfellow, and A. Courville. Deep Learning. Book in preparation for MIT Press, 2015. [4] R. M. Neal. Connectionist learning of belief networks. Artificial Intelligence, pages 71–113, 1992. [5] L. K. Saul, T. Jaakkola, and M. I. Jordan. Mean field theory for sigmoid belief networks. Journal of Artificial Intelligence research, pages 61–76, 1996. [6] G. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, pages 1527–1554, 2006. [7] G. Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, pages 1771–1800, 2002. [8] R. Salakhutdinov and G. E. Hinton. Deep Boltzmann machines. In AISTATS, 2009. [9] H. Larochelle and S. Lauly. A neural autoregressive topic model. In NIPS, 2012. [10] R. Salakhutdinov, J. B. Tenenbaum, and A. Torralba. Learning with hierarchical-deep models. IEEE Trans. Pattern Anal. Mach. Intell., pages 1958–1971, 2013. [11] M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application to information retrieval. In NIPS, pages 1481–1488, 2004. [12] E. P. Xing, R. Yan, and A. G. Hauptmann. Mining associated text and images with dual-wing harmoniums. In UAI, 2005. [13] M. Zhou and L. Carin. Negative binomial process count and mixture modeling. IEEE Trans. Pattern Anal. Mach. Intell., 2015. [14] M. Zhou, O. H. M. Padilla, and J. G. Scott. Priors for random count matrices derived from a family of negative binomial processes. to appear in J. Amer. Statist. Assoc., 2015. [15] V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In ICML, 2010. [16] D. Blei, A. Ng, and M. Jordan. Latent Dirichlet allocation. J. Mach. Learn. Res., 2003. [17] A. Acharya, J. Ghosh, and M. Zhou. Nonparametric Bayesian factor analysis for dynamic count matrices. In AISTATS, 2015. [18] R. Ranganath, L. Tang, L. Charlin, and D. M. Blei. Deep exponential families. In AISTATS, 2015. [19] Z. Gan, C. Chen, R. Henao, D. Carlson, and L. Carin. Scalable deep poisson factor analysis for topic modeling. In ICML, 2015. [20] M. Zhou, L. Hannah, D. Dunson, and L. Carin. Beta-negative binomial process and Poisson factor analysis. In AISTATS, 2012. [21] T. L. Griffiths and M. Steyvers. Finding scientific topics. PNAS, 2004. [22] M. Zhou. Beta-negative binomial process and exchangeable random partitions for mixedmembership modeling. In NIPS, 2014. [23] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. J. Amer. Statist. Assoc., 2006. [24] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle. Greedy layer-wise training of deep networks. In NIPS, 2007. [25] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A library for large linear classification. JMLR, pages 1871–1874, 2008. [26] N. Srivastava, R. Salakhutdinov, and G. Hinton. Modeling documents with a deep Boltzmann machine. In UAI, 2013. 9 | 2015 | 378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.